{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bernstein-run/json-schema/bernstein-run-task-artifact-post-schema.json",
  "title": "TaskArtifactPost",
  "description": "Body for POST /tasks/{task_id}/artifacts (#2553).\n\nAn agent-posted, journal-anchored artifact. ``artifact_type`` selects the\npayload shape: ``report`` uses ``body`` (markdown); ``table`` uses\n``columns`` and ``rows``; ``link`` uses ``url`` and ``link_kind``\n(``preview`` / ``dashboard`` / ``document``). ``poster`` is the claim\nidentity: a caller may only post against a task whose claim it holds.\n\nThere is deliberately no progress field. Progress is a chain-computed\nprojection of journaled work, never postable.",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bernstein-run-openapi.yaml#/components/schemas/TaskArtifactPost",
  "properties": {
    "key": {
      "type": "string",
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.\\-]{0,127}$",
      "title": "Key"
    },
    "artifact_type": {
      "type": "string",
      "pattern": "^(report|table|link|finding)$",
      "title": "Artifact Type"
    },
    "poster": {
      "type": "string",
      "maxLength": 1000,
      "minLength": 1,
      "title": "Poster"
    },
    "body": {
      "type": "string",
      "maxLength": 1048576,
      "title": "Body",
      "default": ""
    },
    "columns": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Columns"
    },
    "rows": {
      "items": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "type": "array",
      "title": "Rows"
    },
    "url": {
      "type": "string",
      "maxLength": 4096,
      "title": "Url",
      "default": ""
    },
    "link_kind": {
      "type": "string",
      "maxLength": 64,
      "title": "Link Kind",
      "default": ""
    },
    "sarif_result": {
      "additionalProperties": true,
      "type": "object",
      "title": "Sarif Result"
    },
    "tool": {
      "type": "string",
      "maxLength": 1000,
      "title": "Tool",
      "default": ""
    },
    "tool_version": {
      "type": "string",
      "maxLength": 128,
      "title": "Tool Version",
      "default": ""
    },
    "pinned_ruleset_or_feed_digest": {
      "type": "string",
      "maxLength": 256,
      "title": "Pinned Ruleset Or Feed Digest",
      "default": ""
    },
    "invocation_argv_hash": {
      "type": "string",
      "maxLength": 256,
      "title": "Invocation Argv Hash",
      "default": ""
    },
    "target": {
      "type": "string",
      "maxLength": 4096,
      "title": "Target",
      "default": ""
    }
  },
  "type": "object",
  "required": [
    "key",
    "artifact_type",
    "poster"
  ]
}