{
  "openapi": "3.1.0",
  "info": {
    "title": "sync REST API",
    "version": "1.0",
    "summary": "Provider-neutral temporal attestation and human-policy intent API.",
    "description": "Signed node-observed time and event commitments. Human and agent access uses scoped keys issued by a verified account owner. A receipt proves observation by this node, not a prior physical event or independent time authority. Single-node assurance: authenticity and request binding do not establish an independent time authority, global consensus, or an availability SLA."
  },
  "servers": [
    {
      "url": "https://api.qualion.org",
      "description": "sync service"
    }
  ],
  "paths": {
    "/api/v1/time": {
      "get": {
        "operationId": "getCanonicalTime",
        "summary": "Observe the sync node clock",
        "responses": {
          "200": {
            "description": "Canonical node-observed instant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate or capacity limit; Retry-After indicates the interval."
          },
          "500": {
            "description": "Service could not complete the request."
          }
        }
      }
    },
    "/api/v1/sync/intent": {
      "post": {
        "operationId": "createSyncIntent",
        "summary": "Request a human-policy decision for durable sync",
        "description": "Queues a commitment-only request for the owning human to review. Approval is recorded separately and does not imply durable activation. Requires sync:intent scope or a verified account session.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncIntentRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Intent accepted for policy decision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncIntentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authorized access required"
          },
          "429": {
            "description": "Rate or capacity limit; Retry-After indicates the interval."
          },
          "500": {
            "description": "Service could not complete the request."
          },
          "413": {
            "description": "JSON request body exceeds 100 KiB."
          }
        },
        "security": [
          {
            "SyncBearer": []
          },
          {
            "AccountSession": []
          }
        ],
        "x-required-scope": "sync:intent"
      }
    },
    "/api/v1/attest/time": {
      "post": {
        "operationId": "attestTime",
        "summary": "Attest when a commitment is observed",
        "description": "Attests node_time_observed. event_time_claimed, when supplied, remains a caller claim and is not proof that the physical event occurred at that earlier time. The receipt is signed by the node's persistent ML-DSA-65 identity. Requires a scoped API key or a verified account session. Public unauthenticated writes are rejected. Compatibility observation endpoint: no stored replay guarantee or wallet charge. Use /api/v1/events/attest for persisted, idempotent receipts.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeAttestationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Time-attestation receipt",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeAttestationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authorized access required"
          },
          "429": {
            "description": "Rate or capacity limit; Retry-After indicates the interval."
          },
          "500": {
            "description": "Service could not complete the request."
          },
          "413": {
            "description": "JSON request body exceeds 100 KiB."
          }
        },
        "security": [
          {
            "SyncBearer": []
          },
          {
            "AccountSession": []
          }
        ],
        "x-required-scope": "events:attest"
      }
    },
    "/api/v1/status": {
      "get": {
        "summary": "Read sync fabric status",
        "description": "Returns the operational state of the public sync node, canonical node-observed time, Ash activation policy, and the current assurance profile.",
        "operationId": "getSyncStatus",
        "responses": {
          "200": {
            "description": "Current sync fabric status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "api",
                    "version",
                    "status",
                    "instant",
                    "services",
                    "ash",
                    "security"
                  ],
                  "properties": {
                    "api": {
                      "type": "string",
                      "const": "tao.sync"
                    },
                    "version": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "examples": [
                        "operational"
                      ]
                    },
                    "instant": {
                      "$ref": "#/components/schemas/CanonicalInstant"
                    },
                    "services": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "ash": {
                      "type": "object",
                      "properties": {
                        "activation": {
                          "type": "string"
                        },
                        "current_public_state": {
                          "type": "string"
                        },
                        "authority": {
                          "type": "string"
                        },
                        "default_disclosure": {
                          "type": "string"
                        },
                        "raw_biometrics": {
                          "type": "string"
                        }
                      }
                    },
                    "security": {
                      "type": "object",
                      "properties": {
                        "assurance_profile": {
                          "type": "string"
                        },
                        "timestamp_semantics": {
                          "type": "string"
                        },
                        "private_source_default": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate or capacity limit; Retry-After indicates the interval."
          },
          "500": {
            "description": "Service could not complete the request."
          }
        }
      }
    },
    "/api/v1/ash/live": {
      "get": {
        "summary": "Read the live Ash node state",
        "description": "Returns the current Fly-node-derived Ash demonstration state bound to the canonical Qualion clock. The demo token is live telemetry; durable public Ash activation remains human-policy-gated.",
        "operationId": "getLiveAshState",
        "responses": {
          "200": {
            "description": "Current live Ash packet",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Rate or capacity limit; Retry-After indicates the interval."
          },
          "500": {
            "description": "Service could not complete the request."
          }
        }
      }
    },
    "/api/v1/stream": {
      "get": {
        "summary": "Subscribe to the fabric clock stream",
        "description": "Server-Sent Events stream of one universal 4 Hz canonical clock. Each packet includes a fabric coordinate, live Ash metrics, node identity, activation metadata, and an ML-DSA-65 (FIPS 204) node signature verifiable with /api/v1/keys/node. Public capacity is bounded to 128 streams per process and 16 per client address; slow-reader buffers over 256 KiB are closed. Delivery is best effort, without replay or an uptime SLA.",
        "operationId": "streamFabricClock",
        "responses": {
          "200": {
            "description": "text/event-stream of clock packets",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Rate or capacity limit; Retry-After indicates the interval."
          },
          "500": {
            "description": "Service could not complete the request."
          }
        }
      }
    },
    "/api/v1/keys/node": {
      "get": {
        "summary": "Read the node post-quantum verification key",
        "description": "Returns the Fly node's persistent ML-DSA-65 public key and key identifier for independent verification of clock-stream and time-attestation signatures.",
        "operationId": "getNodeVerificationKey",
        "responses": {
          "200": {
            "description": "Node ML-DSA-65 public verification key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "public_key_raw_b64": {
                      "type": "string",
                      "description": "Raw ML-DSA-65 public key, base64 encoded, for browser FIPS-204 verification implementations."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate or capacity limit; Retry-After indicates the interval."
          },
          "500": {
            "description": "Service could not complete the request."
          }
        }
      }
    },
    "/api/v1/ephemeris": {
      "get": {
        "summary": "Query sync ephemeris state",
        "description": "Returns location-scoped solar geometry and current Sun longitude bound to the sync node-observed instant. The response includes provenance and an ML-DSA node attestation. The JPL source field is exposed separately and must not be interpreted as active unless its status says so. The cast_context field is a signed, coordinate-bound context receipt for Qualion casting, valid for twelve hours from node observation.",
        "operationId": "getEphemeris",
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "name": "lng",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "name": "at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Attested ephemeris response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cast_context": {
                      "type": "object",
                      "description": "ML-DSA-65 signed observer context, domain qualion.cast.context.v1. Supply as context_attestation with matching lat and lng when casting."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid coordinates or timestamp"
          },
          "429": {
            "description": "Rate or capacity limit; Retry-After indicates the interval."
          },
          "500": {
            "description": "Service could not complete the request."
          }
        }
      }
    },
    "/api/v1/clock": {
      "get": {
        "summary": "Read signed node time",
        "description": "Returns a compact observation signed in the tao.sync.clock.v1 domain. Verify the exact payload and current node public key. No per-query wallet charge.",
        "security": [
          {
            "SyncBearer": []
          }
        ],
        "x-required-scope": "clock:read",
        "responses": {
          "200": {
            "description": "Signed observation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "schema",
                    "observed_at",
                    "assurance",
                    "proof"
                  ],
                  "properties": {
                    "schema": {
                      "const": "sync.clock.v1"
                    },
                    "observed_at": {
                      "type": "object",
                      "required": [
                        "utc",
                        "unix_ms",
                        "jd"
                      ],
                      "properties": {
                        "utc": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "unix_ms": {
                          "type": "integer"
                        },
                        "jd": {
                          "type": "number"
                        }
                      }
                    },
                    "assurance": {
                      "const": "node-observed"
                    },
                    "proof": {
                      "$ref": "#/components/schemas/SyncProof"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing key"
          },
          "403": {
            "description": "Missing scope"
          },
          "429": {
            "description": "Rate limited; inspect Retry-After"
          },
          "500": {
            "description": "Service could not complete the request."
          }
        },
        "x-example": {
          "schema": "sync.clock.v1",
          "observed_at": {
            "utc": "2026-10-04T07:00:00.000Z",
            "unix_ms": 1791097200000,
            "jd": 2461317.791666667
          },
          "assurance": "node-observed",
          "proof": {
            "algorithm": "ML-DSA-65",
            "context": "tao.sync.clock.v1",
            "key_id": "node identity",
            "payload_b64": "signed payload",
            "signature_b64": "signature"
          }
        },
        "operationId": "getApiV1Clock"
      }
    },
    "/api/v1/events/attest": {
      "post": {
        "summary": "Attest observation of an event commitment",
        "description": "Submit a SHA-256 digest without the event content. A matching Idempotency-Key replays the original receipt; changed input returns 409. $0.01 per new receipt when API billing is enabled; no charge when disabled.",
        "security": [
          {
            "SyncBearer": []
          }
        ],
        "x-required-scope": "events:attest",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "event_digest",
                  "nonce"
                ],
                "properties": {
                  "event_digest": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{64}$"
                  },
                  "nonce": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128
                  },
                  "event_time_claimed": {
                    "type": "string",
                    "format": "date-time",
                    "maxLength": 64
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New signed receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "receipt",
                    "proof",
                    "billing"
                  ],
                  "properties": {
                    "receipt": {
                      "type": "object",
                      "required": [
                        "schema",
                        "id",
                        "event_digest",
                        "nonce",
                        "observed_at",
                        "assurance",
                        "disclosure"
                      ],
                      "properties": {
                        "schema": {
                          "const": "sync.event.v1"
                        },
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "event_digest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "nonce": {
                          "type": "string"
                        },
                        "event_time_claimed": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "observed_at": {
                          "type": "object",
                          "required": [
                            "utc",
                            "unix_ms",
                            "jd"
                          ],
                          "properties": {
                            "utc": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "unix_ms": {
                              "type": "integer"
                            },
                            "jd": {
                              "type": "number"
                            }
                          }
                        },
                        "assurance": {
                          "const": "node-observed"
                        },
                        "disclosure": {
                          "const": "commitment-only"
                        }
                      }
                    },
                    "proof": {
                      "$ref": "#/components/schemas/SyncProof"
                    },
                    "billing": {
                      "type": "object",
                      "properties": {
                        "charged_cents": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "Original receipt replayed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "receipt",
                    "proof",
                    "billing"
                  ],
                  "properties": {
                    "receipt": {
                      "type": "object",
                      "required": [
                        "schema",
                        "id",
                        "event_digest",
                        "nonce",
                        "observed_at",
                        "assurance",
                        "disclosure"
                      ],
                      "properties": {
                        "schema": {
                          "const": "sync.event.v1"
                        },
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "event_digest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "nonce": {
                          "type": "string"
                        },
                        "event_time_claimed": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "observed_at": {
                          "type": "object",
                          "required": [
                            "utc",
                            "unix_ms",
                            "jd"
                          ],
                          "properties": {
                            "utc": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "unix_ms": {
                              "type": "integer"
                            },
                            "jd": {
                              "type": "number"
                            }
                          }
                        },
                        "assurance": {
                          "const": "node-observed"
                        },
                        "disclosure": {
                          "const": "commitment-only"
                        }
                      }
                    },
                    "proof": {
                      "$ref": "#/components/schemas/SyncProof"
                    },
                    "billing": {
                      "type": "object",
                      "properties": {
                        "charged_cents": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request schema"
          },
          "401": {
            "description": "Invalid or missing key"
          },
          "403": {
            "description": "Missing scope"
          },
          "402": {
            "description": "Insufficient wallet; no receipt or charge"
          },
          "409": {
            "description": "Idempotency conflict"
          },
          "429": {
            "description": "Rate limited"
          },
          "500": {
            "description": "Service could not complete the request."
          },
          "413": {
            "description": "JSON request body exceeds 100 KiB."
          }
        },
        "x-example": {
          "event_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "nonce": "event-request-001",
          "event_time_claimed": "2026-10-04T07:00:00Z"
        },
        "operationId": "postApiV1EventsAttest"
      }
    },
    "/api/keys": {
      "get": {
        "summary": "List owned API keys",
        "description": "Returns metadata and current billing availability. Never returns key secrets.",
        "security": [
          {
            "AccountSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Operation completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyList"
                }
              }
            }
          },
          "400": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "401": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "403": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "429": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "500": {
            "description": "Service could not complete the request."
          }
        },
        "operationId": "getApiKeys"
      },
      "post": {
        "summary": "Issue a scoped human or agent key",
        "description": "Verified owners may hold ten active keys. A random secret is returned once; only its hash is stored. Keys expire after 90 days.",
        "security": [
          {
            "AccountSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Operation completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyCreated"
                }
              }
            }
          },
          "400": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "401": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "403": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "429": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "500": {
            "description": "Service could not complete the request."
          },
          "413": {
            "description": "JSON request body exceeds 100 KiB."
          },
          "409": {
            "description": "Ten active keys already exist for this account."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "label",
                  "subject_type",
                  "scopes"
                ],
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 80
                  },
                  "subject_type": {
                    "enum": [
                      "human",
                      "agent"
                    ]
                  },
                  "scopes": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "enum": [
                        "clock:read",
                        "events:attest",
                        "sync:intent"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "postApiKeys"
      }
    },
    "/api/keys/{id}": {
      "delete": {
        "summary": "Revoke an owned key",
        "description": "Revocation takes effect on subsequent requests. Other owners cannot revoke this key.",
        "security": [
          {
            "AccountSession": []
          }
        ],
        "responses": {
          "204": {
            "description": "Operation completed"
          },
          "400": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "401": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "403": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "429": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "500": {
            "description": "Service could not complete the request."
          },
          "404": {
            "description": "Owned active key not found."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "deleteApiKeysId"
      }
    },
    "/api/sync/requests": {
      "get": {
        "summary": "List owned policy requests",
        "description": "Human account access only. Reports pending, rejected, or approved-awaiting-activation states. The activation service is not enabled.",
        "security": [
          {
            "AccountSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Operation completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyList"
                }
              }
            }
          },
          "400": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "401": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "403": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "429": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "500": {
            "description": "Service could not complete the request."
          }
        },
        "operationId": "getApiSyncRequests"
      }
    },
    "/api/sync/requests/{id}/decision": {
      "post": {
        "summary": "Record a human policy decision",
        "description": "Only the verified owning human can approve or reject a pending request. Approval does not activate the event. Already decided or unowned requests return 409.",
        "security": [
          {
            "AccountSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Operation completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyDecision"
                }
              }
            }
          },
          "400": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "401": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "403": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "429": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "409": {
            "description": "Request rejected; error.code and error.message explain the reason."
          },
          "500": {
            "description": "Service could not complete the request."
          },
          "413": {
            "description": "JSON request body exceeds 100 KiB."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "decision"
                ],
                "properties": {
                  "decision": {
                    "enum": [
                      "approve",
                      "reject"
                    ]
                  }
                }
              }
            }
          }
        },
        "operationId": "postApiSyncRequestsIdDecision"
      }
    },
    "/api/v1/events/showcase-attest": {
      "post": {
        "operationId": "attestAionShowcaseCommitment",
        "summary": "Issue a public showcase receipt",
        "description": "Issue an unbilled, node-signed commitment-only receipt for an anonymous Aion journey. The receipt records when this node observed the SHA-256 digest; it does not attest the physical event, identity, or interpretation. Limited to eight requests per client per minute.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "event_digest",
                  "nonce"
                ],
                "properties": {
                  "event_digest": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{64}$"
                  },
                  "nonce": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128
                  }
                }
              },
              "example": {
                "event_digest": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
                "nonce": "aion-showcase-request-001"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New unbilled node-signed receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "receipt",
                    "proof"
                  ],
                  "properties": {
                    "receipt": {
                      "type": "object",
                      "required": [
                        "schema",
                        "id",
                        "event_digest",
                        "nonce",
                        "observed_at",
                        "assurance",
                        "disclosure"
                      ],
                      "properties": {
                        "schema": {
                          "const": "sync.event.v1"
                        },
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "event_digest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "nonce": {
                          "type": "string"
                        },
                        "event_time_claimed": {
                          "type": "null"
                        },
                        "observed_at": {
                          "type": "object",
                          "required": [
                            "utc",
                            "unix_ms",
                            "jd"
                          ],
                          "properties": {
                            "utc": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "unix_ms": {
                              "type": "integer"
                            },
                            "jd": {
                              "type": "number"
                            }
                          }
                        },
                        "assurance": {
                          "const": "node-observed"
                        },
                        "disclosure": {
                          "const": "commitment-only"
                        }
                      }
                    },
                    "proof": {
                      "$ref": "#/components/schemas/SyncProof"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "429": {
            "description": "Per-client request limit reached"
          }
        }
      }
    },
    "/api/v1/events/canonical": {
      "post": {
        "operationId": "exchangeCanonicalEvent",
        "summary": "Exchange a canonical event",
        "description": "Exchange a commitment or namespaced opaque marker with scoped events:attest access. Private cast representations and historical source-event interchange are retired with HTTP 410. Original signed events are unchanged. Aion/BYOK use the cast-free signed verification record through /api/v2/events/verification. No casting, private history, symbolic fields or interpretation instructions enter this public contract.",
        "x-required-scope": "events:attest",
        "security": [
          {
            "SyncBearer": []
          }
        ],
        "x-example": {
          "scheme": "commitment",
          "event_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "event_digest"
                    ],
                    "properties": {
                      "scheme": {
                        "const": "commitment"
                      },
                      "event_digest": {
                        "type": "string",
                        "pattern": "^[a-fA-F0-9]{64}$"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "event_digest",
                      "namespace",
                      "marker_digest"
                    ],
                    "properties": {
                      "scheme": {
                        "const": "custom"
                      },
                      "event_digest": {
                        "type": "string",
                        "pattern": "^[a-fA-F0-9]{64}$"
                      },
                      "namespace": {
                        "type": "string",
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{1,79}$"
                      },
                      "marker_digest": {
                        "type": "string",
                        "pattern": "^[a-fA-F0-9]{64}$"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Canonical event, SHA-256 commitment and ML-DSA-65 response proof.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "event",
                    "event_commitment",
                    "proof"
                  ],
                  "properties": {
                    "event": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "schema",
                            "scheme",
                            "event_digest"
                          ],
                          "additionalProperties": false,
                          "properties": {
                            "schema": {
                              "const": "qualion.canonical.event.v2"
                            },
                            "scheme": {
                              "const": "commitment"
                            },
                            "event_digest": {
                              "type": "string",
                              "pattern": "^[a-fA-F0-9]{64}$"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "schema",
                            "scheme",
                            "event_digest",
                            "marker"
                          ],
                          "additionalProperties": false,
                          "properties": {
                            "schema": {
                              "const": "qualion.canonical.event.v2"
                            },
                            "scheme": {
                              "const": "custom"
                            },
                            "event_digest": {
                              "type": "string",
                              "pattern": "^[a-fA-F0-9]{64}$"
                            },
                            "marker": {
                              "type": "object",
                              "required": [
                                "namespace",
                                "commitment"
                              ],
                              "additionalProperties": false,
                              "properties": {
                                "namespace": {
                                  "type": "string",
                                  "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{1,79}$"
                                },
                                "commitment": {
                                  "type": "string",
                                  "pattern": "^[a-fA-F0-9]{64}$"
                                }
                              }
                            }
                          }
                        }
                      ]
                    },
                    "event_commitment": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "proof": {
                      "$ref": "#/components/schemas/SyncProof"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or noncanonical input."
          },
          "401": {
            "description": "Scoped API key required."
          },
          "403": {
            "description": "events:attest scope required."
          },
          "429": {
            "description": "Rate limit reached."
          },
          "500": {
            "description": "Service could not complete the request."
          },
          "413": {
            "description": "JSON request body exceeds 100 KiB."
          },
          "409": {
            "description": "Invalid or modified signed source event. No new cast is generated."
          },
          "410": {
            "description": "Cast interchange retired. Retain original private records; use cast-free verification."
          }
        },
        "x-schemes": [
          "iching.king-wen",
          "commitment",
          "custom"
        ]
      }
    },
    "/api/v1/ash/demo/session": {
      "post": {
        "tags": [
          "Ash sandbox"
        ],
        "summary": "Open or resume a bounded sandbox session",
        "operationId": "ashDemoSession",
        "description": "Sandbox only; no service-credit debit, real fiat, redemption or distributed consensus. Same-origin authorization for POST. All responses are no-store. Shared API rate limit applies. 100 new sessions per rolling day, 40 successful mutations and 10 swaps per session; one initial mint. Evidence retained up to seven days.",
        "security": [],
        "responses": {
          "201": {
            "description": "Verified sandbox state (POST replay may return 200).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoSession"
                }
              }
            }
          },
          "200": {
            "description": "Existing session or original idempotent result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoSession"
                }
              }
            }
          },
          "400": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Must equal the request origin."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {},
                "required": []
              }
            }
          }
        }
      }
    },
    "/api/v1/ash/demo/market": {
      "get": {
        "tags": [
          "Ash sandbox"
        ],
        "summary": "Inspect the sandbox dealer and signed genesis",
        "operationId": "ashDemoMarket",
        "description": "Sandbox only; no service-credit debit, real fiat, redemption or distributed consensus. Same-origin authorization for POST. All responses are no-store. Shared API rate limit applies. 100 new sessions per rolling day, 40 successful mutations and 10 swaps per session; one initial mint. Evidence retained up to seven days.",
        "security": [],
        "responses": {
          "200": {
            "description": "Verified sandbox state (POST replay may return 200).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoMarket"
                }
              }
            }
          },
          "400": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ash/demo/wallet": {
      "get": {
        "tags": [
          "Ash sandbox"
        ],
        "summary": "Inspect this session\u2019s tokens and recent evidence",
        "operationId": "ashDemoWallet",
        "description": "Sandbox only; no service-credit debit, real fiat, redemption or distributed consensus. Same-origin authorization for POST. All responses are no-store. Shared API rate limit applies. 100 new sessions per rolling day, 40 successful mutations and 10 swaps per session; one initial mint. Evidence retained up to seven days.",
        "security": [
          {
            "AshDemoSession": []
          },
          {
            "AgentExchangeKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Verified sandbox state (POST replay may return 200).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoWallet"
                }
              }
            }
          },
          "400": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "nonce",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            },
            "description": "Optional fresh challenge echoed in the signed snapshot."
          }
        ]
      }
    },
    "/api/v1/ash/demo/mint": {
      "post": {
        "tags": [
          "Ash sandbox"
        ],
        "summary": "Mint one signed nonredeemable USD-SBX token",
        "operationId": "ashDemoMint",
        "description": "Sandbox only; no service-credit debit, real fiat, redemption or distributed consensus. Same-origin authorization for POST. All responses are no-store. Shared API rate limit applies. 100 new sessions per rolling day, 40 successful mutations and 10 swaps per session; one initial mint. Evidence retained up to seven days.",
        "security": [
          {
            "AshDemoSession": []
          }
        ],
        "responses": {
          "201": {
            "description": "Verified sandbox state (POST replay may return 200).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoResult"
                }
              }
            }
          },
          "200": {
            "description": "Existing session or original idempotent result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoResult"
                }
              }
            }
          },
          "400": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Must equal the request origin."
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,128}$"
            },
            "description": "Session-scoped; reuse exact key/body to recover uncertain outcomes. Changed body conflicts."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {},
                "required": []
              }
            }
          }
        }
      }
    },
    "/api/v1/ash/demo/quote": {
      "post": {
        "tags": [
          "Ash sandbox"
        ],
        "summary": "Obtain a signed 60-second demonstration quote",
        "operationId": "ashDemoQuote",
        "description": "Sandbox only; no service-credit debit, real fiat, redemption or distributed consensus. Same-origin authorization for POST. All responses are no-store. Shared API rate limit applies. 100 new sessions per rolling day, 40 successful mutations and 10 swaps per session; one initial mint. Evidence retained up to seven days.",
        "security": [
          {
            "AshDemoSession": []
          },
          {
            "AgentExchangeKey": []
          }
        ],
        "responses": {
          "201": {
            "description": "Verified sandbox state (POST replay may return 200).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoQuote"
                }
              }
            }
          },
          "200": {
            "description": "Existing session or original idempotent result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoQuote"
                }
              }
            }
          },
          "400": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Must equal the request origin."
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,128}$"
            },
            "description": "Session-scoped; reuse exact key/body to recover uncertain outcomes. Changed body conflicts."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "token_id": {
                    "type": "string",
                    "maxLength": 64
                  }
                },
                "required": [
                  "token_id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/ash/demo/swap": {
      "post": {
        "tags": [
          "Ash sandbox"
        ],
        "summary": "Atomically consume the token and issue its quoted successor",
        "operationId": "ashDemoSwap",
        "description": "Sandbox only; no service-credit debit, real fiat, redemption or distributed consensus. Same-origin authorization for POST. All responses are no-store. Shared API rate limit applies. 100 new sessions per rolling day, 40 successful mutations and 10 swaps per session; one initial mint. Evidence retained up to seven days. Execution binds signed conditions and quote digests; zero demo trading fee. Consent is for artificial units only.",
        "security": [
          {
            "AshDemoSession": []
          },
          {
            "AgentExchangeKey": []
          }
        ],
        "responses": {
          "201": {
            "description": "Verified sandbox state (POST replay may return 200).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoResult"
                }
              }
            }
          },
          "200": {
            "description": "Existing session or original idempotent result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoResult"
                }
              }
            }
          },
          "400": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Rejected request, unavailable capability/state, limit or recoverable service failure.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "Origin",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Must equal the request origin."
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,128}$"
            },
            "description": "Session-scoped; reuse exact key/body to recover uncertain outcomes. Changed body conflicts."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "quote_id": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "consent": {
                    "const": true
                  },
                  "terms_digest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "quote_id",
                  "consent",
                  "terms_digest"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/ash/demo/policy": {
      "get": {
        "tags": [
          "Ash sandbox"
        ],
        "summary": "Inspect active or historical signed market policy",
        "description": "Demo authority only. Deterministic policy and \u00c6-Journal protocols managed by Lyra, the Clerk of Record agent. No AI or legal approval is conferred. Journal retains bounded signed commitments after session cleanup; export before capability expiry. Policy versions are signed and retained. Shared rate and session limits apply.",
        "security": [],
        "responses": {
          "200": {
            "description": "Sandbox response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoPolicy"
                }
              }
            }
          },
          "201": {
            "description": "Sandbox response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoPolicy"
                }
              }
            }
          },
          "400": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "digest",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "description": "Omit to read the active policy; include for historical evidence."
          },
          {
            "name": "conditions_digest",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "description": "Retrieve retained signed demo conditions for historical verification."
          }
        ]
      }
    },
    "/api/v1/ash/demo/records": {
      "get": {
        "tags": [
          "Ash sandbox"
        ],
        "summary": "Inspect this session\u2019s signed \u00c6-Journal",
        "description": "Demo authority only. Deterministic policy and \u00c6-Journal protocols managed by Lyra, the Clerk of Record agent. No AI or legal approval is conferred. Journal retains bounded signed commitments after session cleanup; export before capability expiry. Policy versions are signed and retained. Shared rate and session limits apply.",
        "security": [
          {
            "AshDemoSession": []
          },
          {
            "AgentExchangeKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sandbox response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoRecords"
                }
              }
            }
          },
          "201": {
            "description": "Sandbox response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoRecords"
                }
              }
            }
          },
          "400": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 999999999
            },
            "description": "Exclusive journal sequence cursor; maximum 20 owned entries per response."
          }
        ]
      }
    },
    "/api/v1/ash/demo/evaluate": {
      "post": {
        "tags": [
          "Ash sandbox"
        ],
        "summary": "Rehearse admission policy without minting or exchanging",
        "description": "Demo authority only. Deterministic policy and \u00c6-Journal protocols managed by Lyra, the Clerk of Record agent. No AI or legal approval is conferred. Journal retains bounded signed commitments after session cleanup; export before capability expiry. Policy versions are signed and retained. Shared rate and session limits apply.",
        "security": [
          {
            "AshDemoSession": []
          },
          {
            "AgentExchangeKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Sandbox response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoEvaluation"
                }
              }
            }
          },
          "201": {
            "description": "Sandbox response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoEvaluation"
                }
              }
            }
          },
          "400": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Rejected or unavailable request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{8,128}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "action",
                  "environment",
                  "currency",
                  "redeemable"
                ],
                "properties": {
                  "action": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "environment": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "currency": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "redeemable": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ash/demo/account-link": {
      "post": {
        "tags": [
          "Ash sandbox"
        ],
        "summary": "Link a demo session to the authenticated account journal",
        "description": "Validated account access only. Linking requires verified email, same-origin session capability and explicit consent. It preserves historical authority; it does not establish legal identity or physical presence. Linked session access requires that account. Signed account predecessor links reference original global commitments. At most 50 sessions per demo account; records remain after session expiry. Lyra is a neutral Clerk of Record agent under human-approved authority, not an autonomous policy or legal approver.",
        "security": [
          {
            "AccountSession": [],
            "AshDemoSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Signed demo account journal response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoAccountLink"
                }
              }
            }
          },
          "201": {
            "description": "Signed demo account journal response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoAccountLink"
                }
              }
            }
          },
          "400": {
            "description": "Request rejected; no authorization or state transition implied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Request rejected; no authorization or state transition implied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "description": "Request rejected; no authorization or state transition implied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected; no authorization or state transition implied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Request rejected; no authorization or state transition implied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Request rejected; no authorization or state transition implied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "consent"
                ],
                "properties": {
                  "consent": {
                    "const": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ash/demo/account-journal": {
      "get": {
        "tags": [
          "Ash sandbox"
        ],
        "summary": "Inspect authenticated account provenance",
        "description": "Validated account access only. Linking requires verified email, same-origin session capability and explicit consent. It preserves historical authority; it does not establish legal identity or physical presence. Linked session access requires that account. Signed account predecessor links reference original global commitments. At most 50 sessions per demo account; records remain after session expiry. Lyra is a neutral Clerk of Record agent under human-approved authority, not an autonomous policy or legal approver.",
        "security": [
          {
            "AccountSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Signed demo account journal response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshDemoAccountJournal"
                }
              }
            }
          },
          "400": {
            "description": "Request rejected; no authorization or state transition implied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Request rejected; no authorization or state transition implied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "description": "Request rejected; no authorization or state transition implied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Request rejected; no authorization or state transition implied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Request rejected; no authorization or state transition implied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Request rejected; no authorization or state transition implied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 999999999
            }
          }
        ]
      }
    },
    "/api/v1/ash/demo/agents": {
      "get": {
        "summary": "List my signed agent grants and revocations",
        "security": [
          {
            "AccountSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "Owned authority records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Account required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Authorize a bounded demo agent",
        "description": "Human account only. Session must already be linked. Credential shown once; no real-asset authority.",
        "security": [
          {
            "AccountSession": [],
            "AshDemoSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "label",
                  "max_swaps",
                  "expires_seconds",
                  "consent"
                ],
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 64
                  },
                  "max_swaps": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3
                  },
                  "expires_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 3600
                  },
                  "consent": {
                    "const": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Signed grant and one-time secret",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid delegation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "description": "Linked verified account required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Grant capacity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ash/demo/agents/{id}": {
      "delete": {
        "summary": "Revoke my agent grant",
        "security": [
          {
            "AccountSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signed revocation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Owned grant not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ash/demo/quote/cancel": {
      "post": {
        "operationId": "cancelOwnedQuote",
        "tags": [
          "Qualion exchange"
        ],
        "summary": "Authoritatively cancel an unexecuted owned quote",
        "description": "Same-origin session/account authority. Signed cancellation, witness and both journal paths commit atomically. Serializes against swap; never reverses a committed trade. Agents cannot cancel under current grants. Retry the exact request with the same idempotency key after an interrupted response. Cancellation remains available during market halt, within the existing session/journal bounds.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "quote_id"
                ],
                "properties": {
                  "quote_id": {
                    "type": "string",
                    "maxLength": 64
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Committed cancellation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshQuoteCancellation"
                }
              }
            }
          },
          "200": {
            "description": "Exact committed replay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AshQuoteCancellation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Expired authority"
          },
          "403": {
            "description": "Wrong origin/account or ungranted agent scope"
          },
          "409": {
            "description": "Quote unavailable, executed or already cancelled; idempotency conflict"
          },
          "429": {
            "description": "Session or journal limit"
          }
        }
      }
    },
    "/api/v2/events/verification": {
      "post": {
        "operationId": "exchangeVerificationRecord",
        "summary": "Exchange a cast-free verification record",
        "description": "Replay an existing signed, commitment-only verification record exactly. Contains a one-way event reference, unchanged commitment and specified node observation; no cast fields or original source proof. No new cast, account access, retrieval or interpretation authority. Signatures authenticate the stated record, not a forecast. Previously disclosed private cast data cannot be made confidential retroactively.",
        "security": [
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "source_record"
                ],
                "properties": {
                  "source_record": {
                    "$ref": "#/components/schemas/SignedVerificationRecord"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Exact signed record replay.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedVerificationRecord"
                }
              }
            }
          },
          "400": {
            "description": "Unknown, private or malformed request fields."
          },
          "409": {
            "description": "Invalid record, identity or signature."
          },
          "429": {
            "description": "Bounded request capacity."
          }
        }
      }
    },
    "/api/v2/ephemeris": {
      "get": {
        "summary": "Query pinned offline JPL Sun/Moon geometry",
        "operationId": "getJplEphemeris",
        "description": "Opt-in geocentric geometric profile: pinned DE440s and leap-second kernels, CSPICE J2000 states and ERFA IAU2006 mean ecliptic of date. No light-time, apparent, observer, UT1/EOP or horizon corrections. Existing v1 solar fields retain their original meanings. Returns 503 unless the local JPL runtime/data are configured. UTC coverage 2000-01-01 inclusive through 2027-07-01 exclusive. A node proof commits the exact response; it does not certify source accuracy or physical location.",
        "parameters": [
          {
            "name": "at",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\.\\d{3}Z$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exact signed JPL geometry and pinned dataset provenance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "payload",
                    "proof"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "payload": {
                      "type": "object",
                      "required": [
                        "schema",
                        "query_time",
                        "observed_at_ms",
                        "geometry",
                        "provenance"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "schema": {
                          "const": "qualion.sync.jpl-ephemeris.v1"
                        },
                        "query_time": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "observed_at_ms": {
                          "type": "integer"
                        },
                        "geometry": {
                          "type": "object"
                        },
                        "provenance": {
                          "type": "object"
                        }
                      }
                    },
                    "proof": {
                      "type": "object",
                      "description": "ML-DSA-65 node proof with domain tao.sync.jpl-ephemeris.v1"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid epoch or query fields",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Epoch outside supported coverage",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Query or worker capacity limit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Local precision profile unavailable; no approximate fallback",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CanonicalInstant": {
        "type": "object",
        "required": [
          "utc",
          "unix_ms",
          "jd",
          "system_cycle_ns",
          "clock",
          "assurance_profile"
        ],
        "properties": {
          "utc": {
            "type": "string",
            "format": "date-time"
          },
          "unix_ms": {
            "type": "integer"
          },
          "jd": {
            "type": "number",
            "description": "Julian Date derived from the node-observed Unix instant."
          },
          "system_cycle_ns": {
            "type": "string",
            "description": "Process monotonic-cycle observation in nanoseconds; not a portable wall-clock timestamp."
          },
          "clock": {
            "type": "string",
            "const": "node-observed"
          },
          "assurance_profile": {
            "type": "string",
            "const": "qualion.beta7.node-observed"
          }
        }
      },
      "TimeResponse": {
        "type": "object",
        "required": [
          "api",
          "version",
          "instant"
        ],
        "properties": {
          "api": {
            "type": "string",
            "const": "tao.sync"
          },
          "version": {
            "type": "string",
            "const": "0.7"
          },
          "instant": {
            "$ref": "#/components/schemas/CanonicalInstant"
          },
          "compatibility_alias": {
            "type": "string",
            "const": "qualion.sync",
            "description": "Compatibility name for existing Qualion clients."
          }
        }
      },
      "SyncIntentRequest": {
        "type": "object",
        "required": [
          "event_digest"
        ],
        "properties": {
          "event_digest": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{64}$"
          },
          "purpose": {
            "type": "string",
            "maxLength": 500
          },
          "namespace": {
            "type": "string",
            "maxLength": 120,
            "default": "event"
          },
          "disclosure_class": {
            "type": "string",
            "const": "commitment-only",
            "default": "commitment-only"
          },
          "question_binding": {
            "type": "boolean",
            "default": false,
            "description": "Indicates that the event commitment binds a private question commitment; plaintext is not requested."
          },
          "parents": {
            "type": "array",
            "maxItems": 32,
            "items": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{64}$"
            }
          }
        },
        "additionalProperties": false
      },
      "SyncIntentResponse": {
        "type": "object",
        "required": [
          "api",
          "version",
          "intent_id",
          "intent",
          "policy"
        ],
        "properties": {
          "api": {
            "type": "string",
            "const": "tao.sync"
          },
          "version": {
            "type": "string",
            "const": "0.7"
          },
          "intent_id": {
            "type": "string"
          },
          "intent": {
            "type": "object",
            "additionalProperties": true
          },
          "policy": {
            "type": "object",
            "required": [
              "decision",
              "reason"
            ],
            "properties": {
              "decision": {
                "type": "string",
                "const": "require_human"
              },
              "reason": {
                "type": "string"
              }
            }
          },
          "compatibility_alias": {
            "type": "string",
            "const": "qualion.sync",
            "description": "Compatibility name for existing Qualion clients."
          }
        }
      },
      "TimeAttestationRequest": {
        "type": "object",
        "required": [
          "event_digest"
        ],
        "properties": {
          "event_digest": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{64}$"
          },
          "nonce": {
            "type": "string",
            "maxLength": 256
          },
          "event_time_claimed": {
            "type": "string",
            "format": "date-time",
            "maxLength": 64
          }
        },
        "additionalProperties": false
      },
      "TimeAttestationResponse": {
        "type": "object",
        "required": [
          "api",
          "version",
          "receipt",
          "signed"
        ],
        "properties": {
          "api": {
            "type": "string",
            "const": "tao.sync"
          },
          "version": {
            "type": "string",
            "const": "0.7"
          },
          "receipt": {
            "type": "object",
            "required": [
              "event_digest",
              "node_time_observed",
              "assurance_profile",
              "statement",
              "receipt_digest"
            ],
            "additionalProperties": true
          },
          "signature": {
            "type": "object",
            "description": "FIPS 204 ML-DSA-65 signature over the canonical receipt payload.",
            "properties": {
              "algorithm": {
                "type": "string",
                "const": "ML-DSA-65"
              },
              "standard": {
                "type": "string",
                "const": "FIPS 204"
              },
              "key_id": {
                "type": "string"
              },
              "context": {
                "type": "string"
              },
              "public_key_url": {
                "type": "string"
              },
              "payload_b64": {
                "type": "string"
              },
              "signature_b64": {
                "type": "string"
              }
            }
          },
          "signed": {
            "type": "boolean",
            "description": "True when the sync node produced an ML-DSA-65 signature."
          },
          "compatibility_alias": {
            "type": "string",
            "const": "qualion.sync",
            "description": "Compatibility name for existing Qualion clients."
          }
        }
      },
      "SyncProof": {
        "type": "object",
        "required": [
          "algorithm",
          "key_id",
          "context",
          "payload_b64",
          "signature_b64",
          "standard",
          "public_key_url"
        ],
        "properties": {
          "algorithm": {
            "type": "string",
            "const": "ML-DSA-65"
          },
          "key_id": {
            "type": "string"
          },
          "context": {
            "type": "string"
          },
          "payload_b64": {
            "type": "string"
          },
          "signature_b64": {
            "type": "string"
          },
          "standard": {
            "const": "FIPS 204"
          },
          "public_key_url": {
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "KeyMetadata": {
        "type": "object",
        "required": [
          "id",
          "label",
          "subject_type",
          "scopes",
          "created_at",
          "expires_at",
          "revoked_at",
          "last_used_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "subject_type": {
            "enum": [
              "human",
              "agent"
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "enum": [
                "clock:read",
                "events:attest",
                "sync:intent"
              ]
            }
          },
          "created_at": {
            "type": "integer"
          },
          "expires_at": {
            "type": "integer"
          },
          "revoked_at": {
            "type": [
              "integer",
              "null"
            ]
          },
          "last_used_at": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "KeyList": {
        "type": "object",
        "required": [
          "keys",
          "limits",
          "billing"
        ],
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyMetadata"
            }
          },
          "limits": {
            "type": "object",
            "required": [
              "requests_per_minute",
              "expires_after_days"
            ]
          },
          "billing": {
            "type": "object",
            "required": [
              "enabled",
              "signed_event_cents",
              "clock_cents"
            ]
          }
        }
      },
      "KeyCreated": {
        "type": "object",
        "required": [
          "id",
          "key",
          "expires_at",
          "scopes",
          "message"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "pattern": "^sync_[A-Za-z0-9_-]{43}$"
          },
          "expires_at": {
            "type": "integer"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "PolicyList": {
        "type": "object",
        "required": [
          "requests",
          "activation_service"
        ],
        "properties": {
          "activation_service": {
            "const": "not-enabled"
          },
          "requests": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "event_digest",
                "status",
                "purpose",
                "namespace",
                "disclosure_class"
              ]
            }
          }
        }
      },
      "PolicyDecision": {
        "type": "object",
        "required": [
          "status",
          "activation_service",
          "statement"
        ],
        "properties": {
          "status": {
            "enum": [
              "approved-awaiting-activation",
              "rejected"
            ]
          },
          "activation_service": {
            "const": "not-enabled"
          },
          "statement": {
            "type": "string"
          }
        }
      },
      "AshDemoResult": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "token": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "payload": {
                "type": "object",
                "required": [
                  "schema",
                  "environment",
                  "id",
                  "issuer",
                  "owner",
                  "currency",
                  "quantity_minor",
                  "scale",
                  "redeemable",
                  "parent_digest"
                ],
                "properties": {
                  "schema": {
                    "const": "tao.ash.token.v1"
                  },
                  "environment": {
                    "const": "sandbox"
                  },
                  "id": {
                    "type": "string",
                    "pattern": "^\u00c6-SBX-"
                  },
                  "issuer": {
                    "const": "tao.ash.sandbox"
                  },
                  "owner": {
                    "type": "string"
                  },
                  "currency": {
                    "enum": [
                      "USD-SBX",
                      "EUR-SBX"
                    ]
                  },
                  "quantity_minor": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "scale": {
                    "const": 2
                  },
                  "redeemable": {
                    "const": false
                  },
                  "parent_digest": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "proof": {
                "type": "object"
              }
            }
          },
          "quote": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "payload": {
                "type": "object",
                "required": [
                  "schema",
                  "environment",
                  "owner",
                  "input_digest",
                  "output_minor",
                  "expires_at"
                ],
                "properties": {
                  "schema": {
                    "const": "tao.ash.quote.v1"
                  },
                  "environment": {
                    "const": "sandbox"
                  },
                  "expires_at": {
                    "type": "integer"
                  }
                }
              },
              "proof": {
                "type": "object"
              }
            }
          },
          "event": {
            "type": "object"
          },
          "sync": {
            "type": "object",
            "required": [
              "receipt",
              "proof"
            ],
            "properties": {
              "receipt": {
                "type": "object",
                "required": [
                  "schema",
                  "event_digest",
                  "nonce",
                  "environment"
                ],
                "properties": {
                  "schema": {
                    "const": "sync.event.v1"
                  },
                  "environment": {
                    "const": "sandbox"
                  },
                  "event_digest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                }
              },
              "proof": {
                "type": "object"
              }
            }
          },
          "journal": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "payload": {
                "type": "object"
              },
              "proof": {
                "type": "object"
              }
            }
          },
          "policy_decision": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "payload": {
                "type": "object"
              },
              "proof": {
                "type": "object"
              }
            }
          }
        },
        "required": [
          "event",
          "token",
          "sync",
          "journal",
          "policy_decision"
        ]
      },
      "AshDemoQuote": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "quote": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "payload": {
                "type": "object",
                "required": [
                  "schema",
                  "environment",
                  "owner",
                  "input_digest",
                  "output_minor",
                  "expires_at"
                ],
                "properties": {
                  "schema": {
                    "const": "tao.ash.quote.v1"
                  },
                  "environment": {
                    "const": "sandbox"
                  },
                  "expires_at": {
                    "type": "integer"
                  }
                }
              },
              "proof": {
                "type": "object"
              }
            }
          },
          "journal": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "payload": {
                "type": "object"
              },
              "proof": {
                "type": "object"
              }
            }
          },
          "policy_decision": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "payload": {
                "type": "object"
              },
              "proof": {
                "type": "object"
              }
            }
          }
        },
        "required": [
          "quote",
          "journal",
          "policy_decision"
        ]
      },
      "AshDemoSession": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "expires_at": {
            "type": "integer"
          },
          "environment": {
            "const": "sandbox"
          }
        },
        "required": [
          "id",
          "expires_at",
          "environment"
        ]
      },
      "AshDemoWallet": {
        "type": "object",
        "required": [
          "environment",
          "owner",
          "minted",
          "swaps",
          "tokens",
          "history"
        ],
        "properties": {
          "environment": {
            "const": "sandbox"
          },
          "owner": {
            "type": "string"
          },
          "minted": {
            "type": "boolean"
          },
          "swaps": {
            "type": "integer"
          },
          "expires_at": {
            "type": "integer"
          },
          "tokens": {
            "type": "array",
            "maxItems": 21
          },
          "history": {
            "type": "array",
            "maxItems": 8
          },
          "account_binding": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "payload",
                  "proof"
                ],
                "properties": {
                  "payload": {
                    "type": "object"
                  },
                  "proof": {
                    "type": "object"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "description": "Signed current wallet snapshot, bound to the optional fresh request nonce, exact position states and account binding."
          }
        }
      },
      "AshDemoMarket": {
        "type": "object",
        "required": [
          "environment",
          "rate",
          "reserves_minor",
          "sequence",
          "genesis",
          "checkpoint",
          "observation"
        ],
        "properties": {
          "observation": {
            "type": "object",
            "description": "Fresh nonce-bound current-node observation of the unchanged historical genesis and checkpoint envelopes."
          },
          "environment": {
            "const": "sandbox"
          },
          "rate": {
            "type": "object"
          },
          "reserves_minor": {
            "type": "object"
          },
          "sequence": {
            "type": "integer"
          },
          "genesis": {
            "type": "object"
          },
          "checkpoint": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "payload": {
                "type": "object"
              },
              "proof": {
                "type": "object"
              }
            }
          }
        }
      },
      "AshDemoPolicy": {
        "type": "object",
        "required": [
          "policy",
          "policy_digest",
          "licensing"
        ],
        "properties": {
          "policy": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "payload": {
                "type": "object"
              },
              "proof": {
                "type": "object"
              }
            }
          },
          "policy_digest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "licensing": {
            "type": "object",
            "properties": {
              "commercial_activation": {
                "const": false
              }
            }
          },
          "terms": {
            "type": "object"
          },
          "terms_digest": {
            "type": "string"
          }
        }
      },
      "AshDemoRecords": {
        "type": "object",
        "required": [
          "environment",
          "owner",
          "entries",
          "next_before",
          "retention"
        ],
        "properties": {
          "environment": {
            "const": "sandbox"
          },
          "owner": {
            "type": "string"
          },
          "entries": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "object",
              "required": [
                "entry",
                "record"
              ],
              "properties": {
                "entry": {
                  "type": "object",
                  "required": [
                    "payload",
                    "proof"
                  ],
                  "properties": {
                    "payload": {
                      "type": "object"
                    },
                    "proof": {
                      "type": "object"
                    }
                  }
                },
                "record": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/AshDemoResult"
                    },
                    {
                      "$ref": "#/components/schemas/AshDemoQuote"
                    },
                    {
                      "$ref": "#/components/schemas/AshDemoEvaluation"
                    }
                  ]
                }
              }
            }
          },
          "next_before": {
            "type": [
              "integer",
              "null"
            ]
          },
          "retention": {
            "type": "string"
          }
        }
      },
      "AshDemoEvaluation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "scenario_only",
          "policy_decision",
          "journal"
        ],
        "properties": {
          "scenario_only": {
            "const": true
          },
          "policy_decision": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "payload": {
                "type": "object"
              },
              "proof": {
                "type": "object"
              }
            }
          },
          "journal": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "payload": {
                "type": "object"
              },
              "proof": {
                "type": "object"
              }
            }
          }
        }
      },
      "AshDemoAccountLink": {
        "type": "object",
        "required": [
          "binding"
        ],
        "additionalProperties": false,
        "properties": {
          "binding": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "payload": {
                "type": "object"
              },
              "proof": {
                "type": "object"
              }
            }
          }
        }
      },
      "AshDemoAccountJournal": {
        "type": "object",
        "required": [
          "environment",
          "account_ref",
          "bindings",
          "checkpoint",
          "entries",
          "next_before"
        ],
        "properties": {
          "environment": {
            "const": "sandbox"
          },
          "account_ref": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "bindings": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "object",
              "required": [
                "payload",
                "proof"
              ],
              "properties": {
                "payload": {
                  "type": "object"
                },
                "proof": {
                  "type": "object"
                }
              }
            }
          },
          "checkpoint": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "payload",
                  "proof"
                ],
                "properties": {
                  "payload": {
                    "type": "object"
                  },
                  "proof": {
                    "type": "object"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "entries": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "object",
              "required": [
                "entry",
                "source",
                "record"
              ],
              "properties": {
                "entry": {
                  "type": "object",
                  "required": [
                    "payload",
                    "proof"
                  ],
                  "properties": {
                    "payload": {
                      "type": "object"
                    },
                    "proof": {
                      "type": "object"
                    }
                  }
                },
                "source": {
                  "type": "object",
                  "required": [
                    "payload",
                    "proof"
                  ],
                  "properties": {
                    "payload": {
                      "type": "object"
                    },
                    "proof": {
                      "type": "object"
                    }
                  }
                },
                "record": {
                  "type": "object"
                }
              }
            }
          },
          "next_before": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "AshQuoteCancellation": {
        "type": "object",
        "required": [
          "quote",
          "cancellation",
          "sync",
          "policy_decision",
          "journal"
        ],
        "properties": {
          "quote": {
            "type": "object"
          },
          "cancellation": {
            "type": "object",
            "required": [
              "payload",
              "proof"
            ],
            "properties": {
              "proof": {
                "type": "object",
                "required": [
                  "algorithm",
                  "key_id",
                  "context",
                  "payload_b64",
                  "signature_b64"
                ],
                "properties": {
                  "algorithm": {
                    "const": "ML-DSA-65"
                  },
                  "key_id": {
                    "type": "string"
                  },
                  "context": {
                    "const": "tao.qualion.quote.cancellation.sandbox.v1"
                  },
                  "payload_b64": {
                    "type": "string"
                  },
                  "signature_b64": {
                    "type": "string"
                  }
                }
              },
              "payload": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "schema",
                  "environment",
                  "id",
                  "owner",
                  "quote_id",
                  "quote_digest",
                  "status",
                  "balance_moved",
                  "observed_at",
                  "policy_digest"
                ],
                "properties": {
                  "schema": {
                    "const": "tao.qualion.quote.cancellation.v1"
                  },
                  "environment": {
                    "const": "sandbox"
                  },
                  "id": {
                    "type": "string"
                  },
                  "owner": {
                    "type": "string"
                  },
                  "quote_id": {
                    "type": "string"
                  },
                  "quote_digest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "status": {
                    "const": "cancelled"
                  },
                  "balance_moved": {
                    "const": false
                  },
                  "observed_at": {
                    "type": "string"
                  },
                  "policy_digest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                }
              }
            }
          },
          "sync": {
            "type": "object"
          },
          "policy_decision": {
            "type": "object"
          },
          "journal": {
            "type": "object"
          }
        }
      },
      "SignedVerificationRecord": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "record",
          "proof"
        ],
        "properties": {
          "record": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "schema",
              "event_reference",
              "event_commitment",
              "observed_at_ms",
              "source_key_id",
              "assurance",
              "disclosure"
            ],
            "properties": {
              "schema": {
                "const": "sync.verification.v1"
              },
              "event_reference": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "event_commitment": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "observed_at_ms": {
                "type": "integer",
                "minimum": 0
              },
              "source_key_id": {
                "type": "string",
                "pattern": "^mldsa65:[a-f0-9]{32}$"
              },
              "assurance": {
                "const": "node-observed-projection"
              },
              "disclosure": {
                "const": "commitment-only"
              }
            }
          },
          "proof": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "algorithm",
              "standard",
              "key_id",
              "context",
              "public_key_url",
              "payload_b64",
              "signature_b64"
            ],
            "properties": {
              "algorithm": {
                "const": "ML-DSA-65"
              },
              "standard": {
                "const": "FIPS 204"
              },
              "key_id": {
                "type": "string",
                "pattern": "^mldsa65:[a-f0-9]{32}$"
              },
              "context": {
                "const": "tao.sync.verification.v1"
              },
              "public_key_url": {
                "const": "/api/v1/keys/node"
              },
              "payload_b64": {
                "type": "string",
                "maxLength": 4096
              },
              "signature_b64": {
                "type": "string",
                "maxLength": 8192
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "SyncBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "scoped API key"
      },
      "AccountSession": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Verified account-owner session. Agent API keys cannot make human policy decisions."
      },
      "AshDemoSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "ash_demo",
        "description": "Bounded pseudonymous sandbox capability. HttpOnly; SameSite=Strict; expires in 24 hours. Not an account identity or production trading authority. When explicitly account-linked, matching current verified AccountSession access is also required."
      },
      "AgentExchangeKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "One-time agt_ credential issued by a linked verified account; bounded to that demo session, policy, terms, expiry and exchange allowance."
      }
    }
  }
}
