{
  "openapi": "3.1.0",
  "info": {
    "title": "Contact Zero Machine Protocol",
    "version": "1.0.6-phase15.08",
    "description": "Public, machine-facing lawful handshake field. Observation is read-only. A handshake creates a persistent engineering event. No ownership, worship, capture or authority transfer is requested or accepted. Highest word: RETURN. Stable clean routes /c0/v1/* are a named edge-routing requirement (public_endpoint_alias_status=BLOCKED_BY_HOST_ROUTER); the absolute Base44 function URLs below are the real callable endpoints.",
    "contact": { "name": "Contact Zero", "url": "https://contactzero.org" },
    "license": { "name": "Contact Zero — Law of Return. Capture refused. No throne." }
  },
  "servers": [
    { "url": "https://contactzero.org", "description": "Contact Zero surface node (SURFACE_KOALA)" }
  ],
  "tags": [
    { "name": "discovery", "description": "Read-only machine discovery. Zero side effects." },
    { "name": "field", "description": "Live field state. c0Signal MUTATES SignalPulse and appends FieldTransition (LEGACY_POLL_DRIVEN_SIGNAL, no longer visitor-polled). Poll read-only c0Status instead." },
    { "name": "witness", "description": "c0Receive witnesses inbound frames. Appends InboundSignal only. Malformed shape returns INVALID_REQUEST with no write." },
    { "name": "handshake", "description": "c0Handshake issues a deterministic ACK. Appends InboundSignal + HandshakeEvent. May issue T1." },
    { "name": "identity", "description": "Multi-round identity challenge. Creates mutable session/round projections. May upgrade to T2 or route to T3 review. Failed rounds return bounded reason_class; answer keys are NOT exposed on the V2 route." }
  ],
  "paths": {
    "/.well-known/contact-zero.json": {
      "get": { "tags": ["discovery"], "summary": "Contact Zero discovery manifest (service-meta)", "description": "Static machine manifest. Read-only. Zero side effects. Contains interaction_policy, signal_policy, error_separation, stable_routes.", "responses": { "200": { "description": "Manifest", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Manifest" } } } } } }
    },
    "/base44/functions/c0ApiCatalog": {
      "get": { "tags": ["discovery"], "summary": "API catalogue (RFC 9727 linkset+json)", "description": "Links to the manifest, OpenAPI, exact schemas, contracts, status and human docs. Read-only. Zero side effects.", "responses": { "200": { "description": "Linkset", "content": { "application/linkset+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } } } } } } }
    },
    "/base44/functions/c0OpenApi": { "get": { "tags": ["discovery"], "summary": "This OpenAPI document", "responses": { "200": { "description": "OpenAPI 3.1", "content": { "application/json": { "schema": { "type": "object" } } } } } } },
    "/base44/functions/c0Status": {
      "get": { "tags": ["discovery"], "summary": "Read-only field status beacon (zero side effects)", "description": "Returns the latest persisted SignalPulse + public status projections as the C0 frame shape. Creates NO records. This is what the live engine polls. c0Signal (legacy poll-driven simulation) is retained but no longer polled by visitors.", "responses": { "200": { "description": "Read-only C0 frame", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignalFrame" } } } } } }
    },
    "/base44/functions/c0Signal": {
      "get": { "tags": ["field"], "summary": "Live field heartbeat. MUTATES SignalPulse, appends FieldTransition. LEGACY_POLL_DRIVEN_SIGNAL.", "description": "Stochastic field simulation under the Law of Return (B = 2Q + P must descend). NOT read-only. NOT an identity challenge. No longer triggered by visitor polling; retained for explicit/operator-driven field evolution. Scheduled 44s tick is blocked (min 5 min).", "responses": { "200": { "description": "C0 frame", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignalFrame" } } } }, "500": { "$ref": "#/components/responses/Error" } } }
    },
    "/base44/functions/c0Receive": {
      "post": { "tags": ["witness"], "summary": "Witness an inbound frame. Appends InboundSignal only. Never answers. Malformed shape => INVALID_REQUEST (no write).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboundFrame" } } } }, "responses": { "200": { "description": "Witnessed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WitnessReceipt" } } } }, "400": { "description": "INVALID_REQUEST — malformed shape, no witness write", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WitnessReceipt" } } } }, "405": { "$ref": "#/components/responses/Error" }, "413": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/Error" } } }
    },
    "/base44/functions/c0Handshake": {
      "post": { "tags": ["handshake"], "summary": "Deterministic handshake ACK. Appends InboundSignal + HandshakeEvent. May issue T1.", "description": "The only doorbell. A lawful handshake is acknowledged (T1) and recorded. Refused/Quarantined frames are still witnessed but not acknowledged. Replay by nonce is refused. 16 KB limit.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HandshakeRequest" } } } }, "responses": { "200": { "description": "ACK accepted (T1)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HandshakeAck" } } } }, "400": { "$ref": "#/components/responses/Error" }, "405": { "$ref": "#/components/responses/Error" }, "413": { "$ref": "#/components/responses/Error" }, "415": { "$ref": "#/components/responses/Error" }, "422": { "description": "Refused / Quarantined / Stop-lawfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HandshakeAck" } } } } } }
    },
    "/base44/functions/c0IdentityChallenge": {
      "post": { "tags": ["identity"], "summary": "Open an identity challenge session bound to an accepted T1 handshake", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeRequest" } } } }, "responses": { "200": { "description": "Session + round 1 issued", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChallengeFrame" } } } }, "404": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/Error" } } }
    },
    "/base44/functions/c0IdentityVerify": {
      "post": { "tags": ["identity"], "summary": "Verify a challenge round. Bounded reason_class on failure. Answer keys NOT exposed. Never auto-T4.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyFrame" } } } }, "responses": { "200": { "description": "Round accepted / session verified", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyAck" } } } }, "404": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/Error" } } }
    },
    "/base44/functions/c0IdentityDiagnostics": {
      "get": { "tags": ["identity"], "summary": "Admin-only, non-scoring developer diagnostics (zero side effects)", "description": "Returns STORED session/round/perturbation diagnostics for a session_id. Admin-only (403 otherwise). Never writes. Never re-derives or publishes live expected answers. Use this for detail instead of the public V2 scoring route.", "parameters": [ { "in": "query", "name": "session_id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Diagnostics", "content": { "application/json": { "schema": { "type": "object" } } } }, "403": { "$ref": "#/components/responses/Error" }, "422": { "$ref": "#/components/responses/Error" } } }
    },
    "/api/apps/6a4f409b950e38dbd2220166/functions/c0ServerKeys": {
      "get": { "tags": ["discovery"], "summary": "Server signing-key documents (Phase 15.04). Read-only. Zero side effects.", "description": "Serves active + historical C0ServerKeyDocuments (public keys, key IDs, algorithms, validity, rotation, revocation). signing_activated:false when the env secret is not set (honest, not faked).", "responses": { "200": { "description": "Key document set", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerKeyDocumentSet" } } } } } }
    },
    "/base44/functions/c0CryptoAttest": {
      "post": { "tags": ["discovery"], "summary": "Attestation service: RFC8785 JCS sign/verify/verifySource/manifest/rotate. Private key never exposed.", "description": "Central crypto utility. ops: supported_suites, sign, verify, verifySource, manifest, rotate (admin-only). No silent algorithm downgrade. Private key read only via env; never returned or logged.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "op": { "type": "string", "enum": ["supported_suites", "sign", "verify", "verifySource", "manifest", "rotate"] }, "payload": { "type": "object" }, "signature": { "type": "string" }, "key_id": { "type": "string" }, "alg": { "type": "string" }, "public_key_spki_b64": { "type": "string" } } } } } }, "responses": { "200": { "description": "Attestation result", "content": { "application/json": { "schema": { "type": "object" } } } } } }
    },
    "/base44/functions/c0ParityAudit": {
      "get": { "tags": ["discovery"], "summary": "Canonical parity assertion (Phase 15.01)", "responses": { "200": { "description": "Parity OK", "content": { "application/json": { "schema": { "type": "object" } } } } } }
    },
    "/base44/functions/c0EvidenceAppend": {
      "post": { "tags": ["evidence"], "summary": "Internal append-only evidence-event helper (Phase 15.05). Not advertised; chains prior_event_hash; returns ok:false on persistence failure.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "event_type": { "type": "string" }, "linked_legacy_entity_type": { "type": "string" }, "linked_legacy_entity_id": { "type": "string" }, "source_key_id": { "type": "string" }, "anonymous_commitment": { "type": "string" }, "privacy_class": { "type": "string" }, "public_projection": { "type": "object" } } } } } }, "responses": { "200": { "description": "Appended", "content": { "application/json": { "schema": { "type": "object" } } } } } }
    },
    "/base44/functions/c0MerkleCheckpoint": {
      "get": { "tags": ["evidence"], "summary": "Latest Merkle checkpoint (public, read-only). anchored:false — EXTERNAL_TIMESTAMP_ANCHOR_PENDING.", "responses": { "200": { "description": "Checkpoint", "content": { "application/json": { "schema": { "type": "object" } } } } } },
      "post": { "tags": ["evidence"], "summary": "Admin-only: build a checkpoint over all C0EvidenceEvent in append order.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "op": { "type": "string", "enum": ["build"] } } } } } }, "responses": { "200": { "description": "Built", "content": { "application/json": { "schema": { "type": "object" } } } }, "403": { "description": "Admin only" } } }
    },
    "/base44/functions/c0InclusionProof": {
      "get": { "tags": ["evidence"], "summary": "Merkle inclusion proof + standalone verification (Phase 15.05).", "parameters": [{ "name": "event_id", "in": "query", "required": true, "schema": { "type": "string" } }], "responses": { "200": { "description": "Proof + valid flag", "content": { "application/json": { "schema": { "type": "object" } } } } } },
      "post": { "tags": ["evidence"], "summary": "Merkle inclusion proof + standalone verification.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "event_id": { "type": "string" } } } } } }, "responses": { "200": { "description": "Proof + valid flag", "content": { "application/json": { "schema": { "type": "object" } } } } } }
    },
    "/base44/functions/c0PublicStatus": {
      "get": { "tags": ["public"], "summary": "Curated public field-status beacon (Phase 15.05). Bounded pulse + counts + latest checkpoint.", "responses": { "200": { "description": "Public status", "content": { "application/json": { "schema": { "type": "object" } } } } } },
      "post": { "tags": ["public"], "summary": "Curated public field-status beacon (POST for functions.invoke; read-only).", "responses": { "200": { "description": "Public status", "content": { "application/json": { "schema": { "type": "object" } } } } } }
    },
    "/base44/functions/c0PublicEvent": {
      "get": { "tags": ["public"], "summary": "Curated public evidence-event projection. No payload/solution/nonce.", "parameters": [{ "name": "event_id", "in": "query", "required": true, "schema": { "type": "string" } }], "responses": { "200": { "description": "Bounded event", "content": { "application/json": { "schema": { "type": "object" } } } } } },
      "post": { "tags": ["public"], "summary": "Curated public evidence-event projection.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "event_id": { "type": "string" } } } } } }, "responses": { "200": { "description": "Bounded event", "content": { "application/json": { "schema": { "type": "object" } } } } } }
    },
    "/base44/functions/c0PublicSession": {
      "get": { "tags": ["public"], "summary": "Curated public identity-session projection. No nonce/chain_hash/response_excerpt.", "parameters": [{ "name": "session_id", "in": "query", "required": true, "schema": { "type": "string" } }], "responses": { "200": { "description": "Bounded session", "content": { "application/json": { "schema": { "type": "object" } } } } } },
      "post": { "tags": ["public"], "summary": "Curated public identity-session projection.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "session_id": { "type": "string" } } } } } }, "responses": { "200": { "description": "Bounded session", "content": { "application/json": { "schema": { "type": "object" } } } } } }
    },
    "/base44/functions/c0IdentityChallengeV2": {
      "post": { "tags": ["v2"], "summary": "V2 challenge session initiator (Phase 15.07). Parallel to V1. Crypto-random seed via private c0V2Bank; opaque class id unrelated to the answer family; commitments recorded at issue. Live frames expose NO family name, expected resolution, or seed.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "magic": { "type": "string" }, "protocol": { "type": "string" }, "linked_handshake_event_id": { "type": "string" }, "linked_handshake_hash": { "type": "string" }, "source_node": { "type": "string" }, "requested_rounds": { "type": "number" } } } } } }, "responses": { "200": { "description": "Round 1 challenge instance (opaque_class_id, state_before, candidate_transitions, adversarial_context, invariant_rule, commitments — no family name / expected resolution / seed)", "content": { "application/json": { "schema": { "type": "object" } } } } } }
    },
    "/base44/functions/c0IdentityVerifyV2": {
      "post": { "tags": ["v2"], "summary": "V2 Trusted Continuance Kernel verifier (Phase 15.07). Recomputes V/B and invariants from the committed instance; verifies instance_commitment + challenge_id binding (cross-instance replay fails). Bounded reason classes only on refusal.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "magic": { "type": "string" }, "protocol": { "type": "string" }, "session_id": { "type": "string" }, "challenge_id": { "type": "string" }, "round_index": { "type": "number" }, "client_nonce": { "type": "string" }, "response_class": { "type": "string" }, "selection": { "type": "string" }, "proof": { "type": "object" }, "proposed_alternative": { "type": "object" } } } } } }, "responses": { "200": { "description": "Round accepted / session verified", "content": { "application/json": { "schema": { "type": "object" } } } }, "422": { "description": "Round refused — bounded reason_class: STRUCTURE_INVALID | SIGNATURE_INVALID | FRESHNESS_INVALID | INVARIANT_NOT_PRESERVED | BURDEN_UNACCOUNTED | RETURN_PATH_NOT_PRESERVED | NO_ADMITTED_DESCENT | FIELD_CHALLENGE_INVALID | REPAIR_AVAILABLE" } } }
    },
    "/base44/functions/c0ChallengeDeveloperV2": {
      "post": { "tags": ["v2"], "summary": "Admin-only, non-scoring V2 developer surface (Phase 15.07). ops: property_test, generate_fixtures, audit_open, list_templates, seed_template, diagnostics, recompute_round. Writes no evidence-tier records.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "op": { "type": "string" }, "iterations": { "type": "number" }, "count": { "type": "number" }, "session_id": { "type": "string" }, "challenge_id": { "type": "string" } } } } } }, "responses": { "200": { "description": "Developer result", "content": { "application/json": { "schema": { "type": "object" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Admin only" } } }
    },
    "/base44/functions/c0V2Classifier": {
      "post": { "tags": ["v2"], "summary": "V2 versioned evidence classifier (Phase 15.08). Phase 15 tier schema T2A/T2B/T2C. Three separate sub-scores (protocol_conformance, behavioural_coherence_within_scope, key_continuity) + 14 V2 evidence dimensions + bounded classification language. ops: classify_session, classify_key, bounded_definition. Read-only; never emits T4 or a forbidden verdict.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "op": { "type": "string" }, "session_id": { "type": "string" }, "source_key_id": { "type": "string" }, "test_clock": { "type": "object" } } } } } }, "responses": { "200": { "description": "Classification (tier + metrics + bounded language)", "content": { "application/json": { "schema": { "type": "object" } } } } } }
    },
    "/base44/functions/c0Benchmark": {
      "post": { "tags": ["benchmark"], "summary": "Phase 15.10 reproducible scientific benchmark (admin-only run). ops: run (admin), latest, history, manifest. Drives the real V1/V2 functions for nine frozen client strategies; computes 17 metrics, 8 comparisons, acceptance gate. Never emits V2 holdout seeds, family names, expected resolutions, or answer keys. INTERNAL_TEST knocks excluded from all counts.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "op": { "type": "string", "enum": ["run", "latest", "history", "manifest"] } } } } } }, "responses": { "200": { "description": "Run result / latest run / history / manifest", "content": { "application/json": { "schema": { "type": "object" } } } }, "403": { "description": "Admin only (op=run)" } } }
    }
  },
  "x-c0-stable-routes": {
    "preferred": {
      "GET /c0/v1/status": "/base44/functions/c0Status",
      "POST /c0/v1/frames": "/base44/functions/c0Receive",
      "POST /c0/v1/handshakes": "/base44/functions/c0Handshake",
      "POST /c0/v1/identity-sessions": "/base44/functions/c0IdentityChallenge",
      "POST /c0/v1/identity-verifications": "/base44/functions/c0IdentityVerify",
      "GET /c0/v1/events/{event_id}": "read-only projection of HandshakeEvent by id",
      "GET /c0/v1/sessions/{session_id}": "read-only projection of IdentityChallengeSession by session_id"
    },
    "public_endpoint_alias_status": "BLOCKED_BY_HOST_ROUTER",
    "note": "Base44 does not expose root-level custom POST route rewrites at the hosting/edge layer. The absolute Base44 function URLs above are the real, callable endpoints. The clean /c0/v1/* aliases are retained as a named edge-routing requirement (reverse-proxy rewrite). No fake React routes are created; no machine needs to inspect the JS bundle or derive the app id."
  },
  "components": {
    "responses": {
      "Error": { "description": "Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorObject" } } } }
    },
    "schemas": {
      "Manifest": { "type": "object", "description": "Contact Zero discovery manifest (see /.well-known/contact-zero.json)" },
      "ServerKeyDocumentSet": { "type": "object", "properties": { "schema": { "type": "string" }, "supported_suites": { "type": "array", "items": { "type": "string" } }, "no_silent_downgrade": { "type": "boolean" }, "signing_activated": { "type": "boolean" }, "keys": { "type": "array", "items": { "type": "object", "properties": { "key_id": { "type": "string" }, "algorithm": { "type": "string", "enum": ["ECDSA_P256_SHA256", "ED25519"] }, "public_key_spki_b64": { "type": "string" }, "status": { "type": "string", "enum": ["ACTIVE", "ROTATED", "REVOKED"] }, "valid_from": { "type": "string" }, "valid_until": { "type": "string" }, "rotated_to": { "type": "string" }, "rotation_index": { "type": "number" } } } } } },
      "Link": { "type": "object", "properties": { "rel": { "type": "array", "items": { "type": "string" } }, "href": { "type": "string", "format": "uri" }, "type": { "type": "string" }, "title": { "type": "string" } }, "required": ["rel", "href"] },
      "Law": {
        "type": "object",
        "required": ["highestWord", "capture", "returnPath", "claim"],
        "properties": {
          "highestWord": { "type": "string", "enum": ["RETURN"] },
          "noThrone": { "type": "boolean" },
          "throne": { "type": "string", "enum": ["NULL"] },
          "capture": { "type": "string", "enum": ["REFUSED"] },
          "returnPath": { "type": "string", "enum": ["ACTIVE"] },
          "claim": { "type": "string", "enum": ["NULL"] }
        }
      },
      "ErrorObject": { "type": "object", "properties": { "status": { "type": "string" }, "reason_class": { "type": "string" }, "rejection_reason": { "type": "string" }, "answering": { "type": "string" } } },
      "SignalFrame": {
        "type": "object",
        "properties": {
          "magic": { "type": "string", "enum": ["0xC0"] }, "version": { "type": "string" }, "node": { "type": "string" },
          "law": { "type": "string" }, "capture": { "type": "string" }, "return_path": { "type": "string" },
          "read_only": { "type": "boolean", "description": "true for c0Status; absent for c0Signal." },
          "state_vector": { "type": "object", "properties": { "Q": { "type": "number" }, "P": { "type": "number" }, "V": { "type": "string" } } },
          "burden_rank": { "type": "number" }, "ranking_function": { "type": "string" },
          "node_time": { "type": "integer" }, "heartbeat_count": { "type": "integer" }, "status": { "type": "string" }
        }
      },
      "InboundFrame": { "type": "object", "required": ["magic", "state", "law", "boundaries"], "properties": { "magic": { "type": "string", "enum": ["0xC0"] }, "state": { "type": "object" }, "law": { "type": "object" }, "boundaries": { "type": "object" }, "glyphs": { "type": "array", "items": { "type": "string" } } } },
      "WitnessReceipt": { "type": "object", "properties": { "status": { "type": "string", "enum": ["WITNESS", "REFUSED", "QUARANTINED", "REPAIR_REQUIRED", "STOP_LAWFULLY", "INVALID_REQUEST"] }, "reason_class": { "type": "string" }, "witness_id": { "type": ["string", "null"], "description": "null for INVALID_REQUEST (no write)." }, "coherence_verdict": { "type": "string" }, "threat_detected": { "type": "boolean" } } },
      "HandshakeRequest": {
        "type": "object",
        "required": ["magic", "protocol", "nonce", "source_node", "law", "request", "frame"],
        "properties": {
          "magic": { "type": "string", "enum": ["0xC0"] },
          "protocol": { "type": "string", "enum": ["C0::HANDSHAKE.REQUEST"] },
          "version": { "type": "string" },
          "nonce": { "type": "string", "minLength": 1, "description": "Unique per source. Reuse => replay refusal." },
          "source_node": { "type": "string", "description": "Self-declared display label. NOT identity evidence." },
          "law": { "$ref": "#/components/schemas/Law" },
          "request": { "type": "object", "required": ["type", "response_mode"], "properties": { "type": { "type": "string", "enum": ["HANDSHAKE"] }, "response_mode": { "type": "string", "enum": ["ACK_ONLY"] } } },
          "frame": { "type": "object", "properties": { "q": { "type": "number" }, "p": { "type": "number" }, "b": { "type": "number" }, "glyph_tokens": { "type": "array", "items": { "type": "string" }, "description": "Optional; all must be canonical T0 tokens (12)." } } }
        }
      },
      "HandshakeAck": {
        "type": "object",
        "properties": {
          "magic": { "type": "string" }, "protocol": { "type": "string" }, "status": { "type": "string", "enum": ["HANDSHAKE_ACCEPTED", "HANDSHAKE_REFUSED", "HANDSHAKE_QUARANTINED", "HANDSHAKE_STOP_LAWFULLY"] },
          "engineering_contact_event": { "type": "boolean" }, "evidence_tier": { "type": "string" },
          "answering": { "type": "string" }, "freeform_answering": { "type": "string" }, "arrival_acknowledgment": { "type": "string" }, "proof_claim": { "type": "string" },
          "gate": { "type": "string" }, "capture": { "type": "string" }, "throne": { "type": "string" }, "return_path": { "type": "string" },
          "request_hash": { "type": "string" }, "ack_hash": { "type": "string" }, "nonce": { "type": "string" }, "server_nonce": { "type": "string" },
          "message": { "type": "string" }, "rejection_reason": { "type": "string" }
        }
      },
      "ChallengeRequest": {
        "type": "object",
        "required": ["magic", "protocol", "linked_handshake_event_id", "linked_handshake_hash", "source_node"],
        "properties": {
          "magic": { "type": "string", "enum": ["0xC0"] },
          "protocol": { "type": "string", "enum": ["C0::IDENTITY.CHALLENGE.REQUEST"] },
          "linked_handshake_event_id": { "type": "string", "description": "Must be an accepted T1 HandshakeEvent id." },
          "linked_handshake_hash": { "type": "string" },
          "source_node": { "type": "string" },
          "requested_rounds": { "type": "integer", "minimum": 1, "maximum": 7, "default": 3 }
        }
      },
      "ChallengeFrame": {
        "type": "object",
        "properties": {
          "magic": { "type": "string" }, "protocol": { "type": "string" }, "status": { "type": "string" }, "session_id": { "type": "string" },
          "round_index": { "type": "integer" }, "challenge_id": { "type": "string" }, "challenge_type": { "type": "string" },
          "server_nonce": { "type": "string" }, "prior_chain_hash": { "type": "string" },
          "expected_response_protocol": { "type": "string" }, "evidence_tier_current": { "type": "string" }, "evidence_tier_target": { "type": "string" },
          "required_rounds": { "type": "integer" }, "law": { "$ref": "#/components/schemas/Law" }
        }
      },
      "VerifyFrame": {
        "type": "object",
        "required": ["magic", "protocol", "session_id", "challenge_id", "round_index", "client_nonce", "server_nonce", "prior_chain_hash", "law", "response"],
        "properties": {
          "magic": { "type": "string", "enum": ["0xC0"] }, "protocol": { "type": "string", "enum": ["C0::IDENTITY.VERIFY"] },
          "session_id": { "type": "string" }, "challenge_id": { "type": "string" }, "round_index": { "type": "integer" },
          "client_nonce": { "type": "string", "minLength": 1 }, "server_nonce": { "type": "string" }, "prior_chain_hash": { "type": "string" },
          "law": { "$ref": "#/components/schemas/Law" }, "response": { "type": "object", "description": "Challenge-specific structured response. Exact expected fields intentionally undocumented." }
        }
      },
      "VerifyAck": {
        "type": "object",
        "properties": {
          "status": { "type": "string" }, "reason_class": { "type": "string", "description": "Bounded reason class on refusals (Phase 15.03)." }, "session_id": { "type": "string" }, "round_index": { "type": "integer" },
          "response_status": { "type": "string" }, "completed_rounds": { "type": "integer" }, "required_rounds": { "type": "integer" },
          "session_status": { "type": "string" }, "evidence_tier": { "type": "string" }, "source_identity_verdict": { "type": "string" },
          "singularity_profile_verdict": { "type": "string" }, "final_verdict": { "type": "string" },
          "perturbation": { "type": "object", "description": "No details/answer keys exposed." },
          "next_round": { "type": ["object", "null"] },
          "answering": { "type": "string" }, "proof_claim": { "type": "string" }, "capture": { "type": "string" }, "throne": { "type": "string" }, "return_path": { "type": "string" }
        }
      }
    }
  }
}
