{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://tekcapitol.com/schema/action-request/v1/action-request.v1.json",
  "title": "TC Protect Action Request v1",
  "description": "Normalized metadata for Check Action. Default is metadata-only: no raw prompts or sensitive business payloads unless explicitly configured. Check Write maps Write Intent into this shape.",
  "type": "object",
  "additionalProperties": true,
  "required": ["action"],
  "properties": {
    "schemaVersion": { "const": "action_request.v1" },
    "request_id": { "type": "string" },
    "run_id": { "type": "string" },
    "workflow_id": { "type": "string" },
    "agent_id": { "type": "string" },
    "initiated_by": { "type": "string" },
    "delegation_chain": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "from": { "type": "string" },
          "to": { "type": "string" },
          "scope": {},
          "timestamp": { "type": "string" },
          "expires_at": { "type": "string" },
          "permitted_actions": { "type": "array" }
        }
      }
    },
    "action": {
      "type": "object",
      "additionalProperties": true,
      "required": ["type"],
      "properties": {
        "type": {
          "type": "string",
          "description": "e.g. write, tool, transfer, notify"
        },
        "operation": { "type": "string" },
        "target_system": { "type": "string" },
        "target_object": { "type": "string" },
        "target_id": { "type": "string" },
        "fields": { "type": "object" },
        "value": {}
      }
    },
    "intent": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "original_goal": { "type": "string" },
        "current_goal": { "type": "string" },
        "business_process": { "type": "string" }
      }
    },
    "authority": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "authority_id": { "type": "string" },
        "scope": { "type": "array" },
        "issued_at": { "type": "string" },
        "expires_at": { "type": "string" },
        "constraints": { "type": "object" }
      }
    },
    "context": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "timestamp": { "type": "string" },
        "environment": { "type": "string" },
        "metadata": { "type": "object" },
        "injection_signals": { "type": "object" },
        "risk_signals": { "type": "object" }
      }
    },
    "writeIntentEnvelope": {
      "type": "object",
      "description": "Optional signed Write Intent Envelope for identity attestation on write-class actions."
    }
  }
}
