{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cqnce-app/json-schema/cqnce-app-agent-response-schema.json",
  "title": "AgentResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cqnce-app-openapi.yml#/components/schemas/AgentResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "requestId": {
      "type": "string",
      "format": "uuid"
    },
    "agentId": {
      "type": "string",
      "format": "uuid"
    },
    "agent": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "decision": {
      "type": "string",
      "enum": [
        "APPROVED",
        "REJECTED"
      ]
    },
    "reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "respondedAt": {
      "type": "string",
      "format": "date-time"
    },
    "deviceId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Device that signed this response (null for legacy unsigned responses)"
    },
    "signature": {
      "type": [
        "string",
        "null"
      ],
      "description": "Base64-encoded ECDSA P-256 signature over \"requestId:decision[:reason]\""
    },
    "strongAuthUsed": {
      "type": "boolean",
      "description": "Whether the agent confirmed biometric/strong authentication before submitting this response"
    }
  }
}