{
  "components": {
    "schemas": {
      "AccessPolicy": {
        "description": "Access control policy for a MARS entry.\n\nWhen `public` is `true` the entry is discoverable by any resolver. When\n`false`, only DIDs listed in `allowed_dids` (or those presenting a required\nattestation type) may resolve it.",
        "properties": {
          "allowedDids": {
            "description": "Explicit DID allow-list (relevant when `public` is `false`).",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "public": {
            "description": "Whether the entry is publicly discoverable.",
            "type": "boolean"
          },
          "requiredAttestationTypes": {
            "description": "Attestation type URIs that grant access (relevant when `public` is\n`false`).",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "AnchorControlResponse": {
        "description": "Response body for an administrative retry or abandon transition.",
        "properties": {
          "intentId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/AnchorState"
          }
        },
        "required": [
          "intentId",
          "state"
        ],
        "type": "object"
      },
      "AnchorListResponse": {
        "description": "Response body for `GET /v1/anchors/{did}`.",
        "properties": {
          "anchorState": {
            "$ref": "#/components/schemas/AnchorState"
          },
          "cursor": {
            "description": "Opaque last-seen tuple to pass to the next request, or `null` on the\nfinal page.",
            "type": [
              "string",
              "null"
            ]
          },
          "entryDid": {
            "type": "string"
          },
          "hasMore": {
            "description": "Whether another page exists after this response.",
            "type": "boolean"
          },
          "records": {
            "description": "Anchor records in stable ascending `(sequence, createdAt, intentId)`\norder.",
            "items": {
              "$ref": "#/components/schemas/AnchorStatusRecord"
            },
            "type": "array"
          }
        },
        "required": [
          "entryDid",
          "anchorState",
          "records",
          "hasMore"
        ],
        "type": "object"
      },
      "AnchorOperation": {
        "description": "Registry mutation represented by an anchor intent.",
        "enum": [
          "create",
          "update",
          "revoke",
          "transfer",
          "attest"
        ],
        "type": "string"
      },
      "AnchorOutboxState": {
        "description": "Durable outbox state, including the internal worker-lease transition.",
        "enum": [
          "pending",
          "claimed",
          "submitted",
          "confirmed",
          "failed",
          "abandoned"
        ],
        "type": "string"
      },
      "AnchorReceiptRecord": {
        "description": "One immutable observation returned by an anchor adapter.",
        "properties": {
          "blockHeight": {
            "description": "Optional finalized ledger height.",
            "format": "int64",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "observedAt": {
            "description": "Time the adapter observed this state.",
            "format": "date-time",
            "type": "string"
          },
          "proof": {
            "description": "Optional provider-neutral proof document."
          },
          "receiptKey": {
            "description": "Adapter-defined idempotency key for this observation.",
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/AnchorReceiptState",
            "description": "Submitted or confirmed state represented by this receipt."
          },
          "transactionId": {
            "description": "Provider-neutral external transaction or operation identifier.",
            "type": "string"
          }
        },
        "required": [
          "receiptKey",
          "transactionId",
          "state",
          "observedAt"
        ],
        "type": "object"
      },
      "AnchorReceiptState": {
        "description": "State represented by an immutable adapter receipt.",
        "enum": [
          "submitted",
          "confirmed"
        ],
        "type": "string"
      },
      "AnchorRecord": {
        "description": "A confirmed on-chain anchor for a MARS entry.\n\nCreated after a transaction is committed to the Sigil blockchain, this\nrecord links a MARS entry to a specific block and transaction hash, and\noptionally includes a Merkle proof for independent verification.",
        "properties": {
          "anchorTime": {
            "description": "Timestamp when the anchor was created on-chain.",
            "format": "date-time",
            "type": "string"
          },
          "blockHeight": {
            "description": "Block height at which the anchor was committed.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "entryDid": {
            "description": "DID of the anchored entry.",
            "type": "string"
          },
          "itemDataHash": {
            "description": "SHA-256 content hash of the entry's `item_data`.",
            "type": "string"
          },
          "proof": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MerkleProof",
                "description": "Optional Merkle proof for independent verification."
              }
            ]
          },
          "txHash": {
            "description": "Transaction hash on the Sigil chain.",
            "type": "string"
          }
        },
        "required": [
          "entryDid",
          "itemDataHash",
          "blockHeight",
          "txHash",
          "anchorTime"
        ],
        "type": "object"
      },
      "AnchorRequest": {
        "description": "A request to anchor a MARS entry on the Sigil chain.",
        "properties": {
          "entryDid": {
            "description": "DID of the entry to anchor.",
            "type": "string"
          },
          "itemDataHash": {
            "description": "SHA-256 content hash of the entry's `item_data`.",
            "type": "string"
          },
          "publisherDid": {
            "description": "DID of the publisher submitting the anchor.",
            "type": "string"
          },
          "signature": {
            "description": "Ed25519 signature over the canonical anchor payload.",
            "type": "string"
          }
        },
        "required": [
          "entryDid",
          "itemDataHash",
          "publisherDid",
          "signature"
        ],
        "type": "object"
      },
      "AnchorResponse": {
        "description": "Response to an anchor submission.",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/AnchorStatus",
            "description": "Current status of the anchor operation."
          },
          "txHash": {
            "description": "Transaction hash assigned by the Sigil chain.",
            "type": "string"
          }
        },
        "required": [
          "txHash",
          "status"
        ],
        "type": "object"
      },
      "AnchorState": {
        "description": "Registry-managed lifecycle of an anchor intent or entry projection.",
        "enum": [
          "unanchored",
          "pending",
          "submitted",
          "confirmed",
          "failed",
          "abandoned"
        ],
        "type": "string"
      },
      "AnchorStatus": {
        "description": "Status of an on-chain anchor operation.",
        "oneOf": [
          {
            "description": "Transaction submitted but not yet confirmed.",
            "properties": {
              "status": {
                "enum": [
                  "pending"
                ],
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          {
            "description": "Transaction confirmed on-chain.",
            "properties": {
              "status": {
                "enum": [
                  "confirmed"
                ],
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          {
            "description": "Anchor operation failed.",
            "properties": {
              "reason": {
                "description": "Human-readable failure reason.",
                "type": "string"
              },
              "status": {
                "enum": [
                  "failed"
                ],
                "type": "string"
              }
            },
            "required": [
              "reason",
              "status"
            ],
            "type": "object"
          }
        ]
      },
      "AnchorStatusRecord": {
        "description": "Persisted status of one durable anchor intent.",
        "properties": {
          "attempts": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "availableAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "entryDid": {
            "type": "string"
          },
          "intentId": {
            "type": "string"
          },
          "operation": {
            "$ref": "#/components/schemas/AnchorOperation"
          },
          "receipts": {
            "items": {
              "$ref": "#/components/schemas/AnchorReceiptRecord"
            },
            "type": "array"
          },
          "sequence": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "state": {
            "$ref": "#/components/schemas/AnchorOutboxState"
          },
          "transactionId": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "intentId",
          "entryDid",
          "sequence",
          "operation",
          "state",
          "attempts",
          "availableAt",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "AnchorType": {
        "description": "Anchor operation type.\nPer MARS Specification Section 10.1.",
        "enum": [
          "register",
          "update",
          "revoke",
          "transfer",
          "attest"
        ],
        "type": "string"
      },
      "AttestationRequest": {
        "additionalProperties": false,
        "description": "Request body for `POST /v1/attestations`.",
        "properties": {
          "attestation": {
            "description": "Verifiable attestation payload."
          },
          "entryDid": {
            "description": "DID of the entry receiving the attestation.",
            "type": "string"
          }
        },
        "required": [
          "entryDid",
          "attestation"
        ],
        "type": "object"
      },
      "Bond": {
        "description": "Full bond record (server-side).\nPer MARS Specification Section 7.2.",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/BondAmount",
            "description": "Amount staked in MINTS."
          },
          "bondId": {
            "description": "Unique bond identifier.",
            "type": "string"
          },
          "createdAt": {
            "description": "When the bond was created.",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "Currency — always \"MINTS\".",
            "type": "string"
          },
          "entryDid": {
            "description": "DID of the entry this bond covers.",
            "type": "string"
          },
          "publisherDid": {
            "description": "DID of the publisher who posted the bond.",
            "type": "string"
          },
          "registryDid": {
            "description": "DID of the registry holding the bond.",
            "type": "string"
          },
          "slashHistory": {
            "description": "History of slashing events.",
            "items": {
              "$ref": "#/components/schemas/SlashEvent"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/BondStatus",
            "description": "Current status."
          }
        },
        "required": [
          "bondId",
          "publisherDid",
          "entryDid",
          "registryDid",
          "amount",
          "currency",
          "createdAt",
          "status"
        ],
        "type": "object"
      },
      "BondAmount": {
        "description": "Exact, non-negative decimal amount used by every bond money field.\n\nThe wire form is always a JSON string in canonical plain-decimal notation.\nValues are constrained to PostgreSQL `NUMERIC(38,18)`: at most 20 integer\ndigits and 18 fractional digits, with no sign or exponent. This keeps\nsignature bytes, threshold checks, and database values identical.",
        "example": "100.5",
        "pattern": "^(0|[1-9][0-9]{0,19})(\\.[0-9]{1,18})?$",
        "type": "string"
      },
      "BondProvisionRequest": {
        "additionalProperties": false,
        "description": "Admin request for provisioning a registry-local bond.",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/BondAmount"
          },
          "bondId": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "entryDid": {
            "type": "string"
          },
          "publisherDid": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/BondStatus"
          }
        },
        "required": [
          "bondId",
          "publisherDid",
          "entryDid",
          "amount",
          "currency",
          "status"
        ],
        "type": "object"
      },
      "BondReference": {
        "description": "A reference to a bond stored in a MARS entry.\nPer MARS Specification Section 7.2.",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/BondAmount",
            "description": "Amount staked in MINTS."
          },
          "bondId": {
            "description": "Unique bond identifier.",
            "type": "string"
          },
          "currency": {
            "description": "Currency — always \"MINTS\".",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/BondStatus",
            "description": "Current bond status."
          }
        },
        "required": [
          "bondId",
          "amount",
          "currency",
          "status"
        ],
        "type": "object"
      },
      "BondStatus": {
        "description": "Status of a publisher bond.\nPer MARS Specification Appendix A (bondReference schema).",
        "enum": [
          "active",
          "partially_slashed",
          "fully_slashed",
          "released"
        ],
        "type": "string"
      },
      "Condition": {
        "description": "A single filter condition: `field op value`.",
        "properties": {
          "field": {
            "$ref": "#/components/schemas/FieldPath",
            "description": "The dotted field path being tested."
          },
          "op": {
            "$ref": "#/components/schemas/FilterOp",
            "description": "The filter operation and its operand(s)."
          }
        },
        "required": [
          "field",
          "op"
        ],
        "type": "object"
      },
      "DeepHealthResponse": {
        "description": "Response body for `GET /v1/health/deep`.",
        "properties": {
          "checks": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Stable, lexicographically keyed subsystem results.",
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "status": {
            "description": "Aggregate status: `ok`, `degraded`, or `down`.",
            "type": "string"
          }
        },
        "required": [
          "status",
          "checks"
        ],
        "type": "object"
      },
      "Direction": {
        "description": "Direction of a sibling node in a Merkle proof path.",
        "enum": [
          "left",
          "right"
        ],
        "type": "string"
      },
      "DiscoverCondition": {
        "description": "A single structured discovery filter.",
        "properties": {
          "field": {
            "description": "Allowlisted canonical field path evaluated by the structured API.\nArbitrary `itemData` traversal is available only through raw MARS-QL.",
            "type": "string"
          },
          "op": {
            "description": "Canonical operator compatible with the selected field's value type.",
            "type": "string"
          },
          "value": {
            "description": "Typed scalar or bounded array required by the selected field/operator."
          }
        },
        "required": [
          "field",
          "op",
          "value"
        ],
        "type": "object"
      },
      "DiscoverRequest": {
        "description": "Request body for `POST /v1/discover`.",
        "properties": {
          "conditions": {
            "description": "Filter conditions joined with logical AND.",
            "items": {
              "$ref": "#/components/schemas/DiscoverCondition"
            },
            "type": "array"
          },
          "cursor": {
            "description": "Opaque, expiring HMAC-authenticated keyset cursor from the preceding page.",
            "type": [
              "string",
              "null"
            ]
          },
          "entryType": {
            "description": "Exact canonical [`crate::entry::EntryType`] name. Omit to search every\nentry type; clause fragments and aliases are rejected.",
            "type": [
              "string",
              "null"
            ]
          },
          "limit": {
            "description": "Maximum number of results.",
            "format": "int64",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "EntryLineageResponse": {
        "description": "Response body for `GET /v1/entries/{did}/lineage`.",
        "properties": {
          "entryDid": {
            "description": "DID of the resolved entry.",
            "type": "string"
          },
          "lineage": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LineageReference",
                "description": "Publisher lineage summary, or `null` when the entry has no lineage."
              }
            ]
          }
        },
        "required": [
          "entryDid"
        ],
        "type": "object"
      },
      "EntrySignature": {
        "description": "Cryptographic signature over a MARS entry's canonical content.\n\nThe signature uses `MARS-PUBLISHER-SIGNING-V1`: JCS (RFC 8785) over\npublisher-authored fields after removing only `signature`, `sequence`,\n`updatedAt`, `lifecycleStatus`, `verifiableAttestations`, `shardAssignment`,\n`anchorProjection`, `anchorState`, `anchorTxHash`, `anchorBlockHeight`, and\n`anchorProof`.",
        "properties": {
          "algorithm": {
            "description": "Signature algorithm. Always \"Ed25519\".",
            "type": "string"
          },
          "created": {
            "description": "ISO 8601 timestamp of when the signature was created.",
            "type": [
              "string",
              "null"
            ]
          },
          "keyId": {
            "description": "DID URL of the signing key (e.g. `\"did:oas:l1fe:ao:org#key-1\"`).",
            "type": "string"
          },
          "value": {
            "description": "Strict URL-safe, unpadded base64url signature bytes.\n\nStandard-base64 characters (`+`, `/`) and `=` padding are rejected.",
            "type": "string"
          }
        },
        "required": [
          "algorithm",
          "keyId",
          "value"
        ],
        "type": "object"
      },
      "EntryType": {
        "description": "The 10 OAS-aligned entry types plus 4 MAP plugin types (14 total).\n\nEach variant maps to an [`oas_did::EntityKind`] value via the\n[`oas_kind`](Self::oas_kind) method.\n\n# Serialization\n\nVariants serialize to their PascalCase name (e.g. `\"AgentDefinition\"`).",
        "enum": [
          "AgentDefinition",
          "ToolDefinition",
          "SkillDefinition",
          "WorkflowDefinition",
          "ModelDefinition",
          "DatasetDefinition",
          "ServiceDefinition",
          "OrganizationDefinition",
          "HumanRootRecord",
          "MultiHumanRootRecord",
          "MapPlugin",
          "MapPluginRelease",
          "MapIntegrationSchema",
          "MapPluginCollection"
        ],
        "type": "string"
      },
      "EntryVersionsResponse": {
        "description": "Response body for `GET /v1/entries/{did}/versions`.",
        "properties": {
          "cursor": {
            "description": "Last-seen registry sequence to pass to the next request, or `null` on\nthe final page.",
            "type": [
              "string",
              "null"
            ]
          },
          "entryDid": {
            "description": "DID shared by every returned version.",
            "type": "string"
          },
          "hasMore": {
            "description": "Whether another page exists after this response.",
            "type": "boolean"
          },
          "totalCount": {
            "description": "Total number of stored versions for this DID.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "versions": {
            "description": "Entry snapshots ordered newest first.",
            "items": {
              "$ref": "#/components/schemas/MarsEntry"
            },
            "type": "array"
          }
        },
        "required": [
          "entryDid",
          "versions",
          "totalCount",
          "hasMore"
        ],
        "type": "object"
      },
      "ErrorResponse": {
        "description": "Canonical JSON error body returned by MARS HTTP endpoints.",
        "properties": {
          "errorCode": {
            "description": "Machine-readable MARS error code such as `MARS-008`.",
            "type": "string"
          },
          "httpStatus": {
            "description": "HTTP status echoed in the body.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "message": {
            "description": "Human-readable diagnostic.",
            "type": "string"
          }
        },
        "required": [
          "errorCode",
          "message",
          "httpStatus"
        ],
        "type": "object"
      },
      "EventPayload": {
        "description": "Event-specific payload.",
        "properties": {
          "detail": {
            "description": "Additional event-specific data."
          },
          "entryDid": {
            "description": "DID of the affected entry.",
            "type": "string"
          },
          "entryType": {
            "description": "Entry type (when applicable).",
            "type": [
              "string",
              "null"
            ]
          },
          "publisherDid": {
            "description": "Publisher DID.",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "Version (when applicable).",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "entryDid"
        ],
        "type": "object"
      },
      "EventType": {
        "description": "The kind of event that occurred.\nPer MARS Specification Section 13.1.",
        "enum": [
          "entry.created",
          "entry.updated",
          "entry.revoked",
          "entry.transferred",
          "entry.attested",
          "entry.reported",
          "bond.slashed",
          "federation.sync"
        ],
        "type": "string"
      },
      "FederatedDiscoveryMetadata": {
        "description": "Public, non-sensitive metadata for a federated discovery page.",
        "properties": {
          "federated": {
            "description": "Whether federation was attempted for this page.",
            "type": "boolean"
          },
          "partial": {
            "description": "Whether one or more peers failed, timed out, or returned invalid data.",
            "type": "boolean"
          },
          "peersAttempted": {
            "description": "Number of peers selected after the configured fanout bound.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "peersFailed": {
            "description": "Number of peers omitted because of timeout, transport, or trust failure.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "peersSucceeded": {
            "description": "Number of peers whose signed response was accepted.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "federated",
          "partial",
          "peersAttempted",
          "peersSucceeded",
          "peersFailed"
        ],
        "type": "object"
      },
      "FederatedDiscoveryRequest": {
        "additionalProperties": false,
        "description": "Typed query transported between federation peers.",
        "properties": {
          "query": {
            "$ref": "#/components/schemas/MarsQuery",
            "description": "The exact MARS-QL v1 AST used for local discovery."
          }
        },
        "required": [
          "query"
        ],
        "type": "object"
      },
      "FederatedDiscoveryResponse": {
        "additionalProperties": false,
        "description": "Typed peer response transported in a signed federation envelope.",
        "properties": {
          "result": {
            "$ref": "#/components/schemas/MarsQueryResult",
            "description": "The peer's bounded MARS-QL result page."
          }
        },
        "required": [
          "result"
        ],
        "type": "object"
      },
      "FederatedDiscoveryResult": {
        "description": "Deterministically merged local and peer discovery result.",
        "properties": {
          "cursor": {
            "description": "Registry-signed cursor for the next merged page.",
            "type": [
              "string",
              "null"
            ]
          },
          "entries": {
            "description": "Deduplicated, locally policy-checked entries.",
            "items": {
              "$ref": "#/components/schemas/MarsEntry"
            },
            "type": "array"
          },
          "federation": {
            "$ref": "#/components/schemas/FederatedDiscoveryMetadata",
            "description": "Bounded partial-result metadata with no endpoints or internal errors."
          },
          "hasMore": {
            "description": "Whether another merged page is available.",
            "type": "boolean"
          },
          "totalCount": {
            "description": "Number of unique entries in the bounded merged window.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "entries",
          "totalCount",
          "hasMore",
          "federation"
        ],
        "type": "object"
      },
      "FederationAgreement": {
        "description": "A federation agreement between two MARS registries.\nPer MARS Specification Section 11.5.",
        "properties": {
          "effectiveDate": {
            "description": "When the agreement takes effect.",
            "format": "date-time",
            "type": "string"
          },
          "entryTypes": {
            "description": "Entry types to synchronize.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "federationId": {
            "description": "Unique federation agreement identifier.",
            "type": "string"
          },
          "namespaces": {
            "description": "Namespaces to synchronize.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "registryA": {
            "description": "DID of registry A.",
            "type": "string"
          },
          "registryB": {
            "description": "DID of registry B.",
            "type": "string"
          },
          "syncDirection": {
            "$ref": "#/components/schemas/SyncDirection",
            "description": "Synchronization direction."
          },
          "syncInterval": {
            "description": "Sync interval (e.g. \"30s\").",
            "type": "string"
          }
        },
        "required": [
          "federationId",
          "registryA",
          "registryB",
          "entryTypes",
          "namespaces",
          "syncDirection",
          "syncInterval",
          "effectiveDate"
        ],
        "type": "object"
      },
      "FederationBreakerState": {
        "description": "Persisted circuit-breaker state exposed by protected peer status APIs.",
        "enum": [
          "closed",
          "open",
          "half_open",
          "quarantined"
        ],
        "type": "string"
      },
      "FederationMessageKind": {
        "description": "Closed message discriminator covered by every federation signature.",
        "enum": [
          "sync_request",
          "sync_response",
          "discovery_request",
          "discovery_response"
        ],
        "type": "string"
      },
      "FederationPeer": {
        "description": "A peer node in the MARS federation.",
        "properties": {
          "agreementIds": {
            "description": "Active federation agreements with this peer.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "endpoint": {
            "description": "REST API endpoint.",
            "type": "string"
          },
          "grpcEndpoint": {
            "description": "gRPC endpoint (if available).",
            "type": [
              "string",
              "null"
            ]
          },
          "lastSeen": {
            "description": "When this peer was last seen.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "peerDid": {
            "description": "DID of the peer registry.",
            "type": "string"
          }
        },
        "required": [
          "peerDid",
          "endpoint"
        ],
        "type": "object"
      },
      "FederationPeerStatus": {
        "description": "Protected, secret-free operational status for one peer.",
        "properties": {
          "breakerState": {
            "$ref": "#/components/schemas/FederationBreakerState",
            "description": "Current circuit-breaker state."
          },
          "consecutiveFailures": {
            "description": "Consecutive failed synchronization attempts.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "cursor": {
            "description": "Durable synchronization cursor.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "lag": {
            "description": "Peer-reported sequence lag from the persisted cursor.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "lastSuccessAt": {
            "description": "Last successful contact.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "latencyMs": {
            "description": "Last successful observed latency in milliseconds.",
            "format": "int64",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "nextAttemptAt": {
            "description": "Earliest next permitted attempt.",
            "format": "date-time",
            "type": "string"
          },
          "peerDid": {
            "description": "Canonical OAS service DID.",
            "type": "string"
          },
          "quarantines": {
            "description": "Number of quarantined payloads attributed to this peer.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "peerDid",
          "cursor",
          "breakerState",
          "consecutiveFailures",
          "lag",
          "quarantines",
          "nextAttemptAt"
        ],
        "type": "object"
      },
      "FederationPeerUpdateRequest": {
        "additionalProperties": false,
        "description": "Peer-controlled request for registering or changing its endpoint metadata.",
        "properties": {
          "agreementIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "endpoint": {
            "type": "string"
          },
          "grpcEndpoint": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "endpoint"
        ],
        "type": "object"
      },
      "FieldPath": {
        "description": "A dotted field path such as `\"royalty_terms.usage_fee\"`.\n\nStored as a vector of segments: `[\"royalty_terms\", \"usage_fee\"]`.",
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "FilterOp": {
        "description": "A filter operation with its operand(s).",
        "oneOf": [
          {
            "description": "`field = value`",
            "properties": {
              "op": {
                "enum": [
                  "eq"
                ],
                "type": "string"
              },
              "value": {
                "description": "`field = value`"
              }
            },
            "required": [
              "value",
              "op"
            ],
            "type": "object"
          },
          {
            "description": "`field != value`",
            "properties": {
              "op": {
                "enum": [
                  "notEq"
                ],
                "type": "string"
              },
              "value": {
                "description": "`field != value`"
              }
            },
            "required": [
              "value",
              "op"
            ],
            "type": "object"
          },
          {
            "description": "`field > value`",
            "properties": {
              "op": {
                "enum": [
                  "gt"
                ],
                "type": "string"
              },
              "value": {
                "description": "`field > value`"
              }
            },
            "required": [
              "value",
              "op"
            ],
            "type": "object"
          },
          {
            "description": "`field >= value`",
            "properties": {
              "op": {
                "enum": [
                  "gte"
                ],
                "type": "string"
              },
              "value": {
                "description": "`field >= value`"
              }
            },
            "required": [
              "value",
              "op"
            ],
            "type": "object"
          },
          {
            "description": "`field < value`",
            "properties": {
              "op": {
                "enum": [
                  "lt"
                ],
                "type": "string"
              },
              "value": {
                "description": "`field < value`"
              }
            },
            "required": [
              "value",
              "op"
            ],
            "type": "object"
          },
          {
            "description": "`field <= value`",
            "properties": {
              "op": {
                "enum": [
                  "lte"
                ],
                "type": "string"
              },
              "value": {
                "description": "`field <= value`"
              }
            },
            "required": [
              "value",
              "op"
            ],
            "type": "object"
          },
          {
            "description": "`field CONTAINS value` — set/string membership.",
            "properties": {
              "op": {
                "enum": [
                  "contains"
                ],
                "type": "string"
              },
              "value": {
                "description": "`field CONTAINS value` — set/string membership."
              }
            },
            "required": [
              "value",
              "op"
            ],
            "type": "object"
          },
          {
            "description": "`field CONTAINS_ALL (v1, v2, ...)` — all values present.",
            "properties": {
              "op": {
                "enum": [
                  "containsAll"
                ],
                "type": "string"
              },
              "value": {
                "description": "`field CONTAINS_ALL (v1, v2, ...)` — all values present.",
                "items": {},
                "type": "array"
              }
            },
            "required": [
              "value",
              "op"
            ],
            "type": "object"
          },
          {
            "description": "`field CONTAINS_ANY (v1, v2, ...)` — at least one value present.",
            "properties": {
              "op": {
                "enum": [
                  "containsAny"
                ],
                "type": "string"
              },
              "value": {
                "description": "`field CONTAINS_ANY (v1, v2, ...)` — at least one value present.",
                "items": {},
                "type": "array"
              }
            },
            "required": [
              "value",
              "op"
            ],
            "type": "object"
          },
          {
            "description": "`field IN (v1, v2, ...)` — field matches one of the listed values.",
            "properties": {
              "op": {
                "enum": [
                  "in"
                ],
                "type": "string"
              },
              "value": {
                "description": "`field IN (v1, v2, ...)` — field matches one of the listed values.",
                "items": {},
                "type": "array"
              }
            },
            "required": [
              "value",
              "op"
            ],
            "type": "object"
          }
        ]
      },
      "HealthResponse": {
        "description": "Response body for `GET /v1/health`.",
        "properties": {
          "registryDid": {
            "description": "DID of the serving registry.",
            "type": "string"
          },
          "status": {
            "description": "Service status.",
            "type": "string"
          },
          "version": {
            "description": "MARS protocol version.",
            "type": "string"
          }
        },
        "required": [
          "status",
          "version",
          "registryDid"
        ],
        "type": "object"
      },
      "LifecycleStatus": {
        "description": "The lifecycle status of a MARS registry entry.",
        "enum": [
          "draft",
          "active",
          "deprecated",
          "archived",
          "revoked",
          "experimental"
        ],
        "type": "string"
      },
      "LineageReference": {
        "description": "A reference to the human lineage chain of a MARS entry's publisher.\n\nEvery non-root entry traces back to a human root DID through a chain of\ndelegations.",
        "properties": {
          "generation": {
            "description": "The generation distance from the root (0 = direct child).",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "humanRootDid": {
            "description": "The DID of the originating human root.",
            "type": "string"
          },
          "lineageChain": {
            "description": "Ordered chain of DIDs from root to publisher.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "humanRootDid",
          "generation"
        ],
        "type": "object"
      },
      "MarsAnchor": {
        "description": "On-chain anchor record for a MARS entry.\nPer MARS Specification Appendix B.",
        "properties": {
          "anchorType": {
            "$ref": "#/components/schemas/AnchorType",
            "description": "Type of anchor operation."
          },
          "bondId": {
            "description": "Bond ID (if applicable).",
            "type": [
              "string",
              "null"
            ]
          },
          "entryDid": {
            "description": "DID of the anchored entry.",
            "type": "string"
          },
          "itemDataHash": {
            "description": "SHA-256 hash of canonicalized itemData.",
            "type": "string"
          },
          "previousAnchorHash": {
            "description": "Hash of the previous anchor (chain linking).",
            "type": [
              "string",
              "null"
            ]
          },
          "publisherDid": {
            "description": "DID of the publisher.",
            "type": "string"
          },
          "timestamp": {
            "description": "Timestamp of anchoring.",
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "description": "Always \"MarsAnchor\".",
            "type": "string"
          },
          "version": {
            "description": "SemVer version string.",
            "type": "string"
          }
        },
        "required": [
          "type",
          "entryDid",
          "itemDataHash",
          "publisherDid",
          "version",
          "timestamp",
          "anchorType"
        ],
        "type": "object"
      },
      "MarsEntry": {
        "description": "A complete MARS registry entry (MARS Specification Section 5).\n\nThis is the canonical on-wire and at-rest representation of every artifact\nregistered in the MARS ecosystem. Required fields are always present;\noptional fields are omitted from JSON when `None` or empty.\n\n# Validation\n\nCall [`validate`](Self::validate) to check structural invariants before\nsigning or persisting.\n\n# Examples\n\n```no_run\nuse mars_protocol::entry::{MarsEntry, EntryType};\n\nlet entry: MarsEntry = serde_json::from_str(r#\"{ ... }\"#)?;\nentry.validate()?;\n# Ok::<(), Box<dyn std::error::Error>>(())\n```",
        "properties": {
          "accessPolicy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccessPolicy",
                "description": "Access control policy."
              }
            ]
          },
          "anchorState": {
            "$ref": "#/components/schemas/AnchorState",
            "description": "Registry-managed anchor projection for the current immutable snapshot.\n\nThis field is excluded from the publisher signing payload and can only\nbe advanced by the registry's durable anchor outbox."
          },
          "bondReference": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BondReference",
                "description": "Associated economic bond."
              }
            ]
          },
          "customMetadata": {
            "additionalProperties": {},
            "description": "Arbitrary extension metadata.",
            "propertyNames": {
              "type": "string"
            },
            "type": [
              "object",
              "null"
            ]
          },
          "description": {
            "description": "Human-readable description (max 4096 characters).",
            "type": [
              "string",
              "null"
            ]
          },
          "entryDid": {
            "description": "The OAS DID uniquely identifying this entry.",
            "type": "string"
          },
          "entryType": {
            "$ref": "#/components/schemas/EntryType",
            "description": "The primary entry type (one of 10 OAS kinds)."
          },
          "itemData": {
            "description": "The entry payload conforming to `item_schema_uri`."
          },
          "itemDataHash": {
            "description": "Content hash of `item_data` in `sha256:<hex>` format.",
            "type": "string"
          },
          "itemSchemaUri": {
            "description": "URI of the JSON Schema that `item_data` conforms to.",
            "type": "string"
          },
          "lifecycleStatus": {
            "$ref": "#/components/schemas/LifecycleStatus",
            "description": "Current lifecycle status (defaults to `Active`)."
          },
          "lineageReference": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LineageReference",
                "description": "Lineage chain to the originating human root."
              }
            ]
          },
          "marsVersion": {
            "description": "MARS protocol version. Must be `\"1.0.0\"`.",
            "type": "string"
          },
          "name": {
            "description": "Human-readable name (max 256 characters).",
            "type": "string"
          },
          "publishedAt": {
            "description": "Timestamp of initial publication.",
            "format": "date-time",
            "type": "string"
          },
          "publisherDid": {
            "description": "DID of the publishing entity.",
            "type": "string"
          },
          "relationships": {
            "description": "Typed relationships to other entries.",
            "items": {
              "$ref": "#/components/schemas/Relationship"
            },
            "type": "array"
          },
          "semanticAnnotations": {
            "description": "RDF-style semantic annotations.",
            "items": {
              "$ref": "#/components/schemas/SemanticAnnotation"
            },
            "type": "array"
          },
          "sequence": {
            "description": "Monotonically increasing counter for replay protection.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "serviceEndpoints": {
            "description": "Service endpoints for OpenAgent resolution.\n\nPer the MARS/OpenAgent Endpoint Contract (v1.0.0), entries MAY declare\ntransport endpoints. Day-one clients consume only `https` endpoints;\n`weave` and `wss` entries are stored for forward compatibility.",
            "items": {
              "$ref": "#/components/schemas/ServiceEndpoint"
            },
            "type": "array"
          },
          "shardAssignment": {
            "description": "MARS shard assignment (from gal topology map).",
            "type": [
              "string",
              "null"
            ]
          },
          "signature": {
            "$ref": "#/components/schemas/EntrySignature",
            "description": "Cryptographic signature over the canonical entry content."
          },
          "tags": {
            "description": "Discovery tags.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "updatedAt": {
            "description": "Timestamp of the most recent update.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "verifiableAttestations": {
            "description": "Verifiable attestations (opaque JSON; validated at a higher layer).",
            "items": {},
            "type": "array"
          },
          "version": {
            "description": "Semantic version of this entry.",
            "type": "string"
          }
        },
        "required": [
          "marsVersion",
          "entryDid",
          "entryType",
          "name",
          "version",
          "publisherDid",
          "publishedAt",
          "itemSchemaUri",
          "itemData",
          "itemDataHash",
          "signature"
        ],
        "type": "object"
      },
      "MarsEvent": {
        "description": "A notification event emitted by a MARS registry.\nPer MARS Specification Section 13.3.",
        "properties": {
          "eventId": {
            "description": "Unique event identifier.",
            "type": "string"
          },
          "eventType": {
            "$ref": "#/components/schemas/EventType",
            "description": "The type of event."
          },
          "payload": {
            "$ref": "#/components/schemas/EventPayload",
            "description": "Event-specific payload."
          },
          "registryDid": {
            "description": "DID of the registry that emitted the event.",
            "type": "string"
          },
          "timestamp": {
            "description": "When the event occurred.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "eventType",
          "eventId",
          "timestamp",
          "registryDid",
          "payload"
        ],
        "type": "object"
      },
      "MarsQlRequest": {
        "description": "Request body for `POST /v1/discover/marsql`.",
        "properties": {
          "query": {
            "description": "A MARS-QL `DISCOVER` expression.",
            "type": "string"
          }
        },
        "required": [
          "query"
        ],
        "type": "object"
      },
      "MarsQuery": {
        "description": "A fully-parsed MARS-QL query.\n\nRepresents the output of the recursive-descent parser operating on a\nMARS-QL string. Every clause is optional except the `DISCOVER` keyword and\nentry type.\n\n# Examples\n\n```\n# use mars_protocol::marsql::ast::*;\nlet q = MarsQuery {\n    entry_type: QueryEntryType::All,\n    conditions: vec![],\n    ordering: vec![],\n    limit: Some(10),\n    offset: None,\n};\nassert!(q.conditions.is_empty());\n```",
        "properties": {
          "conditions": {
            "description": "Zero or more filter conditions (implicit AND).",
            "items": {
              "$ref": "#/components/schemas/Condition"
            },
            "type": "array"
          },
          "entryType": {
            "$ref": "#/components/schemas/QueryEntryType",
            "description": "The entry type to discover."
          },
          "limit": {
            "description": "Optional maximum number of results.",
            "format": "int64",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "offset": {
            "description": "Optional cursor for keyset pagination.",
            "type": [
              "string",
              "null"
            ]
          },
          "ordering": {
            "description": "Zero or more ordering directives.",
            "items": {
              "$ref": "#/components/schemas/OrderField"
            },
            "type": "array"
          }
        },
        "required": [
          "entryType"
        ],
        "type": "object"
      },
      "MarsQueryResult": {
        "description": "The result of executing a MARS-QL query against a set of entries.",
        "properties": {
          "cursor": {
            "description": "Opaque cursor for the next page, if applicable.",
            "type": [
              "string",
              "null"
            ]
          },
          "entries": {
            "description": "The matching entries (after filtering, sorting, and pagination).",
            "items": {
              "$ref": "#/components/schemas/MarsEntry"
            },
            "type": "array"
          },
          "hasMore": {
            "description": "Whether more results exist beyond this page.",
            "type": "boolean"
          },
          "totalCount": {
            "description": "Total number of entries that matched the filter (before pagination).",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "entries",
          "totalCount",
          "hasMore"
        ],
        "type": "object"
      },
      "MerkleProof": {
        "description": "A Merkle inclusion proof linking a leaf hash to a root hash.\n\nVerifiers walk the `path` from the `leaf_hash` to the `root`, combining\neach `ProofNode` in sequence according to its `direction`.\n\n## MARS Merkle Proof v1 encoding\n\n`root`, `leafHash`, and every sibling `hash` are textual lowercase\nhexadecimal SHA-256 digests. Each level hashes the UTF-8 bytes of the\nconcatenated left and right hexadecimal strings, then lowercase-hex\nencodes the resulting digest before processing the next level. This is a\ncompatibility contract; it is intentionally not raw 32-byte digest\nconcatenation.",
        "properties": {
          "leafHash": {
            "description": "Hash of the leaf being proved.",
            "type": "string"
          },
          "path": {
            "description": "Ordered path of sibling hashes from leaf to root.",
            "items": {
              "$ref": "#/components/schemas/ProofNode"
            },
            "type": "array"
          },
          "root": {
            "description": "Merkle root hash.",
            "type": "string"
          }
        },
        "required": [
          "root",
          "path",
          "leafHash"
        ],
        "type": "object"
      },
      "OrderField": {
        "description": "An ordering directive in an `ORDER BY` clause.",
        "properties": {
          "direction": {
            "$ref": "#/components/schemas/SortDirection",
            "description": "Sort direction (ascending or descending)."
          },
          "field": {
            "$ref": "#/components/schemas/FieldPath",
            "description": "The field to order by."
          }
        },
        "required": [
          "field",
          "direction"
        ],
        "type": "object"
      },
      "ProofNode": {
        "description": "A single node in a Merkle proof path.",
        "properties": {
          "direction": {
            "$ref": "#/components/schemas/Direction",
            "description": "Whether this sibling is to the left or right of the current node."
          },
          "hash": {
            "description": "Sibling hash at this level of the tree.",
            "type": "string"
          }
        },
        "required": [
          "hash",
          "direction"
        ],
        "type": "object"
      },
      "QueryEntryType": {
        "description": "The target entry type in a `DISCOVER` clause.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EntryType",
            "description": "A specific OAS entry type."
          },
          {
            "default": null,
            "description": "Wildcard `*` — matches all entry types.",
            "type": "null"
          }
        ]
      },
      "Relationship": {
        "description": "A typed directional relationship between two MARS entries.",
        "properties": {
          "label": {
            "description": "Optional human-readable label for the relationship.",
            "type": [
              "string",
              "null"
            ]
          },
          "relationshipType": {
            "$ref": "#/components/schemas/RelationshipType",
            "description": "The kind of relationship."
          },
          "targetDid": {
            "description": "The DID of the target entry.",
            "type": "string"
          }
        },
        "required": [
          "relationshipType",
          "targetDid"
        ],
        "type": "object"
      },
      "RelationshipType": {
        "description": "Supported relationship types between MARS entries.",
        "enum": [
          "dependsOn",
          "composes",
          "extends",
          "replaces",
          "instanceOf",
          "publishedBy",
          "relatedTo"
        ],
        "type": "string"
      },
      "ReportRequest": {
        "additionalProperties": false,
        "description": "Request body for `POST /v1/report`.",
        "properties": {
          "entryDid": {
            "description": "DID of the reported entry.",
            "type": "string"
          },
          "evidence": {
            "description": "Optional supporting evidence."
          },
          "reason": {
            "description": "Human-readable report reason.",
            "type": "string"
          }
        },
        "required": [
          "entryDid",
          "reason"
        ],
        "type": "object"
      },
      "ReportResponse": {
        "description": "Response body for a successfully accepted report.",
        "properties": {
          "entryDid": {
            "description": "DID of the reported entry.",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ReportStatus",
            "description": "Stable acceptance state."
          }
        },
        "required": [
          "status",
          "entryDid"
        ],
        "type": "object"
      },
      "ReportStatus": {
        "description": "Closed state set for accepted reports.",
        "enum": [
          "reported"
        ],
        "type": "string"
      },
      "SemanticAnnotation": {
        "description": "RDF-style semantic annotation attached to a MARS entry.\n\nAnnotations express facts about an entry in predicate-object form. At least\none of `object_literal` or `object_uri` must be provided; supplying both is\nvalid and indicates the literal is a label/display form of the referenced\nresource.\n\n# Serialization\n\nAll fields use camelCase when serialized to JSON.\n\n# Examples\n\n```\nuse mars_protocol::types::SemanticAnnotation;\n\nlet ann = SemanticAnnotation {\n    predicate_uri: \"https://schema.org/author\".into(),\n    object_literal: Some(\"Ada Lovelace\".into()),\n    object_uri: Some(\"did:oas:hmr:abc123\".into()),\n};\nassert!(ann.validate().is_ok());\n```",
        "properties": {
          "objectLiteral": {
            "description": "A literal value for the object (plain text, number-as-string, etc.).",
            "type": [
              "string",
              "null"
            ]
          },
          "objectUri": {
            "description": "A URI reference for the object (another DID, schema URL, etc.).",
            "type": [
              "string",
              "null"
            ]
          },
          "predicateUri": {
            "description": "The predicate URI identifying the relationship (e.g. `https://schema.org/author`).",
            "type": "string"
          }
        },
        "required": [
          "predicateUri"
        ],
        "type": "object"
      },
      "ServiceEndpoint": {
        "description": "A service endpoint declared in a MARS entry.\n\nPer the MARS/OpenAgent Endpoint Contract (v1.0.0), each endpoint declares\na transport type, a URL, and a selection priority. Day-one only `https`\nendpoints are consumed; `weave` and `wss` endpoints are stored for\nforward compatibility.\n\n# Forward Compatibility\n\nClients MUST ignore endpoint types they do not support. The `properties`\nfield provides a transport-specific extension point so future metadata\ndoes not require schema-level changes.\n\n# Serialization\n\nAll fields use camelCase. `properties` is omitted when empty/None.\n\n# Examples\n\n```\nuse mars_protocol::types::ServiceEndpoint;\n\nlet ep = ServiceEndpoint {\n    id: \"primary-https\".into(),\n    endpoint_type: \"https\".into(),\n    url: \"https://api.example.com\".into(),\n    priority: 0,\n    properties: None,\n};\nassert!(ep.validate().is_ok());\n```",
        "properties": {
          "id": {
            "description": "Unique identifier within a DID's endpoint set.",
            "type": "string"
          },
          "priority": {
            "description": "Selection priority. 0 = highest. Lower values preferred.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "properties": {
            "additionalProperties": {},
            "description": "Transport-specific metadata (extensible, optional).",
            "propertyNames": {
              "type": "string"
            },
            "type": [
              "object",
              "null"
            ]
          },
          "type": {
            "description": "Transport type: `\"https\"` (day-one), `\"weave\"`, `\"wss\"` (phase-2).",
            "type": "string"
          },
          "url": {
            "description": "Transport-specific address (URL, peer ID, etc.).",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "url",
          "priority"
        ],
        "type": "object"
      },
      "SignedFederationEnvelope_FederatedDiscoveryRequest": {
        "additionalProperties": false,
        "description": "JCS-canonical, detached Ed25519 envelope used for federation traffic.\n\nThe signature covers every field except `signature`, including the sender,\nrecipient, key controller, timestamp, nonce, request digest, and payload.\nRequest digests bind responses to the exact request they answer.",
        "properties": {
          "algorithm": {
            "description": "Signature algorithm. MARS federation v1 permits only `Ed25519`.",
            "type": "string"
          },
          "keyId": {
            "description": "Sender-controlled OAS DID URL used to verify the signature.",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/FederationMessageKind",
            "description": "Message type covered by the signature."
          },
          "nonce": {
            "description": "32 random bytes encoded as 64 lowercase hexadecimal characters.",
            "type": "string"
          },
          "payload": {
            "additionalProperties": false,
            "description": "Typed query transported between federation peers.",
            "properties": {
              "query": {
                "$ref": "#/components/schemas/MarsQuery",
                "description": "The exact MARS-QL v1 AST used for local discovery."
              }
            },
            "required": [
              "query"
            ],
            "type": "object"
          },
          "recipientDid": {
            "description": "Canonical OAS service DID of the intended registry.",
            "type": "string"
          },
          "requestDigest": {
            "description": "`sha256:` digest of the request payload, or of the request envelope for\na response.",
            "type": "string"
          },
          "senderDid": {
            "description": "Canonical OAS service DID of the sending registry.",
            "type": "string"
          },
          "signature": {
            "description": "Raw Ed25519 signature encoded as canonical unpadded base64url.",
            "type": "string"
          },
          "timestamp": {
            "description": "Envelope creation time.",
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "Stable signing profile.",
            "type": "string"
          }
        },
        "required": [
          "version",
          "kind",
          "senderDid",
          "recipientDid",
          "keyId",
          "algorithm",
          "timestamp",
          "nonce",
          "requestDigest",
          "payload",
          "signature"
        ],
        "type": "object"
      },
      "SignedFederationEnvelope_FederatedDiscoveryResponse": {
        "additionalProperties": false,
        "description": "JCS-canonical, detached Ed25519 envelope used for federation traffic.\n\nThe signature covers every field except `signature`, including the sender,\nrecipient, key controller, timestamp, nonce, request digest, and payload.\nRequest digests bind responses to the exact request they answer.",
        "properties": {
          "algorithm": {
            "description": "Signature algorithm. MARS federation v1 permits only `Ed25519`.",
            "type": "string"
          },
          "keyId": {
            "description": "Sender-controlled OAS DID URL used to verify the signature.",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/FederationMessageKind",
            "description": "Message type covered by the signature."
          },
          "nonce": {
            "description": "32 random bytes encoded as 64 lowercase hexadecimal characters.",
            "type": "string"
          },
          "payload": {
            "additionalProperties": false,
            "description": "Typed peer response transported in a signed federation envelope.",
            "properties": {
              "result": {
                "$ref": "#/components/schemas/MarsQueryResult",
                "description": "The peer's bounded MARS-QL result page."
              }
            },
            "required": [
              "result"
            ],
            "type": "object"
          },
          "recipientDid": {
            "description": "Canonical OAS service DID of the intended registry.",
            "type": "string"
          },
          "requestDigest": {
            "description": "`sha256:` digest of the request payload, or of the request envelope for\na response.",
            "type": "string"
          },
          "senderDid": {
            "description": "Canonical OAS service DID of the sending registry.",
            "type": "string"
          },
          "signature": {
            "description": "Raw Ed25519 signature encoded as canonical unpadded base64url.",
            "type": "string"
          },
          "timestamp": {
            "description": "Envelope creation time.",
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "Stable signing profile.",
            "type": "string"
          }
        },
        "required": [
          "version",
          "kind",
          "senderDid",
          "recipientDid",
          "keyId",
          "algorithm",
          "timestamp",
          "nonce",
          "requestDigest",
          "payload",
          "signature"
        ],
        "type": "object"
      },
      "SignedFederationEnvelope_SyncRequest": {
        "additionalProperties": false,
        "description": "JCS-canonical, detached Ed25519 envelope used for federation traffic.\n\nThe signature covers every field except `signature`, including the sender,\nrecipient, key controller, timestamp, nonce, request digest, and payload.\nRequest digests bind responses to the exact request they answer.",
        "properties": {
          "algorithm": {
            "description": "Signature algorithm. MARS federation v1 permits only `Ed25519`.",
            "type": "string"
          },
          "keyId": {
            "description": "Sender-controlled OAS DID URL used to verify the signature.",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/FederationMessageKind",
            "description": "Message type covered by the signature."
          },
          "nonce": {
            "description": "32 random bytes encoded as 64 lowercase hexadecimal characters.",
            "type": "string"
          },
          "payload": {
            "description": "Pull-based sync request sent between federation peers.\nPer MARS Specification Section 11.3.",
            "properties": {
              "entryTypes": {
                "description": "Filter by entry types (empty = all).",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "fromSequence": {
                "description": "Start from this sequence number (exclusive).",
                "format": "int64",
                "minimum": 0,
                "type": "integer"
              },
              "maxEntries": {
                "description": "Maximum entries to return in this batch.",
                "format": "int32",
                "minimum": 0,
                "type": "integer"
              },
              "namespaces": {
                "description": "Filter by namespaces (empty = all).",
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "fromSequence",
              "maxEntries"
            ],
            "type": "object"
          },
          "recipientDid": {
            "description": "Canonical OAS service DID of the intended registry.",
            "type": "string"
          },
          "requestDigest": {
            "description": "`sha256:` digest of the request payload, or of the request envelope for\na response.",
            "type": "string"
          },
          "senderDid": {
            "description": "Canonical OAS service DID of the sending registry.",
            "type": "string"
          },
          "signature": {
            "description": "Raw Ed25519 signature encoded as canonical unpadded base64url.",
            "type": "string"
          },
          "timestamp": {
            "description": "Envelope creation time.",
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "Stable signing profile.",
            "type": "string"
          }
        },
        "required": [
          "version",
          "kind",
          "senderDid",
          "recipientDid",
          "keyId",
          "algorithm",
          "timestamp",
          "nonce",
          "requestDigest",
          "payload",
          "signature"
        ],
        "type": "object"
      },
      "SignedFederationEnvelope_SyncResponse": {
        "additionalProperties": false,
        "description": "JCS-canonical, detached Ed25519 envelope used for federation traffic.\n\nThe signature covers every field except `signature`, including the sender,\nrecipient, key controller, timestamp, nonce, request digest, and payload.\nRequest digests bind responses to the exact request they answer.",
        "properties": {
          "algorithm": {
            "description": "Signature algorithm. MARS federation v1 permits only `Ed25519`.",
            "type": "string"
          },
          "keyId": {
            "description": "Sender-controlled OAS DID URL used to verify the signature.",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/FederationMessageKind",
            "description": "Message type covered by the signature."
          },
          "nonce": {
            "description": "32 random bytes encoded as 64 lowercase hexadecimal characters.",
            "type": "string"
          },
          "payload": {
            "description": "Sync response returned by a federation peer.",
            "properties": {
              "entries": {
                "description": "Entries returned in this batch.",
                "items": {
                  "$ref": "#/components/schemas/MarsEntry"
                },
                "type": "array"
              },
              "hasMore": {
                "description": "Whether more entries are available.",
                "type": "boolean"
              },
              "nextSequence": {
                "description": "Next sequence number to continue from.",
                "format": "int64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "entries",
              "nextSequence",
              "hasMore"
            ],
            "type": "object"
          },
          "recipientDid": {
            "description": "Canonical OAS service DID of the intended registry.",
            "type": "string"
          },
          "requestDigest": {
            "description": "`sha256:` digest of the request payload, or of the request envelope for\na response.",
            "type": "string"
          },
          "senderDid": {
            "description": "Canonical OAS service DID of the sending registry.",
            "type": "string"
          },
          "signature": {
            "description": "Raw Ed25519 signature encoded as canonical unpadded base64url.",
            "type": "string"
          },
          "timestamp": {
            "description": "Envelope creation time.",
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "Stable signing profile.",
            "type": "string"
          }
        },
        "required": [
          "version",
          "kind",
          "senderDid",
          "recipientDid",
          "keyId",
          "algorithm",
          "timestamp",
          "nonce",
          "requestDigest",
          "payload",
          "signature"
        ],
        "type": "object"
      },
      "SiwsChallenge": {
        "description": "SIWS challenge issued by MARS and signed by a Sigil wallet.",
        "properties": {
          "audience": {
            "description": "Sign-in audience.",
            "type": "string"
          },
          "chainId": {
            "description": "Sigil chain identifier.",
            "type": "string"
          },
          "expiresAtMs": {
            "description": "Challenge expiry time in Unix milliseconds.",
            "format": "int64",
            "type": "integer"
          },
          "hmrDid": {
            "description": "HMR DID expected to sign.",
            "type": "string"
          },
          "issuedAtMs": {
            "description": "Challenge issue time in Unix milliseconds.",
            "format": "int64",
            "type": "integer"
          },
          "kind": {
            "description": "Protocol discriminator. Current value is `sigil.signin`.",
            "type": "string"
          },
          "nonce": {
            "description": "Single-use challenge nonce.",
            "type": "string"
          },
          "origin": {
            "description": "Request origin.",
            "type": "string"
          },
          "requestId": {
            "description": "Single-use request identifier.",
            "type": "string"
          },
          "rootDid": {
            "description": "Optional authorizing HMR, MHR, or ENR root DID.",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "SIWS wire version. Current value is `1`.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "kind",
          "version",
          "origin",
          "audience",
          "chainId",
          "nonce",
          "requestId",
          "hmrDid",
          "issuedAtMs",
          "expiresAtMs"
        ],
        "type": "object"
      },
      "SiwsChallengeRequest": {
        "description": "Request body for `POST /v1/auth/siws/challenge`.",
        "properties": {
          "audience": {
            "description": "Required audience shown to the signer.",
            "type": "string"
          },
          "chainId": {
            "description": "Sigil chain identifier.",
            "type": [
              "string",
              "null"
            ]
          },
          "hmrDid": {
            "description": "HMR DID required to satisfy the challenge.",
            "type": [
              "string",
              "null"
            ]
          },
          "origin": {
            "description": "Browser or application origin.",
            "type": [
              "string",
              "null"
            ]
          },
          "rootDid": {
            "description": "Optional HMR, MHR, or ENR root DID.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "audience"
        ],
        "type": "object"
      },
      "SiwsChallengeResponse": {
        "description": "Response body for `POST /v1/auth/siws/challenge`.",
        "properties": {
          "challenge": {
            "$ref": "#/components/schemas/SiwsChallenge",
            "description": "Challenge that must be echoed during verification."
          }
        },
        "required": [
          "challenge"
        ],
        "type": "object"
      },
      "SiwsSessionResponse": {
        "description": "Response body for `GET /v1/auth/session`.",
        "properties": {
          "expiresAtMs": {
            "format": "int64",
            "type": "integer"
          },
          "hmrDid": {
            "type": "string"
          },
          "rootDid": {
            "type": "string"
          },
          "rootKind": {
            "type": "string"
          }
        },
        "required": [
          "hmrDid",
          "rootDid",
          "rootKind",
          "expiresAtMs"
        ],
        "type": "object"
      },
      "SiwsSignedResponse": {
        "description": "Signed SIWS response produced by a Sigil wallet.",
        "properties": {
          "chainId": {
            "description": "Chain identifier copied from the challenge.",
            "type": "string"
          },
          "digest": {
            "description": "Hex-encoded BLAKE3 transcript digest.",
            "type": "string"
          },
          "kind": {
            "description": "Response discriminator. Current value is `message`.",
            "type": "string"
          },
          "message": {
            "description": "Canonical SIWS message.",
            "type": "string"
          },
          "origin": {
            "description": "Origin copied from the challenge.",
            "type": "string"
          },
          "signature": {
            "description": "Hex-encoded Ed25519 signature.",
            "type": "string"
          },
          "signerDid": {
            "description": "DID of the HMR signer.",
            "type": "string"
          },
          "signerPublicKey": {
            "description": "Hex-encoded Ed25519 public key.",
            "type": "string"
          },
          "transcript": {
            "description": "Canonical transcript signed by the wallet.",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "origin",
          "chainId",
          "signerDid",
          "message",
          "signature",
          "signerPublicKey",
          "digest",
          "transcript"
        ],
        "type": "object"
      },
      "SiwsVerifyRequest": {
        "additionalProperties": false,
        "description": "Request body for `POST /v1/auth/siws/verify`.",
        "properties": {
          "audience": {
            "description": "Expected audience; must equal the challenge audience.",
            "type": "string"
          },
          "challenge": {
            "$ref": "#/components/schemas/SiwsChallenge",
            "description": "Originally issued challenge."
          },
          "response": {
            "$ref": "#/components/schemas/SiwsSignedResponse",
            "description": "Wallet-signed response."
          }
        },
        "required": [
          "challenge",
          "response",
          "audience"
        ],
        "type": "object"
      },
      "SiwsVerifyResponse": {
        "description": "Response body for a successful SIWS verification.",
        "properties": {
          "expiresAtMs": {
            "format": "int64",
            "type": "integer"
          },
          "hmrDid": {
            "type": "string"
          },
          "rootDid": {
            "type": "string"
          },
          "rootKind": {
            "type": "string"
          },
          "sessionExpiresAtMs": {
            "format": "int64",
            "type": "integer"
          },
          "sessionToken": {
            "type": "string"
          },
          "signerPublicKey": {
            "type": "string"
          }
        },
        "required": [
          "hmrDid",
          "rootDid",
          "rootKind",
          "signerPublicKey",
          "expiresAtMs",
          "sessionToken",
          "sessionExpiresAtMs"
        ],
        "type": "object"
      },
      "SlashDistribution": {
        "description": "Distribution of slashed bond funds.\nPer MARS Specification Section 7.4:\n  30% reporter, 40% harmed parties, 30% network treasury.",
        "properties": {
          "harmedPartiesShare": {
            "$ref": "#/components/schemas/BondAmount",
            "description": "Amount going to harmed parties (40%)."
          },
          "reporterShare": {
            "$ref": "#/components/schemas/BondAmount",
            "description": "Amount going to the reporter (30%)."
          },
          "treasuryShare": {
            "$ref": "#/components/schemas/BondAmount",
            "description": "Amount going to network treasury (30%)."
          }
        },
        "required": [
          "reporterShare",
          "harmedPartiesShare",
          "treasuryShare"
        ],
        "type": "object"
      },
      "SlashEvent": {
        "description": "A slashing event recorded against a bond.\nPer MARS Specification Section 7.4.",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/BondAmount",
            "description": "Amount slashed in MINTS."
          },
          "distribution": {
            "$ref": "#/components/schemas/SlashDistribution",
            "description": "Distribution of slashed funds."
          },
          "reason": {
            "description": "Reason for the slash.",
            "type": "string"
          },
          "reporterDid": {
            "description": "DID of the reporter who triggered the slash.",
            "type": "string"
          },
          "timestamp": {
            "description": "When the slash occurred.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "timestamp",
          "amount",
          "reason",
          "reporterDid",
          "distribution"
        ],
        "type": "object"
      },
      "SortDirection": {
        "description": "Sort direction for `ORDER BY` clauses.",
        "enum": [
          "asc",
          "desc"
        ],
        "type": "string"
      },
      "SubscriptionFilter": {
        "description": "WebSocket subscription filter.\nPer MARS Specification Section 12.4.",
        "properties": {
          "entryDids": {
            "description": "Filter by specific entry DIDs.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "entryTypes": {
            "description": "Filter by entry types.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "events": {
            "description": "Filter by event types.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "namespaces": {
            "description": "Filter by namespaces.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "SubscriptionMessage": {
        "description": "WebSocket subscription message.",
        "properties": {
          "action": {
            "description": "Action: \"subscribe\" or \"unsubscribe\".",
            "type": "string"
          },
          "filters": {
            "$ref": "#/components/schemas/SubscriptionFilter",
            "description": "Subscription filters."
          }
        },
        "required": [
          "action",
          "filters"
        ],
        "type": "object"
      },
      "SyncDirection": {
        "description": "Synchronization direction for a federation agreement.",
        "enum": [
          "bidirectional",
          "aFromB",
          "bFromA"
        ],
        "type": "string"
      },
      "SyncRequest": {
        "description": "Pull-based sync request sent between federation peers.\nPer MARS Specification Section 11.3.",
        "properties": {
          "entryTypes": {
            "description": "Filter by entry types (empty = all).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "fromSequence": {
            "description": "Start from this sequence number (exclusive).",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "maxEntries": {
            "description": "Maximum entries to return in this batch.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "namespaces": {
            "description": "Filter by namespaces (empty = all).",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "fromSequence",
          "maxEntries"
        ],
        "type": "object"
      },
      "SyncResponse": {
        "description": "Sync response returned by a federation peer.",
        "properties": {
          "entries": {
            "description": "Entries returned in this batch.",
            "items": {
              "$ref": "#/components/schemas/MarsEntry"
            },
            "type": "array"
          },
          "hasMore": {
            "description": "Whether more entries are available.",
            "type": "boolean"
          },
          "nextSequence": {
            "description": "Next sequence number to continue from.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "entries",
          "nextSequence",
          "hasMore"
        ],
        "type": "object"
      },
      "TransferAcceptRequest": {
        "additionalProperties": false,
        "description": "Request body for accepting a transfer offer.\n\n`entry` must preserve every publisher-authored field from the offered\nsnapshot, bind `publisherDid` and its signature key controller to the\nauthenticated recipient, advance the registry sequence, and omit\nregistry-managed `verifiableAttestations`. The recipient must re-sign the\ncomplete canonical publisher payload; the owner's offer signature never\nsubstitutes for the recipient entry signature.",
        "properties": {
          "entry": {
            "$ref": "#/components/schemas/MarsEntry",
            "description": "Complete replacement entry signed by the recipient."
          }
        },
        "required": [
          "entry"
        ],
        "type": "object"
      },
      "TransferDeclineRequest": {
        "additionalProperties": false,
        "description": "Request body for declining a transfer offer.",
        "properties": {
          "reason": {
            "description": "Optional non-authoritative explanation retained in private audit data.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "TransferOffer": {
        "description": "Persisted transfer-offer state returned by transfer endpoints.",
        "properties": {
          "createdAt": {
            "description": "Offer creation time.",
            "format": "date-time",
            "type": "string"
          },
          "entryDid": {
            "description": "Entry whose ownership may change.",
            "type": "string"
          },
          "entrySequence": {
            "description": "Entry sequence signed by the owner.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "expiresAt": {
            "description": "Offer expiry.",
            "format": "date-time",
            "type": "string"
          },
          "offerId": {
            "description": "Registry-generated immutable offer identifier.",
            "type": "string"
          },
          "ownerDid": {
            "description": "Current owner derived from the authenticated principal.",
            "type": "string"
          },
          "ownerSignature": {
            "$ref": "#/components/schemas/EntrySignature",
            "description": "Owner's signature over the offer payload."
          },
          "recipientDid": {
            "description": "Intended recipient.",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TransferOfferStatus",
            "description": "Current state."
          }
        },
        "required": [
          "offerId",
          "entryDid",
          "ownerDid",
          "recipientDid",
          "entrySequence",
          "createdAt",
          "expiresAt",
          "status",
          "ownerSignature"
        ],
        "type": "object"
      },
      "TransferOfferRequest": {
        "additionalProperties": false,
        "description": "Request body for creating a signed transfer offer.",
        "properties": {
          "entrySequence": {
            "description": "Current entry sequence covered by the owner's signature.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "expiresAt": {
            "description": "Server-verifiable expiry for this offer.",
            "format": "date-time",
            "type": "string"
          },
          "recipientDid": {
            "description": "DID invited to become the entry's publisher.",
            "type": "string"
          },
          "signature": {
            "$ref": "#/components/schemas/EntrySignature",
            "description": "Owner signature over the canonical transfer-offer payload."
          }
        },
        "required": [
          "recipientDid",
          "entrySequence",
          "expiresAt",
          "signature"
        ],
        "type": "object"
      },
      "TransferOfferStatus": {
        "description": "Closed transfer-offer state machine.",
        "enum": [
          "offered",
          "accepted",
          "declined",
          "expired"
        ],
        "type": "string"
      },
      "VerifiableAttestationRecord": {
        "description": "Canonical, separately stored OAS verifiable attestation.",
        "properties": {
          "acceptedAt": {
            "description": "Registry acceptance time.",
            "format": "date-time",
            "type": "string"
          },
          "attestationId": {
            "description": "SHA-256 identifier of the JCS-canonical credential.",
            "type": "string"
          },
          "credential": {
            "description": "Canonical OAS Verifiable Credential."
          },
          "entryDid": {
            "description": "Subject entry DID.",
            "type": "string"
          },
          "expiresAt": {
            "description": "Optional credential expiration time.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "issuedAt": {
            "description": "Credential issuance time.",
            "format": "date-time",
            "type": "string"
          },
          "issuerDid": {
            "description": "Issuer DID derived from and bound to the authenticated principal.",
            "type": "string"
          },
          "revokedAt": {
            "description": "Local revocation time, when revoked.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "attestationId",
          "entryDid",
          "issuerDid",
          "credential",
          "issuedAt",
          "acceptedAt"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "siwsCookie": {
        "description": "Secure, HttpOnly SIWS session cookie issued by MARS.",
        "in": "cookie",
        "name": "mars_session",
        "type": "apiKey"
      },
      "siwsSession": {
        "bearerFormat": "opaque MARS session",
        "description": "Opaque capability-bearing MARS session issued by an enabled authentication profile.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "contact": {
      "email": "labs@l1fe.ai",
      "name": "L1fe Labs"
    },
    "description": "Canonical API for mars-server, the sole production MARS registry. Public registry reads require no authentication; deep health requires operator capability. Every authenticated mutation requires a scoped capability and Idempotency-Key.",
    "license": {
      "identifier": "Apache-2.0",
      "name": "Apache-2.0"
    },
    "title": "MARS Registry API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/admin/anchors/{intent_id}/abandon": {
      "post": {
        "operationId": "abandon_anchor",
        "parameters": [
          {
            "description": "Durable anchor intent identifier",
            "in": "path",
            "name": "intent_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Required route-scoped idempotency key",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnchorControlResponse"
                }
              }
            },
            "description": "Intent abandoned"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Admin capability missing"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Intent not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Intent state or idempotency conflict"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "trust"
        ]
      }
    },
    "/v1/admin/anchors/{intent_id}/retry": {
      "post": {
        "operationId": "retry_anchor",
        "parameters": [
          {
            "description": "Durable anchor intent identifier",
            "in": "path",
            "name": "intent_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Required route-scoped idempotency key",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnchorControlResponse"
                }
              }
            },
            "description": "Intent requeued"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Admin capability missing"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Intent not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Intent state or idempotency conflict"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "trust"
        ]
      }
    },
    "/v1/admin/bonds": {
      "post": {
        "operationId": "provision_bond",
        "parameters": [
          {
            "description": "Required route-scoped idempotency key",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BondProvisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bond"
                }
              }
            },
            "description": "Registry-local bond provisioned"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Admin capability missing"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Idempotency conflict"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "trust"
        ]
      }
    },
    "/v1/admin/federation/peers": {
      "get": {
        "operationId": "federation_peer_status",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FederationPeerStatus"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Protected durable peer cursor, breaker, lag, and quarantine status"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operator session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Admin capability required"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "federation"
        ]
      }
    },
    "/v1/anchors/{did}": {
      "get": {
        "description": "Returns a stable keyset page of durable provider-neutral anchor intents, immutable receipts, and the current registry projection.",
        "operationId": "get_anchors",
        "parameters": [
          {
            "description": "OAS DID of the entry",
            "in": "path",
            "name": "did",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Maximum number of anchor records to return. The server clamps this to\nits configured maximum page size.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Opaque URL-safe cursor returned by the preceding page.\n\nThe cursor identifies the last-seen `(sequence, createdAt, intentId)`\ntuple. Clients must echo it unchanged and must not construct cursors.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 2048,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_-]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnchorListResponse"
                }
              }
            },
            "description": "Persisted anchor status in ascending sequence, creation-time, and intent-ID order"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry not found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Read rate limit exceeded"
          }
        },
        "tags": [
          "trust"
        ]
      }
    },
    "/v1/attestations": {
      "post": {
        "description": "Verifies and separately stores a canonical OAS Verifiable Credential.",
        "operationId": "create_attestation",
        "parameters": [
          {
            "description": "Required route-scoped idempotency key",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttestationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifiableAttestationRecord"
                }
              }
            },
            "description": "Stored verified attestation"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Issuer or capability mismatch"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry not found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Write rate limit exceeded"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "trust"
        ]
      }
    },
    "/v1/attestations/{did}": {
      "get": {
        "operationId": "get_attestations",
        "parameters": [
          {
            "description": "OAS DID of the entry",
            "in": "path",
            "name": "did",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Include credentials whose expiration date has passed.",
            "in": "query",
            "name": "includeExpired",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Include credentials revoked in the local registry.",
            "in": "query",
            "name": "includeRevoked",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/VerifiableAttestationRecord"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Verified attestations; expired and revoked omitted by default"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry not found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Read rate limit exceeded"
          }
        },
        "tags": [
          "trust"
        ]
      }
    },
    "/v1/auth/logout": {
      "post": {
        "operationId": "logout",
        "responses": {
          "204": {
            "description": "Session revoked idempotently"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "auth"
        ]
      }
    },
    "/v1/auth/session": {
      "get": {
        "operationId": "session",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiwsSessionResponse"
                }
              }
            },
            "description": "Current SIWS identity"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session missing, expired, or unknown"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "auth"
        ]
      }
    },
    "/v1/auth/siws/challenge": {
      "post": {
        "operationId": "siws_challenge",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiwsChallengeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiwsChallengeResponse"
                }
              }
            },
            "description": "Single-use SIWS challenge"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid challenge request"
          }
        },
        "tags": [
          "auth"
        ]
      }
    },
    "/v1/auth/siws/verify": {
      "post": {
        "operationId": "siws_verify",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiwsVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiwsVerifyResponse"
                }
              }
            },
            "description": "Verified identity and opaque MARS session"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "SIWS verification failed"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "GAL lookup failed"
          }
        },
        "tags": [
          "auth"
        ]
      }
    },
    "/v1/bonds/{bond_id}": {
      "get": {
        "operationId": "get_bond",
        "parameters": [
          {
            "description": "Bond identifier",
            "in": "path",
            "name": "bond_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bond"
                }
              }
            },
            "description": "Bond record"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bond not found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Read rate limit exceeded"
          }
        },
        "tags": [
          "trust"
        ]
      }
    },
    "/v1/discover": {
      "post": {
        "operationId": "discover",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscoverRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarsQueryResult"
                }
              }
            },
            "description": "Discovery results"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid discovery request"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Query body exceeds the explicit admission limit"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Query rate limit exceeded"
          }
        },
        "tags": [
          "discovery"
        ]
      }
    },
    "/v1/discover/federated": {
      "post": {
        "operationId": "discover_federated",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarsQuery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederatedDiscoveryResult"
                }
              }
            },
            "description": "Deterministically merged local and signed peer results with bounded partial metadata"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid query or federated cursor"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Federated discovery capability required"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Query body exceeds the explicit admission limit"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Query rate limit exceeded"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "discovery"
        ]
      }
    },
    "/v1/discover/marsql": {
      "post": {
        "operationId": "discover_marsql",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarsQlRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarsQueryResult"
                }
              }
            },
            "description": "MARS-QL DISCOVER results"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid MARS-QL DISCOVER expression"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Query body exceeds the explicit admission limit"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Query rate limit exceeded"
          }
        },
        "tags": [
          "discovery"
        ]
      }
    },
    "/v1/entries": {
      "post": {
        "operationId": "create_entry",
        "parameters": [
          {
            "description": "Required route-scoped idempotency key",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarsEntry"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarsEntry"
                }
              }
            },
            "description": "Entry created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry validation failed"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "SIWS session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session publisher mismatch"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry already exists"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Write rate limit exceeded"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "entries"
        ]
      }
    },
    "/v1/entries/{did}": {
      "delete": {
        "operationId": "delete_entry",
        "parameters": [
          {
            "description": "OAS DID of the entry",
            "in": "path",
            "name": "did",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Required route-scoped idempotency key",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Entry revoked"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "SIWS session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session publisher mismatch"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry not found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Write rate limit exceeded"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "entries"
        ]
      },
      "get": {
        "operationId": "get_entry",
        "parameters": [
          {
            "description": "OAS DID of the entry",
            "in": "path",
            "name": "did",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarsEntry"
                }
              }
            },
            "description": "Latest entry"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry not found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Read rate limit exceeded"
          }
        },
        "tags": [
          "entries"
        ]
      },
      "put": {
        "operationId": "update_entry",
        "parameters": [
          {
            "description": "OAS DID of the entry",
            "in": "path",
            "name": "did",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Required route-scoped idempotency key",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarsEntry"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarsEntry"
                }
              }
            },
            "description": "Entry updated"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry validation failed"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "SIWS session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session publisher mismatch"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Sequence or lifecycle conflict"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Write rate limit exceeded"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "entries"
        ]
      }
    },
    "/v1/entries/{did}/lineage": {
      "get": {
        "operationId": "get_entry_lineage",
        "parameters": [
          {
            "description": "OAS DID of the entry",
            "in": "path",
            "name": "did",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryLineageResponse"
                }
              }
            },
            "description": "Canonical lineage summary; lineage is null when absent"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry not found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Read rate limit exceeded"
          }
        },
        "tags": [
          "entries"
        ]
      }
    },
    "/v1/entries/{did}/versions": {
      "get": {
        "operationId": "list_entry_versions",
        "parameters": [
          {
            "description": "OAS DID of the entry",
            "in": "path",
            "name": "did",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Maximum number of versions to return. The server clamps this to its\nconfigured maximum page size.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Registry sequence of the last version returned by the preceding page.\n\nClients must treat the value as opaque and echo it unchanged.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "pattern": "^[1-9][0-9]*$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryVersionsResponse"
                }
              }
            },
            "description": "Bounded version page in stable newest-first sequence order"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry not found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Read rate limit exceeded"
          }
        },
        "tags": [
          "entries"
        ]
      }
    },
    "/v1/entries/{did}/versions/{version}": {
      "get": {
        "operationId": "get_entry_version",
        "parameters": [
          {
            "description": "OAS DID of the entry",
            "in": "path",
            "name": "did",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Semantic version",
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarsEntry"
                }
              }
            },
            "description": "Specific entry version"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry version not found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Read rate limit exceeded"
          }
        },
        "tags": [
          "entries"
        ]
      }
    },
    "/v1/federation/discover": {
      "post": {
        "description": "Serves a typed MARS-QL query only after signed-envelope verification, replay protection, and active agreement authorization.",
        "operationId": "federation_discover",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignedFederationEnvelope_FederatedDiscoveryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFederationEnvelope_FederatedDiscoveryResponse"
                }
              }
            },
            "description": "Signed peer discovery response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Envelope signature, timestamp, nonce, or controller invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Peer or agreement not authorized"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Signed federation body exceeds the explicit admission limit"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Federation rate limit exceeded"
          }
        },
        "tags": [
          "federation"
        ]
      }
    },
    "/v1/federation/peers": {
      "get": {
        "operationId": "list_federation_peers",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FederationPeer"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Canonical federation peer list"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Read rate limit exceeded"
          }
        },
        "tags": [
          "federation"
        ]
      }
    },
    "/v1/federation/peers/self": {
      "put": {
        "operationId": "update_federation_peer",
        "parameters": [
          {
            "description": "Required route-scoped idempotency key",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FederationPeerUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FederationPeer"
                }
              }
            },
            "description": "Principal-bound peer metadata"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Federation capability missing"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "federation"
        ]
      }
    },
    "/v1/federation/sync": {
      "post": {
        "description": "Returns local changes only after OAS service identity, JCS Ed25519 envelope, durable nonce, and active agreement verification.",
        "operationId": "federation_sync",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignedFederationEnvelope_SyncRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedFederationEnvelope_SyncResponse"
                }
              }
            },
            "description": "Signed federation synchronization batch"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Envelope signature, timestamp, nonce, or controller invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unknown peer, agreement, or capability"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Signed federation body exceeds the explicit admission limit"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Write rate limit exceeded"
          }
        },
        "tags": [
          "federation"
        ]
      }
    },
    "/v1/health": {
      "get": {
        "operationId": "health",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            },
            "description": "Shallow service health"
          }
        },
        "tags": [
          "operations"
        ]
      }
    },
    "/v1/health/deep": {
      "get": {
        "operationId": "deep_health",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeepHealthResponse"
                }
              }
            },
            "description": "Operator subsystem health; inspect the body status"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Operator session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Admin capability required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Read rate limit exceeded"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "operations"
        ]
      }
    },
    "/v1/registries": {
      "get": {
        "description": "Compatibility alias with the exact response body of GET /v1/federation/peers.",
        "operationId": "list_registries_alias",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FederationPeer"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Federation peer list"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Read rate limit exceeded"
          }
        },
        "tags": [
          "federation"
        ]
      }
    },
    "/v1/report": {
      "post": {
        "description": "Records a report whose reporter is derived from Principal.",
        "operationId": "create_report",
        "parameters": [
          {
            "description": "Required route-scoped idempotency key",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResponse"
                }
              }
            },
            "description": "Report accepted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Report capability missing"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry not found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Write rate limit exceeded"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "trust"
        ]
      }
    },
    "/v1/transfers/offers/{offer_id}": {
      "get": {
        "operationId": "get_transfer_offer",
        "parameters": [
          {
            "description": "Transfer offer identifier",
            "in": "path",
            "name": "offer_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOffer"
                }
              }
            },
            "description": "Transfer offer"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Offer not found"
          }
        },
        "tags": [
          "entries"
        ]
      }
    },
    "/v1/transfers/offers/{offer_id}/accept": {
      "post": {
        "operationId": "accept_transfer_offer",
        "parameters": [
          {
            "description": "Transfer offer identifier",
            "in": "path",
            "name": "offer_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Required route-scoped idempotency key",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferAcceptRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarsEntry"
                }
              }
            },
            "description": "Recipient-signed transferred entry"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Recipient or capability mismatch"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Offer expired or entry changed"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "entries"
        ]
      }
    },
    "/v1/transfers/offers/{offer_id}/decline": {
      "post": {
        "operationId": "decline_transfer_offer",
        "parameters": [
          {
            "description": "Transfer offer identifier",
            "in": "path",
            "name": "offer_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Required route-scoped idempotency key",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferDeclineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOffer"
                }
              }
            },
            "description": "Declined transfer offer"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Recipient or capability mismatch"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Offer expired or already decided"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "entries"
        ]
      }
    },
    "/v1/transfers/{did}/offers": {
      "post": {
        "description": "Creates a signed, expiring offer without changing entry ownership.",
        "operationId": "transfer_entry",
        "parameters": [
          {
            "description": "OAS DID of the entry",
            "in": "path",
            "name": "did",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Required route-scoped idempotency key",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferOfferRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOffer"
                }
              }
            },
            "description": "Transfer offer created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Session missing or invalid"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Current owner or capability mismatch"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Entry not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Live offer or sequence conflict"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Write rate limit exceeded"
          }
        },
        "security": [
          {
            "siwsSession": []
          },
          {
            "siwsCookie": []
          }
        ],
        "tags": [
          "entries"
        ]
      }
    },
    "/v1/ws": {
      "get": {
        "operationId": "websocket",
        "responses": {
          "101": {
            "description": "WebSocket protocol upgrade"
          }
        },
        "tags": [
          "operations"
        ]
      }
    }
  },
  "tags": [
    {
      "description": "Registry entry lifecycle and history",
      "name": "entries"
    },
    {
      "description": "Structured and MARS-QL DISCOVER queries",
      "name": "discovery"
    },
    {
      "description": "Sign-In-With-Sigil session profile",
      "name": "auth"
    },
    {
      "description": "Registry peering and synchronization",
      "name": "federation"
    },
    {
      "description": "Anchors, bonds, attestations, and reports",
      "name": "trust"
    },
    {
      "description": "Health and event-stream endpoints",
      "name": "operations"
    }
  ],
  "x-mars-auth-profiles": {
    "arsenalAct": {
      "note": "No Arsenal ACT security scheme is reserved in MARS v1 until an enforcing adapter lands.",
      "status": "not-shipped"
    },
    "production": {
      "identity": "actor, issuer, reporter, owner, and peer identities are derived from Principal",
      "mutations": "capability-bearing bearer session or mars_session cookie plus Idempotency-Key",
      "read": "public registry reads; deep health requires admin capability"
    }
  }
}
