{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api.forgeling.io/schemas/events/approval.requested.json",
  "title": "approval.requested",
  "description": "The agent asks to use a tool and the run's approvals mode is ask.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "approval_id",
    "tool",
    "input_summary",
    "expires_at"
  ],
  "properties": {
    "approval_id": {
      "type": "string",
      "pattern": "^apr_[0-9A-HJKMNP-TV-Z]{26}$"
    },
    "tool": {
      "type": "string"
    },
    "input_summary": {
      "type": "string",
      "description": "At most 16 KiB. Run secrets are redacted."
    },
    "expires_at": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$",
      "description": "When the request lapses unanswered."
    }
  }
}
