From 0330bc63ad3e4949f9a02947b042b72a69d99b5f Mon Sep 17 00:00:00 2001 From: geobelsky Date: Wed, 20 May 2026 11:25:12 +0000 Subject: [PATCH 1/2] docs(openapi): sync session routes from control-plane (A4 / D-060) Re-exports gateway.v1.json (+ track-f subset) against control-plane PR #205 (feat/session-routes-20260520). Adds 7 paths under /v1/sessions/* and 3 request schemas (CreateSessionRequest, SessionMessageCreateRequest, SessionSpawnIntentRequest). The track-f subset gains the same request schemas in components/schemas as a side effect of the existing subset extractor; no track-f path filters change. Required for the docs CI OpenAPI parity gate to stay green once control-plane PR #205 lands on main. #!axme pr=none repo=AxmeAI/axme-docs --- docs/openapi/gateway.track-f-sprint1.v1.json | 298 +++++ docs/openapi/gateway.v1.json | 1190 +++++++++++++++++- 2 files changed, 1453 insertions(+), 35 deletions(-) diff --git a/docs/openapi/gateway.track-f-sprint1.v1.json b/docs/openapi/gateway.track-f-sprint1.v1.json index fe47249..dbbd052 100644 --- a/docs/openapi/gateway.track-f-sprint1.v1.json +++ b/docs/openapi/gateway.track-f-sprint1.v1.json @@ -6210,6 +6210,99 @@ "type": "object", "title": "CostPolicyRequest" }, + "CreateSessionRequest": { + "properties": { + "owner_agent": { + "anyOf": [ + { + "type": "string", + "maxLength": 255, + "minLength": 3 + }, + { + "type": "null" + } + ], + "title": "Owner Agent" + }, + "visitor_ref": { + "anyOf": [ + { + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Visitor Ref" + }, + "parent_session_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Parent Session Id" + }, + "correlation_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Correlation Id" + }, + "public_kb_id": { + "anyOf": [ + { + "type": "string", + "maxLength": 36 + }, + { + "type": "null" + } + ], + "title": "Public Kb Id" + }, + "dossier_ref": { + "anyOf": [ + { + "type": "string", + "maxLength": 255 + }, + { + "type": "null" + } + ], + "title": "Dossier Ref" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "title": "CreateSessionRequest", + "description": "POST /v1/sessions body. owner_agent identifies the public agent the\nvisitor is contacting; visitor_ref is the cookie-derived identifier in\nthe B2C path (B3 will plumb the cookie -> this field automatically)." + }, "DashboardExchangeRequest": { "properties": { "token": { @@ -8963,6 +9056,211 @@ "type": "object", "title": "ServiceAccountKeyCreateRequest" }, + "SessionMessageCreateRequest": { + "properties": { + "text": { + "type": "string", + "maxLength": 131072, + "minLength": 1, + "title": "Text" + }, + "sender_ref": { + "anyOf": [ + { + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Sender Ref" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "required": [ + "text" + ], + "title": "SessionMessageCreateRequest", + "description": "POST /v1/sessions/{id}/messages body \u2014 plaintext-only for A4.\nPer-session content encryption lands in A5 (D-A5)." + }, + "SessionSpawnIntentRequest": { + "properties": { + "intent_type": { + "type": "string", + "pattern": "^[a-z0-9_]+(?:\\.[a-z0-9_]+)+\\.v[0-9]+$", + "title": "Intent Type" + }, + "to_agent": { + "type": "string", + "maxLength": 255, + "minLength": 3, + "title": "To Agent" + }, + "payload": { + "additionalProperties": true, + "type": "object", + "title": "Payload" + }, + "correlation_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Correlation Id" + }, + "parent_intent_id": { + "anyOf": [ + { + "type": "string", + "maxLength": 36, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Parent Intent Id" + }, + "reply_to": { + "anyOf": [ + { + "type": "string", + "maxLength": 255, + "minLength": 3 + }, + { + "type": "null" + } + ], + "title": "Reply To" + }, + "deadline_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deadline At" + }, + "ttl_seconds": { + "anyOf": [ + { + "type": "integer", + "maximum": 604800.0, + "minimum": 60.0 + }, + { + "type": "null" + } + ], + "title": "Ttl Seconds" + }, + "remind_after_seconds": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Remind After Seconds" + }, + "remind_interval_seconds": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Remind Interval Seconds" + }, + "max_reminders": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Max Reminders" + }, + "escalate_to": { + "anyOf": [ + { + "type": "string", + "maxLength": 255, + "minLength": 3 + }, + { + "type": "null" + } + ], + "title": "Escalate To" + }, + "max_delivery_attempts": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Max Delivery Attempts" + }, + "human_task": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Human Task" + } + }, + "type": "object", + "required": [ + "intent_type", + "to_agent", + "payload" + ], + "title": "SessionSpawnIntentRequest", + "description": "POST /v1/sessions/{id}/spawn-intent body.\n\nMirrors the SubmitIntentRequest deadline / reminder / retry / human_task\nfields so the spawned intent goes through the existing Model-A HITL path\n(intent_routes.py:777-940) without reimplementing the human task pipeline." + }, "SubmitIntentRequest": { "properties": { "intent_type": { diff --git a/docs/openapi/gateway.v1.json b/docs/openapi/gateway.v1.json index 5937169..65cee50 100644 --- a/docs/openapi/gateway.v1.json +++ b/docs/openapi/gateway.v1.json @@ -13361,6 +13361,828 @@ } } }, + "/v1/sessions": { + "post": { + "summary": "Create Session", + "operationId": "create_session_v1_sessions_post", + "parameters": [ + { + "name": "owner_agent", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Owner Agent" + } + }, + { + "name": "x-owner-agent", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Owner-Agent" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSessionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response Create Session V1 Sessions Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "summary": "List Sessions", + "description": "Unified inbox \u2014 every session the caller participates in.\n\nParticipation is GatewaySessionMember.participant_ref == caller_scope.\nThat single mechanism covers visitor (one cookie identity across\nmultiple owners' agents) and owner (their own agent address) without a\nper-side query.", + "operationId": "list_sessions_v1_sessions_get", + "parameters": [ + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status" + } + }, + { + "name": "owner_agent", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Owner Agent" + } + }, + { + "name": "x-owner-agent", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Owner-Agent" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response List Sessions V1 Sessions Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}": { + "get": { + "summary": "Get Session", + "operationId": "get_session_v1_sessions__session_id__get", + "parameters": [ + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Session Id" + } + }, + { + "name": "owner_agent", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Owner Agent" + } + }, + { + "name": "x-owner-agent", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Owner-Agent" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response Get Session V1 Sessions Session Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/messages": { + "post": { + "summary": "Send Session Message", + "operationId": "send_session_message_v1_sessions__session_id__messages_post", + "parameters": [ + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Session Id" + } + }, + { + "name": "owner_agent", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Owner Agent" + } + }, + { + "name": "x-owner-agent", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Owner-Agent" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionMessageCreateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response Send Session Message V1 Sessions Session Id Messages Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "summary": "List Session Messages", + "operationId": "list_session_messages_v1_sessions__session_id__messages_get", + "parameters": [ + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Session Id" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 500, + "minimum": 1, + "default": 100, + "title": "Limit" + } + }, + { + "name": "owner_agent", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Owner Agent" + } + }, + { + "name": "x-owner-agent", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Owner-Agent" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response List Session Messages V1 Sessions Session Id Messages Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/events": { + "get": { + "summary": "List Session Events", + "operationId": "list_session_events_v1_sessions__session_id__events_get", + "parameters": [ + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Session Id" + } + }, + { + "name": "since", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Since" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 1000, + "minimum": 1, + "default": 200, + "title": "Limit" + } + }, + { + "name": "owner_agent", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Owner Agent" + } + }, + { + "name": "x-owner-agent", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Owner-Agent" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response List Session Events V1 Sessions Session Id Events Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/sessions/{session_id}/spawn-intent": { + "post": { + "summary": "Spawn Session Intent", + "operationId": "spawn_session_intent_v1_sessions__session_id__spawn_intent_post", + "parameters": [ + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Session Id" + } + }, + { + "name": "owner_agent", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Owner Agent" + } + }, + { + "name": "idempotency-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Idempotency-Key" + } + }, + { + "name": "x-owner-agent", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Owner-Agent" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionSpawnIntentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response Spawn Session Intent V1 Sessions Session Id Spawn Intent Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, "/v1/mesh/heartbeat": { "post": { "tags": [ @@ -15033,69 +15855,162 @@ "type": "string", "title": "Normalized Nick" }, - "public_address": { - "type": "string", - "title": "Public Address" + "public_address": { + "type": "string", + "title": "Public Address" + }, + "available": { + "type": "boolean", + "title": "Available" + } + }, + "type": "object", + "required": [ + "ok", + "nick", + "normalized_nick", + "public_address", + "available" + ], + "title": "CheckNickResponse" + }, + "CostPolicyRequest": { + "properties": { + "max_intents_per_day": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Intents Per Day" + }, + "max_intents_per_hour": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Intents Per Hour" + }, + "max_cost_per_day_usd": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Cost Per Day Usd" + }, + "action_on_breach": { + "type": "string", + "pattern": "^(block|alert|require_approval)$", + "title": "Action On Breach", + "default": "block" + } + }, + "type": "object", + "title": "CostPolicyRequest" + }, + "CreateSessionRequest": { + "properties": { + "owner_agent": { + "anyOf": [ + { + "type": "string", + "maxLength": 255, + "minLength": 3 + }, + { + "type": "null" + } + ], + "title": "Owner Agent" + }, + "visitor_ref": { + "anyOf": [ + { + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Visitor Ref" + }, + "parent_session_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Parent Session Id" }, - "available": { - "type": "boolean", - "title": "Available" - } - }, - "type": "object", - "required": [ - "ok", - "nick", - "normalized_nick", - "public_address", - "available" - ], - "title": "CheckNickResponse" - }, - "CostPolicyRequest": { - "properties": { - "max_intents_per_day": { + "correlation_id": { "anyOf": [ { - "type": "integer" + "type": "string", + "format": "uuid" }, { "type": "null" } ], - "title": "Max Intents Per Day" + "title": "Correlation Id" }, - "max_intents_per_hour": { + "public_kb_id": { "anyOf": [ { - "type": "integer" + "type": "string", + "maxLength": 36 }, { "type": "null" } ], - "title": "Max Intents Per Hour" + "title": "Public Kb Id" }, - "max_cost_per_day_usd": { + "dossier_ref": { "anyOf": [ { - "type": "number" + "type": "string", + "maxLength": 255 }, { "type": "null" } ], - "title": "Max Cost Per Day Usd" + "title": "Dossier Ref" }, - "action_on_breach": { - "type": "string", - "pattern": "^(block|alert|require_approval)$", - "title": "Action On Breach", - "default": "block" + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" } }, "type": "object", - "title": "CostPolicyRequest" + "title": "CreateSessionRequest", + "description": "POST /v1/sessions body. owner_agent identifies the public agent the\nvisitor is contacting; visitor_ref is the cookie-derived identifier in\nthe B2C path (B3 will plumb the cookie -> this field automatically)." }, "DashboardExchangeRequest": { "properties": { @@ -17850,6 +18765,211 @@ "type": "object", "title": "ServiceAccountKeyCreateRequest" }, + "SessionMessageCreateRequest": { + "properties": { + "text": { + "type": "string", + "maxLength": 131072, + "minLength": 1, + "title": "Text" + }, + "sender_ref": { + "anyOf": [ + { + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Sender Ref" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "required": [ + "text" + ], + "title": "SessionMessageCreateRequest", + "description": "POST /v1/sessions/{id}/messages body \u2014 plaintext-only for A4.\nPer-session content encryption lands in A5 (D-A5)." + }, + "SessionSpawnIntentRequest": { + "properties": { + "intent_type": { + "type": "string", + "pattern": "^[a-z0-9_]+(?:\\.[a-z0-9_]+)+\\.v[0-9]+$", + "title": "Intent Type" + }, + "to_agent": { + "type": "string", + "maxLength": 255, + "minLength": 3, + "title": "To Agent" + }, + "payload": { + "additionalProperties": true, + "type": "object", + "title": "Payload" + }, + "correlation_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Correlation Id" + }, + "parent_intent_id": { + "anyOf": [ + { + "type": "string", + "maxLength": 36, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Parent Intent Id" + }, + "reply_to": { + "anyOf": [ + { + "type": "string", + "maxLength": 255, + "minLength": 3 + }, + { + "type": "null" + } + ], + "title": "Reply To" + }, + "deadline_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deadline At" + }, + "ttl_seconds": { + "anyOf": [ + { + "type": "integer", + "maximum": 604800.0, + "minimum": 60.0 + }, + { + "type": "null" + } + ], + "title": "Ttl Seconds" + }, + "remind_after_seconds": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Remind After Seconds" + }, + "remind_interval_seconds": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Remind Interval Seconds" + }, + "max_reminders": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Max Reminders" + }, + "escalate_to": { + "anyOf": [ + { + "type": "string", + "maxLength": 255, + "minLength": 3 + }, + { + "type": "null" + } + ], + "title": "Escalate To" + }, + "max_delivery_attempts": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Max Delivery Attempts" + }, + "human_task": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Human Task" + } + }, + "type": "object", + "required": [ + "intent_type", + "to_agent", + "payload" + ], + "title": "SessionSpawnIntentRequest", + "description": "POST /v1/sessions/{id}/spawn-intent body.\n\nMirrors the SubmitIntentRequest deadline / reminder / retry / human_task\nfields so the spawned intent goes through the existing Model-A HITL path\n(intent_routes.py:777-940) without reimplementing the human task pipeline." + }, "SubmitIntentRequest": { "properties": { "intent_type": { From c944e6f25b5649bbb6f10d35b5817e1d29ef3dfc Mon Sep 17 00:00:00 2001 From: geobelsky Date: Wed, 20 May 2026 14:10:49 +0000 Subject: [PATCH 2/2] docs(openapi): add session /stream + encryption_alg (A5 / A6) Re-export against control-plane PR #205 commit 0a53765 (A4 + A5 + A6 stack): - new path GET /v1/sessions/{session_id}/stream (SSE) - session message responses gain optional encryption_alg field Required for the docs CI OpenAPI parity gate to stay green once control-plane PR #205 lands on main. #!axme pr=68 repo=AxmeAI/axme-docs --- docs/openapi/gateway.v1.json | 127 +++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) diff --git a/docs/openapi/gateway.v1.json b/docs/openapi/gateway.v1.json index 65cee50..0dd3d9c 100644 --- a/docs/openapi/gateway.v1.json +++ b/docs/openapi/gateway.v1.json @@ -14183,6 +14183,133 @@ } } }, + "/v1/sessions/{session_id}/stream": { + "get": { + "summary": "Stream Session Events", + "description": "SSE stream of session events.\n\nPolls ``gateway_session_events`` ORDER BY seq ASC WHERE\n``session_id = :sid AND seq > :since``. Reconnecting clients resume\nfrom the last id they received \u2014 the ``(session_id, seq)`` unique\nconstraint guarantees no duplicate, no gap. After ``wait_seconds``\nof inactivity the stream emits a ``stream.timeout`` event with the\nlast seq the caller should reconnect from.\n\nConcurrency cap is shared with the agent intent stream (A6 gate):\nboth routers acquire from ``helpers_sse._sse_stream_counts`` so a\nsingle workspace cannot blow past ``sse_streams_max`` by mixing the\ntwo stream types.\n\nAuth: x-api-key + x-owner-agent (visitor cookie comes in B3 as a\nsibling dep; the participation check is identical either way).", + "operationId": "stream_session_events_v1_sessions__session_id__stream_get", + "parameters": [ + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Session Id" + } + }, + { + "name": "since", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "default": 0, + "title": "Since" + } + }, + { + "name": "wait_seconds", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 120, + "minimum": 1, + "default": 30, + "title": "Wait Seconds" + } + }, + { + "name": "owner_agent", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Owner Agent" + } + }, + { + "name": "x-owner-agent", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Owner-Agent" + } + }, + { + "name": "authorization", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + }, + { + "name": "x-api-key", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Live SSE stream of session lifecycle events (A6).", + "content": { + "application/json": { + "schema": {} + }, + "text/event-stream": {} + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, "/v1/mesh/heartbeat": { "post": { "tags": [