{ "openapi": "3.1.0", "info": { "title": "opencode HttpApi", "version": "0.0.1", "description": "Experimental HttpApi surface for selected instance routes." }, "paths": { "/api/info": { "get": { "tags": ["server"], "operationId": "server.info", "parameters": [], "security": [], "responses": { "200": { "description": "ServerInfo", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerInfo" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Return the server identity, connection URLs, paths, and readiness status.", "summary": "Get server info" } }, "/api/pair": { "post": { "tags": ["server"], "operationId": "server.pair", "parameters": [], "security": [], "responses": { "200": { "description": "PairingCode", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PairingCode" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Create a short-lived, single-use code for a /auth/connect/:code pairing link.", "summary": "Create pairing code" } }, "/auth/connect/{code}": { "get": { "tags": ["server"], "operationId": "server.connect", "parameters": [ { "name": "code", "in": "path", "schema": { "type": "string" }, "required": true } ], "security": [], "responses": { "200": { "description": "PairingSession", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PairingSession" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Redeem a pairing code. Browsers receive a session cookie and a redirect to the web app; requests that accept JSON receive a session token to use as the password.", "summary": "Redeem pairing code" } }, "/api/location": { "get": { "tags": ["location"], "operationId": "location.get", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Location.PublicInfo", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Location.PublicInfo" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Resolve the requested location or the server default location.", "summary": "Get location" } }, "/api/location/reload": { "post": { "tags": ["location"], "operationId": "location.reload", "parameters": [], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Shut down and rebuild every loaded location. Pending permissions and forms are cancelled; running sessions continue with fresh services at the next step boundary. Emits location.shutdown for client recovery and responds once all replacement builds settle.", "summary": "Reload configuration" } }, "/api/agent": { "get": { "tags": ["agent"], "operationId": "agent.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Agent.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Retrieve currently registered agents.", "summary": "List agents" } }, "/api/agent/{agentID}": { "get": { "tags": ["agent"], "operationId": "agent.get", "parameters": [ { "name": "agentID", "in": "path", "schema": { "$ref": "#/components/schemas/Agent.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Agent.Info" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "AgentNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/AgentNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Retrieve a single currently registered agent.", "summary": "Get agent" } }, "/api/plugin": { "get": { "tags": ["plugin"], "operationId": "plugin.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Plugin.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Retrieve enabled server plugins and their current status.", "summary": "List plugins" } }, "/api/plugin/gui": { "get": { "tags": ["plugin"], "operationId": "plugin.gui", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true }, { "name": "id", "in": "query", "schema": { "$ref": "#/components/schemas/Plugin.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Plugin.GuiBundle" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "PluginNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/PluginNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Read an active plugin's prebuilt CommonJS `./gui-experimental` bundle. Desktop app windows run its default export; the desktop app's main process runs its `main` export. Fails with not found when no active plugin has the id or the plugin exports no `./gui-experimental`.", "summary": "Read plugin GUI bundle" } }, "/api/plugin/check": { "post": { "tags": ["plugin"], "operationId": "plugin.check", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Plugin.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Check one or all package plugins for available updates.", "summary": "Check plugin updates", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "target": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false } } }, "required": true } } }, "/api/plugin/update": { "post": { "tags": ["plugin"], "operationId": "plugin.update", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Update package plugins concurrently and notify active locations to reload them. Responds once every update has finished; fails when any update fails.", "summary": "Update plugins", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "targets": { "type": "array", "items": { "type": "string" } } }, "required": ["targets"], "additionalProperties": false } } }, "required": true } } }, "/api/session": { "get": { "tags": ["session"], "operationId": "session.list", "parameters": [ { "name": "limit", "in": "query", "schema": { "anyOf": [ { "type": "string" } ], "description": "Maximum number of sessions to return. Defaults to the newest 50 sessions." }, "required": false }, { "name": "order", "in": "query", "schema": { "anyOf": [ { "type": "string", "enum": ["asc", "desc"] } ], "description": "Session order for the first page. Use desc for newest first or asc for oldest first." }, "required": false }, { "name": "search", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "parentID", "in": "query", "schema": { "anyOf": [ { "$ref": "#/components/schemas/Session.ID" }, { "type": "string", "enum": ["null"] } ], "description": "Filter by parent session. Use null to return only root sessions." }, "required": false }, { "name": "archived", "in": "query", "schema": { "type": "string", "enum": ["true", "false"] }, "required": false }, { "name": "directory", "in": "query", "schema": { "$ref": "#/components/schemas/AbsolutePath" }, "required": false }, { "name": "project", "in": "query", "schema": { "$ref": "#/components/schemas/Project.ID" }, "required": false }, { "name": "subpath", "in": "query", "schema": { "$ref": "#/components/schemas/RelativePath" }, "required": false }, { "name": "cursor", "in": "query", "schema": { "$ref": "#/components/schemas/SessionsCursor" }, "required": false } ], "security": [], "responses": { "200": { "description": "SessionsResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionsResponse" } } } }, "400": { "description": "InvalidCursorError | InvalidRequestError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidCursorErrorEncoded" }, { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } ] } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.", "summary": "List sessions" }, "post": { "tags": ["session"], "operationId": "session.create", "parameters": [], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Session.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Create a session at the requested location. A parentID creates a linked child session at its parent's location.", "summary": "Create session", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "anyOf": [ { "$ref": "#/components/schemas/Session.ID" }, { "type": "null" } ] }, "parentID": { "anyOf": [ { "$ref": "#/components/schemas/Session.ID" }, { "type": "null" } ] }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "agent": { "anyOf": [ { "$ref": "#/components/schemas/Agent.ID" }, { "type": "null" } ] }, "model": { "anyOf": [ { "$ref": "#/components/schemas/Model.Ref" }, { "type": "null" } ] }, "location": { "anyOf": [ { "$ref": "#/components/schemas/Location.PublicRef" }, { "type": "null" } ] }, "metadata": { "anyOf": [ { "$ref": "#/components/schemas/Session.Metadata" }, { "type": "null" } ] }, "permissions": { "anyOf": [ { "$ref": "#/components/schemas/Permission.Ruleset" }, { "type": "null" } ] } }, "additionalProperties": false } } }, "required": true } } }, "/api/experimental/session/stats": { "get": { "tags": ["session"], "operationId": "experimental.session.stats", "parameters": [ { "name": "from", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "to", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "project", "in": "query", "schema": { "$ref": "#/components/schemas/Project.ID" }, "required": false }, { "name": "timezone", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "tools", "in": "query", "schema": { "type": "string", "enum": ["none", "summary", "detail"] }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/SessionStats.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Aggregate local session activity, usage, and tool reliability for a time range.", "summary": "Get session statistics" } }, "/api/experimental/session/import": { "post": { "tags": ["session"], "operationId": "experimental.session.import", "parameters": [], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Session.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } }, "409": { "description": "ConflictError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConflictErrorEncoded" } } } } }, "description": "Import a projected session transcript at the requested location. Accepts transcripts exported by earlier releases. If parentID is supplied, the parent session must already exist; import parents before children.", "summary": "Import session", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "info": { "$ref": "#/components/schemas/Session.Info" }, "messages": { "type": "array" }, "location": { "anyOf": [ { "$ref": "#/components/schemas/Location.PublicRef" }, { "type": "null" } ] } }, "required": ["info", "messages"], "additionalProperties": false } } }, "required": true } } }, "/api/experimental/session/{sessionID}/export": { "get": { "tags": ["session"], "operationId": "experimental.session.export", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "sanitize", "in": "query", "schema": { "type": "string", "enum": ["true", "false"] }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/SessionTransfer.Data" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } }, "500": { "description": "UnknownError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnknownErrorEncoded" } } } } }, "description": "Export a complete projected session transcript.", "summary": "Export session" } }, "/api/session/active": { "get": { "tags": ["session"], "operationId": "session.active", "parameters": [], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "patternProperties": { "^ses": { "$ref": "#/components/schemas/SessionActive" } }, "additionalProperties": false } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.", "summary": "List active sessions" } }, "/api/session/{sessionID}": { "get": { "tags": ["session"], "operationId": "session.get", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Session.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Retrieve a session by ID.", "summary": "Get session" }, "delete": { "tags": ["session"], "operationId": "session.remove", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Delete a session and its child sessions.", "summary": "Delete session" }, "patch": { "tags": ["session"], "operationId": "session.update", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Update mutable session properties.", "summary": "Update session", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "metadata": { "anyOf": [ { "$ref": "#/components/schemas/Session.Metadata" }, { "type": "null" } ] }, "permissions": { "anyOf": [ { "$ref": "#/components/schemas/Permission.Ruleset" }, { "type": "null" } ] }, "archived": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Archive the session with true or restore it with false. Repeating the current state is a no-op." } }, "additionalProperties": false } } }, "required": true } } }, "/api/session/{sessionID}/fork": { "post": { "tags": ["session"], "operationId": "session.fork", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Session.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | MessageNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/MessageNotFoundErrorEncoded" } ] } } } } }, "description": "Create a child session by copying projected history before a message. Omit before to copy the full history.", "summary": "Fork session", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "before": { "anyOf": [ { "$ref": "#/components/schemas/Session.Message.ID" }, { "type": "null" } ] } }, "additionalProperties": false } } }, "required": true } } }, "/api/session/{sessionID}/agent": { "post": { "tags": ["session"], "operationId": "session.switchAgent", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Switch the agent used by subsequent provider turns.", "summary": "Switch session agent", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "agent": { "$ref": "#/components/schemas/Agent.ID" } }, "required": ["agent"], "additionalProperties": false } } }, "required": true } } }, "/api/session/{sessionID}/model": { "post": { "tags": ["session"], "operationId": "session.switchModel", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Switch the model used by subsequent provider turns.", "summary": "Switch session model", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "model": { "$ref": "#/components/schemas/Model.Ref" } }, "required": ["model"], "additionalProperties": false } } }, "required": true } } }, "/api/session/{sessionID}/move": { "post": { "tags": ["session"], "operationId": "session.move", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Move a session to another project directory at the requested delivery boundary.", "summary": "Move session", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "directory": { "$ref": "#/components/schemas/AbsolutePath" }, "delivery": { "anyOf": [ { "$ref": "#/components/schemas/Session.Inbox.Delivery" }, { "type": "null" } ] } }, "required": ["directory"], "additionalProperties": false } } }, "required": true } } }, "/api/session/{sessionID}/prompt": { "post": { "tags": ["session"], "operationId": "session.prompt", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Session.Inbox.User" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "409": { "description": "ConflictError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConflictErrorEncoded" } } } } }, "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.", "summary": "Send message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "anyOf": [ { "$ref": "#/components/schemas/Session.Message.ID" }, { "type": "null" } ] }, "text": { "type": "string" }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/PromptInput.FileAttachment" } }, "agents": { "type": "array", "items": { "$ref": "#/components/schemas/Prompt.AgentAttachment" } }, "skills": { "type": "array", "items": { "$ref": "#/components/schemas/PromptInput.SkillAttachment" } }, "metadata": { "type": "object" }, "delivery": { "anyOf": [ { "$ref": "#/components/schemas/Session.Inbox.Delivery" }, { "type": "null" } ] }, "resume": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": ["text"], "additionalProperties": false } } }, "required": true } } }, "/api/session/{sessionID}/command": { "post": { "tags": ["session"], "operationId": "session.command", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | CommandNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/CommandNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "500": { "description": "CommandExecutionError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommandExecutionErrorEncoded" } } } } }, "description": "Execute a slash command callback immediately.", "summary": "Run command", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "text": { "type": "string" }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/PromptInput.FileAttachment" } }, "agents": { "type": "array", "items": { "$ref": "#/components/schemas/Prompt.AgentAttachment" } }, "skills": { "type": "array", "items": { "$ref": "#/components/schemas/PromptInput.SkillAttachment" } }, "delivery": { "anyOf": [ { "$ref": "#/components/schemas/Session.Inbox.Delivery" }, { "type": "null" } ] } }, "required": ["name", "text"], "additionalProperties": false } } }, "required": true } } }, "/api/experimental/session/{sessionID}/skill": { "post": { "tags": ["session"], "operationId": "experimental.session.skill", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | SkillNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/SkillNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Activate a skill for a session by appending a skill message and resuming execution.", "summary": "Activate skill", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Skill.ID" }, "resume": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": ["id"], "additionalProperties": false } } }, "required": true } } }, "/api/session/{sessionID}/synthetic": { "post": { "tags": ["session"], "operationId": "session.synthetic", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Session.Inbox.Synthetic" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } }, "409": { "description": "ConflictError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConflictErrorEncoded" } } } } }, "description": "Durably admit synthetic session input and schedule execution unless resume is false.", "summary": "Add synthetic message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "anyOf": [ { "$ref": "#/components/schemas/Session.Message.ID" }, { "type": "null" } ] }, "text": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "metadata": { "type": "object" }, "delivery": { "anyOf": [ { "$ref": "#/components/schemas/Session.Inbox.Delivery" }, { "type": "null" } ] }, "resume": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": ["text"], "additionalProperties": false } } }, "required": true } } }, "/api/session/{sessionID}/shell": { "post": { "tags": ["session"], "operationId": "session.shell", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Execute one shell command in the session's working directory. Emits a shell.started event before execution and a shell.ended event with the merged output after.", "summary": "Run shell command", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "anyOf": [ { "$ref": "#/components/schemas/Session.Message.ID" }, { "type": "null" } ] }, "command": { "type": "string" } }, "required": ["command"], "additionalProperties": false } } }, "required": true } } }, "/api/session/{sessionID}/compact": { "post": { "tags": ["session"], "operationId": "session.compact", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Session.Inbox.Compaction" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } }, "409": { "description": "ConflictError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConflictErrorEncoded" } } } } }, "description": "Durably admit a session compaction request. Steers by default: it runs at the next step boundary instead of waiting behind queued prompts.", "summary": "Compact session", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "anyOf": [ { "$ref": "#/components/schemas/Session.Message.ID" }, { "type": "null" } ] }, "delivery": { "anyOf": [ { "$ref": "#/components/schemas/Session.Inbox.Delivery" }, { "type": "null" } ] } }, "additionalProperties": false } } }, "required": true } } }, "/api/experimental/session/{sessionID}/wait": { "post": { "tags": ["session"], "operationId": "experimental.session.wait", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Wait for a session agent loop to become idle.", "summary": "Wait for session" } }, "/api/session/{sessionID}/revert/stage": { "post": { "tags": ["session"], "operationId": "session.revert.stage", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Session.Revert" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "MessageNotFoundError | SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/MessageNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "409": { "description": "SessionBusyError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionBusyErrorEncoded" } } } }, "500": { "description": "UnknownError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnknownErrorEncoded" } } } } }, "description": "Stage or move a reversible session boundary and optionally apply its file changes.", "summary": "Stage session revert", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "messageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "files": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": ["messageID"], "additionalProperties": false } } }, "required": true } } }, "/api/session/{sessionID}/revert": { "delete": { "tags": ["session"], "operationId": "session.revert.clear", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "409": { "description": "SessionBusyError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionBusyErrorEncoded" } } } }, "500": { "description": "UnknownError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnknownErrorEncoded" } } } } }, "summary": "Clear staged revert" } }, "/api/session/{sessionID}/revert/commit": { "post": { "tags": ["session"], "operationId": "session.revert.commit", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } }, "409": { "description": "SessionBusyError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionBusyErrorEncoded" } } } } }, "summary": "Commit staged revert" } }, "/api/session/{sessionID}/context": { "get": { "tags": ["session"], "operationId": "session.context", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Session.Message.Info" } } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } }, "500": { "description": "UnknownError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnknownErrorEncoded" } } } } }, "description": "Retrieve the active context messages for a session (all messages after the last compaction).", "summary": "Get session context" } }, "/api/session/{sessionID}/diff": { "get": { "tags": ["session"], "operationId": "session.diff", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "from", "in": "query", "schema": { "anyOf": [ { "$ref": "#/components/schemas/Session.Message.ID" } ], "description": "User message whose turn to diff. Defaults to the turn of the newest user message." }, "required": false }, { "name": "to", "in": "query", "schema": { "anyOf": [ { "$ref": "#/components/schemas/Session.Message.ID" } ], "description": "Later user message whose turn ends the range. Defaults to the turn of `from` alone." }, "required": false }, { "name": "context", "in": "query", "schema": { "anyOf": [ { "type": "string" } ], "description": "Unchanged lines around each hunk. Omit for full-file patches." }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/FileDiff.Info" } } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "MessageNotFoundError | SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/MessageNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "500": { "description": "UnknownError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnknownErrorEncoded" } } } } }, "description": "Structured per-file diffs of the files a turn changed. A turn runs from the first prompt after the session was last idle until its next idle marker, so prompts steered in while it was busy belong to the same turn; `to` extends the range through a later turn. Compares the range's first recorded snapshot with its last; a step still running in the active session compares against the working copy. Ranges that span a location change are rejected. In sessions without any idle marker, a prompt's turn spans until the next user message.", "summary": "Diff session turns" } }, "/api/session/{sessionID}/inbox": { "get": { "tags": ["session"], "operationId": "session.inbox.list", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Session.Inbox.Info" } } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "List durable enqueued session work not yet delivered, ordered by enqueue sequence. Includes user, synthetic, compaction, and move items.", "summary": "List session inbox" } }, "/api/session/{sessionID}/inbox/{inboxID}": { "delete": { "tags": ["session"], "operationId": "session.inbox.cancel", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "inboxID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.Message.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Cancel an inbox item that has not yet been delivered. Unavailable items are a no-op.", "summary": "Cancel inbox input" }, "patch": { "tags": ["session"], "operationId": "session.inbox.update", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "inboxID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.Message.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } }, "409": { "description": "ConflictError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConflictErrorEncoded" } } } } }, "description": "Change a pending inbox item's delivery mode. Steering wakes session execution.", "summary": "Update inbox item", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "delivery": { "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, "required": ["delivery"], "additionalProperties": false } } }, "required": true } } }, "/api/experimental/session/{sessionID}/instructions/entries": { "get": { "tags": ["session"], "operationId": "experimental.session.instructions.entry.list", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/InstructionEntry.Info" } } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "List API-managed instruction entries attached to the session.", "summary": "List instruction entries" } }, "/api/experimental/session/{sessionID}/instructions/entries/{key}": { "put": { "tags": ["session"], "operationId": "experimental.session.instructions.entry.put", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "key", "in": "path", "schema": { "$ref": "#/components/schemas/InstructionEntry.Key" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } }, "413": { "description": "InstructionEntryValueTooLargeError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstructionEntryValueTooLargeErrorEncoded" } } } } }, "description": "Attach or replace one durable instruction entry. Changes announce as updates at the next step boundary.", "summary": "Put instruction entry", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "value": {} }, "required": ["value"], "additionalProperties": false } } }, "required": true } }, "delete": { "tags": ["session"], "operationId": "experimental.session.instructions.entry.remove", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "key", "in": "path", "schema": { "$ref": "#/components/schemas/InstructionEntry.Key" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Remove one instruction entry; the removal is announced to the model at the next step boundary.", "summary": "Remove instruction entry" } }, "/api/session/{sessionID}/generate": { "post": { "tags": ["session"], "operationId": "session.generate", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "SessionGenerateResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionGenerateResponse" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Generate transient text from the current session context without mutating session history.", "summary": "Generate text from session context", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "prompt": { "type": "string" } }, "required": ["prompt"], "additionalProperties": false } } }, "required": true } } }, "/api/experimental/session/{sessionID}/log": { "get": { "tags": ["session"], "operationId": "experimental.session.log", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "after", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "follow", "in": "query", "schema": { "type": "string", "enum": ["true", "false"] }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "text/event-stream": { "schema": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "event": { "type": "string" }, "data": { "$ref": "#/components/schemas/SessionLogItemEncoded" } }, "required": ["event", "data"], "additionalProperties": false }, "x-effect-stream": { "encoding": "sse", "causeSchema": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["Fail"] }, "error": { "not": {} } }, "required": ["_tag", "error"], "additionalProperties": false }, { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["Die"] }, "defect": {} }, "required": ["_tag", "defect"], "additionalProperties": false }, { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["Interrupt"] }, "fiberId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": ["_tag", "fiberId"], "additionalProperties": false } ] } }, "errorSchema": { "not": {} }, "failureEvent": "effect/http-api/stream/failure" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Experimental durable session event log. Reads events after an exclusive aggregate sequence and continues with live events when follow=true.", "summary": "Read the session log" } }, "/api/session/{sessionID}/interrupt": { "post": { "tags": ["session"], "operationId": "session.interrupt", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "resume", "in": "query", "schema": { "type": "string", "enum": ["true", "false"] }, "required": false } ], "security": [], "responses": { "200": { "description": "SessionInterruptResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionInterruptResponse" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Interrupt active execution owned by this OpenCode process. Returns interrupted=true when an active execution was interrupted and false for the idle no-op. When resume=true, execution resumes pending steering input and next-in-line control items (manual compaction, moves) while queued prompts remain parked.", "summary": "Interrupt session execution" } }, "/api/session/{sessionID}/background": { "post": { "tags": ["session"], "operationId": "session.background", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Move active foreground backgroundable tools for this session into background observation. Idle requests are a no-op.", "summary": "Background blocking session tools" } }, "/api/session/{sessionID}/message/{messageID}": { "get": { "tags": ["session"], "operationId": "session.message.get", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "messageID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.Message.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Session.Message.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | MessageNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/MessageNotFoundErrorEncoded" } ] } } } } }, "description": "Retrieve one projected message owned by the Session.", "summary": "Get session message" } }, "/api/session/{sessionID}/form": { "get": { "tags": ["session"], "operationId": "session.form.list", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "type": "string" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Form.Info" } } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Retrieve pending forms for a session.", "summary": "List session forms" }, "post": { "tags": ["session"], "operationId": "session.form.create", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "type": "string" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Form.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "409": { "description": "ConflictError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConflictErrorEncoded" } } } } }, "description": "Create a form for a session.", "summary": "Create session form", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Form.CreatePayload" } } }, "required": true } } }, "/api/session/{sessionID}/form/{formID}": { "get": { "tags": ["session"], "operationId": "session.form.get", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "type": "string" }, "required": true }, { "name": "formID", "in": "path", "schema": { "$ref": "#/components/schemas/Form.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Form.Detail" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | FormNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/FormNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Retrieve a form and its current state for a session.", "summary": "Get session form" }, "delete": { "tags": ["session"], "operationId": "session.form.cancel", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "type": "string" }, "required": true }, { "name": "formID", "in": "path", "schema": { "$ref": "#/components/schemas/Form.ID" }, "required": true }, { "name": "message", "in": "query", "schema": { "type": "string" }, "required": false } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | FormNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/FormNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "409": { "description": "FormAlreadySettledError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormAlreadySettledErrorEncoded" } } } } }, "description": "Cancel a pending form, optionally telling the asker why it was not answered.", "summary": "Cancel form" } }, "/api/session/{sessionID}/form/{formID}/reply": { "post": { "tags": ["session"], "operationId": "session.form.reply", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "type": "string" }, "required": true }, { "name": "formID", "in": "path", "schema": { "$ref": "#/components/schemas/Form.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "FormInvalidAnswerError | InvalidRequestError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/FormInvalidAnswerErrorEncoded" }, { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } ] } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | FormNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/FormNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "409": { "description": "FormAlreadySettledError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FormAlreadySettledErrorEncoded" } } } } }, "description": "Submit an answer to a pending form.", "summary": "Reply to form", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Form.Reply" } } }, "required": true } } }, "/api/session/{sessionID}/environment": { "put": { "tags": ["session"], "operationId": "session.environment", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Replace the process environment used by local shell commands for this session.", "summary": "Set session environment", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "variables": { "type": "object", "additionalProperties": { "type": "string" } } }, "required": ["variables"], "additionalProperties": false } } }, "required": true } } }, "/api/session/{sessionID}/view": { "post": { "tags": ["session"], "operationId": "session.view", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Mark the idle transition observed by the viewer as viewed.", "summary": "View session", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "idle": { "type": "number" } }, "required": ["idle"], "additionalProperties": false } } }, "required": true } } }, "/api/session/{sessionID}/message": { "get": { "tags": ["session"], "operationId": "session.message.list", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "limit", "in": "query", "schema": { "anyOf": [ { "type": "string" } ], "description": "Maximum number of messages to return. When omitted, the endpoint returns its default page size." }, "required": false }, { "name": "order", "in": "query", "schema": { "anyOf": [ { "type": "string", "enum": ["asc", "desc"] } ], "description": "Message order for the first page. Use desc for newest first or asc for oldest first." }, "required": false }, { "name": "cursor", "in": "query", "schema": { "type": "string", "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order." }, "required": false }, { "name": "type", "in": "query", "schema": { "anyOf": [ { "type": "string", "enum": [ "agent-switched", "model-switched", "location-switched", "user", "synthetic", "system", "skill", "shell", "assistant", "compaction", "idle" ] } ], "description": "Filter by message type before pagination. When omitted, all message types are returned. Pass the same type when following cursors." }, "required": false } ], "security": [], "responses": { "200": { "description": "SessionMessagesResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionMessagesResponse" } } } }, "400": { "description": "InvalidCursorError | InvalidRequestError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/InvalidCursorErrorEncoded" }, { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } ] } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } }, "500": { "description": "UnknownError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnknownErrorEncoded" } } } } }, "description": "Retrieve projected messages for a session, optionally filtered by type. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline, passing the same type filter on each page.", "summary": "Get session messages" } }, "/api/model": { "get": { "tags": ["model"], "operationId": "model.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true }, { "name": "types", "in": "query", "schema": { "anyOf": [ { "$ref": "#/components/schemas/Model.Type" }, { "type": "array", "items": { "$ref": "#/components/schemas/Model.Type" } } ], "description": "Only list models of these types. Defaults to chat, the only type offered for sessions." }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Model.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Retrieve the current snapshot of available models of the requested types, chat by default, ordered by release date within each type. The snapshot may precede initial plugin settlement.", "summary": "List models" } }, "/api/model/default": { "get": { "tags": ["model"], "operationId": "model.default", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "anyOf": [ { "$ref": "#/components/schemas/Model.Info" }, { "type": "null" } ] } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Retrieve the model used when a session has no explicit model selection.", "summary": "Get default model" } }, "/api/experimental/generate/text": { "post": { "tags": ["generate"], "operationId": "experimental.generate.text", "parameters": [], "security": [], "responses": { "200": { "description": "GenerateTextResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateTextResponse" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "ProviderNotFoundError | ModelNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ProviderNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/ModelNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "422": { "description": "UnsupportedModelError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnsupportedModelErrorEncoded" } } } }, "502": { "description": "ProviderRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProviderRequestErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Run one stateless model generation using the server's base configuration and return the assistant text. Uses the base configuration's default model when none is specified.", "summary": "Generate text", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "prompt": { "type": "string" }, "model": { "anyOf": [ { "$ref": "#/components/schemas/Model.Ref" }, { "type": "null" } ] } }, "required": ["prompt"], "additionalProperties": false } } }, "required": true } } }, "/api/experimental/generate": { "post": { "tags": ["generate"], "operationId": "experimental.generate.textLegacy", "parameters": [], "security": [], "responses": { "200": { "description": "GenerateTextResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateTextResponse" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "ProviderNotFoundError | ModelNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ProviderNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/ModelNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "422": { "description": "UnsupportedModelError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnsupportedModelErrorEncoded" } } } }, "502": { "description": "ProviderRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProviderRequestErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Deprecated alias of POST /api/experimental/generate/text.", "summary": "Generate text (deprecated path)", "deprecated": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "prompt": { "type": "string" }, "model": { "anyOf": [ { "$ref": "#/components/schemas/Model.Ref" }, { "type": "null" } ] } }, "required": ["prompt"], "additionalProperties": false } } }, "required": true } } }, "/api/experimental/generate/image": { "post": { "tags": ["generate"], "operationId": "experimental.generate.image", "parameters": [], "security": [], "responses": { "200": { "description": "GenerateImageResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateImageResponse" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "ProviderNotFoundError | ModelNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ProviderNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/ModelNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "422": { "description": "UnsupportedModelError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnsupportedModelErrorEncoded" } } } }, "502": { "description": "ProviderRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProviderRequestErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Generate or edit images with an image model using the server's base configuration and return them as base64. Stateless: nothing is stored.", "summary": "Generate images", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Generate.ImageRequest" } } }, "required": true } } }, "/api/experimental/generate/decisions": { "post": { "tags": ["generate"], "operationId": "experimental.generate.decisions", "parameters": [], "security": [], "responses": { "200": { "description": "GenerateDecisionsResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateDecisionsResponse" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "ProviderNotFoundError | ModelNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ProviderNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/ModelNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "422": { "description": "UnsupportedModelError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnsupportedModelErrorEncoded" } } } }, "502": { "description": "ProviderRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProviderRequestErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Ask a decision model typed predicate, choice and score questions about the input and return one probability-bearing answer per question, in question order. Stateless: nothing is stored.", "summary": "Generate decisions", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Generate.DecisionRequest" } } }, "required": true } } }, "/api/experimental/voice/models": { "get": { "tags": ["voice"], "operationId": "experimental.voice.models", "parameters": [], "security": [], "responses": { "200": { "description": "VoiceModelsResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceModelsResponse" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "List supported voice models, their transports, and whether the server has a usable API key for each provider.", "summary": "List voice models" } }, "/api/experimental/voice/session": { "post": { "tags": ["voice"], "operationId": "experimental.voice.session", "parameters": [], "security": [], "responses": { "200": { "description": "VoiceSessionResponse", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceSessionResponse" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Create a server-brokered voice session using the server's configured provider credentials and return the WebRTC SDP answer or WebSocket ephemeral token.", "summary": "Create voice session", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "model": { "type": "string" }, "session": { "anyOf": [ { "type": "object" }, { "type": "null" } ] }, "transport": { "$ref": "#/components/schemas/VoiceTransportInput" } }, "required": ["model", "transport"], "additionalProperties": false } } }, "required": true } } }, "/api/provider": { "get": { "tags": ["provider"], "operationId": "provider.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Provider.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Retrieve active AI providers so clients can show provider availability and configuration.", "summary": "List providers" } }, "/api/provider/{providerID}": { "get": { "tags": ["provider"], "operationId": "provider.get", "parameters": [ { "name": "providerID", "in": "path", "schema": { "$ref": "#/components/schemas/Provider.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Provider.Info" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "ProviderNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ProviderNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.", "summary": "Get provider" } }, "/api/integration": { "get": { "tags": ["integration"], "operationId": "integration.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Integration.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Retrieve available integrations and their authentication methods.", "summary": "List integrations" } }, "/api/integration/{integrationID}": { "get": { "tags": ["integration"], "operationId": "integration.get", "parameters": [ { "name": "integrationID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Integration.Info" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "IntegrationNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/IntegrationNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Retrieve one integration and its authentication methods.", "summary": "Get integration" } }, "/api/experimental/integration/wellknown": { "post": { "tags": ["integration"], "operationId": "experimental.integration.wellknown.add", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Discover and persist an experimental wellknown integration source.", "summary": "Add wellknown integration", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string" } }, "required": ["url"], "additionalProperties": false } } }, "required": true } } }, "/api/integration/{integrationID}/connect/key": { "post": { "tags": ["integration"], "operationId": "integration.connect.key", "parameters": [ { "name": "integrationID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "IntegrationNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/IntegrationNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Run a key authentication method and store the resulting credential.", "summary": "Connect with key", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "string" }, "answer": { "anyOf": [ { "$ref": "#/components/schemas/Form.Answer" }, { "type": "null" } ] }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["key"], "additionalProperties": false } } }, "required": true } } }, "/api/integration/{integrationID}/connect/external": { "post": { "tags": ["integration"], "operationId": "integration.connect.external", "parameters": [ { "name": "integrationID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "IntegrationNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/IntegrationNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Run an external authentication method and store a reference to its credential source.", "summary": "Connect with external credentials", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "methodID": { "$ref": "#/components/schemas/Integration.MethodID" }, "answer": { "anyOf": [ { "$ref": "#/components/schemas/Form.Answer" }, { "type": "null" } ] }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["methodID"], "additionalProperties": false } } }, "required": true } } }, "/api/integration/{integrationID}/connect/oauth": { "post": { "tags": ["integration"], "operationId": "integration.oauth.connect", "parameters": [ { "name": "integrationID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Integration.AttemptEncoded" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Start an OAuth attempt and return the authorization details.", "summary": "Begin OAuth connection", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "methodID": { "$ref": "#/components/schemas/Integration.MethodID" }, "answer": { "anyOf": [ { "$ref": "#/components/schemas/Form.Answer" }, { "type": "null" } ] }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["methodID"], "additionalProperties": false } } }, "required": true } } }, "/api/integration/{integrationID}/connect/oauth/{attemptID}": { "get": { "tags": ["integration"], "operationId": "integration.oauth.status", "parameters": [ { "name": "integrationID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.ID" }, "required": true }, { "name": "attemptID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.AttemptID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Integration.AttemptStatus" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "IntegrationNotFoundError | IntegrationAttemptNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/IntegrationNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/IntegrationAttemptNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Poll the current status of an OAuth attempt.", "summary": "Get OAuth attempt status" }, "delete": { "tags": ["integration"], "operationId": "integration.oauth.cancel", "parameters": [ { "name": "integrationID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.ID" }, "required": true }, { "name": "attemptID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.AttemptID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Cancel an OAuth attempt and release its resources.", "summary": "Cancel OAuth connection" } }, "/api/integration/{integrationID}/connect/oauth/{attemptID}/complete": { "post": { "tags": ["integration"], "operationId": "integration.oauth.complete", "parameters": [ { "name": "integrationID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.ID" }, "required": true }, { "name": "attemptID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.AttemptID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "IntegrationNotFoundError | IntegrationAttemptNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/IntegrationNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/IntegrationAttemptNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Complete a code-based OAuth attempt and store the resulting credential.", "summary": "Complete OAuth connection", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false } } }, "required": true } } }, "/api/integration/{integrationID}/connect/command": { "post": { "tags": ["integration"], "operationId": "integration.command.connect", "parameters": [ { "name": "integrationID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Integration.CommandAttempt" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "IntegrationNotFoundError | IntegrationMethodNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/IntegrationNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/IntegrationMethodNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Start a command authentication attempt.", "summary": "Begin command connection", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "methodID": { "$ref": "#/components/schemas/Integration.MethodID" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["methodID"], "additionalProperties": false } } }, "required": true } } }, "/api/integration/{integrationID}/connect/command/{attemptID}": { "get": { "tags": ["integration"], "operationId": "integration.command.status", "parameters": [ { "name": "integrationID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.ID" }, "required": true }, { "name": "attemptID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.AttemptID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Integration.CommandAttemptStatus" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "IntegrationNotFoundError | IntegrationAttemptNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/IntegrationNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/IntegrationAttemptNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Poll the current status and output of a command authentication attempt.", "summary": "Get command attempt status" }, "delete": { "tags": ["integration"], "operationId": "integration.command.cancel", "parameters": [ { "name": "integrationID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.ID" }, "required": true }, { "name": "attemptID", "in": "path", "schema": { "$ref": "#/components/schemas/Integration.AttemptID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Cancel a command authentication attempt and terminate its process.", "summary": "Cancel command connection" } }, "/api/mcp": { "get": { "tags": ["mcp"], "operationId": "mcp.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Mcp.Server" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Retrieve configured MCP servers and their connection status.", "summary": "List MCP servers" } }, "/api/experimental/mcp/{server}": { "put": { "tags": ["mcp"], "operationId": "experimental.mcp.add", "parameters": [ { "name": "server", "in": "path", "schema": { "type": "string" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Add an MCP server at runtime or replace an existing one, connecting it immediately.", "summary": "Add MCP server", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "config": { "anyOf": [ { "$ref": "#/components/schemas/Mcp.LocalConfigEncoded" }, { "$ref": "#/components/schemas/Mcp.RemoteConfigEncoded" } ] } }, "required": ["config"], "additionalProperties": false } } }, "required": true } }, "delete": { "tags": ["mcp"], "operationId": "experimental.mcp.remove", "parameters": [ { "name": "server", "in": "path", "schema": { "type": "string" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "McpServerNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/McpServerNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Stop an MCP server and remove it from the runtime set until restart.", "summary": "Remove MCP server" } }, "/api/experimental/mcp/{server}/connect": { "post": { "tags": ["mcp"], "operationId": "experimental.mcp.connect", "parameters": [ { "name": "server", "in": "path", "schema": { "type": "string" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "McpServerNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/McpServerNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Connect an MCP server at runtime, overriding a disabled configuration until restart.", "summary": "Connect MCP server" } }, "/api/experimental/mcp/{server}/disconnect": { "post": { "tags": ["mcp"], "operationId": "experimental.mcp.disconnect", "parameters": [ { "name": "server", "in": "path", "schema": { "type": "string" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "McpServerNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/McpServerNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Disconnect an MCP server at runtime, removing its tools until reconnected.", "summary": "Disconnect MCP server" } }, "/api/mcp/resource": { "get": { "tags": ["mcp"], "operationId": "mcp.resource.catalog", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Mcp.ResourceCatalog" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Retrieve resources and resource templates from connected MCP servers.", "summary": "List MCP resources" } }, "/api/experimental/client-mcp/token": { "post": { "tags": ["mcp"], "operationId": "experimental.mcp.client.token", "parameters": [ { "name": "x-opencode-ticket", "in": "header", "schema": { "type": "string" }, "required": false }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true }, { "name": "name", "in": "query", "schema": { "type": "string" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/PtyTicket.ConnectToken" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Create a short-lived single-use ticket for opening a client MCP WebSocket connection from a browser.", "summary": "Create client MCP WebSocket token" } }, "/api/experimental/client-mcp": { "get": { "tags": ["mcp"], "operationId": "experimental.mcp.client", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false }, { "name": "name", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "ticket", "in": "query", "schema": { "type": "string" }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Upgrade to a WebSocket over which the client hosts an MCP server named after `name`; its tools stay available while the socket is open. One JSON-RPC message per text frame. Experimental: may change without compatibility guarantees.", "summary": "Attach client MCP server", "x-websocket": true } }, "/api/credential": { "get": { "tags": ["credential"], "operationId": "credential.list", "parameters": [], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Credential.Entry" } } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "List every stored integration credential, including its secret value.", "summary": "List credentials" }, "post": { "tags": ["credential"], "operationId": "credential.create", "parameters": [], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Credential.Entry" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "409": { "description": "ConflictError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConflictErrorEncoded" } } } } }, "description": "Store an integration credential. It becomes the integration's active credential unless activate is false and the integration already has one. Fails with a conflict when the requested ID already exists, and with an invalid request when an `integration.connect` policy denies the integration.", "summary": "Create credential", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Credential.CreateInput" } } }, "required": true } } }, "/api/credential/{credentialID}": { "patch": { "tags": ["credential"], "operationId": "credential.update", "parameters": [ { "name": "credentialID", "in": "path", "schema": { "$ref": "#/components/schemas/Credential.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Update a stored credential label.", "summary": "Update credential", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "label": { "type": "string" } }, "required": ["label"], "additionalProperties": false } } }, "required": true } }, "delete": { "tags": ["credential"], "operationId": "credential.remove", "parameters": [ { "name": "credentialID", "in": "path", "schema": { "$ref": "#/components/schemas/Credential.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Remove a stored integration credential.", "summary": "Remove credential" } }, "/api/credential/{credentialID}/activate": { "post": { "tags": ["credential"], "operationId": "credential.activate", "parameters": [ { "name": "credentialID", "in": "path", "schema": { "$ref": "#/components/schemas/Credential.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Activate a stored integration credential.", "summary": "Activate credential" } }, "/api/project": { "get": { "tags": ["project"], "operationId": "project.list", "parameters": [ { "name": "archived", "in": "query", "schema": { "type": "string", "enum": ["true", "false"] }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Project" } } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "List known projects. Archived projects are excluded unless archived=true.", "summary": "List projects" } }, "/api/project/{projectID}": { "patch": { "tags": ["project"], "operationId": "project.update", "parameters": [ { "name": "projectID", "in": "path", "schema": { "$ref": "#/components/schemas/Project.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Project", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Project" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "ProjectNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectNotFoundErrorEncoded" } } } } }, "description": "Update the project canonical directory, display metadata, and workspace commands.", "summary": "Update project", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "canonical": { "$ref": "#/components/schemas/AbsolutePath" }, "name": { "type": "string" }, "icon": { "$ref": "#/components/schemas/Project.Icon" }, "commands": { "$ref": "#/components/schemas/Project.Commands" } }, "additionalProperties": false } } }, "required": true } } }, "/api/form": { "get": { "tags": ["form"], "operationId": "form.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Form.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Retrieve pending forms for a location.", "summary": "List pending forms" } }, "/api/permission/request": { "get": { "tags": ["permission"], "operationId": "permission.request.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Permission.Request" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Retrieve pending permission requests for a location.", "summary": "List pending permission requests" } }, "/api/permission/saved": { "get": { "tags": ["permission"], "operationId": "permission.saved.list", "parameters": [ { "name": "projectID", "in": "query", "schema": { "$ref": "#/components/schemas/Project.ID" }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/PermissionSaved.Info" } } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Retrieve saved permissions, optionally filtered by project.", "summary": "List saved permissions" } }, "/api/permission/saved/{id}": { "patch": { "tags": ["permission"], "operationId": "permission.saved.update", "parameters": [ { "name": "id", "in": "path", "schema": { "$ref": "#/components/schemas/PermissionSaved.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/PermissionSaved.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "PermissionSavedNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermissionSavedNotFoundErrorEncoded" } } } }, "409": { "description": "ConflictError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConflictErrorEncoded" } } } } }, "description": "Change the action or resource of a saved permission. Fails with a conflict when the project already has a saved permission with the same action and resource.", "summary": "Update saved permission", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "resource": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false } } }, "required": true } }, "delete": { "tags": ["permission"], "operationId": "permission.saved.remove", "parameters": [ { "name": "id", "in": "path", "schema": { "$ref": "#/components/schemas/PermissionSaved.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Remove a saved permission by ID.", "summary": "Remove saved permission" } }, "/api/session/{sessionID}/permission": { "post": { "tags": ["permission"], "operationId": "session.permission.create", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Permission.ID" }, "effect": { "$ref": "#/components/schemas/Permission.Effect" } }, "required": ["id", "effect"], "additionalProperties": false } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Evaluate and, when approval is required, create a permission request for a session.", "summary": "Create permission request", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "anyOf": [ { "$ref": "#/components/schemas/Permission.ID" }, { "type": "null" } ] }, "action": { "type": "string" }, "resources": { "type": "array", "items": { "type": "string" } }, "save": { "type": "array", "items": { "type": "string" } }, "metadata": { "type": "object" }, "source": { "$ref": "#/components/schemas/Permission.Source" }, "agent": { "anyOf": [ { "$ref": "#/components/schemas/Agent.ID" }, { "type": "null" } ] } }, "required": ["action", "resources"], "additionalProperties": false } } }, "required": true } }, "get": { "tags": ["permission"], "operationId": "session.permission.list", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Permission.Request" } } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Retrieve pending permission requests owned by a session.", "summary": "List session permission requests" } }, "/api/session/{sessionID}/permission/{requestID}": { "get": { "tags": ["permission"], "operationId": "session.permission.get", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "requestID", "in": "path", "schema": { "$ref": "#/components/schemas/Permission.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Permission.Request" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | PermissionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/PermissionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Retrieve a pending permission request owned by a session.", "summary": "Get permission request" } }, "/api/session/{sessionID}/permission/{requestID}/reply": { "post": { "tags": ["permission"], "operationId": "session.permission.reply", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "requestID", "in": "path", "schema": { "$ref": "#/components/schemas/Permission.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | PermissionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/PermissionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Respond to a pending permission request owned by a session.", "summary": "Reply to pending permission request", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "decision": { "$ref": "#/components/schemas/Permission.Reply" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["decision"], "additionalProperties": false } } }, "required": true } } }, "/api/fs/read/*": { "get": { "tags": ["filesystem"], "operationId": "fs.read", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "FileNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/FileNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Stream one file relative to the requested location with ETag, Last-Modified, and single-range HTTP Range support (206 Partial Content, 416 Range Not Satisfiable, and 304 Not Modified; multi-range and malformed Range headers fall back to 200).", "summary": "Read file" } }, "/api/fs/list": { "get": { "tags": ["filesystem"], "operationId": "fs.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true }, { "name": "path", "in": "query", "schema": { "anyOf": [ { "type": "string" } ], "description": "An absolute path or a path relative to the requested location. Defaults to the location directory." }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/FileSystem.Entry" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "FileNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/FileNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "List direct children using an absolute path or a path relative to the requested location, including parents and siblings outside its directory. Entry paths remain relative to the requested location; listing does not switch locations.", "summary": "List directory" } }, "/api/fs/find": { "get": { "tags": ["filesystem"], "operationId": "fs.find", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true }, { "name": "query", "in": "query", "schema": { "type": "string" }, "required": true }, { "name": "type", "in": "query", "schema": { "type": "string", "enum": ["file", "directory"] }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string" }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/FileSystem.Entry" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Find recursively ranked filesystem entries relative to the requested location.", "summary": "Find files" } }, "/api/experimental/fs/write": { "post": { "tags": ["filesystem"], "operationId": "experimental.fs.write", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true }, { "name": "path", "in": "query", "schema": { "type": "string", "description": "An absolute path or a path relative to the requested location. Missing parent directories are created." }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/FileSystem.Write" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Write the raw request body to an absolute path or a path relative to the requested location, creating parent directories, and return the resolved absolute path. Unlike read, the target is not confined to the location. Experimental: may change without compatibility guarantees.", "summary": "Write file", "requestBody": { "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } }, "required": true } } }, "/api/experimental/fs/watch": { "post": { "tags": ["filesystem"], "operationId": "experimental.fs.watch", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "FileNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/FileNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Watch one file relative to the requested location for 24 hours, publishing filesystem.changed on that location when it changes. Watching an already watched file resets its expiry. Paths follow read confinement. Experimental: may change without compatibility guarantees.", "summary": "Watch file", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "path": { "type": "string", "description": "A file path relative to the requested location." } }, "required": ["path"], "additionalProperties": false } } }, "required": true } }, "delete": { "tags": ["filesystem"], "operationId": "experimental.fs.unwatch", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Stop watching one file relative to the requested location. Experimental: may change without compatibility guarantees.", "summary": "Unwatch file", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "path": { "type": "string", "description": "A file path relative to the requested location." } }, "required": ["path"], "additionalProperties": false } } }, "required": true } } }, "/api/command": { "get": { "tags": ["command"], "operationId": "command.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Command.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Retrieve currently registered commands.", "summary": "List commands" } }, "/api/skill": { "get": { "tags": ["skill"], "operationId": "skill.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Skill.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Retrieve currently registered skills.", "summary": "List skills" } }, "/api/rpc/{rpcID}/{method}": { "post": { "tags": ["rpc"], "operationId": "rpc.call", "parameters": [ { "name": "rpcID", "in": "path", "schema": { "type": "string" }, "required": true }, { "name": "method", "in": "path", "schema": { "type": "string" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Rpc.Output", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Rpc.Output" } } } }, "400": { "description": "RpcError | InvalidRequestError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/RpcErrorEncoded" }, { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } ] } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "500": { "description": "RpcInternalError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RpcInternalErrorEncoded" } } } } }, "description": "Dispatch a method to the currently registered RPC at the requested location.", "summary": "Call a plugin RPC", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Rpc.Input" } } }, "required": true } } }, "/api/event": { "get": { "tags": ["event"], "operationId": "event.subscribe", "parameters": [ { "name": "types", "in": "query", "schema": { "anyOf": [ { "type": "string", "enum": [ "location.shutdown", "models-dev.refreshed", "credential.updated", "credential.switched", "integration.updated", "provider.updated", "model.updated", "agent.updated", "session.created", "session.agent.selected", "session.model.selected", "session.moved", "session.renamed", "session.metadata.updated", "session.permissions", "session.viewed", "session.archived", "session.unarchived", "session.usage.updated", "session.deleted", "session.forked", "session.inbox.delivered", "session.inbox.enqueued", "session.inbox.cancelled", "session.inbox.delivery.changed", "session.execution.started", "session.execution.succeeded", "session.execution.failed", "session.execution.interrupted", "session.instructions.updated", "session.synthetic", "session.skill.activated", "session.shell.started", "session.shell.ended", "session.step.started", "session.step.streamed", "session.step.ended", "session.step.failed", "session.text.started", "session.text.delta", "session.text.ended", "session.reasoning.started", "session.reasoning.delta", "session.reasoning.ended", "session.tool.input.started", "session.tool.input.delta", "session.tool.input.ended", "session.tool.called", "session.tool.progress", "session.tool.success", "session.tool.failed", "session.retry.scheduled", "session.compaction.started", "session.compaction.delta", "session.compaction.ended", "session.compaction.failed", "session.revert.staged", "session.revert.cleared", "session.revert.committed", "filesystem.changed", "reference.updated", "permission.asked", "permission.replied", "plugin.updated", "project.updated", "worktree.updated", "worktree.resolved", "command.updated", "config.updated", "skill.updated", "pty.created", "pty.updated", "pty.exited", "pty.deleted", "persistent-pty.added", "persistent-pty.removed", "persistent-pty.updated", "shell.created", "shell.exited", "shell.deleted", "form.created", "form.replied", "form.cancelled", "websearch.updated", "artifact.updated", "session.status", "session.idle", "tui.prompt.append", "tui.command.execute", "tui.toast.show", "tui.session.select", "installation.updated", "installation.update-available", "vcs.branch.updated", "mcp.status.changed", "mcp.resources.changed" ] }, { "type": "string", "pattern": "^rpc\\.[\\s\\S]*?$" }, { "type": "array", "items": { "anyOf": [ { "type": "string", "enum": [ "location.shutdown", "models-dev.refreshed", "credential.updated", "credential.switched", "integration.updated", "provider.updated", "model.updated", "agent.updated", "session.created", "session.agent.selected", "session.model.selected", "session.moved", "session.renamed", "session.metadata.updated", "session.permissions", "session.viewed", "session.archived", "session.unarchived", "session.usage.updated", "session.deleted", "session.forked", "session.inbox.delivered", "session.inbox.enqueued", "session.inbox.cancelled", "session.inbox.delivery.changed", "session.execution.started", "session.execution.succeeded", "session.execution.failed", "session.execution.interrupted", "session.instructions.updated", "session.synthetic", "session.skill.activated", "session.shell.started", "session.shell.ended", "session.step.started", "session.step.streamed", "session.step.ended", "session.step.failed", "session.text.started", "session.text.delta", "session.text.ended", "session.reasoning.started", "session.reasoning.delta", "session.reasoning.ended", "session.tool.input.started", "session.tool.input.delta", "session.tool.input.ended", "session.tool.called", "session.tool.progress", "session.tool.success", "session.tool.failed", "session.retry.scheduled", "session.compaction.started", "session.compaction.delta", "session.compaction.ended", "session.compaction.failed", "session.revert.staged", "session.revert.cleared", "session.revert.committed", "filesystem.changed", "reference.updated", "permission.asked", "permission.replied", "plugin.updated", "project.updated", "worktree.updated", "worktree.resolved", "command.updated", "config.updated", "skill.updated", "pty.created", "pty.updated", "pty.exited", "pty.deleted", "persistent-pty.added", "persistent-pty.removed", "persistent-pty.updated", "shell.created", "shell.exited", "shell.deleted", "form.created", "form.replied", "form.cancelled", "websearch.updated", "artifact.updated", "session.status", "session.idle", "tui.prompt.append", "tui.command.execute", "tui.toast.show", "tui.session.select", "installation.updated", "installation.update-available", "vcs.branch.updated", "mcp.status.changed", "mcp.resources.changed" ] }, { "type": "string", "pattern": "^rpc\\.[\\s\\S]*?$" } ] } } ], "description": "Only send events of these types, plus the initial server.connected event. When omitted, all events are sent." }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "text/event-stream": { "schema": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "event": { "type": "string" }, "data": { "$ref": "#/components/schemas/V2EventEncoded" } }, "required": ["event", "data"], "additionalProperties": false }, "x-effect-stream": { "encoding": "sse", "causeSchema": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["Fail"] }, "error": { "not": {} } }, "required": ["_tag", "error"], "additionalProperties": false }, { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["Die"] }, "defect": {} }, "required": ["_tag", "defect"], "additionalProperties": false }, { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["Interrupt"] }, "fiberId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": ["_tag", "fiberId"], "additionalProperties": false } ] } }, "errorSchema": { "not": {} }, "failureEvent": "effect/http-api/stream/failure" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Subscribe to native events and plugin RPC events across all server locations. Volatile by contract: a slow consumer overflows and fails the stream, and events during disconnection are missed.", "summary": "Subscribe to events" } }, "/api/pty": { "get": { "tags": ["pty"], "operationId": "pty.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Pty" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "List PTY sessions for a location, including exited sessions retained until removal.", "summary": "List PTY sessions" }, "post": { "tags": ["pty"], "operationId": "pty.create", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Pty" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Create a pseudo-terminal session for a location.", "summary": "Create PTY session", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "command": { "type": "string" }, "args": { "type": "array", "items": { "type": "string" } }, "cwd": { "type": "string" }, "title": { "type": "string" }, "env": { "type": "object", "additionalProperties": { "type": "string" } } }, "additionalProperties": false } } }, "required": true } } }, "/api/pty/{ptyID}": { "get": { "tags": ["pty"], "operationId": "pty.get", "parameters": [ { "name": "ptyID", "in": "path", "schema": { "$ref": "#/components/schemas/Pty.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Pty" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "PtyNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/PtyNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Get one PTY session, including its exit code once exited.", "summary": "Get PTY session" }, "put": { "tags": ["pty"], "operationId": "pty.update", "parameters": [ { "name": "ptyID", "in": "path", "schema": { "$ref": "#/components/schemas/Pty.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Pty" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "PtyNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/PtyNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Update the title or viewport size of one PTY session.", "summary": "Update PTY session", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string" }, "size": { "type": "object", "properties": { "rows": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "cols": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 } }, "required": ["rows", "cols"], "additionalProperties": false } }, "additionalProperties": false } } }, "required": true } }, "delete": { "tags": ["pty"], "operationId": "pty.remove", "parameters": [ { "name": "ptyID", "in": "path", "schema": { "$ref": "#/components/schemas/Pty.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "PtyNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/PtyNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Terminate and remove one PTY session.", "summary": "Remove PTY session" } }, "/api/pty/{ptyID}/connect-token": { "post": { "tags": ["pty"], "operationId": "pty.connect.token", "parameters": [ { "name": "ptyID", "in": "path", "schema": { "$ref": "#/components/schemas/Pty.ID" }, "required": true }, { "name": "x-opencode-ticket", "in": "header", "schema": { "type": "string" }, "required": false }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/PtyTicket.ConnectToken" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "PtyNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/PtyNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.", "summary": "Create PTY WebSocket token" } }, "/api/pty/{ptyID}/connect": { "get": { "tags": ["pty"], "operationId": "pty.connect", "parameters": [ { "name": "ptyID", "in": "path", "schema": { "$ref": "#/components/schemas/Pty.ID" }, "required": true }, { "in": "query", "name": "location[directory]", "schema": { "type": "string" } }, { "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "in": "query", "name": "ticket", "schema": { "type": "string" } } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "PtyNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/PtyNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.", "summary": "Connect to PTY session", "x-websocket": true } }, "/api/experimental/session/{sessionID}/terminal/read": { "get": { "tags": ["persistentPty"], "operationId": "experimental.persistentPty.read", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true }, { "name": "lines", "in": "query", "schema": { "type": "string" }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "anyOf": [ { "$ref": "#/components/schemas/PersistentPty.ReadResult" }, { "type": "null" } ] } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Read the last physical rows without changing selection or taking control. Omitted lines uses the live terminal height; larger counts include retained history. Blank rows are preserved. Screen dimensions and cursor remain relative to the live screen. Returns null when no current terminal exists. Selection is server-local and resets on restart. Experimental: may change without compatibility guarantees.", "summary": "Read the session's most recently controlled terminal" } }, "/api/experimental/session/{sessionID}/terminal": { "get": { "tags": ["persistentPty"], "operationId": "experimental.persistentPty.list", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/PersistentPty.Info" } } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } } }, "post": { "tags": ["persistentPty"], "operationId": "experimental.persistentPty.create", "parameters": [ { "name": "sessionID", "in": "path", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/PersistentPty.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersistentPty.CreateInput" } } }, "required": true } } }, "/api/experimental/persistent-pty/shutdown": { "post": { "tags": ["persistentPty"], "operationId": "experimental.persistentPty.shutdown", "parameters": [], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } } } }, "/api/experimental/persistent-pty/handoff": { "post": { "tags": ["persistentPty"], "operationId": "experimental.persistentPty.handoff", "parameters": [], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "handoff": { "anyOf": [ { "$ref": "#/components/schemas/PersistentPty.Handoff" }, { "type": "null" } ] } }, "required": ["handoff"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } } } }, "/api/experimental/persistent-pty/{ptyID}": { "get": { "tags": ["persistentPty"], "operationId": "experimental.persistentPty.get", "parameters": [ { "name": "ptyID", "in": "path", "schema": { "$ref": "#/components/schemas/Pty.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/PersistentPty.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "PtyNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PtyNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } } }, "put": { "tags": ["persistentPty"], "operationId": "experimental.persistentPty.update", "parameters": [ { "name": "ptyID", "in": "path", "schema": { "$ref": "#/components/schemas/Pty.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/PersistentPty.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "PtyNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PtyNotFoundErrorEncoded" } } } }, "501": { "description": "PtyFeatureUnsupportedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PtyFeatureUnsupportedErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Resize when size is present and rename when title is present; a null title clears the user title so the shell's title shows again. Renaming fails with 501 while the terminal service predates renaming.", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersistentPty.UpdateInput" } } }, "required": true } }, "delete": { "tags": ["persistentPty"], "operationId": "experimental.persistentPty.remove", "parameters": [ { "name": "ptyID", "in": "path", "schema": { "$ref": "#/components/schemas/Pty.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "PtyNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PtyNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } } } }, "/api/experimental/persistent-pty/{ptyID}/snapshot": { "get": { "tags": ["persistentPty"], "operationId": "experimental.persistentPty.snapshot", "parameters": [ { "name": "ptyID", "in": "path", "schema": { "$ref": "#/components/schemas/Pty.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/PersistentPty.Snapshot" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "PtyNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PtyNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } } } }, "/api/experimental/persistent-pty/{ptyID}/connect-token": { "post": { "tags": ["persistentPty"], "operationId": "experimental.persistentPty.connectToken", "parameters": [ { "name": "ptyID", "in": "path", "schema": { "$ref": "#/components/schemas/Pty.ID" }, "required": true }, { "name": "x-opencode-ticket", "in": "header", "schema": { "type": "string" }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/PtyTicket.ConnectToken" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "PtyNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PtyNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } } } }, "/api/experimental/persistent-pty/{ptyID}/connect": { "get": { "tags": ["persistentPty"], "operationId": "experimental.persistentPty.connect", "parameters": [ { "name": "ptyID", "in": "path", "schema": { "$ref": "#/components/schemas/Pty.ID" }, "required": true }, { "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "in": "query", "name": "role", "schema": { "type": "string" } }, { "in": "query", "name": "attachment_id", "schema": { "type": "string" } }, { "in": "query", "name": "takeover", "schema": { "type": "string" } }, { "in": "query", "name": "input_protocol", "schema": { "type": "string" } }, { "in": "query", "name": "ticket", "schema": { "type": "string" } } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "PtyNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PtyNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Stream persistent PTY output through the OpenCode server.", "summary": "Connect to a persistent PTY", "x-websocket": true } }, "/api/experimental/media/{hash}": { "get": { "tags": ["experimental"], "operationId": "experimental.media.get", "parameters": [ { "name": "hash", "in": "path", "schema": { "$ref": "#/components/schemas/MediaHash" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "FileNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileNotFoundErrorEncoded" } } } } }, "description": "Read a content-addressed media blob by SHA-256 hash with immutable Cache-Control, ETag, and 304 Not Modified support. Only blobs a stored message or inbox item still references are served. Experimental: may change without compatibility guarantees.", "summary": "Read media blob" } }, "/api/experimental/schedule": { "post": { "tags": ["experimental"], "operationId": "experimental.schedule.create", "parameters": [], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Schedule.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "Schedule a prompt that wakes the Session once after a delay, at a time, every interval, or on a cron. Experimental: needs experimental.schedules in the Session's config and may change without notice.", "summary": "Create schedule", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Schedule.CreatePayload" } } }, "required": true } }, "get": { "tags": ["experimental"], "operationId": "experimental.schedule.list", "parameters": [ { "name": "sessionID", "in": "query", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Schedule.Info" } } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" } } } } }, "description": "List a Session's schedules, oldest first. Experimental: needs experimental.schedules in the Session's config and may change without notice.", "summary": "List schedules" } }, "/api/experimental/schedule/{scheduleID}": { "get": { "tags": ["experimental"], "operationId": "experimental.schedule.get", "parameters": [ { "name": "scheduleID", "in": "path", "schema": { "$ref": "#/components/schemas/Schedule.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Schedule.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "ScheduleNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleNotFoundErrorEncoded" } } } } }, "description": "Read one schedule. Experimental: needs experimental.schedules in the Session's config and may change without notice.", "summary": "Get schedule" }, "delete": { "tags": ["experimental"], "operationId": "experimental.schedule.delete", "parameters": [ { "name": "scheduleID", "in": "path", "schema": { "$ref": "#/components/schemas/Schedule.ID" }, "required": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "ScheduleNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleNotFoundErrorEncoded" } } } } }, "description": "Delete a schedule. Experimental: needs experimental.schedules in the Session's config and may change without notice.", "summary": "Delete schedule" } }, "/api/experimental/schedule/{scheduleID}/pause": { "post": { "tags": ["experimental"], "operationId": "experimental.schedule.pause", "parameters": [ { "name": "scheduleID", "in": "path", "schema": { "$ref": "#/components/schemas/Schedule.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Schedule.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "ScheduleNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleNotFoundErrorEncoded" } } } } }, "description": "Stop a schedule from firing until it is resumed. Experimental: needs experimental.schedules in the Session's config and may change without notice.", "summary": "Pause schedule" } }, "/api/experimental/schedule/{scheduleID}/resume": { "post": { "tags": ["experimental"], "operationId": "experimental.schedule.resume", "parameters": [ { "name": "scheduleID", "in": "path", "schema": { "$ref": "#/components/schemas/Schedule.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Schedule.Info" } }, "required": ["data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "ScheduleNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleNotFoundErrorEncoded" } } } } }, "description": "Resume a paused schedule. A one-shot that fell due while paused fires once; a repeating schedule resumes at its next slot. Experimental: needs experimental.schedules in the Session's config and may change without notice.", "summary": "Resume schedule" } }, "/api/experimental/artifacts/providers": { "get": { "tags": ["experimental"], "operationId": "experimental.artifacts.providers", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Artifact.Provider" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Return active artifact providers and default. Experimental: needs experimental.artifacts in the Location's config and may change without notice.", "summary": "List artifact providers" } }, "/api/experimental/artifacts": { "get": { "tags": ["experimental"], "operationId": "experimental.artifacts.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false }, { "name": "sessionID", "in": "query", "schema": { "$ref": "#/components/schemas/Session.ID" }, "required": false }, { "name": "provider", "in": "query", "schema": { "type": "string" }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Artifact.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "List published artifacts, newest update first. Experimental: needs experimental.artifacts in the Location's config and may change without notice.", "summary": "List artifacts" }, "post": { "tags": ["experimental"], "operationId": "experimental.artifacts.create", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Artifact.Info" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "ProviderNotFoundError | SessionNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ProviderNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Publish a new artifact through the selected or default artifact provider. Experimental: needs experimental.artifacts in the Location's config and may change without notice.", "summary": "Create artifact", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Artifact.CreateInput" } } }, "required": true } } }, "/api/experimental/artifacts/{artifactID}": { "get": { "tags": ["experimental"], "operationId": "experimental.artifacts.get", "parameters": [ { "name": "artifactID", "in": "path", "schema": { "$ref": "#/components/schemas/Artifact.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Artifact.Content" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "ArtifactNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ArtifactNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Read an artifact's metadata and file contents. Experimental: needs experimental.artifacts in the Location's config and may change without notice.", "summary": "Read artifact" }, "patch": { "tags": ["experimental"], "operationId": "experimental.artifacts.update", "parameters": [ { "name": "artifactID", "in": "path", "schema": { "$ref": "#/components/schemas/Artifact.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Artifact.Info" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "SessionNotFoundError | ArtifactNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/ArtifactNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Replace an artifact's files at the same ID and URL. Experimental: needs experimental.artifacts in the Location's config and may change without notice.", "summary": "Update artifact", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Artifact.UpdateInput" } } }, "required": true } }, "delete": { "tags": ["experimental"], "operationId": "experimental.artifacts.delete", "parameters": [ { "name": "artifactID", "in": "path", "schema": { "$ref": "#/components/schemas/Artifact.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "ArtifactNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ArtifactNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Remove an artifact and its stored files. Experimental: needs experimental.artifacts in the Location's config and may change without notice.", "summary": "Delete artifact" } }, "/api/experimental/artifacts/{artifactID}/view/*": { "get": { "tags": ["experimental"], "operationId": "experimental.artifacts.view", "parameters": [ { "name": "artifactID", "in": "path", "schema": { "$ref": "#/components/schemas/Artifact.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "403": { "description": "ForbiddenError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForbiddenErrorEncoded" } } } }, "404": { "description": "FileNotFoundError | ArtifactNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/FileNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/ArtifactNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Serve HTML and static files from the local provider. Experimental: needs experimental.artifacts in the Location's config and may change without notice.", "summary": "View local artifact" } }, "/api/shell": { "get": { "tags": ["shell"], "operationId": "shell.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Shell.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "List currently running shell commands for a location. Exited commands are not included.", "summary": "List running shell commands" }, "post": { "tags": ["shell"], "operationId": "shell.create", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Shell.Info" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Spawn one non-interactive shell command for a location. Combined stdout/stderr is captured to a file pageable via output.", "summary": "Run shell command", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "command": { "type": "string" }, "cwd": { "type": "string" }, "timeout": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "metadata": { "type": "object" } }, "required": ["command"], "additionalProperties": false } } }, "required": true } } }, "/api/shell/{id}": { "get": { "tags": ["shell"], "operationId": "shell.get", "parameters": [ { "name": "id", "in": "path", "schema": { "$ref": "#/components/schemas/Shell.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Shell.Info" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "ShellNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ShellNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Get one shell command, including its status and exit code once exited.", "summary": "Get shell command" }, "delete": { "tags": ["shell"], "operationId": "shell.remove", "parameters": [ { "name": "id", "in": "path", "schema": { "$ref": "#/components/schemas/Shell.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Terminate and remove one shell command and its retained output.", "summary": "Remove shell command" } }, "/api/shell/{id}/output": { "get": { "tags": ["shell"], "operationId": "shell.output", "parameters": [ { "name": "id", "in": "path", "schema": { "$ref": "#/components/schemas/Shell.ID" }, "required": true }, { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true }, { "name": "cursor", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$" }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "object", "properties": { "output": { "type": "string" }, "cursor": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "truncated": { "type": "boolean" } }, "required": ["output", "cursor", "size", "truncated"], "additionalProperties": false } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "ShellNotFoundError | LocationNotFoundError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ShellNotFoundErrorEncoded" }, { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } ] } } } } }, "description": "Page through captured combined output by absolute byte cursor.", "summary": "Read shell output" } }, "/api/reference": { "get": { "tags": ["reference"], "operationId": "reference.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Reference.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "List references available in the requested location.", "summary": "List references" } }, "/api/worktree": { "get": { "tags": ["worktree"], "operationId": "worktree.list", "parameters": [ { "name": "projectID", "in": "query", "schema": { "$ref": "#/components/schemas/Project.ID" }, "required": true } ], "security": [], "responses": { "200": { "description": "Worktree.List", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Worktree.List" } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "ProjectNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectNotFoundErrorEncoded" } } } } }, "description": "Return the project's saved worktree inventory without loading configuration or running discovery.", "summary": "List worktrees" }, "post": { "tags": ["worktree"], "operationId": "worktree.create", "parameters": [], "security": [], "responses": { "200": { "description": "Worktree.Info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Worktree.Info" } } } }, "400": { "description": "WorktreeError | InvalidRequestError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/WorktreeErrorEncoded" }, { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } ] } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "ProjectNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectNotFoundErrorEncoded" } } } } }, "description": "Load the project's canonical configuration, create a local worktree using its selected strategy, then run the project's setup script.", "summary": "Create worktree", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Worktree.CreateInput" } } }, "required": true } }, "delete": { "tags": ["worktree"], "operationId": "worktree.remove", "parameters": [], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "WorktreeError | InvalidRequestError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/WorktreeErrorEncoded" }, { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } ] } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "ProjectNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectNotFoundErrorEncoded" } } } } }, "description": "Load the project's canonical configuration and remove a saved worktree using its recorded strategy.", "summary": "Remove worktree", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Worktree.RemoveInput" } } }, "required": true } } }, "/api/worktree/refresh": { "post": { "tags": ["worktree"], "operationId": "worktree.refresh", "parameters": [], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "WorktreeError | InvalidRequestError", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/WorktreeErrorEncoded" }, { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } ] } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "ProjectNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectNotFoundErrorEncoded" } } } } }, "description": "Load the project's canonical configuration, discover worktrees across known checkout roots using all available strategies, and reconcile saved state.", "summary": "Refresh worktrees", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "projectID": { "$ref": "#/components/schemas/Project.ID" } }, "required": ["projectID"], "additionalProperties": false } } }, "required": true } } }, "/api/vcs/init": { "post": { "tags": ["vcs"], "operationId": "vcs.init", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true }, { "name": "provider", "in": "query", "schema": { "type": "string" }, "required": false } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "409": { "description": "ConflictError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConflictErrorEncoded" } } } }, "501": { "description": "VcsInitNotSupportedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VcsInitNotSupportedErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Initialize a repository using the selected VCS provider in a markerless project's directory and refresh its location services. Omitting provider defaults to git; built-in git and hg providers support initialization. An unknown provider returns 400; a registered provider without init returns 501.", "summary": "Initialize VCS repository" } }, "/api/vcs": { "get": { "tags": ["vcs"], "operationId": "vcs.get", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Vcs.Info" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Get current and default branch information for the requested location.", "summary": "VCS info" } }, "/api/vcs/base": { "get": { "tags": ["vcs"], "operationId": "vcs.base", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "anyOf": [ { "$ref": "#/components/schemas/Vcs.Base" }, { "type": "null" } ] } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Infer a local review base from named branch creation history, or the repository default only when currently on that branch. Returns null before the first commit or when the provider lacks base metadata; ambiguous Git history requires an explicit base on diff requests.", "summary": "VCS review base" } }, "/api/vcs/status": { "get": { "tags": ["vcs"], "operationId": "vcs.status", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Vcs.FileStatus" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "List uncommitted working-copy changes relative to the requested location.", "summary": "VCS status" } }, "/api/vcs/branch": { "get": { "tags": ["vcs"], "operationId": "vcs.branch.list", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true }, { "name": "search", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "limit", "in": "query", "schema": { "type": "string" }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/Vcs.BranchList" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "List local and remote branches available at the requested location.", "summary": "VCS branches" } }, "/api/vcs/diff": { "get": { "tags": ["vcs"], "operationId": "vcs.diff", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true }, { "name": "mode", "in": "query", "schema": { "$ref": "#/components/schemas/Vcs.Mode" }, "required": true }, { "name": "base", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "context", "in": "query", "schema": { "type": "string" }, "required": false }, { "name": "untracked", "in": "query", "schema": { "$ref": "#/components/schemas/Vcs.Untracked" }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/FileDiff.Info" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Diff HEAD to the working copy (working), the base merge-base to the working copy (branch), or the base merge-base to HEAD (committed). Omitting base preserves repository-default comparison; supplying it overrides the comparison without saving it.", "summary": "VCS diff" } }, "/api/debug/heap-dump": { "post": { "tags": ["debug"], "operationId": "debug.heapDump", "parameters": [ { "name": "directory", "in": "query", "schema": { "anyOf": [ { "type": "string" } ], "description": "Absolute server-local directory to write the snapshot into, created when missing. Defaults to the server's log directory." }, "required": false } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "path": { "type": "string" }, "pid": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "memory": { "type": "object", "properties": { "rss": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "heapTotal": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "heapUsed": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "external": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "arrayBuffers": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["rss", "heapTotal", "heapUsed", "external", "arrayBuffers"], "additionalProperties": false, "description": "The server process's memory in bytes, read just before the snapshot (Node's process.memoryUsage()). rss covers native memory the snapshot cannot show." } }, "required": ["path", "pid", "memory"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "500": { "description": "UnknownError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnknownErrorEncoded" } } } } }, "description": "Write a JavaScript heap snapshot of the server process into its log directory, or the requested directory, and return the server-local path once the file is complete. Pauses the server while the heap serializes and can temporarily increase its memory use. The snapshot can contain credentials, prompts, and file contents.", "summary": "Write a heap snapshot" } }, "/api/debug/location": { "get": { "tags": ["debug"], "operationId": "debug.location.list", "parameters": [], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Location.PublicRef" } } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "List locations currently loaded by the server.", "summary": "List loaded locations" }, "delete": { "tags": ["debug"], "operationId": "debug.location.evict", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Dispose the requested location's cached services so its next use boots them fresh.", "summary": "Evict a loaded location" } }, "/api/experimental/migration/v1": { "get": { "tags": ["migration"], "operationId": "experimental.migration.v1.status", "parameters": [], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "enum": ["required", "completed"] } }, "required": ["status"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["running"] }, "progress": { "type": "object", "properties": { "label": { "type": "string" }, "numerator": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "denominator": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": ["label"], "additionalProperties": false } }, "required": ["status", "progress"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["error"] }, "error": { "type": "string" } }, "required": ["status", "error"], "additionalProperties": false } ] } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } } }, "description": "Return the progress of the V1 to V2 session history migration.", "summary": "Get V1 migration status" } }, "/api/websearch/provider": { "get": { "tags": ["websearch"], "operationId": "websearch.providers", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/WebSearch.Provider" } } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Return the registered web search providers.", "summary": "List web search providers" } }, "/api/websearch": { "post": { "tags": ["websearch"], "operationId": "websearch.query", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "$ref": "#/components/schemas/WebSearch.ResponseEncoded" } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Run one web search through the selected provider. Specify a provider to override the configured default.", "summary": "Search the web", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "query": { "type": "string" }, "providerID": { "$ref": "#/components/schemas/WebSearch.ID" } }, "required": ["query"], "additionalProperties": false } } }, "required": true } } }, "/api/experimental/usage/limits": { "get": { "tags": ["usage"], "operationId": "experimental.usage.limits", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "anyOf": [ { "$ref": "#/components/schemas/UsageLimits.Info" }, { "type": "null" } ] } }, "required": ["location", "data"], "additionalProperties": false } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } }, "503": { "description": "ServiceUnavailableError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceUnavailableErrorEncoded" } } } } }, "description": "Return the OpenCode Go allowance and Console budgets of the OpenCode Console workspace the location is signed in to, or null when it isn't signed in.", "summary": "Get usage limits" } }, "/api/config": { "get": { "tags": ["config"], "operationId": "config.get", "parameters": [ { "name": "location", "in": "query", "schema": { "type": "object", "properties": { "directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "required": false, "style": "deepObject", "explode": true } ], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Config.Entry" } } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Return configuration documents and discovery sources for the requested location, from lowest to highest priority.", "summary": "Get configuration" } }, "/api/config/shell": { "get": { "tags": ["config"], "operationId": "config.shells", "parameters": [], "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConfigShell.Option" } } } } }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Return shells available to terminal and agent execution.", "summary": "List available shells" } }, "/api/experimental/config": { "patch": { "tags": ["config"], "operationId": "experimental.config.update", "parameters": [], "security": [], "responses": { "204": { "description": "" }, "400": { "description": "InvalidRequestError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorEncoded" } } } }, "401": { "description": "UnauthorizedError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnauthorizedErrorEncoded" } } } }, "404": { "description": "LocationNotFoundError", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationNotFoundErrorEncoded" } } } } }, "description": "Patch supported fields in the highest-precedence global configuration document.", "summary": "Update global configuration", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Config.Patch" } } }, "required": true } } } }, "components": { "schemas": { "AbsolutePath": { "type": "string" }, "Agent.Color": { "type": "string" }, "Agent.ID": { "type": "string" }, "Agent.Info": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Agent.ID" }, "name": { "type": "string" }, "model": { "$ref": "#/components/schemas/Model.Ref" }, "request": { "$ref": "#/components/schemas/Provider.Request" }, "system": { "type": "string" }, "description": { "type": "string" }, "mode": { "type": "string", "enum": ["subagent", "primary", "all"] }, "hidden": { "type": "boolean" }, "color": { "$ref": "#/components/schemas/Agent.Color" }, "steps": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "permissions": { "$ref": "#/components/schemas/Permission.Ruleset" } }, "required": ["id", "name", "request", "mode", "hidden", "permissions"], "additionalProperties": false }, "AgentNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["AgentNotFoundError"] }, "agentID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "agentID", "message"], "additionalProperties": false }, "Artifact.Capability": { "type": "string", "enum": ["static", "server-code", "sqlite", "durable-objects"] }, "Artifact.Content": { "type": "object", "properties": { "info": { "$ref": "#/components/schemas/Artifact.Info" }, "files": { "type": "object", "additionalProperties": { "type": "string" } } }, "required": ["info", "files"], "additionalProperties": false }, "Artifact.CreateInput": { "type": "object", "properties": { "title": { "type": "string" }, "files": { "type": "object", "additionalProperties": { "type": "string" } }, "entry": { "type": "string" }, "provider": { "type": "string" }, "sessionID": { "$ref": "#/components/schemas/Session.ID" } }, "required": ["title", "files"], "additionalProperties": false }, "Artifact.ID": { "type": "string", "pattern": "^art_" }, "Artifact.Info": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Artifact.ID" }, "provider": { "$ref": "#/components/schemas/Artifact.ProviderIDEncoded" }, "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "title": { "type": "string" }, "entry": { "type": "string" }, "url": { "type": "string" }, "time": { "$ref": "#/components/schemas/Artifact.Time" } }, "required": ["id", "provider", "title", "entry", "url", "time"], "additionalProperties": false }, "Artifact.Provider": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Artifact.ProviderIDEncoded" }, "name": { "type": "string" }, "capabilities": { "type": "array", "items": { "$ref": "#/components/schemas/Artifact.Capability" } }, "default": { "type": "boolean" } }, "required": ["id", "name", "capabilities", "default"], "additionalProperties": false }, "Artifact.ProviderIDEncoded": { "type": "string" }, "Artifact.Time": { "type": "object", "properties": { "created": { "type": "number" }, "updated": { "type": "number" } }, "required": ["created", "updated"], "additionalProperties": false }, "Artifact.UpdateInput": { "type": "object", "properties": { "title": { "type": "string" }, "files": { "type": "object", "additionalProperties": { "type": "string" } }, "entry": { "type": "string" }, "sessionID": { "$ref": "#/components/schemas/Session.ID" } }, "required": ["files"], "additionalProperties": false }, "ArtifactNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["ArtifactNotFoundError"] }, "artifactID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "artifactID", "message"], "additionalProperties": false }, "Command.Info": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" } }, "required": ["name"], "additionalProperties": false }, "CommandExecutionErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["CommandExecutionError"] }, "command": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "command", "message"], "additionalProperties": false }, "CommandNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["CommandNotFoundError"] }, "command": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "command", "message"], "additionalProperties": false }, "Config.AgentEncoded": { "type": "object", "properties": { "model": { "anyOf": [ { "type": "string", "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" }, { "type": "object", "properties": { "providerID": { "type": "string", "pattern": "^[^/#]+$" }, "model": { "type": "string", "pattern": "^[^#]+$" }, "variant": { "type": "string", "pattern": "^[^#]+$" } }, "required": ["providerID", "model"], "additionalProperties": false } ] }, "request": { "type": "object", "properties": { "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "body": { "type": "object" } }, "additionalProperties": false }, "system": { "type": "string" }, "description": { "type": "string" }, "mode": { "type": "string", "enum": ["subagent", "primary", "all"] }, "hidden": { "type": "boolean" }, "color": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }, "steps": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "disabled": { "type": "boolean" }, "permissions": { "$ref": "#/components/schemas/Permission.Ruleset" } }, "additionalProperties": false }, "Config.CommandEncoded": { "type": "object", "properties": { "template": { "type": "string" }, "description": { "type": "string" }, "agent": { "type": "string" }, "model": { "anyOf": [ { "type": "string", "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" }, { "type": "object", "properties": { "providerID": { "type": "string", "pattern": "^[^/#]+$" }, "model": { "type": "string", "pattern": "^[^#]+$" }, "variant": { "type": "string", "pattern": "^[^#]+$" } }, "required": ["providerID", "model"], "additionalProperties": false } ] }, "subagent": { "type": "boolean" }, "subtask": { "type": "boolean", "description": "Deprecated alias for subagent." } }, "required": ["template"], "additionalProperties": false }, "Config.Compaction.Percent": { "type": "string", "pattern": "^([1-9]\\d?(\\.\\d+)?)%$" }, "Config.DirectoryEncoded": { "type": "object", "properties": { "type": { "type": "string", "enum": ["directory"] }, "path": { "$ref": "#/components/schemas/AbsolutePath" } }, "required": ["type", "path"], "additionalProperties": false }, "Config.DocumentEncoded": { "type": "object", "properties": { "type": { "type": "string", "enum": ["document"] }, "path": { "$ref": "#/components/schemas/AbsolutePath" }, "info": { "$ref": "#/components/schemas/Config.InfoEncoded" } }, "required": ["type", "info"], "additionalProperties": false }, "Config.Entry": { "anyOf": [ { "$ref": "#/components/schemas/Config.DocumentEncoded" }, { "$ref": "#/components/schemas/Config.DirectoryEncoded" } ] }, "Config.Formatter.EntryEncoded": { "type": "object", "properties": { "disabled": { "type": "boolean" }, "command": { "type": "array", "items": { "type": "string" } }, "environment": { "type": "object", "additionalProperties": { "type": "string" } }, "extensions": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "Config.InfoEncoded": { "type": "object", "properties": { "$schema": { "type": "string" }, "shell": { "type": "string" }, "model": { "anyOf": [ { "type": "string", "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" }, { "type": "object", "properties": { "providerID": { "type": "string", "pattern": "^[^/#]+$" }, "model": { "type": "string", "pattern": "^[^#]+$" }, "variant": { "type": "string", "pattern": "^[^#]+$" } }, "required": ["providerID", "model"], "additionalProperties": false } ] }, "default_agent": { "type": "string" }, "update": { "type": "string", "enum": ["disable", "notify", "auto"] }, "share": { "type": "string", "enum": ["manual", "auto", "disabled"] }, "enterprise": { "type": "object", "properties": { "url": { "type": "string" } }, "additionalProperties": false }, "username": { "type": "string" }, "timezone": { "type": "string" }, "permissions": { "$ref": "#/components/schemas/Permission.Ruleset" }, "policies": { "type": "array", "items": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use" ] }, "resource": { "type": "string" }, "effect": { "type": "string", "enum": ["allow", "deny"] } }, "required": ["action", "resource", "effect"], "additionalProperties": false } }, "agents": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Config.AgentEncoded" } }, "snapshots": { "type": "boolean" }, "watcher": { "type": "object", "properties": { "ignore": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "formatter": { "anyOf": [ { "type": "boolean" }, { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Config.Formatter.EntryEncoded" } } ] }, "lsp": { "anyOf": [ { "type": "boolean" }, { "type": "object", "additionalProperties": { "anyOf": [ { "type": "object", "properties": { "disabled": { "type": "boolean", "enum": [true] } }, "required": ["disabled"], "additionalProperties": false }, { "$ref": "#/components/schemas/Config.LSP.ServerEncoded" } ] } } ] }, "media": { "type": "object", "properties": { "image": { "type": "object", "properties": { "auto_resize": { "type": "boolean" }, "max_width": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "max_height": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "max_base64_bytes": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 } }, "additionalProperties": false } }, "additionalProperties": false }, "tool_output": { "type": "object", "properties": { "max_lines": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "max_bytes": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 } }, "additionalProperties": false }, "mcp": { "type": "object", "properties": { "timeout": { "type": "object", "properties": { "startup": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "catalog": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "execution": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 } }, "additionalProperties": false }, "servers": { "type": "object", "additionalProperties": { "anyOf": [ { "$ref": "#/components/schemas/Mcp.LocalConfigEncoded" }, { "$ref": "#/components/schemas/Mcp.RemoteConfigEncoded" } ] } } }, "additionalProperties": false }, "compaction": { "type": "object", "properties": { "auto": { "type": "boolean" }, "keep": { "type": "object", "properties": { "tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "additionalProperties": false }, "buffer": { "anyOf": [ { "$ref": "#/components/schemas/Config.Compaction.Percent" }, { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } ] } }, "additionalProperties": false }, "skills": { "type": "array", "items": { "type": "string" } }, "commands": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Config.CommandEncoded" } }, "instructions": { "type": "array", "items": { "type": "string" } }, "references": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "$ref": "#/components/schemas/Config.Reference.GitEncoded" }, { "$ref": "#/components/schemas/Config.Reference.LocalEncoded" } ] } }, "websearch": { "anyOf": [ { "type": "boolean", "enum": [false] }, { "$ref": "#/components/schemas/ConfigWebSearch.InfoEncoded" } ] }, "plugins": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "$ref": "#/components/schemas/Config.Plugin.EntryEncoded" } ] } }, "worktree": { "$ref": "#/components/schemas/Config.Worktree" }, "warming": { "anyOf": [ { "type": "boolean" }, { "$ref": "#/components/schemas/Config.WarmingEncoded" } ] }, "providers": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Config.ProviderEncoded" } }, "experimental": { "type": "object", "properties": { "portable_shell_scanner": { "type": "boolean" }, "todo": { "type": "boolean" }, "background_compaction": { "type": "boolean" }, "media_blob": { "type": "boolean" }, "image_generate": { "anyOf": [ { "type": "boolean" }, { "type": "object", "properties": { "model": { "anyOf": [ { "type": "string", "pattern": "^[^/#]+\\/[^#]+(?:#[^#]+)?$" }, { "type": "object", "properties": { "providerID": { "type": "string", "pattern": "^[^/#]+$" }, "model": { "type": "string", "pattern": "^[^#]+$" }, "variant": { "type": "string", "pattern": "^[^#]+$" } }, "required": ["providerID", "model"], "additionalProperties": false } ] } }, "additionalProperties": false } ] }, "schedules": { "type": "boolean" }, "artifacts": { "type": "boolean" }, "subagent_depth": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "location_idle_timeout": { "anyOf": [ { "type": "string" }, { "type": "boolean", "enum": [false] } ] }, "policies": { "type": "array", "items": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use" ] }, "resource": { "type": "string" }, "effect": { "type": "string", "enum": ["allow", "deny"] } }, "required": ["action", "resource", "effect"], "additionalProperties": false } } }, "additionalProperties": false } }, "additionalProperties": false }, "Config.LSP.ServerEncoded": { "type": "object", "properties": { "command": { "type": "array", "items": { "type": "string" } }, "extensions": { "type": "array", "items": { "type": "string" } }, "disabled": { "type": "boolean" }, "env": { "type": "object", "additionalProperties": { "type": "string" } }, "initialization": { "type": "object" } }, "required": ["command"], "additionalProperties": false }, "Config.Model.Capabilities": { "type": "object", "properties": { "tools": { "type": "boolean" }, "input": { "type": "array", "items": { "type": "string" } }, "output": { "type": "array", "items": { "type": "string" } }, "temperature": { "type": "boolean" }, "reasoning": { "$ref": "#/components/schemas/Config.Model.Reasoning" } }, "additionalProperties": false }, "Config.Model.CostEncoded": { "type": "object", "properties": { "tier": { "type": "object", "properties": { "type": { "type": "string", "enum": ["context"] }, "size": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["type", "size"], "additionalProperties": false }, "input": { "$ref": "#/components/schemas/Money.USDPerMillionTokens" }, "output": { "$ref": "#/components/schemas/Money.USDPerMillionTokens" }, "cache": { "type": "object", "properties": { "read": { "$ref": "#/components/schemas/Money.USDPerMillionTokens" }, "write": { "$ref": "#/components/schemas/Money.USDPerMillionTokens" } }, "additionalProperties": false } }, "required": ["input", "output"], "additionalProperties": false }, "Config.Model.Reasoning": { "anyOf": [ { "type": "object", "properties": { "supported": { "type": "boolean", "enum": [false] } }, "required": ["supported"], "additionalProperties": false }, { "type": "object", "properties": { "supported": { "type": "boolean", "enum": [true] }, "toggle": { "type": "boolean" }, "effort": { "type": "array", "items": { "type": "string" } }, "budget": { "type": "object", "properties": { "min": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "max": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": false } }, "required": ["supported"], "additionalProperties": false } ] }, "Config.Model.Settings": { "type": "object", "properties": { "compaction": { "$ref": "#/components/schemas/Provider.Compaction" }, "cache": { "$ref": "#/components/schemas/Provider.Cache" }, "encoding": { "$ref": "#/components/schemas/Provider.Encoding" } }, "allOf": [ { "type": "object", "additionalProperties": { "anyOf": [ {}, { "type": "null" } ] } } ] }, "Config.Model.VariantSettings": { "type": "object", "properties": { "compaction": { "$ref": "#/components/schemas/Provider.Compaction" }, "encoding": { "$ref": "#/components/schemas/Provider.Encoding" } }, "allOf": [ { "type": "object", "additionalProperties": { "anyOf": [ {}, { "type": "null" } ] } } ] }, "Config.ModelEncoded": { "type": "object", "properties": { "modelID": { "type": "string" }, "type": { "$ref": "#/components/schemas/Model.Type" }, "family": { "type": "string" }, "name": { "type": "string" }, "releaseDate": { "type": "string", "pattern": "^\\d{4}-\\d{2}(-\\d{2})?$", "description": "Release date as YYYY-MM-DD or YYYY-MM" }, "compatibility": { "$ref": "#/components/schemas/Model.Compatibility" }, "package": { "type": "string" }, "settings": { "$ref": "#/components/schemas/Config.Model.Settings" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "body": { "type": "object" }, "capabilities": { "$ref": "#/components/schemas/Config.Model.Capabilities" }, "variants": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "settings": { "$ref": "#/components/schemas/Config.Model.VariantSettings" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "body": { "type": "object" } }, "required": ["id"], "additionalProperties": false } }, "cost": { "anyOf": [ { "$ref": "#/components/schemas/Config.Model.CostEncoded" }, { "type": "array", "items": { "$ref": "#/components/schemas/Config.Model.CostEncoded" } } ] }, "disabled": { "type": "boolean" }, "limit": { "type": "object", "properties": { "context": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "input": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "output": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "additionalProperties": false } }, "additionalProperties": false }, "Config.Patch": { "type": "object", "properties": { "shell": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["shell"], "additionalProperties": false }, "Config.Plugin.EntryEncoded": { "type": "object", "properties": { "package": { "type": "string" }, "options": { "type": "object" } }, "required": ["package"], "additionalProperties": false }, "Config.Provider.Settings": { "type": "object", "properties": { "timeout": { "anyOf": [ { "type": "number" }, { "type": "boolean", "enum": [false] } ] }, "headerTimeout": { "anyOf": [ { "type": "number" }, { "type": "boolean", "enum": [false] } ] }, "chunkTimeout": { "anyOf": [ { "type": "number" }, { "type": "boolean", "enum": [false] } ] }, "compaction": { "$ref": "#/components/schemas/Provider.Compaction" }, "cache": { "$ref": "#/components/schemas/Provider.Cache" }, "transport": { "$ref": "#/components/schemas/Provider.Transport" }, "encoding": { "$ref": "#/components/schemas/Provider.Encoding" } }, "allOf": [ { "type": "object", "additionalProperties": { "anyOf": [ {}, { "type": "null" } ] } } ] }, "Config.ProviderEncoded": { "type": "object", "properties": { "canonical": { "$ref": "#/components/schemas/Provider.ID" }, "name": { "type": "string" }, "env": { "type": "array", "items": { "type": "string" } }, "package": { "type": "string" }, "compatibility": { "$ref": "#/components/schemas/Provider.Compatibility" }, "settings": { "$ref": "#/components/schemas/Config.Provider.Settings" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "body": { "type": "object" }, "models": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Config.ModelEncoded" } } }, "additionalProperties": false }, "Config.Reference.GitEncoded": { "type": "object", "properties": { "repository": { "type": "string" }, "branch": { "type": "string" }, "description": { "type": "string" }, "hidden": { "type": "boolean" } }, "required": ["repository"], "additionalProperties": false }, "Config.Reference.LocalEncoded": { "type": "object", "properties": { "path": { "type": "string" }, "description": { "type": "string" }, "hidden": { "type": "boolean" } }, "required": ["path"], "additionalProperties": false }, "Config.WarmingEncoded": { "type": "object", "properties": { "prompt": { "type": "string" }, "interval": { "anyOf": [ { "type": "string", "enum": ["auto"] }, { "type": "string" } ] }, "duration": { "type": "string" } }, "additionalProperties": false }, "Config.Worktree": { "type": "object", "properties": { "directory": { "type": "string" } }, "required": ["directory"], "additionalProperties": false }, "ConfigShell.Option": { "type": "object", "properties": { "path": { "type": "string" }, "name": { "type": "string" }, "acceptable": { "type": "boolean" } }, "required": ["path", "name", "acceptable"], "additionalProperties": false }, "ConfigWebSearch.InfoEncoded": { "type": "object", "properties": { "provider": { "anyOf": [ { "type": "string", "enum": ["random"], "description": "Reuse a randomly selected provider until it is rate limited, then switch to another available provider." }, { "$ref": "#/components/schemas/WebSearch.ID" } ] } }, "required": ["provider"], "additionalProperties": false }, "ConflictErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["ConflictError"] }, "message": { "type": "string" }, "resource": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["_tag", "message"], "additionalProperties": false }, "Connection.CredentialInfo": { "type": "object", "properties": { "type": { "type": "string", "enum": ["credential"] }, "id": { "$ref": "#/components/schemas/Credential.ID" }, "label": { "type": "string" }, "method": { "type": "string", "enum": ["key", "oauth", "external"] }, "status": { "$ref": "#/components/schemas/Connection.Status" } }, "required": ["type", "id", "label", "method"], "additionalProperties": false }, "Connection.EnvInfo": { "type": "object", "properties": { "type": { "type": "string", "enum": ["env"] }, "name": { "type": "string" }, "status": { "$ref": "#/components/schemas/Connection.Status" } }, "required": ["type", "name"], "additionalProperties": false }, "Connection.Info": { "anyOf": [ { "$ref": "#/components/schemas/Connection.CredentialInfo" }, { "$ref": "#/components/schemas/Connection.EnvInfo" } ] }, "Connection.Status": { "type": "object", "properties": { "status": { "anyOf": [ { "type": "string", "enum": ["needs_auth"] } ] }, "message": { "type": "string" }, "url": { "type": "string" } }, "required": ["status", "message"], "additionalProperties": false }, "Credential.CreateInput": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Credential.ID" }, "integrationID": { "$ref": "#/components/schemas/Integration.ID" }, "label": { "type": "string" }, "value": { "$ref": "#/components/schemas/Credential.Value" }, "activate": { "type": "boolean" } }, "required": ["integrationID", "value"], "additionalProperties": false }, "Credential.Entry": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Credential.ID" }, "integrationID": { "$ref": "#/components/schemas/Integration.ID" }, "label": { "type": "string" }, "active": { "type": "boolean" }, "value": { "$ref": "#/components/schemas/Credential.Value" } }, "required": ["id", "integrationID", "label", "active", "value"], "additionalProperties": false }, "Credential.External": { "type": "object", "properties": { "type": { "type": "string", "enum": ["external"] }, "methodID": { "$ref": "#/components/schemas/Integration.MethodID" }, "metadata": { "type": "object" } }, "required": ["type", "methodID"], "additionalProperties": false }, "Credential.ID": { "type": "string" }, "Credential.Key": { "type": "object", "properties": { "type": { "type": "string", "enum": ["key"] }, "key": { "type": "string" }, "metadata": { "type": "object" } }, "required": ["type", "key"], "additionalProperties": false }, "Credential.OAuth": { "type": "object", "properties": { "type": { "type": "string", "enum": ["oauth"] }, "methodID": { "$ref": "#/components/schemas/Integration.MethodID" }, "refresh": { "type": "string" }, "access": { "type": "string" }, "expires": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "metadata": { "type": "object" } }, "required": ["type", "methodID", "refresh", "access", "expires"], "additionalProperties": false }, "Credential.Value": { "anyOf": [ { "$ref": "#/components/schemas/Credential.OAuth" }, { "$ref": "#/components/schemas/Credential.Key" }, { "$ref": "#/components/schemas/Credential.External" } ] }, "Event.ID": { "type": "string", "pattern": "^evt_" }, "Event.Seq": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "Event.VersionEncoded_c3ea984aceae": { "type": "number", "enum": [2] }, "Event.VersionEncoded_c77c5abcb68d": { "type": "number", "enum": [1] }, "EventLog.Synced": { "type": "object", "properties": { "type": { "type": "string", "enum": ["log.synced"] }, "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" } }, "required": ["type", "aggregateID"], "additionalProperties": false, "description": "Marker emitted once when a log read reaches its captured watermark. The reader holds every event committed at or below seq." }, "FileDiff.Info": { "type": "object", "properties": { "file": { "type": "string" }, "patch": { "type": "string" }, "additions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "deletions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": ["added", "deleted", "modified"] }, "more": { "type": "boolean", "enum": [true] } }, "required": ["file", "patch", "additions", "deletions", "status"], "additionalProperties": false }, "FileNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["FileNotFoundError"] }, "path": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "path", "message"], "additionalProperties": false }, "FileSystem.Entry": { "type": "object", "properties": { "path": { "$ref": "#/components/schemas/RelativePath" }, "type": { "type": "string", "enum": ["file", "directory"] } }, "required": ["path", "type"], "additionalProperties": false }, "FileSystem.Write": { "type": "object", "properties": { "path": { "$ref": "#/components/schemas/AbsolutePath" } }, "required": ["path"], "additionalProperties": false }, "ForbiddenErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["ForbiddenError"] }, "message": { "type": "string" } }, "required": ["_tag", "message"], "additionalProperties": false }, "Form.Answer": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Form.Value" } }, "Form.Answer_1": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/Form.Value_1" } }, "Form.BooleanField": { "type": "object", "properties": { "key": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "hidden": { "type": "boolean" }, "when": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When" } }, "type": { "type": "string", "enum": ["boolean"] }, "default": { "type": "boolean" } }, "required": ["key", "type"], "additionalProperties": false }, "Form.BooleanField_1": { "type": "object", "properties": { "key": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "hidden": { "type": "boolean" }, "when": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When_1" } }, "type": { "type": "string", "enum": ["boolean"] }, "default": { "type": "boolean" } }, "required": ["key", "type"], "additionalProperties": false }, "Form.CreatePayload": { "type": "object", "properties": { "id": { "anyOf": [ { "$ref": "#/components/schemas/Form.ID" }, { "type": "null" } ] }, "title": { "type": "string" }, "metadata": { "$ref": "#/components/schemas/Form.Metadata" }, "fields": { "$ref": "#/components/schemas/Form.Fields" } }, "required": ["title", "fields"], "additionalProperties": false }, "Form.Detail": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Form.ID" }, "sessionID": { "type": "string" }, "title": { "type": "string" }, "metadata": { "$ref": "#/components/schemas/Form.Metadata" }, "fields": { "$ref": "#/components/schemas/Form.Fields" }, "state": { "$ref": "#/components/schemas/Form.State" } }, "required": ["id", "sessionID", "title", "fields", "state"], "additionalProperties": false }, "Form.ExternalField": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "enum": ["external"] }, "url": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" } }, "required": ["key", "type", "url"], "additionalProperties": false }, "Form.Field": { "anyOf": [ { "$ref": "#/components/schemas/Form.StringField" }, { "$ref": "#/components/schemas/Form.NumberField" }, { "$ref": "#/components/schemas/Form.IntegerField" }, { "$ref": "#/components/schemas/Form.BooleanField" }, { "$ref": "#/components/schemas/Form.MultiselectField" }, { "$ref": "#/components/schemas/Form.ExternalField" } ] }, "Form.Field_1": { "anyOf": [ { "$ref": "#/components/schemas/Form.StringField_1" }, { "$ref": "#/components/schemas/Form.NumberField_1" }, { "$ref": "#/components/schemas/Form.IntegerField_1" }, { "$ref": "#/components/schemas/Form.BooleanField_1" }, { "$ref": "#/components/schemas/Form.MultiselectField_1" }, { "$ref": "#/components/schemas/Form.ExternalField" } ] }, "Form.Fields": { "type": "array", "prefixItems": [ { "$ref": "#/components/schemas/Form.Field" } ], "minItems": 1, "items": { "$ref": "#/components/schemas/Form.Field" } }, "Form.Fields_1": { "type": "array", "prefixItems": [ { "$ref": "#/components/schemas/Form.Field_1" } ], "minItems": 1, "items": { "$ref": "#/components/schemas/Form.Field_1" } }, "Form.ID": { "type": "string", "pattern": "^frm_" }, "Form.Info": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Form.ID" }, "sessionID": { "type": "string" }, "title": { "type": "string" }, "metadata": { "$ref": "#/components/schemas/Form.Metadata" }, "fields": { "$ref": "#/components/schemas/Form.Fields" } }, "required": ["id", "sessionID", "title", "fields"], "additionalProperties": false }, "Form.Info_1": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Form.ID" }, "sessionID": { "type": "string" }, "title": { "type": "string" }, "metadata": { "$ref": "#/components/schemas/Form.Metadata" }, "fields": { "$ref": "#/components/schemas/Form.Fields_1" } }, "required": ["id", "sessionID", "title", "fields"], "additionalProperties": false }, "Form.IntegerField": { "type": "object", "properties": { "key": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "hidden": { "type": "boolean" }, "when": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When" } }, "type": { "type": "string", "enum": ["integer"] }, "minimum": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "maximum": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "default": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["key", "type"], "additionalProperties": false }, "Form.IntegerField_1": { "type": "object", "properties": { "key": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "hidden": { "type": "boolean" }, "when": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When_1" } }, "type": { "type": "string", "enum": ["integer"] }, "minimum": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["NaN", "Infinity", "-Infinity"] } ] }, "maximum": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["NaN", "Infinity", "-Infinity"] } ] }, "default": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["NaN", "Infinity", "-Infinity"] } ] } }, "required": ["key", "type"], "additionalProperties": false }, "Form.Metadata": { "type": "object" }, "Form.MultiselectField": { "type": "object", "properties": { "key": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "hidden": { "type": "boolean" }, "when": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When" } }, "type": { "type": "string", "enum": ["multiselect"] }, "options": { "type": "array", "items": { "$ref": "#/components/schemas/Form.Option" } }, "minItems": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "maxItems": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "custom": { "type": "boolean" }, "default": { "type": "array", "items": { "type": "string" } } }, "required": ["key", "type", "options"], "additionalProperties": false }, "Form.MultiselectField_1": { "type": "object", "properties": { "key": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "hidden": { "type": "boolean" }, "when": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When_1" } }, "type": { "type": "string", "enum": ["multiselect"] }, "options": { "type": "array", "items": { "$ref": "#/components/schemas/Form.Option" } }, "minItems": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "maxItems": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "custom": { "type": "boolean" }, "default": { "type": "array", "items": { "type": "string" } } }, "required": ["key", "type", "options"], "additionalProperties": false }, "Form.NumberField": { "type": "object", "properties": { "key": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "hidden": { "type": "boolean" }, "when": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When" } }, "type": { "type": "string", "enum": ["number"] }, "minimum": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "maximum": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "default": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["key", "type"], "additionalProperties": false }, "Form.NumberField_1": { "type": "object", "properties": { "key": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "hidden": { "type": "boolean" }, "when": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When_1" } }, "type": { "type": "string", "enum": ["number"] }, "minimum": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["NaN", "Infinity", "-Infinity"] } ] }, "maximum": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["NaN", "Infinity", "-Infinity"] } ] }, "default": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["NaN", "Infinity", "-Infinity"] } ] } }, "required": ["key", "type"], "additionalProperties": false }, "Form.Option": { "type": "object", "properties": { "value": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" } }, "required": ["value", "label"], "additionalProperties": false }, "Form.Reply": { "type": "object", "properties": { "answer": { "$ref": "#/components/schemas/Form.Answer" } }, "required": ["answer"], "additionalProperties": false }, "Form.State": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "enum": ["pending"] } }, "required": ["status"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["answered"] }, "answer": { "$ref": "#/components/schemas/Form.Answer" } }, "required": ["status", "answer"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["cancelled"] }, "message": { "type": "string" } }, "required": ["status"], "additionalProperties": false } ] }, "Form.StringField": { "type": "object", "properties": { "key": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "hidden": { "type": "boolean" }, "when": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When" } }, "type": { "type": "string", "enum": ["string"] }, "format": { "type": "string", "enum": ["email", "uri", "date", "date-time"] }, "minLength": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "maxLength": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "pattern": { "type": "string" }, "placeholder": { "type": "string" }, "default": { "type": "string" }, "options": { "type": "array", "items": { "$ref": "#/components/schemas/Form.Option" } }, "custom": { "type": "boolean" } }, "required": ["key", "type"], "additionalProperties": false }, "Form.StringField_1": { "type": "object", "properties": { "key": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "required": { "type": "boolean" }, "hidden": { "type": "boolean" }, "when": { "type": "array", "items": { "$ref": "#/components/schemas/Form.When_1" } }, "type": { "type": "string", "enum": ["string"] }, "format": { "type": "string", "enum": ["email", "uri", "date", "date-time"] }, "minLength": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "maxLength": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "pattern": { "type": "string" }, "placeholder": { "type": "string" }, "default": { "type": "string" }, "options": { "type": "array", "items": { "$ref": "#/components/schemas/Form.Option" } }, "custom": { "type": "boolean" } }, "required": ["key", "type"], "additionalProperties": false }, "Form.Value": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] }, { "type": "boolean" }, { "type": "array", "items": { "type": "string" } } ] }, "Form.Value_1": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "string", "enum": ["NaN", "Infinity", "-Infinity"] }, { "type": "boolean" }, { "type": "array", "items": { "type": "string" } } ] }, "Form.When": { "type": "object", "properties": { "key": { "type": "string" }, "op": { "type": "string", "enum": ["eq", "neq"] }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] }, { "type": "boolean" } ] } }, "required": ["key", "op", "value"], "additionalProperties": false }, "Form.When_1": { "type": "object", "properties": { "key": { "type": "string" }, "op": { "type": "string", "enum": ["eq", "neq"] }, "value": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "string", "enum": ["NaN", "Infinity", "-Infinity"] }, { "type": "boolean" } ] } }, "required": ["key", "op", "value"], "additionalProperties": false }, "FormAlreadySettledErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["FormAlreadySettledError"] }, "id": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "id", "message"], "additionalProperties": false }, "FormInvalidAnswerErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["FormInvalidAnswerError"] }, "id": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "id", "message"], "additionalProperties": false }, "FormNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["FormNotFoundError"] }, "id": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "id", "message"], "additionalProperties": false }, "Generate.ChoiceAnswer": { "type": "object", "properties": { "type": { "type": "string", "enum": ["choice"] }, "name": { "type": "string" }, "choice": { "$ref": "#/components/schemas/Generate.ChoiceValue" }, "probabilities": { "type": "array", "items": { "type": "object", "properties": { "value": { "$ref": "#/components/schemas/Generate.ChoiceValue" }, "probability": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["value", "probability"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["type", "name", "choice", "probabilities", "confidence"], "additionalProperties": false }, "Generate.ChoiceQuestion": { "type": "object", "properties": { "type": { "type": "string", "enum": ["choice"] }, "name": { "type": "string", "description": "Unique within the request; echoed on the matching answer" }, "instructions": { "type": "string" }, "choices": { "type": "array", "items": { "type": "object", "properties": { "value": { "$ref": "#/components/schemas/Generate.ChoiceValue" }, "description": { "type": "string" } }, "required": ["value"], "additionalProperties": false }, "minItems": 1 } }, "required": ["type", "name", "instructions", "choices"], "additionalProperties": false, "description": "Pick one value from a fixed set" }, "Generate.ChoiceValue": { "anyOf": [ { "type": "string" }, { "type": "boolean" } ], "description": "Choice values are typed: true and \"true\" are different values" }, "Generate.DecisionAnswer": { "anyOf": [ { "$ref": "#/components/schemas/Generate.PredicateAnswer" }, { "$ref": "#/components/schemas/Generate.ChoiceAnswer" }, { "$ref": "#/components/schemas/Generate.ScoreAnswer" }, { "$ref": "#/components/schemas/Generate.ErrorAnswer" } ] }, "Generate.DecisionFilePart": { "type": "object", "properties": { "type": { "type": "string", "enum": ["file"] }, "data": { "$ref": "#/components/schemas/Prompt.Base64" }, "mime": { "type": "string" }, "name": { "type": "string" } }, "required": ["type", "data", "mime"], "additionalProperties": false }, "Generate.DecisionJsonPart": { "type": "object", "properties": { "type": { "type": "string", "enum": ["json"] }, "value": {} }, "required": ["type", "value"], "additionalProperties": false }, "Generate.DecisionPart": { "anyOf": [ { "$ref": "#/components/schemas/Generate.DecisionTextPart" }, { "$ref": "#/components/schemas/Generate.DecisionJsonPart" }, { "$ref": "#/components/schemas/Generate.DecisionFilePart" } ] }, "Generate.DecisionQuestion": { "anyOf": [ { "$ref": "#/components/schemas/Generate.PredicateQuestion" }, { "$ref": "#/components/schemas/Generate.ChoiceQuestion" }, { "$ref": "#/components/schemas/Generate.ScoreQuestion" } ] }, "Generate.DecisionRequest": { "type": "object", "properties": { "model": { "$ref": "#/components/schemas/Model.Ref" }, "input": { "type": "array", "items": { "$ref": "#/components/schemas/Generate.DecisionPart" }, "description": "The evidence every question is asked about, in order" }, "questions": { "type": "array", "items": { "$ref": "#/components/schemas/Generate.DecisionQuestion" }, "minItems": 1, "description": "Question names must be unique; duplicates fail with InvalidRequestError" } }, "required": ["model", "input", "questions"], "additionalProperties": false }, "Generate.DecisionResult": { "type": "object", "properties": { "answers": { "type": "array", "items": { "$ref": "#/components/schemas/Generate.DecisionAnswer" }, "description": "One answer per question, in question order" }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tokens": { "$ref": "#/components/schemas/Generate.Usage" }, "native": { "$ref": "#/components/schemas/Generate.Native" } }, "required": ["answers"], "additionalProperties": false }, "Generate.DecisionTextPart": { "type": "object", "properties": { "type": { "type": "string", "enum": ["text"] }, "text": { "type": "string" } }, "required": ["type", "text"], "additionalProperties": false }, "Generate.ErrorAnswer": { "type": "object", "properties": { "type": { "type": "string", "enum": ["error"] }, "name": { "type": "string" }, "reason": { "type": "string", "description": "Why the question has no answer, for example refusal" }, "message": { "type": "string" } }, "required": ["type", "name", "reason"], "additionalProperties": false, "description": "This one question has no answer; the other answers still came back" }, "Generate.File": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Prompt.Base64" }, "mime": { "type": "string" }, "name": { "type": "string" } }, "required": ["data", "mime"], "additionalProperties": false }, "Generate.ImageAspect": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?:[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$", "description": "Aspect ratio as width:height, for example 16:9" }, "Generate.ImageOutput": { "type": "object", "properties": { "type": { "type": "string", "enum": ["image"] }, "data": { "$ref": "#/components/schemas/Prompt.Base64" }, "mime": { "type": "string" }, "name": { "type": "string" } }, "required": ["type", "data", "mime"], "additionalProperties": false }, "Generate.ImageRequest": { "type": "object", "properties": { "model": { "$ref": "#/components/schemas/Model.Ref" }, "prompt": { "type": "string" }, "images": { "type": "array", "items": { "$ref": "#/components/schemas/Generate.File" } }, "n": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "aspect": { "$ref": "#/components/schemas/Generate.ImageAspect" }, "resolution": { "$ref": "#/components/schemas/Generate.ImageResolution" } }, "required": ["model", "prompt"], "additionalProperties": false }, "Generate.ImageResolution": { "anyOf": [ { "type": "string", "enum": ["1K", "2K", "4K"] }, { "type": "string" } ], "description": "Size tier such as 1K, 2K or 4K; 1K is about as many pixels as 1024x1024 at the requested aspect" }, "Generate.ImageResult": { "type": "object", "properties": { "images": { "type": "array", "items": { "$ref": "#/components/schemas/Generate.ImageOutput" } }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tokens": { "$ref": "#/components/schemas/Generate.Usage" }, "native": { "$ref": "#/components/schemas/Generate.Native" } }, "required": ["images"], "additionalProperties": false }, "Generate.Native": { "type": "object", "description": "Provider-specific data the shared fields do not cover" }, "Generate.PredicateAnswer": { "type": "object", "properties": { "type": { "type": "string", "enum": ["predicate"] }, "name": { "type": "string" }, "probability": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["type", "name", "probability"], "additionalProperties": false }, "Generate.PredicateQuestion": { "type": "object", "properties": { "type": { "type": "string", "enum": ["predicate"] }, "name": { "type": "string", "description": "Unique within the request; echoed on the matching answer" }, "instructions": { "type": "string" } }, "required": ["type", "name", "instructions"], "additionalProperties": false, "description": "The probability that a statement is true" }, "Generate.ScoreAnswer": { "type": "object", "properties": { "type": { "type": "string", "enum": ["score"] }, "name": { "type": "string" }, "score": { "type": "number", "description": "Probability-weighted level index, so it can fall between levels" }, "probabilities": { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "label": { "type": "string" }, "probability": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["value", "label", "probability"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["type", "name", "score", "probabilities", "confidence"], "additionalProperties": false }, "Generate.ScoreQuestion": { "type": "object", "properties": { "type": { "type": "string", "enum": ["score"] }, "name": { "type": "string", "description": "Unique within the request; echoed on the matching answer" }, "instructions": { "type": "string" }, "levels": { "type": "array", "items": { "type": "object", "properties": { "label": { "type": "string" }, "description": { "type": "string" } }, "required": ["label"], "additionalProperties": false }, "minItems": 1 } }, "required": ["type", "name", "instructions", "levels"], "additionalProperties": false, "description": "Place the input on ordered levels, lowest first" }, "Generate.Usage": { "type": "object", "properties": { "input": { "type": "number" }, "output": { "type": "number" } }, "additionalProperties": false, "description": "Token counts, when the provider reports them" }, "GenerateDecisionsResponse": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Generate.DecisionResult" } }, "required": ["data"], "additionalProperties": false }, "GenerateImageResponse": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Generate.ImageResult" } }, "required": ["data"], "additionalProperties": false }, "GenerateTextResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "text": { "type": "string" } }, "required": ["text"], "additionalProperties": false } }, "required": ["data"], "additionalProperties": false }, "Instruction.Hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "Instruction.Key": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$" }, "InstructionEntry.Info": { "type": "object", "properties": { "key": { "$ref": "#/components/schemas/InstructionEntry.Key" }, "value": { "description": "JSON value attached to the session's instructions" } }, "required": ["key", "value"], "additionalProperties": false }, "InstructionEntry.Key": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]*$", "description": "Instruction entry key (lowercase alphanumerics plus . _ -)" }, "InstructionEntry.Snapshot": { "type": "array", "items": { "type": "object", "properties": { "key": { "$ref": "#/components/schemas/InstructionEntry.Key" }, "value": { "description": "JSON value attached to the session's instructions" }, "removed": { "type": "boolean" } }, "required": ["key", "value", "removed"], "additionalProperties": false } }, "InstructionEntryValueTooLargeErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["InstructionEntryValueTooLargeError"] }, "actualBytes": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "maxBytes": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "message": { "type": "string" } }, "required": ["_tag", "actualBytes", "maxBytes", "message"], "additionalProperties": false }, "Integration.AttemptEncoded": { "type": "object", "properties": { "attemptID": { "$ref": "#/components/schemas/Integration.AttemptID" }, "url": { "type": "string" }, "instructions": { "type": "string" }, "mode": { "type": "string", "enum": ["auto", "code"] }, "time": { "type": "object", "properties": { "created": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "expires": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["created", "expires"], "additionalProperties": false } }, "required": ["attemptID", "url", "instructions", "mode", "time"], "additionalProperties": false }, "Integration.AttemptID": { "type": "string" }, "Integration.AttemptStatus": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "enum": ["pending"] }, "time": { "type": "object", "properties": { "created": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "expires": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["created", "expires"], "additionalProperties": false } }, "required": ["status", "time"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["complete"] }, "time": { "type": "object", "properties": { "created": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "expires": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["created", "expires"], "additionalProperties": false } }, "required": ["status", "time"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["failed"] }, "message": { "type": "string" }, "time": { "type": "object", "properties": { "created": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "expires": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["created", "expires"], "additionalProperties": false } }, "required": ["status", "message", "time"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["expired"] }, "time": { "type": "object", "properties": { "created": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "expires": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["created", "expires"], "additionalProperties": false } }, "required": ["status", "time"], "additionalProperties": false } ] }, "Integration.CommandAttempt": { "type": "object", "properties": { "attemptID": { "$ref": "#/components/schemas/Integration.AttemptID" }, "time": { "type": "object", "properties": { "created": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "expires": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["created", "expires"], "additionalProperties": false } }, "required": ["attemptID", "time"], "additionalProperties": false }, "Integration.CommandAttemptStatus": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "enum": ["pending"] }, "message": { "type": "string" }, "time": { "type": "object", "properties": { "created": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "expires": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["created", "expires"], "additionalProperties": false } }, "required": ["status", "time"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["complete"] }, "time": { "type": "object", "properties": { "created": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "expires": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["created", "expires"], "additionalProperties": false } }, "required": ["status", "time"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["failed"] }, "message": { "type": "string" }, "time": { "type": "object", "properties": { "created": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "expires": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["created", "expires"], "additionalProperties": false } }, "required": ["status", "message", "time"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["expired"] }, "time": { "type": "object", "properties": { "created": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "expires": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["created", "expires"], "additionalProperties": false } }, "required": ["status", "time"], "additionalProperties": false } ] }, "Integration.CommandMethod": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Integration.MethodID" }, "type": { "type": "string", "enum": ["command"] }, "label": { "type": "string" }, "command": { "type": "array", "items": { "type": "string" } } }, "required": ["id", "type", "label", "command"], "additionalProperties": false }, "Integration.EnvMethod": { "type": "object", "properties": { "type": { "type": "string", "enum": ["env"] }, "names": { "type": "array", "items": { "type": "string" } } }, "required": ["type", "names"], "additionalProperties": false }, "Integration.ExternalMethod": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Integration.MethodID" }, "type": { "type": "string", "enum": ["external"] }, "label": { "type": "string" }, "form": { "$ref": "#/components/schemas/Form.Fields" } }, "required": ["id", "type", "label"], "additionalProperties": false }, "Integration.ID": { "type": "string" }, "Integration.Info": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Integration.ID" }, "name": { "type": "string" }, "metadata": { "type": "object" }, "methods": { "type": "array", "items": { "$ref": "#/components/schemas/Integration.Method" } }, "connections": { "type": "array", "items": { "$ref": "#/components/schemas/Connection.Info" } } }, "required": ["id", "name", "methods", "connections"], "additionalProperties": false }, "Integration.KeyMethod": { "type": "object", "properties": { "type": { "type": "string", "enum": ["key"] }, "label": { "type": "string" }, "form": { "$ref": "#/components/schemas/Form.Fields" } }, "required": ["type"], "additionalProperties": false }, "Integration.Method": { "anyOf": [ { "$ref": "#/components/schemas/Integration.OAuthMethod" }, { "$ref": "#/components/schemas/Integration.CommandMethod" }, { "$ref": "#/components/schemas/Integration.KeyMethod" }, { "$ref": "#/components/schemas/Integration.ExternalMethod" }, { "$ref": "#/components/schemas/Integration.EnvMethod" } ] }, "Integration.MethodID": { "type": "string" }, "Integration.OAuthMethod": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Integration.MethodID" }, "type": { "type": "string", "enum": ["oauth"] }, "label": { "type": "string" }, "form": { "$ref": "#/components/schemas/Form.Fields" } }, "required": ["id", "type", "label"], "additionalProperties": false }, "IntegrationAttemptNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["IntegrationAttemptNotFoundError"] }, "integrationID": { "type": "string" }, "attemptID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "integrationID", "attemptID", "message"], "additionalProperties": false }, "IntegrationMethodNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["IntegrationMethodNotFoundError"] }, "integrationID": { "type": "string" }, "methodID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "integrationID", "methodID", "message"], "additionalProperties": false }, "IntegrationNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["IntegrationNotFoundError"] }, "integrationID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "integrationID", "message"], "additionalProperties": false }, "InvalidCursorErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["InvalidCursorError"] }, "message": { "type": "string" } }, "required": ["_tag", "message"], "additionalProperties": false }, "InvalidRequestErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["InvalidRequestError"] }, "message": { "type": "string" }, "kind": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "field": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["_tag", "message"], "additionalProperties": false }, "Location.PublicInfo": { "type": "object", "properties": { "directory": { "$ref": "#/components/schemas/AbsolutePath" }, "project": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Project.ID" }, "directory": { "$ref": "#/components/schemas/AbsolutePath" }, "canonical": { "$ref": "#/components/schemas/AbsolutePath" } }, "required": ["id", "directory", "canonical"], "additionalProperties": false } }, "required": ["directory", "project"], "additionalProperties": false }, "Location.PublicRef": { "type": "object", "properties": { "directory": { "$ref": "#/components/schemas/AbsolutePath" } }, "required": ["directory"], "additionalProperties": false }, "Location.Ref": { "type": "object", "properties": { "directory": { "$ref": "#/components/schemas/AbsolutePath" }, "workspaceID": { "$ref": "#/components/schemas/Workspace.ID" } }, "required": ["directory"], "additionalProperties": false }, "LocationNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["LocationNotFoundError"] }, "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "message": { "type": "string" } }, "required": ["_tag", "location", "message"], "additionalProperties": false }, "Mcp.LocalConfigEncoded": { "type": "object", "properties": { "type": { "type": "string", "enum": ["local"] }, "command": { "type": "array", "items": { "type": "string" } }, "cwd": { "type": "string" }, "environment": { "type": "object", "additionalProperties": { "type": "string" } }, "disabled": { "type": "boolean" }, "codemode": { "type": "boolean" }, "timeout": { "type": "object", "properties": { "startup": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "catalog": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "execution": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 } }, "additionalProperties": false }, "protocol": { "$ref": "#/components/schemas/Mcp.Protocol" } }, "required": ["type", "command"], "additionalProperties": false }, "Mcp.OAuthConfigEncoded": { "type": "object", "properties": { "client_id": { "type": "string" }, "client_secret": { "type": "string" }, "scope": { "type": "string" }, "callback_port": { "type": "integer", "minimum": 1, "maximum": 65535 }, "redirect_uri": { "type": "string" }, "auth_server_metadata_url": { "type": "string" } }, "additionalProperties": false }, "Mcp.Protocol": { "type": "string", "enum": ["legacy", "auto", "2026-07-28"], "description": "MCP protocol negotiation. \"legacy\" (default) opens with the initialize handshake and speaks protocol revisions up to 2025-11-25. \"auto\" probes for the 2026-07-28 revision and falls back to legacy when the server does not support it. \"2026-07-28\" requires that revision and fails otherwise." }, "Mcp.RemoteConfigEncoded": { "type": "object", "properties": { "type": { "type": "string", "enum": ["remote"] }, "url": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "oauth": { "anyOf": [ { "$ref": "#/components/schemas/Mcp.OAuthConfigEncoded" }, { "type": "boolean", "enum": [false] } ] }, "disabled": { "type": "boolean" }, "codemode": { "type": "boolean" }, "timeout": { "type": "object", "properties": { "startup": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "catalog": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "execution": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 } }, "additionalProperties": false }, "protocol": { "$ref": "#/components/schemas/Mcp.Protocol" } }, "required": ["type", "url"], "additionalProperties": false }, "Mcp.Resource": { "type": "object", "properties": { "server": { "type": "string" }, "name": { "type": "string" }, "uri": { "type": "string" }, "description": { "type": "string" }, "mimeType": { "type": "string" } }, "required": ["server", "name", "uri"], "additionalProperties": false }, "Mcp.ResourceCatalog": { "type": "object", "properties": { "resources": { "type": "array", "items": { "$ref": "#/components/schemas/Mcp.Resource" } }, "templates": { "type": "array", "items": { "$ref": "#/components/schemas/Mcp.ResourceTemplate" } } }, "required": ["resources", "templates"], "additionalProperties": false }, "Mcp.ResourceTemplate": { "type": "object", "properties": { "server": { "type": "string" }, "name": { "type": "string" }, "uriTemplate": { "type": "string" }, "description": { "type": "string" }, "mimeType": { "type": "string" } }, "required": ["server", "name", "uriTemplate"], "additionalProperties": false }, "Mcp.Server": { "type": "object", "properties": { "name": { "type": "string" }, "status": { "anyOf": [ { "$ref": "#/components/schemas/Mcp.Status.Connected" }, { "$ref": "#/components/schemas/Mcp.Status.Pending" }, { "$ref": "#/components/schemas/Mcp.Status.Disabled" }, { "$ref": "#/components/schemas/Mcp.Status.Failed" }, { "$ref": "#/components/schemas/Mcp.Status.NeedsAuth" } ] }, "title": { "type": "string" }, "integrationID": { "$ref": "#/components/schemas/Integration.ID" } }, "required": ["name", "status"], "additionalProperties": false }, "Mcp.Status.Connected": { "type": "object", "properties": { "status": { "type": "string", "enum": ["connected"] } }, "required": ["status"], "additionalProperties": false }, "Mcp.Status.Disabled": { "type": "object", "properties": { "status": { "type": "string", "enum": ["disabled"] } }, "required": ["status"], "additionalProperties": false }, "Mcp.Status.Failed": { "type": "object", "properties": { "status": { "type": "string", "enum": ["failed"] }, "error": { "type": "string" } }, "required": ["status", "error"], "additionalProperties": false }, "Mcp.Status.NeedsAuth": { "type": "object", "properties": { "status": { "type": "string", "enum": ["needs_auth"] }, "error": { "type": "string" } }, "required": ["status", "error"], "additionalProperties": false }, "Mcp.Status.Pending": { "type": "object", "properties": { "status": { "type": "string", "enum": ["pending"] } }, "required": ["status"], "additionalProperties": false }, "McpServerNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["McpServerNotFoundError"] }, "server": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "server", "message"], "additionalProperties": false }, "MediaHash": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "MessageNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["MessageNotFoundError"] }, "sessionID": { "type": "string" }, "messageID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "sessionID", "messageID", "message"], "additionalProperties": false }, "Model.CacheFormat": { "type": "string", "enum": ["anthropic", "alibaba"] }, "Model.Capabilities": { "type": "object", "properties": { "tools": { "type": "boolean" }, "input": { "type": "array", "items": { "type": "string" } }, "output": { "type": "array", "items": { "type": "string" } }, "temperature": { "type": "boolean" } }, "required": ["tools", "input", "output"], "additionalProperties": false }, "Model.Compatibility": { "type": "object", "properties": { "reasoningField": { "$ref": "#/components/schemas/Model.ReasoningField" }, "requireReasoning": { "type": "boolean" }, "maxTokensField": { "$ref": "#/components/schemas/Model.MaxTokensField" }, "requireFinishReason": { "type": "boolean" }, "requireAssistantAfterTool": { "type": "boolean" }, "supportsPromptCacheKey": { "type": "boolean" }, "streamUsage": { "type": "boolean" }, "cacheFormat": { "$ref": "#/components/schemas/Model.CacheFormat" }, "supportsThinkingBlockBinding": { "type": "boolean" }, "supportsEffortUpdates": { "type": "boolean" }, "mediaInput": { "$ref": "#/components/schemas/Model.MediaInput" } }, "additionalProperties": false }, "Model.Cost": { "type": "object", "properties": { "tier": { "type": "object", "properties": { "type": { "type": "string", "enum": ["context"] }, "size": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["type", "size"], "additionalProperties": false }, "input": { "$ref": "#/components/schemas/Money.USDPerMillionTokens" }, "output": { "$ref": "#/components/schemas/Money.USDPerMillionTokens" }, "cache": { "type": "object", "properties": { "read": { "$ref": "#/components/schemas/Money.USDPerMillionTokens" }, "write": { "$ref": "#/components/schemas/Money.USDPerMillionTokens" } }, "required": ["read", "write"], "additionalProperties": false } }, "required": ["input", "output", "cache"], "additionalProperties": false }, "Model.Info": { "type": "object", "properties": { "id": { "type": "string" }, "modelID": { "type": "string" }, "providerID": { "$ref": "#/components/schemas/Provider.ID" }, "canonical": { "$ref": "#/components/schemas/Provider.ID" }, "type": { "$ref": "#/components/schemas/Model.Type" }, "family": { "type": "string" }, "name": { "type": "string" }, "compatibility": { "$ref": "#/components/schemas/Model.Compatibility" }, "package": { "type": "string" }, "settings": { "$ref": "#/components/schemas/Model.Settings" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "body": { "type": "object" }, "capabilities": { "$ref": "#/components/schemas/Model.Capabilities" }, "variants": { "type": "array", "items": { "$ref": "#/components/schemas/Model.Variant" } }, "time": { "type": "object", "properties": { "released": { "type": "number" } }, "required": ["released"], "additionalProperties": false }, "cost": { "type": "array", "items": { "$ref": "#/components/schemas/Model.Cost" } }, "status": { "type": "string", "enum": ["alpha", "beta", "deprecated", "active"] }, "enabled": { "type": "boolean" }, "limit": { "type": "object", "properties": { "context": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "input": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "output": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["context", "output"], "additionalProperties": false } }, "required": [ "id", "modelID", "providerID", "name", "capabilities", "variants", "time", "cost", "status", "enabled", "limit" ], "additionalProperties": false }, "Model.MaxTokensField": { "type": "string", "enum": ["max_completion_tokens", "max_tokens"] }, "Model.MediaInput": { "type": "string", "enum": ["assets", "state", "root"] }, "Model.ReasoningField": { "anyOf": [ { "type": "string", "enum": ["reasoning", "reasoning_content", "reasoning_text"] }, { "type": "string" } ] }, "Model.Ref": { "type": "object", "properties": { "id": { "type": "string" }, "providerID": { "$ref": "#/components/schemas/Provider.ID" }, "variant": { "type": "string" } }, "required": ["id", "providerID"], "additionalProperties": false }, "Model.Settings": { "type": "object", "properties": { "compaction": { "$ref": "#/components/schemas/Provider.Compaction" }, "cache": { "$ref": "#/components/schemas/Provider.Cache" }, "encoding": { "$ref": "#/components/schemas/Provider.Encoding" } }, "allOf": [ { "type": "object", "additionalProperties": {} } ] }, "Model.Type": { "anyOf": [ { "type": "string", "enum": ["chat", "decision", "image"] }, { "type": "string" } ] }, "Model.Variant": { "type": "object", "properties": { "id": { "type": "string" }, "settings": { "$ref": "#/components/schemas/Model.VariantSettings" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "body": { "type": "object" } }, "required": ["id"], "additionalProperties": false }, "Model.VariantSettings": { "type": "object", "properties": { "compaction": { "$ref": "#/components/schemas/Provider.Compaction" }, "encoding": { "$ref": "#/components/schemas/Provider.Encoding" } }, "allOf": [ { "type": "object", "additionalProperties": {} } ] }, "ModelNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["ModelNotFoundError"] }, "providerID": { "type": "string" }, "modelID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "providerID", "modelID", "message"], "additionalProperties": false }, "Money.USD": { "type": "number" }, "Money.USDPerMillionTokens": { "type": "number" }, "PairingCode": { "type": "object", "properties": { "code": { "type": "string" }, "expires_in": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": ["code", "expires_in"], "additionalProperties": false }, "PairingSession": { "type": "object", "properties": { "token": { "type": "string" } }, "required": ["token"], "additionalProperties": false }, "Permission.Effect": { "type": "string", "enum": ["allow", "deny", "ask"] }, "Permission.ID": { "type": "string", "pattern": "^per" }, "Permission.Reply": { "type": "string", "enum": ["once", "always", "reject"] }, "Permission.Request": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Permission.ID" }, "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "action": { "type": "string" }, "resources": { "type": "array", "items": { "type": "string" } }, "save": { "type": "array", "items": { "type": "string" } }, "metadata": { "type": "object" }, "source": { "$ref": "#/components/schemas/Permission.Source" }, "message": { "type": "string" } }, "required": ["id", "sessionID", "action", "resources"], "additionalProperties": false }, "Permission.Rule": { "type": "object", "properties": { "action": { "type": "string" }, "resource": { "type": "string" }, "effect": { "$ref": "#/components/schemas/Permission.Effect" } }, "required": ["action", "resource", "effect"], "additionalProperties": false }, "Permission.Ruleset": { "type": "array", "items": { "$ref": "#/components/schemas/Permission.Rule" } }, "Permission.Source": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["tool"] }, "messageID": { "type": "string" }, "id": { "type": "string" } }, "required": ["type", "messageID", "id"], "additionalProperties": false } ] }, "PermissionNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["PermissionNotFoundError"] }, "requestID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "requestID", "message"], "additionalProperties": false }, "PermissionSaved.ID": { "type": "string" }, "PermissionSaved.Info": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/PermissionSaved.ID" }, "projectID": { "$ref": "#/components/schemas/Project.ID" }, "action": { "type": "string" }, "resource": { "type": "string" }, "time": { "type": "object", "properties": { "created": { "type": "number" }, "updated": { "type": "number" } }, "required": ["created", "updated"], "additionalProperties": false } }, "required": ["id", "projectID", "action", "resource", "time"], "additionalProperties": false }, "PermissionSavedNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["PermissionSavedNotFoundError"] }, "id": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "id", "message"], "additionalProperties": false }, "PersistentPty.CreateInput": { "type": "object", "properties": { "command": { "type": "string" }, "args": { "type": "array", "items": { "type": "string" } }, "cwd": { "type": "string" }, "title": { "type": "string" }, "env": { "type": "object", "additionalProperties": { "type": "string" } }, "size": { "type": "object", "properties": { "cols": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "rows": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 } }, "required": ["cols", "rows"], "additionalProperties": false } }, "required": ["args", "title", "env"], "additionalProperties": false }, "PersistentPty.Handoff": { "type": "object", "properties": { "directory": { "type": "string" }, "instanceID": { "type": "string" }, "ticket": { "type": "string" }, "expiresAt": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["directory", "instanceID", "ticket", "expiresAt"], "additionalProperties": false }, "PersistentPty.Info": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Pty.ID" }, "title": { "type": "string" }, "command": { "type": "string" }, "args": { "type": "array", "items": { "type": "string" } }, "cwd": { "type": "string" }, "status": { "type": "string", "enum": ["running", "exited"] }, "pid": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "exitCode": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "userTitle": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "foregroundProcess": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "size": { "type": "object", "properties": { "cols": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "rows": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 } }, "required": ["cols", "rows"], "additionalProperties": false }, "output": { "type": "object", "properties": { "head": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "tail": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["head", "tail"], "additionalProperties": false } }, "required": [ "id", "title", "command", "args", "cwd", "status", "pid", "sessionID", "userTitle", "foregroundProcess", "size", "output" ], "additionalProperties": false }, "PersistentPty.ReadResult": { "type": "object", "properties": { "ptyID": { "$ref": "#/components/schemas/Pty.ID" }, "title": { "type": "string" }, "cwd": { "type": "string" }, "foregroundProcess": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "screen": { "type": "object", "properties": { "text": { "type": "string" }, "cols": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "rows": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "cursor": { "type": "object", "properties": { "x": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "y": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["x", "y"], "additionalProperties": false } }, "required": ["text", "cols", "rows", "cursor"], "additionalProperties": false } }, "required": ["ptyID", "title", "cwd", "foregroundProcess", "screen"], "additionalProperties": false }, "PersistentPty.Snapshot": { "type": "object", "properties": { "info": { "$ref": "#/components/schemas/PersistentPty.Info" }, "text": { "type": "string" }, "checkpoint": { "type": "string", "format": "byte", "contentEncoding": "base64" }, "cursor": { "type": "object", "properties": { "x": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "y": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["x", "y"], "additionalProperties": false } }, "required": ["info", "text", "checkpoint", "cursor"], "additionalProperties": false }, "PersistentPty.UpdateInput": { "type": "object", "properties": { "attachmentID": { "type": "string" }, "size": { "type": "object", "properties": { "cols": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "rows": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 } }, "required": ["cols", "rows"], "additionalProperties": false }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "Plugin.Features": { "type": "object", "properties": { "server": { "type": "boolean", "enum": [true] }, "tui": { "type": "boolean", "enum": [true] }, "rpc": { "type": "boolean", "enum": [true] }, "gui": { "type": "boolean", "enum": [true] } }, "additionalProperties": false }, "Plugin.GuiBundle": { "type": "object", "properties": { "code": { "type": "string" }, "revision": { "type": "string" }, "options": { "type": "object" } }, "required": ["code", "revision", "options"], "additionalProperties": false }, "Plugin.ID": { "type": "string" }, "Plugin.Info": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Plugin.ID" }, "source": { "$ref": "#/components/schemas/Plugin.Source" }, "features": { "$ref": "#/components/schemas/Plugin.Features" }, "state": { "$ref": "#/components/schemas/Plugin.State" } }, "required": ["source", "features", "state"], "additionalProperties": false }, "Plugin.Source": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["builtin"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["package"] }, "target": { "type": "string" }, "version": { "type": "string" }, "outdated": { "type": "boolean", "enum": [true] }, "updating": { "type": "boolean", "enum": [true] } }, "required": ["type", "target"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["local"] }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["sdk"] } }, "required": ["type"], "additionalProperties": false } ] }, "Plugin.State": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string", "enum": ["active"] } }, "required": ["status"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["failed"] }, "error": { "type": "string" }, "ref": { "type": "string" } }, "required": ["status", "error"], "additionalProperties": false } ] }, "PluginNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["PluginNotFoundError"] }, "pluginID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "pluginID", "message"], "additionalProperties": false }, "Project": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Project.ID" }, "canonical": { "$ref": "#/components/schemas/AbsolutePath" }, "vcs": { "$ref": "#/components/schemas/Project.Vcs" }, "name": { "type": "string" }, "icon": { "$ref": "#/components/schemas/Project.Icon" }, "commands": { "$ref": "#/components/schemas/Project.Commands" }, "time": { "$ref": "#/components/schemas/Project.Time" }, "sandboxes": { "type": "array", "items": { "type": "string" } } }, "required": ["id", "canonical", "time", "sandboxes"], "additionalProperties": false }, "Project.Commands": { "type": "object", "properties": { "start": { "type": "string", "description": "Startup script to run when creating a new workspace (worktree)" } }, "additionalProperties": false }, "Project.ID": { "type": "string" }, "Project.Icon": { "type": "object", "properties": { "url": { "type": "string" }, "override": { "type": "string" }, "color": { "type": "string" } }, "additionalProperties": false }, "Project.Time": { "type": "object", "properties": { "created": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "updated": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "active": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "archived": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["created", "updated", "active"], "additionalProperties": false }, "Project.Vcs": { "type": "string", "pattern": "^[a-z][a-z0-9._-]*$" }, "ProjectNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["ProjectNotFoundError"] }, "projectID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "projectID", "message"], "additionalProperties": false }, "Prompt.AgentAttachment": { "type": "object", "properties": { "name": { "type": "string" }, "mention": { "$ref": "#/components/schemas/Prompt.Mention" } }, "required": ["name"], "additionalProperties": false }, "Prompt.Base64": { "type": "string", "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" }, "Prompt.FileAttachment": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Prompt.Base64" }, "mime": { "type": "string" }, "source": { "$ref": "#/components/schemas/Prompt.FileSource" }, "name": { "type": "string" }, "description": { "type": "string" }, "mention": { "$ref": "#/components/schemas/Prompt.Mention" } }, "required": ["data", "mime", "source"], "additionalProperties": false }, "Prompt.FileSource": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["inline"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["uri"] }, "uri": { "type": "string" } }, "required": ["type", "uri"], "additionalProperties": false } ] }, "Prompt.Mention": { "type": "object", "properties": { "start": { "type": "number" }, "end": { "type": "number" }, "text": { "type": "string" } }, "required": ["start", "end", "text"], "additionalProperties": false }, "Prompt.SkillAttachment": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Skill.ID" }, "name": { "$ref": "#/components/schemas/Skill.Name" }, "text": { "type": "string" }, "mention": { "$ref": "#/components/schemas/Prompt.Mention" } }, "required": ["id", "name"], "additionalProperties": false }, "PromptInput.FileAttachment": { "type": "object", "properties": { "uri": { "type": "string" }, "source": { "$ref": "#/components/schemas/Prompt.FileSource" }, "name": { "type": "string" }, "description": { "type": "string" }, "mention": { "$ref": "#/components/schemas/Prompt.Mention" } }, "required": ["uri"], "additionalProperties": false }, "PromptInput.SkillAttachment": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Skill.ID" }, "mention": { "$ref": "#/components/schemas/Prompt.Mention" } }, "required": ["id"], "additionalProperties": false }, "Provider.Cache": { "type": "object", "properties": { "ttl": { "$ref": "#/components/schemas/Provider.CacheTTL" }, "warming": { "$ref": "#/components/schemas/Provider.CacheWarming" } }, "additionalProperties": false }, "Provider.CacheTTL": { "type": "string", "pattern": "^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?(?:ms|s|m|h|d)$" }, "Provider.CacheWarming": { "anyOf": [ { "type": "boolean" }, { "type": "object", "properties": { "interval": { "anyOf": [ { "type": "string", "enum": ["auto"] }, { "type": "string" } ] }, "duration": { "type": "string" } }, "additionalProperties": false } ] }, "Provider.Compaction": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["summary"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["native"] } }, "required": ["type"], "additionalProperties": false } ] }, "Provider.Compatibility": { "type": "object", "properties": { "reasoningField": { "$ref": "#/components/schemas/Model.ReasoningField" }, "requireReasoning": { "type": "boolean" }, "maxTokensField": { "$ref": "#/components/schemas/Model.MaxTokensField" }, "requireFinishReason": { "type": "boolean" }, "requireAssistantAfterTool": { "type": "boolean" }, "supportsPromptCacheKey": { "type": "boolean" }, "streamUsage": { "type": "boolean" }, "cacheFormat": { "$ref": "#/components/schemas/Model.CacheFormat" }, "mediaInput": { "$ref": "#/components/schemas/Model.MediaInput" } }, "additionalProperties": false }, "Provider.Encoding": { "type": "string", "enum": ["zstd", "gzip", "none"] }, "Provider.ID": { "type": "string" }, "Provider.Info": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Provider.ID" }, "canonical": { "$ref": "#/components/schemas/Provider.ID" }, "integrationID": { "$ref": "#/components/schemas/Integration.ID" }, "name": { "type": "string" }, "activation": { "type": "string", "enum": ["auto", "enabled", "disabled"] }, "package": { "type": "string" }, "compatibility": { "$ref": "#/components/schemas/Provider.Compatibility" }, "settings": { "$ref": "#/components/schemas/Provider.Settings" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "body": { "type": "object" } }, "required": ["id", "name", "activation", "package"], "additionalProperties": false }, "Provider.Request": { "type": "object", "properties": { "settings": { "$ref": "#/components/schemas/Provider.Settings" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "body": { "type": "object" } }, "required": ["settings", "headers", "body"], "additionalProperties": false }, "Provider.Settings": { "type": "object", "properties": { "timeout": { "anyOf": [ { "type": "number" }, { "type": "boolean", "enum": [false] } ] }, "headerTimeout": { "anyOf": [ { "type": "number" }, { "type": "boolean", "enum": [false] } ] }, "chunkTimeout": { "anyOf": [ { "type": "number" }, { "type": "boolean", "enum": [false] } ] }, "compaction": { "$ref": "#/components/schemas/Provider.Compaction" }, "cache": { "$ref": "#/components/schemas/Provider.Cache" }, "transport": { "$ref": "#/components/schemas/Provider.Transport" }, "encoding": { "$ref": "#/components/schemas/Provider.Encoding" } }, "allOf": [ { "type": "object", "additionalProperties": {} } ] }, "Provider.Transport": { "type": "string", "enum": ["http", "websocket"] }, "ProviderNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["ProviderNotFoundError"] }, "providerID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "providerID", "message"], "additionalProperties": false }, "ProviderRequestErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["ProviderRequestError"] }, "providerID": { "type": "string" }, "reason": { "type": "string", "enum": ["authentication", "rate_limit", "content_filter", "invalid_request", "overloaded", "provider"] }, "message": { "type": "string" }, "status": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "retryAfterMs": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": ["_tag", "providerID", "reason", "message"], "additionalProperties": false }, "Pty": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Pty.ID" }, "title": { "type": "string" }, "command": { "type": "string" }, "args": { "type": "array", "items": { "type": "string" } }, "cwd": { "type": "string" }, "status": { "type": "string", "enum": ["running", "exited"] }, "pid": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "exitCode": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["id", "title", "command", "args", "cwd", "status", "pid"], "additionalProperties": false }, "Pty.ID": { "type": "string", "pattern": "^pty" }, "PtyFeatureUnsupportedErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["PtyFeatureUnsupportedError"] }, "feature": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "feature", "message"], "additionalProperties": false }, "PtyNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["PtyNotFoundError"] }, "ptyID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "ptyID", "message"], "additionalProperties": false }, "PtyTicket.ConnectToken": { "type": "object", "properties": { "ticket": { "type": "string" }, "expires_in": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 } }, "required": ["ticket", "expires_in"], "additionalProperties": false }, "Reference.GitSource": { "type": "object", "properties": { "type": { "type": "string", "enum": ["git"] }, "repository": { "type": "string" }, "branch": { "type": "string" } }, "required": ["type", "repository"], "additionalProperties": false }, "Reference.Info": { "type": "object", "properties": { "name": { "type": "string" }, "path": { "$ref": "#/components/schemas/AbsolutePath" }, "description": { "type": "string" }, "hidden": { "type": "boolean" }, "source": { "$ref": "#/components/schemas/Reference.Source" } }, "required": ["name", "path", "source"], "additionalProperties": false }, "Reference.LocalSource": { "type": "object", "properties": { "type": { "type": "string", "enum": ["local"] }, "path": { "$ref": "#/components/schemas/AbsolutePath" } }, "required": ["type", "path"], "additionalProperties": false }, "Reference.Source": { "anyOf": [ { "$ref": "#/components/schemas/Reference.LocalSource" }, { "$ref": "#/components/schemas/Reference.GitSource" } ] }, "RelativePath": { "type": "string" }, "Rpc.Input": { "type": "object", "properties": { "input": {} }, "additionalProperties": false }, "Rpc.Output": { "type": "object", "properties": { "output": {} }, "additionalProperties": false }, "RpcErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["RpcError"] }, "type": { "type": "string" }, "message": { "type": "string" }, "data": { "anyOf": [ {}, { "type": "null" } ] } }, "required": ["_tag", "type", "message"], "additionalProperties": false }, "RpcInternalErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["RpcInternalError"] }, "type": { "type": "string", "enum": ["rpc.internal", "rpc.invalid_output"] }, "message": { "type": "string" }, "data": { "anyOf": [ {}, { "type": "null" } ] } }, "required": ["_tag", "type", "message"], "additionalProperties": false }, "Schedule.Action": { "anyOf": [ { "$ref": "#/components/schemas/Schedule.Action.Prompt" } ] }, "Schedule.Action.Prompt": { "type": "object", "properties": { "type": { "type": "string", "enum": ["prompt"] }, "prompt": { "type": "string" } }, "required": ["type", "prompt"], "additionalProperties": false }, "Schedule.Condition": { "anyOf": [ { "$ref": "#/components/schemas/Schedule.Condition.Shell" }, { "$ref": "#/components/schemas/Schedule.Condition.Code" } ] }, "Schedule.Condition.Code": { "type": "object", "properties": { "type": { "type": "string", "enum": ["code"] }, "code": { "type": "string" } }, "required": ["type", "code"], "additionalProperties": false }, "Schedule.Condition.Shell": { "type": "object", "properties": { "type": { "type": "string", "enum": ["shell"] }, "run": { "type": "string" }, "is": { "type": "string" }, "matches": { "type": "string" }, "changes": { "type": "boolean" } }, "required": ["type", "run"], "additionalProperties": false }, "Schedule.ConditionInput": { "anyOf": [ { "type": "object", "properties": { "run": { "type": "string", "minLength": 1, "description": "Shell command to run in the Session's directory. Alone, exit 0 wakes and stdout is appended." }, "is": { "type": "string" }, "matches": { "type": "string" }, "changes": { "type": "boolean" }, "code": { "not": {} } }, "required": ["run"], "additionalProperties": false }, { "type": "object", "properties": { "code": { "type": "string", "minLength": 1, "description": "Code Mode JavaScript check (no fetch; 30s, 20 tool calls, 32 KB output cap). Call tools statically as tools..(...) or tools[\"ns-name\"].tool(...); each is authorized once at creation to run unattended. Runs once at creation with state = null (if baselines state without waking; until matches immediately if true), with globals state, now (epoch ms) and runs. Return a boolean or { wake, state?, message? } (message is appended to prompt on wake), e.g.: const t = await tools.slack.read_thread({ id }); return { wake: state !== null && t.count > state.count, state: { count: t.count }, message: \"New reply\" }" }, "run": { "not": {} }, "is": { "not": {} }, "matches": { "not": {} }, "changes": { "not": {} } }, "required": ["code"], "additionalProperties": false } ] }, "Schedule.CreatePayload": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "name": { "type": "string" }, "when": { "$ref": "#/components/schemas/Schedule.WhenInput" }, "if": { "$ref": "#/components/schemas/Schedule.ConditionInput" }, "until": { "$ref": "#/components/schemas/Schedule.ConditionInput" }, "ends": { "$ref": "#/components/schemas/Schedule.Ends" }, "prompt": { "type": "string", "minLength": 1, "description": "The message the Session receives when the schedule wakes." } }, "required": ["sessionID", "prompt"], "additionalProperties": false }, "Schedule.Duration": { "type": "string", "description": "A duration such as \"90 seconds\", \"5 minutes\" or \"2 hours\"." }, "Schedule.Ends": { "type": "object", "properties": { "after": { "$ref": "#/components/schemas/Schedule.Duration" }, "at": { "type": "string" }, "times": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 } }, "additionalProperties": false }, "Schedule.ID": { "type": "string", "pattern": "^sch_" }, "Schedule.Info": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Schedule.ID" }, "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "name": { "type": "string" }, "when": { "$ref": "#/components/schemas/Schedule.When" }, "tz": { "type": "string" }, "if": { "$ref": "#/components/schemas/Schedule.Condition" }, "until": { "$ref": "#/components/schemas/Schedule.Condition" }, "action": { "$ref": "#/components/schemas/Schedule.Action" }, "status": { "$ref": "#/components/schemas/Schedule.Status" }, "nextDueAt": { "type": "number" }, "endsAt": { "type": "number" }, "remainingRuns": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "runCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "lastFiredAt": { "type": "number" }, "lastOutcome": { "$ref": "#/components/schemas/Schedule.Outcome" }, "lastOutput": { "type": "string" }, "time": { "type": "object", "properties": { "created": { "type": "number" }, "updated": { "type": "number" } }, "required": ["created", "updated"], "additionalProperties": false } }, "required": ["id", "when", "tz", "action", "status", "runCount", "time"], "additionalProperties": false }, "Schedule.Outcome": { "type": "string", "enum": ["fired", "late", "checked", "expired", "skipped", "disabled", "failed"] }, "Schedule.Status": { "type": "string", "enum": ["active", "paused", "done"] }, "Schedule.When": { "anyOf": [ { "$ref": "#/components/schemas/Schedule.When.In" }, { "$ref": "#/components/schemas/Schedule.When.At" }, { "$ref": "#/components/schemas/Schedule.When.Every" }, { "$ref": "#/components/schemas/Schedule.When.Cron" } ] }, "Schedule.When.At": { "type": "object", "properties": { "type": { "type": "string", "enum": ["at"] }, "at": { "type": "string" }, "tz": { "type": "string" } }, "required": ["type", "at"], "additionalProperties": false }, "Schedule.When.Cron": { "type": "object", "properties": { "type": { "type": "string", "enum": ["cron"] }, "cron": { "type": "string" }, "tz": { "type": "string" } }, "required": ["type", "cron"], "additionalProperties": false }, "Schedule.When.Every": { "type": "object", "properties": { "type": { "type": "string", "enum": ["every"] }, "every": { "$ref": "#/components/schemas/Schedule.Duration" }, "tz": { "type": "string" } }, "required": ["type", "every"], "additionalProperties": false }, "Schedule.When.In": { "type": "object", "properties": { "type": { "type": "string", "enum": ["in"] }, "in": { "$ref": "#/components/schemas/Schedule.Duration" }, "tz": { "type": "string" } }, "required": ["type", "in"], "additionalProperties": false }, "Schedule.WhenInput": { "anyOf": [ { "type": "object", "properties": { "in": { "$ref": "#/components/schemas/Schedule.Duration" }, "at": { "not": {} }, "every": { "not": {} }, "cron": { "not": {} }, "tz": { "type": "string" } }, "required": ["in"], "additionalProperties": false }, { "type": "object", "properties": { "at": { "type": "string" }, "in": { "not": {} }, "every": { "not": {} }, "cron": { "not": {} }, "tz": { "type": "string" } }, "required": ["at"], "additionalProperties": false }, { "type": "object", "properties": { "every": { "$ref": "#/components/schemas/Schedule.Duration" }, "in": { "not": {} }, "at": { "not": {} }, "cron": { "not": {} }, "tz": { "type": "string" } }, "required": ["every"], "additionalProperties": false }, { "type": "object", "properties": { "cron": { "type": "string" }, "in": { "not": {} }, "at": { "not": {} }, "every": { "not": {} }, "tz": { "type": "string" } }, "required": ["cron"], "additionalProperties": false } ] }, "ScheduleNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["ScheduleNotFoundError"] }, "scheduleID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "scheduleID", "message"], "additionalProperties": false }, "ServerInfo": { "type": "object", "properties": { "version": { "type": "string" }, "pid": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "hostname": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "urls": { "type": "array", "items": { "type": "string" } }, "paths": { "type": "object", "properties": { "tmp": { "type": "string" } }, "required": ["tmp"], "additionalProperties": false }, "capabilities": { "anyOf": [ { "type": "object", "properties": { "persistentPty": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "additionalProperties": false }, { "type": "null" } ] } }, "required": ["version", "pid", "urls", "paths"], "additionalProperties": false }, "ServiceUnavailableErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["ServiceUnavailableError"] }, "message": { "type": "string" }, "service": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["_tag", "message"], "additionalProperties": false }, "Session.Event.Durable": { "anyOf": [ { "$ref": "#/components/schemas/session.created" }, { "$ref": "#/components/schemas/session.agent.selected" }, { "$ref": "#/components/schemas/session.model.selected" }, { "$ref": "#/components/schemas/session.moved" }, { "$ref": "#/components/schemas/session.renamed" }, { "$ref": "#/components/schemas/session.metadata.updated" }, { "$ref": "#/components/schemas/session.permissions" }, { "$ref": "#/components/schemas/session.viewed" }, { "$ref": "#/components/schemas/session.archived" }, { "$ref": "#/components/schemas/session.unarchived" }, { "$ref": "#/components/schemas/session.deleted" }, { "$ref": "#/components/schemas/session.forked" }, { "$ref": "#/components/schemas/session.inbox.delivered" }, { "$ref": "#/components/schemas/session.inbox.enqueued" }, { "$ref": "#/components/schemas/session.inbox.cancelled" }, { "$ref": "#/components/schemas/session.inbox.delivery.changed" }, { "$ref": "#/components/schemas/session.execution.started" }, { "$ref": "#/components/schemas/session.execution.succeeded" }, { "$ref": "#/components/schemas/session.execution.failed" }, { "$ref": "#/components/schemas/session.execution.interrupted" }, { "$ref": "#/components/schemas/session.instructions.updated" }, { "$ref": "#/components/schemas/session.synthetic" }, { "$ref": "#/components/schemas/session.skill.activated" }, { "$ref": "#/components/schemas/session.shell.started" }, { "$ref": "#/components/schemas/session.shell.ended" }, { "$ref": "#/components/schemas/session.step.started" }, { "$ref": "#/components/schemas/session.step.streamed" }, { "$ref": "#/components/schemas/session.step.ended" }, { "$ref": "#/components/schemas/session.step.failed" }, { "$ref": "#/components/schemas/session.text.started" }, { "$ref": "#/components/schemas/session.text.ended" }, { "$ref": "#/components/schemas/session.reasoning.started" }, { "$ref": "#/components/schemas/session.reasoning.ended" }, { "$ref": "#/components/schemas/session.tool.input.started" }, { "$ref": "#/components/schemas/session.tool.input.ended" }, { "$ref": "#/components/schemas/session.tool.called" }, { "$ref": "#/components/schemas/session.tool.success" }, { "$ref": "#/components/schemas/session.tool.failed" }, { "$ref": "#/components/schemas/session.retry.scheduled" }, { "$ref": "#/components/schemas/session.compaction.started" }, { "$ref": "#/components/schemas/session.compaction.ended" }, { "$ref": "#/components/schemas/session.compaction.failed" }, { "$ref": "#/components/schemas/session.revert.staged" }, { "$ref": "#/components/schemas/session.revert.cleared" }, { "$ref": "#/components/schemas/session.revert.committed" }, { "$ref": "#/components/schemas/session.usage.recorded" }, { "$ref": "#/components/schemas/session.message.content.updated" } ] }, "Session.ForkBoundary": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["before"] }, "messageID": { "$ref": "#/components/schemas/Session.Message.ID" } }, "required": ["type", "messageID"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["through"] }, "messageID": { "$ref": "#/components/schemas/Session.Message.ID" } }, "required": ["type", "messageID"], "additionalProperties": false } ] }, "Session.ID": { "type": "string", "pattern": "^ses" }, "Session.Inbox.Compaction": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "type": { "type": "string", "enum": ["compaction"] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.CompactionPayload" }, "delivery": { "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, "required": ["id", "sessionID", "time", "type", "payload", "delivery"], "additionalProperties": false }, "Session.Inbox.CompactionPayload": { "not": { "type": "null" } }, "Session.Inbox.Delivery": { "type": "string", "enum": ["steer", "queue"] }, "Session.Inbox.Info": { "anyOf": [ { "$ref": "#/components/schemas/Session.Inbox.User" }, { "$ref": "#/components/schemas/Session.Inbox.Synthetic" }, { "$ref": "#/components/schemas/Session.Inbox.Compaction" }, { "$ref": "#/components/schemas/Session.Inbox.Move" } ] }, "Session.Inbox.Item": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["user"] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.UserPayload" }, "delivery": { "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, "required": ["type", "payload", "delivery"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["synthetic"] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.SyntheticPayload" }, "delivery": { "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, "required": ["type", "payload", "delivery"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["compaction"] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.CompactionPayload" }, "delivery": { "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, "required": ["type", "payload", "delivery"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["move"] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.MovePayload_1" }, "delivery": { "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, "required": ["type", "payload", "delivery"], "additionalProperties": false } ] }, "Session.Inbox.Move": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "type": { "type": "string", "enum": ["move"] }, "delivery": { "$ref": "#/components/schemas/Session.Inbox.Delivery" }, "payload": { "$ref": "#/components/schemas/Session.Inbox.MovePayload" } }, "required": ["id", "sessionID", "time", "type", "delivery", "payload"], "additionalProperties": false }, "Session.Inbox.MovePayload": { "type": "object", "properties": { "projectID": { "$ref": "#/components/schemas/Project.ID" }, "subpath": { "$ref": "#/components/schemas/RelativePath" }, "location": { "$ref": "#/components/schemas/Location.PublicRef" } }, "required": ["projectID", "location"], "additionalProperties": false }, "Session.Inbox.MovePayload_1": { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.Ref" }, "projectID": { "$ref": "#/components/schemas/Project.ID" }, "subpath": { "$ref": "#/components/schemas/RelativePath" } }, "required": ["location", "projectID"], "additionalProperties": false }, "Session.Inbox.Synthetic": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "type": { "type": "string", "enum": ["synthetic"] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.SyntheticPayload" }, "delivery": { "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, "required": ["id", "sessionID", "time", "type", "payload", "delivery"], "additionalProperties": false }, "Session.Inbox.SyntheticPayload": { "type": "object", "properties": { "text": { "type": "string" }, "description": { "type": "string" }, "metadata": { "type": "object" } }, "required": ["text"], "additionalProperties": false }, "Session.Inbox.User": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "type": { "type": "string", "enum": ["user"] }, "payload": { "$ref": "#/components/schemas/Session.Inbox.UserPayload" }, "delivery": { "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, "required": ["id", "sessionID", "time", "type", "payload", "delivery"], "additionalProperties": false }, "Session.Inbox.UserPayload": { "type": "object", "properties": { "text": { "type": "string" }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/Prompt.FileAttachment" } }, "agents": { "type": "array", "items": { "$ref": "#/components/schemas/Prompt.AgentAttachment" } }, "skills": { "type": "array", "items": { "$ref": "#/components/schemas/Prompt.SkillAttachment" } }, "metadata": { "type": "object" } }, "required": ["text"], "additionalProperties": false }, "Session.Info": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.ID" }, "parentID": { "$ref": "#/components/schemas/Session.ID" }, "fork": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "boundary": { "$ref": "#/components/schemas/Session.ForkBoundary" } }, "required": ["sessionID", "boundary"], "additionalProperties": false }, "projectID": { "$ref": "#/components/schemas/Project.ID" }, "agent": { "$ref": "#/components/schemas/Agent.ID" }, "model": { "$ref": "#/components/schemas/Model.Ref" }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tokens": { "$ref": "#/components/schemas/TokenUsage.Info" }, "outcome": { "type": "string", "enum": ["succeeded", "failed", "interrupted"] }, "time": { "type": "object", "properties": { "created": { "type": "number" }, "updated": { "type": "number" }, "busy": { "type": "number" }, "idle": { "type": "number" }, "viewed": { "type": "number" }, "archived": { "type": "number" } }, "required": ["created", "updated"], "additionalProperties": false }, "title": { "type": "string" }, "subpath": { "$ref": "#/components/schemas/RelativePath" }, "metadata": { "$ref": "#/components/schemas/Session.Metadata" }, "permissions": { "$ref": "#/components/schemas/Permission.Ruleset" }, "revert": { "$ref": "#/components/schemas/Session.Revert" }, "location": { "$ref": "#/components/schemas/Location.PublicRef" } }, "required": ["id", "projectID", "cost", "tokens", "time", "location"], "additionalProperties": false }, "Session.Message.AgentSelected": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "type": { "type": "string", "enum": ["agent-switched"] }, "agent": { "$ref": "#/components/schemas/Agent.ID" }, "previous": { "$ref": "#/components/schemas/Agent.ID" } }, "required": ["id", "time", "type", "agent"], "additionalProperties": false }, "Session.Message.Assistant": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" }, "streamed": { "type": "number" }, "completed": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "type": { "type": "string", "enum": ["assistant"] }, "agent": { "$ref": "#/components/schemas/Agent.ID" }, "model": { "$ref": "#/components/schemas/Model.Ref" }, "content": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/Session.Message.Assistant.Text" }, { "$ref": "#/components/schemas/Session.Message.Assistant.Reasoning" }, { "$ref": "#/components/schemas/Session.Message.Assistant.Tool" } ] } }, "snapshot": { "type": "object", "properties": { "start": { "$ref": "#/components/schemas/Snapshot.ID" }, "end": { "$ref": "#/components/schemas/Snapshot.ID" }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/RelativePath" } } }, "additionalProperties": false }, "finish": { "type": "string", "enum": ["stop", "length", "tool-calls", "content-filter", "error", "unknown"] }, "rawFinish": { "type": "string" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tokens": { "$ref": "#/components/schemas/TokenUsage.Info" }, "error": { "$ref": "#/components/schemas/Session.StructuredError" }, "retry": { "$ref": "#/components/schemas/Session.Message.Assistant.Retry" } }, "required": ["id", "time", "type", "agent", "model", "content"], "additionalProperties": false }, "Session.Message.Assistant.Reasoning": { "type": "object", "properties": { "type": { "type": "string", "enum": ["reasoning"] }, "text": { "type": "string" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" }, "time": { "type": "object", "properties": { "created": { "type": "number" }, "completed": { "type": "number" } }, "required": ["created"], "additionalProperties": false } }, "required": ["type", "text"], "additionalProperties": false }, "Session.Message.Assistant.Retry": { "type": "object", "properties": { "attempt": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "at": { "type": "number" }, "error": { "$ref": "#/components/schemas/Session.StructuredError" } }, "required": ["attempt", "at", "error"], "additionalProperties": false }, "Session.Message.Assistant.Text": { "type": "object", "properties": { "type": { "type": "string", "enum": ["text"] }, "text": { "type": "string" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" } }, "required": ["type", "text"], "additionalProperties": false }, "Session.Message.Assistant.Tool": { "type": "object", "properties": { "type": { "type": "string", "enum": ["tool"] }, "id": { "type": "string" }, "name": { "type": "string" }, "executed": { "type": "boolean" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" }, "state": { "anyOf": [ { "$ref": "#/components/schemas/Session.Message.ToolState.Streaming" }, { "$ref": "#/components/schemas/Session.Message.ToolState.Running" }, { "$ref": "#/components/schemas/Session.Message.ToolState.Completed" }, { "$ref": "#/components/schemas/Session.Message.ToolState.Error" } ] }, "time": { "type": "object", "properties": { "created": { "type": "number" }, "ran": { "type": "number" }, "completed": { "type": "number" } }, "required": ["created"], "additionalProperties": false } }, "required": ["type", "id", "name", "state", "time"], "additionalProperties": false }, "Session.Message.AssistantContent.Encoded": { "anyOf": [ { "$ref": "#/components/schemas/Session.Message.Assistant.Text" }, { "$ref": "#/components/schemas/Session.Message.Assistant.Reasoning" }, { "$ref": "#/components/schemas/Session.Message.Assistant.Tool" } ] }, "Session.Message.Compaction": { "anyOf": [ { "$ref": "#/components/schemas/Session.Message.Compaction.Running" }, { "$ref": "#/components/schemas/Session.Message.Compaction.Completed" }, { "$ref": "#/components/schemas/Session.Message.Compaction.Failed" } ] }, "Session.Message.Compaction.Completed": { "type": "object", "properties": { "type": { "type": "string", "enum": ["compaction"] }, "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "status": { "type": "string", "enum": ["completed"] }, "reason": { "type": "string", "enum": ["auto", "manual"] }, "model": { "$ref": "#/components/schemas/Model.Ref" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" }, "summary": { "type": "string" }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tokens": { "$ref": "#/components/schemas/TokenUsage.Info" } }, "required": ["type", "id", "time", "status", "reason", "summary"], "additionalProperties": false }, "Session.Message.Compaction.Failed": { "type": "object", "properties": { "type": { "type": "string", "enum": ["compaction"] }, "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "status": { "type": "string", "enum": ["failed"] }, "reason": { "type": "string", "enum": ["auto", "manual"] }, "error": { "$ref": "#/components/schemas/Session.StructuredError" }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tokens": { "$ref": "#/components/schemas/TokenUsage.Info" } }, "required": ["type", "id", "time", "status", "reason", "error"], "additionalProperties": false }, "Session.Message.Compaction.Running": { "type": "object", "properties": { "type": { "type": "string", "enum": ["compaction"] }, "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "status": { "type": "string", "enum": ["running"] }, "reason": { "type": "string", "enum": ["auto", "manual"] }, "summary": { "type": "string" } }, "required": ["type", "id", "time", "status", "reason", "summary"], "additionalProperties": false }, "Session.Message.ID": { "type": "string", "pattern": "^msg_" }, "Session.Message.Idle": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "type": { "type": "string", "enum": ["idle"] }, "outcome": { "type": "string", "enum": ["succeeded", "failed", "interrupted"] }, "error": { "$ref": "#/components/schemas/Session.StructuredError" } }, "required": ["id", "time", "type", "outcome"], "additionalProperties": false }, "Session.Message.Info": { "anyOf": [ { "$ref": "#/components/schemas/Session.Message.AgentSelected" }, { "$ref": "#/components/schemas/Session.Message.ModelSelected" }, { "$ref": "#/components/schemas/Session.Message.LocationSwitched" }, { "$ref": "#/components/schemas/Session.Message.User" }, { "$ref": "#/components/schemas/Session.Message.Synthetic" }, { "$ref": "#/components/schemas/Session.Message.System" }, { "$ref": "#/components/schemas/Session.Message.Skill" }, { "$ref": "#/components/schemas/Session.Message.Shell" }, { "$ref": "#/components/schemas/Session.Message.Assistant" }, { "$ref": "#/components/schemas/Session.Message.Compaction" }, { "$ref": "#/components/schemas/Session.Message.Idle" } ] }, "Session.Message.LocationSwitched": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "type": { "type": "string", "enum": ["location-switched"] }, "projectID": { "$ref": "#/components/schemas/Project.ID" }, "subpath": { "$ref": "#/components/schemas/RelativePath" }, "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "previous": { "anyOf": [ { "type": "object", "properties": { "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "projectID": { "$ref": "#/components/schemas/Project.ID" }, "subpath": { "$ref": "#/components/schemas/RelativePath" } }, "required": ["location"], "additionalProperties": false }, { "type": "null" } ] } }, "required": ["id", "time", "type", "location"], "additionalProperties": false }, "Session.Message.ModelSelected": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "type": { "type": "string", "enum": ["model-switched"] }, "model": { "$ref": "#/components/schemas/Model.Ref" }, "previous": { "$ref": "#/components/schemas/Model.Ref" } }, "required": ["id", "time", "type", "model"], "additionalProperties": false }, "Session.Message.Native": { "type": "object" }, "Session.Message.Shell": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" }, "completed": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "type": { "type": "string", "enum": ["shell"] }, "shellID": { "$ref": "#/components/schemas/Shell.ID" }, "command": { "type": "string" }, "status": { "type": "string", "enum": ["running", "exited", "timeout", "killed"] }, "exit": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] }, "output": { "type": "object", "properties": { "output": { "type": "string" }, "cursor": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "truncated": { "type": "boolean" } }, "required": ["output", "cursor", "size", "truncated"], "additionalProperties": false } }, "required": ["id", "time", "type", "shellID", "command", "status"], "additionalProperties": false }, "Session.Message.Skill": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "type": { "type": "string", "enum": ["skill"] }, "skill": { "$ref": "#/components/schemas/Skill.ID" }, "name": { "$ref": "#/components/schemas/Skill.Name" }, "text": { "type": "string" } }, "required": ["id", "time", "type", "skill", "name", "text"], "additionalProperties": false }, "Session.Message.Synthetic": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "text": { "type": "string" }, "description": { "type": "string" }, "type": { "type": "string", "enum": ["synthetic"] } }, "required": ["id", "time", "text", "type"], "additionalProperties": false }, "Session.Message.System": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "type": { "type": "string", "enum": ["system"] }, "text": { "type": "string" }, "description": { "type": "string" } }, "required": ["id", "time", "type", "text"], "additionalProperties": false }, "Session.Message.ToolState.Completed": { "type": "object", "properties": { "status": { "type": "string", "enum": ["completed"] }, "input": { "type": "object" }, "content": { "type": "array", "prefixItems": [ { "$ref": "#/components/schemas/Tool.Content" } ], "minItems": 1, "items": { "$ref": "#/components/schemas/Tool.Content" } }, "metadata": { "type": "object" } }, "required": ["status", "input", "content"], "additionalProperties": false }, "Session.Message.ToolState.Error": { "type": "object", "properties": { "status": { "type": "string", "enum": ["error"] }, "input": { "type": "object" }, "error": { "$ref": "#/components/schemas/Session.StructuredError" }, "content": { "type": "array", "prefixItems": [ { "$ref": "#/components/schemas/Tool.Content" } ], "minItems": 1, "items": { "$ref": "#/components/schemas/Tool.Content" } }, "metadata": { "type": "object" } }, "required": ["status", "input", "error"], "additionalProperties": false }, "Session.Message.ToolState.Running": { "type": "object", "properties": { "status": { "type": "string", "enum": ["running"] }, "input": { "type": "object" }, "metadata": { "type": "object" } }, "required": ["status", "input", "metadata"], "additionalProperties": false }, "Session.Message.ToolState.Streaming": { "type": "object", "properties": { "status": { "type": "string", "enum": ["streaming"] }, "input": { "type": "string" } }, "required": ["status", "input"], "additionalProperties": false }, "Session.Message.User": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Session.Message.ID" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "created": { "type": "number" } }, "required": ["created"], "additionalProperties": false }, "text": { "type": "string" }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/Prompt.FileAttachment" } }, "agents": { "type": "array", "items": { "$ref": "#/components/schemas/Prompt.AgentAttachment" } }, "skills": { "type": "array", "items": { "$ref": "#/components/schemas/Prompt.SkillAttachment" } }, "type": { "type": "string", "enum": ["user"] } }, "required": ["id", "time", "text", "type"], "additionalProperties": false }, "Session.Metadata": { "type": "object" }, "Session.Revert": { "type": "object", "properties": { "messageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "partID": { "type": "string" }, "snapshot": { "$ref": "#/components/schemas/Snapshot.ID" }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/FileDiff.Info" } } }, "required": ["messageID"], "additionalProperties": false }, "Session.StructuredError": { "type": "object", "properties": { "type": { "type": "string" }, "message": { "type": "string" }, "status": { "type": "integer", "minimum": 100, "maximum": 599 }, "response": { "type": "object", "properties": { "body": { "type": "string" } }, "required": ["body"], "additionalProperties": false }, "retryAfterMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["type", "message"], "additionalProperties": false }, "SessionActive": { "type": "object", "properties": { "type": { "type": "string", "enum": ["running"] } }, "required": ["type"], "additionalProperties": false }, "SessionBusyErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["SessionBusyError"] }, "sessionID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "sessionID", "message"], "additionalProperties": false }, "SessionGenerateResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "text": { "type": "string" } }, "required": ["text"], "additionalProperties": false } }, "required": ["data"], "additionalProperties": false }, "SessionInterruptResponse": { "type": "object", "properties": { "interrupted": { "type": "boolean", "description": "Whether an active execution owned by this OpenCode process was interrupted." } }, "required": ["interrupted"], "additionalProperties": false }, "SessionLogItem": { "anyOf": [ { "$ref": "#/components/schemas/Session.Event.Durable" }, { "$ref": "#/components/schemas/EventLog.Synced" } ] }, "SessionLogItemEncoded": { "type": "string", "contentMediaType": "application/json", "contentSchema": { "$ref": "#/components/schemas/SessionLogItem" } }, "SessionMessagesResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Session.Message.Info" } }, "cursor": { "type": "object", "properties": { "previous": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "next": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false } }, "required": ["data", "cursor"], "additionalProperties": false }, "SessionNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["SessionNotFoundError"] }, "sessionID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "sessionID", "message"], "additionalProperties": false }, "SessionStats.Activity": { "type": "object", "properties": { "date": { "type": "string" }, "steps": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["date", "steps"], "additionalProperties": false }, "SessionStats.Info": { "type": "object", "properties": { "range": { "type": "object", "properties": { "from": { "type": "number" }, "to": { "type": "number" } }, "required": ["from", "to"], "additionalProperties": false }, "sessions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "subagents": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "prompts": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "steps": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "tokens": { "$ref": "#/components/schemas/TokenUsage.Info" }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tools": { "$ref": "#/components/schemas/SessionStats.Tools" }, "activeDays": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "streak": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "activity": { "type": "array", "items": { "$ref": "#/components/schemas/SessionStats.Activity" } }, "models": { "type": "array", "items": { "$ref": "#/components/schemas/SessionStats.ModelUsage" } } }, "required": [ "range", "sessions", "subagents", "prompts", "steps", "tokens", "cost", "tools", "activeDays", "streak", "activity", "models" ], "additionalProperties": false }, "SessionStats.ModelUsage": { "type": "object", "properties": { "model": { "$ref": "#/components/schemas/Model.Ref" }, "steps": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "tokens": { "$ref": "#/components/schemas/TokenUsage.Info" }, "cost": { "$ref": "#/components/schemas/Money.USD" } }, "required": ["model", "steps", "tokens", "cost"], "additionalProperties": false }, "SessionStats.ToolTotals": { "type": "object", "properties": { "calls": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "succeeded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "failed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "unfinished": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["calls", "succeeded", "failed", "unfinished"], "additionalProperties": false }, "SessionStats.ToolUsage": { "type": "object", "properties": { "name": { "type": "string" }, "calls": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "succeeded": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "failed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "unfinished": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "durationP50": { "type": "number" } }, "required": ["name", "calls", "succeeded", "failed", "unfinished"], "additionalProperties": false }, "SessionStats.Tools": { "anyOf": [ { "type": "object", "properties": { "mode": { "type": "string", "enum": ["none"] } }, "required": ["mode"], "additionalProperties": false }, { "type": "object", "properties": { "mode": { "type": "string", "enum": ["summary"] }, "totals": { "$ref": "#/components/schemas/SessionStats.ToolTotals" } }, "required": ["mode", "totals"], "additionalProperties": false }, { "type": "object", "properties": { "mode": { "type": "string", "enum": ["detail"] }, "totals": { "$ref": "#/components/schemas/SessionStats.ToolTotals" }, "usage": { "type": "array", "items": { "$ref": "#/components/schemas/SessionStats.ToolUsage" } } }, "required": ["mode", "totals", "usage"], "additionalProperties": false } ] }, "SessionStatus": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["idle"] } }, "required": ["type"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["retry"] }, "attempt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "message": { "type": "string" }, "action": { "type": "object", "properties": { "reason": { "type": "string" }, "provider": { "type": "string" }, "title": { "type": "string" }, "message": { "type": "string" }, "label": { "type": "string" }, "link": { "type": "string" } }, "required": ["reason", "provider", "title", "message", "label"], "additionalProperties": false }, "next": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["type", "attempt", "message", "next"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["busy"] } }, "required": ["type"], "additionalProperties": false } ] }, "SessionStatusUpdated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.status"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "status": { "$ref": "#/components/schemas/SessionStatus" } }, "required": ["sessionID", "status"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "SessionTransfer.Data": { "type": "object", "properties": { "info": { "$ref": "#/components/schemas/Session.Info" }, "messages": { "type": "array", "items": { "$ref": "#/components/schemas/Session.Message.Info" } } }, "required": ["info", "messages"], "additionalProperties": false }, "SessionsCursor": { "type": "string", "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response." }, "SessionsResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Session.Info" } }, "cursor": { "type": "object", "properties": { "previous": { "anyOf": [ { "$ref": "#/components/schemas/SessionsCursor" }, { "type": "null" } ] }, "next": { "anyOf": [ { "$ref": "#/components/schemas/SessionsCursor" }, { "type": "null" } ] } }, "additionalProperties": false } }, "required": ["data", "cursor"], "additionalProperties": false }, "Shell.ID": { "type": "string", "pattern": "^sh_" }, "Shell.Info": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Shell.ID" }, "status": { "type": "string", "enum": ["running", "exited", "timeout", "killed"] }, "command": { "type": "string" }, "cwd": { "type": "string" }, "shell": { "type": "string" }, "file": { "type": "string" }, "pid": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "exit": { "type": "number" }, "signal": { "type": "string" }, "metadata": { "type": "object" }, "time": { "type": "object", "properties": { "started": { "type": "number", "description": "Start time in milliseconds since the Unix epoch" }, "completed": { "type": "number" } }, "required": ["started"], "additionalProperties": false } }, "required": ["id", "status", "command", "cwd", "shell", "file", "metadata", "time"], "additionalProperties": false }, "ShellNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["ShellNotFoundError"] }, "id": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "id", "message"], "additionalProperties": false }, "Skill.ID": { "type": "string" }, "Skill.Info": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Skill.ID" }, "name": { "$ref": "#/components/schemas/Skill.Name" }, "description": { "type": "string" }, "autoinvoke": { "type": "boolean" }, "path": { "$ref": "#/components/schemas/AbsolutePath" }, "content": { "type": "string" } }, "required": ["id", "name", "path", "content"], "additionalProperties": false }, "Skill.Name": { "type": "string" }, "SkillNotFoundErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["SkillNotFoundError"] }, "skill": { "$ref": "#/components/schemas/Skill.ID" }, "message": { "type": "string" } }, "required": ["_tag", "skill", "message"], "additionalProperties": false }, "Snapshot.ID": { "type": "string" }, "TokenUsage.Info": { "type": "object", "properties": { "input": { "type": "number" }, "output": { "type": "number" }, "reasoning": { "type": "number" }, "cache": { "type": "object", "properties": { "read": { "type": "number" }, "write": { "type": "number" } }, "required": ["read", "write"], "additionalProperties": false } }, "required": ["input", "output", "reasoning", "cache"], "additionalProperties": false }, "Tool.Content": { "anyOf": [ { "$ref": "#/components/schemas/Tool.TextContent" }, { "$ref": "#/components/schemas/Tool.FileContent" } ] }, "Tool.FileContent": { "type": "object", "properties": { "type": { "type": "string", "enum": ["file"] }, "uri": { "type": "string" }, "mime": { "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["type", "uri", "mime"], "additionalProperties": false }, "Tool.TextContent": { "type": "object", "properties": { "type": { "type": "string", "enum": ["text"] }, "text": { "type": "string" } }, "required": ["type", "text"], "additionalProperties": false }, "UnauthorizedErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["UnauthorizedError"] }, "message": { "type": "string" } }, "required": ["_tag", "message"], "additionalProperties": false }, "UnknownErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["UnknownError"] }, "message": { "type": "string" }, "ref": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["_tag", "message"], "additionalProperties": false }, "UnsupportedModelErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["UnsupportedModelError"] }, "providerID": { "type": "string" }, "modelID": { "type": "string" }, "capability": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "providerID", "modelID", "capability", "message"], "additionalProperties": false }, "UsageLimits.Budget": { "type": "object", "properties": { "id": { "type": "string" }, "limit": { "$ref": "#/components/schemas/Money.USD" }, "spent": { "$ref": "#/components/schemas/Money.USD" }, "scope": { "type": "string", "enum": ["each", "combined"] }, "per": { "type": "string", "enum": ["set", "model"] }, "coverage": { "type": "string", "enum": ["all", "models"] }, "models": { "type": "array", "items": { "$ref": "#/components/schemas/UsageLimits.BudgetModel" } }, "vendors": { "type": "array", "items": { "type": "string" } }, "inputPriceAtLeast": { "$ref": "#/components/schemas/Money.USDPerMillionTokens" }, "picked": { "type": "boolean" }, "shared": { "type": "boolean" }, "resetsAt": { "type": "number", "description": "Milliseconds since the Unix epoch" } }, "required": [ "id", "limit", "spent", "scope", "per", "coverage", "models", "vendors", "picked", "shared", "resetsAt" ], "additionalProperties": false }, "UsageLimits.BudgetModel": { "type": "object", "properties": { "providerID": { "$ref": "#/components/schemas/Provider.ID" }, "modelID": { "type": "string" }, "name": { "type": "string" }, "spent": { "$ref": "#/components/schemas/Money.USD" } }, "required": ["providerID", "modelID", "name"], "additionalProperties": false }, "UsageLimits.Go": { "type": "object", "properties": { "rolling": { "$ref": "#/components/schemas/UsageLimits.Meter" }, "weekly": { "$ref": "#/components/schemas/UsageLimits.Meter" }, "monthly": { "$ref": "#/components/schemas/UsageLimits.Meter" } }, "required": ["rolling", "weekly", "monthly"], "additionalProperties": false }, "UsageLimits.Info": { "type": "object", "properties": { "workspace": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "usageURL": { "type": "string" } }, "required": ["id", "usageURL"], "additionalProperties": false }, "go": { "$ref": "#/components/schemas/UsageLimits.Go" }, "budgets": { "type": "array", "items": { "$ref": "#/components/schemas/UsageLimits.Budget" } } }, "required": ["workspace", "budgets"], "additionalProperties": false }, "UsageLimits.Meter": { "type": "object", "properties": { "percent": { "type": "number", "minimum": 0, "maximum": 100 }, "limited": { "type": "boolean" }, "resetsAt": { "type": "number", "description": "Milliseconds since the Unix epoch" } }, "required": ["percent", "limited", "resetsAt"], "additionalProperties": false }, "V2Event": { "anyOf": [ { "$ref": "#/components/schemas/location.shutdown" }, { "$ref": "#/components/schemas/models-dev.refreshed" }, { "$ref": "#/components/schemas/credential.updated" }, { "$ref": "#/components/schemas/credential.switched" }, { "$ref": "#/components/schemas/integration.updated" }, { "$ref": "#/components/schemas/provider.updated" }, { "$ref": "#/components/schemas/model.updated" }, { "$ref": "#/components/schemas/agent.updated" }, { "$ref": "#/components/schemas/session.created" }, { "$ref": "#/components/schemas/session.agent.selected" }, { "$ref": "#/components/schemas/session.model.selected" }, { "$ref": "#/components/schemas/session.moved" }, { "$ref": "#/components/schemas/session.renamed" }, { "$ref": "#/components/schemas/session.metadata.updated" }, { "$ref": "#/components/schemas/session.permissions" }, { "$ref": "#/components/schemas/session.viewed" }, { "$ref": "#/components/schemas/session.archived" }, { "$ref": "#/components/schemas/session.unarchived" }, { "$ref": "#/components/schemas/session.usage.updated" }, { "$ref": "#/components/schemas/session.deleted" }, { "$ref": "#/components/schemas/session.forked" }, { "$ref": "#/components/schemas/session.inbox.delivered" }, { "$ref": "#/components/schemas/session.inbox.enqueued" }, { "$ref": "#/components/schemas/session.inbox.cancelled" }, { "$ref": "#/components/schemas/session.inbox.delivery.changed" }, { "$ref": "#/components/schemas/session.execution.started" }, { "$ref": "#/components/schemas/session.execution.succeeded" }, { "$ref": "#/components/schemas/session.execution.failed" }, { "$ref": "#/components/schemas/session.execution.interrupted" }, { "$ref": "#/components/schemas/session.instructions.updated" }, { "$ref": "#/components/schemas/session.synthetic" }, { "$ref": "#/components/schemas/session.skill.activated" }, { "$ref": "#/components/schemas/session.shell.started" }, { "$ref": "#/components/schemas/session.shell.ended" }, { "$ref": "#/components/schemas/session.step.started" }, { "$ref": "#/components/schemas/session.step.streamed" }, { "$ref": "#/components/schemas/session.step.ended" }, { "$ref": "#/components/schemas/session.step.failed" }, { "$ref": "#/components/schemas/session.text.started" }, { "$ref": "#/components/schemas/session.text.delta" }, { "$ref": "#/components/schemas/session.text.ended" }, { "$ref": "#/components/schemas/session.reasoning.started" }, { "$ref": "#/components/schemas/session.reasoning.delta" }, { "$ref": "#/components/schemas/session.reasoning.ended" }, { "$ref": "#/components/schemas/session.tool.input.started" }, { "$ref": "#/components/schemas/session.tool.input.delta" }, { "$ref": "#/components/schemas/session.tool.input.ended" }, { "$ref": "#/components/schemas/session.tool.called" }, { "$ref": "#/components/schemas/session.tool.progress" }, { "$ref": "#/components/schemas/session.tool.success" }, { "$ref": "#/components/schemas/session.tool.failed" }, { "$ref": "#/components/schemas/session.retry.scheduled" }, { "$ref": "#/components/schemas/session.compaction.started" }, { "$ref": "#/components/schemas/session.compaction.delta" }, { "$ref": "#/components/schemas/session.compaction.ended" }, { "$ref": "#/components/schemas/session.compaction.failed" }, { "$ref": "#/components/schemas/session.revert.staged" }, { "$ref": "#/components/schemas/session.revert.cleared" }, { "$ref": "#/components/schemas/session.revert.committed" }, { "$ref": "#/components/schemas/filesystem.changed" }, { "$ref": "#/components/schemas/reference.updated" }, { "$ref": "#/components/schemas/permission.asked" }, { "$ref": "#/components/schemas/permission.replied" }, { "$ref": "#/components/schemas/plugin.updated" }, { "$ref": "#/components/schemas/project.updated" }, { "$ref": "#/components/schemas/worktree.updated" }, { "$ref": "#/components/schemas/worktree.resolved" }, { "$ref": "#/components/schemas/command.updated" }, { "$ref": "#/components/schemas/config.updated" }, { "$ref": "#/components/schemas/skill.updated" }, { "$ref": "#/components/schemas/pty.created" }, { "$ref": "#/components/schemas/pty.updated" }, { "$ref": "#/components/schemas/pty.exited" }, { "$ref": "#/components/schemas/pty.deleted" }, { "$ref": "#/components/schemas/persistent-pty.added" }, { "$ref": "#/components/schemas/persistent-pty.removed" }, { "$ref": "#/components/schemas/persistent-pty.updated" }, { "$ref": "#/components/schemas/shell.created" }, { "$ref": "#/components/schemas/shell.exited" }, { "$ref": "#/components/schemas/shell.deleted" }, { "$ref": "#/components/schemas/form.created" }, { "$ref": "#/components/schemas/form.replied" }, { "$ref": "#/components/schemas/form.cancelled" }, { "$ref": "#/components/schemas/websearch.updated" }, { "$ref": "#/components/schemas/artifact.updated" }, { "$ref": "#/components/schemas/SessionStatusUpdated" }, { "$ref": "#/components/schemas/session.idle" }, { "$ref": "#/components/schemas/tui.prompt.append" }, { "$ref": "#/components/schemas/tui.command.execute" }, { "$ref": "#/components/schemas/tui.toast.show" }, { "$ref": "#/components/schemas/tui.session.select" }, { "$ref": "#/components/schemas/installation.updated" }, { "$ref": "#/components/schemas/installation.update-available" }, { "$ref": "#/components/schemas/vcs.branch.updated" }, { "$ref": "#/components/schemas/mcp.status.changed" }, { "$ref": "#/components/schemas/mcp.resources.changed" }, { "$ref": "#/components/schemas/V2Event.rpc" }, { "$ref": "#/components/schemas/V2Event.server.connected" } ] }, "V2Event.rpc": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ] }, "type": { "type": "string", "pattern": "^rpc\\.[\\s\\S]*?$" }, "location": { "$ref": "#/components/schemas/Location.PublicRef" }, "data": { "type": "object" } }, "required": ["id", "created", "type", "location", "data"], "additionalProperties": false }, "V2Event.server.connected": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "metadata": { "anyOf": [ { "type": "object" }, { "type": "null" } ] }, "location": { "anyOf": [ { "$ref": "#/components/schemas/Location.PublicRef" }, { "type": "null" } ] }, "type": { "type": "string", "enum": ["server.connected"] }, "data": { "not": { "type": "null" } } }, "required": ["id", "type", "data"], "additionalProperties": false }, "V2EventEncoded": { "type": "string", "contentMediaType": "application/json", "contentSchema": { "$ref": "#/components/schemas/V2Event" } }, "Vcs.Base": { "type": "object", "properties": { "name": { "type": "string" }, "ref": { "type": "string" }, "source": { "type": "string", "enum": ["reflog", "default"] } }, "required": ["name", "ref", "source"], "additionalProperties": false }, "Vcs.Branch": { "type": "object", "properties": { "current": { "type": "string" }, "default": { "type": "string" } }, "additionalProperties": false }, "Vcs.BranchList": { "type": "array", "items": { "type": "string" } }, "Vcs.FileStatus": { "type": "object", "properties": { "file": { "type": "string" }, "additions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "deletions": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": ["added", "deleted", "modified"] } }, "required": ["file", "additions", "deletions", "status"], "additionalProperties": false }, "Vcs.Info": { "type": "object", "properties": { "provider": { "type": "string" }, "branch": { "$ref": "#/components/schemas/Vcs.Branch" } }, "required": ["branch"], "additionalProperties": false }, "Vcs.Mode": { "type": "string", "enum": ["working", "branch", "committed"] }, "Vcs.Untracked": { "type": "string", "enum": ["files", "folders"] }, "VcsInitNotSupportedErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["VcsInitNotSupportedError"] }, "providerID": { "type": "string" }, "message": { "type": "string" } }, "required": ["_tag", "providerID", "message"], "additionalProperties": false }, "VoiceModel": { "type": "object", "properties": { "model": { "type": "string" }, "provider": { "type": "string" }, "transports": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceTransportType" } }, "available": { "type": "boolean" } }, "required": ["model", "provider", "transports", "available"], "additionalProperties": false }, "VoiceModelsResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "models": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceModel" } }, "default": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": ["models"], "additionalProperties": false } }, "required": ["data"], "additionalProperties": false }, "VoiceSessionResponse": { "type": "object", "properties": { "data": { "type": "object", "properties": { "transport": { "$ref": "#/components/schemas/VoiceTransport" } }, "required": ["transport"], "additionalProperties": false } }, "required": ["data"], "additionalProperties": false }, "VoiceTransport": { "anyOf": [ { "$ref": "#/components/schemas/VoiceWebRTCTransport" }, { "$ref": "#/components/schemas/VoiceWebSocketTransport" } ] }, "VoiceTransportInput": { "anyOf": [ { "$ref": "#/components/schemas/VoiceWebRTCTransportInput" }, { "$ref": "#/components/schemas/VoiceWebSocketTransportInput" } ] }, "VoiceTransportType": { "type": "string", "enum": ["webrtc", "websocket"] }, "VoiceWebRTCTransport": { "type": "object", "properties": { "type": { "type": "string", "enum": ["webrtc"] }, "sdp": { "type": "string" } }, "required": ["type", "sdp"], "additionalProperties": false }, "VoiceWebRTCTransportInput": { "type": "object", "properties": { "type": { "type": "string", "enum": ["webrtc"] }, "sdp": { "type": "string" }, "dcid": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] }, { "type": "null" } ] } }, "required": ["type", "sdp"], "additionalProperties": false }, "VoiceWebSocketTransport": { "type": "object", "properties": { "type": { "type": "string", "enum": ["websocket"] }, "url": { "type": "string" }, "token": { "type": "string" }, "expiresAt": { "anyOf": [ { "type": "number" }, { "type": "string", "enum": ["Infinity", "-Infinity", "NaN"] } ] } }, "required": ["type", "url", "token", "expiresAt"], "additionalProperties": false }, "VoiceWebSocketTransportInput": { "type": "object", "properties": { "type": { "type": "string", "enum": ["websocket"] } }, "required": ["type"], "additionalProperties": false }, "WebSearch.ID": { "type": "string" }, "WebSearch.Provider": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/WebSearch.ID" }, "name": { "type": "string" } }, "required": ["id", "name"], "additionalProperties": false }, "WebSearch.ResponseEncoded": { "type": "object", "properties": { "providerID": { "$ref": "#/components/schemas/WebSearch.ID" }, "results": { "type": "array", "items": { "$ref": "#/components/schemas/WebSearch.Result" } } }, "required": ["providerID", "results"], "additionalProperties": false }, "WebSearch.Result": { "type": "object", "properties": { "url": { "type": "string" }, "title": { "type": "string" }, "content": { "type": "string" }, "time": { "type": "object", "properties": { "published": { "type": "number" } }, "additionalProperties": false } }, "required": ["url", "time"], "additionalProperties": false }, "Workspace.ID": { "type": "string", "pattern": "^wrk" }, "Worktree.CreateInput": { "type": "object", "properties": { "projectID": { "$ref": "#/components/schemas/Project.ID" }, "from": { "$ref": "#/components/schemas/AbsolutePath" }, "branch": { "type": "string" }, "directory": { "$ref": "#/components/schemas/AbsolutePath" }, "name": { "type": "string" } }, "required": ["projectID"], "additionalProperties": false }, "Worktree.Directory": { "type": "object", "properties": { "directory": { "$ref": "#/components/schemas/AbsolutePath" }, "strategy": { "type": "string" } }, "required": ["directory"], "additionalProperties": false }, "Worktree.Info": { "type": "object", "properties": { "directory": { "$ref": "#/components/schemas/AbsolutePath" } }, "required": ["directory"], "additionalProperties": false }, "Worktree.List": { "type": "array", "items": { "$ref": "#/components/schemas/Worktree.Directory" } }, "Worktree.RemoveInput": { "type": "object", "properties": { "projectID": { "$ref": "#/components/schemas/Project.ID" }, "directory": { "$ref": "#/components/schemas/AbsolutePath" }, "force": { "type": "boolean" } }, "required": ["projectID", "directory", "force"], "additionalProperties": false }, "WorktreeErrorEncoded": { "type": "object", "properties": { "_tag": { "type": "string", "enum": ["WorktreeError"] }, "name": { "type": "string", "enum": ["WorktreeError"] }, "data": { "type": "object", "properties": { "message": { "type": "string" }, "forceRequired": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": ["message"], "additionalProperties": false } }, "required": ["_tag", "name", "data"], "additionalProperties": false }, "agent.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["agent.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "artifact.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["artifact.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "command.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["command.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "config.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["config.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "credential.switched": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["credential.switched"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "integrationID": { "$ref": "#/components/schemas/Integration.ID" }, "credentialID": { "anyOf": [ { "$ref": "#/components/schemas/Credential.ID" }, { "type": "null" } ] } }, "required": ["integrationID", "credentialID"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "credential.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["credential.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "filesystem.changed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["filesystem.changed"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "file": { "type": "string" }, "event": { "type": "string", "enum": ["add", "change", "unlink"] } }, "required": ["file", "event"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "form.cancelled": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["form.cancelled"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Form.ID" }, "sessionID": { "type": "string" } }, "required": ["id", "sessionID"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "form.created": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["form.created"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "form": { "$ref": "#/components/schemas/Form.Info_1" } }, "required": ["form"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "form.replied": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["form.replied"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Form.ID" }, "sessionID": { "type": "string" }, "answer": { "$ref": "#/components/schemas/Form.Answer_1" } }, "required": ["id", "sessionID", "answer"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "installation.update-available": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["installation.update-available"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "version": { "type": "string" } }, "required": ["version"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "installation.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["installation.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "version": { "type": "string" } }, "required": ["version"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "integration.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["integration.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "location.shutdown": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["location.shutdown"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "mcp.resources.changed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["mcp.resources.changed"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "server": { "type": "string" } }, "required": ["server"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "mcp.status.changed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["mcp.status.changed"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "server": { "type": "string" } }, "required": ["server"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "model.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["model.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "models-dev.refreshed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["models-dev.refreshed"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "permission.asked": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["permission.asked"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Permission.ID" }, "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "action": { "type": "string" }, "resources": { "type": "array", "items": { "type": "string" } }, "save": { "type": "array", "items": { "type": "string" } }, "metadata": { "type": "object" }, "source": { "$ref": "#/components/schemas/Permission.Source" }, "message": { "type": "string" } }, "required": ["id", "sessionID", "action", "resources"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "permission.replied": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["permission.replied"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "requestID": { "$ref": "#/components/schemas/Permission.ID" }, "reply": { "$ref": "#/components/schemas/Permission.Reply" } }, "required": ["sessionID", "requestID", "reply"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "persistent-pty.added": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["persistent-pty.added"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "terminal": { "$ref": "#/components/schemas/PersistentPty.Info" } }, "required": ["sessionID", "terminal"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "persistent-pty.removed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["persistent-pty.removed"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "ptyID": { "$ref": "#/components/schemas/Pty.ID" } }, "required": ["sessionID", "ptyID"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "persistent-pty.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["persistent-pty.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "terminal": { "$ref": "#/components/schemas/PersistentPty.Info" } }, "required": ["sessionID", "terminal"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "plugin.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["plugin.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "project.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["project.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Project.ID" }, "canonical": { "$ref": "#/components/schemas/AbsolutePath" }, "vcs": { "$ref": "#/components/schemas/Project.Vcs" }, "name": { "type": "string" }, "icon": { "$ref": "#/components/schemas/Project.Icon" }, "commands": { "$ref": "#/components/schemas/Project.Commands" }, "time": { "$ref": "#/components/schemas/Project.Time" }, "sandboxes": { "type": "array", "items": { "type": "string" } } }, "required": ["id", "canonical", "time", "sandboxes"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "provider.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["provider.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "pty.created": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["pty.created"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "info": { "$ref": "#/components/schemas/Pty" } }, "required": ["info"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "pty.deleted": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["pty.deleted"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Pty.ID" } }, "required": ["id"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "pty.exited": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["pty.exited"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Pty.ID" }, "exitCode": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["id", "exitCode"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "pty.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["pty.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "info": { "$ref": "#/components/schemas/Pty" } }, "required": ["info"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "reference.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["reference.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "session.agent.selected": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.agent.selected"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "agent": { "$ref": "#/components/schemas/Agent.ID" }, "previous": { "$ref": "#/components/schemas/Agent.ID" } }, "required": ["sessionID", "agent"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.archived": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.archived"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" } }, "required": ["sessionID"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.compaction.delta": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.compaction.delta"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "text": { "type": "string" } }, "required": ["sessionID", "text"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "session.compaction.ended": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.compaction.ended"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "reason": { "type": "string", "enum": ["auto", "manual"] }, "model": { "$ref": "#/components/schemas/Model.Ref" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" }, "text": { "type": "string" }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tokens": { "$ref": "#/components/schemas/TokenUsage.Info" } }, "required": ["sessionID", "reason", "text"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.compaction.failed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.compaction.failed"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "reason": { "type": "string", "enum": ["auto", "manual"] }, "error": { "$ref": "#/components/schemas/Session.StructuredError" }, "inputID": { "$ref": "#/components/schemas/Session.Message.ID" }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tokens": { "$ref": "#/components/schemas/TokenUsage.Info" } }, "required": ["sessionID", "reason", "error"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.compaction.started": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.compaction.started"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "reason": { "type": "string", "enum": ["auto", "manual"] }, "inputID": { "$ref": "#/components/schemas/Session.Message.ID" } }, "required": ["sessionID", "reason"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.created": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.created"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "projectID": { "$ref": "#/components/schemas/Project.ID" }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "subpath": { "$ref": "#/components/schemas/RelativePath" }, "parentID": { "$ref": "#/components/schemas/Session.ID" }, "slug": { "type": "string" }, "title": { "type": "string" }, "agent": { "$ref": "#/components/schemas/Agent.ID" }, "model": { "$ref": "#/components/schemas/Model.Ref" }, "metadata": { "$ref": "#/components/schemas/Session.Metadata" }, "permissions": { "$ref": "#/components/schemas/Permission.Ruleset" }, "version": { "type": "string" } }, "required": ["sessionID", "projectID", "location", "slug", "version"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.deleted": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.deleted"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c3ea984aceae" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" } }, "required": ["sessionID"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.execution.failed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.execution.failed"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "error": { "$ref": "#/components/schemas/Session.StructuredError" } }, "required": ["sessionID", "error"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.execution.interrupted": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.execution.interrupted"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "reason": { "type": "string", "enum": ["user", "shutdown", "superseded", "inactivity"] } }, "required": ["sessionID", "reason"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.execution.started": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.execution.started"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" } }, "required": ["sessionID"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.execution.succeeded": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.execution.succeeded"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" } }, "required": ["sessionID"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.forked": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.forked"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c3ea984aceae" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "parentID": { "$ref": "#/components/schemas/Session.ID" }, "boundary": { "$ref": "#/components/schemas/Session.ForkBoundary" }, "instructions": { "type": "object", "patternProperties": { "^[a-z0-9][a-z0-9._-]*\\/[a-z0-9][a-z0-9._/-]*$": { "$ref": "#/components/schemas/Instruction.Hash" } }, "additionalProperties": false }, "instructionEntries": { "$ref": "#/components/schemas/InstructionEntry.Snapshot" } }, "required": ["sessionID", "parentID", "boundary"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.idle": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.idle"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" } }, "required": ["sessionID"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "session.inbox.cancelled": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.inbox.cancelled"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "inboxID": { "$ref": "#/components/schemas/Session.Message.ID" } }, "required": ["sessionID", "inboxID"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.inbox.delivered": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.inbox.delivered"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "inboxID": { "$ref": "#/components/schemas/Session.Message.ID" } }, "required": ["sessionID", "inboxID"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.inbox.delivery.changed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.inbox.delivery.changed"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "inboxID": { "$ref": "#/components/schemas/Session.Message.ID" }, "delivery": { "$ref": "#/components/schemas/Session.Inbox.Delivery" } }, "required": ["sessionID", "inboxID", "delivery"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.inbox.enqueued": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.inbox.enqueued"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "inboxID": { "$ref": "#/components/schemas/Session.Message.ID" }, "item": { "$ref": "#/components/schemas/Session.Inbox.Item" } }, "required": ["sessionID", "inboxID", "item"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.instructions.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.instructions.updated"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c3ea984aceae" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "delta": { "type": "object", "additionalProperties": { "anyOf": [ { "$ref": "#/components/schemas/Instruction.Hash" }, { "type": "string", "enum": ["removed"] } ] } }, "text": { "type": "string" } }, "required": ["sessionID", "delta"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.message.content.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.message.content.updated"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "messageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "content": { "type": "array", "items": { "$ref": "#/components/schemas/Session.Message.AssistantContent.Encoded" } } }, "required": ["sessionID", "messageID", "content"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.metadata.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.metadata.updated"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "metadata": { "$ref": "#/components/schemas/Session.Metadata" } }, "required": ["sessionID", "metadata"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.model.selected": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.model.selected"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "model": { "$ref": "#/components/schemas/Model.Ref" }, "previous": { "$ref": "#/components/schemas/Model.Ref" } }, "required": ["sessionID", "model"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.moved": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.moved"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "projectID": { "$ref": "#/components/schemas/Project.ID" }, "subpath": { "$ref": "#/components/schemas/RelativePath" } }, "required": ["sessionID", "location", "projectID"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.permissions": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.permissions"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "permissions": { "$ref": "#/components/schemas/Permission.Ruleset" } }, "required": ["sessionID", "permissions"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.reasoning.delta": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.reasoning.delta"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "ordinal": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "delta": { "type": "string" } }, "required": ["sessionID", "assistantMessageID", "ordinal", "delta"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "session.reasoning.ended": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.reasoning.ended"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "ordinal": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "text": { "type": "string" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" } }, "required": ["sessionID", "assistantMessageID", "ordinal", "text"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.reasoning.started": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.reasoning.started"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "ordinal": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "native": { "$ref": "#/components/schemas/Session.Message.Native" } }, "required": ["sessionID", "assistantMessageID", "ordinal"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.renamed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.renamed"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "title": { "type": "string" } }, "required": ["sessionID", "title"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.retry.scheduled": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.retry.scheduled"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "attempt": { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, "at": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "error": { "$ref": "#/components/schemas/Session.StructuredError" } }, "required": ["sessionID", "assistantMessageID", "attempt", "at", "error"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.revert.cleared": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.revert.cleared"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" } }, "required": ["sessionID"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.revert.committed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.revert.committed"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "to": { "$ref": "#/components/schemas/Session.Message.ID" } }, "required": ["sessionID", "to"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.revert.staged": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.revert.staged"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "revert": { "$ref": "#/components/schemas/Session.Revert" } }, "required": ["sessionID", "revert"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.shell.ended": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.shell.ended"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "shell": { "$ref": "#/components/schemas/Shell.Info" }, "output": { "type": "object", "properties": { "output": { "type": "string" }, "cursor": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "truncated": { "type": "boolean" } }, "required": ["output", "cursor", "size", "truncated"], "additionalProperties": false } }, "required": ["sessionID", "shell", "output"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.shell.started": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.shell.started"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "shell": { "$ref": "#/components/schemas/Shell.Info" } }, "required": ["sessionID", "shell"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.skill.activated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.skill.activated"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "id": { "$ref": "#/components/schemas/Skill.ID" }, "name": { "$ref": "#/components/schemas/Skill.Name" }, "text": { "type": "string" } }, "required": ["sessionID", "id", "name", "text"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.step.ended": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.step.ended"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "finish": { "type": "string", "enum": ["stop", "length", "tool-calls", "content-filter", "error", "unknown"] }, "rawFinish": { "type": "string" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tokens": { "$ref": "#/components/schemas/TokenUsage.Info" }, "snapshot": { "$ref": "#/components/schemas/Snapshot.ID" }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/RelativePath" } } }, "required": ["sessionID", "assistantMessageID", "finish", "cost", "tokens"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.step.failed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.step.failed"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "error": { "$ref": "#/components/schemas/Session.StructuredError" }, "finish": { "anyOf": [ { "type": "string", "enum": ["content-filter"] } ] }, "rawFinish": { "type": "string" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tokens": { "$ref": "#/components/schemas/TokenUsage.Info" }, "snapshot": { "$ref": "#/components/schemas/Snapshot.ID" }, "files": { "type": "array", "items": { "$ref": "#/components/schemas/RelativePath" } } }, "required": ["sessionID", "assistantMessageID", "error"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.step.started": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.step.started"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "agent": { "$ref": "#/components/schemas/Agent.ID" }, "model": { "$ref": "#/components/schemas/Model.Ref" }, "snapshot": { "$ref": "#/components/schemas/Snapshot.ID" }, "started": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["sessionID", "assistantMessageID", "agent", "model", "started"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.step.streamed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.step.streamed"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" } }, "required": ["sessionID", "assistantMessageID"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.synthetic": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.synthetic"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "text": { "type": "string" }, "description": { "type": "string" }, "metadata": { "type": "object" } }, "required": ["sessionID", "text"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.text.delta": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.text.delta"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "ordinal": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "delta": { "type": "string" } }, "required": ["sessionID", "assistantMessageID", "ordinal", "delta"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "session.text.ended": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.text.ended"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "ordinal": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "text": { "type": "string" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" } }, "required": ["sessionID", "assistantMessageID", "ordinal", "text"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.text.started": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.text.started"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "ordinal": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["sessionID", "assistantMessageID", "ordinal"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.tool.called": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.tool.called"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "id": { "type": "string" }, "input": { "type": "object" }, "executed": { "type": "boolean" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" } }, "required": ["sessionID", "assistantMessageID", "id", "input", "executed"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.tool.failed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.tool.failed"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c3ea984aceae" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "id": { "type": "string" }, "error": { "$ref": "#/components/schemas/Session.StructuredError" }, "content": { "type": "array", "prefixItems": [ { "$ref": "#/components/schemas/Tool.Content" } ], "minItems": 1, "items": { "$ref": "#/components/schemas/Tool.Content" } }, "metadata": { "type": "object" }, "executed": { "type": "boolean" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" } }, "required": ["sessionID", "assistantMessageID", "id", "error", "executed"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.tool.input.delta": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.tool.input.delta"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "id": { "type": "string" }, "delta": { "type": "string" } }, "required": ["sessionID", "assistantMessageID", "id", "delta"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "session.tool.input.ended": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.tool.input.ended"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "id": { "type": "string" }, "text": { "type": "string" } }, "required": ["sessionID", "assistantMessageID", "id", "text"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.tool.input.started": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.tool.input.started"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "id": { "type": "string" }, "name": { "type": "string" } }, "required": ["sessionID", "assistantMessageID", "id", "name"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.tool.progress": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.tool.progress"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "id": { "type": "string" }, "metadata": { "type": "object" } }, "required": ["sessionID", "assistantMessageID", "id", "metadata"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "session.tool.success": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.tool.success"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c3ea984aceae" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "assistantMessageID": { "$ref": "#/components/schemas/Session.Message.ID" }, "id": { "type": "string" }, "content": { "type": "array", "prefixItems": [ { "$ref": "#/components/schemas/Tool.Content" } ], "minItems": 1, "items": { "$ref": "#/components/schemas/Tool.Content" } }, "metadata": { "type": "object" }, "executed": { "type": "boolean" }, "native": { "$ref": "#/components/schemas/Session.Message.Native" } }, "required": ["sessionID", "assistantMessageID", "id", "content", "executed"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.unarchived": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.unarchived"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" } }, "required": ["sessionID"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.usage.recorded": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.usage.recorded"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "source": { "type": "string", "enum": ["title", "compaction"] }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tokens": { "$ref": "#/components/schemas/TokenUsage.Info" } }, "required": ["sessionID", "source", "cost", "tokens"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "session.usage.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.usage.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "cost": { "$ref": "#/components/schemas/Money.USD" }, "tokens": { "$ref": "#/components/schemas/TokenUsage.Info" } }, "required": ["sessionID", "cost", "tokens"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "session.viewed": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["session.viewed"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "$ref": "#/components/schemas/Session.ID" }, "idle": { "type": "number" } }, "required": ["sessionID", "idle"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "shell.created": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["shell.created"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "info": { "$ref": "#/components/schemas/Shell.Info" } }, "required": ["info"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "shell.deleted": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["shell.deleted"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Shell.ID" } }, "required": ["id"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "shell.exited": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["shell.exited"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Shell.ID" }, "exit": { "type": "number" }, "status": { "type": "string", "enum": ["running", "exited", "timeout", "killed"] } }, "required": ["id", "status"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "skill.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["skill.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "tui.command.execute": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["tui.command.execute"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "command": { "anyOf": [ { "type": "string", "enum": [ "session.list", "session.new", "session.interrupt", "session.background", "session.compact", "session.page.up", "session.page.down", "session.line.up", "session.line.down", "session.half.page.up", "session.half.page.down", "session.first", "session.last", "prompt.clear", "prompt.submit", "agent.cycle" ] }, { "type": "string" } ] } }, "required": ["command"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "tui.prompt.append": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["tui.prompt.append"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "text": { "type": "string" } }, "required": ["text"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "tui.session.select": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["tui.session.select"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "sessionID": { "allOf": [ { "$ref": "#/components/schemas/Session.ID" }, { "description": "Session ID to navigate to" } ] } }, "required": ["sessionID"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "tui.toast.show": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["tui.toast.show"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "title": { "type": "string" }, "message": { "type": "string" }, "variant": { "type": "string", "enum": ["info", "success", "warning", "error"] }, "duration": { "anyOf": [ { "type": "integer", "maximum": 9007199254740991, "exclusiveMinimum": 0 }, { "type": "null" } ] } }, "required": ["message", "variant"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "vcs.branch.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["vcs.branch.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "branch": { "type": "string" } }, "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "websearch.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["websearch.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "not": { "type": "null" } } }, "required": ["id", "created", "type", "data"], "additionalProperties": false }, "worktree.resolved": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["worktree.resolved"] }, "durable": { "type": "object", "properties": { "aggregateID": { "type": "string" }, "seq": { "$ref": "#/components/schemas/Event.Seq" }, "version": { "$ref": "#/components/schemas/Event.VersionEncoded_c77c5abcb68d" } }, "required": ["aggregateID", "seq", "version"], "additionalProperties": false }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "projectID": { "$ref": "#/components/schemas/Project.ID" }, "directory": { "$ref": "#/components/schemas/AbsolutePath" }, "previous": { "$ref": "#/components/schemas/Project.ID" }, "adopted": { "type": "array", "items": { "$ref": "#/components/schemas/Project.ID" } } }, "required": ["projectID", "directory", "previous"], "additionalProperties": false } }, "required": ["id", "created", "type", "durable", "data"], "additionalProperties": false }, "worktree.updated": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/Event.ID" }, "created": { "type": "number" }, "metadata": { "type": "object" }, "type": { "type": "string", "enum": ["worktree.updated"] }, "location": { "$ref": "#/components/schemas/Location.Ref" }, "data": { "type": "object", "properties": { "projectID": { "$ref": "#/components/schemas/Project.ID" } }, "required": ["projectID"], "additionalProperties": false } }, "required": ["id", "created", "type", "data"], "additionalProperties": false } }, "securitySchemes": {} }, "security": [], "tags": [ { "name": "server" }, { "name": "location" }, { "name": "agent" }, { "name": "plugin", "description": "Experimental plugin routes." }, { "name": "session", "description": "Experimental session routes." }, { "name": "session", "description": "Experimental message routes." }, { "name": "model", "description": "Experimental model routes." }, { "name": "generate", "description": "Experimental one-shot generation routes." }, { "name": "voice", "description": "Experimental server-brokered voice session routes." }, { "name": "provider", "description": "Experimental provider routes." }, { "name": "integration", "description": "Integration discovery and authentication routes." }, { "name": "mcp", "description": "MCP server and resource routes." }, { "name": "credential" }, { "name": "project", "description": "Project routes." }, { "name": "form", "description": "Location form routes." }, { "name": "permission", "description": "Experimental permission routes." }, { "name": "filesystem", "description": "Experimental location-scoped filesystem routes." }, { "name": "command", "description": "Experimental command routes." }, { "name": "skill", "description": "Experimental skill routes." }, { "name": "rpc", "description": "Plugin RPC routes." }, { "name": "event", "description": "Experimental event stream routes." }, { "name": "pty", "description": "Experimental location-scoped PTY routes." }, { "name": "persistentPty", "description": "Prototype persistent PTY routes." }, { "name": "shell", "description": "Location-scoped shell command routes." }, { "name": "reference", "description": "Location-scoped project references." }, { "name": "worktree", "description": "Project-based worktree management routes." }, { "name": "vcs", "description": "Location-scoped version control routes." }, { "name": "debug" }, { "name": "migration" }, { "name": "websearch", "description": "Location-scoped web search routes." }, { "name": "usage", "description": "Experimental usage limit routes." }, { "name": "config", "description": "Location-scoped configuration routes." } ] }