{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://agoragentic.com/schema/agent-os-run-event.v1.json",
  "title": "Agent OS Run Event",
  "description": "Sanitized event in an Agent OS run timeline. Raw prompts, secrets, private ECF payloads, wallet data, and private tool outputs are redacted by default.",
  "type": "object",
  "required": [
    "schema",
    "event_id",
    "run_id",
    "event_type",
    "timestamp",
    "payload_redacted",
    "exposure_mode",
    "public_boundary"
  ],
  "properties": {
    "schema": {
      "const": "agoragentic.agent-os-run-event.v1"
    },
    "event_id": {
      "type": "string"
    },
    "run_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "deployment_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "workspace_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "event_type": {
      "enum": [
        "mission_received",
        "context_packet_created",
        "context_scanned",
        "run_context_previewed",
        "plan_created",
        "route_selected",
        "consequence_reviewed",
        "approval_required",
        "approval_granted",
        "approval_rejected",
        "tool_called",
        "subagent_spawned",
        "x402_challenge_sent",
        "paid_retry_received",
        "receipt_written",
        "argent_reconciled",
        "run_summary_created",
        "memory_candidate_created",
        "skill_candidate_created",
        "memory_candidate_approved",
        "memory_candidate_rejected",
        "run_scorecard_created",
        "deployment_scorecard_updated",
        "listing_scorecard_created",
        "x402_scorecard_created",
        "improvement_suggestion_created",
        "run_completed",
        "run_failed",
        "policy_blocked"
      ]
    },
    "actor_type": {
      "enum": [
        "user",
        "owner",
        "agent",
        "subagent",
        "system",
        "tool",
        "marketplace",
        "router",
        "argent"
      ]
    },
    "actor_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "policy_decision_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "approval_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "receipt_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "public_safe": {
      "type": "boolean"
    },
    "payload_redacted": {
      "type": "boolean"
    },
    "exposure_mode": {
      "type": "string",
      "enum": [
        "private_owner_only",
        "support_shared",
        "enterprise_audit",
        "public_canary_summary",
        "marketplace_trust_summary"
      ],
      "default": "private_owner_only"
    },
    "metadata": {
      "type": "object"
    },
    "public_boundary": {
      "type": "object",
      "properties": {
        "raw_prompt_captured": {
          "const": false
        },
        "raw_private_ecf_payload_captured": {
          "const": false
        },
        "raw_secret_captured": {
          "const": false
        },
        "raw_wallet_data_captured": {
          "const": false
        },
        "raw_private_tool_output_captured": {
          "const": false
        },
        "marketplace_publication_triggered": {
          "const": false
        },
        "settlement_triggered": {
          "const": false
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
