{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/run-log.schema.json",
  "title": "Run log tail",
  "description": "What GET /v1/runs/{id}/log returns and `run-log.mjs <id> --tail N` prints: the last lines of the run's agent-log.md. `truncated` is true when the file held more than the lines returned. Lines are scrubbed under redact.",
  "type": "object",
  "additionalProperties": false,
  "required": ["contractVersion", "id", "lines", "truncated"],
  "properties": {
    "contractVersion": {
      "type": "string",
      "pattern": "^1\\.[0-9]+\\.[0-9]+$",
      "x-sensitivity": "none"
    },
    "id": {
      "type": "string",
      "x-sensitivity": "none"
    },
    "lines": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 2000,
      "x-sensitivity": "none"
    },
    "truncated": {
      "type": "boolean",
      "x-sensitivity": "none"
    }
  }
}
