{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://signalstudio.cc/resources/agent-authorization-request.schema.json",
  "title": "Signal Studio AI Agent Authorization Request",
  "description": "A vendor-neutral request envelope for policy decisions about consequential AI agent tool calls.",
  "$comment": "Version 1.0.0; Apache-2.0; maintained by Signal Studio; updated 2026-08-26. Guide: https://signalstudio.cc/guides/agent-tool-permission-system/. Book: https://signalstudio.cc/books/securing-ai-agents/. Shape validation does not grant authority or prove policy correctness.",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "request_id", "principal", "tenant", "resource", "action", "arguments_digest", "purpose", "risk_tier", "requested_at", "expires_at"],
  "properties": {
    "schema_version": { "const": "1.0.0" },
    "request_id": { "type": "string", "minLength": 1 },
    "principal": { "type": "string", "minLength": 1, "description": "Authenticated human or workload identity, never a model-generated display name." },
    "tenant": { "type": "string", "minLength": 1 },
    "resource": { "type": "string", "minLength": 1 },
    "action": { "type": "string", "minLength": 1 },
    "arguments_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
    "purpose": { "type": "string", "minLength": 1 },
    "risk_tier": { "enum": ["read", "propose", "reversible", "high-impact"] },
    "requested_at": { "type": "string", "format": "date-time" },
    "expires_at": { "type": "string", "format": "date-time" },
    "operation_key": { "type": ["string", "null"] },
    "approval_ref": { "type": ["string", "null"] },
    "evidence_refs": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
    "policy_version": { "type": ["string", "null"] }
  }
}
