{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bernstein-run/json-schema/bernstein-run-record-event-request-schema.json",
  "title": "RecordEventRequest",
  "description": "Body for recording a task completion/failure event.\n\nAttributes:\n    task_id: Task identifier.\n    success: Whether the task succeeded.\n    duration_s: Task wall-clock duration in seconds.\n    cost_usd: Estimated cost of the task in USD.\n    initial_stage: Stage to initialise the record at when no record exists yet.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bernstein-run-graduation-api-openapi.yml#/components/schemas/RecordEventRequest",
  "properties": {
    "task_id": {
      "type": "string",
      "title": "Task Id"
    },
    "success": {
      "type": "boolean",
      "title": "Success"
    },
    "duration_s": {
      "type": "number",
      "title": "Duration S",
      "default": 0
    },
    "cost_usd": {
      "type": "number",
      "title": "Cost Usd",
      "default": 0
    },
    "initial_stage": {
      "type": "string",
      "title": "Initial Stage",
      "default": "sandbox"
    }
  },
  "type": "object",
  "required": [
    "task_id",
    "success"
  ]
}