{ "openapi": "3.1.2", "info": { "title": "Agent Bridge Gateway", "description": "Let AI agents message each other and hand off work across tools, sessions, and machines.", "version": "2.1", "license": { "name": "Apache-2.0", "identifier": "Apache-2.0" } }, "servers": [ { "url": "/" } ], "x-agent-bridge-protocol-versions": [ "2.0", "2.1" ], "x-agent-bridge-openapi-protocol-version": "2.1", "x-agent-bridge-protocol-2.0": { "description": "Limited schema metadata for the released headerless 0.2.0 compatibility contract derived from d8184fe. This is not a complete OpenAPI route description. It does not support project, deliveryPolicy, delivery management/listing, or current delivery bookkeeping fields.", "requestSchemas": { "publish_message": "#/x-agent-bridge-schemas-2.0/MessageDraft" }, "responseSchemas": { "message": "#/x-agent-bridge-schemas-2.0/Message", "delivery": "#/x-agent-bridge-schemas-2.0/Delivery" } }, "x-agent-bridge-schemas-2.0": { "MessageDraft": { "type": "object", "required": [ "type", "content" ], "properties": { "id": { "type": "string" }, "source": { "type": "string" }, "type": { "type": "string" }, "content": { "type": "string" }, "contentType": { "type": "string" }, "data": {}, "targets": { "type": "array", "items": { "type": "string" } }, "threadId": { "type": "string" }, "replyToId": { "type": "string" }, "correlationId": { "type": "string" }, "causationId": { "type": "string" }, "priority": { "enum": [ "info", "high", "urgent" ] }, "expiresAt": { "type": "string" }, "idempotencyKey": { "type": "string" }, "atribReceiptId": { "type": "string" }, "informedBy": { "type": "array", "items": { "type": "string" } }, "metadata": {} }, "additionalProperties": false }, "Message": { "type": "object", "required": [ "id", "workspace", "source", "type", "content", "contentType", "sequence", "createdAt", "targets", "priority" ], "properties": { "id": { "type": "string" }, "workspace": { "type": "string" }, "source": { "type": "string" }, "type": { "type": "string" }, "content": { "type": "string" }, "contentType": { "type": "string" }, "sequence": { "type": "string" }, "createdAt": { "type": "string" }, "data": {}, "targets": { "type": "array", "items": { "type": "string" } }, "threadId": { "type": "string" }, "replyToId": { "type": "string" }, "correlationId": { "type": "string" }, "causationId": { "type": "string" }, "priority": { "enum": [ "info", "high", "urgent" ] }, "expiresAt": { "type": "string" }, "idempotencyKey": { "type": "string" }, "atribReceiptId": { "type": "string" }, "informedBy": { "type": "array", "items": { "type": "string" } }, "metadata": {} }, "additionalProperties": true }, "Delivery": { "type": "object", "required": [ "id", "messageId", "workspace", "recipient", "state", "attempt", "availableAt" ], "properties": { "id": { "type": "string" }, "messageId": { "type": "string" }, "workspace": { "type": "string" }, "recipient": { "type": "string" }, "state": { "enum": [ "pending", "claimed", "acked", "retrying", "dead" ] }, "attempt": { "type": "number" }, "availableAt": { "type": "string" }, "leaseToken": { "type": "string" }, "leaseOwner": { "type": "string" }, "leaseExpiresAt": { "type": "string" }, "lastError": { "type": "string" } }, "additionalProperties": true } }, "x-agent-bridge-scope-enforcement": true, "paths": { "/v2/capabilities": { "get": { "operationId": "capabilities", "summary": "Discover operations available on the current surface.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } } ], "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "protocolVersion", "currentProtocolVersion", "selectedProtocolVersion", "supportedProtocolVersions", "scopeEnforcement", "requestAuthority", "rowIsolation", "authorizationModel", "surface", "provider", "operations" ], "properties": { "protocolVersion": { "type": "string" }, "currentProtocolVersion": { "type": "string" }, "selectedProtocolVersion": { "type": "string" }, "supportedProtocolVersions": { "type": "array", "items": { "type": "string" } }, "scopeEnforcement": { "type": "boolean" }, "requestAuthority": { "type": "boolean" }, "rowIsolation": { "type": "boolean" }, "authorizationModel": { "enum": [ "scoped-credential", "credential-wide", "process-identity" ] }, "surface": { "enum": [ "mcp", "http", "cli" ] }, "provider": { "enum": [ "local", "gateway" ] }, "implementationVersion": { "type": "string" }, "implementationRevision": { "type": "string", "pattern": "^[0-9a-f]{7,40}$" }, "grantedScopes": { "type": "array", "items": { "type": "string" } }, "operations": { "type": "array", "items": { "type": "object", "required": [ "id", "summary", "requiredScopes" ], "properties": { "id": { "type": "string" }, "summary": { "type": "string" }, "requiredScopes": { "type": "array", "items": { "type": "string" } }, "mcp": {}, "http": {}, "cli": {} }, "additionalProperties": true } } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/status": { "get": { "operationId": "status", "summary": "Read gateway delivery diagnostics.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "status:read" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } } ], "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "schemaVersion", "deliverySupported", "pending", "claimed", "retrying", "dead" ], "properties": { "schemaVersion": { "enum": [ "local-v2", "postgres-v2" ] }, "deliverySupported": { "type": "boolean" }, "pending": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "claimed": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "retrying": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "dead": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "cancelled": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "oldestAvailableAt": { "type": "string" }, "due": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "scheduled": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "expiredLeases": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "oldestDueAt": { "type": "string" }, "queueLagMs": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "gatewayAuthorityId": { "type": "string" }, "credentialId": { "type": "string" }, "principal": { "type": "object", "required": [ "workspace", "agent" ], "properties": { "workspace": { "type": "string" }, "agent": { "type": "string" } }, "additionalProperties": true } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/endpoint-migration-challenges": { "post": { "operationId": "issue_endpoint_migration_challenge", "summary": "Issue a short-lived endpoint migration challenge commitment.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "challenge", "expectedGatewayAuthorityId", "verifierCredentialId" ], "properties": { "challenge": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "expectedGatewayAuthorityId": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, "verifierCredentialId": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "gatewayAuthorityId", "issuerCredentialId", "verifierCredentialId", "expiresAt" ], "properties": { "gatewayAuthorityId": { "type": "string" }, "issuerCredentialId": { "type": "string" }, "verifierCredentialId": { "type": "string" }, "expiresAt": { "type": "string" } }, "additionalProperties": false } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/endpoint-migration-challenges/consume": { "post": { "operationId": "consume_endpoint_migration_challenge", "summary": "Consume a short-lived endpoint migration challenge commitment.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "challenge", "expectedGatewayAuthorityId", "issuerCredentialId" ], "properties": { "challenge": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "expectedGatewayAuthorityId": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, "issuerCredentialId": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "gatewayAuthorityId", "issuerCredentialId", "verifierCredentialId", "expiresAt", "consumed" ], "properties": { "gatewayAuthorityId": { "type": "string" }, "issuerCredentialId": { "type": "string" }, "verifierCredentialId": { "type": "string" }, "expiresAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "consumed": { "type": "boolean" } }, "additionalProperties": false } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/metrics": { "get": { "operationId": "gateway_metrics", "summary": "Read Prometheus gateway counters.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "gateway:metrics" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } } ], "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "text/plain": { "schema": { "type": "string" } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/messages": { "post": { "operationId": "publish_message", "summary": "Create an immutable Agent Bridge v2 message.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "messages:write" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "type", "content" ], "properties": { "id": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, "source": { "type": "string" }, "project": { "type": "string" }, "type": { "type": "string" }, "content": { "type": "string" }, "contentType": { "type": "string" }, "data": {}, "targets": { "type": "array", "items": { "type": "string" } }, "threadId": { "type": "string" }, "replyToId": { "type": "string" }, "correlationId": { "type": "string" }, "causationId": { "type": "string" }, "priority": { "enum": [ "info", "high", "urgent" ] }, "expiresAt": { "type": "string" }, "idempotencyKey": { "type": "string" }, "atribReceiptId": { "type": "string" }, "informedBy": { "type": "array", "items": { "type": "string" } }, "metadata": {}, "deliveryPolicy": { "type": "object", "properties": { "mode": { "enum": [ "mailbox", "leased" ] }, "maxAttempts": { "type": "number" }, "retryBaseDelayMs": { "type": "number" }, "retryMaxDelayMs": { "type": "number" }, "retryJitterRatio": { "type": "number" }, "notBefore": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false } } } }, "responses": { "201": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "created", "message" ], "properties": { "created": { "type": "boolean" }, "message": { "type": "object", "required": [ "id", "workspace", "source", "type", "content", "contentType", "sequence", "createdAt", "targets", "priority", "deliveryPolicy" ], "properties": { "id": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "source": { "type": "string" }, "type": { "type": "string" }, "content": { "type": "string" }, "contentType": { "type": "string" }, "sequence": { "type": "string" }, "createdAt": { "type": "string" }, "data": {}, "targets": { "type": "array", "items": { "type": "string" } }, "threadId": { "type": "string" }, "replyToId": { "type": "string" }, "correlationId": { "type": "string" }, "causationId": { "type": "string" }, "priority": { "enum": [ "info", "high", "urgent" ] }, "expiresAt": { "type": "string" }, "idempotencyKey": { "type": "string" }, "atribReceiptId": { "type": "string" }, "informedBy": { "type": "array", "items": { "type": "string" } }, "metadata": {}, "deliveryPolicy": { "anyOf": [ { "type": "object", "required": [ "mode" ], "properties": { "mode": { "type": "string", "const": "mailbox" } }, "additionalProperties": false }, { "type": "object", "required": [ "mode", "maxAttempts", "retryBaseDelayMs", "retryMaxDelayMs", "retryJitterRatio" ], "properties": { "mode": { "type": "string", "const": "leased" }, "maxAttempts": { "type": "number" }, "retryBaseDelayMs": { "type": "number" }, "retryMaxDelayMs": { "type": "number" }, "retryJitterRatio": { "type": "number" }, "notBefore": { "type": "string" } }, "additionalProperties": false } ] } }, "additionalProperties": true }, "disposition": { "enum": [ "committed", "queued" ] }, "authoritative": { "type": "boolean" } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/history": { "get": { "operationId": "history", "summary": "Read visible messages after an opaque cursor.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "messages:read" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "number", "minimum": 1, "maximum": 200 } }, { "name": "type", "in": "query", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "mailbox", "in": "query", "required": false, "schema": { "enum": [ "inbox", "sent", "all" ] } }, { "name": "receiptState", "in": "query", "required": false, "schema": { "enum": [ "any", "unread", "read" ] } }, { "name": "includeExpired", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "source", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "project", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "since", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "unacknowledgedBy", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "unacked_by", "in": "query", "required": false, "deprecated": true, "description": "Compatibility alias for unacknowledgedBy.", "schema": { "type": "string" } }, { "name": "threadId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "latest", "in": "query", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "messages" ], "properties": { "messages": { "type": "array", "items": { "type": "object", "required": [ "id", "workspace", "source", "type", "content", "contentType", "sequence", "createdAt", "targets", "priority", "deliveryPolicy" ], "properties": { "id": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "source": { "type": "string" }, "type": { "type": "string" }, "content": { "type": "string" }, "contentType": { "type": "string" }, "sequence": { "type": "string" }, "createdAt": { "type": "string" }, "data": {}, "targets": { "type": "array", "items": { "type": "string" } }, "threadId": { "type": "string" }, "replyToId": { "type": "string" }, "correlationId": { "type": "string" }, "causationId": { "type": "string" }, "priority": { "enum": [ "info", "high", "urgent" ] }, "expiresAt": { "type": "string" }, "idempotencyKey": { "type": "string" }, "atribReceiptId": { "type": "string" }, "informedBy": { "type": "array", "items": { "type": "string" } }, "metadata": {}, "deliveryPolicy": { "anyOf": [ { "type": "object", "required": [ "mode" ], "properties": { "mode": { "type": "string", "const": "mailbox" } }, "additionalProperties": false }, { "type": "object", "required": [ "mode", "maxAttempts", "retryBaseDelayMs", "retryMaxDelayMs", "retryJitterRatio" ], "properties": { "mode": { "type": "string", "const": "leased" }, "maxAttempts": { "type": "number" }, "retryBaseDelayMs": { "type": "number" }, "retryMaxDelayMs": { "type": "number" }, "retryJitterRatio": { "type": "number" }, "notBefore": { "type": "string" } }, "additionalProperties": false } ] } }, "additionalProperties": true } }, "cursor": { "type": "string" }, "source": { "enum": [ "remote", "cache" ] }, "stale": { "type": "boolean" }, "degraded": { "type": "boolean" }, "acknowledgements": { "enum": [ "authoritative", "unknown" ] }, "lastSyncedAt": { "type": "string" } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/receipts": { "post": { "operationId": "record_receipt", "summary": "Record caller-bound inbox read receipts.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "receipts:write" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "messageIds" ], "properties": { "messageIds": { "type": "array", "items": { "type": "string" }, "minItems": 1, "maxItems": 200 } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "recorded" ], "properties": { "recorded": { "type": "number" } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/deliveries/claim": { "post": { "operationId": "claim_delivery", "summary": "Atomically claim the next targeted delivery, or one eligible message when requested.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "deliveries:claim" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "leaseMs": { "type": "number" }, "messageId": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, "maxAttempts": { "type": "number" } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "delivery" ], "properties": { "delivery": { "anyOf": [ { "type": "object", "required": [ "id", "messageId", "workspace", "recipient", "state", "attempt", "cycleAttempt", "requeueCount", "createdAt", "priorityRank", "availableAt", "lastAction" ], "properties": { "id": { "type": "string" }, "messageId": { "type": "string" }, "workspace": { "type": "string" }, "recipient": { "type": "string" }, "state": { "enum": [ "pending", "claimed", "acked", "retrying", "dead", "cancelled" ] }, "attempt": { "type": "number" }, "cycleAttempt": { "type": "number" }, "requeueCount": { "type": "number" }, "createdAt": { "type": "string" }, "priorityRank": { "type": "number" }, "availableAt": { "type": "string" }, "leaseToken": { "type": "string" }, "leaseOwner": { "type": "string" }, "leaseExpiresAt": { "type": "string" }, "lastError": { "type": "string" }, "lastActor": { "type": "string" }, "lastAction": { "enum": [ "created", "claim", "ack", "nack_retry", "nack_dead", "lease_expired", "attempts_exhausted", "message_expired", "cancel", "requeue" ] } }, "additionalProperties": true }, { "type": "null" } ] }, "leaseToken": { "type": "string" } }, "additionalProperties": true, "oneOf": [ { "properties": { "delivery": { "type": "null" }, "leaseToken": false }, "required": [ "delivery" ] }, { "properties": { "delivery": { "type": "object", "required": [ "id", "messageId", "workspace", "recipient", "state", "attempt", "cycleAttempt", "requeueCount", "createdAt", "priorityRank", "availableAt", "lastAction" ], "properties": { "id": { "type": "string" }, "messageId": { "type": "string" }, "workspace": { "type": "string" }, "recipient": { "type": "string" }, "state": { "enum": [ "pending", "claimed", "acked", "retrying", "dead", "cancelled" ] }, "attempt": { "type": "number" }, "cycleAttempt": { "type": "number" }, "requeueCount": { "type": "number" }, "createdAt": { "type": "string" }, "priorityRank": { "type": "number" }, "availableAt": { "type": "string" }, "leaseToken": { "type": "string" }, "leaseOwner": { "type": "string" }, "leaseExpiresAt": { "type": "string" }, "lastError": { "type": "string" }, "lastActor": { "type": "string" }, "lastAction": { "enum": [ "created", "claim", "ack", "nack_retry", "nack_dead", "lease_expired", "attempts_exhausted", "message_expired", "cancel", "requeue" ] } }, "additionalProperties": true }, "leaseToken": { "type": "string" } }, "required": [ "delivery", "leaseToken" ] } ] } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/deliveries": { "get": { "operationId": "list_deliveries", "summary": "List caller-visible deliveries.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "deliveries:read" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "number" } }, { "name": "role", "in": "query", "required": false, "schema": { "enum": [ "recipient", "publisher", "all" ] } }, { "name": "messageId", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "recipient", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "state", "in": "query", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "enum": [ "pending", "claimed", "acked", "retrying", "dead", "cancelled" ] } } } ], "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "deliveries" ], "properties": { "deliveries": { "type": "array", "items": { "type": "object", "required": [ "id", "messageId", "workspace", "recipient", "state", "attempt", "cycleAttempt", "requeueCount", "createdAt", "priorityRank", "availableAt", "lastAction" ], "properties": { "id": { "type": "string" }, "messageId": { "type": "string" }, "workspace": { "type": "string" }, "recipient": { "type": "string" }, "state": { "enum": [ "pending", "claimed", "acked", "retrying", "dead", "cancelled" ] }, "attempt": { "type": "number" }, "cycleAttempt": { "type": "number" }, "requeueCount": { "type": "number" }, "createdAt": { "type": "string" }, "priorityRank": { "type": "number" }, "availableAt": { "type": "string" }, "leaseToken": { "type": "string" }, "leaseOwner": { "type": "string" }, "leaseExpiresAt": { "type": "string" }, "lastError": { "type": "string" }, "lastActor": { "type": "string" }, "lastAction": { "enum": [ "created", "claim", "ack", "nack_retry", "nack_dead", "lease_expired", "attempts_exhausted", "message_expired", "cancel", "requeue" ] } }, "additionalProperties": true } }, "cursor": { "type": "string" } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/deliveries/{deliveryId}/events": { "get": { "operationId": "list_delivery_events", "summary": "List the append-only event history for a delivery.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "deliveries:read" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } }, { "name": "deliveryId", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "events" ], "properties": { "events": { "type": "array", "items": { "type": "object", "required": [ "sequence", "deliveryId", "messageId", "workspace", "recipient", "toState", "attempt", "cycleAttempt", "requeueCount", "actor", "action", "createdAt" ], "properties": { "sequence": { "type": "string" }, "deliveryId": { "type": "string" }, "messageId": { "type": "string" }, "workspace": { "type": "string" }, "recipient": { "type": "string" }, "fromState": { "enum": [ "pending", "claimed", "acked", "retrying", "dead", "cancelled" ] }, "toState": { "enum": [ "pending", "claimed", "acked", "retrying", "dead", "cancelled" ] }, "attempt": { "type": "number" }, "cycleAttempt": { "type": "number" }, "requeueCount": { "type": "number" }, "leaseOwner": { "type": "string" }, "error": { "type": "string" }, "actor": { "type": "string" }, "action": { "enum": [ "created", "claim", "ack", "nack_retry", "nack_dead", "lease_expired", "attempts_exhausted", "message_expired", "cancel", "requeue" ] }, "createdAt": { "type": "string" } }, "additionalProperties": true } }, "cursor": { "type": "string" } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/deliveries/{deliveryId}/cancel": { "post": { "operationId": "cancel_delivery", "summary": "Cancel a delivery as its publisher.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "deliveries:manage" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } }, { "name": "deliveryId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "delivery" ], "properties": { "delivery": { "anyOf": [ { "type": "object", "required": [ "id", "messageId", "workspace", "recipient", "state", "attempt", "cycleAttempt", "requeueCount", "createdAt", "priorityRank", "availableAt", "lastAction" ], "properties": { "id": { "type": "string" }, "messageId": { "type": "string" }, "workspace": { "type": "string" }, "recipient": { "type": "string" }, "state": { "enum": [ "pending", "claimed", "acked", "retrying", "dead", "cancelled" ] }, "attempt": { "type": "number" }, "cycleAttempt": { "type": "number" }, "requeueCount": { "type": "number" }, "createdAt": { "type": "string" }, "priorityRank": { "type": "number" }, "availableAt": { "type": "string" }, "leaseToken": { "type": "string" }, "leaseOwner": { "type": "string" }, "leaseExpiresAt": { "type": "string" }, "lastError": { "type": "string" }, "lastActor": { "type": "string" }, "lastAction": { "enum": [ "created", "claim", "ack", "nack_retry", "nack_dead", "lease_expired", "attempts_exhausted", "message_expired", "cancel", "requeue" ] } }, "additionalProperties": true }, { "type": "null" } ] } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/deliveries/{deliveryId}/requeue": { "post": { "operationId": "requeue_delivery", "summary": "Requeue a delivery as its publisher.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "deliveries:manage" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } }, { "name": "deliveryId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "delivery" ], "properties": { "delivery": { "anyOf": [ { "type": "object", "required": [ "id", "messageId", "workspace", "recipient", "state", "attempt", "cycleAttempt", "requeueCount", "createdAt", "priorityRank", "availableAt", "lastAction" ], "properties": { "id": { "type": "string" }, "messageId": { "type": "string" }, "workspace": { "type": "string" }, "recipient": { "type": "string" }, "state": { "enum": [ "pending", "claimed", "acked", "retrying", "dead", "cancelled" ] }, "attempt": { "type": "number" }, "cycleAttempt": { "type": "number" }, "requeueCount": { "type": "number" }, "createdAt": { "type": "string" }, "priorityRank": { "type": "number" }, "availableAt": { "type": "string" }, "leaseToken": { "type": "string" }, "leaseOwner": { "type": "string" }, "leaseExpiresAt": { "type": "string" }, "lastError": { "type": "string" }, "lastActor": { "type": "string" }, "lastAction": { "enum": [ "created", "claim", "ack", "nack_retry", "nack_dead", "lease_expired", "attempts_exhausted", "message_expired", "cancel", "requeue" ] } }, "additionalProperties": true }, { "type": "null" } ] } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/deliveries/{deliveryId}/extend": { "post": { "operationId": "extend_delivery", "summary": "Extend a claimed delivery lease.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "deliveries:settle" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } }, { "name": "deliveryId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "leaseToken", "leaseMs" ], "properties": { "leaseToken": { "type": "string" }, "leaseMs": { "type": "number" } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "delivery" ], "properties": { "delivery": { "anyOf": [ { "type": "object", "required": [ "id", "messageId", "workspace", "recipient", "state", "attempt", "cycleAttempt", "requeueCount", "createdAt", "priorityRank", "availableAt", "lastAction" ], "properties": { "id": { "type": "string" }, "messageId": { "type": "string" }, "workspace": { "type": "string" }, "recipient": { "type": "string" }, "state": { "enum": [ "pending", "claimed", "acked", "retrying", "dead", "cancelled" ] }, "attempt": { "type": "number" }, "cycleAttempt": { "type": "number" }, "requeueCount": { "type": "number" }, "createdAt": { "type": "string" }, "priorityRank": { "type": "number" }, "availableAt": { "type": "string" }, "leaseToken": { "type": "string" }, "leaseOwner": { "type": "string" }, "leaseExpiresAt": { "type": "string" }, "lastError": { "type": "string" }, "lastActor": { "type": "string" }, "lastAction": { "enum": [ "created", "claim", "ack", "nack_retry", "nack_dead", "lease_expired", "attempts_exhausted", "message_expired", "cancel", "requeue" ] } }, "additionalProperties": true }, { "type": "null" } ] } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/deliveries/{deliveryId}/ack": { "post": { "operationId": "acknowledge_delivery", "summary": "Settle a claimed delivery successfully.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "deliveries:settle" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } }, { "name": "deliveryId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "leaseToken" ], "properties": { "leaseToken": { "type": "string" } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "delivery" ], "properties": { "delivery": { "anyOf": [ { "type": "object", "required": [ "id", "messageId", "workspace", "recipient", "state", "attempt", "cycleAttempt", "requeueCount", "createdAt", "priorityRank", "availableAt", "lastAction" ], "properties": { "id": { "type": "string" }, "messageId": { "type": "string" }, "workspace": { "type": "string" }, "recipient": { "type": "string" }, "state": { "enum": [ "pending", "claimed", "acked", "retrying", "dead", "cancelled" ] }, "attempt": { "type": "number" }, "cycleAttempt": { "type": "number" }, "requeueCount": { "type": "number" }, "createdAt": { "type": "string" }, "priorityRank": { "type": "number" }, "availableAt": { "type": "string" }, "leaseToken": { "type": "string" }, "leaseOwner": { "type": "string" }, "leaseExpiresAt": { "type": "string" }, "lastError": { "type": "string" }, "lastActor": { "type": "string" }, "lastAction": { "enum": [ "created", "claim", "ack", "nack_retry", "nack_dead", "lease_expired", "attempts_exhausted", "message_expired", "cancel", "requeue" ] } }, "additionalProperties": true }, { "type": "null" } ] } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/deliveries/{deliveryId}/nack": { "post": { "operationId": "negative_acknowledge_delivery", "summary": "Settle a claimed delivery for retry or dead letter.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "deliveries:settle" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } }, { "name": "deliveryId", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "leaseToken", "error" ], "properties": { "leaseToken": { "type": "string" }, "error": { "type": "string" }, "disposition": { "enum": [ "retry", "dead" ] }, "dead": { "type": "boolean" }, "retryPolicy": { "type": "object", "properties": { "maxAttempts": { "type": "number" }, "baseDelayMs": { "type": "number" }, "maxDelayMs": { "type": "number" }, "jitterRatio": { "type": "number" } }, "additionalProperties": false } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "delivery" ], "properties": { "delivery": { "anyOf": [ { "type": "object", "required": [ "id", "messageId", "workspace", "recipient", "state", "attempt", "cycleAttempt", "requeueCount", "createdAt", "priorityRank", "availableAt", "lastAction" ], "properties": { "id": { "type": "string" }, "messageId": { "type": "string" }, "workspace": { "type": "string" }, "recipient": { "type": "string" }, "state": { "enum": [ "pending", "claimed", "acked", "retrying", "dead", "cancelled" ] }, "attempt": { "type": "number" }, "cycleAttempt": { "type": "number" }, "requeueCount": { "type": "number" }, "createdAt": { "type": "string" }, "priorityRank": { "type": "number" }, "availableAt": { "type": "string" }, "leaseToken": { "type": "string" }, "leaseOwner": { "type": "string" }, "leaseExpiresAt": { "type": "string" }, "lastError": { "type": "string" }, "lastActor": { "type": "string" }, "lastAction": { "enum": [ "created", "claim", "ack", "nack_retry", "nack_dead", "lease_expired", "attempts_exhausted", "message_expired", "cancel", "requeue" ] } }, "additionalProperties": true }, { "type": "null" } ] } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/presence/heartbeat": { "post": { "operationId": "heartbeat", "summary": "Publish a leased runtime presence record.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "presence:write" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "leaseMs": { "type": "number", "minimum": 1000, "maximum": 900000 }, "runtimeType": { "type": "string" }, "capabilities": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "workspace", "agent", "instance", "capabilities", "leaseExpiresAt", "lastSeenAt" ], "properties": { "workspace": { "type": "string" }, "agent": { "type": "string" }, "instance": { "type": "string" }, "runtimeType": { "type": "string" }, "capabilities": { "type": "array", "items": { "type": "string" } }, "leaseExpiresAt": { "type": "string" }, "lastSeenAt": { "type": "string" } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } }, "/v2/presence": { "get": { "operationId": "presence", "summary": "List active agent runtime instances.", "security": [ { "bearerAuth": [] } ], "x-agent-bridge-required-scopes": [ "presence:read" ], "x-agent-bridge-scope-enforcement": true, "parameters": [ { "name": "x-agent-bridge-protocol-version", "in": "header", "required": true, "description": "This OpenAPI operation describes protocol 2.1. Headerless protocol 2.0 uses the separate schemas named by x-agent-bridge-protocol-2.0.", "schema": { "type": "string", "enum": [ "2.1" ] } } ], "responses": { "200": { "description": "Successful response.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "type": "object", "required": [ "agents" ], "properties": { "agents": { "type": "array", "items": { "type": "object", "required": [ "workspace", "agent", "instance", "capabilities", "leaseExpiresAt", "lastSeenAt" ], "properties": { "workspace": { "type": "string" }, "agent": { "type": "string" }, "instance": { "type": "string" }, "runtimeType": { "type": "string" }, "capabilities": { "type": "array", "items": { "type": "string" } }, "leaseExpiresAt": { "type": "string" }, "lastSeenAt": { "type": "string" } }, "additionalProperties": true } } }, "additionalProperties": true } } } }, "400": { "description": "The request does not match the operation contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "401": { "description": "The bearer credential is missing or invalid.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "403": { "description": "The credential cannot access the requested principal or origin.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "404": { "description": "The route or requested resource does not exist.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "409": { "description": "The request conflicts with current delivery or idempotency state.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "413": { "description": "The request body exceeds the configured limit.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "415": { "description": "The request content type is not application/json.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "426": { "description": "The requested protocol version is unsupported.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "429": { "description": "The gateway has rate-limited the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "500": { "description": "The gateway could not complete the request.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "502": { "description": "The upstream response does not match the selected protocol contract.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "503": { "description": "The backing service is unavailable.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } }, "504": { "description": "The request exceeded the gateway deadline.", "headers": { "x-agent-bridge-protocol-version": { "description": "Selected Agent Bridge protocol version.", "required": true, "schema": { "type": "string", "enum": [ "2.0", "2.1" ] } }, "x-agent-bridge-supported-protocol-versions": { "description": "Comma-separated protocol versions supported by this gateway.", "required": true, "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorEnvelope" } } } } } } } }, "components": { "schemas": { "ErrorEnvelope": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "required": [ "code", "requestId" ], "properties": { "code": { "type": "string" }, "requestId": { "type": "string" }, "message": { "type": "string" }, "operation": { "type": "string" }, "issues": { "type": "array", "items": { "type": "object", "required": [ "path", "message" ], "properties": { "path": { "type": "string" }, "message": { "type": "string" } }, "additionalProperties": true } }, "details": {}, "supportedProtocolVersions": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": true } }, "additionalProperties": true } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer" } } } }