{ "info": { "title": "Mecatl Studio API", "version": "1.0.0" }, "openapi": "3.1.0", "components": { "schemas": {}, "parameters": {} }, "paths": { "/api/v1/auth/session": { "get": { "operationId": "getAuthSession", "responses": { "200": { "description": "How this deployment identifies callers, and this browser's own state.", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "account": { "type": "string", "minLength": 1 }, "email": { "type": "string" }, "mode": { "type": "string", "enum": [ "oidc" ] }, "status": { "type": "string", "enum": [ "authenticated" ] } }, "required": [ "account", "mode", "status" ], "additionalProperties": false }, { "type": "object", "properties": { "mode": { "type": "string", "enum": [ "oidc" ] }, "status": { "type": "string", "enum": [ "anonymous" ] } }, "required": [ "mode", "status" ], "additionalProperties": false }, { "type": "object", "properties": { "mode": { "type": "string", "enum": [ "static", "none" ] }, "status": { "type": "string", "enum": [ "disabled" ] } }, "required": [ "mode", "status" ], "additionalProperties": false } ] } } } } } } }, "/api/v1/auth/login": { "get": { "operationId": "startAuthLogin", "parameters": [ { "schema": { "type": "string", "enum": [ "popup" ] }, "required": false, "name": "flow", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "return_to", "in": "query" } ], "responses": { "302": { "description": "Continue the browser authentication flow.", "headers": { "Location": { "schema": { "type": "string" }, "required": true } } }, "400": { "description": "The authentication operation could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "409": { "description": "The authentication operation could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The authentication operation could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/auth/callback": { "get": { "operationId": "completeAuthLogin", "responses": { "200": { "description": "A popup completion page that reports only the authentication result.", "content": { "text/html": { "schema": { "type": "string" } } } }, "302": { "description": "Continue the browser authentication flow.", "headers": { "Location": { "schema": { "type": "string" }, "required": true } } }, "400": { "description": "The authentication operation could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "401": { "description": "The authentication operation could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "409": { "description": "The authentication operation could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The authentication operation could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The authentication operation could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/auth/logout": { "post": { "operationId": "logoutAuthSession", "responses": { "204": { "description": "The browser session was cleared." }, "403": { "description": "The authentication operation could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/health": { "get": { "operationId": "getHealth", "responses": { "200": { "description": "The Studio BFF is listening.", "content": { "application/json": { "schema": { "type": "object", "properties": { "service": { "type": "string", "enum": [ "mecatl-studio" ] }, "status": { "type": "string", "enum": [ "ok" ] } }, "required": [ "service", "status" ] } } } } } } }, "/api/v1/status": { "get": { "operationId": "getPublicStatus", "responses": { "200": { "description": "Coarse Mecatl connection and browser sign-in facts.", "content": { "application/json": { "schema": { "type": "object", "properties": { "connection": { "type": "string", "enum": [ "checking", "reachable", "unavailable" ] }, "signInRequired": { "type": "boolean" } }, "required": [ "connection", "signInRequired" ], "additionalProperties": false } } } }, "429": { "description": "The client's public status request budget is exhausted.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/runtime": { "get": { "operationId": "getRuntime", "responses": { "200": { "description": "The connected Mecatl runtime and its capabilities.", "content": { "application/json": { "schema": { "type": "object", "properties": { "apiMajor": { "type": "integer" }, "capabilities": { "type": "object", "properties": { "agents": { "type": "boolean" }, "audio": { "type": "boolean" }, "bash": { "type": "boolean" }, "debugMcp": { "type": "boolean" }, "executionTemplates": { "type": "boolean" }, "image": { "type": "boolean" }, "learnedSkills": { "type": "boolean" }, "learningProposals": { "type": "boolean" }, "manualCompaction": { "type": "boolean" }, "manualDream": { "type": "object", "properties": { "projectMemory": { "type": "object", "properties": { "decide": { "type": "boolean" }, "generate": { "type": "boolean" }, "unavailableReason": { "type": "string" } }, "required": [ "decide", "generate" ] }, "userModel": { "type": "object", "properties": { "decide": { "type": "boolean" }, "generate": { "type": "boolean" }, "unavailableReason": { "type": "string" } }, "required": [ "decide", "generate" ] } } }, "mcp": { "type": "boolean" }, "mcpConnectorStatus": { "type": "boolean" }, "memory": { "type": "boolean" }, "modelSelection": { "type": "boolean" }, "posture": { "type": "string" }, "reflection": { "type": "boolean" }, "scheduling": { "type": "boolean" }, "sessionDebug": { "type": "boolean" }, "skills": { "type": "boolean" }, "slashCommands": { "type": "boolean" }, "soul": { "type": "boolean" }, "steer": { "type": "boolean" }, "storageCleanup": { "type": "boolean" }, "storageHealth": { "type": "boolean" }, "storageMigration": { "type": "boolean" }, "teams": { "type": "boolean" }, "userModel": { "type": "boolean" }, "workspaceEnrollment": { "type": "boolean" }, "worktrees": { "type": "boolean" } }, "required": [ "agents", "audio", "bash", "debugMcp", "executionTemplates", "image", "learnedSkills", "learningProposals", "manualCompaction", "mcp", "mcpConnectorStatus", "memory", "modelSelection", "posture", "reflection", "scheduling", "sessionDebug", "skills", "slashCommands", "soul", "steer", "storageCleanup", "storageHealth", "storageMigration", "teams", "userModel", "workspaceEnrollment", "worktrees" ] }, "connection": { "type": "string", "enum": [ "connecting", "online", "reconnecting", "offline", "unauthorized", "incompatible" ] }, "deployment": { "type": "string" }, "features": { "type": "array", "items": { "type": "string" } }, "mock": { "type": "boolean" }, "sdkVersion": { "type": "string" }, "source": { "type": "string", "enum": [ "external", "local" ] }, "studioBuildId": { "type": "string" } }, "required": [ "apiMajor", "capabilities", "connection", "features", "mock", "source" ] } } } }, "401": { "description": "Sign in before using this deployment.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable or not yet negotiated.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions": { "get": { "operationId": "listSessions", "responses": { "200": { "description": "The visible Mecatl chat sessions.", "content": { "application/json": { "schema": { "type": "object", "properties": { "complete": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "properties": { "capabilities": { "type": "object", "properties": { "copyId": { "type": "boolean" }, "copyIdReason": { "type": "string" }, "delete": { "type": "boolean" }, "deleteReason": { "type": "string" }, "fork": { "type": "boolean" }, "forkReason": { "type": "string" }, "inspect": { "type": "boolean" }, "inspectReason": { "type": "string" }, "publicChat": { "type": "boolean" }, "publicChatReason": { "type": "string" }, "rename": { "type": "boolean" }, "renameReason": { "type": "string" }, "viewTranscript": { "type": "boolean" }, "viewTranscriptReason": { "type": "string" } }, "required": [ "copyId", "copyIdReason", "delete", "deleteReason", "fork", "forkReason", "inspect", "inspectReason", "publicChat", "publicChatReason", "rename", "renameReason", "viewTranscript", "viewTranscriptReason" ] }, "createdAt": { "type": "string" }, "debugTargetSessionId": { "type": "string" }, "id": { "type": "string" }, "kind": { "type": "string" }, "modelId": { "type": "string" }, "state": { "type": "string" }, "title": { "type": "string" }, "titleProvenance": { "type": "string" }, "titleRevision": { "type": "string", "pattern": "^(0|[1-9]\\d*)$" }, "turns": { "type": "integer", "minimum": 0 }, "updatedAt": { "type": "string" } }, "required": [ "capabilities", "createdAt", "debugTargetSessionId", "id", "kind", "modelId", "state", "title", "titleProvenance", "titleRevision", "turns", "updatedAt" ] } } }, "required": [ "complete", "items" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } }, "post": { "operationId": "createSession", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "debugTargetSessionId": { "type": "string", "minLength": 1, "maxLength": 256 }, "execution": { "anyOf": [ { "type": "object", "properties": { "none": { "type": "object", "properties": {}, "additionalProperties": false } }, "required": [ "none" ], "additionalProperties": false }, { "type": "object", "properties": { "template": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" }, "revision": { "type": "string", "pattern": "^v1-[0-9a-f]{64}$" } }, "required": [ "id", "revision" ], "additionalProperties": false } }, "required": [ "template" ], "additionalProperties": false } ] }, "mode": { "type": "string", "enum": [ "default", "plan", "acceptEdits" ], "default": "default" }, "model": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "providerId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": [ "id", "providerId" ] }, "reasoningEffort": { "type": "string", "enum": [ "default", "low", "medium", "high", "xhigh", "max" ], "default": "default" } }, "additionalProperties": false } } } }, "responses": { "201": { "description": "The newly created Mecatl session.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" } }, "required": [ "id" ] } } } }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/execution-templates": { "get": { "operationId": "listExecutionTemplates", "responses": { "200": { "description": "Eligible execution templates for this caller.", "content": { "application/json": { "schema": { "type": "object", "properties": { "inventoryRevision": { "type": "string" }, "items": { "type": "array", "items": { "type": "object", "properties": { "template": { "type": "object", "properties": { "id": { "type": "string" }, "revision": { "type": "string" } }, "required": [ "id", "revision" ] }, "name": { "type": "string" }, "description": { "type": "string" }, "displayToken": { "type": "string" }, "extensions": { "type": "object", "additionalProperties": { "type": "string" } }, "declaredExecutionFiles": { "type": "boolean" }, "declaredBuiltInShell": { "type": "boolean" } }, "required": [ "template", "name", "description", "displayToken", "extensions", "declaredExecutionFiles", "declaredBuiltInShell" ] }, "maxItems": 64 } }, "required": [ "inventoryRevision", "items" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/transcript": { "get": { "operationId": "getSessionTranscript", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" } ], "responses": { "200": { "description": "The authoritative session transcript.", "content": { "application/json": { "schema": { "type": "object", "properties": { "complete": { "type": "boolean" }, "messages": { "type": "array", "items": { "type": "object", "properties": { "delivery": { "type": "object", "properties": { "fireId": { "type": "string" }, "kind": { "type": "string", "enum": [ "started", "completed" ] }, "scheduleName": { "type": "string" }, "stop": { "type": "string" } }, "required": [ "fireId", "kind", "scheduleName" ] }, "images": { "type": "array", "items": { "type": "object", "properties": { "data": { "type": "string", "minLength": 4, "maxLength": 13981016 }, "mimeType": { "type": "string", "minLength": 7, "maxLength": 128, "pattern": "^image\\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]*$" }, "name": { "type": "string", "minLength": 1, "maxLength": 256 }, "url": { "type": "string", "maxLength": 2048, "format": "uri" } }, "required": [ "mimeType", "name" ] } }, "role": { "type": "string" }, "text": { "type": "string" }, "toolCalls": { "type": "array", "items": { "type": "object", "properties": { "args": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "args", "id", "name" ] } }, "toolResult": { "type": "object", "properties": { "callId": { "type": "string" }, "content": { "type": "string" }, "isError": { "type": "boolean" } }, "required": [ "callId", "content", "isError" ] } }, "required": [ "images", "role", "text", "toolCalls" ] } }, "sessionId": { "type": "string" } }, "required": [ "complete", "messages", "sessionId" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}": { "get": { "operationId": "getSessionDetail", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" } ], "responses": { "200": { "description": "The authoritative session configuration and usage snapshot.", "content": { "application/json": { "schema": { "type": "object", "properties": { "capabilities": { "type": "object", "properties": { "image": { "type": "boolean" }, "audio": { "type": "boolean" }, "executionFiles": { "type": "boolean" }, "builtInShell": { "type": "boolean" }, "manualCompaction": { "type": "boolean" }, "modelSelection": { "type": "boolean" } }, "required": [ "image", "audio", "executionFiles", "builtInShell", "manualCompaction", "modelSelection" ] }, "id": { "type": "string" }, "kind": { "type": "string" }, "mode": { "type": "string", "enum": [ "default", "plan", "acceptEdits", "auto", "yolo" ] }, "model": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "providerId": { "type": "string", "minLength": 1, "maxLength": 128 }, "contextWindow": { "type": "string" }, "providerDisplayName": { "type": "string" }, "reasoningEffort": { "type": "string", "enum": [ "default", "low", "medium", "high", "xhigh", "max" ] } }, "required": [ "id", "providerId", "contextWindow", "providerDisplayName", "reasoningEffort" ] }, "placement": { "type": "object", "properties": { "kind": { "type": "string" }, "label": { "type": "string" }, "branch": { "type": "string" }, "revision": { "type": "string" } }, "required": [ "kind", "label", "branch", "revision" ] }, "relationship": { "type": "object", "properties": { "debugTargetSessionId": { "type": "string" }, "parentSessionId": { "type": "string" } } }, "state": { "type": "string" }, "usage": { "type": "object", "properties": { "cacheReadTokens": { "type": "string" }, "cacheWriteTokens": { "type": "string" }, "inputTokens": { "type": "string" }, "outputTokens": { "type": "string" }, "reasoningTokens": { "type": "string" } }, "required": [ "cacheReadTokens", "cacheWriteTokens", "inputTokens", "outputTokens", "reasoningTokens" ] } }, "required": [ "capabilities", "id", "kind", "mode", "state", "usage" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } }, "patch": { "operationId": "renameSession", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1, "maxLength": 160 } }, "required": [ "title" ] } } } }, "responses": { "200": { "description": "The authoritative session title.", "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string" }, "titleProvenance": { "type": "string" }, "titleRevision": { "type": "string", "pattern": "^(0|[1-9]\\d*)$" } }, "required": [ "title", "titleProvenance", "titleRevision" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } }, "delete": { "operationId": "deleteSession", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" } ], "responses": { "204": { "description": "The session was deleted." }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/runs": { "post": { "operationId": "startRun", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "images": { "type": "array", "items": { "type": "object", "properties": { "data": { "type": "string", "minLength": 4, "maxLength": 13981016 }, "mimeType": { "type": "string", "minLength": 7, "maxLength": 128, "pattern": "^image\\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]*$" }, "name": { "type": "string", "minLength": 1, "maxLength": 256 } }, "required": [ "data", "mimeType", "name" ] }, "maxItems": 16, "default": [] }, "prompt": { "type": "string", "maxLength": 1000000 } }, "required": [ "prompt" ] } } } }, "responses": { "200": { "description": "The Mecatl run event stream.", "content": { "text/event-stream": { "schema": { "oneOf": [ { "type": "object", "properties": { "runId": { "type": "string" }, "sessionId": { "type": "string" }, "type": { "type": "string", "enum": [ "run.started" ] } }, "required": [ "runId", "sessionId", "type" ] }, { "type": "object", "properties": { "event": { "type": "object", "properties": { "delivery": { "type": "object", "properties": { "fireId": { "type": "string" }, "kind": { "type": "string", "enum": [ "started", "completed" ] }, "scheduleName": { "type": "string" }, "stop": { "type": "string" } }, "required": [ "fireId", "kind", "scheduleName" ] }, "kind": { "type": "string" }, "payload": { "nullable": true }, "raw": { "nullable": true }, "runId": { "type": "string" }, "seq": { "type": "string" }, "text": { "type": "string" }, "turn": { "type": "integer" }, "unknown": { "type": "boolean" }, "usage": { "type": "object", "properties": { "cacheReadTokens": { "type": "string" }, "cacheWriteTokens": { "type": "string" }, "inputTokens": { "type": "string" }, "outputTokens": { "type": "string" }, "reasoningTokens": { "type": "string" } }, "required": [ "cacheReadTokens", "cacheWriteTokens", "inputTokens", "outputTokens", "reasoningTokens" ] } }, "required": [ "kind", "runId", "seq", "text", "turn", "unknown" ] }, "type": { "type": "string", "enum": [ "run.event" ] } }, "required": [ "event", "type" ] }, { "type": "object", "properties": { "cursor": { "type": "string" }, "reason": { "type": "string", "enum": [ "bound", "gap" ] }, "type": { "type": "string", "enum": [ "run.truncated" ] } }, "required": [ "cursor", "reason", "type" ] }, { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "type": { "type": "string", "enum": [ "run.error" ] } }, "required": [ "code", "message", "type" ] } ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/activity": { "get": { "operationId": "watchSessionActivity", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" }, { "schema": { "type": "string", "maxLength": 1024 }, "required": false, "name": "resumeFrom", "in": "query" } ], "responses": { "200": { "description": "Bounded durable replay followed by live activity. Each event frame carries its cursor in the SSE id field.", "content": { "text/event-stream": { "schema": { "oneOf": [ { "type": "object", "properties": { "runId": { "type": "string" }, "sessionId": { "type": "string" }, "type": { "type": "string", "enum": [ "run.started" ] } }, "required": [ "runId", "sessionId", "type" ] }, { "type": "object", "properties": { "event": { "type": "object", "properties": { "delivery": { "type": "object", "properties": { "fireId": { "type": "string" }, "kind": { "type": "string", "enum": [ "started", "completed" ] }, "scheduleName": { "type": "string" }, "stop": { "type": "string" } }, "required": [ "fireId", "kind", "scheduleName" ] }, "kind": { "type": "string" }, "payload": { "nullable": true }, "raw": { "nullable": true }, "runId": { "type": "string" }, "seq": { "type": "string" }, "text": { "type": "string" }, "turn": { "type": "integer" }, "unknown": { "type": "boolean" }, "usage": { "type": "object", "properties": { "cacheReadTokens": { "type": "string" }, "cacheWriteTokens": { "type": "string" }, "inputTokens": { "type": "string" }, "outputTokens": { "type": "string" }, "reasoningTokens": { "type": "string" } }, "required": [ "cacheReadTokens", "cacheWriteTokens", "inputTokens", "outputTokens", "reasoningTokens" ] } }, "required": [ "kind", "runId", "seq", "text", "turn", "unknown" ] }, "type": { "type": "string", "enum": [ "run.event" ] } }, "required": [ "event", "type" ] }, { "type": "object", "properties": { "cursor": { "type": "string" }, "reason": { "type": "string", "enum": [ "bound", "gap" ] }, "type": { "type": "string", "enum": [ "run.truncated" ] } }, "required": [ "cursor", "reason", "type" ] }, { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "type": { "type": "string", "enum": [ "run.error" ] } }, "required": [ "code", "message", "type" ] } ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/mode": { "put": { "operationId": "setSessionMode", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "mode": { "type": "string", "enum": [ "default", "plan", "acceptEdits" ] } }, "required": [ "mode" ] } } } }, "responses": { "200": { "description": "The authoritative session permission mode.", "content": { "application/json": { "schema": { "type": "object", "properties": { "mode": { "type": "string", "enum": [ "default", "plan", "acceptEdits", "auto", "yolo" ] } }, "required": [ "mode" ] } } } }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/compaction": { "post": { "operationId": "compactSession", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" } ], "responses": { "200": { "description": "Whether manual compaction reduced the conversation.", "content": { "application/json": { "schema": { "type": "object", "properties": { "compacted": { "type": "boolean" } }, "required": [ "compacted" ] } } } }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/fork": { "post": { "operationId": "forkSession", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "model": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 256 }, "providerId": { "type": "string", "minLength": 1, "maxLength": 128 } }, "required": [ "id", "providerId" ] }, "reasoningEffort": { "type": "string", "enum": [ "default", "low", "medium", "high", "xhigh", "max" ] }, "worktreeSelector": { "type": "string", "minLength": 1 } }, "required": [ "model", "reasoningEffort" ] } } } }, "responses": { "201": { "description": "A successor session forked onto the selected model and effort.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" } }, "required": [ "id" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "404": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/clear": { "post": { "operationId": "clearSession", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "worktreeSelector": { "type": "string", "minLength": 1 } } } } } }, "responses": { "201": { "description": "An empty-history successor session, replacing this one's conversation.", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" } }, "required": [ "id" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "404": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/retry": { "post": { "operationId": "retrySession", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" } ], "responses": { "200": { "description": "The retry run event stream.", "content": { "text/event-stream": { "schema": { "oneOf": [ { "type": "object", "properties": { "runId": { "type": "string" }, "sessionId": { "type": "string" }, "type": { "type": "string", "enum": [ "run.started" ] } }, "required": [ "runId", "sessionId", "type" ] }, { "type": "object", "properties": { "event": { "type": "object", "properties": { "delivery": { "type": "object", "properties": { "fireId": { "type": "string" }, "kind": { "type": "string", "enum": [ "started", "completed" ] }, "scheduleName": { "type": "string" }, "stop": { "type": "string" } }, "required": [ "fireId", "kind", "scheduleName" ] }, "kind": { "type": "string" }, "payload": { "nullable": true }, "raw": { "nullable": true }, "runId": { "type": "string" }, "seq": { "type": "string" }, "text": { "type": "string" }, "turn": { "type": "integer" }, "unknown": { "type": "boolean" }, "usage": { "type": "object", "properties": { "cacheReadTokens": { "type": "string" }, "cacheWriteTokens": { "type": "string" }, "inputTokens": { "type": "string" }, "outputTokens": { "type": "string" }, "reasoningTokens": { "type": "string" } }, "required": [ "cacheReadTokens", "cacheWriteTokens", "inputTokens", "outputTokens", "reasoningTokens" ] } }, "required": [ "kind", "runId", "seq", "text", "turn", "unknown" ] }, "type": { "type": "string", "enum": [ "run.event" ] } }, "required": [ "event", "type" ] }, { "type": "object", "properties": { "cursor": { "type": "string" }, "reason": { "type": "string", "enum": [ "bound", "gap" ] }, "type": { "type": "string", "enum": [ "run.truncated" ] } }, "required": [ "cursor", "reason", "type" ] }, { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "type": { "type": "string", "enum": [ "run.error" ] } }, "required": [ "code", "message", "type" ] } ] } } } }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/runs/{runId}/cancel": { "post": { "operationId": "cancelRun", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "runId" } ], "responses": { "204": { "description": "Cancellation was sent to the active run." }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/runs/{runId}/steer": { "post": { "operationId": "steerRun", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "runId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1, "maxLength": 1000000 } }, "required": [ "text" ] } } } }, "responses": { "204": { "description": "The steering instruction was sent to the active run." }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/runs/{runId}/permissions/{askId}": { "post": { "operationId": "resolveRunPermission", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "runId" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "askId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "verdict": { "type": "string", "enum": [ "allow_once", "allow_always", "deny" ] } }, "required": [ "verdict" ] } } } }, "responses": { "204": { "description": "The permission decision was sent to the active run." }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/runs/{runId}/plan-asks/{askId}": { "post": { "operationId": "resolvePlanAsk", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "runId" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "askId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "verdict": { "type": "string", "enum": [ "approve", "accept_edits", "iterate" ] } }, "required": [ "verdict" ], "additionalProperties": false } } } }, "responses": { "204": { "description": "The exact plan verdict was acknowledged." }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/authorizations/{authorizationId}/presentation": { "get": { "operationId": "getAuthorizationPresentation", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "authorizationId" } ], "responses": { "302": { "description": "Redirect to a fresh external authorization page." }, "403": { "description": "Open the authorization page from the Studio origin.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "502": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/authorizations/{authorizationId}/recheck": { "post": { "operationId": "recheckAuthorization", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "authorizationId" } ], "responses": { "200": { "description": "Authorization recheck and any continuation, in the run event stream.", "content": { "text/event-stream": { "schema": { "oneOf": [ { "type": "object", "properties": { "runId": { "type": "string" }, "sessionId": { "type": "string" }, "type": { "type": "string", "enum": [ "run.started" ] } }, "required": [ "runId", "sessionId", "type" ] }, { "type": "object", "properties": { "event": { "type": "object", "properties": { "delivery": { "type": "object", "properties": { "fireId": { "type": "string" }, "kind": { "type": "string", "enum": [ "started", "completed" ] }, "scheduleName": { "type": "string" }, "stop": { "type": "string" } }, "required": [ "fireId", "kind", "scheduleName" ] }, "kind": { "type": "string" }, "payload": { "nullable": true }, "raw": { "nullable": true }, "runId": { "type": "string" }, "seq": { "type": "string" }, "text": { "type": "string" }, "turn": { "type": "integer" }, "unknown": { "type": "boolean" }, "usage": { "type": "object", "properties": { "cacheReadTokens": { "type": "string" }, "cacheWriteTokens": { "type": "string" }, "inputTokens": { "type": "string" }, "outputTokens": { "type": "string" }, "reasoningTokens": { "type": "string" } }, "required": [ "cacheReadTokens", "cacheWriteTokens", "inputTokens", "outputTokens", "reasoningTokens" ] } }, "required": [ "kind", "runId", "seq", "text", "turn", "unknown" ] }, "type": { "type": "string", "enum": [ "run.event" ] } }, "required": [ "event", "type" ] }, { "type": "object", "properties": { "cursor": { "type": "string" }, "reason": { "type": "string", "enum": [ "bound", "gap" ] }, "type": { "type": "string", "enum": [ "run.truncated" ] } }, "required": [ "cursor", "reason", "type" ] }, { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "type": { "type": "string", "enum": [ "run.error" ] } }, "required": [ "code", "message", "type" ] } ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/authorizations/{authorizationId}/cancel": { "post": { "operationId": "cancelAuthorization", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "authorizationId" } ], "responses": { "200": { "description": "Authorization cancellation and any continuation, in the run event stream.", "content": { "text/event-stream": { "schema": { "oneOf": [ { "type": "object", "properties": { "runId": { "type": "string" }, "sessionId": { "type": "string" }, "type": { "type": "string", "enum": [ "run.started" ] } }, "required": [ "runId", "sessionId", "type" ] }, { "type": "object", "properties": { "event": { "type": "object", "properties": { "delivery": { "type": "object", "properties": { "fireId": { "type": "string" }, "kind": { "type": "string", "enum": [ "started", "completed" ] }, "scheduleName": { "type": "string" }, "stop": { "type": "string" } }, "required": [ "fireId", "kind", "scheduleName" ] }, "kind": { "type": "string" }, "payload": { "nullable": true }, "raw": { "nullable": true }, "runId": { "type": "string" }, "seq": { "type": "string" }, "text": { "type": "string" }, "turn": { "type": "integer" }, "unknown": { "type": "boolean" }, "usage": { "type": "object", "properties": { "cacheReadTokens": { "type": "string" }, "cacheWriteTokens": { "type": "string" }, "inputTokens": { "type": "string" }, "outputTokens": { "type": "string" }, "reasoningTokens": { "type": "string" } }, "required": [ "cacheReadTokens", "cacheWriteTokens", "inputTokens", "outputTokens", "reasoningTokens" ] } }, "required": [ "kind", "runId", "seq", "text", "turn", "unknown" ] }, "type": { "type": "string", "enum": [ "run.event" ] } }, "required": [ "event", "type" ] }, { "type": "object", "properties": { "cursor": { "type": "string" }, "reason": { "type": "string", "enum": [ "bound", "gap" ] }, "type": { "type": "string", "enum": [ "run.truncated" ] } }, "required": [ "cursor", "reason", "type" ] }, { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "type": { "type": "string", "enum": [ "run.error" ] } }, "required": [ "code", "message", "type" ] } ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/schedules": { "get": { "operationId": "listSchedules", "responses": { "200": { "description": "The visible scheduled work.", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "fireCount": { "type": "integer", "minimum": 0 }, "lastFireAt": { "type": "string", "nullable": true }, "lastFireSessionId": { "type": "string" }, "maxFires": { "type": "integer", "minimum": 0 }, "mode": { "type": "string", "enum": [ "default", "plan", "acceptEdits", "auto", "yolo", "serverDefault" ] }, "modelId": { "type": "string" }, "mutating": { "type": "boolean" }, "name": { "type": "string" }, "nextFireAt": { "type": "string", "nullable": true }, "oneShotMaxRetries": { "type": "integer", "minimum": 0 }, "oneShotRetry": { "type": "boolean" }, "owner": { "type": "string" }, "profile": { "type": "string", "enum": [ "all", "noFilesystem" ] }, "prompt": { "type": "string" }, "providerId": { "type": "string" }, "status": { "type": "string", "enum": [ "claimed", "completed", "paused", "running", "scheduled" ] }, "trigger": { "oneOf": [ { "type": "object", "properties": { "expression": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "cron" ] }, "timezone": { "type": "string" } }, "required": [ "expression", "kind", "timezone" ] }, { "type": "object", "properties": { "at": { "type": "string", "format": "date-time" }, "kind": { "type": "string", "enum": [ "once" ] } }, "required": [ "at", "kind" ] } ] } }, "required": [ "enabled", "fireCount", "lastFireAt", "lastFireSessionId", "maxFires", "mode", "modelId", "mutating", "name", "nextFireAt", "oneShotMaxRetries", "oneShotRetry", "owner", "profile", "prompt", "providerId", "status", "trigger" ] } }, "reason": { "type": "string" }, "supported": { "type": "boolean" } }, "required": [ "items", "reason", "supported" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime or scheduler is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } }, "post": { "operationId": "createSchedule", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "maxFires": { "type": "integer", "minimum": 0, "maximum": 2147483647, "default": 0 }, "mode": { "type": "string", "enum": [ "default", "plan", "acceptEdits" ], "default": "plan" }, "mutating": { "type": "boolean", "default": false }, "oneShotMaxRetries": { "type": "integer", "minimum": 0, "maximum": 2147483647, "default": 0 }, "oneShotRetry": { "type": "boolean", "default": false }, "profile": { "type": "string", "enum": [ "all", "noFilesystem" ], "default": "all" }, "prompt": { "type": "string", "minLength": 1, "maxLength": 1000000 }, "trigger": { "oneOf": [ { "type": "object", "properties": { "expression": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "cron" ] }, "timezone": { "type": "string" } }, "required": [ "expression", "kind", "timezone" ] }, { "type": "object", "properties": { "at": { "type": "string", "format": "date-time" }, "kind": { "type": "string", "enum": [ "once" ] } }, "required": [ "at", "kind" ] } ] }, "name": { "type": "string", "minLength": 1, "maxLength": 160 } }, "required": [ "prompt", "trigger", "name" ] } } } }, "responses": { "201": { "description": "The created schedule.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "fireCount": { "type": "integer", "minimum": 0 }, "lastFireAt": { "type": "string", "nullable": true }, "lastFireSessionId": { "type": "string" }, "maxFires": { "type": "integer", "minimum": 0 }, "mode": { "type": "string", "enum": [ "default", "plan", "acceptEdits", "auto", "yolo", "serverDefault" ] }, "modelId": { "type": "string" }, "mutating": { "type": "boolean" }, "name": { "type": "string" }, "nextFireAt": { "type": "string", "nullable": true }, "oneShotMaxRetries": { "type": "integer", "minimum": 0 }, "oneShotRetry": { "type": "boolean" }, "owner": { "type": "string" }, "profile": { "type": "string", "enum": [ "all", "noFilesystem" ] }, "prompt": { "type": "string" }, "providerId": { "type": "string" }, "status": { "type": "string", "enum": [ "claimed", "completed", "paused", "running", "scheduled" ] }, "trigger": { "oneOf": [ { "type": "object", "properties": { "expression": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "cron" ] }, "timezone": { "type": "string" } }, "required": [ "expression", "kind", "timezone" ] }, { "type": "object", "properties": { "at": { "type": "string", "format": "date-time" }, "kind": { "type": "string", "enum": [ "once" ] } }, "required": [ "at", "kind" ] } ] } }, "required": [ "enabled", "fireCount", "lastFireAt", "lastFireSessionId", "maxFires", "mode", "modelId", "mutating", "name", "nextFireAt", "oneShotMaxRetries", "oneShotRetry", "owner", "profile", "prompt", "providerId", "status", "trigger" ] } } } }, "400": { "description": "The schedule is invalid, for example an unknown time zone.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The Mecatl runtime or scheduler is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime or scheduler is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/schedules/{scheduleName}": { "put": { "operationId": "updateSchedule", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "scheduleName" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "maxFires": { "type": "integer", "minimum": 0, "maximum": 2147483647, "default": 0 }, "mode": { "type": "string", "enum": [ "default", "plan", "acceptEdits" ] }, "mutating": { "type": "boolean", "default": false }, "oneShotMaxRetries": { "type": "integer", "minimum": 0, "maximum": 2147483647, "default": 0 }, "oneShotRetry": { "type": "boolean", "default": false }, "profile": { "type": "string", "enum": [ "all", "noFilesystem" ], "default": "all" }, "prompt": { "type": "string", "minLength": 1, "maxLength": 1000000 }, "trigger": { "oneOf": [ { "type": "object", "properties": { "expression": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "cron" ] }, "timezone": { "type": "string" } }, "required": [ "expression", "kind", "timezone" ] }, { "type": "object", "properties": { "at": { "type": "string", "format": "date-time" }, "kind": { "type": "string", "enum": [ "once" ] } }, "required": [ "at", "kind" ] } ] } }, "required": [ "prompt", "trigger" ] } } } }, "responses": { "200": { "description": "The updated schedule.", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "fireCount": { "type": "integer", "minimum": 0 }, "lastFireAt": { "type": "string", "nullable": true }, "lastFireSessionId": { "type": "string" }, "maxFires": { "type": "integer", "minimum": 0 }, "mode": { "type": "string", "enum": [ "default", "plan", "acceptEdits", "auto", "yolo", "serverDefault" ] }, "modelId": { "type": "string" }, "mutating": { "type": "boolean" }, "name": { "type": "string" }, "nextFireAt": { "type": "string", "nullable": true }, "oneShotMaxRetries": { "type": "integer", "minimum": 0 }, "oneShotRetry": { "type": "boolean" }, "owner": { "type": "string" }, "profile": { "type": "string", "enum": [ "all", "noFilesystem" ] }, "prompt": { "type": "string" }, "providerId": { "type": "string" }, "status": { "type": "string", "enum": [ "claimed", "completed", "paused", "running", "scheduled" ] }, "trigger": { "oneOf": [ { "type": "object", "properties": { "expression": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "cron" ] }, "timezone": { "type": "string" } }, "required": [ "expression", "kind", "timezone" ] }, { "type": "object", "properties": { "at": { "type": "string", "format": "date-time" }, "kind": { "type": "string", "enum": [ "once" ] } }, "required": [ "at", "kind" ] } ] } }, "required": [ "enabled", "fireCount", "lastFireAt", "lastFireSessionId", "maxFires", "mode", "modelId", "mutating", "name", "nextFireAt", "oneShotMaxRetries", "oneShotRetry", "owner", "profile", "prompt", "providerId", "status", "trigger" ] } } } }, "400": { "description": "The schedule is invalid, for example an unknown time zone.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "409": { "description": "The update changes the schedule's trigger, which cannot be edited; create a new schedule instead.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The Mecatl runtime or scheduler is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime or scheduler is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } }, "delete": { "operationId": "deleteSchedule", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "scheduleName" } ], "responses": { "204": { "description": "The schedule was deleted." }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The Mecatl runtime or scheduler is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime or scheduler is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/schedules/{scheduleName}/actions": { "post": { "operationId": "actOnSchedule", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "scheduleName" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "fire", "pause", "resume" ] } }, "required": [ "action" ] } } } }, "responses": { "204": { "description": "The schedule action was accepted." }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The Mecatl runtime or scheduler is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime or scheduler is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/schedules/{scheduleName}/fires": { "get": { "operationId": "listScheduleFires", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "scheduleName" } ], "responses": { "200": { "description": "The schedule run history.", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "deadline": { "type": "string", "nullable": true }, "error": { "type": "string" }, "firedAt": { "type": "string", "nullable": true }, "id": { "type": "string" }, "inFlight": { "type": "boolean" }, "outcome": { "type": "string", "enum": [ "claimed", "in_flight", "completed", "failed", "cancelled", "timed_out", "limit_reached", "stopped" ] }, "progressAt": { "type": "string", "nullable": true }, "scheduleName": { "type": "string" }, "sessionId": { "type": "string" }, "startedAt": { "type": "string", "nullable": true }, "stop": { "type": "string" } }, "required": [ "deadline", "error", "firedAt", "id", "inFlight", "outcome", "progressAt", "scheduleName", "sessionId", "startedAt", "stop" ] } } }, "required": [ "items" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The Mecatl runtime or scheduler is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime or scheduler is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/skills": { "get": { "operationId": "listConfiguredSkills", "responses": { "200": { "description": "The configured skill inventory.", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "activeVersion": { "type": "string" }, "agentOwned": { "type": "boolean" }, "description": { "type": "string" }, "name": { "type": "string" }, "ownerAgent": { "type": "string" } }, "required": [ "activeVersion", "agentOwned", "description", "name", "ownerAgent" ] } }, "reason": { "type": "string" }, "supported": { "type": "boolean" } }, "required": [ "items", "reason", "supported" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/skills/{name}/files": { "get": { "operationId": "listSkillFiles", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "name" } ], "responses": { "200": { "description": "A configured skill's files with their text.", "content": { "application/json": { "schema": { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "object", "properties": { "content": { "type": "string" }, "instructions": { "type": "boolean" }, "name": { "type": "string" }, "size": { "type": "integer", "minimum": 0 }, "unavailable": { "type": "string" } }, "required": [ "content", "instructions", "name", "size", "unavailable" ] } }, "omitted": { "type": "integer", "minimum": 0 } }, "required": [ "files", "omitted" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "404": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/learned-skills": { "get": { "operationId": "listLearnedSkills", "responses": { "200": { "description": "The learned skill lifecycle inventory.", "content": { "application/json": { "schema": { "type": "object", "properties": { "complete": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "properties": { "actions": { "type": "object", "properties": { "activate": { "type": "boolean" }, "archive": { "type": "boolean" }, "reject": { "type": "boolean" }, "rollback": { "type": "boolean" } }, "required": [ "activate", "archive", "reject", "rollback" ] }, "body": { "type": "string" }, "description": { "type": "string" }, "evidenceCount": { "type": "integer", "minimum": 0 }, "id": { "type": "string" }, "name": { "type": "string" }, "ownerAgent": { "type": "string" }, "revision": { "type": "string" }, "state": { "type": "string" }, "supersedes": { "type": "string" }, "updatedAt": { "type": "string", "nullable": true }, "version": { "type": "string" } }, "required": [ "actions", "body", "description", "evidenceCount", "id", "name", "ownerAgent", "revision", "state", "supersedes", "updatedAt", "version" ] } }, "reason": { "type": "string" }, "supported": { "type": "boolean" } }, "required": [ "complete", "items", "reason", "supported" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/learned-skills/changes": { "get": { "operationId": "listLearnedSkillChanges", "responses": { "200": { "description": "Recent learned-skill lifecycle changes.", "content": { "application/json": { "schema": { "type": "object", "properties": { "complete": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "properties": { "at": { "type": "string", "nullable": true }, "evidenceCount": { "type": "integer", "minimum": 0 }, "fromState": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "operation": { "type": "string" }, "skillId": { "type": "string" }, "toState": { "type": "string" }, "verdict": { "type": "string" }, "version": { "type": "string" } }, "required": [ "at", "evidenceCount", "fromState", "id", "name", "operation", "skillId", "toState", "verdict", "version" ] } } }, "required": [ "complete", "items" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/learned-skills/{skillId}": { "get": { "operationId": "getLearnedSkill", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "skillId" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "name": "ownerAgent", "in": "query" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "name": "version", "in": "query" } ], "responses": { "200": { "description": "One complete learned-skill version.", "content": { "application/json": { "schema": { "type": "object", "properties": { "actions": { "type": "object", "properties": { "activate": { "type": "boolean" }, "archive": { "type": "boolean" }, "reject": { "type": "boolean" }, "rollback": { "type": "boolean" } }, "required": [ "activate", "archive", "reject", "rollback" ] }, "body": { "type": "string" }, "description": { "type": "string" }, "evidenceCount": { "type": "integer", "minimum": 0 }, "id": { "type": "string" }, "name": { "type": "string" }, "ownerAgent": { "type": "string" }, "revision": { "type": "string" }, "state": { "type": "string" }, "supersedes": { "type": "string" }, "updatedAt": { "type": "string", "nullable": true }, "version": { "type": "string" } }, "required": [ "actions", "body", "description", "evidenceCount", "id", "name", "ownerAgent", "revision", "state", "supersedes", "updatedAt", "version" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/learned-skills/{skillId}/diff": { "get": { "operationId": "diffLearnedSkillVersions", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "skillId" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "name": "fromVersion", "in": "query" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "name": "ownerAgent", "in": "query" }, { "schema": { "type": "string", "minLength": 1 }, "required": true, "name": "toVersion", "in": "query" } ], "responses": { "200": { "description": "A unified diff between two learned-skill versions.", "content": { "application/json": { "schema": { "type": "object", "properties": { "diff": { "type": "string" }, "fromVersion": { "type": "string" }, "toVersion": { "type": "string" } }, "required": [ "diff", "fromVersion", "toVersion" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/learned-skills/{skillId}/actions": { "post": { "operationId": "actOnLearnedSkill", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "skillId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "activate", "archive", "reject", "rollback" ] }, "expectedRevision": { "type": "string", "minLength": 1 }, "ownerAgent": { "type": "string" }, "targetVersion": { "type": "string" }, "version": { "type": "string", "minLength": 1 } }, "required": [ "action", "expectedRevision", "ownerAgent", "version" ] } } } }, "responses": { "200": { "description": "The updated learned skill and whether publishing it into the live catalog succeeded.", "content": { "application/json": { "schema": { "type": "object", "properties": { "actions": { "type": "object", "properties": { "activate": { "type": "boolean" }, "archive": { "type": "boolean" }, "reject": { "type": "boolean" }, "rollback": { "type": "boolean" } }, "required": [ "activate", "archive", "reject", "rollback" ] }, "body": { "type": "string" }, "description": { "type": "string" }, "evidenceCount": { "type": "integer", "minimum": 0 }, "id": { "type": "string" }, "name": { "type": "string" }, "ownerAgent": { "type": "string" }, "revision": { "type": "string" }, "state": { "type": "string" }, "supersedes": { "type": "string" }, "updatedAt": { "type": "string", "nullable": true }, "version": { "type": "string" }, "publicationError": { "type": "string" }, "publicationStatus": { "type": "string" } }, "required": [ "actions", "body", "description", "evidenceCount", "id", "name", "ownerAgent", "revision", "state", "supersedes", "updatedAt", "version", "publicationError", "publicationStatus" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/learning-proposals": { "get": { "operationId": "listLearningProposals", "parameters": [ { "schema": { "type": "string" }, "required": false, "name": "cursor", "in": "query" }, { "schema": { "type": "integer", "minimum": 1, "maximum": 200 }, "required": false, "name": "limit", "in": "query" }, { "schema": { "type": "string" }, "required": false, "name": "status", "in": "query" } ], "responses": { "200": { "description": "The daemon-curated learning proposal review queue.", "content": { "application/json": { "schema": { "type": "object", "properties": { "complete": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "properties": { "body": { "type": "string" }, "createdAt": { "type": "string", "nullable": true }, "decisions": { "type": "array", "items": { "type": "object", "properties": { "actor": { "type": "string" }, "at": { "type": "string", "nullable": true }, "kind": { "type": "string" }, "reason": { "type": "string" } }, "required": [ "actor", "at", "kind", "reason" ] } }, "description": { "type": "string" }, "evidenceCount": { "type": "integer", "minimum": 0 }, "id": { "type": "string" }, "key": { "type": "string" }, "kind": { "type": "string" }, "learnedSkillId": { "type": "string" }, "projectScoped": { "type": "boolean" }, "promotionAvailable": { "type": "boolean" }, "promotionUnavailableReason": { "type": "string" }, "status": { "type": "string" }, "title": { "type": "string" }, "triggers": { "type": "array", "items": { "type": "string" } }, "updatedAt": { "type": "string", "nullable": true }, "value": { "type": "string" }, "version": { "type": "string" } }, "required": [ "body", "createdAt", "decisions", "description", "evidenceCount", "id", "key", "kind", "learnedSkillId", "projectScoped", "promotionAvailable", "promotionUnavailableReason", "status", "title", "triggers", "updatedAt", "value", "version" ] } }, "nextCursor": { "type": "string" }, "reason": { "type": "string" }, "supported": { "type": "boolean" } }, "required": [ "complete", "items", "nextCursor", "reason", "supported" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/learning-proposals/{proposalId}": { "get": { "operationId": "getLearningProposal", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "proposalId" } ], "responses": { "200": { "description": "One learning proposal, re-read with each evidence source's current availability.", "content": { "application/json": { "schema": { "type": "object", "properties": { "body": { "type": "string" }, "createdAt": { "type": "string", "nullable": true }, "decisions": { "type": "array", "items": { "type": "object", "properties": { "actor": { "type": "string" }, "at": { "type": "string", "nullable": true }, "kind": { "type": "string" }, "reason": { "type": "string" } }, "required": [ "actor", "at", "kind", "reason" ] } }, "description": { "type": "string" }, "evidenceCount": { "type": "integer", "minimum": 0 }, "id": { "type": "string" }, "key": { "type": "string" }, "kind": { "type": "string" }, "learnedSkillId": { "type": "string" }, "projectScoped": { "type": "boolean" }, "promotionAvailable": { "type": "boolean" }, "promotionUnavailableReason": { "type": "string" }, "status": { "type": "string" }, "title": { "type": "string" }, "triggers": { "type": "array", "items": { "type": "string" } }, "updatedAt": { "type": "string", "nullable": true }, "value": { "type": "string" }, "version": { "type": "string" }, "evidence": { "type": "array", "items": { "type": "object", "properties": { "availability": { "type": "string" }, "available": { "type": "boolean" }, "digest": { "type": "string" }, "eventSeq": { "type": "string" }, "locator": { "type": "string" }, "ordinal": { "type": "integer" }, "preview": { "type": "string" }, "sessionId": { "type": "string" }, "toolCallId": { "type": "string" } }, "required": [ "availability", "available", "digest", "eventSeq", "locator", "ordinal", "preview", "sessionId", "toolCallId" ] } } }, "required": [ "body", "createdAt", "decisions", "description", "evidenceCount", "id", "key", "kind", "learnedSkillId", "projectScoped", "promotionAvailable", "promotionUnavailableReason", "status", "title", "triggers", "updatedAt", "value", "version", "evidence" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "404": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/learning-proposals/{proposalId}/decisions": { "post": { "operationId": "decideLearningProposal", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "proposalId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "decision": { "type": "string", "enum": [ "approve", "reject" ] }, "expectedVersion": { "type": "string", "minLength": 1 }, "reason": { "type": "string", "maxLength": 2000, "default": "" } }, "required": [ "decision", "expectedVersion" ] } } } }, "responses": { "200": { "description": "The proposal after the recorded review decision.", "content": { "application/json": { "schema": { "type": "object", "properties": { "body": { "type": "string" }, "createdAt": { "type": "string", "nullable": true }, "decisions": { "type": "array", "items": { "type": "object", "properties": { "actor": { "type": "string" }, "at": { "type": "string", "nullable": true }, "kind": { "type": "string" }, "reason": { "type": "string" } }, "required": [ "actor", "at", "kind", "reason" ] } }, "description": { "type": "string" }, "evidenceCount": { "type": "integer", "minimum": 0 }, "id": { "type": "string" }, "key": { "type": "string" }, "kind": { "type": "string" }, "learnedSkillId": { "type": "string" }, "projectScoped": { "type": "boolean" }, "promotionAvailable": { "type": "boolean" }, "promotionUnavailableReason": { "type": "string" }, "status": { "type": "string" }, "title": { "type": "string" }, "triggers": { "type": "array", "items": { "type": "string" } }, "updatedAt": { "type": "string", "nullable": true }, "value": { "type": "string" }, "version": { "type": "string" } }, "required": [ "body", "createdAt", "decisions", "description", "evidenceCount", "id", "key", "kind", "learnedSkillId", "projectScoped", "promotionAvailable", "promotionUnavailableReason", "status", "title", "triggers", "updatedAt", "value", "version" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/learning-proposals/{proposalId}/undo": { "post": { "operationId": "undoLearningPromotion", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "proposalId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "expectedVersion": { "type": "string", "minLength": 1 } }, "required": [ "expectedVersion" ] } } } }, "responses": { "200": { "description": "The proposal after its promotion was reverted.", "content": { "application/json": { "schema": { "type": "object", "properties": { "body": { "type": "string" }, "createdAt": { "type": "string", "nullable": true }, "decisions": { "type": "array", "items": { "type": "object", "properties": { "actor": { "type": "string" }, "at": { "type": "string", "nullable": true }, "kind": { "type": "string" }, "reason": { "type": "string" } }, "required": [ "actor", "at", "kind", "reason" ] } }, "description": { "type": "string" }, "evidenceCount": { "type": "integer", "minimum": 0 }, "id": { "type": "string" }, "key": { "type": "string" }, "kind": { "type": "string" }, "learnedSkillId": { "type": "string" }, "projectScoped": { "type": "boolean" }, "promotionAvailable": { "type": "boolean" }, "promotionUnavailableReason": { "type": "string" }, "status": { "type": "string" }, "title": { "type": "string" }, "triggers": { "type": "array", "items": { "type": "string" } }, "updatedAt": { "type": "string", "nullable": true }, "value": { "type": "string" }, "version": { "type": "string" } }, "required": [ "body", "createdAt", "decisions", "description", "evidenceCount", "id", "key", "kind", "learnedSkillId", "projectScoped", "promotionAvailable", "promotionUnavailableReason", "status", "title", "triggers", "updatedAt", "value", "version" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/reflection": { "post": { "operationId": "reflectSession", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" } ], "responses": { "200": { "description": "The completed session reflection receipt.", "content": { "application/json": { "schema": { "type": "object", "properties": { "abstained": { "type": "boolean" }, "conflicted": { "type": "integer", "minimum": 0 }, "disposition": { "type": "string" }, "message": { "type": "string" }, "promoted": { "type": "integer", "minimum": 0 }, "queued": { "type": "integer", "minimum": 0 }, "reason": { "type": "string" }, "reflectionId": { "type": "string" }, "staged": { "type": "integer", "minimum": 0 } }, "required": [ "abstained", "conflicted", "disposition", "message", "promoted", "queued", "reason", "reflectionId", "staged" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/user-memory/consolidation/plans": { "post": { "operationId": "generateMemoryConsolidationPlan", "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "target": { "type": "string", "enum": [ "user_model", "project_memory" ], "default": "user_model" } } } } } }, "responses": { "201": { "description": "A bounded daemon-curated consolidation plan for the requested memory store.", "content": { "application/json": { "schema": { "type": "object", "properties": { "expiresAt": { "type": "string", "nullable": true }, "id": { "type": "string" }, "operations": { "type": "array", "items": { "type": "object", "properties": { "exactDuplicateEligible": { "type": "boolean" }, "kind": { "type": "string" }, "reason": { "type": "string" }, "replacement": { "type": "object", "properties": { "description": { "type": "string" }, "value": { "type": "string" } }, "required": [ "description", "value" ] }, "sources": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "description", "key", "value" ] } }, "survivor": { "type": "object", "properties": { "description": { "type": "string" }, "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "description", "key", "value" ] } }, "required": [ "exactDuplicateEligible", "kind", "reason", "replacement", "sources", "survivor" ] } }, "plannedOperationCount": { "type": "integer", "minimum": 0 }, "plannedSourceCount": { "type": "integer", "minimum": 0 }, "target": { "type": "string", "enum": [ "user_model", "project_memory" ] } }, "required": [ "expiresAt", "id", "operations", "plannedOperationCount", "plannedSourceCount", "target" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/user-memory/consolidation/plans/{planId}/decisions": { "post": { "operationId": "decideMemoryConsolidationPlan", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "planId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "decision": { "type": "string", "enum": [ "apply", "dismiss" ] } }, "required": [ "decision" ] } } } }, "responses": { "200": { "description": "The receipt for applying or dismissing the whole consolidation plan.", "content": { "application/json": { "schema": { "type": "object", "properties": { "applied": { "type": "integer", "minimum": 0 }, "conflicted": { "type": "integer", "minimum": 0 }, "disposition": { "type": "string" }, "failed": { "type": "integer", "minimum": 0 }, "id": { "type": "string" }, "planned": { "type": "integer", "minimum": 0 }, "skipped": { "type": "integer", "minimum": 0 }, "target": { "type": "string", "enum": [ "user_model", "project_memory" ] } }, "required": [ "applied", "conflicted", "disposition", "failed", "id", "planned", "skipped", "target" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "404": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "409": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "410": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/user-memory": { "get": { "operationId": "listUserMemory", "responses": { "200": { "description": "The user-model memory index.", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "key": { "type": "string" } }, "required": [ "description", "key" ] } }, "reason": { "type": "string" }, "sha256": { "type": "string" }, "sizeBytes": { "type": "string" }, "supported": { "type": "boolean" } }, "required": [ "items", "reason", "sha256", "sizeBytes", "supported" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/user-memory/{memoryKey}": { "get": { "operationId": "getUserMemory", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "memoryKey" } ], "responses": { "200": { "description": "One user-model memory entry and its revisions.", "content": { "application/json": { "schema": { "type": "object", "properties": { "current": { "type": "object", "properties": { "description": { "type": "string" }, "key": { "type": "string" }, "origin": { "type": "string" }, "sourceProposalId": { "type": "string" }, "sourceSessionId": { "type": "string" }, "status": { "type": "string" }, "updatedAt": { "type": "string", "nullable": true }, "value": { "type": "string" }, "version": { "type": "string" }, "writer": { "type": "string" } }, "required": [ "description", "key", "origin", "sourceProposalId", "sourceSessionId", "status", "updatedAt", "value", "version", "writer" ] }, "history": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "key": { "type": "string" }, "origin": { "type": "string" }, "sourceProposalId": { "type": "string" }, "sourceSessionId": { "type": "string" }, "status": { "type": "string" }, "updatedAt": { "type": "string", "nullable": true }, "value": { "type": "string" }, "version": { "type": "string" }, "writer": { "type": "string" } }, "required": [ "description", "key", "origin", "sourceProposalId", "sourceSessionId", "status", "updatedAt", "value", "version", "writer" ] } }, "historyAvailable": { "type": "boolean" } }, "required": [ "current", "history", "historyAvailable" ] } } } }, "400": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "404": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "429": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The request could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/soul": { "get": { "operationId": "getSoulInspection", "responses": { "200": { "description": "The connection's resolved soul snapshot.", "content": { "application/json": { "schema": { "type": "object", "properties": { "present": { "type": "boolean" }, "content": { "type": "string" }, "sizeBytes": { "type": "string", "pattern": "^(0|[1-9]\\d*)$" }, "sha256": { "type": "string" }, "provenance": { "type": "string", "enum": [ "unspecified", "user", "project", "driver" ] }, "trusted": { "type": "boolean" }, "drifted": { "type": "boolean" } }, "required": [ "present", "content", "sizeBytes", "sha256", "provenance", "trusted", "drifted" ] } } } }, "400": { "description": "The inspection could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "401": { "description": "The inspection could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The inspection could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The inspection could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The inspection could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/sessions/{sessionId}/worktrees": { "get": { "operationId": "getSessionWorktrees", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "in": "path", "name": "sessionId" } ], "responses": { "200": { "description": "Eligible choices for the owned source session.", "content": { "application/json": { "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "selector": { "type": "string" }, "kind": { "type": "string" }, "label": { "type": "string" }, "branch": { "type": "string" }, "revision": { "type": "string" }, "bare": { "type": "boolean" } }, "required": [ "selector", "kind", "label", "branch", "revision", "bare" ] } } }, "required": [ "items" ] } } } }, "400": { "description": "The inspection could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "401": { "description": "The inspection could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "404": { "description": "The inspection could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "500": { "description": "The inspection could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "The inspection could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The inspection could not be completed.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/settings/runtime": { "get": { "operationId": "getRuntimeSettings", "responses": { "200": { "description": "Safe runtime, provider, and model inventory for settings.", "content": { "application/json": { "schema": { "type": "object", "properties": { "buildId": { "type": "string" }, "management": { "type": "object", "properties": { "providerConfiguration": { "type": "boolean" }, "providerConfigurationReason": { "type": "string" }, "routingConfiguration": { "type": "boolean" }, "routingConfigurationReason": { "type": "string" } }, "required": [ "providerConfiguration", "providerConfigurationReason", "routingConfiguration", "routingConfigurationReason" ] }, "models": { "type": "array", "items": { "type": "object", "properties": { "contextLimit": { "type": "string" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "image": { "type": "boolean" }, "providerDisplayName": { "type": "string" }, "providerId": { "type": "string" }, "reasoning": { "type": "boolean" } }, "required": [ "contextLimit", "displayName", "id", "image", "providerDisplayName", "providerId", "reasoning" ] } }, "modelsReason": { "type": "string" }, "modelsSupported": { "type": "boolean" }, "providerEndpoint": { "type": "string" }, "providers": { "type": "array", "items": { "type": "object", "properties": { "availableNotDefault": { "type": "boolean" }, "defaultModelAutoSelected": { "type": "boolean" }, "displayName": { "type": "string" }, "hint": { "type": "string" }, "id": { "type": "string" }, "modelCount": { "type": "integer", "minimum": 0 }, "state": { "type": "string" } }, "required": [ "availableNotDefault", "defaultModelAutoSelected", "displayName", "hint", "id", "modelCount", "state" ] } }, "serverImplementation": { "type": "string" } }, "required": [ "buildId", "management", "models", "modelsReason", "modelsSupported", "providerEndpoint", "providers", "serverImplementation" ] } } } }, "500": { "description": "The settings inventory could not be read.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/settings/provider": { "get": { "operationId": "getProviderSettings", "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "required": true, "name": "providerId", "in": "query" } ], "responses": { "200": { "description": "Caller-visible provider, models, and safe diagnostic endpoint.", "content": { "application/json": { "schema": { "type": "object", "properties": { "displayEndpoint": { "type": [ "string", "null" ] }, "models": { "type": "array", "items": { "type": "object", "properties": { "contextLimit": { "type": "string" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "image": { "type": "boolean" }, "providerDisplayName": { "type": "string" }, "providerId": { "type": "string" }, "reasoning": { "type": "boolean" } }, "required": [ "contextLimit", "displayName", "id", "image", "providerDisplayName", "providerId", "reasoning" ] } }, "provider": { "type": "object", "properties": { "availableNotDefault": { "type": "boolean" }, "defaultModelAutoSelected": { "type": "boolean" }, "displayName": { "type": "string" }, "hint": { "type": "string" }, "id": { "type": "string" }, "modelCount": { "type": "integer", "minimum": 0 }, "state": { "type": "string" } }, "required": [ "availableNotDefault", "defaultModelAutoSelected", "displayName", "hint", "id", "modelCount", "state" ] } }, "required": [ "displayEndpoint", "models", "provider" ] } } } }, "400": { "description": "The provider ID is missing, empty, or repeated.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "401": { "description": "Sign in before reading provider details in OIDC mode.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "404": { "description": "The provider is absent from the caller-visible inventory.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "501": { "description": "Model selection is unavailable on this deployment.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The runtime or provider information is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } }, "/api/v1/storage/health": { "get": { "operationId": "getStorageHealth", "responses": { "200": { "description": "A plain-words summary of the connected agent's saved chats and runs.", "content": { "application/json": { "schema": { "type": "object", "properties": { "activeJob": { "type": "boolean" }, "available": { "type": "boolean" }, "childCount": { "type": "string" }, "corruptCount": { "type": "string" }, "currentBytes": { "type": "string", "nullable": true }, "lastFailure": { "type": "boolean" }, "mainCount": { "type": "string" }, "reclaimableBytes": { "type": "string", "nullable": true }, "scheduledCount": { "type": "string" }, "sessionCount": { "type": "string" }, "supported": { "type": "boolean" }, "unknownCount": { "type": "string" } }, "required": [ "activeJob", "available", "childCount", "corruptCount", "currentBytes", "lastFailure", "mainCount", "reclaimableBytes", "scheduledCount", "sessionCount", "supported", "unknownCount" ] } } } }, "500": { "description": "The storage health could not be read.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } }, "503": { "description": "The Mecatl runtime is unavailable.", "content": { "application/problem+json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "detail": { "type": "string" }, "instance": { "type": "string" }, "status": { "type": "integer" }, "title": { "type": "string" }, "type": { "type": "string" } }, "required": [ "code", "detail", "instance", "status", "title", "type" ] } } } } } } } } }