summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/sdk/openapi.json16446
1 files changed, 8986 insertions, 7460 deletions
diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json
index b1c4ec1d7..df00c1726 100644
--- a/packages/sdk/openapi.json
+++ b/packages/sdk/openapi.json
@@ -1,16 +1,201 @@
{
- "openapi": "3.1.1",
+ "openapi": "3.1.0",
"info": {
"title": "opencode",
- "description": "opencode api",
- "version": "1.0.0"
+ "version": "1.0.0",
+ "description": "opencode api"
},
"paths": {
+ "/auth/{providerID}": {
+ "put": {
+ "tags": ["control"],
+ "operationId": "auth.set",
+ "parameters": [
+ {
+ "name": "providerID",
+ "in": "path",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successfully set authentication credentials",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "boolean",
+ "description": "Successfully set authentication credentials"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
+ }
+ },
+ "description": "Set authentication credentials",
+ "summary": "Set auth credentials",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Auth"
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
+ }
+ ]
+ },
+ "delete": {
+ "tags": ["control"],
+ "operationId": "auth.remove",
+ "parameters": [
+ {
+ "name": "providerID",
+ "in": "path",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successfully removed authentication credentials",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "boolean",
+ "description": "Successfully removed authentication credentials"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
+ }
+ },
+ "description": "Remove authentication credentials",
+ "summary": "Remove auth credentials",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/log": {
+ "post": {
+ "tags": ["control"],
+ "operationId": "app.log",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Log entry written successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "boolean",
+ "description": "Log entry written successfully"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
+ }
+ },
+ "description": "Write a log entry to the server logs with specified level and metadata.",
+ "summary": "Write log",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "service": {
+ "type": "string",
+ "description": "Service name for the log entry"
+ },
+ "level": {
+ "type": "string",
+ "enum": ["debug", "info", "error", "warn"],
+ "description": "Log level"
+ },
+ "message": {
+ "type": "string",
+ "description": "Log message"
+ },
+ "extra": {
+ "type": "object"
+ }
+ },
+ "required": ["service", "level", "message"],
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
+ }
+ ]
+ }
+ },
"/global/health": {
"get": {
+ "tags": ["global"],
"operationId": "global.health",
- "summary": "Get health",
- "description": "Get health information about the OpenCode server.",
+ "parameters": [],
"responses": {
"200": {
"description": "Health information",
@@ -21,18 +206,22 @@
"properties": {
"healthy": {
"type": "boolean",
- "const": true
+ "enum": [true]
},
"version": {
"type": "string"
}
},
- "required": ["healthy", "version"]
+ "required": ["healthy", "version"],
+ "additionalProperties": false,
+ "description": "Health information"
}
}
}
}
},
+ "description": "Get health information about the OpenCode server.",
+ "summary": "Get health",
"x-codeSamples": [
{
"lang": "js",
@@ -43,9 +232,9 @@
},
"/global/event": {
"get": {
+ "tags": ["global"],
"operationId": "global.event",
- "summary": "Get global events",
- "description": "Subscribe to global events from the OpenCode system using server-sent events.",
+ "parameters": [],
"responses": {
"200": {
"description": "Event stream",
@@ -58,6 +247,8 @@
}
}
},
+ "description": "Subscribe to global events from the OpenCode system using server-sent events.",
+ "summary": "Get global events",
"x-codeSamples": [
{
"lang": "js",
@@ -68,9 +259,9 @@
},
"/global/config": {
"get": {
+ "tags": ["global"],
"operationId": "global.config.get",
- "summary": "Get global configuration",
- "description": "Retrieve the current global OpenCode configuration settings and preferences.",
+ "parameters": [],
"responses": {
"200": {
"description": "Get global config info",
@@ -83,6 +274,8 @@
}
}
},
+ "description": "Retrieve the current global OpenCode configuration settings and preferences.",
+ "summary": "Get global configuration",
"x-codeSamples": [
{
"lang": "js",
@@ -91,9 +284,9 @@
]
},
"patch": {
+ "tags": ["global"],
"operationId": "global.config.update",
- "summary": "Update global configuration",
- "description": "Update global OpenCode configuration settings and preferences.",
+ "parameters": [],
"responses": {
"200": {
"description": "Successfully updated global config",
@@ -116,6 +309,8 @@
}
}
},
+ "description": "Update global OpenCode configuration settings and preferences.",
+ "summary": "Update global configuration",
"requestBody": {
"content": {
"application/json": {
@@ -135,21 +330,24 @@
},
"/global/dispose": {
"post": {
+ "tags": ["global"],
"operationId": "global.dispose",
- "summary": "Dispose instance",
- "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
+ "parameters": [],
"responses": {
"200": {
"description": "Global disposed",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Global disposed"
}
}
}
}
},
+ "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
+ "summary": "Dispose instance",
"x-codeSamples": [
{
"lang": "js",
@@ -160,9 +358,9 @@
},
"/global/upgrade": {
"post": {
+ "tags": ["global"],
"operationId": "global.upgrade",
- "summary": "Upgrade opencode",
- "description": "Upgrade opencode to the specified version or latest if not specified.",
+ "parameters": [],
"responses": {
"200": {
"description": "Upgrade result",
@@ -175,28 +373,31 @@
"properties": {
"success": {
"type": "boolean",
- "const": true
+ "enum": [true]
},
"version": {
"type": "string"
}
},
- "required": ["success", "version"]
+ "required": ["success", "version"],
+ "additionalProperties": false
},
{
"type": "object",
"properties": {
"success": {
"type": "boolean",
- "const": false
+ "enum": [false]
},
"error": {
"type": "string"
}
},
- "required": ["success", "error"]
+ "required": ["success", "error"],
+ "additionalProperties": false
}
- ]
+ ],
+ "description": "Upgrade result"
}
}
}
@@ -212,6 +413,8 @@
}
}
},
+ "description": "Upgrade opencode to the specified version or latest if not specified.",
+ "summary": "Upgrade opencode",
"requestBody": {
"content": {
"application/json": {
@@ -221,7 +424,8 @@
"target": {
"type": "string"
}
- }
+ },
+ "additionalProperties": false
}
}
}
@@ -234,131 +438,121 @@
]
}
},
- "/auth/{providerID}": {
- "put": {
- "operationId": "auth.set",
- "summary": "Set auth credentials",
- "description": "Set authentication credentials",
- "responses": {
- "200": {
- "description": "Successfully set authentication credentials",
- "content": {
- "application/json": {
- "schema": {
- "type": "boolean"
- }
- }
+ "/event": {
+ "get": {
+ "tags": ["event"],
+ "operationId": "event.subscribe",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
}
},
- "400": {
- "description": "Bad request",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/BadRequestError"
- }
- }
- }
- }
- },
- "parameters": [
{
- "in": "path",
- "name": "providerID",
+ "name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
- },
- "required": true
+ }
}
],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Auth"
+ "responses": {
+ "200": {
+ "description": "Event stream",
+ "content": {
+ "text/event-stream": {
+ "schema": {
+ "$ref": "#/components/schemas/Event"
+ }
}
}
}
},
+ "description": "Get events",
+ "summary": "Subscribe to events",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
}
]
- },
- "delete": {
- "operationId": "auth.remove",
- "summary": "Remove auth credentials",
- "description": "Remove authentication credentials",
- "responses": {
- "200": {
- "description": "Successfully removed authentication credentials",
- "content": {
- "application/json": {
- "schema": {
- "type": "boolean"
- }
- }
+ }
+ },
+ "/config": {
+ "get": {
+ "tags": ["config"],
+ "operationId": "config.get",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
}
},
- "400": {
- "description": "Bad request",
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Get config info",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/BadRequestError"
+ "$ref": "#/components/schemas/Config"
}
}
}
}
},
- "parameters": [
- {
- "in": "path",
- "name": "providerID",
- "schema": {
- "type": "string"
- },
- "required": true
- }
- ],
+ "description": "Retrieve the current OpenCode configuration settings and preferences.",
+ "summary": "Get configuration",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
}
]
- }
- },
- "/log": {
- "post": {
- "operationId": "app.log",
+ },
+ "patch": {
+ "tags": ["config"],
+ "operationId": "config.update",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Write log",
- "description": "Write a log entry to the server logs with specified level and metadata.",
"responses": {
"200": {
- "description": "Log entry written successfully",
+ "description": "Successfully updated config",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "$ref": "#/components/schemas/Config"
}
}
}
@@ -374,35 +568,13 @@
}
}
},
+ "description": "Update OpenCode configuration settings and preferences.",
+ "summary": "Update configuration",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "service": {
- "description": "Service name for the log entry",
- "type": "string"
- },
- "level": {
- "description": "Log level",
- "type": "string",
- "enum": ["debug", "info", "error", "warn"]
- },
- "message": {
- "description": "Log message",
- "type": "string"
- },
- "extra": {
- "description": "Additional metadata for the log entry",
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["service", "level", "message"]
+ "$ref": "#/components/schemas/Config"
}
}
}
@@ -410,289 +582,302 @@
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
}
]
}
},
- "/experimental/workspace/adapter": {
+ "/config/providers": {
"get": {
- "operationId": "experimental.workspace.adapter.list",
+ "tags": ["config"],
+ "operationId": "config.providers",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "List workspace adapters",
- "description": "List all available workspace adapters for the current project.",
"responses": {
"200": {
- "description": "Workspace adapters",
+ "description": "List of providers",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
+ "type": "object",
+ "properties": {
+ "providers": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Provider"
}
},
- "required": ["type", "name", "description"]
- }
+ "default": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "required": ["providers", "default"],
+ "additionalProperties": false,
+ "description": "List of providers"
}
}
}
}
},
+ "description": "Get a list of all configured AI providers and their default models.",
+ "summary": "List config providers",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
}
]
}
},
- "/experimental/workspace": {
- "post": {
- "operationId": "experimental.workspace.create",
+ "/experimental/console": {
+ "get": {
+ "tags": ["experimental"],
+ "operationId": "experimental.console.get",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Create workspace",
- "description": "Create a workspace for the current project.",
"responses": {
"200": {
- "description": "Workspace created",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Workspace"
- }
- }
- }
- },
- "400": {
- "description": "Bad request",
+ "description": "Active Console provider metadata",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/BadRequestError"
+ "$ref": "#/components/schemas/ConsoleState"
}
}
}
}
},
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "pattern": "^wrk.*"
- },
- "type": {
- "type": "string"
- },
- "branch": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "extra": {
- "anyOf": [
- {},
- {
- "type": "null"
- }
- ]
- }
- },
- "required": ["type", "branch", "extra"]
- }
- }
- }
- },
+ "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
+ "summary": "Get active Console provider metadata",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
}
]
- },
+ }
+ },
+ "/experimental/console/orgs": {
"get": {
- "operationId": "experimental.workspace.list",
+ "tags": ["experimental"],
+ "operationId": "experimental.console.listOrgs",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "List workspaces",
- "description": "List all workspaces.",
"responses": {
"200": {
- "description": "Workspaces",
+ "description": "Switchable Console orgs",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Workspace"
- }
+ "type": "object",
+ "properties": {
+ "orgs": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "accountID": {
+ "type": "string"
+ },
+ "accountEmail": {
+ "type": "string"
+ },
+ "accountUrl": {
+ "type": "string"
+ },
+ "orgID": {
+ "type": "string"
+ },
+ "orgName": {
+ "type": "string"
+ },
+ "active": {
+ "type": "boolean"
+ }
+ },
+ "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
+ "additionalProperties": false
+ }
+ }
+ },
+ "required": ["orgs"],
+ "additionalProperties": false,
+ "description": "Switchable Console orgs"
}
}
}
}
},
+ "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
+ "summary": "List switchable Console orgs",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
}
]
}
},
- "/experimental/workspace/status": {
- "get": {
- "operationId": "experimental.workspace.status",
+ "/experimental/console/switch": {
+ "post": {
+ "tags": ["experimental"],
+ "operationId": "experimental.console.switchOrg",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Workspace status",
- "description": "Get connection status for workspaces in the current project.",
"responses": {
"200": {
- "description": "Workspace status",
+ "description": "Switch success",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "workspaceID": {
- "type": "string",
- "pattern": "^wrk.*"
- },
- "status": {
- "type": "string",
- "enum": ["connected", "connecting", "disconnected", "error"]
- }
- },
- "required": ["workspaceID", "status"]
- }
+ "type": "boolean",
+ "description": "Switch success"
}
}
}
}
},
+ "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
+ "summary": "Switch active Console org",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "accountID": {
+ "type": "string"
+ },
+ "orgID": {
+ "type": "string"
+ }
+ },
+ "required": ["accountID", "orgID"],
+ "additionalProperties": false
+ }
+ }
+ }
+ },
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
}
]
}
},
- "/experimental/workspace/{id}": {
- "delete": {
- "operationId": "experimental.workspace.remove",
+ "/experimental/tool": {
+ "get": {
+ "tags": ["experimental"],
+ "operationId": "tool.list",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
- "name": "id",
+ "name": "provider",
+ "in": "query",
"schema": {
- "type": "string",
- "pattern": "^wrk.*"
+ "type": "string"
+ },
+ "required": true
+ },
+ {
+ "name": "model",
+ "in": "query",
+ "schema": {
+ "type": "string"
},
"required": true
}
],
- "summary": "Remove workspace",
- "description": "Remove an existing workspace.",
"responses": {
"200": {
- "description": "Workspace removed",
+ "description": "Tools",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Workspace"
+ "$ref": "#/components/schemas/ToolList"
}
}
}
@@ -708,59 +893,45 @@
}
}
},
+ "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
+ "summary": "List tools",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
}
]
}
},
- "/experimental/workspace/{id}/session-restore": {
- "post": {
- "operationId": "experimental.workspace.sessionRestore",
+ "/experimental/tool/ids": {
+ "get": {
+ "tags": ["experimental"],
+ "operationId": "tool.ids",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
- },
- {
- "in": "path",
- "name": "id",
- "schema": {
- "type": "string",
- "pattern": "^wrk.*"
- },
- "required": true
}
],
- "summary": "Restore session into workspace",
- "description": "Replay a session's sync events into the target workspace in batches.",
"responses": {
"200": {
- "description": "Session replay started",
+ "description": "Tool IDs",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "total": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- }
- },
- "required": ["total"]
+ "$ref": "#/components/schemas/ToolIDs"
}
}
}
@@ -776,192 +947,217 @@
}
}
},
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- }
- },
- "required": ["sessionID"]
- }
- }
- }
- },
+ "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
+ "summary": "List tool IDs",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.sessionRestore({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
}
]
}
},
- "/project": {
+ "/experimental/worktree": {
"get": {
- "operationId": "project.list",
+ "tags": ["experimental"],
+ "operationId": "worktree.list",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "List all projects",
- "description": "Get a list of projects that have been opened with OpenCode.",
"responses": {
"200": {
- "description": "List of projects",
+ "description": "List of worktree directories",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/Project"
- }
+ "type": "string"
+ },
+ "description": "List of worktree directories"
}
}
}
}
},
+ "description": "List all sandbox worktrees for the current project.",
+ "summary": "List worktrees",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
}
]
- }
- },
- "/project/current": {
- "get": {
- "operationId": "project.current",
+ },
+ "post": {
+ "tags": ["experimental"],
+ "operationId": "worktree.create",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Get current project",
- "description": "Retrieve the currently active project that OpenCode is working with.",
"responses": {
"200": {
- "description": "Current project information",
+ "description": "Worktree created",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Project"
+ "$ref": "#/components/schemas/Worktree"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
}
}
}
}
},
+ "description": "Create a new git worktree for the current project and run any configured startup scripts.",
+ "summary": "Create worktree",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WorktreeCreateInput"
+ }
+ }
+ }
+ },
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
}
]
- }
- },
- "/project/git/init": {
- "post": {
- "operationId": "project.initGit",
+ },
+ "delete": {
+ "tags": ["experimental"],
+ "operationId": "worktree.remove",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Initialize git repository",
- "description": "Create a git repository for the current project and return the refreshed project info.",
"responses": {
"200": {
- "description": "Project information after git initialization",
+ "description": "Worktree removed",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Project"
+ "type": "boolean",
+ "description": "Worktree removed"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
}
}
}
}
},
+ "description": "Remove a git worktree and delete its branch.",
+ "summary": "Remove worktree",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WorktreeRemoveInput"
+ }
+ }
+ }
+ },
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
}
]
}
},
- "/project/{projectID}": {
- "patch": {
- "operationId": "project.update",
+ "/experimental/worktree/reset": {
+ "post": {
+ "tags": ["experimental"],
+ "operationId": "worktree.reset",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
- },
- {
- "in": "path",
- "name": "projectID",
- "schema": {
- "type": "string"
- },
- "required": true
}
],
- "summary": "Update project",
- "description": "Update project properties such as name, icon, and commands.",
"responses": {
"200": {
- "description": "Updated project information",
+ "description": "Worktree reset",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Project"
+ "type": "boolean",
+ "description": "Worktree reset"
}
}
}
@@ -975,51 +1171,15 @@
}
}
}
- },
- "404": {
- "description": "Not found",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/NotFoundError"
- }
- }
- }
}
},
+ "description": "Reset a worktree branch to the primary default branch.",
+ "summary": "Reset worktree",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "icon": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string"
- },
- "override": {
- "type": "string"
- },
- "color": {
- "type": "string"
- }
- }
- },
- "commands": {
- "type": "object",
- "properties": {
- "start": {
- "description": "Startup script to run when creating a new workspace (worktree)",
- "type": "string"
- }
- }
- }
- }
+ "$ref": "#/components/schemas/WorktreeResetInput"
}
}
}
@@ -1027,885 +1187,1108 @@
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
}
]
}
},
- "/pty/shells": {
+ "/experimental/session": {
"get": {
- "operationId": "pty.shells",
+ "tags": ["experimental"],
+ "operationId": "experimental.session.list",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "roots",
+ "in": "query",
+ "schema": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string",
+ "enum": ["true", "false"]
+ }
+ ]
+ },
+ "required": false
+ },
+ {
+ "name": "start",
+ "in": "query",
+ "schema": {
+ "type": "number"
+ },
+ "required": false
+ },
+ {
+ "name": "cursor",
+ "in": "query",
+ "schema": {
+ "type": "number"
+ },
+ "required": false
+ },
+ {
+ "name": "search",
+ "in": "query",
+ "schema": {
+ "type": "string"
+ },
+ "required": false
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "schema": {
+ "type": "number"
+ },
+ "required": false
+ },
+ {
+ "name": "archived",
+ "in": "query",
+ "schema": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string",
+ "enum": ["true", "false"]
+ }
+ ]
+ },
+ "required": false
}
],
- "summary": "List available shells",
- "description": "Get a list of available shells on the system.",
"responses": {
"200": {
- "description": "List of shells",
+ "description": "List of sessions",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "path": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "acceptable": {
- "type": "boolean"
- }
- },
- "required": ["path", "name", "acceptable"]
- }
+ "$ref": "#/components/schemas/GlobalSession"
+ },
+ "description": "List of sessions"
}
}
}
}
},
+ "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
+ "summary": "List sessions",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
}
]
}
},
- "/pty": {
+ "/experimental/resource": {
"get": {
- "operationId": "pty.list",
+ "tags": ["experimental"],
+ "operationId": "experimental.resource.list",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "List PTY sessions",
- "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
"responses": {
"200": {
- "description": "List of sessions",
+ "description": "MCP resources",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Pty"
- }
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/McpResource"
+ },
+ "description": "MCP resources"
}
}
}
}
},
+ "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
+ "summary": "Get MCP resources",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
}
]
- },
- "post": {
- "operationId": "pty.create",
+ }
+ },
+ "/find": {
+ "get": {
+ "tags": ["file"],
+ "operationId": "find.text",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "pattern",
+ "in": "query",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
}
],
- "summary": "Create PTY session",
- "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
"responses": {
"200": {
- "description": "Created session",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Pty"
- }
- }
- }
- },
- "400": {
- "description": "Bad request",
+ "description": "Matches",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/BadRequestError"
- }
- }
- }
- }
- },
- "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": "array",
+ "items": {
"type": "object",
- "propertyNames": {
- "type": "string"
+ "properties": {
+ "path": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": ["text"],
+ "additionalProperties": false
+ },
+ "lines": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": ["text"],
+ "additionalProperties": false
+ },
+ "line_number": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "absolute_offset": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "submatches": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "match": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": ["text"],
+ "additionalProperties": false
+ },
+ "start": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "end": {
+ "type": "integer",
+ "minimum": 0
+ }
+ },
+ "required": ["match", "start", "end"],
+ "additionalProperties": false
+ }
+ }
},
- "additionalProperties": {
- "type": "string"
- }
- }
+ "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
+ "additionalProperties": false
+ },
+ "description": "Matches"
}
}
}
}
},
+ "description": "Search for text patterns across files in the project using ripgrep.",
+ "summary": "Find text",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
}
]
}
},
- "/pty/{ptyID}": {
+ "/find/file": {
"get": {
- "operationId": "pty.get",
+ "tags": ["file"],
+ "operationId": "find.files",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
- "name": "ptyID",
+ "name": "query",
+ "in": "query",
"schema": {
- "type": "string",
- "pattern": "^pty.*"
+ "type": "string"
},
"required": true
+ },
+ {
+ "name": "dirs",
+ "in": "query",
+ "schema": {
+ "type": "string",
+ "enum": ["true", "false"]
+ },
+ "required": false
+ },
+ {
+ "name": "type",
+ "in": "query",
+ "schema": {
+ "type": "string",
+ "enum": ["file", "directory"]
+ },
+ "required": false
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "schema": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 200
+ },
+ "required": false
}
],
- "summary": "Get PTY session",
- "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
"responses": {
"200": {
- "description": "Session info",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Pty"
- }
- }
- }
- },
- "404": {
- "description": "Not found",
+ "description": "File paths",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundError"
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "File paths"
}
}
}
}
},
+ "description": "Search for files or directories by name or pattern in the project directory.",
+ "summary": "Find files",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
}
]
- },
- "put": {
- "operationId": "pty.update",
+ }
+ },
+ "/find/symbol": {
+ "get": {
+ "tags": ["file"],
+ "operationId": "find.symbols",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
- "name": "ptyID",
+ "name": "query",
+ "in": "query",
"schema": {
- "type": "string",
- "pattern": "^pty.*"
+ "type": "string"
},
"required": true
}
],
- "summary": "Update PTY session",
- "description": "Update properties of an existing pseudo-terminal (PTY) session.",
"responses": {
"200": {
- "description": "Updated session",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Pty"
- }
- }
- }
- },
- "400": {
- "description": "Bad request",
+ "description": "Symbols",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/BadRequestError"
- }
- }
- }
- }
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "title": {
- "type": "string"
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Symbol"
},
- "size": {
- "type": "object",
- "properties": {
- "rows": {
- "type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
- },
- "cols": {
- "type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
- }
- },
- "required": ["rows", "cols"]
- }
+ "description": "Symbols"
}
}
}
}
},
+ "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
+ "summary": "Find symbols",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
}
]
- },
- "delete": {
- "operationId": "pty.remove",
+ }
+ },
+ "/file": {
+ "get": {
+ "tags": ["file"],
+ "operationId": "file.list",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
- "name": "ptyID",
+ "name": "path",
+ "in": "query",
"schema": {
- "type": "string",
- "pattern": "^pty.*"
+ "type": "string"
},
"required": true
}
],
- "summary": "Remove PTY session",
- "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
"responses": {
"200": {
- "description": "Session removed",
- "content": {
- "application/json": {
- "schema": {
- "type": "boolean"
- }
- }
- }
- },
- "404": {
- "description": "Not found",
+ "description": "Files and directories",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundError"
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/FileNode"
+ },
+ "description": "Files and directories"
}
}
}
}
},
+ "description": "List files and directories in a specified path.",
+ "summary": "List files",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
}
]
}
},
- "/pty/{ptyID}/connect": {
+ "/file/content": {
"get": {
- "operationId": "pty.connect",
+ "tags": ["file"],
+ "operationId": "file.read",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
- "name": "ptyID",
+ "name": "path",
+ "in": "query",
"schema": {
- "type": "string",
- "pattern": "^pty.*"
+ "type": "string"
},
"required": true
}
],
- "summary": "Connect to PTY session",
- "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
"responses": {
"200": {
- "description": "Connected session",
+ "description": "File content",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "$ref": "#/components/schemas/FileContent"
}
}
}
+ }
+ },
+ "description": "Read the content of a specified file.",
+ "summary": "Read file",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/file/status": {
+ "get": {
+ "tags": ["file"],
+ "operationId": "file.status",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
},
- "404": {
- "description": "Not found",
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "File status",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundError"
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/File"
+ },
+ "description": "File status"
}
}
}
}
},
+ "description": "Get the git status of all files in the project.",
+ "summary": "Get file status",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
}
]
}
},
- "/config": {
- "get": {
- "operationId": "config.get",
+ "/instance/dispose": {
+ "post": {
+ "tags": ["instance"],
+ "operationId": "instance.dispose",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Get configuration",
- "description": "Retrieve the current OpenCode configuration settings and preferences.",
"responses": {
"200": {
- "description": "Get config info",
+ "description": "Instance disposed",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Config"
+ "type": "boolean",
+ "description": "Instance disposed"
}
}
}
}
},
+ "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
+ "summary": "Dispose instance",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
}
]
- },
- "patch": {
- "operationId": "config.update",
+ }
+ },
+ "/path": {
+ "get": {
+ "tags": ["instance"],
+ "operationId": "path.get",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Update configuration",
- "description": "Update OpenCode configuration settings and preferences.",
"responses": {
"200": {
- "description": "Successfully updated config",
+ "description": "Path",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Config"
+ "$ref": "#/components/schemas/Path"
}
}
}
+ }
+ },
+ "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
+ "summary": "Get paths",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/vcs": {
+ "get": {
+ "tags": ["instance"],
+ "operationId": "vcs.get",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
},
- "400": {
- "description": "Bad request",
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "VCS info",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/BadRequestError"
+ "$ref": "#/components/schemas/VcsInfo"
}
}
}
}
},
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Config"
- }
- }
- }
- },
+ "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
+ "summary": "Get VCS info",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
}
]
}
},
- "/config/providers": {
+ "/vcs/diff": {
"get": {
- "operationId": "config.providers",
+ "tags": ["instance"],
+ "operationId": "vcs.diff",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "mode",
+ "in": "query",
+ "schema": {
+ "type": "string",
+ "enum": ["git", "branch"]
+ },
+ "required": true
}
],
- "summary": "List config providers",
- "description": "Get a list of all configured AI providers and their default models.",
"responses": {
"200": {
- "description": "List of providers",
+ "description": "VCS diff",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "providers": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Provider"
- }
- },
- "default": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- }
- }
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/VcsFileDiff"
},
- "required": ["providers", "default"]
+ "description": "VCS diff"
}
}
}
}
},
+ "description": "Retrieve the current git diff for the working tree or against the default branch.",
+ "summary": "Get VCS diff",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
}
]
}
},
- "/experimental/console": {
+ "/command": {
"get": {
- "operationId": "experimental.console.get",
+ "tags": ["instance"],
+ "operationId": "command.list",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Get active Console provider metadata",
- "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
"responses": {
"200": {
- "description": "Active Console provider metadata",
+ "description": "List of commands",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ConsoleState"
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Command"
+ },
+ "description": "List of commands"
}
}
}
}
},
+ "description": "Get a list of all available commands in the OpenCode system.",
+ "summary": "List commands",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
}
]
}
},
- "/experimental/console/orgs": {
+ "/agent": {
"get": {
- "operationId": "experimental.console.listOrgs",
+ "tags": ["instance"],
+ "operationId": "app.agents",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "List switchable Console orgs",
- "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
"responses": {
"200": {
- "description": "Switchable Console orgs",
+ "description": "List of agents",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "orgs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "accountID": {
- "type": "string"
- },
- "accountEmail": {
- "type": "string"
- },
- "accountUrl": {
- "type": "string"
- },
- "orgID": {
- "type": "string"
- },
- "orgName": {
- "type": "string"
- },
- "active": {
- "type": "boolean"
- }
- },
- "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"]
- }
- }
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Agent"
},
- "required": ["orgs"]
+ "description": "List of agents"
}
}
}
}
},
+ "description": "Get a list of all available AI agents in the OpenCode system.",
+ "summary": "List agents",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
}
]
}
},
- "/experimental/console/switch": {
- "post": {
- "operationId": "experimental.console.switchOrg",
+ "/skill": {
+ "get": {
+ "tags": ["instance"],
+ "operationId": "app.skills",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Switch active Console org",
- "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
"responses": {
"200": {
- "description": "Switch success",
+ "description": "List of skills",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
- }
- }
- }
- }
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "accountID": {
- "type": "string"
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "location": {
+ "type": "string"
+ },
+ "content": {
+ "type": "string"
+ }
+ },
+ "required": ["name", "description", "location", "content"],
+ "additionalProperties": false
},
- "orgID": {
- "type": "string"
- }
- },
- "required": ["accountID", "orgID"]
+ "description": "List of skills"
+ }
}
}
}
},
+ "description": "Get a list of all available skills in the OpenCode system.",
+ "summary": "List skills",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
}
]
}
},
- "/experimental/tool/ids": {
+ "/lsp": {
"get": {
- "operationId": "tool.ids",
+ "tags": ["instance"],
+ "operationId": "lsp.status",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "List tool IDs",
- "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
"responses": {
"200": {
- "description": "Tool IDs",
+ "description": "LSP server status",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ToolIDs"
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/LSPStatus"
+ },
+ "description": "LSP server status"
}
}
}
+ }
+ },
+ "description": "Get LSP server status",
+ "summary": "Get LSP status",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/formatter": {
+ "get": {
+ "tags": ["instance"],
+ "operationId": "formatter.status",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
},
- "400": {
- "description": "Bad request",
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Formatter status",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/BadRequestError"
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/FormatterStatus"
+ },
+ "description": "Formatter status"
}
}
}
}
},
+ "description": "Get formatter status",
+ "summary": "Get formatter status",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
}
]
}
},
- "/experimental/tool": {
+ "/mcp": {
"get": {
- "operationId": "tool.list",
+ "tags": ["mcp"],
+ "operationId": "mcp.status",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
- },
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "MCP server status",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/MCPStatus"
+ },
+ "description": "MCP server status"
+ }
+ }
+ }
+ }
+ },
+ "description": "Get the status of all Model Context Protocol (MCP) servers.",
+ "summary": "Get MCP status",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
+ }
+ ]
+ },
+ "post": {
+ "tags": ["mcp"],
+ "operationId": "mcp.add",
+ "parameters": [
{
+ "name": "directory",
"in": "query",
- "name": "provider",
+ "required": false,
"schema": {
"type": "string"
- },
- "required": true
+ }
},
{
+ "name": "workspace",
"in": "query",
- "name": "model",
+ "required": false,
"schema": {
"type": "string"
- },
- "required": true
+ }
}
],
- "summary": "List tools",
- "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
"responses": {
"200": {
- "description": "Tools",
+ "description": "MCP server added successfully",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ToolList"
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/MCPStatus"
+ },
+ "description": "MCP server added successfully"
}
}
}
@@ -1921,142 +2304,231 @@
}
}
},
+ "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
+ "summary": "Add MCP server",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "config": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/McpLocalConfig"
+ },
+ {
+ "$ref": "#/components/schemas/McpRemoteConfig"
+ }
+ ]
+ }
+ },
+ "required": ["name", "config"],
+ "additionalProperties": false
+ }
+ }
+ }
+ },
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
}
]
}
},
- "/experimental/worktree": {
+ "/mcp/{name}/auth": {
"post": {
- "operationId": "worktree.create",
+ "tags": ["mcp"],
+ "operationId": "mcp.auth.start",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "name",
+ "in": "path",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
}
],
- "summary": "Create worktree",
- "description": "Create a new git worktree for the current project and run any configured startup scripts.",
"responses": {
"200": {
- "description": "Worktree created",
+ "description": "OAuth flow started",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Worktree"
+ "type": "object",
+ "properties": {
+ "authorizationUrl": {
+ "type": "string"
+ },
+ "oauthState": {
+ "type": "string"
+ }
+ },
+ "required": ["authorizationUrl", "oauthState"],
+ "additionalProperties": false,
+ "description": "OAuth flow started"
}
}
}
},
"400": {
- "description": "Bad request",
+ "description": "McpUnsupportedOAuthError",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/BadRequestError"
+ "$ref": "#/components/schemas/McpUnsupportedOAuthError"
}
}
}
- }
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/WorktreeCreateInput"
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundError"
+ }
}
}
}
},
+ "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
+ "summary": "Start MCP OAuth",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
}
]
},
- "get": {
- "operationId": "worktree.list",
+ "delete": {
+ "tags": ["mcp"],
+ "operationId": "mcp.auth.remove",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "name",
+ "in": "path",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
}
],
- "summary": "List worktrees",
- "description": "List all sandbox worktrees for the current project.",
"responses": {
"200": {
- "description": "List of worktree directories",
+ "description": "OAuth credentials removed",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "object",
+ "properties": {
+ "success": {
+ "type": "boolean",
+ "enum": [true]
+ }
+ },
+ "required": ["success"],
+ "additionalProperties": false,
+ "description": "OAuth credentials removed"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundError"
}
}
}
}
},
+ "description": "Remove OAuth credentials for an MCP server.",
+ "summary": "Remove MCP OAuth",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
}
]
- },
- "delete": {
- "operationId": "worktree.remove",
+ }
+ },
+ "/mcp/{name}/auth/callback": {
+ "post": {
+ "tags": ["mcp"],
+ "operationId": "mcp.auth.callback",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "name",
+ "in": "path",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
}
],
- "summary": "Remove worktree",
- "description": "Remove a git worktree and delete its branch.",
"responses": {
"200": {
- "description": "Worktree removed",
+ "description": "OAuth authentication completed",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "$ref": "#/components/schemas/MCPStatus"
}
}
}
@@ -2070,13 +2542,32 @@
}
}
}
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundError"
+ }
+ }
+ }
}
},
+ "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
+ "summary": "Complete MCP OAuth",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/WorktreeRemoveInput"
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string"
+ }
+ },
+ "required": ["code"],
+ "additionalProperties": false
}
}
}
@@ -2084,306 +2575,518 @@
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
}
]
}
},
- "/experimental/worktree/reset": {
+ "/mcp/{name}/auth/authenticate": {
"post": {
- "operationId": "worktree.reset",
+ "tags": ["mcp"],
+ "operationId": "mcp.auth.authenticate",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "name",
+ "in": "path",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
}
],
- "summary": "Reset worktree",
- "description": "Reset a worktree branch to the primary default branch.",
"responses": {
"200": {
- "description": "Worktree reset",
+ "description": "OAuth authentication completed",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "$ref": "#/components/schemas/MCPStatus"
}
}
}
},
"400": {
- "description": "Bad request",
+ "description": "McpUnsupportedOAuthError",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/BadRequestError"
+ "$ref": "#/components/schemas/McpUnsupportedOAuthError"
}
}
}
- }
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/WorktreeResetInput"
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundError"
+ }
}
}
}
},
+ "description": "Start OAuth flow and wait for callback (opens browser).",
+ "summary": "Authenticate MCP OAuth",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
}
]
}
},
- "/experimental/session": {
- "get": {
- "operationId": "experimental.session.list",
+ "/mcp/{name}/connect": {
+ "post": {
+ "tags": ["mcp"],
+ "operationId": "mcp.connect",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
- },
- "description": "Filter sessions by project directory"
+ }
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
- "name": "roots",
+ "name": "name",
+ "in": "path",
"schema": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "string",
- "enum": ["true", "false"]
- }
- ]
+ "type": "string"
},
- "description": "Only return root sessions (no parentID)"
- },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "MCP server connected successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "boolean",
+ "description": "MCP server connected successfully"
+ }
+ }
+ }
+ }
+ },
+ "description": "Connect an MCP server.",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/mcp/{name}/disconnect": {
+ "post": {
+ "tags": ["mcp"],
+ "operationId": "mcp.disconnect",
+ "parameters": [
{
+ "name": "directory",
"in": "query",
- "name": "start",
+ "required": false,
"schema": {
- "type": "number"
- },
- "description": "Filter sessions updated on or after this timestamp (milliseconds since epoch)"
+ "type": "string"
+ }
},
{
+ "name": "workspace",
"in": "query",
- "name": "cursor",
+ "required": false,
"schema": {
- "type": "number"
- },
- "description": "Return sessions updated before this timestamp (milliseconds since epoch)"
+ "type": "string"
+ }
},
{
- "in": "query",
- "name": "search",
+ "name": "name",
+ "in": "path",
"schema": {
"type": "string"
},
- "description": "Filter sessions by title (case-insensitive)"
- },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "MCP server disconnected successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "boolean",
+ "description": "MCP server disconnected successfully"
+ }
+ }
+ }
+ }
+ },
+ "description": "Disconnect an MCP server.",
+ "x-codeSamples": [
{
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/project": {
+ "get": {
+ "tags": ["project"],
+ "operationId": "project.list",
+ "parameters": [
+ {
+ "name": "directory",
"in": "query",
- "name": "limit",
+ "required": false,
"schema": {
- "type": "number"
- },
- "description": "Maximum number of sessions to return"
+ "type": "string"
+ }
},
{
+ "name": "workspace",
"in": "query",
- "name": "archived",
+ "required": false,
"schema": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "string",
- "enum": ["true", "false"]
- }
- ]
- },
- "description": "Include archived sessions (default false)"
+ "type": "string"
+ }
}
],
- "summary": "List sessions",
- "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
"responses": {
"200": {
- "description": "List of sessions",
+ "description": "List of projects",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/GlobalSession"
- }
+ "$ref": "#/components/schemas/Project"
+ },
+ "description": "List of projects"
}
}
}
}
},
+ "description": "Get a list of projects that have been opened with OpenCode.",
+ "summary": "List all projects",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
}
]
}
},
- "/experimental/resource": {
+ "/project/current": {
"get": {
- "operationId": "experimental.resource.list",
+ "tags": ["project"],
+ "operationId": "project.current",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Get MCP resources",
- "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
"responses": {
"200": {
- "description": "MCP resources",
+ "description": "Current project information",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "$ref": "#/components/schemas/McpResource"
- }
+ "$ref": "#/components/schemas/Project"
}
}
}
}
},
+ "description": "Retrieve the currently active project that OpenCode is working with.",
+ "summary": "Get current project",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
}
]
}
},
- "/session": {
- "get": {
- "operationId": "session.list",
+ "/project/git/init": {
+ "post": {
+ "tags": ["project"],
+ "operationId": "project.initGit",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
- },
- "description": "Filter sessions by directory"
+ }
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
- },
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Project information after git initialization",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Project"
+ }
+ }
+ }
+ }
+ },
+ "description": "Create a git repository for the current project and return the refreshed project info.",
+ "summary": "Initialize git repository",
+ "x-codeSamples": [
{
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/project/{projectID}": {
+ "patch": {
+ "tags": ["project"],
+ "operationId": "project.update",
+ "parameters": [
+ {
+ "name": "directory",
"in": "query",
- "name": "scope",
+ "required": false,
"schema": {
- "type": "string",
- "enum": ["project"]
- },
- "description": "List all sessions for the current project"
+ "type": "string"
+ }
},
{
+ "name": "workspace",
"in": "query",
- "name": "path",
+ "required": false,
"schema": {
"type": "string"
- },
- "description": "Filter sessions by project-relative path"
+ }
},
{
- "in": "query",
- "name": "roots",
+ "name": "projectID",
+ "in": "path",
"schema": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "string",
- "enum": ["true", "false"]
- }
- ]
+ "type": "string"
},
- "description": "Only return root sessions (no parentID)"
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Updated project information",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Project"
+ }
+ }
+ }
},
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundError"
+ }
+ }
+ }
+ }
+ },
+ "description": "Update project properties such as name, icon, and commands.",
+ "summary": "Update project",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "icon": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "override": {
+ "type": "string"
+ },
+ "color": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "commands": {
+ "type": "object",
+ "properties": {
+ "start": {
+ "type": "string",
+ "description": "Startup script to run when creating a new workspace (worktree)"
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/pty/shells": {
+ "get": {
+ "tags": ["pty"],
+ "operationId": "pty.shells",
+ "parameters": [
{
+ "name": "directory",
"in": "query",
- "name": "start",
+ "required": false,
"schema": {
- "type": "number"
- },
- "description": "Filter sessions updated on or after this timestamp (milliseconds since epoch)"
+ "type": "string"
+ }
},
{
+ "name": "workspace",
"in": "query",
- "name": "search",
+ "required": false,
"schema": {
"type": "string"
- },
- "description": "Filter sessions by title (case-insensitive)"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "List of shells",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "acceptable": {
+ "type": "boolean"
+ }
+ },
+ "required": ["path", "name", "acceptable"],
+ "additionalProperties": false
+ },
+ "description": "List of shells"
+ }
+ }
+ }
+ }
+ },
+ "description": "Get a list of available shells on the system.",
+ "summary": "List available shells",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/pty": {
+ "get": {
+ "tags": ["pty"],
+ "operationId": "pty.list",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
},
{
+ "name": "workspace",
"in": "query",
- "name": "limit",
+ "required": false,
"schema": {
- "type": "number"
- },
- "description": "Maximum number of sessions to return"
+ "type": "string"
+ }
}
],
- "summary": "List sessions",
- "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
"responses": {
"200": {
"description": "List of sessions",
@@ -2392,47 +3095,51 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/Session"
- }
+ "$ref": "#/components/schemas/Pty"
+ },
+ "description": "List of sessions"
}
}
}
}
},
+ "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
+ "summary": "List PTY sessions",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
}
]
},
"post": {
- "operationId": "session.create",
+ "tags": ["pty"],
+ "operationId": "pty.create",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Create session",
- "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
"responses": {
"200": {
- "description": "Successfully created session",
+ "description": "Created session",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Session"
+ "$ref": "#/components/schemas/Pty"
}
}
}
@@ -2448,45 +3155,37 @@
}
}
},
+ "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
+ "summary": "Create PTY session",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "parentID": {
- "type": "string",
- "pattern": "^ses.*"
+ "command": {
+ "type": "string"
},
- "title": {
+ "args": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "cwd": {
"type": "string"
},
- "agent": {
+ "title": {
"type": "string"
},
- "model": {
+ "env": {
"type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "providerID": {
- "type": "string"
- },
- "variant": {
- "type": "string"
- }
- },
- "required": ["id", "providerID"]
- },
- "permission": {
- "$ref": "#/components/schemas/PermissionRuleset"
- },
- "workspaceID": {
- "type": "string",
- "pattern": "^wrk.*"
+ "additionalProperties": {
+ "type": "string"
+ }
}
- }
+ },
+ "additionalProperties": false
}
}
}
@@ -2494,106 +3193,110 @@
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
}
]
}
},
- "/session/status": {
+ "/pty/{ptyID}": {
"get": {
- "operationId": "session.status",
+ "tags": ["pty"],
+ "operationId": "pty.get",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "ptyID",
+ "in": "path",
+ "schema": {
+ "type": "string",
+ "pattern": "^pty.*"
+ },
+ "required": true
}
],
- "summary": "Get session status",
- "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
"responses": {
"200": {
- "description": "Get session status",
+ "description": "Session info",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "$ref": "#/components/schemas/SessionStatus"
- }
+ "$ref": "#/components/schemas/Pty"
}
}
}
},
- "400": {
- "description": "Bad request",
+ "404": {
+ "description": "Not found",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/BadRequestError"
+ "$ref": "#/components/schemas/NotFoundError"
}
}
}
}
},
+ "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
+ "summary": "Get PTY session",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
}
]
- }
- },
- "/session/{sessionID}": {
- "get": {
- "operationId": "session.get",
+ },
+ "put": {
+ "tags": ["pty"],
+ "operationId": "pty.update",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "ptyID",
"in": "path",
- "name": "sessionID",
"schema": {
"type": "string",
- "pattern": "^ses.*"
+ "pattern": "^pty.*"
},
"required": true
}
],
- "summary": "Get session",
- "description": "Retrieve detailed information about a specific OpenCode session.",
- "tags": ["Session"],
"responses": {
"200": {
- "description": "Get session",
+ "description": "Updated session",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Session"
+ "$ref": "#/components/schemas/Pty"
}
}
}
@@ -2607,14 +3310,36 @@
}
}
}
- },
- "404": {
- "description": "Not found",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/NotFoundError"
- }
+ }
+ },
+ "description": "Update properties of an existing pseudo-terminal (PTY) session.",
+ "summary": "Update PTY session",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "size": {
+ "type": "object",
+ "properties": {
+ "rows": {
+ "type": "integer",
+ "exclusiveMinimum": 0
+ },
+ "cols": {
+ "type": "integer",
+ "exclusiveMinimum": 0
+ }
+ },
+ "required": ["rows", "cols"],
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
}
}
}
@@ -2622,114 +3347,160 @@
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
}
]
},
"delete": {
- "operationId": "session.delete",
+ "tags": ["pty"],
+ "operationId": "pty.remove",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "ptyID",
"in": "path",
- "name": "sessionID",
"schema": {
"type": "string",
- "pattern": "^ses.*"
+ "pattern": "^pty.*"
},
"required": true
}
],
- "summary": "Delete session",
- "description": "Delete a session and permanently remove all associated data, including messages and history.",
"responses": {
"200": {
- "description": "Successfully deleted session",
+ "description": "Session removed",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Session removed"
}
}
}
},
- "400": {
- "description": "Bad request",
+ "404": {
+ "description": "Not found",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/BadRequestError"
+ "$ref": "#/components/schemas/NotFoundError"
}
}
}
+ }
+ },
+ "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
+ "summary": "Remove PTY session",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/question": {
+ "get": {
+ "tags": ["question"],
+ "operationId": "question.list",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
},
- "404": {
- "description": "Not found",
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "List of pending questions",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundError"
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/QuestionRequest"
+ },
+ "description": "List of pending questions"
}
}
}
}
},
+ "description": "Get all pending question requests across all sessions.",
+ "summary": "List pending questions",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
}
]
- },
- "patch": {
- "operationId": "session.update",
+ }
+ },
+ "/question/{requestID}/reply": {
+ "post": {
+ "tags": ["question"],
+ "operationId": "question.reply",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "requestID",
"in": "path",
- "name": "sessionID",
"schema": {
"type": "string",
- "pattern": "^ses.*"
+ "pattern": "^que.*"
},
"required": true
}
],
- "summary": "Update session",
- "description": "Update properties of an existing session, such as title or other metadata.",
"responses": {
"200": {
- "description": "Successfully updated session",
+ "description": "Question answered successfully",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Session"
+ "type": "boolean",
+ "description": "Question answered successfully"
}
}
}
@@ -2755,27 +3526,24 @@
}
}
},
+ "description": "Provide answers to a question request from the AI assistant.",
+ "summary": "Reply to question request",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "title": {
- "type": "string"
- },
- "permission": {
- "$ref": "#/components/schemas/PermissionRuleset"
- },
- "time": {
- "type": "object",
- "properties": {
- "archived": {
- "type": "number"
- }
- }
+ "answers": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/QuestionAnswer"
+ },
+ "description": "User answers in order of questions (each answer is an array of selected labels)"
}
- }
+ },
+ "required": ["answers"],
+ "additionalProperties": false
}
}
}
@@ -2783,52 +3551,50 @@
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
}
]
}
},
- "/session/{sessionID}/children": {
- "get": {
- "operationId": "session.children",
+ "/question/{requestID}/reject": {
+ "post": {
+ "tags": ["question"],
+ "operationId": "question.reject",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "requestID",
"in": "path",
- "name": "sessionID",
"schema": {
"type": "string",
- "pattern": "^ses.*"
+ "pattern": "^que.*"
},
"required": true
}
],
- "summary": "Get session children",
- "tags": ["Session"],
- "description": "Retrieve all child sessions that were forked from the specified parent session.",
"responses": {
"200": {
- "description": "List of children",
+ "description": "Question rejected successfully",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Session"
- }
+ "type": "boolean",
+ "description": "Question rejected successfully"
}
}
}
@@ -2854,54 +3620,103 @@
}
}
},
+ "description": "Reject a question request from the AI assistant.",
+ "summary": "Reject question request",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
}
]
}
},
- "/session/{sessionID}/todo": {
+ "/permission": {
"get": {
- "operationId": "session.todo",
+ "tags": ["permission"],
+ "operationId": "permission.list",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "List of pending permissions",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/PermissionRequest"
+ },
+ "description": "List of pending permissions"
+ }
+ }
+ }
+ }
+ },
+ "description": "Get all pending permission requests across all sessions.",
+ "summary": "List pending permissions",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/permission/{requestID}/reply": {
+ "post": {
+ "tags": ["permission"],
+ "operationId": "permission.reply",
+ "parameters": [
+ {
+ "name": "directory",
"in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "requestID",
"in": "path",
- "name": "sessionID",
"schema": {
"type": "string",
- "pattern": "^ses.*"
+ "pattern": "^per.*"
},
"required": true
}
],
- "summary": "Get session todos",
- "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
"responses": {
"200": {
- "description": "Todo list",
+ "description": "Permission processed successfully",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Todo"
- }
+ "type": "boolean",
+ "description": "Permission processed successfully"
}
}
}
@@ -2927,51 +3742,191 @@
}
}
},
+ "description": "Approve or deny a permission request from the AI assistant.",
+ "summary": "Respond to permission request",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "reply": {
+ "type": "string",
+ "enum": ["once", "always", "reject"]
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": ["reply"],
+ "additionalProperties": false
+ }
+ }
+ }
+ },
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
}
]
}
},
- "/session/{sessionID}/init": {
- "post": {
- "operationId": "session.init",
+ "/provider": {
+ "get": {
+ "tags": ["provider"],
+ "operationId": "provider.list",
"parameters": [
{
+ "name": "directory",
"in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "List of providers",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "all": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Provider"
+ }
+ },
+ "default": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "connected": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": ["all", "default", "connected"],
+ "additionalProperties": false,
+ "description": "List of providers"
+ }
+ }
+ }
+ }
+ },
+ "description": "Get a list of all available AI providers, including both available and connected ones.",
+ "summary": "List providers",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/provider/auth": {
+ "get": {
+ "tags": ["provider"],
+ "operationId": "provider.auth",
+ "parameters": [
+ {
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Provider auth methods",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ProviderAuthMethod"
+ }
+ },
+ "description": "Provider auth methods"
+ }
+ }
+ }
+ }
+ },
+ "description": "Retrieve available authentication methods for all AI providers.",
+ "summary": "Get provider auth methods",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/provider/{providerID}/oauth/authorize": {
+ "post": {
+ "tags": ["provider"],
+ "operationId": "provider.oauth.authorize",
+ "parameters": [
+ {
+ "name": "directory",
"in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "providerID",
"in": "path",
- "name": "sessionID",
"schema": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"required": true
}
],
- "summary": "Initialize session",
- "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
"responses": {
"200": {
- "description": "200",
+ "description": "Authorization URL and method",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "$ref": "#/components/schemas/ProviderAuthAuthorization"
}
}
}
@@ -2985,36 +3940,112 @@
}
}
}
+ }
+ },
+ "description": "Start the OAuth authorization flow for a provider.",
+ "summary": "Start OAuth authorization",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "method": {
+ "type": "number",
+ "description": "Auth method index"
+ },
+ "inputs": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "required": ["method"],
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/provider/{providerID}/oauth/callback": {
+ "post": {
+ "tags": ["provider"],
+ "operationId": "provider.oauth.callback",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
},
- "404": {
- "description": "Not found",
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "providerID",
+ "in": "path",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OAuth callback processed successfully",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/NotFoundError"
+ "type": "boolean",
+ "description": "OAuth callback processed successfully"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
}
}
}
}
},
+ "description": "Handle the OAuth callback from a provider after user authorization.",
+ "summary": "Handle OAuth callback",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "modelID": {
- "type": "string"
+ "method": {
+ "type": "number",
+ "description": "Auth method index"
},
- "providerID": {
+ "code": {
"type": "string"
- },
- "messageID": {
- "type": "string",
- "pattern": "^msg.*"
}
},
- "required": ["modelID", "providerID", "messageID"]
+ "required": ["method"],
+ "additionalProperties": false
}
}
}
@@ -3022,44 +4053,139 @@
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
}
]
}
},
- "/session/{sessionID}/fork": {
- "post": {
- "operationId": "session.fork",
+ "/session": {
+ "get": {
+ "tags": ["session"],
+ "operationId": "session.list",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
- "name": "sessionID",
+ "name": "scope",
+ "in": "query",
"schema": {
"type": "string",
- "pattern": "^ses.*"
+ "enum": ["project"]
},
- "required": true
+ "required": false
+ },
+ {
+ "name": "path",
+ "in": "query",
+ "schema": {
+ "type": "string"
+ },
+ "required": false
+ },
+ {
+ "name": "roots",
+ "in": "query",
+ "schema": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string",
+ "enum": ["true", "false"]
+ }
+ ]
+ },
+ "required": false
+ },
+ {
+ "name": "start",
+ "in": "query",
+ "schema": {
+ "type": "number"
+ },
+ "required": false
+ },
+ {
+ "name": "search",
+ "in": "query",
+ "schema": {
+ "type": "string"
+ },
+ "required": false
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "schema": {
+ "type": "number"
+ },
+ "required": false
}
],
- "summary": "Fork session",
- "description": "Create a new session by forking an existing session at a specific message point.",
"responses": {
"200": {
- "description": "200",
+ "description": "List of sessions",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Session"
+ },
+ "description": "List of sessions"
+ }
+ }
+ }
+ }
+ },
+ "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
+ "summary": "List sessions",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
+ }
+ ]
+ },
+ "post": {
+ "tags": ["session"],
+ "operationId": "session.create",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successfully created session",
"content": {
"application/json": {
"schema": {
@@ -3067,19 +4193,59 @@
}
}
}
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
}
},
+ "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
+ "summary": "Create session",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "parentID": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "agent": {
+ "type": "string"
+ },
+ "model": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "providerID": {
+ "type": "string"
+ },
+ "variant": {
+ "type": "string"
+ }
+ },
+ "required": ["id", "providerID"],
+ "additionalProperties": false
+ },
+ "permission": {
+ "$ref": "#/components/schemas/PermissionRuleset"
+ },
+ "workspaceID": {
+ "type": "string"
}
- }
+ },
+ "additionalProperties": false
}
}
}
@@ -3087,32 +4253,93 @@
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
}
]
}
},
- "/session/{sessionID}/abort": {
- "post": {
- "operationId": "session.abort",
+ "/session/status": {
+ "get": {
+ "tags": ["session"],
+ "operationId": "session.status",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Get session status",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/SessionStatus"
+ },
+ "description": "Get session status"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
+ }
+ },
+ "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
+ "summary": "Get session status",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/session/{sessionID}": {
+ "get": {
+ "tags": ["session"],
+ "operationId": "session.get",
+ "parameters": [
+ {
+ "name": "directory",
"in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -3120,15 +4347,13 @@
"required": true
}
],
- "summary": "Abort session",
- "description": "Abort an active session and stop any ongoing AI processing or command execution.",
"responses": {
"200": {
- "description": "Aborted session",
+ "description": "Get session",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "$ref": "#/components/schemas/Session"
}
}
}
@@ -3154,35 +4379,38 @@
}
}
},
+ "description": "Retrieve detailed information about a specific OpenCode session.",
+ "summary": "Get session",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
}
]
- }
- },
- "/session/{sessionID}/share": {
- "post": {
- "operationId": "session.share",
+ },
+ "delete": {
+ "tags": ["session"],
+ "operationId": "session.delete",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -3190,15 +4418,14 @@
"required": true
}
],
- "summary": "Share session",
- "description": "Create a shareable link for a session, allowing others to view the conversation.",
"responses": {
"200": {
- "description": "Successfully shared session",
+ "description": "Successfully deleted session",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Session"
+ "type": "boolean",
+ "description": "Successfully deleted session"
}
}
}
@@ -3224,33 +4451,38 @@
}
}
},
+ "description": "Delete a session and permanently remove all associated data, including messages and history.",
+ "summary": "Delete session",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
}
]
},
- "delete": {
- "operationId": "session.unshare",
+ "patch": {
+ "tags": ["session"],
+ "operationId": "session.update",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -3258,11 +4490,9 @@
"required": true
}
],
- "summary": "Unshare session",
- "description": "Remove the shareable link for a session, making it private again.",
"responses": {
"200": {
- "description": "Successfully unshared session",
+ "description": "Successfully updated session",
"content": {
"application/json": {
"schema": {
@@ -3292,96 +4522,144 @@
}
}
},
+ "description": "Update properties of an existing session, such as title or other metadata.",
+ "summary": "Update session",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "permission": {
+ "$ref": "#/components/schemas/PermissionRuleset"
+ },
+ "time": {
+ "type": "object",
+ "properties": {
+ "archived": {
+ "type": "number"
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+ }
+ },
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
}
]
}
},
- "/session/{sessionID}/diff": {
+ "/session/{sessionID}/children": {
"get": {
- "operationId": "session.diff",
+ "tags": ["session"],
+ "operationId": "session.children",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
},
"required": true
- },
- {
- "in": "query",
- "name": "messageID",
- "schema": {
- "type": "string",
- "pattern": "^msg.*"
- }
}
],
- "summary": "Get message diff",
- "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
"responses": {
"200": {
- "description": "Successfully retrieved diff",
+ "description": "List of children",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/SnapshotFileDiff"
- }
+ "$ref": "#/components/schemas/Session"
+ },
+ "description": "List of children"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundError"
}
}
}
}
},
+ "description": "Retrieve all child sessions that were forked from the specified parent session.",
+ "summary": "Get session children",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
}
]
}
},
- "/session/{sessionID}/summarize": {
- "post": {
- "operationId": "session.summarize",
+ "/session/{sessionID}/todo": {
+ "get": {
+ "tags": ["session"],
+ "operationId": "session.todo",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -3389,15 +4667,17 @@
"required": true
}
],
- "summary": "Summarize session",
- "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
"responses": {
"200": {
- "description": "Summarized session",
+ "description": "Todo list",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Todo"
+ },
+ "description": "Todo list"
}
}
}
@@ -3423,57 +4703,106 @@
}
}
},
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "providerID": {
- "type": "string"
- },
- "modelID": {
- "type": "string"
+ "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
+ "summary": "Get session todos",
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/session/{sessionID}/diff": {
+ "get": {
+ "tags": ["session"],
+ "operationId": "session.diff",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "sessionID",
+ "in": "path",
+ "schema": {
+ "type": "string",
+ "pattern": "^ses.*"
+ },
+ "required": true
+ },
+ {
+ "name": "messageID",
+ "in": "query",
+ "schema": {
+ "type": "string",
+ "pattern": "^msg.*"
+ },
+ "required": false
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successfully retrieved diff",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SnapshotFileDiff"
},
- "auto": {
- "default": false,
- "type": "boolean"
- }
- },
- "required": ["providerID", "modelID"]
+ "description": "Successfully retrieved diff"
+ }
}
}
}
},
+ "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
+ "summary": "Get message diff",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
}
]
}
},
"/session/{sessionID}/message": {
"get": {
+ "tags": ["session"],
"operationId": "session.messages",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -3481,25 +4810,24 @@
"required": true
},
{
- "in": "query",
"name": "limit",
+ "in": "query",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
- "description": "Maximum number of messages to return"
+ "required": false
},
{
- "in": "query",
"name": "before",
+ "in": "query",
"schema": {
"type": "string"
- }
+ },
+ "required": false
}
],
- "summary": "Get session messages",
- "description": "Retrieve all messages in a session, including user prompts and AI responses.",
"responses": {
"200": {
"description": "List of messages",
@@ -3520,8 +4848,10 @@
}
}
},
- "required": ["info", "parts"]
- }
+ "required": ["info", "parts"],
+ "additionalProperties": false
+ },
+ "description": "List of messages"
}
}
}
@@ -3547,6 +4877,8 @@
}
}
},
+ "description": "Retrieve all messages in a session, including user prompts and AI responses.",
+ "summary": "Get session messages",
"x-codeSamples": [
{
"lang": "js",
@@ -3555,25 +4887,28 @@
]
},
"post": {
+ "tags": ["session"],
"operationId": "session.prompt",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -3581,8 +4916,6 @@
"required": true
}
],
- "summary": "Send message",
- "description": "Create and send a new message to a session, streaming the AI response.",
"responses": {
"200": {
"description": "Created message",
@@ -3590,6 +4923,7 @@
"application/json": {
"schema": {
"type": "object",
+ "required": ["info", "parts"],
"properties": {
"info": {
"$ref": "#/components/schemas/AssistantMessage"
@@ -3600,8 +4934,7 @@
"$ref": "#/components/schemas/Part"
}
}
- },
- "required": ["info", "parts"]
+ }
}
}
}
@@ -3627,6 +4960,8 @@
}
}
},
+ "description": "Create and send a new message to a session, streaming the AI response.",
+ "summary": "Send message",
"requestBody": {
"content": {
"application/json": {
@@ -3634,8 +4969,7 @@
"type": "object",
"properties": {
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"model": {
"type": "object",
@@ -3647,7 +4981,8 @@
"type": "string"
}
},
- "required": ["providerID", "modelID"]
+ "required": ["providerID", "modelID"],
+ "additionalProperties": false
},
"agent": {
"type": "string"
@@ -3656,11 +4991,7 @@
"type": "boolean"
},
"tools": {
- "description": "@deprecated tools and permissions have been merged, you can set permissions on the session itself now",
"type": "object",
- "propertyNames": {
- "type": "string"
- },
"additionalProperties": {
"type": "boolean"
}
@@ -3694,7 +5025,8 @@
}
}
},
- "required": ["parts"]
+ "required": ["parts"],
+ "additionalProperties": false
}
}
}
@@ -3709,25 +5041,28 @@
},
"/session/{sessionID}/message/{messageID}": {
"get": {
+ "tags": ["session"],
"operationId": "session.message",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -3735,8 +5070,8 @@
"required": true
},
{
- "in": "path",
"name": "messageID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^msg.*"
@@ -3744,8 +5079,6 @@
"required": true
}
],
- "summary": "Get message",
- "description": "Retrieve a specific message from a session by its message ID.",
"responses": {
"200": {
"description": "Message",
@@ -3764,7 +5097,9 @@
}
}
},
- "required": ["info", "parts"]
+ "required": ["info", "parts"],
+ "additionalProperties": false,
+ "description": "Message"
}
}
}
@@ -3790,6 +5125,8 @@
}
}
},
+ "description": "Retrieve a specific message from a session by its message ID.",
+ "summary": "Get message",
"x-codeSamples": [
{
"lang": "js",
@@ -3798,25 +5135,28 @@
]
},
"delete": {
+ "tags": ["session"],
"operationId": "session.deleteMessage",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -3824,8 +5164,8 @@
"required": true
},
{
- "in": "path",
"name": "messageID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^msg.*"
@@ -3833,15 +5173,14 @@
"required": true
}
],
- "summary": "Delete message",
- "description": "Permanently delete a specific message (and all of its parts) from a session. This does not revert any file changes that may have been made while processing the message.",
"responses": {
"200": {
"description": "Successfully deleted message",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Successfully deleted message"
}
}
}
@@ -3867,6 +5206,8 @@
}
}
},
+ "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
+ "summary": "Delete message",
"x-codeSamples": [
{
"lang": "js",
@@ -3875,60 +5216,187 @@
]
}
},
- "/session/{sessionID}/message/{messageID}/part/{partID}": {
- "delete": {
- "operationId": "part.delete",
+ "/session/{sessionID}/fork": {
+ "post": {
+ "tags": ["session"],
+ "operationId": "session.fork",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
},
"required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "200",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Session"
+ }
+ }
+ }
+ }
+ },
+ "description": "Create a new session by forking an existing session at a specific message point.",
+ "summary": "Fork session",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "messageID": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/session/{sessionID}/abort": {
+ "post": {
+ "tags": ["session"],
+ "operationId": "session.abort",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
},
{
+ "name": "sessionID",
"in": "path",
- "name": "messageID",
"schema": {
"type": "string",
- "pattern": "^msg.*"
+ "pattern": "^ses.*"
},
"required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Aborted session",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "boolean",
+ "description": "Aborted session"
+ }
+ }
+ }
},
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundError"
+ }
+ }
+ }
+ }
+ },
+ "description": "Abort an active session and stop any ongoing AI processing or command execution.",
+ "summary": "Abort session",
+ "x-codeSamples": [
{
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/session/{sessionID}/init": {
+ "post": {
+ "tags": ["session"],
+ "operationId": "session.init",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "sessionID",
"in": "path",
- "name": "partID",
"schema": {
"type": "string",
- "pattern": "^prt.*"
+ "pattern": "^ses.*"
},
"required": true
}
],
- "description": "Delete a part from a message",
"responses": {
"200": {
- "description": "Successfully deleted part",
+ "description": "200",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "200"
}
}
}
@@ -3954,66 +5422,221 @@
}
}
},
+ "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
+ "summary": "Initialize session",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "modelID": {
+ "type": "string"
+ },
+ "providerID": {
+ "type": "string"
+ },
+ "messageID": {
+ "type": "string"
+ }
+ },
+ "required": ["modelID", "providerID", "messageID"],
+ "additionalProperties": false
+ }
+ }
+ }
+ },
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
}
]
- },
- "patch": {
- "operationId": "part.update",
+ }
+ },
+ "/session/{sessionID}/share": {
+ "post": {
+ "tags": ["session"],
+ "operationId": "session.share",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
},
"required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successfully shared session",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Session"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
},
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundError"
+ }
+ }
+ }
+ }
+ },
+ "description": "Create a shareable link for a session, allowing others to view the conversation.",
+ "summary": "Share session",
+ "x-codeSamples": [
{
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
+ }
+ ]
+ },
+ "delete": {
+ "tags": ["session"],
+ "operationId": "session.unshare",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "sessionID",
"in": "path",
- "name": "messageID",
"schema": {
"type": "string",
- "pattern": "^msg.*"
+ "pattern": "^ses.*"
},
"required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successfully unshared session",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Session"
+ }
+ }
+ }
},
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundError"
+ }
+ }
+ }
+ }
+ },
+ "description": "Remove the shareable link for a session, making it private again.",
+ "summary": "Unshare session",
+ "x-codeSamples": [
{
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/session/{sessionID}/summarize": {
+ "post": {
+ "tags": ["session"],
+ "operationId": "session.summarize",
+ "parameters": [
+ {
+ "name": "directory",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "workspace",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "sessionID",
"in": "path",
- "name": "partID",
"schema": {
"type": "string",
- "pattern": "^prt.*"
+ "pattern": "^ses.*"
},
"required": true
}
],
- "description": "Update a part in a message",
"responses": {
"200": {
- "description": "Successfully updated part",
+ "description": "Summarized session",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Part"
+ "type": "boolean",
+ "description": "Summarized session"
}
}
}
@@ -4039,11 +5662,26 @@
}
}
},
+ "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
+ "summary": "Summarize session",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Part"
+ "type": "object",
+ "properties": {
+ "providerID": {
+ "type": "string"
+ },
+ "modelID": {
+ "type": "string"
+ },
+ "auto": {
+ "type": "boolean"
+ }
+ },
+ "required": ["providerID", "modelID"],
+ "additionalProperties": false
}
}
}
@@ -4051,32 +5689,35 @@
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
}
]
}
},
"/session/{sessionID}/prompt_async": {
"post": {
+ "tags": ["session"],
"operationId": "session.prompt_async",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -4084,8 +5725,6 @@
"required": true
}
],
- "summary": "Send async message",
- "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
"responses": {
"204": {
"description": "Prompt accepted"
@@ -4111,6 +5750,8 @@
}
}
},
+ "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
+ "summary": "Send async message",
"requestBody": {
"content": {
"application/json": {
@@ -4118,8 +5759,7 @@
"type": "object",
"properties": {
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"model": {
"type": "object",
@@ -4131,7 +5771,8 @@
"type": "string"
}
},
- "required": ["providerID", "modelID"]
+ "required": ["providerID", "modelID"],
+ "additionalProperties": false
},
"agent": {
"type": "string"
@@ -4140,11 +5781,7 @@
"type": "boolean"
},
"tools": {
- "description": "@deprecated tools and permissions have been merged, you can set permissions on the session itself now",
"type": "object",
- "propertyNames": {
- "type": "string"
- },
"additionalProperties": {
"type": "boolean"
}
@@ -4178,7 +5815,8 @@
}
}
},
- "required": ["parts"]
+ "required": ["parts"],
+ "additionalProperties": false
}
}
}
@@ -4193,25 +5831,28 @@
},
"/session/{sessionID}/command": {
"post": {
+ "tags": ["session"],
"operationId": "session.command",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -4219,8 +5860,6 @@
"required": true
}
],
- "summary": "Send command",
- "description": "Send a new command to a session for execution by the AI assistant.",
"responses": {
"200": {
"description": "Created message",
@@ -4228,6 +5867,7 @@
"application/json": {
"schema": {
"type": "object",
+ "required": ["info", "parts"],
"properties": {
"info": {
"$ref": "#/components/schemas/AssistantMessage"
@@ -4238,8 +5878,7 @@
"$ref": "#/components/schemas/Part"
}
}
- },
- "required": ["info", "parts"]
+ }
}
}
}
@@ -4265,6 +5904,8 @@
}
}
},
+ "description": "Send a new command to a session for execution by the AI assistant.",
+ "summary": "Send command",
"requestBody": {
"content": {
"application/json": {
@@ -4272,8 +5913,7 @@
"type": "object",
"properties": {
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"agent": {
"type": "string"
@@ -4296,12 +5936,11 @@
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "file"
+ "enum": ["file"]
},
"mime": {
"type": "string"
@@ -4316,11 +5955,13 @@
"$ref": "#/components/schemas/FilePartSource"
}
},
- "required": ["type", "mime", "url"]
+ "required": ["type", "mime", "url"],
+ "additionalProperties": false
}
}
},
- "required": ["arguments", "command"]
+ "required": ["arguments", "command"],
+ "additionalProperties": false
}
}
}
@@ -4335,25 +5976,28 @@
},
"/session/{sessionID}/shell": {
"post": {
+ "tags": ["session"],
"operationId": "session.shell",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -4361,8 +6005,6 @@
"required": true
}
],
- "summary": "Run shell command",
- "description": "Execute a shell command within the session context and return the AI's response.",
"responses": {
"200": {
"description": "Created message",
@@ -4381,7 +6023,9 @@
}
}
},
- "required": ["info", "parts"]
+ "required": ["info", "parts"],
+ "additionalProperties": false,
+ "description": "Created message"
}
}
}
@@ -4407,6 +6051,8 @@
}
}
},
+ "description": "Execute a shell command within the session context and return the AI's response.",
+ "summary": "Run shell command",
"requestBody": {
"content": {
"application/json": {
@@ -4414,8 +6060,7 @@
"type": "object",
"properties": {
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"agent": {
"type": "string"
@@ -4430,13 +6075,15 @@
"type": "string"
}
},
- "required": ["providerID", "modelID"]
+ "required": ["providerID", "modelID"],
+ "additionalProperties": false
},
"command": {
"type": "string"
}
},
- "required": ["agent", "command"]
+ "required": ["agent", "command"],
+ "additionalProperties": false
}
}
}
@@ -4451,25 +6098,28 @@
},
"/session/{sessionID}/revert": {
"post": {
+ "tags": ["session"],
"operationId": "session.revert",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -4477,8 +6127,6 @@
"required": true
}
],
- "summary": "Revert message",
- "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
"responses": {
"200": {
"description": "Updated session",
@@ -4511,6 +6159,8 @@
}
}
},
+ "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
+ "summary": "Revert message",
"requestBody": {
"content": {
"application/json": {
@@ -4518,15 +6168,14 @@
"type": "object",
"properties": {
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"partID": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
}
},
- "required": ["messageID"]
+ "required": ["messageID"],
+ "additionalProperties": false
}
}
}
@@ -4541,25 +6190,28 @@
},
"/session/{sessionID}/unrevert": {
"post": {
+ "tags": ["session"],
"operationId": "session.unrevert",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -4567,8 +6219,6 @@
"required": true
}
],
- "summary": "Restore reverted messages",
- "description": "Restore all previously reverted messages in a session.",
"responses": {
"200": {
"description": "Updated session",
@@ -4601,6 +6251,8 @@
}
}
},
+ "description": "Restore all previously reverted messages in a session.",
+ "summary": "Restore reverted messages",
"x-codeSamples": [
{
"lang": "js",
@@ -4611,25 +6263,28 @@
},
"/session/{sessionID}/permissions/{permissionID}": {
"post": {
+ "tags": ["session"],
"operationId": "permission.respond",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "path",
"name": "sessionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^ses.*"
@@ -4637,8 +6292,8 @@
"required": true
},
{
- "in": "path",
"name": "permissionID",
+ "in": "path",
"schema": {
"type": "string",
"pattern": "^per.*"
@@ -4646,16 +6301,14 @@
"required": true
}
],
- "summary": "Respond to permission",
- "deprecated": true,
- "description": "Approve or deny a permission request from the AI assistant.",
"responses": {
"200": {
"description": "Permission processed successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Permission processed successfully"
}
}
}
@@ -4681,6 +6334,9 @@
}
}
},
+ "description": "Approve or deny a permission request from the AI assistant.",
+ "summary": "Respond to permission",
+ "deprecated": true,
"requestBody": {
"content": {
"application/json": {
@@ -4692,7 +6348,8 @@
"enum": ["once", "always", "reject"]
}
},
- "required": ["response"]
+ "required": ["response"],
+ "additionalProperties": false
}
}
}
@@ -4705,309 +6362,63 @@
]
}
},
- "/permission/{requestID}/reply": {
- "post": {
- "operationId": "permission.reply",
+ "/session/{sessionID}/message/{messageID}/part/{partID}": {
+ "delete": {
+ "tags": ["session"],
+ "operationId": "part.delete",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "sessionID",
"in": "path",
- "name": "requestID",
"schema": {
"type": "string",
- "pattern": "^per.*"
+ "pattern": "^ses.*"
},
"required": true
- }
- ],
- "summary": "Respond to permission request",
- "description": "Approve or deny a permission request from the AI assistant.",
- "responses": {
- "200": {
- "description": "Permission processed successfully",
- "content": {
- "application/json": {
- "schema": {
- "type": "boolean"
- }
- }
- }
- },
- "400": {
- "description": "Bad request",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/BadRequestError"
- }
- }
- }
- },
- "404": {
- "description": "Not found",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/NotFoundError"
- }
- }
- }
- }
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "reply": {
- "type": "string",
- "enum": ["once", "always", "reject"]
- },
- "message": {
- "type": "string"
- }
- },
- "required": ["reply"]
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
- }
- ]
- }
- },
- "/permission": {
- "get": {
- "operationId": "permission.list",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
- }
- ],
- "summary": "List pending permissions",
- "description": "Get all pending permission requests across all sessions.",
- "responses": {
- "200": {
- "description": "List of pending permissions",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/PermissionRequest"
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
- }
- ]
- }
- },
- "/question": {
- "get": {
- "operationId": "question.list",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
- }
- ],
- "summary": "List pending questions",
- "description": "Get all pending question requests across all sessions.",
- "responses": {
- "200": {
- "description": "List of pending questions",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/QuestionRequest"
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
- }
- ]
- }
- },
- "/question/{requestID}/reply": {
- "post": {
- "operationId": "question.reply",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
},
{
+ "name": "messageID",
"in": "path",
- "name": "requestID",
"schema": {
"type": "string",
- "pattern": "^que.*"
+ "pattern": "^msg.*"
},
"required": true
- }
- ],
- "summary": "Reply to question request",
- "description": "Provide answers to a question request from the AI assistant.",
- "responses": {
- "200": {
- "description": "Question answered successfully",
- "content": {
- "application/json": {
- "schema": {
- "type": "boolean"
- }
- }
- }
- },
- "400": {
- "description": "Bad request",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/BadRequestError"
- }
- }
- }
- },
- "404": {
- "description": "Not found",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/NotFoundError"
- }
- }
- }
- }
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "answers": {
- "description": "User answers in order of questions (each answer is an array of selected labels)",
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/QuestionAnswer"
- }
- }
- },
- "required": ["answers"]
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
- }
- ]
- }
- },
- "/question/{requestID}/reject": {
- "post": {
- "operationId": "question.reject",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
},
{
+ "name": "partID",
"in": "path",
- "name": "requestID",
"schema": {
"type": "string",
- "pattern": "^que.*"
+ "pattern": "^prt.*"
},
"required": true
}
],
- "summary": "Reject question request",
- "description": "Reject a question request from the AI assistant.",
"responses": {
"200": {
- "description": "Question rejected successfully",
+ "description": "Successfully deleted part",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Successfully deleted part"
}
}
}
@@ -5033,166 +6444,69 @@
}
}
},
+ "description": "Delete a part from a message.",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
}
]
- }
- },
- "/provider": {
- "get": {
- "operationId": "provider.list",
+ },
+ "patch": {
+ "tags": ["session"],
+ "operationId": "part.update",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
- "schema": {
- "type": "string"
- }
- }
- ],
- "summary": "List providers",
- "description": "Get a list of all available AI providers, including both available and connected ones.",
- "responses": {
- "200": {
- "description": "List of providers",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "all": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Provider"
- }
- },
- "default": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- "connected": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": ["all", "default", "connected"]
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
- }
- ]
- }
- },
- "/provider/auth": {
- "get": {
- "operationId": "provider.auth",
- "parameters": [
- {
"in": "query",
- "name": "directory",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
- }
- ],
- "summary": "Get provider auth methods",
- "description": "Retrieve available authentication methods for all AI providers.",
- "responses": {
- "200": {
- "description": "Provider auth methods",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ProviderAuthMethod"
- }
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
- }
- ]
- }
- },
- "/provider/{providerID}/oauth/authorize": {
- "post": {
- "operationId": "provider.oauth.authorize",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
+ "name": "sessionID",
+ "in": "path",
"schema": {
- "type": "string"
- }
+ "type": "string",
+ "pattern": "^ses.*"
+ },
+ "required": true
},
{
- "in": "query",
- "name": "workspace",
+ "name": "messageID",
+ "in": "path",
"schema": {
- "type": "string"
- }
+ "type": "string",
+ "pattern": "^msg.*"
+ },
+ "required": true
},
{
+ "name": "partID",
"in": "path",
- "name": "providerID",
"schema": {
- "type": "string"
+ "type": "string",
+ "pattern": "^prt.*"
},
- "required": true,
- "description": "Provider ID"
+ "required": true
}
],
- "summary": "OAuth authorize",
- "description": "Initiate OAuth authorization for a specific AI provider to get an authorization URL.",
"responses": {
"200": {
- "description": "Authorization URL and method",
+ "description": "Successfully updated part",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ProviderAuthAuthorization"
+ "$ref": "#/components/schemas/Part"
}
}
}
@@ -5206,110 +6520,24 @@
}
}
}
- }
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "method": {
- "description": "Auth method index",
- "type": "number"
- },
- "inputs": {
- "description": "Prompt inputs",
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- }
- }
- },
- "required": ["method"]
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
- }
- ]
- }
- },
- "/provider/{providerID}/oauth/callback": {
- "post": {
- "operationId": "provider.oauth.callback",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "path",
- "name": "providerID",
- "schema": {
- "type": "string"
- },
- "required": true,
- "description": "Provider ID"
- }
- ],
- "summary": "OAuth callback",
- "description": "Handle the OAuth callback from a provider after user authorization.",
- "responses": {
- "200": {
- "description": "OAuth callback processed successfully",
- "content": {
- "application/json": {
- "schema": {
- "type": "boolean"
- }
- }
- }
},
- "400": {
- "description": "Bad request",
+ "404": {
+ "description": "Not found",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/BadRequestError"
+ "$ref": "#/components/schemas/NotFoundError"
}
}
}
}
},
+ "description": "Update a part in a message.",
"requestBody": {
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "method": {
- "description": "Auth method index",
- "type": "number"
- },
- "code": {
- "description": "OAuth authorization code",
- "type": "string"
- }
- },
- "required": ["method"]
+ "$ref": "#/components/schemas/Part"
}
}
}
@@ -5317,44 +6545,48 @@
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
}
]
}
},
"/sync/start": {
"post": {
+ "tags": ["sync"],
"operationId": "sync.start",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Start workspace sync",
- "description": "Start sync loops for workspaces in the current project that have active sessions.",
"responses": {
"200": {
"description": "Workspace sync started",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Workspace sync started"
}
}
}
}
},
+ "description": "Start sync loops for workspaces in the current project that have active sessions.",
+ "summary": "Start workspace sync",
"x-codeSamples": [
{
"lang": "js",
@@ -5365,25 +6597,26 @@
},
"/sync/replay": {
"post": {
+ "tags": ["sync"],
"operationId": "sync.replay",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Replay sync events",
- "description": "Validate and replay a complete sync event history.",
"responses": {
"200": {
"description": "Replayed sync events",
@@ -5396,7 +6629,9 @@
"type": "string"
}
},
- "required": ["sessionID"]
+ "required": ["sessionID"],
+ "additionalProperties": false,
+ "description": "Replayed sync events"
}
}
}
@@ -5412,6 +6647,8 @@
}
}
},
+ "description": "Validate and replay a complete sync event history.",
+ "summary": "Replay sync events",
"requestBody": {
"content": {
"application/json": {
@@ -5422,8 +6659,8 @@
"type": "string"
},
"events": {
- "minItems": 1,
"type": "array",
+ "minItems": 1,
"items": {
"type": "object",
"properties": {
@@ -5435,25 +6672,22 @@
},
"seq": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"type": {
"type": "string"
},
"data": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
}
},
- "required": ["id", "aggregateID", "seq", "type", "data"]
+ "required": ["id", "aggregateID", "seq", "type", "data"],
+ "additionalProperties": false
}
}
},
- "required": ["directory", "events"]
+ "required": ["directory", "events"],
+ "additionalProperties": false
}
}
}
@@ -5468,25 +6702,26 @@
},
"/sync/history": {
"post": {
+ "tags": ["sync"],
"operationId": "sync.history.list",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "List sync events",
- "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
"responses": {
"200": {
"description": "Sync events",
@@ -5504,21 +6739,20 @@
"type": "string"
},
"seq": {
- "type": "number"
+ "type": "integer",
+ "minimum": 0
},
"type": {
"type": "string"
},
"data": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
}
},
- "required": ["id", "aggregate_id", "seq", "type", "data"]
- }
+ "required": ["id", "aggregate_id", "seq", "type", "data"],
+ "additionalProperties": false
+ },
+ "description": "Sync events"
}
}
}
@@ -5534,18 +6768,16 @@
}
}
},
+ "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
+ "summary": "List sync events",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
- "propertyNames": {
- "type": "string"
- },
"additionalProperties": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
}
}
@@ -5559,547 +6791,120 @@
]
}
},
- "/find": {
+ "/api/session": {
"get": {
- "operationId": "find.text",
+ "tags": ["v2"],
+ "operationId": "v2.session.list",
"parameters": [
{
- "in": "query",
"name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
"in": "query",
- "name": "workspace",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
- "name": "pattern",
- "schema": {
- "type": "string"
- },
- "required": true
- }
- ],
- "summary": "Find text",
- "description": "Search for text patterns across files in the project using ripgrep.",
- "responses": {
- "200": {
- "description": "Matches",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "path": {
- "type": "object",
- "properties": {
- "text": {
- "type": "string"
- }
- },
- "required": ["text"]
- },
- "lines": {
- "type": "object",
- "properties": {
- "text": {
- "type": "string"
- }
- },
- "required": ["text"]
- },
- "line_number": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- },
- "absolute_offset": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- },
- "submatches": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "match": {
- "type": "object",
- "properties": {
- "text": {
- "type": "string"
- }
- },
- "required": ["text"]
- },
- "start": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- },
- "end": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- }
- },
- "required": ["match", "start", "end"]
- }
- }
- },
- "required": ["path", "lines", "line_number", "absolute_offset", "submatches"]
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
- }
- ]
- }
- },
- "/find/file": {
- "get": {
- "operationId": "find.files",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
"name": "workspace",
- "schema": {
- "type": "string"
- }
- },
- {
"in": "query",
- "name": "query",
+ "required": false,
"schema": {
"type": "string"
- },
- "required": true
- },
- {
- "in": "query",
- "name": "dirs",
- "schema": {
- "type": "string",
- "enum": ["true", "false"]
- }
- },
- {
- "in": "query",
- "name": "type",
- "schema": {
- "type": "string",
- "enum": ["file", "directory"]
- }
- },
- {
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer",
- "minimum": 1,
- "maximum": 200
}
}
],
- "summary": "Find files",
- "description": "Search for files or directories by name or pattern in the project directory.",
"responses": {
"200": {
- "description": "File paths",
+ "description": "V2SessionsResponse",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "$ref": "#/components/schemas/V2SessionsResponse"
}
}
}
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
- }
- ]
- }
- },
- "/find/symbol": {
- "get": {
- "operationId": "find.symbols",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
},
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "query",
- "schema": {
- "type": "string"
- },
- "required": true
- }
- ],
- "summary": "Find symbols",
- "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
- "responses": {
- "200": {
- "description": "Symbols",
+ "400": {
+ "description": "Bad request",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Symbol"
- }
+ "$ref": "#/components/schemas/BadRequestError"
}
}
}
}
},
+ "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 v2 sessions",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
}
]
}
},
- "/file": {
- "get": {
- "operationId": "file.list",
+ "/api/session/{sessionID}/prompt": {
+ "post": {
+ "tags": ["v2"],
+ "operationId": "v2.session.prompt",
"parameters": [
{
- "in": "query",
"name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "path",
- "schema": {
- "type": "string"
- },
- "required": true
- }
- ],
- "summary": "List files",
- "description": "List files and directories in a specified path.",
- "responses": {
- "200": {
- "description": "Files and directories",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/FileNode"
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
- }
- ]
- }
- },
- "/file/content": {
- "get": {
- "operationId": "file.read",
- "parameters": [
- {
"in": "query",
- "name": "directory",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
- "name": "path",
+ "name": "sessionID",
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "string",
+ "pattern": "^ses.*"
},
"required": true
}
],
- "summary": "Read file",
- "description": "Read the content of a specified file.",
"responses": {
"200": {
- "description": "File content",
+ "description": "Session.Message",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/FileContent"
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
- }
- ]
- }
- },
- "/file/status": {
- "get": {
- "operationId": "file.status",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
- }
- ],
- "summary": "Get file status",
- "description": "Get the git status of all files in the project.",
- "responses": {
- "200": {
- "description": "File status",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/File"
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
- }
- ]
- }
- },
- "/event": {
- "get": {
- "operationId": "event.subscribe",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
- }
- ],
- "summary": "Subscribe to events",
- "description": "Get events",
- "responses": {
- "200": {
- "description": "Event stream",
- "content": {
- "text/event-stream": {
- "schema": {
- "$ref": "#/components/schemas/Event"
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
- }
- ]
- }
- },
- "/mcp": {
- "get": {
- "operationId": "mcp.status",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
- }
- ],
- "summary": "Get MCP status",
- "description": "Get the status of all Model Context Protocol (MCP) servers.",
- "responses": {
- "200": {
- "description": "MCP server status",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "$ref": "#/components/schemas/MCPStatus"
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
- }
- ]
- },
- "post": {
- "operationId": "mcp.add",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
- }
- ],
- "summary": "Add MCP server",
- "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
- "responses": {
- "200": {
- "description": "MCP server added successfully",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "$ref": "#/components/schemas/MCPStatus"
- }
- }
- }
- }
- },
- "400": {
- "description": "Bad request",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/BadRequestError"
+ "$ref": "#/components/schemas/SessionMessage"
}
}
}
}
},
+ "description": "Create a v2 session message and queue it for the agent loop.",
+ "summary": "Send v2 message",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
+ "prompt": {
+ "$ref": "#/components/schemas/Prompt"
},
- "config": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/McpLocalConfig"
- },
- {
- "$ref": "#/components/schemas/McpRemoteConfig"
- }
- ]
+ "delivery": {
+ "$ref": "#/components/schemas/SessionDelivery"
}
},
- "required": ["name", "config"]
+ "required": ["prompt"],
+ "additionalProperties": false
}
}
}
@@ -6107,429 +6912,252 @@
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
}
]
}
},
- "/mcp/{name}/auth": {
+ "/api/session/{sessionID}/compact": {
"post": {
- "operationId": "mcp.auth.start",
+ "tags": ["v2"],
+ "operationId": "v2.session.compact",
"parameters": [
{
- "in": "query",
"name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
"in": "query",
- "name": "workspace",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "schema": {
- "type": "string"
- },
- "in": "path",
- "name": "name",
- "required": true
- }
- ],
- "summary": "Start MCP OAuth",
- "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
- "responses": {
- "200": {
- "description": "OAuth flow started",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "authorizationUrl": {
- "description": "URL to open in browser for authorization",
- "type": "string"
- }
- },
- "required": ["authorizationUrl"]
- }
- }
- }
- },
- "400": {
- "description": "MCP server does not support OAuth",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/McpUnsupportedOAuthError"
- }
- }
- }
- },
- "404": {
- "description": "Not found",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/NotFoundError"
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
- }
- ]
- },
- "delete": {
- "operationId": "mcp.auth.remove",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "sessionID",
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "string",
+ "pattern": "^ses.*"
},
- "in": "path",
- "name": "name",
"required": true
}
],
- "summary": "Remove MCP OAuth",
- "description": "Remove OAuth credentials for an MCP server",
"responses": {
- "200": {
- "description": "OAuth credentials removed",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "success": {
- "type": "boolean",
- "const": true
- }
- },
- "required": ["success"]
- }
- }
- }
- },
- "404": {
- "description": "Not found",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/NotFoundError"
- }
- }
- }
+ "204": {
+ "description": "<No Content>"
}
},
+ "description": "Compact a v2 session conversation.",
+ "summary": "Compact v2 session",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
}
]
}
},
- "/mcp/{name}/auth/callback": {
+ "/api/session/{sessionID}/wait": {
"post": {
- "operationId": "mcp.auth.callback",
+ "tags": ["v2"],
+ "operationId": "v2.session.wait",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "sessionID",
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "string",
+ "pattern": "^ses.*"
},
- "in": "path",
- "name": "name",
"required": true
}
],
- "summary": "Complete MCP OAuth",
- "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
"responses": {
- "200": {
- "description": "OAuth authentication completed",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/MCPStatus"
- }
- }
- }
- },
- "400": {
- "description": "Bad request",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/BadRequestError"
- }
- }
- }
- },
- "404": {
- "description": "Not found",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/NotFoundError"
- }
- }
- }
- }
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "code": {
- "description": "Authorization code from OAuth callback",
- "type": "string"
- }
- },
- "required": ["code"]
- }
- }
+ "204": {
+ "description": "<No Content>"
}
},
+ "description": "Wait for a v2 session agent loop to become idle.",
+ "summary": "Wait for v2 session",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
}
]
}
},
- "/mcp/{name}/auth/authenticate": {
- "post": {
- "operationId": "mcp.auth.authenticate",
+ "/api/session/{sessionID}/context": {
+ "get": {
+ "tags": ["v2"],
+ "operationId": "v2.session.context",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "sessionID",
+ "in": "path",
"schema": {
- "type": "string"
+ "type": "string",
+ "pattern": "^ses.*"
},
- "in": "path",
- "name": "name",
"required": true
}
],
- "summary": "Authenticate MCP OAuth",
- "description": "Start OAuth flow and wait for callback (opens browser)",
"responses": {
"200": {
- "description": "OAuth authentication completed",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/MCPStatus"
- }
- }
- }
- },
- "400": {
- "description": "MCP server does not support OAuth",
+ "description": "Success",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/McpUnsupportedOAuthError"
- }
- }
- }
- },
- "404": {
- "description": "Not found",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/NotFoundError"
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SessionMessage"
+ }
}
}
}
}
},
+ "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
+ "summary": "Get v2 session context",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
}
]
}
},
- "/mcp/{name}/connect": {
- "post": {
- "operationId": "mcp.connect",
+ "/api/session/{sessionID}/message": {
+ "get": {
+ "tags": ["v2 messages"],
+ "operationId": "v2.session.messages",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
+ "name": "sessionID",
"in": "path",
- "name": "name",
"schema": {
- "type": "string"
+ "type": "string",
+ "pattern": "^ses.*"
},
"required": true
}
],
- "description": "Connect an MCP server",
"responses": {
"200": {
- "description": "MCP server connected successfully",
+ "description": "V2SessionMessagesResponse",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "$ref": "#/components/schemas/V2SessionMessagesResponse"
}
}
}
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
- }
- ]
- }
- },
- "/mcp/{name}/disconnect": {
- "post": {
- "operationId": "mcp.disconnect",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
},
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "path",
- "name": "name",
- "schema": {
- "type": "string"
- },
- "required": true
- }
- ],
- "description": "Disconnect an MCP server",
- "responses": {
- "200": {
- "description": "MCP server disconnected successfully",
+ "400": {
+ "description": "Bad request",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "$ref": "#/components/schemas/BadRequestError"
}
}
}
}
},
+ "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
+ "summary": "Get v2 session messages",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
}
]
}
},
"/tui/append-prompt": {
"post": {
+ "tags": ["tui"],
"operationId": "tui.appendPrompt",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Append TUI prompt",
- "description": "Append prompt to the TUI",
"responses": {
"200": {
"description": "Prompt processed successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Prompt processed successfully"
}
}
}
@@ -6545,6 +7173,8 @@
}
}
},
+ "description": "Append prompt to the TUI.",
+ "summary": "Append TUI prompt",
"requestBody": {
"content": {
"application/json": {
@@ -6555,7 +7185,8 @@
"type": "string"
}
},
- "required": ["text"]
+ "required": ["text"],
+ "additionalProperties": false
}
}
}
@@ -6570,37 +7201,41 @@
},
"/tui/open-help": {
"post": {
+ "tags": ["tui"],
"operationId": "tui.openHelp",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Open help dialog",
- "description": "Open the help dialog in the TUI to display user assistance information.",
"responses": {
"200": {
"description": "Help dialog opened successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Help dialog opened successfully"
}
}
}
}
},
+ "description": "Open the help dialog in the TUI to display user assistance information.",
+ "summary": "Open help dialog",
"x-codeSamples": [
{
"lang": "js",
@@ -6611,37 +7246,41 @@
},
"/tui/open-sessions": {
"post": {
+ "tags": ["tui"],
"operationId": "tui.openSessions",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Open sessions dialog",
- "description": "Open the session dialog",
"responses": {
"200": {
"description": "Session dialog opened successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Session dialog opened successfully"
}
}
}
}
},
+ "description": "Open the session dialog.",
+ "summary": "Open sessions dialog",
"x-codeSamples": [
{
"lang": "js",
@@ -6652,37 +7291,41 @@
},
"/tui/open-themes": {
"post": {
+ "tags": ["tui"],
"operationId": "tui.openThemes",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Open themes dialog",
- "description": "Open the theme dialog",
"responses": {
"200": {
"description": "Theme dialog opened successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Theme dialog opened successfully"
}
}
}
}
},
+ "description": "Open the theme dialog.",
+ "summary": "Open themes dialog",
"x-codeSamples": [
{
"lang": "js",
@@ -6693,37 +7336,41 @@
},
"/tui/open-models": {
"post": {
+ "tags": ["tui"],
"operationId": "tui.openModels",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Open models dialog",
- "description": "Open the model dialog",
"responses": {
"200": {
"description": "Model dialog opened successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Model dialog opened successfully"
}
}
}
}
},
+ "description": "Open the model dialog.",
+ "summary": "Open models dialog",
"x-codeSamples": [
{
"lang": "js",
@@ -6734,37 +7381,41 @@
},
"/tui/submit-prompt": {
"post": {
+ "tags": ["tui"],
"operationId": "tui.submitPrompt",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Submit TUI prompt",
- "description": "Submit the prompt",
"responses": {
"200": {
"description": "Prompt submitted successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Prompt submitted successfully"
}
}
}
}
},
+ "description": "Submit the prompt.",
+ "summary": "Submit TUI prompt",
"x-codeSamples": [
{
"lang": "js",
@@ -6775,37 +7426,41 @@
},
"/tui/clear-prompt": {
"post": {
+ "tags": ["tui"],
"operationId": "tui.clearPrompt",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Clear TUI prompt",
- "description": "Clear the prompt",
"responses": {
"200": {
"description": "Prompt cleared successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Prompt cleared successfully"
}
}
}
}
},
+ "description": "Clear the prompt.",
+ "summary": "Clear TUI prompt",
"x-codeSamples": [
{
"lang": "js",
@@ -6816,32 +7471,34 @@
},
"/tui/execute-command": {
"post": {
+ "tags": ["tui"],
"operationId": "tui.executeCommand",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Execute TUI command",
- "description": "Execute a TUI command (e.g. agent_cycle)",
"responses": {
"200": {
"description": "Command executed successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Command executed successfully"
}
}
}
@@ -6857,6 +7514,8 @@
}
}
},
+ "description": "Execute a TUI command.",
+ "summary": "Execute TUI command",
"requestBody": {
"content": {
"application/json": {
@@ -6867,7 +7526,8 @@
"type": "string"
}
},
- "required": ["command"]
+ "required": ["command"],
+ "additionalProperties": false
}
}
}
@@ -6882,37 +7542,41 @@
},
"/tui/show-toast": {
"post": {
+ "tags": ["tui"],
"operationId": "tui.showToast",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Show TUI toast",
- "description": "Show a toast notification in the TUI",
"responses": {
"200": {
"description": "Toast notification shown successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Toast notification shown successfully"
}
}
}
}
},
+ "description": "Show a toast notification in the TUI.",
+ "summary": "Show TUI toast",
"requestBody": {
"content": {
"application/json": {
@@ -6930,13 +7594,12 @@
"enum": ["info", "success", "warning", "error"]
},
"duration": {
- "description": "Duration in milliseconds",
"type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
+ "exclusiveMinimum": 0
}
},
- "required": ["message", "variant"]
+ "required": ["message", "variant"],
+ "additionalProperties": false
}
}
}
@@ -6951,32 +7614,34 @@
},
"/tui/publish": {
"post": {
+ "tags": ["tui"],
"operationId": "tui.publish",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Publish TUI event",
- "description": "Publish a TUI event",
"responses": {
"200": {
"description": "Event published successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Event published successfully"
}
}
}
@@ -6992,22 +7657,24 @@
}
}
},
+ "description": "Publish a TUI event.",
+ "summary": "Publish TUI event",
"requestBody": {
"content": {
"application/json": {
"schema": {
"anyOf": [
{
- "$ref": "#/components/schemas/Event.tui.prompt.append"
+ "$ref": "#/components/schemas/EventTuiPromptAppend"
},
{
- "$ref": "#/components/schemas/Event.tui.command.execute"
+ "$ref": "#/components/schemas/EventTuiCommandExecute"
},
{
- "$ref": "#/components/schemas/Event.tui.toast.show"
+ "$ref": "#/components/schemas/EventTuiToastShow"
},
{
- "$ref": "#/components/schemas/Event.tui.session.select"
+ "$ref": "#/components/schemas/EventTuiSessionSelect"
}
]
}
@@ -7024,32 +7691,34 @@
},
"/tui/select-session": {
"post": {
+ "tags": ["tui"],
"operationId": "tui.selectSession",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Select session",
- "description": "Navigate the TUI to display the specified session.",
"responses": {
"200": {
"description": "Session selected successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Session selected successfully"
}
}
}
@@ -7075,6 +7744,8 @@
}
}
},
+ "description": "Navigate the TUI to display the specified session.",
+ "summary": "Select session",
"requestBody": {
"content": {
"application/json": {
@@ -7082,12 +7753,12 @@
"type": "object",
"properties": {
"sessionID": {
- "description": "Session ID to navigate to",
"type": "string",
- "pattern": "^ses.*"
+ "description": "Session ID to navigate to"
}
},
- "required": ["sessionID"]
+ "required": ["sessionID"],
+ "additionalProperties": false
}
}
}
@@ -7102,25 +7773,26 @@
},
"/tui/control/next": {
"get": {
+ "tags": ["tui"],
"operationId": "tui.control.next",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Get next TUI request",
- "description": "Retrieve the next TUI (Terminal User Interface) request from the queue for processing.",
"responses": {
"200": {
"description": "Next TUI request",
@@ -7134,12 +7806,16 @@
},
"body": {}
},
- "required": ["path", "body"]
+ "required": ["path", "body"],
+ "additionalProperties": false,
+ "description": "Next TUI request"
}
}
}
}
},
+ "description": "Retrieve the next TUI request from the queue for processing.",
+ "summary": "Get next TUI request",
"x-codeSamples": [
{
"lang": "js",
@@ -7150,37 +7826,41 @@
},
"/tui/control/response": {
"post": {
+ "tags": ["tui"],
"operationId": "tui.control.response",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Submit TUI response",
- "description": "Submit a response to the TUI request queue to complete a pending request.",
"responses": {
"200": {
"description": "Response submitted successfully",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "description": "Response submitted successfully"
}
}
}
}
},
+ "description": "Submit a response to the TUI request queue to complete a pending request.",
+ "summary": "Submit TUI response",
"requestBody": {
"content": {
"application/json": {
@@ -7196,413 +7876,474 @@
]
}
},
- "/instance/dispose": {
- "post": {
- "operationId": "instance.dispose",
+ "/experimental/workspace/adapter": {
+ "get": {
+ "tags": ["workspace"],
+ "operationId": "experimental.workspace.adapter.list",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Dispose instance",
- "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
"responses": {
"200": {
- "description": "Instance disposed",
+ "description": "Workspace adapters",
"content": {
"application/json": {
"schema": {
- "type": "boolean"
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "required": ["type", "name", "description"],
+ "additionalProperties": false
+ },
+ "description": "Workspace adapters"
}
}
}
}
},
+ "description": "List all available workspace adapters for the current project.",
+ "summary": "List workspace adapters",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
}
]
}
},
- "/path": {
+ "/experimental/workspace": {
"get": {
- "operationId": "path.get",
+ "tags": ["workspace"],
+ "operationId": "experimental.workspace.list",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Get paths",
- "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
"responses": {
"200": {
- "description": "Path",
+ "description": "Workspaces",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Path"
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Workspace"
+ },
+ "description": "Workspaces"
}
}
}
}
},
+ "description": "List all workspaces.",
+ "summary": "List workspaces",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
}
]
- }
- },
- "/vcs": {
- "get": {
- "operationId": "vcs.get",
+ },
+ "post": {
+ "tags": ["workspace"],
+ "operationId": "experimental.workspace.create",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "Get VCS info",
- "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
"responses": {
"200": {
- "description": "VCS info",
+ "description": "Workspace created",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/VcsInfo"
+ "$ref": "#/components/schemas/Workspace"
}
}
}
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
- }
- ]
- }
- },
- "/vcs/diff": {
- "get": {
- "operationId": "vcs.diff",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
- },
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
},
- {
- "in": "query",
- "name": "mode",
- "schema": {
- "type": "string",
- "enum": ["git", "branch"]
- },
- "required": true
- }
- ],
- "summary": "Get VCS diff",
- "description": "Retrieve the current git diff for the working tree or against the default branch.",
- "responses": {
- "200": {
- "description": "VCS diff",
+ "400": {
+ "description": "Bad request",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/VcsFileDiff"
- }
+ "$ref": "#/components/schemas/BadRequestError"
}
}
}
}
},
+ "description": "Create a workspace for the current project.",
+ "summary": "Create workspace",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "branch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "extra": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": ["type", "branch"],
+ "additionalProperties": false
+ }
+ }
+ }
+ },
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
}
]
}
},
- "/command": {
+ "/experimental/workspace/status": {
"get": {
- "operationId": "command.list",
+ "tags": ["workspace"],
+ "operationId": "experimental.workspace.status",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
}
],
- "summary": "List commands",
- "description": "Get a list of all available commands in the OpenCode system.",
"responses": {
"200": {
- "description": "List of commands",
+ "description": "Workspace status",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/Command"
- }
+ "type": "object",
+ "properties": {
+ "workspaceID": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string",
+ "enum": ["connected", "connecting", "disconnected", "error"]
+ }
+ },
+ "required": ["workspaceID", "status"],
+ "additionalProperties": false
+ },
+ "description": "Workspace status"
}
}
}
}
},
+ "description": "Get connection status for workspaces in the current project.",
+ "summary": "Workspace status",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
}
]
}
},
- "/agent": {
- "get": {
- "operationId": "app.agents",
+ "/experimental/workspace/{id}": {
+ "delete": {
+ "tags": ["workspace"],
+ "operationId": "experimental.workspace.remove",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "id",
+ "in": "path",
+ "schema": {
+ "type": "string",
+ "pattern": "^wrk.*"
+ },
+ "required": true
}
],
- "summary": "List agents",
- "description": "Get a list of all available AI agents in the OpenCode system.",
"responses": {
"200": {
- "description": "List of agents",
+ "description": "Workspace removed",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Agent"
- }
+ "$ref": "#/components/schemas/Workspace"
}
}
}
- }
- },
- "x-codeSamples": [
- {
- "lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
- }
- ]
- }
- },
- "/skill": {
- "get": {
- "operationId": "app.skills",
- "parameters": [
- {
- "in": "query",
- "name": "directory",
- "schema": {
- "type": "string"
- }
},
- {
- "in": "query",
- "name": "workspace",
- "schema": {
- "type": "string"
- }
- }
- ],
- "summary": "List skills",
- "description": "Get a list of all available skills in the OpenCode system.",
- "responses": {
- "200": {
- "description": "List of skills",
+ "400": {
+ "description": "Bad request",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "location": {
- "type": "string"
- },
- "content": {
- "type": "string"
- }
- },
- "required": ["name", "description", "location", "content"]
- }
+ "$ref": "#/components/schemas/BadRequestError"
}
}
}
}
},
+ "description": "Remove an existing workspace.",
+ "summary": "Remove workspace",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
}
]
}
},
- "/lsp": {
- "get": {
- "operationId": "lsp.status",
+ "/experimental/workspace/{id}/session-restore": {
+ "post": {
+ "tags": ["workspace"],
+ "operationId": "experimental.workspace.sessionRestore",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "id",
+ "in": "path",
+ "schema": {
+ "type": "string",
+ "pattern": "^wrk.*"
+ },
+ "required": true
}
],
- "summary": "Get LSP status",
- "description": "Get LSP server status",
"responses": {
"200": {
- "description": "LSP server status",
+ "description": "Session replay started",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/LSPStatus"
- }
+ "type": "object",
+ "properties": {
+ "total": {
+ "type": "integer",
+ "minimum": 0
+ }
+ },
+ "required": ["total"],
+ "additionalProperties": false,
+ "description": "Session replay started"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
}
}
}
}
},
+ "description": "Replay a session's sync events into the target workspace in batches.",
+ "summary": "Restore session into workspace",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "sessionID": {
+ "type": "string"
+ }
+ },
+ "required": ["sessionID"],
+ "additionalProperties": false
+ }
+ }
+ }
+ },
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.sessionRestore({\n ...\n})"
}
]
}
},
- "/formatter": {
+ "/pty/{ptyID}/connect": {
"get": {
- "operationId": "formatter.status",
+ "tags": ["pty"],
+ "operationId": "pty.connect",
"parameters": [
{
- "in": "query",
"name": "directory",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
},
{
- "in": "query",
"name": "workspace",
+ "in": "query",
+ "required": false,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "ptyID",
+ "in": "path",
+ "schema": {
+ "type": "string",
+ "pattern": "^pty.*"
+ },
+ "required": true
}
],
- "summary": "Get formatter status",
- "description": "Get formatter status",
"responses": {
"200": {
- "description": "Formatter status",
+ "description": "Connected session",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/FormatterStatus"
- }
+ "type": "boolean",
+ "description": "Connected session"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundError"
}
}
}
}
},
+ "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
+ "summary": "Connect to PTY session",
"x-codeSamples": [
{
"lang": "js",
- "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
}
]
}
@@ -7610,165 +8351,311 @@
},
"components": {
"schemas": {
- "Event.server.instance.disposed": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
+ "Event": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/EventServerInstanceDisposed"
},
- "type": {
- "type": "string",
- "const": "server.instance.disposed"
+ {
+ "$ref": "#/components/schemas/EventFileEdited"
},
- "properties": {
- "type": "object",
- "properties": {
- "directory": {
- "type": "string"
- }
- },
- "required": ["directory"]
+ {
+ "$ref": "#/components/schemas/EventFileWatcherUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventLspClientDiagnostics"
+ },
+ {
+ "$ref": "#/components/schemas/EventLspUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventMessagePartDelta"
+ },
+ {
+ "$ref": "#/components/schemas/EventPermissionAsked"
+ },
+ {
+ "$ref": "#/components/schemas/EventPermissionReplied"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionDiff"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionError"
+ },
+ {
+ "$ref": "#/components/schemas/EventInstallationUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventInstallationUpdate-available"
+ },
+ {
+ "$ref": "#/components/schemas/EventQuestionAsked"
+ },
+ {
+ "$ref": "#/components/schemas/EventQuestionReplied"
+ },
+ {
+ "$ref": "#/components/schemas/EventQuestionRejected"
+ },
+ {
+ "$ref": "#/components/schemas/EventTodoUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionStatus"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionIdle"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionCompacted"
+ },
+ {
+ "$ref": "#/components/schemas/Event.tui.prompt.append"
+ },
+ {
+ "$ref": "#/components/schemas/Event.tui.command.execute"
+ },
+ {
+ "$ref": "#/components/schemas/EventTuiToastShow1"
+ },
+ {
+ "$ref": "#/components/schemas/Event.tui.session.select"
+ },
+ {
+ "$ref": "#/components/schemas/EventMcpToolsChanged"
+ },
+ {
+ "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
+ },
+ {
+ "$ref": "#/components/schemas/EventCommandExecuted"
+ },
+ {
+ "$ref": "#/components/schemas/EventProjectUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventVcsBranchUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventWorkspaceReady"
+ },
+ {
+ "$ref": "#/components/schemas/EventWorkspaceFailed"
+ },
+ {
+ "$ref": "#/components/schemas/EventWorkspaceRestore"
+ },
+ {
+ "$ref": "#/components/schemas/EventWorkspaceStatus"
+ },
+ {
+ "$ref": "#/components/schemas/EventWorktreeReady"
+ },
+ {
+ "$ref": "#/components/schemas/EventWorktreeFailed"
+ },
+ {
+ "$ref": "#/components/schemas/EventPtyCreated"
+ },
+ {
+ "$ref": "#/components/schemas/EventPtyUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventPtyExited"
+ },
+ {
+ "$ref": "#/components/schemas/EventPtyDeleted"
+ },
+ {
+ "$ref": "#/components/schemas/EventMessageUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventMessageRemoved"
+ },
+ {
+ "$ref": "#/components/schemas/EventMessagePartUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventMessagePartRemoved"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionCreated"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionDeleted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextModelSwitched"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextPrompted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextSynthetic"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextShellStarted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextShellEnded"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextStepStarted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextStepEnded"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextTextStarted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextTextDelta"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextTextEnded"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolCalled"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolProgress"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolSuccess"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolError"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextRetried"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
+ },
+ {
+ "$ref": "#/components/schemas/EventServerConnected"
+ },
+ {
+ "$ref": "#/components/schemas/EventGlobalDisposed"
}
- },
- "required": ["id", "type", "properties"]
+ ]
},
- "Event.file.edited": {
+ "OAuth": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
- },
"type": {
"type": "string",
- "const": "file.edited"
+ "enum": ["oauth"]
},
- "properties": {
- "type": "object",
- "properties": {
- "file": {
- "type": "string"
- }
- },
- "required": ["file"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.file.watcher.updated": {
- "type": "object",
- "properties": {
- "id": {
+ "refresh": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "file.watcher.updated"
+ "access": {
+ "type": "string"
},
- "properties": {
- "type": "object",
- "properties": {
- "file": {
- "type": "string"
- },
- "event": {
- "type": "string",
- "enum": ["add", "change", "unlink"]
- }
- },
- "required": ["file", "event"]
+ "expires": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "accountId": {
+ "type": "string"
+ },
+ "enterpriseUrl": {
+ "type": "string"
}
},
- "required": ["id", "type", "properties"]
+ "required": ["type", "refresh", "access", "expires"],
+ "additionalProperties": false
},
- "Event.lsp.client.diagnostics": {
+ "ApiAuth": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
- },
"type": {
"type": "string",
- "const": "lsp.client.diagnostics"
+ "enum": ["api"]
},
- "properties": {
+ "key": {
+ "type": "string"
+ },
+ "metadata": {
"type": "object",
- "properties": {
- "serverID": {
- "type": "string"
- },
- "path": {
- "type": "string"
- }
- },
- "required": ["serverID", "path"]
+ "additionalProperties": {
+ "type": "string"
+ }
}
},
- "required": ["id", "type", "properties"]
+ "required": ["type", "key"],
+ "additionalProperties": false
},
- "Event.lsp.updated": {
+ "WellKnownAuth": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
- },
"type": {
"type": "string",
- "const": "lsp.updated"
+ "enum": ["wellknown"]
},
- "properties": {
- "type": "object",
- "properties": {}
+ "key": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
}
},
- "required": ["id", "type", "properties"]
+ "required": ["type", "key", "token"],
+ "additionalProperties": false
},
- "Event.message.part.delta": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
+ "Auth": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/OAuth"
},
- "type": {
- "type": "string",
- "const": "message.part.delta"
+ {
+ "$ref": "#/components/schemas/ApiAuth"
},
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "messageID": {
- "type": "string",
- "pattern": "^msg.*"
- },
- "partID": {
- "type": "string",
- "pattern": "^prt.*"
- },
- "field": {
- "type": "string"
- },
- "delta": {
- "type": "string"
- }
- },
- "required": ["sessionID", "messageID", "partID", "field", "delta"]
+ {
+ "$ref": "#/components/schemas/WellKnownAuth"
}
- },
- "required": ["id", "type", "properties"]
+ ]
},
"PermissionRequest": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^per.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"permission": {
"type": "string"
@@ -7780,11 +8667,7 @@
}
},
"metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"always": {
"type": "array",
@@ -7796,64 +8679,18 @@
"type": "object",
"properties": {
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"callID": {
"type": "string"
}
},
- "required": ["messageID", "callID"]
- }
- },
- "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"]
- },
- "Event.permission.asked": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "permission.asked"
- },
- "properties": {
- "$ref": "#/components/schemas/PermissionRequest"
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.permission.replied": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "permission.replied"
- },
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "requestID": {
- "type": "string",
- "pattern": "^per.*"
- },
- "reply": {
- "type": "string",
- "enum": ["once", "always", "reject"]
- }
- },
- "required": ["sessionID", "requestID", "reply"]
+ "required": ["messageID", "callID"],
+ "additionalProperties": false
}
},
- "required": ["id", "type", "properties"]
+ "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
+ "additionalProperties": false
},
"SnapshotFileDiff": {
"type": "object",
@@ -7866,56 +8703,26 @@
},
"additions": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"deletions": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"status": {
"type": "string",
"enum": ["added", "deleted", "modified"]
}
},
- "required": ["file", "patch", "additions", "deletions"]
- },
- "Event.session.diff": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "session.diff"
- },
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "diff": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/SnapshotFileDiff"
- }
- }
- },
- "required": ["sessionID", "diff"]
- }
- },
- "required": ["id", "type", "properties"]
+ "required": ["file", "patch", "additions", "deletions"],
+ "additionalProperties": false
},
"ProviderAuthError": {
"type": "object",
"properties": {
"name": {
"type": "string",
- "const": "ProviderAuthError"
+ "enum": ["ProviderAuthError"]
},
"data": {
"type": "object",
@@ -7927,17 +8734,19 @@
"type": "string"
}
},
- "required": ["providerID", "message"]
+ "required": ["providerID", "message"],
+ "additionalProperties": false
}
},
- "required": ["name", "data"]
+ "required": ["name", "data"],
+ "additionalProperties": false
},
"UnknownError": {
"type": "object",
"properties": {
"name": {
"type": "string",
- "const": "UnknownError"
+ "enum": ["UnknownError"]
},
"data": {
"type": "object",
@@ -7946,31 +8755,34 @@
"type": "string"
}
},
- "required": ["message"]
+ "required": ["message"],
+ "additionalProperties": false
}
},
- "required": ["name", "data"]
+ "required": ["name", "data"],
+ "additionalProperties": false
},
"MessageOutputLengthError": {
"type": "object",
"properties": {
"name": {
"type": "string",
- "const": "MessageOutputLengthError"
+ "enum": ["MessageOutputLengthError"]
},
"data": {
"type": "object",
"properties": {}
}
},
- "required": ["name", "data"]
+ "required": ["name", "data"],
+ "additionalProperties": false
},
"MessageAbortedError": {
"type": "object",
"properties": {
"name": {
"type": "string",
- "const": "MessageAbortedError"
+ "enum": ["MessageAbortedError"]
},
"data": {
"type": "object",
@@ -7979,17 +8791,19 @@
"type": "string"
}
},
- "required": ["message"]
+ "required": ["message"],
+ "additionalProperties": false
}
},
- "required": ["name", "data"]
+ "required": ["name", "data"],
+ "additionalProperties": false
},
"StructuredOutputError": {
"type": "object",
"properties": {
"name": {
"type": "string",
- "const": "StructuredOutputError"
+ "enum": ["StructuredOutputError"]
},
"data": {
"type": "object",
@@ -7999,21 +8813,22 @@
},
"retries": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["message", "retries"]
+ "required": ["message", "retries"],
+ "additionalProperties": false
}
},
- "required": ["name", "data"]
+ "required": ["name", "data"],
+ "additionalProperties": false
},
"ContextOverflowError": {
"type": "object",
"properties": {
"name": {
"type": "string",
- "const": "ContextOverflowError"
+ "enum": ["ContextOverflowError"]
},
"data": {
"type": "object",
@@ -8025,17 +8840,19 @@
"type": "string"
}
},
- "required": ["message"]
+ "required": ["message"],
+ "additionalProperties": false
}
},
- "required": ["name", "data"]
+ "required": ["name", "data"],
+ "additionalProperties": false
},
"APIError": {
"type": "object",
"properties": {
"name": {
"type": "string",
- "const": "APIError"
+ "enum": ["APIError"]
},
"data": {
"type": "object",
@@ -8045,17 +8862,13 @@
},
"statusCode": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"isRetryable": {
"type": "boolean"
},
"responseHeaders": {
"type": "object",
- "propertyNames": {
- "type": "string"
- },
"additionalProperties": {
"type": "string"
}
@@ -8065,205 +8878,96 @@
},
"metadata": {
"type": "object",
- "propertyNames": {
- "type": "string"
- },
"additionalProperties": {
"type": "string"
}
}
},
- "required": ["message", "isRetryable"]
- }
- },
- "required": ["name", "data"]
- },
- "Event.session.error": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "session.error"
- },
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "error": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/ProviderAuthError"
- },
- {
- "$ref": "#/components/schemas/UnknownError"
- },
- {
- "$ref": "#/components/schemas/MessageOutputLengthError"
- },
- {
- "$ref": "#/components/schemas/MessageAbortedError"
- },
- {
- "$ref": "#/components/schemas/StructuredOutputError"
- },
- {
- "$ref": "#/components/schemas/ContextOverflowError"
- },
- {
- "$ref": "#/components/schemas/APIError"
- }
- ]
- }
- }
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.installation.updated": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "installation.updated"
- },
- "properties": {
- "type": "object",
- "properties": {
- "version": {
- "type": "string"
- }
- },
- "required": ["version"]
+ "required": ["message", "isRetryable"],
+ "additionalProperties": false
}
},
- "required": ["id", "type", "properties"]
- },
- "Event.installation.update-available": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "installation.update-available"
- },
- "properties": {
- "type": "object",
- "properties": {
- "version": {
- "type": "string"
- }
- },
- "required": ["version"]
- }
- },
- "required": ["id", "type", "properties"]
+ "required": ["name", "data"],
+ "additionalProperties": false
},
"QuestionOption": {
"type": "object",
"properties": {
"label": {
- "description": "Display text (1-5 words, concise)",
- "type": "string"
+ "type": "string",
+ "description": "Display text (1-5 words, concise)"
},
"description": {
- "description": "Explanation of choice",
- "type": "string"
+ "type": "string",
+ "description": "Explanation of choice"
}
},
- "required": ["label", "description"]
+ "required": ["label", "description"],
+ "additionalProperties": false
},
"QuestionInfo": {
"type": "object",
"properties": {
"question": {
- "description": "Complete question",
- "type": "string"
+ "type": "string",
+ "description": "Complete question"
},
"header": {
- "description": "Very short label (max 30 chars)",
- "type": "string"
+ "type": "string",
+ "description": "Very short label (max 30 chars)"
},
"options": {
- "description": "Available choices",
"type": "array",
"items": {
"$ref": "#/components/schemas/QuestionOption"
- }
+ },
+ "description": "Available choices"
},
"multiple": {
- "description": "Allow selecting multiple choices",
"type": "boolean"
},
"custom": {
- "description": "Allow typing a custom answer (default: true)",
"type": "boolean"
}
},
- "required": ["question", "header", "options"]
+ "required": ["question", "header", "options"],
+ "additionalProperties": false
},
"QuestionTool": {
"type": "object",
"properties": {
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"callID": {
"type": "string"
}
},
- "required": ["messageID", "callID"]
+ "required": ["messageID", "callID"],
+ "additionalProperties": false
},
"QuestionRequest": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^que.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"questions": {
- "description": "Questions to ask",
"type": "array",
"items": {
"$ref": "#/components/schemas/QuestionInfo"
- }
+ },
+ "description": "Questions to ask"
},
"tool": {
"$ref": "#/components/schemas/QuestionTool"
}
},
- "required": ["id", "sessionID", "questions"]
- },
- "Event.question.asked": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "question.asked"
- },
- "properties": {
- "$ref": "#/components/schemas/QuestionRequest"
- }
- },
- "required": ["id", "type", "properties"]
+ "required": ["id", "sessionID", "questions"],
+ "additionalProperties": false
},
"QuestionAnswer": {
"type": "array",
@@ -8275,12 +8979,10 @@
"type": "object",
"properties": {
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"requestID": {
- "type": "string",
- "pattern": "^que.*"
+ "type": "string"
},
"answers": {
"type": "array",
@@ -8289,100 +8991,40 @@
}
}
},
- "required": ["sessionID", "requestID", "answers"]
- },
- "Event.question.replied": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "question.replied"
- },
- "properties": {
- "$ref": "#/components/schemas/QuestionReplied"
- }
- },
- "required": ["id", "type", "properties"]
+ "required": ["sessionID", "requestID", "answers"],
+ "additionalProperties": false
},
"QuestionRejected": {
"type": "object",
"properties": {
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"requestID": {
- "type": "string",
- "pattern": "^que.*"
- }
- },
- "required": ["sessionID", "requestID"]
- },
- "Event.question.rejected": {
- "type": "object",
- "properties": {
- "id": {
"type": "string"
- },
- "type": {
- "type": "string",
- "const": "question.rejected"
- },
- "properties": {
- "$ref": "#/components/schemas/QuestionRejected"
}
},
- "required": ["id", "type", "properties"]
+ "required": ["sessionID", "requestID"],
+ "additionalProperties": false
},
"Todo": {
"type": "object",
"properties": {
"content": {
- "description": "Brief description of the task",
- "type": "string"
+ "type": "string",
+ "description": "Brief description of the task"
},
"status": {
- "description": "Current status of the task: pending, in_progress, completed, cancelled",
- "type": "string"
+ "type": "string",
+ "description": "Current status of the task: pending, in_progress, completed, cancelled"
},
"priority": {
- "description": "Priority level of the task: high, medium, low",
- "type": "string"
- }
- },
- "required": ["content", "status", "priority"]
- },
- "Event.todo.updated": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
"type": "string",
- "const": "todo.updated"
- },
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "todos": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Todo"
- }
- }
- },
- "required": ["sessionID", "todos"]
+ "description": "Priority level of the task: high, medium, low"
}
},
- "required": ["id", "type", "properties"]
+ "required": ["content", "status", "priority"],
+ "additionalProperties": false
},
"SessionStatus": {
"anyOf": [
@@ -8391,96 +9033,48 @@
"properties": {
"type": {
"type": "string",
- "const": "idle"
+ "enum": ["idle"]
}
},
- "required": ["type"]
+ "required": ["type"],
+ "additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "retry"
+ "enum": ["retry"]
},
"attempt": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"message": {
"type": "string"
},
"next": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["type", "attempt", "message", "next"]
+ "required": ["type", "attempt", "message", "next"],
+ "additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "busy"
+ "enum": ["busy"]
}
},
- "required": ["type"]
+ "required": ["type"],
+ "additionalProperties": false
}
]
},
- "Event.session.status": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "session.status"
- },
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "status": {
- "$ref": "#/components/schemas/SessionStatus"
- }
- },
- "required": ["sessionID", "status"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.session.idle": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "session.idle"
- },
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- }
- },
- "required": ["sessionID"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.session.compacted": {
+ "Event.tui.prompt.append": {
"type": "object",
"properties": {
"id": {
@@ -8488,27 +9082,7 @@
},
"type": {
"type": "string",
- "const": "session.compacted"
- },
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- }
- },
- "required": ["sessionID"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.tui.prompt.append": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "tui.prompt.append"
+ "enum": ["tui.prompt.append"]
},
"properties": {
"type": "object",
@@ -8517,17 +9091,22 @@
"type": "string"
}
},
- "required": ["text"]
+ "required": ["text"],
+ "additionalProperties": false
}
},
- "required": ["type", "properties"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
"Event.tui.command.execute": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string"
+ },
"type": {
"type": "string",
- "const": "tui.command.execute"
+ "enum": ["tui.command.execute"]
},
"properties": {
"type": "object",
@@ -8561,17 +9140,22 @@
]
}
},
- "required": ["command"]
+ "required": ["command"],
+ "additionalProperties": false
}
},
- "required": ["type", "properties"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
"Event.tui.toast.show": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string"
+ },
"type": {
"type": "string",
- "const": "tui.toast.show"
+ "enum": ["tui.toast.show"]
},
"properties": {
"type": "object",
@@ -8587,117 +9171,41 @@
"enum": ["info", "success", "warning", "error"]
},
"duration": {
- "description": "Duration in milliseconds",
"type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
+ "exclusiveMinimum": 0
}
},
- "required": ["message", "variant"]
+ "required": ["message", "variant"],
+ "additionalProperties": false
}
},
- "required": ["type", "properties"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
"Event.tui.session.select": {
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "const": "tui.session.select"
- },
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "description": "Session ID to navigate to",
- "type": "string",
- "pattern": "^ses.*"
- }
- },
- "required": ["sessionID"]
- }
- },
- "required": ["type", "properties"]
- },
- "Event.mcp.tools.changed": {
- "type": "object",
- "properties": {
"id": {
"type": "string"
},
"type": {
"type": "string",
- "const": "mcp.tools.changed"
+ "enum": ["tui.session.select"]
},
"properties": {
"type": "object",
"properties": {
- "server": {
- "type": "string"
- }
- },
- "required": ["server"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.mcp.browser.open.failed": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "mcp.browser.open.failed"
- },
- "properties": {
- "type": "object",
- "properties": {
- "mcpName": {
- "type": "string"
- },
- "url": {
- "type": "string"
- }
- },
- "required": ["mcpName", "url"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.command.executed": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "command.executed"
- },
- "properties": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
"sessionID": {
"type": "string",
- "pattern": "^ses.*"
- },
- "arguments": {
- "type": "string"
- },
- "messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "description": "Session ID to navigate to"
}
},
- "required": ["name", "sessionID", "arguments", "messageID"]
+ "required": ["sessionID"],
+ "additionalProperties": false
}
},
- "required": ["id", "type", "properties"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
"Project": {
"type": "object",
@@ -8710,7 +9218,7 @@
},
"vcs": {
"type": "string",
- "const": "git"
+ "enum": ["git"]
},
"name": {
"type": "string"
@@ -8727,37 +9235,37 @@
"color": {
"type": "string"
}
- }
+ },
+ "additionalProperties": false
},
"commands": {
"type": "object",
"properties": {
"start": {
- "description": "Startup script to run when creating a new workspace (worktree)",
- "type": "string"
+ "type": "string",
+ "description": "Startup script to run when creating a new workspace (worktree)"
}
- }
+ },
+ "additionalProperties": false
},
"time": {
"type": "object",
"properties": {
"created": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"updated": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"initialized": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["created", "updated"]
+ "required": ["created", "updated"],
+ "additionalProperties": false
},
"sandboxes": {
"type": "array",
@@ -8766,206 +9274,14 @@
}
}
},
- "required": ["id", "worktree", "time", "sandboxes"]
- },
- "Event.project.updated": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "project.updated"
- },
- "properties": {
- "$ref": "#/components/schemas/Project"
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.vcs.branch.updated": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "vcs.branch.updated"
- },
- "properties": {
- "type": "object",
- "properties": {
- "branch": {
- "type": "string"
- }
- }
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.workspace.ready": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "workspace.ready"
- },
- "properties": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- }
- },
- "required": ["name"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.workspace.failed": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "workspace.failed"
- },
- "properties": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- }
- },
- "required": ["message"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.workspace.restore": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "workspace.restore"
- },
- "properties": {
- "type": "object",
- "properties": {
- "workspaceID": {
- "type": "string",
- "pattern": "^wrk.*"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "total": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- },
- "step": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- }
- },
- "required": ["workspaceID", "sessionID", "total", "step"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.workspace.status": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "workspace.status"
- },
- "properties": {
- "type": "object",
- "properties": {
- "workspaceID": {
- "type": "string",
- "pattern": "^wrk.*"
- },
- "status": {
- "type": "string",
- "enum": ["connected", "connecting", "disconnected", "error"]
- }
- },
- "required": ["workspaceID", "status"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.worktree.ready": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "worktree.ready"
- },
- "properties": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "branch": {
- "type": "string"
- }
- },
- "required": ["name", "branch"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.worktree.failed": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "worktree.failed"
- },
- "properties": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- }
- },
- "required": ["message"]
- }
- },
- "required": ["id", "type", "properties"]
+ "required": ["id", "worktree", "time", "sandboxes"],
+ "additionalProperties": false
},
"Pty": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^pty.*"
+ "type": "string"
},
"title": {
"type": "string"
@@ -8988,142 +9304,43 @@
},
"pid": {
"type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
- }
- },
- "required": ["id", "title", "command", "args", "cwd", "status", "pid"]
- },
- "Event.pty.created": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "pty.created"
- },
- "properties": {
- "type": "object",
- "properties": {
- "info": {
- "$ref": "#/components/schemas/Pty"
- }
- },
- "required": ["info"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.pty.updated": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "pty.updated"
- },
- "properties": {
- "type": "object",
- "properties": {
- "info": {
- "$ref": "#/components/schemas/Pty"
- }
- },
- "required": ["info"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.pty.exited": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "pty.exited"
- },
- "properties": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "pattern": "^pty.*"
- },
- "exitCode": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- }
- },
- "required": ["id", "exitCode"]
+ "exclusiveMinimum": 0
}
},
- "required": ["id", "type", "properties"]
- },
- "Event.pty.deleted": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "pty.deleted"
- },
- "properties": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "pattern": "^pty.*"
- }
- },
- "required": ["id"]
- }
- },
- "required": ["id", "type", "properties"]
+ "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
+ "additionalProperties": false
},
"OutputFormatText": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "text"
+ "enum": ["text"]
}
},
- "required": ["type"]
+ "required": ["type"],
+ "additionalProperties": false
},
"JSONSchema": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"OutputFormatJsonSchema": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "json_schema"
+ "enum": ["json_schema"]
},
"schema": {
"$ref": "#/components/schemas/JSONSchema"
},
"retryCount": {
- "default": 2,
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["type", "schema"]
+ "required": ["type", "schema"],
+ "additionalProperties": false
},
"OutputFormat": {
"anyOf": [
@@ -9139,27 +9356,25 @@
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"role": {
"type": "string",
- "const": "user"
+ "enum": ["user"]
},
"time": {
"type": "object",
"properties": {
"created": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["created"]
+ "required": ["created"],
+ "additionalProperties": false
},
"format": {
"$ref": "#/components/schemas/OutputFormat"
@@ -9180,7 +9395,8 @@
}
}
},
- "required": ["diffs"]
+ "required": ["diffs"],
+ "additionalProperties": false
},
"agent": {
"type": "string"
@@ -9198,53 +9414,49 @@
"type": "string"
}
},
- "required": ["providerID", "modelID"]
+ "required": ["providerID", "modelID"],
+ "additionalProperties": false
},
"system": {
"type": "string"
},
"tools": {
"type": "object",
- "propertyNames": {
- "type": "string"
- },
"additionalProperties": {
"type": "boolean"
}
}
},
- "required": ["id", "sessionID", "role", "time", "agent", "model"]
+ "required": ["id", "sessionID", "role", "time", "agent", "model"],
+ "additionalProperties": false
},
"AssistantMessage": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"role": {
"type": "string",
- "const": "assistant"
+ "enum": ["assistant"]
},
"time": {
"type": "object",
"properties": {
"created": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"completed": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["created"]
+ "required": ["created"],
+ "additionalProperties": false
},
"error": {
"anyOf": [
@@ -9272,8 +9484,7 @@
]
},
"parentID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"modelID": {
"type": "string"
@@ -9297,7 +9508,8 @@
"type": "string"
}
},
- "required": ["cwd", "root"]
+ "required": ["cwd", "root"],
+ "additionalProperties": false
},
"summary": {
"type": "boolean"
@@ -9310,42 +9522,38 @@
"properties": {
"total": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"input": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"output": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"reasoning": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"cache": {
"type": "object",
"properties": {
"read": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"write": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["read", "write"]
+ "required": ["read", "write"],
+ "additionalProperties": false
}
},
- "required": ["input", "output", "reasoning", "cache"]
+ "required": ["input", "output", "reasoning", "cache"],
+ "additionalProperties": false
},
"structured": {},
"variant": {
@@ -9368,7 +9576,8 @@
"path",
"cost",
"tokens"
- ]
+ ],
+ "additionalProperties": false
},
"Message": {
"anyOf": [
@@ -9380,77 +9589,21 @@
}
]
},
- "Event.message.updated": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "message.updated"
- },
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "info": {
- "$ref": "#/components/schemas/Message"
- }
- },
- "required": ["sessionID", "info"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.message.removed": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "message.removed"
- },
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "messageID": {
- "type": "string",
- "pattern": "^msg.*"
- }
- },
- "required": ["sessionID", "messageID"]
- }
- },
- "required": ["id", "type", "properties"]
- },
"TextPart": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "text"
+ "enum": ["text"]
},
"text": {
"type": "string"
@@ -9466,45 +9619,38 @@
"properties": {
"start": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"end": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["start"]
+ "required": ["start"],
+ "additionalProperties": false
},
"metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
}
},
- "required": ["id", "sessionID", "messageID", "type", "text"]
+ "required": ["id", "sessionID", "messageID", "type", "text"],
+ "additionalProperties": false
},
"SubtaskPart": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "subtask"
+ "enum": ["subtask"]
},
"prompt": {
"type": "string"
@@ -9525,61 +9671,56 @@
"type": "string"
}
},
- "required": ["providerID", "modelID"]
+ "required": ["providerID", "modelID"],
+ "additionalProperties": false
},
"command": {
"type": "string"
}
},
- "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"]
+ "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
+ "additionalProperties": false
},
"ReasoningPart": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "reasoning"
+ "enum": ["reasoning"]
},
"text": {
"type": "string"
},
"metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"time": {
"type": "object",
"properties": {
"start": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"end": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["start"]
+ "required": ["start"],
+ "additionalProperties": false
}
},
- "required": ["id", "sessionID", "messageID", "type", "text", "time"]
+ "required": ["id", "sessionID", "messageID", "type", "text", "time"],
+ "additionalProperties": false
},
"FilePartSourceText": {
"type": "object",
@@ -9589,16 +9730,15 @@
},
"start": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"end": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["value", "start", "end"]
+ "required": ["value", "start", "end"],
+ "additionalProperties": false
},
"FileSource": {
"type": "object",
@@ -9608,13 +9748,14 @@
},
"type": {
"type": "string",
- "const": "file"
+ "enum": ["file"]
},
"path": {
"type": "string"
}
},
- "required": ["text", "type", "path"]
+ "required": ["text", "type", "path"],
+ "additionalProperties": false
},
"Range": {
"type": "object",
@@ -9624,35 +9765,34 @@
"properties": {
"line": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"character": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["line", "character"]
+ "required": ["line", "character"],
+ "additionalProperties": false
},
"end": {
"type": "object",
"properties": {
"line": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"character": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["line", "character"]
+ "required": ["line", "character"],
+ "additionalProperties": false
}
},
- "required": ["start", "end"]
+ "required": ["start", "end"],
+ "additionalProperties": false
},
"SymbolSource": {
"type": "object",
@@ -9662,7 +9802,7 @@
},
"type": {
"type": "string",
- "const": "symbol"
+ "enum": ["symbol"]
},
"path": {
"type": "string"
@@ -9675,11 +9815,11 @@
},
"kind": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["text", "type", "path", "range", "name", "kind"]
+ "required": ["text", "type", "path", "range", "name", "kind"],
+ "additionalProperties": false
},
"ResourceSource": {
"type": "object",
@@ -9689,7 +9829,7 @@
},
"type": {
"type": "string",
- "const": "resource"
+ "enum": ["resource"]
},
"clientName": {
"type": "string"
@@ -9698,7 +9838,8 @@
"type": "string"
}
},
- "required": ["text", "type", "clientName", "uri"]
+ "required": ["text", "type", "clientName", "uri"],
+ "additionalProperties": false
},
"FilePartSource": {
"anyOf": [
@@ -9717,20 +9858,17 @@
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "file"
+ "enum": ["file"]
},
"mime": {
"type": "string"
@@ -9745,79 +9883,66 @@
"$ref": "#/components/schemas/FilePartSource"
}
},
- "required": ["id", "sessionID", "messageID", "type", "mime", "url"]
+ "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
+ "additionalProperties": false
},
"ToolStatePending": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "const": "pending"
+ "enum": ["pending"]
},
"input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"raw": {
"type": "string"
}
},
- "required": ["status", "input", "raw"]
+ "required": ["status", "input", "raw"],
+ "additionalProperties": false
},
"ToolStateRunning": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "const": "running"
+ "enum": ["running"]
},
"input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"title": {
"type": "string"
},
"metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"time": {
"type": "object",
"properties": {
"start": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["start"]
+ "required": ["start"],
+ "additionalProperties": false
}
},
- "required": ["status", "input", "time"]
+ "required": ["status", "input", "time"],
+ "additionalProperties": false
},
"ToolStateCompleted": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "const": "completed"
+ "enum": ["completed"]
},
"input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"output": {
"type": "string"
@@ -9826,32 +9951,26 @@
"type": "string"
},
"metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"time": {
"type": "object",
"properties": {
"start": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"end": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"compacted": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["start", "end"]
+ "required": ["start", "end"],
+ "additionalProperties": false
},
"attachments": {
"type": "array",
@@ -9860,50 +9979,43 @@
}
}
},
- "required": ["status", "input", "output", "title", "metadata", "time"]
+ "required": ["status", "input", "output", "title", "metadata", "time"],
+ "additionalProperties": false
},
"ToolStateError": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "const": "error"
+ "enum": ["error"]
},
"input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"error": {
"type": "string"
},
"metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"time": {
"type": "object",
"properties": {
"start": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"end": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["start", "end"]
+ "required": ["start", "end"],
+ "additionalProperties": false
}
},
- "required": ["status", "input", "error", "time"]
+ "required": ["status", "input", "error", "time"],
+ "additionalProperties": false
},
"ToolState": {
"anyOf": [
@@ -9925,20 +10037,17 @@
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "tool"
+ "enum": ["tool"]
},
"callID": {
"type": "string"
@@ -9950,58 +10059,50 @@
"$ref": "#/components/schemas/ToolState"
},
"metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
}
},
- "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"]
+ "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
+ "additionalProperties": false
},
"StepStartPart": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "step-start"
+ "enum": ["step-start"]
},
"snapshot": {
"type": "string"
}
},
- "required": ["id", "sessionID", "messageID", "type"]
+ "required": ["id", "sessionID", "messageID", "type"],
+ "additionalProperties": false
},
"StepFinishPart": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "step-finish"
+ "enum": ["step-finish"]
},
"reason": {
"type": "string"
@@ -10017,89 +10118,81 @@
"properties": {
"total": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"input": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"output": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"reasoning": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"cache": {
"type": "object",
"properties": {
"read": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"write": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["read", "write"]
+ "required": ["read", "write"],
+ "additionalProperties": false
}
},
- "required": ["input", "output", "reasoning", "cache"]
+ "required": ["input", "output", "reasoning", "cache"],
+ "additionalProperties": false
}
},
- "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"]
+ "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
+ "additionalProperties": false
},
"SnapshotPart": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "snapshot"
+ "enum": ["snapshot"]
},
"snapshot": {
"type": "string"
}
},
- "required": ["id", "sessionID", "messageID", "type", "snapshot"]
+ "required": ["id", "sessionID", "messageID", "type", "snapshot"],
+ "additionalProperties": false
},
"PatchPart": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "patch"
+ "enum": ["patch"]
},
"hash": {
"type": "string"
@@ -10111,26 +10204,24 @@
}
}
},
- "required": ["id", "sessionID", "messageID", "type", "hash", "files"]
+ "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
+ "additionalProperties": false
},
"AgentPart": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "agent"
+ "enum": ["agent"]
},
"name": {
"type": "string"
@@ -10143,43 +10234,39 @@
},
"start": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"end": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["value", "start", "end"]
+ "required": ["value", "start", "end"],
+ "additionalProperties": false
}
},
- "required": ["id", "sessionID", "messageID", "type", "name"]
+ "required": ["id", "sessionID", "messageID", "type", "name"],
+ "additionalProperties": false
},
"RetryPart": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "retry"
+ "enum": ["retry"]
},
"attempt": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"error": {
"$ref": "#/components/schemas/APIError"
@@ -10189,33 +10276,31 @@
"properties": {
"created": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["created"]
+ "required": ["created"],
+ "additionalProperties": false
}
},
- "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"]
+ "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
+ "additionalProperties": false
},
"CompactionPart": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "compaction"
+ "enum": ["compaction"]
},
"auto": {
"type": "boolean"
@@ -10224,11 +10309,11 @@
"type": "boolean"
},
"tail_start_id": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
}
},
- "required": ["id", "sessionID", "messageID", "type", "auto"]
+ "required": ["id", "sessionID", "messageID", "type", "auto"],
+ "additionalProperties": false
},
"Part": {
"anyOf": [
@@ -10270,68 +10355,6 @@
}
]
},
- "Event.message.part.updated": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "message.part.updated"
- },
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "part": {
- "$ref": "#/components/schemas/Part"
- },
- "time": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- }
- },
- "required": ["sessionID", "part", "time"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.message.part.removed": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "message.part.removed"
- },
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "messageID": {
- "type": "string",
- "pattern": "^msg.*"
- },
- "partID": {
- "type": "string",
- "pattern": "^prt.*"
- }
- },
- "required": ["sessionID", "messageID", "partID"]
- }
- },
- "required": ["id", "type", "properties"]
- },
"PermissionAction": {
"type": "string",
"enum": ["allow", "deny", "ask"]
@@ -10349,7 +10372,8 @@
"$ref": "#/components/schemas/PermissionAction"
}
},
- "required": ["permission", "pattern", "action"]
+ "required": ["permission", "pattern", "action"],
+ "additionalProperties": false
},
"PermissionRuleset": {
"type": "array",
@@ -10361,8 +10385,7 @@
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"slug": {
"type": "string"
@@ -10371,8 +10394,7 @@
"type": "string"
},
"workspaceID": {
- "type": "string",
- "pattern": "^wrk.*"
+ "type": "string"
},
"directory": {
"type": "string"
@@ -10381,26 +10403,22 @@
"type": "string"
},
"parentID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"summary": {
"type": "object",
"properties": {
"additions": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"deletions": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"files": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"diffs": {
"type": "array",
@@ -10409,7 +10427,8 @@
}
}
},
- "required": ["additions", "deletions", "files"]
+ "required": ["additions", "deletions", "files"],
+ "additionalProperties": false
},
"share": {
"type": "object",
@@ -10418,7 +10437,8 @@
"type": "string"
}
},
- "required": ["url"]
+ "required": ["url"],
+ "additionalProperties": false
},
"title": {
"type": "string"
@@ -10439,7 +10459,8 @@
"type": "string"
}
},
- "required": ["id", "providerID"]
+ "required": ["id", "providerID"],
+ "additionalProperties": false
},
"version": {
"type": "string"
@@ -10449,24 +10470,22 @@
"properties": {
"created": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"updated": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"compacting": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"archived": {
"type": "number"
}
},
- "required": ["created", "updated"]
+ "required": ["created", "updated"],
+ "additionalProperties": false
},
"permission": {
"$ref": "#/components/schemas/PermissionRuleset"
@@ -10475,12 +10494,10 @@
"type": "object",
"properties": {
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"partID": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"snapshot": {
"type": "string"
@@ -10489,938 +10506,2372 @@
"type": "string"
}
},
- "required": ["messageID"]
+ "required": ["messageID"],
+ "additionalProperties": false
}
},
- "required": ["id", "slug", "projectID", "directory", "title", "version", "time"]
+ "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
+ "additionalProperties": false
},
- "Event.session.created": {
+ "Prompt": {
"type": "object",
"properties": {
- "id": {
+ "text": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "session.created"
+ "files": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/PromptFileAttachment"
+ }
},
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "info": {
- "$ref": "#/components/schemas/Session"
- }
- },
- "required": ["sessionID", "info"]
+ "agents": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/PromptAgentAttachment"
+ }
}
},
- "required": ["id", "type", "properties"]
+ "required": ["text"],
+ "additionalProperties": false
},
- "Event.session.updated": {
+ "GlobalEvent": {
"type": "object",
"properties": {
- "id": {
+ "directory": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "session.updated"
+ "project": {
+ "type": "string"
},
- "properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "workspace": {
+ "type": "string"
+ },
+ "payload": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/EventServerInstanceDisposed"
},
- "info": {
- "$ref": "#/components/schemas/Session"
+ {
+ "$ref": "#/components/schemas/EventFileEdited"
+ },
+ {
+ "$ref": "#/components/schemas/EventFileWatcherUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventLspClientDiagnostics"
+ },
+ {
+ "$ref": "#/components/schemas/EventLspUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventMessagePartDelta"
+ },
+ {
+ "$ref": "#/components/schemas/EventPermissionAsked"
+ },
+ {
+ "$ref": "#/components/schemas/EventPermissionReplied"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionDiff"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionError"
+ },
+ {
+ "$ref": "#/components/schemas/EventInstallationUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventInstallationUpdate-available"
+ },
+ {
+ "$ref": "#/components/schemas/EventQuestionAsked"
+ },
+ {
+ "$ref": "#/components/schemas/EventQuestionReplied"
+ },
+ {
+ "$ref": "#/components/schemas/EventQuestionRejected"
+ },
+ {
+ "$ref": "#/components/schemas/EventTodoUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionStatus"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionIdle"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionCompacted"
+ },
+ {
+ "$ref": "#/components/schemas/Event.tui.prompt.append"
+ },
+ {
+ "$ref": "#/components/schemas/Event.tui.command.execute"
+ },
+ {
+ "$ref": "#/components/schemas/Event.tui.toast.show"
+ },
+ {
+ "$ref": "#/components/schemas/Event.tui.session.select"
+ },
+ {
+ "$ref": "#/components/schemas/EventMcpToolsChanged"
+ },
+ {
+ "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
+ },
+ {
+ "$ref": "#/components/schemas/EventCommandExecuted"
+ },
+ {
+ "$ref": "#/components/schemas/EventProjectUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventVcsBranchUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventWorkspaceReady"
+ },
+ {
+ "$ref": "#/components/schemas/EventWorkspaceFailed"
+ },
+ {
+ "$ref": "#/components/schemas/EventWorkspaceRestore"
+ },
+ {
+ "$ref": "#/components/schemas/EventWorkspaceStatus"
+ },
+ {
+ "$ref": "#/components/schemas/EventWorktreeReady"
+ },
+ {
+ "$ref": "#/components/schemas/EventWorktreeFailed"
+ },
+ {
+ "$ref": "#/components/schemas/EventPtyCreated"
+ },
+ {
+ "$ref": "#/components/schemas/EventPtyUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventPtyExited"
+ },
+ {
+ "$ref": "#/components/schemas/EventPtyDeleted"
+ },
+ {
+ "$ref": "#/components/schemas/EventMessageUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventMessageRemoved"
+ },
+ {
+ "$ref": "#/components/schemas/EventMessagePartUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventMessagePartRemoved"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionCreated"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionDeleted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextModelSwitched"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextPrompted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextSynthetic"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextShellStarted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextShellEnded"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextStepStarted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextStepEnded"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextTextStarted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextTextDelta"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextTextEnded"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolCalled"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolProgress"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolSuccess"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextToolError"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextRetried"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
+ },
+ {
+ "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
+ },
+ {
+ "$ref": "#/components/schemas/EventServerConnected"
+ },
+ {
+ "$ref": "#/components/schemas/EventGlobalDisposed"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventMessageUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventMessageRemoved"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionCreated"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionUpdated"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionDeleted"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextToolError"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextRetried"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
+ },
+ {
+ "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
}
- },
- "required": ["sessionID", "info"]
+ ]
}
},
- "required": ["id", "type", "properties"]
+ "required": ["directory", "payload"],
+ "additionalProperties": false
+ },
+ "LogLevel": {
+ "type": "string",
+ "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
+ "description": "Log level"
},
- "Event.session.deleted": {
+ "ServerConfig": {
"type": "object",
"properties": {
- "id": {
+ "port": {
+ "type": "integer",
+ "exclusiveMinimum": 0
+ },
+ "hostname": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "session.deleted"
+ "mdns": {
+ "type": "boolean"
},
- "properties": {
+ "mdnsDomain": {
+ "type": "string"
+ },
+ "cors": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "description": "Server configuration for opencode serve and web commands"
+ },
+ "PermissionActionConfig": {
+ "type": "string",
+ "enum": ["ask", "allow", "deny"]
+ },
+ "PermissionObjectConfig": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/PermissionActionConfig"
+ }
+ },
+ "PermissionRuleConfig": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/PermissionActionConfig"
+ },
+ {
+ "$ref": "#/components/schemas/PermissionObjectConfig"
+ }
+ ]
+ },
+ "PermissionConfig": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/PermissionActionConfig"
+ },
+ {
"type": "object",
"properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "read": {
+ "$ref": "#/components/schemas/PermissionRuleConfig"
},
- "info": {
- "$ref": "#/components/schemas/Session"
+ "edit": {
+ "$ref": "#/components/schemas/PermissionRuleConfig"
+ },
+ "glob": {
+ "$ref": "#/components/schemas/PermissionRuleConfig"
+ },
+ "grep": {
+ "$ref": "#/components/schemas/PermissionRuleConfig"
+ },
+ "list": {
+ "$ref": "#/components/schemas/PermissionRuleConfig"
+ },
+ "bash": {
+ "$ref": "#/components/schemas/PermissionRuleConfig"
+ },
+ "task": {
+ "$ref": "#/components/schemas/PermissionRuleConfig"
+ },
+ "external_directory": {
+ "$ref": "#/components/schemas/PermissionRuleConfig"
+ },
+ "todowrite": {
+ "$ref": "#/components/schemas/PermissionActionConfig"
+ },
+ "question": {
+ "$ref": "#/components/schemas/PermissionActionConfig"
+ },
+ "webfetch": {
+ "$ref": "#/components/schemas/PermissionActionConfig"
+ },
+ "websearch": {
+ "$ref": "#/components/schemas/PermissionActionConfig"
+ },
+ "lsp": {
+ "$ref": "#/components/schemas/PermissionRuleConfig"
+ },
+ "doom_loop": {
+ "$ref": "#/components/schemas/PermissionActionConfig"
+ },
+ "skill": {
+ "$ref": "#/components/schemas/PermissionRuleConfig"
}
},
- "required": ["sessionID", "info"]
+ "additionalProperties": {
+ "$ref": "#/components/schemas/PermissionRuleConfig"
+ }
}
- },
- "required": ["id", "type", "properties"]
+ ]
},
- "Event.session.next.agent.switched": {
+ "AgentConfig": {
"type": "object",
"properties": {
- "id": {
+ "model": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "session.next.agent.switched"
+ "variant": {
+ "type": "string"
},
- "properties": {
+ "temperature": {
+ "type": "number"
+ },
+ "top_p": {
+ "type": "number"
+ },
+ "prompt": {
+ "type": "string"
+ },
+ "tools": {
"type": "object",
- "properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
+ "additionalProperties": {
+ "type": "boolean"
+ }
+ },
+ "disable": {
+ "type": "boolean"
+ },
+ "description": {
+ "type": "string"
+ },
+ "mode": {
+ "type": "string",
+ "enum": ["subagent", "primary", "all"]
+ },
+ "hidden": {
+ "type": "boolean"
+ },
+ "options": {
+ "type": "object"
+ },
+ "color": {
+ "anyOf": [
+ {
"type": "string",
- "pattern": "^ses.*"
+ "pattern": "^#[0-9a-fA-F]{6}$"
},
- "agent": {
- "type": "string"
+ {
+ "type": "string",
+ "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
}
- },
- "required": ["timestamp", "sessionID", "agent"]
+ ],
+ "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
+ },
+ "steps": {
+ "type": "integer",
+ "exclusiveMinimum": 0
+ },
+ "maxSteps": {
+ "type": "integer",
+ "exclusiveMinimum": 0
+ },
+ "permission": {
+ "$ref": "#/components/schemas/PermissionConfig"
}
},
- "required": ["id", "type", "properties"]
+ "additionalProperties": {}
},
- "Event.session.next.model.switched": {
+ "ProviderConfig": {
"type": "object",
"properties": {
+ "api": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "env": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
"id": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "session.next.model.switched"
+ "npm": {
+ "type": "string"
},
- "properties": {
+ "whitelist": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "blacklist": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "options": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "id": {
+ "apiKey": {
"type": "string"
},
- "providerID": {
+ "baseURL": {
"type": "string"
},
- "variant": {
+ "enterpriseUrl": {
"type": "string"
+ },
+ "setCacheKey": {
+ "type": "boolean"
+ },
+ "timeout": {
+ "anyOf": [
+ {
+ "type": "integer",
+ "exclusiveMinimum": 0
+ },
+ {
+ "type": "boolean",
+ "enum": [false]
+ }
+ ],
+ "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
+ },
+ "chunkTimeout": {
+ "type": "integer",
+ "exclusiveMinimum": 0
}
},
- "required": ["timestamp", "sessionID", "id", "providerID"]
+ "additionalProperties": {}
+ },
+ "models": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "family": {
+ "type": "string"
+ },
+ "release_date": {
+ "type": "string"
+ },
+ "attachment": {
+ "type": "boolean"
+ },
+ "reasoning": {
+ "type": "boolean"
+ },
+ "temperature": {
+ "type": "boolean"
+ },
+ "tool_call": {
+ "type": "boolean"
+ },
+ "interleaved": {
+ "anyOf": [
+ {
+ "type": "boolean",
+ "enum": [true]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "type": "string",
+ "enum": ["reasoning_content", "reasoning_details"]
+ }
+ },
+ "required": ["field"],
+ "additionalProperties": false
+ }
+ ]
+ },
+ "cost": {
+ "type": "object",
+ "properties": {
+ "input": {
+ "type": "number"
+ },
+ "output": {
+ "type": "number"
+ },
+ "cache_read": {
+ "type": "number"
+ },
+ "cache_write": {
+ "type": "number"
+ },
+ "context_over_200k": {
+ "type": "object",
+ "properties": {
+ "input": {
+ "type": "number"
+ },
+ "output": {
+ "type": "number"
+ },
+ "cache_read": {
+ "type": "number"
+ },
+ "cache_write": {
+ "type": "number"
+ }
+ },
+ "required": ["input", "output"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["input", "output"],
+ "additionalProperties": false
+ },
+ "limit": {
+ "type": "object",
+ "properties": {
+ "context": {
+ "type": "number"
+ },
+ "input": {
+ "type": "number"
+ },
+ "output": {
+ "type": "number"
+ }
+ },
+ "required": ["context", "output"],
+ "additionalProperties": false
+ },
+ "modalities": {
+ "type": "object",
+ "properties": {
+ "input": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": ["text", "audio", "image", "video", "pdf"]
+ }
+ },
+ "output": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": ["text", "audio", "image", "video", "pdf"]
+ }
+ }
+ },
+ "required": ["input", "output"],
+ "additionalProperties": false
+ },
+ "experimental": {
+ "type": "boolean"
+ },
+ "status": {
+ "type": "string",
+ "enum": ["alpha", "beta", "deprecated"]
+ },
+ "provider": {
+ "type": "object",
+ "properties": {
+ "npm": {
+ "type": "string"
+ },
+ "api": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "options": {
+ "type": "object"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "variants": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "disabled": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": {}
+ },
+ "description": "Variant-specific configuration"
+ }
+ },
+ "additionalProperties": false
+ }
}
},
- "required": ["id", "type", "properties"]
+ "additionalProperties": false
},
- "Prompt.Source": {
+ "McpLocalConfig": {
"type": "object",
"properties": {
- "start": {
- "type": "number"
+ "type": {
+ "type": "string",
+ "enum": ["local"],
+ "description": "Type of MCP server connection"
},
- "end": {
- "type": "number"
+ "command": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Command and arguments to run the MCP server"
},
- "text": {
- "type": "string"
+ "environment": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "timeout": {
+ "type": "integer",
+ "exclusiveMinimum": 0
}
},
- "required": ["start", "end", "text"]
+ "required": ["type", "command"],
+ "additionalProperties": false
},
- "Prompt.FileAttachment": {
+ "McpOAuthConfig": {
"type": "object",
"properties": {
- "uri": {
+ "clientId": {
"type": "string"
},
- "mime": {
+ "clientSecret": {
"type": "string"
},
- "name": {
+ "scope": {
"type": "string"
},
- "description": {
+ "redirectUri": {
"type": "string"
- },
- "source": {
- "$ref": "#/components/schemas/Prompt.Source"
}
},
- "required": ["uri", "mime"]
+ "additionalProperties": false
},
- "Prompt.AgentAttachment": {
+ "McpRemoteConfig": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["remote"],
+ "description": "Type of MCP server connection"
},
- "source": {
- "$ref": "#/components/schemas/Prompt.Source"
+ "url": {
+ "type": "string",
+ "description": "URL of the remote MCP server"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "oauth": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/McpOAuthConfig"
+ },
+ {
+ "type": "boolean",
+ "enum": [false]
+ }
+ ],
+ "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
+ },
+ "timeout": {
+ "type": "integer",
+ "exclusiveMinimum": 0
}
},
- "required": ["name"]
+ "required": ["type", "url"],
+ "additionalProperties": false
},
- "Prompt": {
+ "LayoutConfig": {
+ "type": "string",
+ "enum": ["auto", "stretch"],
+ "description": "@deprecated Always uses stretch layout."
+ },
+ "Config": {
"type": "object",
"properties": {
- "text": {
+ "$schema": {
"type": "string"
},
- "files": {
+ "shell": {
+ "type": "string"
+ },
+ "logLevel": {
+ "$ref": "#/components/schemas/LogLevel"
+ },
+ "server": {
+ "$ref": "#/components/schemas/ServerConfig"
+ },
+ "command": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "template": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "agent": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "subtask": {
+ "type": "boolean"
+ }
+ },
+ "required": ["template"],
+ "additionalProperties": false
+ }
+ },
+ "skills": {
+ "type": "object",
+ "properties": {
+ "paths": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "urls": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "watcher": {
+ "type": "object",
+ "properties": {
+ "ignore": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "snapshot": {
+ "type": "boolean"
+ },
+ "plugin": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/Prompt.FileAttachment"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "prefixItems": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "object"
+ }
+ ],
+ "maxItems": 2,
+ "minItems": 2
+ }
+ ]
}
},
- "agents": {
+ "share": {
+ "type": "string",
+ "enum": ["manual", "auto", "disabled"]
+ },
+ "autoshare": {
+ "type": "boolean"
+ },
+ "autoupdate": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "string",
+ "enum": ["notify"]
+ }
+ ],
+ "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
+ },
+ "disabled_providers": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/Prompt.AgentAttachment"
+ "type": "string"
}
- }
- },
- "required": ["text"]
- },
- "Event.session.next.prompted": {
- "type": "object",
- "properties": {
- "id": {
+ },
+ "enabled_providers": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "model": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "session.next.prompted"
+ "small_model": {
+ "type": "string"
},
- "properties": {
+ "default_agent": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ },
+ "mode": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
+ "build": {
+ "$ref": "#/components/schemas/AgentConfig"
},
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "plan": {
+ "$ref": "#/components/schemas/AgentConfig"
+ }
+ },
+ "additionalProperties": {
+ "$ref": "#/components/schemas/AgentConfig"
+ }
+ },
+ "agent": {
+ "type": "object",
+ "properties": {
+ "plan": {
+ "$ref": "#/components/schemas/AgentConfig"
},
- "prompt": {
- "$ref": "#/components/schemas/Prompt"
+ "build": {
+ "$ref": "#/components/schemas/AgentConfig"
+ },
+ "general": {
+ "$ref": "#/components/schemas/AgentConfig"
+ },
+ "explore": {
+ "$ref": "#/components/schemas/AgentConfig"
+ },
+ "title": {
+ "$ref": "#/components/schemas/AgentConfig"
+ },
+ "summary": {
+ "$ref": "#/components/schemas/AgentConfig"
+ },
+ "compaction": {
+ "$ref": "#/components/schemas/AgentConfig"
}
},
- "required": ["timestamp", "sessionID", "prompt"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.session.next.synthetic": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
+ "additionalProperties": {
+ "$ref": "#/components/schemas/AgentConfig"
+ }
},
- "type": {
- "type": "string",
- "const": "session.next.synthetic"
+ "provider": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/ProviderConfig"
+ }
},
- "properties": {
+ "mcp": {
"type": "object",
- "properties": {
- "timestamp": {
- "type": "number"
+ "additionalProperties": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/McpLocalConfig"
+ },
+ {
+ "$ref": "#/components/schemas/McpRemoteConfig"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ }
+ },
+ "required": ["enabled"],
+ "additionalProperties": false
+ }
+ ]
+ }
+ },
+ "formatter": {
+ "anyOf": [
+ {
+ "type": "boolean"
},
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ {
+ "type": "object",
+ "additionalProperties": {
+ "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
+ }
+ }
+ ],
+ "description": "Enable or configure formatters. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
+ },
+ "lsp": {
+ "anyOf": [
+ {
+ "type": "boolean"
},
- "text": {
+ {
+ "type": "object",
+ "additionalProperties": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "disabled": {
+ "type": "boolean",
+ "enum": [true]
+ }
+ },
+ "required": ["disabled"],
+ "additionalProperties": false
+ },
+ {
+ "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
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides."
+ },
+ "instructions": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "layout": {
+ "$ref": "#/components/schemas/LayoutConfig"
+ },
+ "permission": {
+ "$ref": "#/components/schemas/PermissionConfig"
+ },
+ "tools": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "boolean"
+ }
+ },
+ "enterprise": {
+ "type": "object",
+ "properties": {
+ "url": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "text"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.session.next.shell.started": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
+ "additionalProperties": false
},
- "type": {
- "type": "string",
- "const": "session.next.shell.started"
+ "tool_output": {
+ "type": "object",
+ "properties": {
+ "max_lines": {
+ "type": "integer",
+ "exclusiveMinimum": 0
+ },
+ "max_bytes": {
+ "type": "integer",
+ "exclusiveMinimum": 0
+ }
+ },
+ "additionalProperties": false
},
- "properties": {
+ "compaction": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
+ "auto": {
+ "type": "boolean"
},
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "prune": {
+ "type": "boolean"
},
- "callID": {
- "type": "string"
+ "tail_turns": {
+ "type": "integer",
+ "minimum": 0
},
- "command": {
- "type": "string"
+ "preserve_recent_tokens": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "reserved": {
+ "type": "integer",
+ "minimum": 0
}
},
- "required": ["timestamp", "sessionID", "callID", "command"]
+ "additionalProperties": false
+ },
+ "experimental": {
+ "type": "object",
+ "properties": {
+ "disable_paste_summary": {
+ "type": "boolean"
+ },
+ "batch_tool": {
+ "type": "boolean"
+ },
+ "openTelemetry": {
+ "type": "boolean"
+ },
+ "primary_tools": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "continue_loop_on_deny": {
+ "type": "boolean"
+ },
+ "mcp_timeout": {
+ "type": "integer",
+ "exclusiveMinimum": 0
+ }
+ },
+ "additionalProperties": false
}
},
- "required": ["id", "type", "properties"]
+ "additionalProperties": false
},
- "Event.session.next.shell.ended": {
+ "Model": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "session.next.shell.ended"
+ "providerID": {
+ "type": "string"
},
- "properties": {
+ "api": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "id": {
+ "type": "string"
},
- "callID": {
+ "url": {
"type": "string"
},
- "output": {
+ "npm": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "callID", "output"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.session.next.step.started": {
- "type": "object",
- "properties": {
- "id": {
+ "required": ["id", "url", "npm"],
+ "additionalProperties": false
+ },
+ "name": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "session.next.step.started"
+ "family": {
+ "type": "string"
},
- "properties": {
+ "capabilities": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
+ "temperature": {
+ "type": "boolean"
},
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "reasoning": {
+ "type": "boolean"
},
- "agent": {
- "type": "string"
+ "attachment": {
+ "type": "boolean"
},
- "model": {
+ "toolcall": {
+ "type": "boolean"
+ },
+ "input": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
+ "text": {
+ "type": "boolean"
},
- "providerID": {
- "type": "string"
+ "audio": {
+ "type": "boolean"
},
- "variant": {
- "type": "string"
+ "image": {
+ "type": "boolean"
+ },
+ "video": {
+ "type": "boolean"
+ },
+ "pdf": {
+ "type": "boolean"
}
},
- "required": ["id", "providerID"]
+ "required": ["text", "audio", "image", "video", "pdf"],
+ "additionalProperties": false
},
- "snapshot": {
- "type": "string"
+ "output": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "boolean"
+ },
+ "audio": {
+ "type": "boolean"
+ },
+ "image": {
+ "type": "boolean"
+ },
+ "video": {
+ "type": "boolean"
+ },
+ "pdf": {
+ "type": "boolean"
+ }
+ },
+ "required": ["text", "audio", "image", "video", "pdf"],
+ "additionalProperties": false
+ },
+ "interleaved": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "field": {
+ "type": "string",
+ "enum": ["reasoning_content", "reasoning_details"]
+ }
+ },
+ "required": ["field"],
+ "additionalProperties": false
+ }
+ ]
}
},
- "required": ["timestamp", "sessionID", "agent", "model"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.session.next.step.ended": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "const": "session.next.step.ended"
+ "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
+ "additionalProperties": false
},
- "properties": {
+ "cost": {
"type": "object",
"properties": {
- "timestamp": {
+ "input": {
"type": "number"
},
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "finish": {
- "type": "string"
- },
- "cost": {
+ "output": {
"type": "number"
},
- "tokens": {
+ "cache": {
+ "type": "object",
+ "properties": {
+ "read": {
+ "type": "number"
+ },
+ "write": {
+ "type": "number"
+ }
+ },
+ "required": ["read", "write"],
+ "additionalProperties": false
+ },
+ "experimentalOver200K": {
"type": "object",
"properties": {
"input": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "type": "number"
},
"output": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- },
- "reasoning": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "type": "number"
},
"cache": {
"type": "object",
"properties": {
"read": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "type": "number"
},
"write": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "type": "number"
}
},
- "required": ["read", "write"]
+ "required": ["read", "write"],
+ "additionalProperties": false
}
},
- "required": ["input", "output", "reasoning", "cache"]
+ "required": ["input", "output", "cache"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["input", "output", "cache"],
+ "additionalProperties": false
+ },
+ "limit": {
+ "type": "object",
+ "properties": {
+ "context": {
+ "type": "number"
},
- "snapshot": {
- "type": "string"
+ "input": {
+ "type": "number"
+ },
+ "output": {
+ "type": "number"
}
},
- "required": ["timestamp", "sessionID", "finish", "cost", "tokens"]
+ "required": ["context", "output"],
+ "additionalProperties": false
+ },
+ "status": {
+ "type": "string",
+ "enum": ["alpha", "beta", "deprecated", "active"]
+ },
+ "options": {
+ "type": "object"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "release_date": {
+ "type": "string"
+ },
+ "variants": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object"
+ }
}
},
- "required": ["id", "type", "properties"]
+ "required": [
+ "id",
+ "providerID",
+ "api",
+ "name",
+ "capabilities",
+ "cost",
+ "limit",
+ "status",
+ "options",
+ "headers",
+ "release_date"
+ ],
+ "additionalProperties": false
},
- "Event.session.next.text.started": {
+ "Provider": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "type": {
+ "name": {
+ "type": "string"
+ },
+ "source": {
"type": "string",
- "const": "session.next.text.started"
+ "enum": ["env", "config", "custom", "api"]
},
- "properties": {
+ "env": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "key": {
+ "type": "string"
+ },
+ "options": {
+ "type": "object"
+ },
+ "models": {
"type": "object",
- "properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- }
- },
- "required": ["timestamp", "sessionID"]
+ "additionalProperties": {
+ "$ref": "#/components/schemas/Model"
+ }
}
},
- "required": ["id", "type", "properties"]
+ "required": ["id", "name", "source", "env", "options", "models"],
+ "additionalProperties": false
},
- "Event.session.next.text.delta": {
+ "ConsoleState": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
+ "consoleManagedProviders": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
},
- "type": {
- "type": "string",
- "const": "session.next.text.delta"
+ "activeOrgName": {
+ "type": "string"
},
- "properties": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "delta": {
- "type": "string"
- }
- },
- "required": ["timestamp", "sessionID", "delta"]
+ "switchableOrgCount": {
+ "type": "integer",
+ "minimum": 0
}
},
- "required": ["id", "type", "properties"]
+ "required": ["consoleManagedProviders", "switchableOrgCount"],
+ "additionalProperties": false
},
- "Event.session.next.text.ended": {
+ "ToolListItem": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "type": {
+ "description": {
+ "type": "string"
+ },
+ "parameters": {}
+ },
+ "required": ["id", "description", "parameters"],
+ "additionalProperties": false
+ },
+ "ToolList": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ToolListItem"
+ }
+ },
+ "ToolIDs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "WorktreeCreateInput": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "startCommand": {
"type": "string",
- "const": "session.next.text.ended"
+ "description": "Additional startup script to run after the project's start command"
+ }
+ },
+ "additionalProperties": false
+ },
+ "Worktree": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
},
- "properties": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "text": {
- "type": "string"
- }
- },
- "required": ["timestamp", "sessionID", "text"]
+ "branch": {
+ "type": "string"
+ },
+ "directory": {
+ "type": "string"
+ }
+ },
+ "required": ["name", "branch", "directory"],
+ "additionalProperties": false
+ },
+ "WorktreeRemoveInput": {
+ "type": "object",
+ "properties": {
+ "directory": {
+ "type": "string"
+ }
+ },
+ "required": ["directory"],
+ "additionalProperties": false
+ },
+ "WorktreeResetInput": {
+ "type": "object",
+ "properties": {
+ "directory": {
+ "type": "string"
}
},
- "required": ["id", "type", "properties"]
+ "required": ["directory"],
+ "additionalProperties": false
},
- "Event.session.next.reasoning.started": {
+ "ProjectSummary": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "session.next.reasoning.started"
+ "name": {
+ "type": "string"
},
- "properties": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "reasoningID": {
- "type": "string"
- }
- },
- "required": ["timestamp", "sessionID", "reasoningID"]
+ "worktree": {
+ "type": "string"
}
},
- "required": ["id", "type", "properties"]
+ "required": ["id", "worktree"],
+ "additionalProperties": false
},
- "Event.session.next.reasoning.delta": {
+ "GlobalSession": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "session.next.reasoning.delta"
+ "slug": {
+ "type": "string"
},
- "properties": {
+ "projectID": {
+ "type": "string"
+ },
+ "workspaceID": {
+ "type": "string"
+ },
+ "directory": {
+ "type": "string"
+ },
+ "path": {
+ "type": "string"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "summary": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
+ "additions": {
+ "type": "integer",
+ "minimum": 0
},
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "deletions": {
+ "type": "integer",
+ "minimum": 0
},
- "reasoningID": {
- "type": "string"
+ "files": {
+ "type": "integer",
+ "minimum": 0
},
- "delta": {
+ "diffs": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SnapshotFileDiff"
+ }
+ }
+ },
+ "required": ["additions", "deletions", "files"],
+ "additionalProperties": false
+ },
+ "share": {
+ "type": "object",
+ "properties": {
+ "url": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "reasoningID", "delta"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.session.next.reasoning.ended": {
- "type": "object",
- "properties": {
- "id": {
+ "required": ["url"],
+ "additionalProperties": false
+ },
+ "title": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "session.next.reasoning.ended"
+ "agent": {
+ "type": "string"
},
- "properties": {
+ "model": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "id": {
+ "type": "string"
},
- "reasoningID": {
+ "providerID": {
"type": "string"
},
- "text": {
+ "variant": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "reasoningID", "text"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.session.next.tool.input.started": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
+ "required": ["id", "providerID"],
+ "additionalProperties": false
},
- "type": {
- "type": "string",
- "const": "session.next.tool.input.started"
+ "version": {
+ "type": "string"
},
- "properties": {
+ "time": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
+ "created": {
+ "type": "integer",
+ "minimum": 0
},
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "updated": {
+ "type": "integer",
+ "minimum": 0
},
- "callID": {
- "type": "string"
+ "compacting": {
+ "type": "integer",
+ "minimum": 0
},
- "name": {
- "type": "string"
+ "archived": {
+ "type": "number"
}
},
- "required": ["timestamp", "sessionID", "callID", "name"]
- }
- },
- "required": ["id", "type", "properties"]
- },
- "Event.session.next.tool.input.delta": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
+ "required": ["created", "updated"],
+ "additionalProperties": false
},
- "type": {
- "type": "string",
- "const": "session.next.tool.input.delta"
+ "permission": {
+ "$ref": "#/components/schemas/PermissionRuleset"
},
- "properties": {
+ "revert": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
+ "messageID": {
+ "type": "string"
},
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "partID": {
+ "type": "string"
},
- "callID": {
+ "snapshot": {
"type": "string"
},
- "delta": {
+ "diff": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "callID", "delta"]
+ "required": ["messageID"],
+ "additionalProperties": false
+ },
+ "project": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ProjectSummary"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
- "required": ["id", "type", "properties"]
+ "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
+ "additionalProperties": false
},
- "Event.session.next.tool.input.ended": {
+ "McpResource": {
"type": "object",
"properties": {
- "id": {
+ "name": {
"type": "string"
},
- "type": {
- "type": "string",
- "const": "session.next.tool.input.ended"
+ "uri": {
+ "type": "string"
},
- "properties": {
+ "description": {
+ "type": "string"
+ },
+ "mimeType": {
+ "type": "string"
+ },
+ "client": {
+ "type": "string"
+ }
+ },
+ "required": ["name", "uri", "client"],
+ "additionalProperties": false
+ },
+ "Symbol": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "kind": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "location": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "callID": {
+ "uri": {
"type": "string"
},
- "text": {
- "type": "string"
+ "range": {
+ "$ref": "#/components/schemas/Range"
}
},
- "required": ["timestamp", "sessionID", "callID", "text"]
+ "required": ["uri", "range"],
+ "additionalProperties": false
}
},
- "required": ["id", "type", "properties"]
+ "required": ["name", "kind", "location"],
+ "additionalProperties": false
},
- "Event.session.next.tool.called": {
+ "FileNode": {
"type": "object",
"properties": {
- "id": {
+ "name": {
+ "type": "string"
+ },
+ "path": {
+ "type": "string"
+ },
+ "absolute": {
"type": "string"
},
"type": {
"type": "string",
- "const": "session.next.tool.called"
+ "enum": ["file", "directory"]
},
- "properties": {
+ "ignored": {
+ "type": "boolean"
+ }
+ },
+ "required": ["name", "path", "absolute", "type", "ignored"],
+ "additionalProperties": false
+ },
+ "FileContent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["text", "binary"]
+ },
+ "content": {
+ "type": "string"
+ },
+ "diff": {
+ "type": "string"
+ },
+ "patch": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "oldFileName": {
+ "type": "string"
},
- "callID": {
+ "newFileName": {
"type": "string"
},
- "tool": {
+ "oldHeader": {
"type": "string"
},
- "input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "newHeader": {
+ "type": "string"
},
- "provider": {
- "type": "object",
- "properties": {
- "executed": {
- "type": "boolean"
- },
- "metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ "hunks": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "oldStart": {
+ "type": "integer",
+ "minimum": 0
},
- "additionalProperties": {}
- }
- },
- "required": ["executed"]
+ "oldLines": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "newStart": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "newLines": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "lines": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
+ "additionalProperties": false
+ }
+ },
+ "index": {
+ "type": "string"
}
},
- "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"]
+ "required": ["oldFileName", "newFileName", "hunks"],
+ "additionalProperties": false
+ },
+ "encoding": {
+ "type": "string",
+ "enum": ["base64"]
+ },
+ "mimeType": {
+ "type": "string"
}
},
- "required": ["id", "type", "properties"]
+ "required": ["type", "content"],
+ "additionalProperties": false
},
- "Tool.TextContent": {
+ "File": {
"type": "object",
"properties": {
- "type": {
+ "path": {
+ "type": "string"
+ },
+ "added": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "removed": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "status": {
"type": "string",
- "const": "text"
+ "enum": ["added", "deleted", "modified"]
+ }
+ },
+ "required": ["path", "added", "removed", "status"],
+ "additionalProperties": false
+ },
+ "Path": {
+ "type": "object",
+ "properties": {
+ "home": {
+ "type": "string"
},
- "text": {
+ "state": {
+ "type": "string"
+ },
+ "config": {
+ "type": "string"
+ },
+ "worktree": {
+ "type": "string"
+ },
+ "directory": {
"type": "string"
}
},
- "required": ["type", "text"]
+ "required": ["home", "state", "config", "worktree", "directory"],
+ "additionalProperties": false
},
- "Tool.FileContent": {
+ "VcsInfo": {
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "const": "file"
+ "branch": {
+ "type": "string"
},
- "uri": {
+ "default_branch": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "VcsFileDiff": {
+ "type": "object",
+ "properties": {
+ "file": {
"type": "string"
},
- "mime": {
+ "patch": {
"type": "string"
},
+ "additions": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "deletions": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "status": {
+ "type": "string",
+ "enum": ["added", "deleted", "modified"]
+ }
+ },
+ "required": ["file", "patch", "additions", "deletions"],
+ "additionalProperties": false
+ },
+ "Command": {
+ "type": "object",
+ "properties": {
"name": {
"type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "agent": {
+ "type": "string"
+ },
+ "model": {
+ "type": "string"
+ },
+ "source": {
+ "type": "string",
+ "enum": ["command", "mcp", "skill"]
+ },
+ "template": {
+ "type": "string"
+ },
+ "subtask": {
+ "type": "boolean"
+ },
+ "hints": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
},
- "required": ["type", "uri", "mime"]
+ "required": ["name", "template", "hints"],
+ "additionalProperties": false
},
- "Event.session.next.tool.progress": {
+ "Agent": {
"type": "object",
"properties": {
- "id": {
+ "name": {
"type": "string"
},
- "type": {
+ "description": {
+ "type": "string"
+ },
+ "mode": {
"type": "string",
- "const": "session.next.tool.progress"
+ "enum": ["subagent", "primary", "all"]
},
- "properties": {
+ "native": {
+ "type": "boolean"
+ },
+ "hidden": {
+ "type": "boolean"
+ },
+ "topP": {
+ "type": "number"
+ },
+ "temperature": {
+ "type": "number"
+ },
+ "color": {
+ "type": "string"
+ },
+ "permission": {
+ "$ref": "#/components/schemas/PermissionRuleset"
+ },
+ "model": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "callID": {
+ "modelID": {
"type": "string"
},
- "structured": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "content": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/Tool.TextContent"
- },
- {
- "$ref": "#/components/schemas/Tool.FileContent"
- }
- ]
- }
+ "providerID": {
+ "type": "string"
}
},
- "required": ["timestamp", "sessionID", "callID", "structured", "content"]
+ "required": ["modelID", "providerID"],
+ "additionalProperties": false
+ },
+ "variant": {
+ "type": "string"
+ },
+ "prompt": {
+ "type": "string"
+ },
+ "options": {
+ "type": "object"
+ },
+ "steps": {
+ "type": "number"
}
},
- "required": ["id", "type", "properties"]
+ "required": ["name", "mode", "permission", "options"],
+ "additionalProperties": false
},
- "Event.session.next.tool.success": {
+ "LSPStatus": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
+ "name": {
+ "type": "string"
+ },
+ "root": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string",
+ "enum": ["connected", "error"]
+ }
+ },
+ "required": ["id", "name", "root", "status"],
+ "additionalProperties": false
+ },
+ "FormatterStatus": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "extensions": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "enabled": {
+ "type": "boolean"
+ }
+ },
+ "required": ["name", "extensions", "enabled"],
+ "additionalProperties": false
+ },
+ "MCPStatusConnected": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "enum": ["connected"]
+ }
+ },
+ "required": ["status"],
+ "additionalProperties": false
+ },
+ "MCPStatusDisabled": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "enum": ["disabled"]
+ }
+ },
+ "required": ["status"],
+ "additionalProperties": false
+ },
+ "MCPStatusFailed": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "enum": ["failed"]
+ },
+ "error": {
+ "type": "string"
+ }
+ },
+ "required": ["status", "error"],
+ "additionalProperties": false
+ },
+ "MCPStatusNeedsAuth": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "enum": ["needs_auth"]
+ }
+ },
+ "required": ["status"],
+ "additionalProperties": false
+ },
+ "MCPStatusNeedsClientRegistration": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "enum": ["needs_client_registration"]
+ },
+ "error": {
+ "type": "string"
+ }
+ },
+ "required": ["status", "error"],
+ "additionalProperties": false
+ },
+ "MCPStatus": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/MCPStatusConnected"
+ },
+ {
+ "$ref": "#/components/schemas/MCPStatusDisabled"
+ },
+ {
+ "$ref": "#/components/schemas/MCPStatusFailed"
+ },
+ {
+ "$ref": "#/components/schemas/MCPStatusNeedsAuth"
+ },
+ {
+ "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
+ }
+ ]
+ },
+ "McpUnsupportedOAuthError": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "string"
+ }
+ },
+ "required": ["error"],
+ "additionalProperties": false
+ },
+ "ProviderAuthMethod": {
+ "type": "object",
+ "properties": {
"type": {
"type": "string",
- "const": "session.next.tool.success"
+ "enum": ["oauth", "api"]
},
- "properties": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "callID": {
- "type": "string"
- },
- "structured": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "content": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/Tool.TextContent"
+ "label": {
+ "type": "string"
+ },
+ "prompts": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["text"]
},
- {
- "$ref": "#/components/schemas/Tool.FileContent"
+ "key": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "placeholder": {
+ "type": "string"
+ },
+ "when": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "op": {
+ "type": "string",
+ "enum": ["eq", "neq"]
+ },
+ "value": {
+ "type": "string"
+ }
+ },
+ "required": ["key", "op", "value"],
+ "additionalProperties": false
}
- ]
- }
- },
- "provider": {
- "type": "object",
- "properties": {
- "executed": {
- "type": "boolean"
},
- "metadata": {
- "type": "object",
- "propertyNames": {
+ "required": ["type", "key", "message"],
+ "additionalProperties": false
+ },
+ {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": ["select"]
+ },
+ "key": {
"type": "string"
},
- "additionalProperties": {}
- }
- },
- "required": ["executed"]
- }
- },
- "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"]
+ "message": {
+ "type": "string"
+ },
+ "options": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "label": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "hint": {
+ "type": "string"
+ }
+ },
+ "required": ["label", "value"],
+ "additionalProperties": false
+ }
+ },
+ "when": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "op": {
+ "type": "string",
+ "enum": ["eq", "neq"]
+ },
+ "value": {
+ "type": "string"
+ }
+ },
+ "required": ["key", "op", "value"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["type", "key", "message", "options"],
+ "additionalProperties": false
+ }
+ ]
+ }
}
},
- "required": ["id", "type", "properties"]
+ "required": ["type", "label"],
+ "additionalProperties": false
},
- "Event.session.next.tool.error": {
+ "ProviderAuthAuthorization": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "method": {
+ "type": "string",
+ "enum": ["auto", "code"]
+ },
+ "instructions": {
+ "type": "string"
+ }
+ },
+ "required": ["url", "method", "instructions"],
+ "additionalProperties": false
+ },
+ "TextPartInput": {
"type": "object",
"properties": {
"id": {
@@ -11428,94 +12879,66 @@
},
"type": {
"type": "string",
- "const": "session.next.tool.error"
+ "enum": ["text"]
},
- "properties": {
+ "text": {
+ "type": "string"
+ },
+ "synthetic": {
+ "type": "boolean"
+ },
+ "ignored": {
+ "type": "boolean"
+ },
+ "time": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "callID": {
- "type": "string"
- },
- "error": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string"
- },
- "message": {
- "type": "string"
- }
- },
- "required": ["type", "message"]
+ "start": {
+ "type": "integer",
+ "minimum": 0
},
- "provider": {
- "type": "object",
- "properties": {
- "executed": {
- "type": "boolean"
- },
- "metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["executed"]
+ "end": {
+ "type": "integer",
+ "minimum": 0
}
},
- "required": ["timestamp", "sessionID", "callID", "error", "provider"]
+ "required": ["start"],
+ "additionalProperties": false
+ },
+ "metadata": {
+ "type": "object"
}
},
- "required": ["id", "type", "properties"]
+ "required": ["type", "text"],
+ "additionalProperties": false
},
- "session.next.retry_error": {
+ "FilePartInput": {
"type": "object",
"properties": {
- "message": {
+ "id": {
"type": "string"
},
- "statusCode": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "type": {
+ "type": "string",
+ "enum": ["file"]
},
- "isRetryable": {
- "type": "boolean"
+ "mime": {
+ "type": "string"
},
- "responseHeaders": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- }
+ "filename": {
+ "type": "string"
},
- "responseBody": {
+ "url": {
"type": "string"
},
- "metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- }
+ "source": {
+ "$ref": "#/components/schemas/FilePartSource"
}
},
- "required": ["message", "isRetryable"]
+ "required": ["type", "mime", "url"],
+ "additionalProperties": false
},
- "Event.session.next.retried": {
+ "AgentPartInput": {
"type": "object",
"properties": {
"id": {
@@ -11523,33 +12946,34 @@
},
"type": {
"type": "string",
- "const": "session.next.retried"
+ "enum": ["agent"]
},
- "properties": {
+ "name": {
+ "type": "string"
+ },
+ "source": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "value": {
+ "type": "string"
},
- "attempt": {
+ "start": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
- "error": {
- "$ref": "#/components/schemas/session.next.retry_error"
+ "end": {
+ "type": "integer",
+ "minimum": 0
}
},
- "required": ["timestamp", "sessionID", "attempt", "error"]
+ "required": ["value", "start", "end"],
+ "additionalProperties": false
}
},
- "required": ["id", "type", "properties"]
+ "required": ["type", "name"],
+ "additionalProperties": false
},
- "Event.session.next.compaction.started": {
+ "SubtaskPartInput": {
"type": "object",
"properties": {
"id": {
@@ -11557,133 +12981,265 @@
},
"type": {
"type": "string",
- "const": "session.next.compaction.started"
+ "enum": ["subtask"]
},
- "properties": {
+ "prompt": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "agent": {
+ "type": "string"
+ },
+ "model": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
+ "providerID": {
+ "type": "string"
},
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "modelID": {
+ "type": "string"
+ }
+ },
+ "required": ["providerID", "modelID"],
+ "additionalProperties": false
+ },
+ "command": {
+ "type": "string"
+ }
+ },
+ "required": ["type", "prompt", "description", "agent"],
+ "additionalProperties": false
+ },
+ "V2SessionsResponse": {
+ "type": "object",
+ "properties": {
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SessionInfo"
+ }
+ },
+ "cursor": {
+ "type": "object",
+ "properties": {
+ "previous": {
+ "type": "string"
},
- "reason": {
- "type": "string",
- "enum": ["auto", "manual"]
+ "next": {
+ "type": "string"
}
},
- "required": ["timestamp", "sessionID", "reason"]
+ "additionalProperties": false
}
},
- "required": ["id", "type", "properties"]
+ "required": ["items", "cursor"],
+ "additionalProperties": false
},
- "Event.session.next.compaction.delta": {
+ "V2SessionMessagesResponse": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SessionMessage"
+ }
},
+ "cursor": {
+ "type": "object",
+ "properties": {
+ "previous": {
+ "type": "string"
+ },
+ "next": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "required": ["items", "cursor"],
+ "additionalProperties": false
+ },
+ "EventTuiPromptAppend": {
+ "type": "object",
+ "properties": {
"type": {
"type": "string",
- "const": "session.next.compaction.delta"
+ "enum": ["tui.prompt.append"]
},
"properties": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
"text": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "text"]
+ "required": ["text"],
+ "additionalProperties": false
}
},
- "required": ["id", "type", "properties"]
+ "required": ["type", "properties"],
+ "additionalProperties": false
},
- "Event.session.next.compaction.ended": {
+ "EventTuiCommandExecute": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["tui.command.execute"]
},
+ "properties": {
+ "type": "object",
+ "properties": {
+ "command": {
+ "anyOf": [
+ {
+ "type": "string",
+ "enum": [
+ "session.list",
+ "session.new",
+ "session.share",
+ "session.interrupt",
+ "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": ["type", "properties"],
+ "additionalProperties": false
+ },
+ "EventTuiToastShow": {
+ "type": "object",
+ "properties": {
"type": {
"type": "string",
- "const": "session.next.compaction.ended"
+ "enum": ["tui.toast.show"]
},
"properties": {
"type": "object",
"properties": {
- "timestamp": {
- "type": "number"
- },
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "text": {
+ "title": {
"type": "string"
},
- "include": {
+ "message": {
"type": "string"
+ },
+ "variant": {
+ "type": "string",
+ "enum": ["info", "success", "warning", "error"]
+ },
+ "duration": {
+ "type": "integer",
+ "exclusiveMinimum": 0
}
},
- "required": ["timestamp", "sessionID", "text"]
+ "required": ["message", "variant"],
+ "additionalProperties": false
}
},
- "required": ["id", "type", "properties"]
+ "required": ["type", "properties"],
+ "additionalProperties": false
},
- "Event.server.connected": {
+ "EventTuiSessionSelect": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
- },
"type": {
"type": "string",
- "const": "server.connected"
+ "enum": ["tui.session.select"]
},
"properties": {
"type": "object",
- "properties": {}
+ "properties": {
+ "sessionID": {
+ "type": "string",
+ "description": "Session ID to navigate to"
+ }
+ },
+ "required": ["sessionID"],
+ "additionalProperties": false
}
},
- "required": ["id", "type", "properties"]
+ "required": ["type", "properties"],
+ "additionalProperties": false
},
- "Event.global.disposed": {
+ "Workspace": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
- "type": "string",
- "const": "global.disposed"
+ "type": "string"
},
- "properties": {
- "type": "object",
- "properties": {}
+ "name": {
+ "type": "string"
+ },
+ "branch": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "directory": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "extra": {
+ "anyOf": [
+ {},
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "projectID": {
+ "type": "string"
}
},
- "required": ["id", "type", "properties"]
+ "required": ["id", "type", "name", "branch", "directory", "extra", "projectID"],
+ "additionalProperties": false
},
- "SyncEvent.message.updated": {
+ "SyncEventMessageUpdated": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "message.updated.1"
+ "enum": ["message.updated.1"]
},
"id": {
"type": "string"
@@ -11693,34 +13249,35 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
"properties": {
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"info": {
"$ref": "#/components/schemas/Message"
}
},
- "required": ["sessionID", "info"]
+ "required": ["sessionID", "info"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.message.removed": {
+ "SyncEventMessageRemoved": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "message.removed.1"
+ "enum": ["message.removed.1"]
},
"id": {
"type": "string"
@@ -11730,35 +13287,35 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
"properties": {
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
}
},
- "required": ["sessionID", "messageID"]
+ "required": ["sessionID", "messageID"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.message.part.updated": {
+ "SyncEventMessagePartUpdated": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "message.part.updated.1"
+ "enum": ["message.part.updated.1"]
},
"id": {
"type": "string"
@@ -11768,39 +13325,39 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
"properties": {
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"part": {
"$ref": "#/components/schemas/Part"
},
"time": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["sessionID", "part", "time"]
+ "required": ["sessionID", "part", "time"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.message.part.removed": {
+ "SyncEventMessagePartRemoved": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "message.part.removed.1"
+ "enum": ["message.part.removed.1"]
},
"id": {
"type": "string"
@@ -11810,39 +13367,38 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
"properties": {
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"partID": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
}
},
- "required": ["sessionID", "messageID", "partID"]
+ "required": ["sessionID", "messageID", "partID"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.created": {
+ "SyncEventSessionCreated": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.created.1"
+ "enum": ["session.created.1"]
},
"id": {
"type": "string"
@@ -11852,34 +13408,35 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
"properties": {
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"info": {
"$ref": "#/components/schemas/Session"
}
},
- "required": ["sessionID", "info"]
+ "required": ["sessionID", "info"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.updated": {
+ "SyncEventSessionUpdated": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.updated.1"
+ "enum": ["session.updated.1"]
},
"id": {
"type": "string"
@@ -11889,14 +13446,13 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
"properties": {
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"info": {
"type": "object",
@@ -11904,8 +13460,7 @@
"id": {
"anyOf": [
{
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
{
"type": "null"
@@ -11935,8 +13490,7 @@
"workspaceID": {
"anyOf": [
{
- "type": "string",
- "pattern": "^wrk.*"
+ "type": "string"
},
{
"type": "null"
@@ -11966,8 +13520,7 @@
"parentID": {
"anyOf": [
{
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
{
"type": "null"
@@ -11981,18 +13534,15 @@
"properties": {
"additions": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"deletions": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"files": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"diffs": {
"type": "array",
@@ -12001,7 +13551,8 @@
}
}
},
- "required": ["additions", "deletions", "files"]
+ "required": ["additions", "deletions", "files"],
+ "additionalProperties": false
},
{
"type": "null"
@@ -12021,7 +13572,8 @@
}
]
}
- }
+ },
+ "additionalProperties": false
},
"title": {
"anyOf": [
@@ -12058,7 +13610,8 @@
"type": "string"
}
},
- "required": ["id", "providerID"]
+ "required": ["id", "providerID"],
+ "additionalProperties": false
},
{
"type": "null"
@@ -12082,8 +13635,7 @@
"anyOf": [
{
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
{
"type": "null"
@@ -12094,8 +13646,7 @@
"anyOf": [
{
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
{
"type": "null"
@@ -12106,8 +13657,7 @@
"anyOf": [
{
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
{
"type": "null"
@@ -12124,7 +13674,8 @@
}
]
}
- }
+ },
+ "additionalProperties": false
},
"permission": {
"anyOf": [
@@ -12142,12 +13693,10 @@
"type": "object",
"properties": {
"messageID": {
- "type": "string",
- "pattern": "^msg.*"
+ "type": "string"
},
"partID": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"snapshot": {
"type": "string"
@@ -12156,31 +13705,35 @@
"type": "string"
}
},
- "required": ["messageID"]
+ "required": ["messageID"],
+ "additionalProperties": false
},
{
"type": "null"
}
]
}
- }
+ },
+ "additionalProperties": false
}
},
- "required": ["sessionID", "info"]
+ "required": ["sessionID", "info"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.deleted": {
+ "SyncEventSessionDeleted": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.deleted.1"
+ "enum": ["session.deleted.1"]
},
"id": {
"type": "string"
@@ -12190,34 +13743,35 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
"properties": {
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"info": {
"$ref": "#/components/schemas/Session"
}
},
- "required": ["sessionID", "info"]
+ "required": ["sessionID", "info"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.agent.switched": {
+ "SyncEventSessionNextAgentSwitched": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.agent.switched.1"
+ "enum": ["session.next.agent.switched.1"]
},
"id": {
"type": "string"
@@ -12227,7 +13781,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12236,28 +13790,29 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"agent": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "agent"]
+ "required": ["timestamp", "sessionID", "agent"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.model.switched": {
+ "SyncEventSessionNextModelSwitched": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.model.switched.1"
+ "enum": ["session.next.model.switched.1"]
},
"id": {
"type": "string"
@@ -12267,7 +13822,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12276,8 +13831,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"id": {
"type": "string"
@@ -12289,21 +13843,23 @@
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "id", "providerID"]
+ "required": ["timestamp", "sessionID", "id", "providerID"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.prompted": {
+ "SyncEventSessionNextPrompted": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.prompted.1"
+ "enum": ["session.next.prompted.1"]
},
"id": {
"type": "string"
@@ -12313,7 +13869,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12322,28 +13878,29 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"prompt": {
"$ref": "#/components/schemas/Prompt"
}
},
- "required": ["timestamp", "sessionID", "prompt"]
+ "required": ["timestamp", "sessionID", "prompt"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.synthetic": {
+ "SyncEventSessionNextSynthetic": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.synthetic.1"
+ "enum": ["session.next.synthetic.1"]
},
"id": {
"type": "string"
@@ -12353,7 +13910,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12362,28 +13919,29 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"text": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "text"]
+ "required": ["timestamp", "sessionID", "text"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.shell.started": {
+ "SyncEventSessionNextShellStarted": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.shell.started.1"
+ "enum": ["session.next.shell.started.1"]
},
"id": {
"type": "string"
@@ -12393,7 +13951,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12402,8 +13960,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"callID": {
"type": "string"
@@ -12412,21 +13969,23 @@
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "callID", "command"]
+ "required": ["timestamp", "sessionID", "callID", "command"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.shell.ended": {
+ "SyncEventSessionNextShellEnded": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.shell.ended.1"
+ "enum": ["session.next.shell.ended.1"]
},
"id": {
"type": "string"
@@ -12436,7 +13995,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12445,8 +14004,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"callID": {
"type": "string"
@@ -12455,21 +14013,23 @@
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "callID", "output"]
+ "required": ["timestamp", "sessionID", "callID", "output"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.step.started": {
+ "SyncEventSessionNextStepStarted": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.step.started.1"
+ "enum": ["session.next.step.started.1"]
},
"id": {
"type": "string"
@@ -12479,7 +14039,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12488,8 +14048,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"agent": {
"type": "string"
@@ -12507,27 +14066,30 @@
"type": "string"
}
},
- "required": ["id", "providerID"]
+ "required": ["id", "providerID"],
+ "additionalProperties": false
},
"snapshot": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "agent", "model"]
+ "required": ["timestamp", "sessionID", "agent", "model"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.step.ended": {
+ "SyncEventSessionNextStepEnded": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.step.ended.1"
+ "enum": ["session.next.step.ended.1"]
},
"id": {
"type": "string"
@@ -12537,7 +14099,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12546,8 +14108,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"finish": {
"type": "string"
@@ -12560,57 +14121,56 @@
"properties": {
"input": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"output": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"reasoning": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"cache": {
"type": "object",
"properties": {
"read": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"write": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
},
- "required": ["read", "write"]
+ "required": ["read", "write"],
+ "additionalProperties": false
}
},
- "required": ["input", "output", "reasoning", "cache"]
+ "required": ["input", "output", "reasoning", "cache"],
+ "additionalProperties": false
},
"snapshot": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "finish", "cost", "tokens"]
+ "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.text.started": {
+ "SyncEventSessionNextTextStarted": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.text.started.1"
+ "enum": ["session.next.text.started.1"]
},
"id": {
"type": "string"
@@ -12620,7 +14180,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12629,25 +14189,26 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
}
},
- "required": ["timestamp", "sessionID"]
+ "required": ["timestamp", "sessionID"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.text.delta": {
+ "SyncEventSessionNextTextDelta": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.text.delta.1"
+ "enum": ["session.next.text.delta.1"]
},
"id": {
"type": "string"
@@ -12657,7 +14218,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12666,28 +14227,29 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"delta": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "delta"]
+ "required": ["timestamp", "sessionID", "delta"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.text.ended": {
+ "SyncEventSessionNextTextEnded": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.text.ended.1"
+ "enum": ["session.next.text.ended.1"]
},
"id": {
"type": "string"
@@ -12697,7 +14259,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12706,28 +14268,29 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"text": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "text"]
+ "required": ["timestamp", "sessionID", "text"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.reasoning.started": {
+ "SyncEventSessionNextReasoningStarted": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.reasoning.started.1"
+ "enum": ["session.next.reasoning.started.1"]
},
"id": {
"type": "string"
@@ -12737,7 +14300,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12746,28 +14309,29 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"reasoningID": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "reasoningID"]
+ "required": ["timestamp", "sessionID", "reasoningID"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.reasoning.delta": {
+ "SyncEventSessionNextReasoningDelta": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.reasoning.delta.1"
+ "enum": ["session.next.reasoning.delta.1"]
},
"id": {
"type": "string"
@@ -12777,7 +14341,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12786,8 +14350,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"reasoningID": {
"type": "string"
@@ -12796,21 +14359,23 @@
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "reasoningID", "delta"]
+ "required": ["timestamp", "sessionID", "reasoningID", "delta"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.reasoning.ended": {
+ "SyncEventSessionNextReasoningEnded": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.reasoning.ended.1"
+ "enum": ["session.next.reasoning.ended.1"]
},
"id": {
"type": "string"
@@ -12820,7 +14385,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12829,8 +14394,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"reasoningID": {
"type": "string"
@@ -12839,21 +14403,23 @@
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "reasoningID", "text"]
+ "required": ["timestamp", "sessionID", "reasoningID", "text"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.tool.input.started": {
+ "SyncEventSessionNextToolInputStarted": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.tool.input.started.1"
+ "enum": ["session.next.tool.input.started.1"]
},
"id": {
"type": "string"
@@ -12863,7 +14429,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12872,8 +14438,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"callID": {
"type": "string"
@@ -12882,21 +14447,23 @@
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "callID", "name"]
+ "required": ["timestamp", "sessionID", "callID", "name"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.tool.input.delta": {
+ "SyncEventSessionNextToolInputDelta": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.tool.input.delta.1"
+ "enum": ["session.next.tool.input.delta.1"]
},
"id": {
"type": "string"
@@ -12906,7 +14473,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12915,8 +14482,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"callID": {
"type": "string"
@@ -12925,21 +14491,23 @@
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "callID", "delta"]
+ "required": ["timestamp", "sessionID", "callID", "delta"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.tool.input.ended": {
+ "SyncEventSessionNextToolInputEnded": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.tool.input.ended.1"
+ "enum": ["session.next.tool.input.ended.1"]
},
"id": {
"type": "string"
@@ -12949,7 +14517,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -12958,8 +14526,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"callID": {
"type": "string"
@@ -12968,21 +14535,23 @@
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "callID", "text"]
+ "required": ["timestamp", "sessionID", "callID", "text"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.tool.called": {
+ "SyncEventSessionNextToolCalled": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.tool.called.1"
+ "enum": ["session.next.tool.called.1"]
},
"id": {
"type": "string"
@@ -12992,7 +14561,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -13001,8 +14570,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"callID": {
"type": "string"
@@ -13011,11 +14579,7 @@
"type": "string"
},
"input": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"provider": {
"type": "object",
@@ -13024,31 +14588,30 @@
"type": "boolean"
},
"metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
}
},
- "required": ["executed"]
+ "required": ["executed"],
+ "additionalProperties": false
}
},
- "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"]
+ "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.tool.progress": {
+ "SyncEventSessionNextToolProgress": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.tool.progress.1"
+ "enum": ["session.next.tool.progress.1"]
},
"id": {
"type": "string"
@@ -13058,7 +14621,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -13067,48 +14630,45 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"callID": {
"type": "string"
},
"structured": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"content": {
"type": "array",
"items": {
"anyOf": [
{
- "$ref": "#/components/schemas/Tool.TextContent"
+ "$ref": "#/components/schemas/ToolTextContent"
},
{
- "$ref": "#/components/schemas/Tool.FileContent"
+ "$ref": "#/components/schemas/ToolFileContent"
}
]
}
}
},
- "required": ["timestamp", "sessionID", "callID", "structured", "content"]
+ "required": ["timestamp", "sessionID", "callID", "structured", "content"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.tool.success": {
+ "SyncEventSessionNextToolSuccess": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.tool.success.1"
+ "enum": ["session.next.tool.success.1"]
},
"id": {
"type": "string"
@@ -13118,7 +14678,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -13127,28 +14687,23 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"callID": {
"type": "string"
},
"structured": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
},
"content": {
"type": "array",
"items": {
"anyOf": [
{
- "$ref": "#/components/schemas/Tool.TextContent"
+ "$ref": "#/components/schemas/ToolTextContent"
},
{
- "$ref": "#/components/schemas/Tool.FileContent"
+ "$ref": "#/components/schemas/ToolFileContent"
}
]
}
@@ -13160,31 +14715,30 @@
"type": "boolean"
},
"metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
}
},
- "required": ["executed"]
+ "required": ["executed"],
+ "additionalProperties": false
}
},
- "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"]
+ "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.tool.error": {
+ "SyncEventSessionNextToolError": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.tool.error.1"
+ "enum": ["session.next.tool.error.1"]
},
"id": {
"type": "string"
@@ -13194,7 +14748,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -13203,8 +14757,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"callID": {
"type": "string"
@@ -13219,7 +14772,8 @@
"type": "string"
}
},
- "required": ["type", "message"]
+ "required": ["type", "message"],
+ "additionalProperties": false
},
"provider": {
"type": "object",
@@ -13228,31 +14782,30 @@
"type": "boolean"
},
"metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "type": "object"
}
},
- "required": ["executed"]
+ "required": ["executed"],
+ "additionalProperties": false
}
},
- "required": ["timestamp", "sessionID", "callID", "error", "provider"]
+ "required": ["timestamp", "sessionID", "callID", "error", "provider"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.retried": {
+ "SyncEventSessionNextRetried": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.retried.1"
+ "enum": ["session.next.retried.1"]
},
"id": {
"type": "string"
@@ -13262,7 +14815,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -13271,33 +14824,33 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"attempt": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
},
"error": {
- "$ref": "#/components/schemas/session.next.retry_error"
+ "$ref": "#/components/schemas/SessionNextRetry_error"
}
},
- "required": ["timestamp", "sessionID", "attempt", "error"]
+ "required": ["timestamp", "sessionID", "attempt", "error"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.compaction.started": {
+ "SyncEventSessionNextCompactionStarted": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.compaction.started.1"
+ "enum": ["session.next.compaction.started.1"]
},
"id": {
"type": "string"
@@ -13307,7 +14860,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -13316,29 +14869,30 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"reason": {
"type": "string",
"enum": ["auto", "manual"]
}
},
- "required": ["timestamp", "sessionID", "reason"]
+ "required": ["timestamp", "sessionID", "reason"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.compaction.delta": {
+ "SyncEventSessionNextCompactionDelta": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.compaction.delta.1"
+ "enum": ["session.next.compaction.delta.1"]
},
"id": {
"type": "string"
@@ -13348,7 +14902,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -13357,28 +14911,29 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"text": {
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "text"]
+ "required": ["timestamp", "sessionID", "text"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "SyncEvent.session.next.compaction.ended": {
+ "SyncEventSessionNextCompactionEnded": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "const": "sync"
+ "enum": ["sync"]
},
"name": {
"type": "string",
- "const": "session.next.compaction.ended.1"
+ "enum": ["session.next.compaction.ended.1"]
},
"id": {
"type": "string"
@@ -13388,7 +14943,7 @@
},
"aggregateID": {
"type": "string",
- "const": "sessionID"
+ "enum": ["sessionID"]
},
"data": {
"type": "object",
@@ -13397,8 +14952,7 @@
"type": "number"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"text": {
"type": "string"
@@ -13407,2996 +14961,2968 @@
"type": "string"
}
},
- "required": ["timestamp", "sessionID", "text"]
+ "required": ["timestamp", "sessionID", "text"],
+ "additionalProperties": false
}
},
- "required": ["type", "name", "id", "seq", "aggregateID", "data"]
+ "required": ["type", "name", "id", "seq", "aggregateID", "data"],
+ "additionalProperties": false
},
- "GlobalEvent": {
+ "EventServerInstanceDisposed": {
"type": "object",
"properties": {
- "directory": {
- "type": "string"
- },
- "project": {
+ "id": {
"type": "string"
},
- "workspace": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["server.instance.disposed"]
},
- "payload": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/Event.server.instance.disposed"
- },
- {
- "$ref": "#/components/schemas/Event.file.edited"
- },
- {
- "$ref": "#/components/schemas/Event.file.watcher.updated"
- },
- {
- "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
- },
- {
- "$ref": "#/components/schemas/Event.lsp.updated"
- },
- {
- "$ref": "#/components/schemas/Event.message.part.delta"
- },
- {
- "$ref": "#/components/schemas/Event.permission.asked"
- },
- {
- "$ref": "#/components/schemas/Event.permission.replied"
- },
- {
- "$ref": "#/components/schemas/Event.session.diff"
- },
- {
- "$ref": "#/components/schemas/Event.session.error"
- },
- {
- "$ref": "#/components/schemas/Event.installation.updated"
- },
- {
- "$ref": "#/components/schemas/Event.installation.update-available"
- },
- {
- "$ref": "#/components/schemas/Event.question.asked"
- },
- {
- "$ref": "#/components/schemas/Event.question.replied"
- },
- {
- "$ref": "#/components/schemas/Event.question.rejected"
- },
- {
- "$ref": "#/components/schemas/Event.todo.updated"
- },
- {
- "$ref": "#/components/schemas/Event.session.status"
- },
- {
- "$ref": "#/components/schemas/Event.session.idle"
- },
- {
- "$ref": "#/components/schemas/Event.session.compacted"
- },
- {
- "$ref": "#/components/schemas/Event.tui.prompt.append"
- },
- {
- "$ref": "#/components/schemas/Event.tui.command.execute"
- },
- {
- "$ref": "#/components/schemas/Event.tui.toast.show"
- },
- {
- "$ref": "#/components/schemas/Event.tui.session.select"
- },
- {
- "$ref": "#/components/schemas/Event.mcp.tools.changed"
- },
- {
- "$ref": "#/components/schemas/Event.mcp.browser.open.failed"
- },
- {
- "$ref": "#/components/schemas/Event.command.executed"
- },
- {
- "$ref": "#/components/schemas/Event.project.updated"
- },
- {
- "$ref": "#/components/schemas/Event.vcs.branch.updated"
- },
- {
- "$ref": "#/components/schemas/Event.workspace.ready"
- },
- {
- "$ref": "#/components/schemas/Event.workspace.failed"
- },
- {
- "$ref": "#/components/schemas/Event.workspace.restore"
- },
- {
- "$ref": "#/components/schemas/Event.workspace.status"
- },
- {
- "$ref": "#/components/schemas/Event.worktree.ready"
- },
- {
- "$ref": "#/components/schemas/Event.worktree.failed"
- },
- {
- "$ref": "#/components/schemas/Event.pty.created"
- },
- {
- "$ref": "#/components/schemas/Event.pty.updated"
- },
- {
- "$ref": "#/components/schemas/Event.pty.exited"
- },
- {
- "$ref": "#/components/schemas/Event.pty.deleted"
- },
- {
- "$ref": "#/components/schemas/Event.message.updated"
- },
- {
- "$ref": "#/components/schemas/Event.message.removed"
- },
- {
- "$ref": "#/components/schemas/Event.message.part.updated"
- },
- {
- "$ref": "#/components/schemas/Event.message.part.removed"
- },
- {
- "$ref": "#/components/schemas/Event.session.created"
- },
- {
- "$ref": "#/components/schemas/Event.session.updated"
- },
- {
- "$ref": "#/components/schemas/Event.session.deleted"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.agent.switched"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.model.switched"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.prompted"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.synthetic"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.shell.started"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.shell.ended"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.step.started"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.step.ended"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.text.started"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.text.delta"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.text.ended"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.reasoning.started"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.reasoning.delta"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.reasoning.ended"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.tool.input.started"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.tool.input.delta"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.tool.input.ended"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.tool.called"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.tool.progress"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.tool.success"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.tool.error"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.retried"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.compaction.started"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.compaction.delta"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.compaction.ended"
- },
- {
- "$ref": "#/components/schemas/Event.server.connected"
- },
- {
- "$ref": "#/components/schemas/Event.global.disposed"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.message.updated"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.message.removed"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.message.part.updated"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.message.part.removed"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.created"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.updated"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.deleted"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.agent.switched"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.model.switched"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.prompted"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.synthetic"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.shell.started"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.shell.ended"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.step.started"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.step.ended"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.text.started"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.text.delta"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.text.ended"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.reasoning.started"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.reasoning.delta"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.reasoning.ended"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.tool.input.started"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.tool.input.delta"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.tool.input.ended"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.tool.called"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.tool.progress"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.tool.success"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.tool.error"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.retried"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.compaction.started"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.compaction.delta"
- },
- {
- "$ref": "#/components/schemas/SyncEvent.session.next.compaction.ended"
+ "properties": {
+ "type": "object",
+ "properties": {
+ "directory": {
+ "type": "string"
}
- ]
+ },
+ "required": ["directory"],
+ "additionalProperties": false
}
},
- "required": ["directory", "payload"]
- },
- "LogLevel": {
- "description": "Log level",
- "type": "string",
- "enum": ["DEBUG", "INFO", "WARN", "ERROR"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "ServerConfig": {
- "description": "Server configuration for opencode serve and web commands",
+ "EventFileEdited": {
"type": "object",
"properties": {
- "port": {
- "description": "Port to listen on",
- "type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
- },
- "hostname": {
- "description": "Hostname to listen on",
+ "id": {
"type": "string"
},
- "mdns": {
- "description": "Enable mDNS service discovery",
- "type": "boolean"
+ "type": {
+ "type": "string",
+ "enum": ["file.edited"]
},
- "mdnsDomain": {
- "description": "Custom domain name for mDNS service (default: opencode.local)",
+ "properties": {
+ "type": "object",
+ "properties": {
+ "file": {
+ "type": "string"
+ }
+ },
+ "required": ["file"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventFileWatcherUpdated": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "cors": {
- "description": "Additional domains to allow for CORS",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": {
+ "type": "string",
+ "enum": ["file.watcher.updated"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "file": {
+ "type": "string"
+ },
+ "event": {
+ "type": "string",
+ "enum": ["add", "change", "unlink"]
+ }
+ },
+ "required": ["file", "event"],
+ "additionalProperties": false
}
- }
- },
- "PermissionActionConfig": {
- "type": "string",
- "enum": ["ask", "allow", "deny"]
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "PermissionObjectConfig": {
+ "EventLspClientDiagnostics": {
"type": "object",
- "propertyNames": {
- "type": "string"
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["lsp.client.diagnostics"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "serverID": {
+ "type": "string"
+ },
+ "path": {
+ "type": "string"
+ }
+ },
+ "required": ["serverID", "path"],
+ "additionalProperties": false
+ }
},
- "additionalProperties": {
- "$ref": "#/components/schemas/PermissionActionConfig"
- }
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "PermissionRuleConfig": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/PermissionActionConfig"
+ "EventLspUpdated": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- {
- "$ref": "#/components/schemas/PermissionObjectConfig"
+ "type": {
+ "type": "string",
+ "enum": ["lsp.updated"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {}
}
- ]
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "PermissionConfig": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/PermissionActionConfig"
+ "EventMessagePartDelta": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- {
+ "type": {
+ "type": "string",
+ "enum": ["message.part.delta"]
+ },
+ "properties": {
"type": "object",
"properties": {
- "read": {
- "$ref": "#/components/schemas/PermissionRuleConfig"
- },
- "edit": {
- "$ref": "#/components/schemas/PermissionRuleConfig"
- },
- "glob": {
- "$ref": "#/components/schemas/PermissionRuleConfig"
- },
- "grep": {
- "$ref": "#/components/schemas/PermissionRuleConfig"
- },
- "list": {
- "$ref": "#/components/schemas/PermissionRuleConfig"
- },
- "bash": {
- "$ref": "#/components/schemas/PermissionRuleConfig"
- },
- "task": {
- "$ref": "#/components/schemas/PermissionRuleConfig"
- },
- "external_directory": {
- "$ref": "#/components/schemas/PermissionRuleConfig"
- },
- "todowrite": {
- "$ref": "#/components/schemas/PermissionActionConfig"
- },
- "question": {
- "$ref": "#/components/schemas/PermissionActionConfig"
- },
- "webfetch": {
- "$ref": "#/components/schemas/PermissionActionConfig"
+ "sessionID": {
+ "type": "string"
},
- "websearch": {
- "$ref": "#/components/schemas/PermissionActionConfig"
+ "messageID": {
+ "type": "string"
},
- "lsp": {
- "$ref": "#/components/schemas/PermissionRuleConfig"
+ "partID": {
+ "type": "string"
},
- "doom_loop": {
- "$ref": "#/components/schemas/PermissionActionConfig"
+ "field": {
+ "type": "string"
},
- "skill": {
- "$ref": "#/components/schemas/PermissionRuleConfig"
+ "delta": {
+ "type": "string"
}
},
- "additionalProperties": {
- "$ref": "#/components/schemas/PermissionRuleConfig"
- }
+ "required": ["sessionID", "messageID", "partID", "field", "delta"],
+ "additionalProperties": false
}
- ]
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "AgentConfig": {
+ "EventPermissionAsked": {
"type": "object",
"properties": {
- "model": {
- "type": "string"
- },
- "variant": {
- "description": "Default model variant for this agent (applies only when using the agent's configured model).",
- "type": "string"
- },
- "temperature": {
- "type": "number"
- },
- "top_p": {
- "type": "number"
- },
- "prompt": {
+ "id": {
"type": "string"
},
- "tools": {
- "description": "@deprecated Use 'permission' field instead",
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "boolean"
- }
- },
- "disable": {
- "type": "boolean"
+ "type": {
+ "type": "string",
+ "enum": ["permission.asked"]
},
- "description": {
- "description": "Description of when to use the agent",
+ "properties": {
+ "$ref": "#/components/schemas/PermissionRequest"
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventPermissionReplied": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "mode": {
+ "type": {
"type": "string",
- "enum": ["subagent", "primary", "all"]
- },
- "hidden": {
- "description": "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)",
- "type": "boolean"
+ "enum": ["permission.replied"]
},
- "options": {
+ "properties": {
"type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "color": {
- "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)",
- "anyOf": [
- {
- "type": "string",
- "pattern": "^#[0-9a-fA-F]{6}$"
+ "properties": {
+ "sessionID": {
+ "type": "string"
},
- {
+ "requestID": {
+ "type": "string"
+ },
+ "reply": {
"type": "string",
- "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
+ "enum": ["once", "always", "reject"]
}
- ]
- },
- "steps": {
- "description": "Maximum number of agentic iterations before forcing text-only response",
- "type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
- },
- "maxSteps": {
- "description": "@deprecated Use 'steps' field instead.",
- "type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
- },
- "permission": {
- "$ref": "#/components/schemas/PermissionConfig"
+ },
+ "required": ["sessionID", "requestID", "reply"],
+ "additionalProperties": false
}
},
- "additionalProperties": {}
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "ProviderConfig": {
+ "EventSessionDiff": {
"type": "object",
"properties": {
- "api": {
- "type": "string"
- },
- "name": {
+ "id": {
"type": "string"
},
- "env": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": {
+ "type": "string",
+ "enum": ["session.diff"]
},
+ "properties": {
+ "type": "object",
+ "properties": {
+ "sessionID": {
+ "type": "string"
+ },
+ "diff": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SnapshotFileDiff"
+ }
+ }
+ },
+ "required": ["sessionID", "diff"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionError": {
+ "type": "object",
+ "properties": {
"id": {
"type": "string"
},
- "npm": {
- "type": "string"
- },
- "whitelist": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "blacklist": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": {
+ "type": "string",
+ "enum": ["session.error"]
},
- "options": {
+ "properties": {
"type": "object",
"properties": {
- "apiKey": {
- "type": "string"
- },
- "baseURL": {
- "type": "string"
- },
- "enterpriseUrl": {
- "description": "GitHub Enterprise URL for copilot authentication",
+ "sessionID": {
"type": "string"
},
- "setCacheKey": {
- "description": "Enable promptCacheKey for this provider (default false)",
- "type": "boolean"
- },
- "timeout": {
- "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
+ "error": {
"anyOf": [
{
- "type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
+ "$ref": "#/components/schemas/ProviderAuthError"
},
{
- "type": "boolean",
- "const": false
- }
- ]
- },
- "chunkTimeout": {
- "description": "Timeout in milliseconds between streamed SSE chunks for this provider. If no chunk arrives within this window, the request is aborted.",
- "type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
- }
- },
- "additionalProperties": {}
- },
- "models": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "family": {
- "type": "string"
- },
- "release_date": {
- "type": "string"
- },
- "attachment": {
- "type": "boolean"
- },
- "reasoning": {
- "type": "boolean"
- },
- "temperature": {
- "type": "boolean"
- },
- "tool_call": {
- "type": "boolean"
- },
- "interleaved": {
- "anyOf": [
- {
- "type": "boolean",
- "const": true
- },
- {
- "type": "object",
- "properties": {
- "field": {
- "type": "string",
- "enum": ["reasoning_content", "reasoning_details"]
- }
- },
- "required": ["field"]
- }
- ]
- },
- "cost": {
- "type": "object",
- "properties": {
- "input": {
- "type": "number"
- },
- "output": {
- "type": "number"
- },
- "cache_read": {
- "type": "number"
- },
- "cache_write": {
- "type": "number"
- },
- "context_over_200k": {
- "type": "object",
- "properties": {
- "input": {
- "type": "number"
- },
- "output": {
- "type": "number"
- },
- "cache_read": {
- "type": "number"
- },
- "cache_write": {
- "type": "number"
- }
- },
- "required": ["input", "output"]
- }
- },
- "required": ["input", "output"]
- },
- "limit": {
- "type": "object",
- "properties": {
- "context": {
- "type": "number"
- },
- "input": {
- "type": "number"
- },
- "output": {
- "type": "number"
- }
+ "$ref": "#/components/schemas/UnknownError"
},
- "required": ["context", "output"]
- },
- "modalities": {
- "type": "object",
- "properties": {
- "input": {
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["text", "audio", "image", "video", "pdf"]
- }
- },
- "output": {
- "type": "array",
- "items": {
- "type": "string",
- "enum": ["text", "audio", "image", "video", "pdf"]
- }
- }
+ {
+ "$ref": "#/components/schemas/MessageOutputLengthError"
},
- "required": ["input", "output"]
- },
- "experimental": {
- "type": "boolean"
- },
- "status": {
- "type": "string",
- "enum": ["alpha", "beta", "deprecated"]
- },
- "provider": {
- "type": "object",
- "properties": {
- "npm": {
- "type": "string"
- },
- "api": {
- "type": "string"
- }
- }
- },
- "options": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ {
+ "$ref": "#/components/schemas/MessageAbortedError"
},
- "additionalProperties": {}
- },
- "headers": {
- "type": "object",
- "propertyNames": {
- "type": "string"
+ {
+ "$ref": "#/components/schemas/StructuredOutputError"
},
- "additionalProperties": {
- "type": "string"
- }
- },
- "variants": {
- "description": "Variant-specific configuration",
- "type": "object",
- "propertyNames": {
- "type": "string"
+ {
+ "$ref": "#/components/schemas/ContextOverflowError"
},
- "additionalProperties": {
- "type": "object",
- "properties": {
- "disabled": {
- "description": "Disable this variant for the model",
- "type": "boolean"
- }
- },
- "additionalProperties": {}
+ {
+ "$ref": "#/components/schemas/APIError"
}
- }
+ ]
}
- }
+ },
+ "additionalProperties": false
}
- }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "McpLocalConfig": {
+ "EventInstallationUpdated": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string"
+ },
"type": {
- "description": "Type of MCP server connection",
"type": "string",
- "const": "local"
+ "enum": ["installation.updated"]
},
- "command": {
- "description": "Command and arguments to run the MCP server",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "environment": {
- "description": "Environment variables to set when running the MCP server",
+ "properties": {
"type": "object",
- "propertyNames": {
- "type": "string"
+ "properties": {
+ "version": {
+ "type": "string"
+ }
},
- "additionalProperties": {
- "type": "string"
- }
+ "required": ["version"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventInstallationUpdate-available": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "enabled": {
- "description": "Enable or disable the MCP server on startup",
- "type": "boolean"
+ "type": {
+ "type": "string",
+ "enum": ["installation.update-available"]
},
- "timeout": {
- "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
- "type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
+ "properties": {
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "string"
+ }
+ },
+ "required": ["version"],
+ "additionalProperties": false
}
},
- "required": ["type", "command"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "McpOAuthConfig": {
+ "EventQuestionAsked": {
"type": "object",
"properties": {
- "clientId": {
- "description": "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.",
+ "id": {
"type": "string"
},
- "clientSecret": {
- "description": "OAuth client secret (if required by the authorization server)",
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["question.asked"]
},
- "scope": {
- "description": "OAuth scopes to request during authorization",
+ "properties": {
+ "$ref": "#/components/schemas/QuestionRequest"
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventQuestionReplied": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "redirectUri": {
- "description": "OAuth redirect URI (default: http://127.0.0.1:19876/mcp/oauth/callback).",
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["question.replied"]
+ },
+ "properties": {
+ "$ref": "#/components/schemas/QuestionReplied"
}
- }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "McpRemoteConfig": {
+ "EventQuestionRejected": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string"
+ },
"type": {
- "description": "Type of MCP server connection",
"type": "string",
- "const": "remote"
+ "enum": ["question.rejected"]
},
- "url": {
- "description": "URL of the remote MCP server",
+ "properties": {
+ "$ref": "#/components/schemas/QuestionRejected"
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventTodoUpdated": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "enabled": {
- "description": "Enable or disable the MCP server on startup",
- "type": "boolean"
+ "type": {
+ "type": "string",
+ "enum": ["todo.updated"]
},
- "headers": {
- "description": "Headers to send with the request",
+ "properties": {
"type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- "oauth": {
- "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.",
- "anyOf": [
- {
- "$ref": "#/components/schemas/McpOAuthConfig"
+ "properties": {
+ "sessionID": {
+ "type": "string"
},
- {
- "type": "boolean",
- "const": false
+ "todos": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Todo"
+ }
}
- ]
- },
- "timeout": {
- "description": "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.",
- "type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
+ },
+ "required": ["sessionID", "todos"],
+ "additionalProperties": false
}
},
- "required": ["type", "url"]
- },
- "LayoutConfig": {
- "description": "@deprecated Always uses stretch layout.",
- "type": "string",
- "enum": ["auto", "stretch"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "Config": {
+ "EventSessionStatus": {
"type": "object",
"properties": {
- "$schema": {
- "description": "JSON schema reference for configuration validation",
+ "id": {
"type": "string"
},
- "shell": {
- "description": "Default shell to use for terminal and bash tool",
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["session.status"]
},
- "logLevel": {
- "$ref": "#/components/schemas/LogLevel"
+ "properties": {
+ "type": "object",
+ "properties": {
+ "sessionID": {
+ "type": "string"
+ },
+ "status": {
+ "$ref": "#/components/schemas/SessionStatus"
+ }
+ },
+ "required": ["sessionID", "status"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionIdle": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "server": {
- "$ref": "#/components/schemas/ServerConfig"
+ "type": {
+ "type": "string",
+ "enum": ["session.idle"]
},
- "command": {
- "description": "Command configuration, see https://opencode.ai/docs/commands",
+ "properties": {
"type": "object",
- "propertyNames": {
- "type": "string"
+ "properties": {
+ "sessionID": {
+ "type": "string"
+ }
},
- "additionalProperties": {
- "type": "object",
- "properties": {
- "template": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "agent": {
- "type": "string"
- },
- "model": {
- "type": "string"
- },
- "subtask": {
- "type": "boolean"
- }
- },
- "required": ["template"]
- }
+ "required": ["sessionID"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionCompacted": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "skills": {
- "description": "Additional skill folder paths",
+ "type": {
+ "type": "string",
+ "enum": ["session.compacted"]
+ },
+ "properties": {
"type": "object",
"properties": {
- "paths": {
- "description": "Additional paths to skill folders",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "urls": {
- "description": "URLs to fetch skills from (e.g., https://example.com/.well-known/skills/)",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "sessionID": {
+ "type": "string"
}
- }
+ },
+ "required": ["sessionID"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventMcpToolsChanged": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "watcher": {
+ "type": {
+ "type": "string",
+ "enum": ["mcp.tools.changed"]
+ },
+ "properties": {
"type": "object",
"properties": {
- "ignore": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "server": {
+ "type": "string"
}
- }
+ },
+ "required": ["server"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventMcpBrowserOpenFailed": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "snapshot": {
- "description": "Enable or disable snapshot tracking. When false, filesystem snapshots are not recorded and undoing or reverting will not undo/redo file changes. Defaults to true.",
- "type": "boolean"
+ "type": {
+ "type": "string",
+ "enum": ["mcp.browser.open.failed"]
},
- "plugin": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "array",
- "prefixItems": [
- {
- "type": "string"
- },
- {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- ]
- }
- ]
- }
+ "properties": {
+ "type": "object",
+ "properties": {
+ "mcpName": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ },
+ "required": ["mcpName", "url"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventCommandExecuted": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "share": {
- "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
+ "type": {
"type": "string",
- "enum": ["manual", "auto", "disabled"]
+ "enum": ["command.executed"]
},
- "autoshare": {
- "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
- "type": "boolean"
- },
- "autoupdate": {
- "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
- "anyOf": [
- {
- "type": "boolean"
+ "properties": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
},
- {
- "type": "string",
- "const": "notify"
+ "sessionID": {
+ "type": "string"
+ },
+ "arguments": {
+ "type": "string"
+ },
+ "messageID": {
+ "type": "string"
}
- ]
- },
- "disabled_providers": {
- "description": "Disable providers that are loaded automatically",
- "type": "array",
- "items": {
- "type": "string"
- }
+ },
+ "required": ["name", "sessionID", "arguments", "messageID"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventProjectUpdated": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "enabled_providers": {
- "description": "When set, ONLY these providers will be enabled. All other providers will be ignored",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": {
+ "type": "string",
+ "enum": ["project.updated"]
},
- "model": {
- "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
+ "properties": {
+ "$ref": "#/components/schemas/Project"
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventVcsBranchUpdated": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "small_model": {
- "description": "Small model to use for tasks like title generation in the format of provider/model",
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["vcs.branch.updated"]
},
- "default_agent": {
- "description": "Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.",
+ "properties": {
+ "type": "object",
+ "properties": {
+ "branch": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventWorkspaceReady": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "username": {
- "description": "Custom username to display in conversations instead of system username",
+ "type": {
+ "type": "string",
+ "enum": ["workspace.ready"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": ["name"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventWorkspaceFailed": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "mode": {
- "description": "@deprecated Use `agent` field instead.",
+ "type": {
+ "type": "string",
+ "enum": ["workspace.failed"]
+ },
+ "properties": {
"type": "object",
"properties": {
- "build": {
- "$ref": "#/components/schemas/AgentConfig"
- },
- "plan": {
- "$ref": "#/components/schemas/AgentConfig"
+ "message": {
+ "type": "string"
}
},
- "additionalProperties": {
- "$ref": "#/components/schemas/AgentConfig"
- }
+ "required": ["message"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventWorkspaceRestore": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "agent": {
- "description": "Agent configuration, see https://opencode.ai/docs/agents",
+ "type": {
+ "type": "string",
+ "enum": ["workspace.restore"]
+ },
+ "properties": {
"type": "object",
"properties": {
- "plan": {
- "$ref": "#/components/schemas/AgentConfig"
- },
- "build": {
- "$ref": "#/components/schemas/AgentConfig"
- },
- "general": {
- "$ref": "#/components/schemas/AgentConfig"
- },
- "explore": {
- "$ref": "#/components/schemas/AgentConfig"
+ "workspaceID": {
+ "type": "string"
},
- "title": {
- "$ref": "#/components/schemas/AgentConfig"
+ "sessionID": {
+ "type": "string"
},
- "summary": {
- "$ref": "#/components/schemas/AgentConfig"
+ "total": {
+ "type": "integer",
+ "minimum": 0
},
- "compaction": {
- "$ref": "#/components/schemas/AgentConfig"
+ "step": {
+ "type": "integer",
+ "minimum": 0
}
},
- "additionalProperties": {
- "$ref": "#/components/schemas/AgentConfig"
- }
+ "required": ["workspaceID", "sessionID", "total", "step"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventWorkspaceStatus": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "provider": {
- "description": "Custom provider configurations and model overrides",
+ "type": {
+ "type": "string",
+ "enum": ["workspace.status"]
+ },
+ "properties": {
"type": "object",
- "propertyNames": {
- "type": "string"
+ "properties": {
+ "workspaceID": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string",
+ "enum": ["connected", "connecting", "disconnected", "error"]
+ }
},
- "additionalProperties": {
- "$ref": "#/components/schemas/ProviderConfig"
- }
+ "required": ["workspaceID", "status"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventWorktreeReady": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "mcp": {
- "description": "MCP (Model Context Protocol) server configurations",
+ "type": {
+ "type": "string",
+ "enum": ["worktree.ready"]
+ },
+ "properties": {
"type": "object",
- "propertyNames": {
- "type": "string"
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "branch": {
+ "type": "string"
+ }
},
- "additionalProperties": {
- "anyOf": [
- {
- "anyOf": [
- {
- "$ref": "#/components/schemas/McpLocalConfig"
- },
- {
- "$ref": "#/components/schemas/McpRemoteConfig"
- }
- ]
- },
- {
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- }
- },
- "required": ["enabled"]
- }
- ]
- }
+ "required": ["name", "branch"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventWorktreeFailed": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "formatter": {
- "description": "Enable or configure formatters. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides.",
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "properties": {
- "disabled": {
- "type": "boolean"
- },
- "command": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "environment": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- "extensions": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
+ "type": {
+ "type": "string",
+ "enum": ["worktree.failed"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
}
- ]
+ },
+ "required": ["message"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventPtyCreated": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "lsp": {
- "description": "Enable or configure LSP servers. Omit or set to false to disable, true to enable built-ins, or an object to enable built-ins with overrides.",
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "disabled": {
- "type": "boolean",
- "const": true
- }
- },
- "required": ["disabled"]
- },
- {
- "type": "object",
- "properties": {
- "command": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "extensions": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "disabled": {
- "type": "boolean"
- },
- "env": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
- }
- },
- "initialization": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- }
- },
- "required": ["command"]
- }
- ]
- }
+ "type": {
+ "type": "string",
+ "enum": ["pty.created"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "info": {
+ "$ref": "#/components/schemas/Pty"
}
- ]
+ },
+ "required": ["info"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventPtyUpdated": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "instructions": {
- "description": "Additional instruction files or patterns to include",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": {
+ "type": "string",
+ "enum": ["pty.updated"]
},
- "layout": {
- "$ref": "#/components/schemas/LayoutConfig"
+ "properties": {
+ "type": "object",
+ "properties": {
+ "info": {
+ "$ref": "#/components/schemas/Pty"
+ }
+ },
+ "required": ["info"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventPtyExited": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "permission": {
- "$ref": "#/components/schemas/PermissionConfig"
+ "type": {
+ "type": "string",
+ "enum": ["pty.exited"]
},
- "tools": {
+ "properties": {
"type": "object",
- "propertyNames": {
- "type": "string"
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "exitCode": {
+ "type": "integer",
+ "minimum": 0
+ }
},
- "additionalProperties": {
- "type": "boolean"
- }
+ "required": ["id", "exitCode"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventPtyDeleted": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "enterprise": {
+ "type": {
+ "type": "string",
+ "enum": ["pty.deleted"]
+ },
+ "properties": {
"type": "object",
"properties": {
- "url": {
- "description": "Enterprise URL",
+ "id": {
"type": "string"
}
- }
+ },
+ "required": ["id"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventMessageUpdated": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "tool_output": {
- "description": "Thresholds for truncating tool output. When output exceeds either limit, the full text is written to the truncation directory and a preview is returned.",
+ "type": {
+ "type": "string",
+ "enum": ["message.updated"]
+ },
+ "properties": {
"type": "object",
"properties": {
- "max_lines": {
- "description": "Maximum lines of tool output before it is truncated and saved to disk (default: 2000)",
- "type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
+ "sessionID": {
+ "type": "string"
},
- "max_bytes": {
- "description": "Maximum bytes of tool output before it is truncated and saved to disk (default: 51200)",
- "type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
+ "info": {
+ "$ref": "#/components/schemas/Message"
}
- }
+ },
+ "required": ["sessionID", "info"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventMessageRemoved": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "compaction": {
+ "type": {
+ "type": "string",
+ "enum": ["message.removed"]
+ },
+ "properties": {
"type": "object",
"properties": {
- "auto": {
- "description": "Enable automatic compaction when context is full (default: true)",
- "type": "boolean"
- },
- "prune": {
- "description": "Enable pruning of old tool outputs (default: true)",
- "type": "boolean"
- },
- "tail_turns": {
- "description": "Number of recent user turns, including their following assistant/tool responses, to keep verbatim during compaction (default: 2)",
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- },
- "preserve_recent_tokens": {
- "description": "Maximum number of tokens from recent turns to preserve verbatim after compaction",
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "sessionID": {
+ "type": "string"
},
- "reserved": {
- "description": "Token buffer for compaction. Leaves enough window to avoid overflow during compaction.",
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "messageID": {
+ "type": "string"
}
- }
+ },
+ "required": ["sessionID", "messageID"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventMessagePartUpdated": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "experimental": {
+ "type": {
+ "type": "string",
+ "enum": ["message.part.updated"]
+ },
+ "properties": {
"type": "object",
"properties": {
- "disable_paste_summary": {
- "type": "boolean"
- },
- "batch_tool": {
- "description": "Enable the batch tool",
- "type": "boolean"
- },
- "openTelemetry": {
- "description": "Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)",
- "type": "boolean"
- },
- "primary_tools": {
- "description": "Tools that should only be available to primary agents.",
- "type": "array",
- "items": {
- "type": "string"
- }
+ "sessionID": {
+ "type": "string"
},
- "continue_loop_on_deny": {
- "description": "Continue the agent loop when a tool call is denied",
- "type": "boolean"
+ "part": {
+ "$ref": "#/components/schemas/Part"
},
- "mcp_timeout": {
- "description": "Timeout in milliseconds for model context protocol (MCP) requests",
+ "time": {
"type": "integer",
- "exclusiveMinimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
}
- }
+ },
+ "required": ["sessionID", "part", "time"],
+ "additionalProperties": false
}
},
+ "required": ["id", "type", "properties"],
"additionalProperties": false
},
- "BadRequestError": {
+ "EventMessagePartRemoved": {
"type": "object",
"properties": {
- "data": {},
- "errors": {
- "type": "array",
- "items": {
- "type": "object",
- "propertyNames": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["message.part.removed"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "sessionID": {
"type": "string"
},
- "additionalProperties": {}
- }
- },
- "success": {
- "type": "boolean",
- "const": false
+ "messageID": {
+ "type": "string"
+ },
+ "partID": {
+ "type": "string"
+ }
+ },
+ "required": ["sessionID", "messageID", "partID"],
+ "additionalProperties": false
}
},
- "required": ["data", "errors", "success"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "OAuth": {
+ "EventSessionCreated": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string"
+ },
"type": {
"type": "string",
- "const": "oauth"
+ "enum": ["session.created"]
},
- "refresh": {
- "type": "string"
- },
- "access": {
+ "properties": {
+ "type": "object",
+ "properties": {
+ "sessionID": {
+ "type": "string"
+ },
+ "info": {
+ "$ref": "#/components/schemas/Session"
+ }
+ },
+ "required": ["sessionID", "info"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionUpdated": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "expires": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- },
- "accountId": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["session.updated"]
},
- "enterpriseUrl": {
- "type": "string"
+ "properties": {
+ "type": "object",
+ "properties": {
+ "sessionID": {
+ "type": "string"
+ },
+ "info": {
+ "$ref": "#/components/schemas/Session"
+ }
+ },
+ "required": ["sessionID", "info"],
+ "additionalProperties": false
}
},
- "required": ["type", "refresh", "access", "expires"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "ApiAuth": {
+ "EventSessionDeleted": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string"
+ },
"type": {
"type": "string",
- "const": "api"
+ "enum": ["session.deleted"]
},
- "key": {
- "type": "string"
- },
- "metadata": {
+ "properties": {
"type": "object",
- "propertyNames": {
- "type": "string"
+ "properties": {
+ "sessionID": {
+ "type": "string"
+ },
+ "info": {
+ "$ref": "#/components/schemas/Session"
+ }
},
- "additionalProperties": {
- "type": "string"
- }
+ "required": ["sessionID", "info"],
+ "additionalProperties": false
}
},
- "required": ["type", "key"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "WellKnownAuth": {
+ "EventSessionNextAgentSwitched": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string"
+ },
"type": {
"type": "string",
- "const": "wellknown"
+ "enum": ["session.next.agent.switched"]
},
- "key": {
+ "properties": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
+ "type": "string"
+ },
+ "agent": {
+ "type": "string"
+ }
+ },
+ "required": ["timestamp", "sessionID", "agent"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionNextModelSwitched": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "token": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["session.next.model.switched"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "providerID": {
+ "type": "string"
+ },
+ "variant": {
+ "type": "string"
+ }
+ },
+ "required": ["timestamp", "sessionID", "id", "providerID"],
+ "additionalProperties": false
}
},
- "required": ["type", "key", "token"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "Auth": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/OAuth"
+ "PromptSource": {
+ "type": "object",
+ "properties": {
+ "start": {
+ "type": "number"
},
- {
- "$ref": "#/components/schemas/ApiAuth"
+ "end": {
+ "type": "number"
},
- {
- "$ref": "#/components/schemas/WellKnownAuth"
+ "text": {
+ "type": "string"
}
- ]
+ },
+ "required": ["start", "end", "text"],
+ "additionalProperties": false
},
- "Workspace": {
+ "PromptFileAttachment": {
"type": "object",
"properties": {
- "id": {
- "type": "string",
- "pattern": "^wrk.*"
+ "uri": {
+ "type": "string"
},
- "type": {
+ "mime": {
"type": "string"
},
"name": {
"type": "string"
},
- "branch": {
- "anyOf": [
- {
+ "description": {
+ "type": "string"
+ },
+ "source": {
+ "$ref": "#/components/schemas/PromptSource"
+ }
+ },
+ "required": ["uri", "mime"],
+ "additionalProperties": false
+ },
+ "PromptAgentAttachment": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "source": {
+ "$ref": "#/components/schemas/PromptSource"
+ }
+ },
+ "required": ["name"],
+ "additionalProperties": false
+ },
+ "EventSessionNextPrompted": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["session.next.prompted"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
"type": "string"
},
- {
- "type": "null"
+ "prompt": {
+ "$ref": "#/components/schemas/Prompt"
}
- ]
+ },
+ "required": ["timestamp", "sessionID", "prompt"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionNextSynthetic": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "directory": {
- "anyOf": [
- {
+ "type": {
+ "type": "string",
+ "enum": ["session.next.synthetic"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
"type": "string"
},
- {
- "type": "null"
- }
- ]
- },
- "extra": {
- "anyOf": [
- {},
- {
- "type": "null"
+ "text": {
+ "type": "string"
}
- ]
- },
- "projectID": {
- "type": "string"
+ },
+ "required": ["timestamp", "sessionID", "text"],
+ "additionalProperties": false
}
},
- "required": ["id", "type", "name", "branch", "directory", "extra", "projectID"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "NotFoundError": {
+ "EventSessionNextShellStarted": {
"type": "object",
"properties": {
- "name": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
"type": "string",
- "const": "NotFoundError"
+ "enum": ["session.next.shell.started"]
},
- "data": {
+ "properties": {
"type": "object",
"properties": {
- "message": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
+ "type": "string"
+ },
+ "callID": {
+ "type": "string"
+ },
+ "command": {
"type": "string"
}
},
- "required": ["message"]
+ "required": ["timestamp", "sessionID", "callID", "command"],
+ "additionalProperties": false
}
},
- "required": ["name", "data"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "Model": {
+ "EventSessionNextShellEnded": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "providerID": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["session.next.shell.ended"]
},
- "api": {
+ "properties": {
"type": "object",
"properties": {
- "id": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
"type": "string"
},
- "url": {
+ "callID": {
"type": "string"
},
- "npm": {
+ "output": {
"type": "string"
}
},
- "required": ["id", "url", "npm"]
- },
- "name": {
+ "required": ["timestamp", "sessionID", "callID", "output"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionNextStepStarted": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "family": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["session.next.step.started"]
},
- "capabilities": {
+ "properties": {
"type": "object",
"properties": {
- "temperature": {
- "type": "boolean"
- },
- "reasoning": {
- "type": "boolean"
- },
- "attachment": {
- "type": "boolean"
+ "timestamp": {
+ "type": "number"
},
- "toolcall": {
- "type": "boolean"
+ "sessionID": {
+ "type": "string"
},
- "input": {
- "type": "object",
- "properties": {
- "text": {
- "type": "boolean"
- },
- "audio": {
- "type": "boolean"
- },
- "image": {
- "type": "boolean"
- },
- "video": {
- "type": "boolean"
- },
- "pdf": {
- "type": "boolean"
- }
- },
- "required": ["text", "audio", "image", "video", "pdf"]
+ "agent": {
+ "type": "string"
},
- "output": {
+ "model": {
"type": "object",
"properties": {
- "text": {
- "type": "boolean"
- },
- "audio": {
- "type": "boolean"
- },
- "image": {
- "type": "boolean"
+ "id": {
+ "type": "string"
},
- "video": {
- "type": "boolean"
+ "providerID": {
+ "type": "string"
},
- "pdf": {
- "type": "boolean"
+ "variant": {
+ "type": "string"
}
},
- "required": ["text", "audio", "image", "video", "pdf"]
+ "required": ["id", "providerID"],
+ "additionalProperties": false
},
- "interleaved": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "object",
- "properties": {
- "field": {
- "type": "string",
- "enum": ["reasoning_content", "reasoning_details"]
- }
- },
- "required": ["field"]
- }
- ]
+ "snapshot": {
+ "type": "string"
}
},
- "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"]
+ "required": ["timestamp", "sessionID", "agent", "model"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionNextStepEnded": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "cost": {
+ "type": {
+ "type": "string",
+ "enum": ["session.next.step.ended"]
+ },
+ "properties": {
"type": "object",
"properties": {
- "input": {
+ "timestamp": {
"type": "number"
},
- "output": {
- "type": "number"
+ "sessionID": {
+ "type": "string"
},
- "cache": {
- "type": "object",
- "properties": {
- "read": {
- "type": "number"
- },
- "write": {
- "type": "number"
- }
- },
- "required": ["read", "write"]
+ "finish": {
+ "type": "string"
},
- "experimentalOver200K": {
+ "cost": {
+ "type": "number"
+ },
+ "tokens": {
"type": "object",
"properties": {
"input": {
- "type": "number"
+ "type": "integer",
+ "minimum": 0
},
"output": {
- "type": "number"
+ "type": "integer",
+ "minimum": 0
+ },
+ "reasoning": {
+ "type": "integer",
+ "minimum": 0
},
"cache": {
"type": "object",
"properties": {
"read": {
- "type": "number"
+ "type": "integer",
+ "minimum": 0
},
"write": {
- "type": "number"
+ "type": "integer",
+ "minimum": 0
}
},
- "required": ["read", "write"]
+ "required": ["read", "write"],
+ "additionalProperties": false
}
},
- "required": ["input", "output", "cache"]
+ "required": ["input", "output", "reasoning", "cache"],
+ "additionalProperties": false
+ },
+ "snapshot": {
+ "type": "string"
}
},
- "required": ["input", "output", "cache"]
+ "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionNextTextStarted": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "limit": {
+ "type": {
+ "type": "string",
+ "enum": ["session.next.text.started"]
+ },
+ "properties": {
"type": "object",
"properties": {
- "context": {
- "type": "number"
- },
- "input": {
+ "timestamp": {
"type": "number"
},
- "output": {
- "type": "number"
+ "sessionID": {
+ "type": "string"
}
},
- "required": ["context", "output"]
+ "required": ["timestamp", "sessionID"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionNextTextDelta": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "status": {
+ "type": {
"type": "string",
- "enum": ["alpha", "beta", "deprecated", "active"]
- },
- "options": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "enum": ["session.next.text.delta"]
},
- "headers": {
+ "properties": {
"type": "object",
- "propertyNames": {
- "type": "string"
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
+ "type": "string"
+ },
+ "delta": {
+ "type": "string"
+ }
},
- "additionalProperties": {
- "type": "string"
- }
- },
- "release_date": {
+ "required": ["timestamp", "sessionID", "delta"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionNextTextEnded": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "variants": {
+ "type": {
+ "type": "string",
+ "enum": ["session.next.text.ended"]
+ },
+ "properties": {
"type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "object",
- "propertyNames": {
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
"type": "string"
},
- "additionalProperties": {}
- }
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": ["timestamp", "sessionID", "text"],
+ "additionalProperties": false
}
},
- "required": [
- "id",
- "providerID",
- "api",
- "name",
- "capabilities",
- "cost",
- "limit",
- "status",
- "options",
- "headers",
- "release_date"
- ]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "Provider": {
+ "EventSessionNextReasoningStarted": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "name": {
- "type": "string"
- },
- "source": {
+ "type": {
"type": "string",
- "enum": ["env", "config", "custom", "api"]
+ "enum": ["session.next.reasoning.started"]
},
- "env": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "key": {
- "type": "string"
- },
- "options": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
- },
- "models": {
+ "properties": {
"type": "object",
- "propertyNames": {
- "type": "string"
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
+ "type": "string"
+ },
+ "reasoningID": {
+ "type": "string"
+ }
},
- "additionalProperties": {
- "$ref": "#/components/schemas/Model"
- }
+ "required": ["timestamp", "sessionID", "reasoningID"],
+ "additionalProperties": false
}
},
- "required": ["id", "name", "source", "env", "options", "models"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "ConsoleState": {
+ "EventSessionNextReasoningDelta": {
"type": "object",
"properties": {
- "consoleManagedProviders": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "activeOrgName": {
+ "id": {
"type": "string"
},
- "switchableOrgCount": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "type": {
+ "type": "string",
+ "enum": ["session.next.reasoning.delta"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
+ "type": "string"
+ },
+ "reasoningID": {
+ "type": "string"
+ },
+ "delta": {
+ "type": "string"
+ }
+ },
+ "required": ["timestamp", "sessionID", "reasoningID", "delta"],
+ "additionalProperties": false
}
},
- "required": ["consoleManagedProviders", "switchableOrgCount"]
- },
- "ToolIDs": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "ToolListItem": {
+ "EventSessionNextReasoningEnded": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "description": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["session.next.reasoning.ended"]
},
- "parameters": {}
+ "properties": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
+ "type": "string"
+ },
+ "reasoningID": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": ["timestamp", "sessionID", "reasoningID", "text"],
+ "additionalProperties": false
+ }
},
- "required": ["id", "description", "parameters"]
- },
- "ToolList": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ToolListItem"
- }
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "Worktree": {
+ "EventSessionNextToolInputStarted": {
"type": "object",
"properties": {
- "name": {
+ "id": {
"type": "string"
},
- "branch": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["session.next.tool.input.started"]
},
- "directory": {
- "type": "string"
+ "properties": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
+ "type": "string"
+ },
+ "callID": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": ["timestamp", "sessionID", "callID", "name"],
+ "additionalProperties": false
}
},
- "required": ["name", "branch", "directory"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "WorktreeCreateInput": {
+ "EventSessionNextToolInputDelta": {
"type": "object",
"properties": {
- "name": {
+ "id": {
"type": "string"
},
- "startCommand": {
- "description": "Additional startup script to run after the project's start command",
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["session.next.tool.input.delta"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
+ "type": "string"
+ },
+ "callID": {
+ "type": "string"
+ },
+ "delta": {
+ "type": "string"
+ }
+ },
+ "required": ["timestamp", "sessionID", "callID", "delta"],
+ "additionalProperties": false
}
- }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "WorktreeRemoveInput": {
+ "EventSessionNextToolInputEnded": {
"type": "object",
"properties": {
- "directory": {
+ "id": {
"type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["session.next.tool.input.ended"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
+ "type": "string"
+ },
+ "callID": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": ["timestamp", "sessionID", "callID", "text"],
+ "additionalProperties": false
}
},
- "required": ["directory"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "WorktreeResetInput": {
+ "EventSessionNextToolCalled": {
"type": "object",
"properties": {
- "directory": {
+ "id": {
"type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["session.next.tool.called"]
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
+ "type": "string"
+ },
+ "callID": {
+ "type": "string"
+ },
+ "tool": {
+ "type": "string"
+ },
+ "input": {
+ "type": "object"
+ },
+ "provider": {
+ "type": "object",
+ "properties": {
+ "executed": {
+ "type": "boolean"
+ },
+ "metadata": {
+ "type": "object"
+ }
+ },
+ "required": ["executed"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
+ "additionalProperties": false
}
},
- "required": ["directory"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "ProjectSummary": {
+ "ToolTextContent": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["text"]
},
- "worktree": {
+ "text": {
"type": "string"
}
},
- "required": ["id", "worktree"]
+ "required": ["type", "text"],
+ "additionalProperties": false
},
- "GlobalSession": {
+ "ToolFileContent": {
"type": "object",
"properties": {
- "id": {
+ "type": {
"type": "string",
- "pattern": "^ses.*"
+ "enum": ["file"]
},
- "slug": {
+ "uri": {
"type": "string"
},
- "projectID": {
+ "mime": {
"type": "string"
},
- "workspaceID": {
- "type": "string",
- "pattern": "^wrk.*"
- },
- "directory": {
+ "name": {
"type": "string"
- },
- "path": {
+ }
+ },
+ "required": ["type", "uri", "mime"],
+ "additionalProperties": false
+ },
+ "EventSessionNextToolProgress": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "parentID": {
+ "type": {
"type": "string",
- "pattern": "^ses.*"
+ "enum": ["session.next.tool.progress"]
},
- "summary": {
+ "properties": {
"type": "object",
"properties": {
- "additions": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "timestamp": {
+ "type": "number"
},
- "deletions": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "sessionID": {
+ "type": "string"
},
- "files": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "callID": {
+ "type": "string"
},
- "diffs": {
+ "structured": {
+ "type": "object"
+ },
+ "content": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/SnapshotFileDiff"
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ToolTextContent"
+ },
+ {
+ "$ref": "#/components/schemas/ToolFileContent"
+ }
+ ]
}
}
},
- "required": ["additions", "deletions", "files"]
- },
- "share": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string"
- }
- },
- "required": ["url"]
- },
- "title": {
+ "required": ["timestamp", "sessionID", "callID", "structured", "content"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionNextToolSuccess": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "agent": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["session.next.tool.success"]
},
- "model": {
+ "properties": {
"type": "object",
"properties": {
- "id": {
- "type": "string"
+ "timestamp": {
+ "type": "number"
},
- "providerID": {
+ "sessionID": {
"type": "string"
},
- "variant": {
+ "callID": {
"type": "string"
- }
- },
- "required": ["id", "providerID"]
- },
- "version": {
- "type": "string"
- },
- "time": {
- "type": "object",
- "properties": {
- "created": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
},
- "updated": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "structured": {
+ "type": "object"
},
- "compacting": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "content": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ToolTextContent"
+ },
+ {
+ "$ref": "#/components/schemas/ToolFileContent"
+ }
+ ]
+ }
},
- "archived": {
- "type": "number"
+ "provider": {
+ "type": "object",
+ "properties": {
+ "executed": {
+ "type": "boolean"
+ },
+ "metadata": {
+ "type": "object"
+ }
+ },
+ "required": ["executed"],
+ "additionalProperties": false
}
},
- "required": ["created", "updated"]
+ "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
+ },
+ "EventSessionNextToolError": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- "permission": {
- "$ref": "#/components/schemas/PermissionRuleset"
+ "type": {
+ "type": "string",
+ "enum": ["session.next.tool.error"]
},
- "revert": {
+ "properties": {
"type": "object",
"properties": {
- "messageID": {
- "type": "string",
- "pattern": "^msg.*"
- },
- "partID": {
- "type": "string",
- "pattern": "^prt.*"
+ "timestamp": {
+ "type": "number"
},
- "snapshot": {
+ "sessionID": {
"type": "string"
},
- "diff": {
+ "callID": {
"type": "string"
- }
- },
- "required": ["messageID"]
- },
- "project": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/ProjectSummary"
},
- {
- "type": "null"
+ "error": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": ["type", "message"],
+ "additionalProperties": false
+ },
+ "provider": {
+ "type": "object",
+ "properties": {
+ "executed": {
+ "type": "boolean"
+ },
+ "metadata": {
+ "type": "object"
+ }
+ },
+ "required": ["executed"],
+ "additionalProperties": false
}
- ]
+ },
+ "required": ["timestamp", "sessionID", "callID", "error", "provider"],
+ "additionalProperties": false
}
},
- "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "McpResource": {
+ "SessionNextRetry_error": {
"type": "object",
"properties": {
- "name": {
+ "message": {
"type": "string"
},
- "uri": {
- "type": "string"
+ "statusCode": {
+ "type": "integer",
+ "minimum": 0
},
- "description": {
- "type": "string"
+ "isRetryable": {
+ "type": "boolean"
},
- "mimeType": {
- "type": "string"
+ "responseHeaders": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
},
- "client": {
+ "responseBody": {
"type": "string"
+ },
+ "metadata": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
}
},
- "required": ["name", "uri", "client"]
+ "required": ["message", "isRetryable"],
+ "additionalProperties": false
},
- "TextPartInput": {
+ "EventSessionNextRetried": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "text"
- },
- "text": {
- "type": "string"
- },
- "synthetic": {
- "type": "boolean"
- },
- "ignored": {
- "type": "boolean"
+ "enum": ["session.next.retried"]
},
- "time": {
+ "properties": {
"type": "object",
"properties": {
- "start": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "timestamp": {
+ "type": "number"
},
- "end": {
+ "sessionID": {
+ "type": "string"
+ },
+ "attempt": {
"type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "minimum": 0
+ },
+ "error": {
+ "$ref": "#/components/schemas/SessionNextRetry_error"
}
},
- "required": ["start"]
- },
- "metadata": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ "required": ["timestamp", "sessionID", "attempt", "error"],
+ "additionalProperties": false
}
},
- "required": ["type", "text"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "FilePartInput": {
+ "EventSessionNextCompactionStarted": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "file"
+ "enum": ["session.next.compaction.started"]
},
- "mime": {
- "type": "string"
- },
- "filename": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "source": {
- "$ref": "#/components/schemas/FilePartSource"
+ "properties": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
+ "type": "string"
+ },
+ "reason": {
+ "type": "string",
+ "enum": ["auto", "manual"]
+ }
+ },
+ "required": ["timestamp", "sessionID", "reason"],
+ "additionalProperties": false
}
},
- "required": ["type", "mime", "url"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "AgentPartInput": {
+ "EventSessionNextCompactionDelta": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "agent"
+ "enum": ["session.next.compaction.delta"]
},
- "name": {
- "type": "string"
- },
- "source": {
+ "properties": {
"type": "object",
"properties": {
- "value": {
- "type": "string"
+ "timestamp": {
+ "type": "number"
},
- "start": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "sessionID": {
+ "type": "string"
},
- "end": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "text": {
+ "type": "string"
}
},
- "required": ["value", "start", "end"]
+ "required": ["timestamp", "sessionID", "text"],
+ "additionalProperties": false
}
},
- "required": ["type", "name"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "SubtaskPartInput": {
+ "EventSessionNextCompactionEnded": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^prt.*"
+ "type": "string"
},
"type": {
"type": "string",
- "const": "subtask"
+ "enum": ["session.next.compaction.ended"]
},
- "prompt": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "agent": {
- "type": "string"
- },
- "model": {
+ "properties": {
"type": "object",
"properties": {
- "providerID": {
+ "timestamp": {
+ "type": "number"
+ },
+ "sessionID": {
"type": "string"
},
- "modelID": {
+ "text": {
+ "type": "string"
+ },
+ "include": {
"type": "string"
}
},
- "required": ["providerID", "modelID"]
- },
- "command": {
- "type": "string"
+ "required": ["timestamp", "sessionID", "text"],
+ "additionalProperties": false
}
},
- "required": ["type", "prompt", "description", "agent"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "ProviderAuthMethod": {
+ "EventServerConnected": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string"
+ },
"type": {
"type": "string",
- "enum": ["oauth", "api"]
+ "enum": ["server.connected"]
},
- "label": {
- "type": "string"
- },
- "prompts": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "text"
- },
- "key": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "placeholder": {
- "type": "string"
- },
- "when": {
- "type": "object",
- "properties": {
- "key": {
- "type": "string"
- },
- "op": {
- "type": "string",
- "enum": ["eq", "neq"]
- },
- "value": {
- "type": "string"
- }
- },
- "required": ["key", "op", "value"]
- }
- },
- "required": ["type", "key", "message"]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "select"
- },
- "key": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "options": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "label": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "hint": {
- "type": "string"
- }
- },
- "required": ["label", "value"]
- }
- },
- "when": {
- "type": "object",
- "properties": {
- "key": {
- "type": "string"
- },
- "op": {
- "type": "string",
- "enum": ["eq", "neq"]
- },
- "value": {
- "type": "string"
- }
- },
- "required": ["key", "op", "value"]
- }
- },
- "required": ["type", "key", "message", "options"]
- }
- ]
- }
+ "properties": {
+ "type": "object",
+ "properties": {}
}
},
- "required": ["type", "label"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "ProviderAuthAuthorization": {
+ "EventGlobalDisposed": {
"type": "object",
"properties": {
- "url": {
+ "id": {
"type": "string"
},
- "method": {
+ "type": {
"type": "string",
- "enum": ["auto", "code"]
+ "enum": ["global.disposed"]
},
- "instructions": {
- "type": "string"
+ "properties": {
+ "type": "object",
+ "properties": {}
}
},
- "required": ["url", "method", "instructions"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "Symbol": {
+ "SessionInfo": {
"type": "object",
"properties": {
- "name": {
+ "id": {
"type": "string"
},
- "kind": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "parentID": {
+ "type": "string"
},
- "location": {
+ "projectID": {
+ "type": "string"
+ },
+ "workspaceID": {
+ "type": "string"
+ },
+ "path": {
+ "type": "string"
+ },
+ "agent": {
+ "type": "string"
+ },
+ "model": {
"type": "object",
"properties": {
- "uri": {
+ "id": {
"type": "string"
},
- "range": {
- "$ref": "#/components/schemas/Range"
+ "providerID": {
+ "type": "string"
+ },
+ "variant": {
+ "type": "string"
}
},
- "required": ["uri", "range"]
+ "required": ["id", "providerID"],
+ "additionalProperties": false
+ },
+ "time": {
+ "type": "object",
+ "properties": {
+ "created": {
+ "type": "number"
+ },
+ "updated": {
+ "type": "number"
+ },
+ "archived": {
+ "type": "number"
+ }
+ },
+ "required": ["created", "updated"],
+ "additionalProperties": false
+ },
+ "title": {
+ "type": "string"
}
},
- "required": ["name", "kind", "location"]
+ "required": ["id", "projectID", "time", "title"],
+ "additionalProperties": false
},
- "FileNode": {
+ "SessionDelivery": {
+ "type": "string",
+ "enum": ["immediate", "deferred"]
+ },
+ "SessionMessageAgentSwitched": {
"type": "object",
"properties": {
- "name": {
+ "id": {
"type": "string"
},
- "path": {
- "type": "string"
+ "metadata": {
+ "type": "object"
},
- "absolute": {
- "type": "string"
+ "time": {
+ "type": "object",
+ "properties": {
+ "created": {
+ "type": "number"
+ }
+ },
+ "required": ["created"],
+ "additionalProperties": false
},
"type": {
"type": "string",
- "enum": ["file", "directory"]
+ "enum": ["agent-switched"]
},
- "ignored": {
- "type": "boolean"
+ "agent": {
+ "type": "string"
}
},
- "required": ["name", "path", "absolute", "type", "ignored"]
+ "required": ["id", "time", "type", "agent"],
+ "additionalProperties": false
},
- "FileContent": {
+ "SessionMessageModelSwitched": {
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "enum": ["text", "binary"]
- },
- "content": {
+ "id": {
"type": "string"
},
- "diff": {
- "type": "string"
+ "metadata": {
+ "type": "object"
},
- "patch": {
+ "time": {
"type": "object",
"properties": {
- "oldFileName": {
- "type": "string"
- },
- "newFileName": {
- "type": "string"
- },
- "oldHeader": {
+ "created": {
+ "type": "number"
+ }
+ },
+ "required": ["created"],
+ "additionalProperties": false
+ },
+ "type": {
+ "type": "string",
+ "enum": ["model-switched"]
+ },
+ "model": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- "newHeader": {
+ "providerID": {
"type": "string"
},
- "hunks": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "oldStart": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- },
- "oldLines": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- },
- "newStart": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- },
- "newLines": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
- },
- "lines": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"]
- }
- },
- "index": {
+ "variant": {
"type": "string"
}
},
- "required": ["oldFileName", "newFileName", "hunks"]
- },
- "encoding": {
- "type": "string",
- "const": "base64"
- },
- "mimeType": {
- "type": "string"
+ "required": ["id", "providerID"],
+ "additionalProperties": false
}
},
- "required": ["type", "content"]
+ "required": ["id", "time", "type", "model"],
+ "additionalProperties": false
},
- "File": {
+ "SessionMessageUser": {
"type": "object",
"properties": {
- "path": {
+ "id": {
"type": "string"
},
- "added": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "metadata": {
+ "type": "object"
},
- "removed": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "time": {
+ "type": "object",
+ "properties": {
+ "created": {
+ "type": "number"
+ }
+ },
+ "required": ["created"],
+ "additionalProperties": false
},
- "status": {
+ "text": {
+ "type": "string"
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/PromptFileAttachment"
+ }
+ },
+ "agents": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/PromptAgentAttachment"
+ }
+ },
+ "type": {
"type": "string",
- "enum": ["added", "deleted", "modified"]
+ "enum": ["user"]
}
},
- "required": ["path", "added", "removed", "status"]
+ "required": ["id", "time", "text", "type"],
+ "additionalProperties": false
},
- "Event": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/Event.server.instance.disposed"
- },
- {
- "$ref": "#/components/schemas/Event.file.edited"
- },
- {
- "$ref": "#/components/schemas/Event.file.watcher.updated"
- },
- {
- "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
- },
- {
- "$ref": "#/components/schemas/Event.lsp.updated"
- },
- {
- "$ref": "#/components/schemas/Event.message.part.delta"
- },
- {
- "$ref": "#/components/schemas/Event.permission.asked"
- },
- {
- "$ref": "#/components/schemas/Event.permission.replied"
- },
- {
- "$ref": "#/components/schemas/Event.session.diff"
- },
- {
- "$ref": "#/components/schemas/Event.session.error"
- },
- {
- "$ref": "#/components/schemas/Event.installation.updated"
- },
- {
- "$ref": "#/components/schemas/Event.installation.update-available"
- },
- {
- "$ref": "#/components/schemas/Event.question.asked"
- },
- {
- "$ref": "#/components/schemas/Event.question.replied"
- },
- {
- "$ref": "#/components/schemas/Event.question.rejected"
- },
- {
- "$ref": "#/components/schemas/Event.todo.updated"
- },
- {
- "$ref": "#/components/schemas/Event.session.status"
- },
- {
- "$ref": "#/components/schemas/Event.session.idle"
- },
- {
- "$ref": "#/components/schemas/Event.session.compacted"
- },
- {
- "$ref": "#/components/schemas/Event.tui.prompt.append"
- },
- {
- "$ref": "#/components/schemas/Event.tui.command.execute"
- },
- {
- "$ref": "#/components/schemas/Event.tui.toast.show"
- },
- {
- "$ref": "#/components/schemas/Event.tui.session.select"
- },
- {
- "$ref": "#/components/schemas/Event.mcp.tools.changed"
- },
- {
- "$ref": "#/components/schemas/Event.mcp.browser.open.failed"
- },
- {
- "$ref": "#/components/schemas/Event.command.executed"
- },
- {
- "$ref": "#/components/schemas/Event.project.updated"
- },
- {
- "$ref": "#/components/schemas/Event.vcs.branch.updated"
- },
- {
- "$ref": "#/components/schemas/Event.workspace.ready"
- },
- {
- "$ref": "#/components/schemas/Event.workspace.failed"
- },
- {
- "$ref": "#/components/schemas/Event.workspace.restore"
- },
- {
- "$ref": "#/components/schemas/Event.workspace.status"
- },
- {
- "$ref": "#/components/schemas/Event.worktree.ready"
- },
- {
- "$ref": "#/components/schemas/Event.worktree.failed"
- },
- {
- "$ref": "#/components/schemas/Event.pty.created"
- },
- {
- "$ref": "#/components/schemas/Event.pty.updated"
- },
- {
- "$ref": "#/components/schemas/Event.pty.exited"
- },
- {
- "$ref": "#/components/schemas/Event.pty.deleted"
- },
- {
- "$ref": "#/components/schemas/Event.message.updated"
- },
- {
- "$ref": "#/components/schemas/Event.message.removed"
- },
- {
- "$ref": "#/components/schemas/Event.message.part.updated"
- },
- {
- "$ref": "#/components/schemas/Event.message.part.removed"
- },
- {
- "$ref": "#/components/schemas/Event.session.created"
- },
- {
- "$ref": "#/components/schemas/Event.session.updated"
- },
- {
- "$ref": "#/components/schemas/Event.session.deleted"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.agent.switched"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.model.switched"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.prompted"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.synthetic"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.shell.started"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.shell.ended"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.step.started"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.step.ended"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.text.started"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.text.delta"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.text.ended"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.reasoning.started"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.reasoning.delta"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.reasoning.ended"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.tool.input.started"
- },
- {
- "$ref": "#/components/schemas/Event.session.next.tool.input.delta"
+ "SessionMessageSynthetic": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- {
- "$ref": "#/components/schemas/Event.session.next.tool.input.ended"
+ "metadata": {
+ "type": "object"
},
- {
- "$ref": "#/components/schemas/Event.session.next.tool.called"
+ "time": {
+ "type": "object",
+ "properties": {
+ "created": {
+ "type": "number"
+ }
+ },
+ "required": ["created"],
+ "additionalProperties": false
},
- {
- "$ref": "#/components/schemas/Event.session.next.tool.progress"
+ "sessionID": {
+ "type": "string"
},
- {
- "$ref": "#/components/schemas/Event.session.next.tool.success"
+ "text": {
+ "type": "string"
},
- {
- "$ref": "#/components/schemas/Event.session.next.tool.error"
+ "type": {
+ "type": "string",
+ "enum": ["synthetic"]
+ }
+ },
+ "required": ["id", "time", "sessionID", "text", "type"],
+ "additionalProperties": false
+ },
+ "SessionMessageShell": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
},
- {
- "$ref": "#/components/schemas/Event.session.next.retried"
+ "metadata": {
+ "type": "object"
},
- {
- "$ref": "#/components/schemas/Event.session.next.compaction.started"
+ "time": {
+ "type": "object",
+ "properties": {
+ "created": {
+ "type": "number"
+ },
+ "completed": {
+ "type": "number"
+ }
+ },
+ "required": ["created"],
+ "additionalProperties": false
},
- {
- "$ref": "#/components/schemas/Event.session.next.compaction.delta"
+ "type": {
+ "type": "string",
+ "enum": ["shell"]
},
- {
- "$ref": "#/components/schemas/Event.session.next.compaction.ended"
+ "callID": {
+ "type": "string"
},
- {
- "$ref": "#/components/schemas/Event.server.connected"
+ "command": {
+ "type": "string"
},
- {
- "$ref": "#/components/schemas/Event.global.disposed"
+ "output": {
+ "type": "string"
}
- ]
+ },
+ "required": ["id", "time", "type", "callID", "command", "output"],
+ "additionalProperties": false
},
- "MCPStatusConnected": {
+ "SessionMessageAssistantText": {
"type": "object",
"properties": {
- "status": {
+ "type": {
"type": "string",
- "const": "connected"
+ "enum": ["text"]
+ },
+ "text": {
+ "type": "string"
}
},
- "required": ["status"]
+ "required": ["type", "text"],
+ "additionalProperties": false
},
- "MCPStatusDisabled": {
+ "SessionMessageAssistantReasoning": {
"type": "object",
"properties": {
- "status": {
+ "type": {
"type": "string",
- "const": "disabled"
+ "enum": ["reasoning"]
+ },
+ "id": {
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
}
},
- "required": ["status"]
+ "required": ["type", "id", "text"],
+ "additionalProperties": false
},
- "MCPStatusFailed": {
+ "SessionMessageToolStatePending": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "const": "failed"
+ "enum": ["pending"]
},
- "error": {
+ "input": {
"type": "string"
}
},
- "required": ["status", "error"]
+ "required": ["status", "input"],
+ "additionalProperties": false
},
- "MCPStatusNeedsAuth": {
+ "SessionMessageToolStateRunning": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "const": "needs_auth"
+ "enum": ["running"]
+ },
+ "input": {
+ "type": "object"
+ },
+ "structured": {
+ "type": "object"
+ },
+ "content": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ToolTextContent"
+ },
+ {
+ "$ref": "#/components/schemas/ToolFileContent"
+ }
+ ]
+ }
}
},
- "required": ["status"]
+ "required": ["status", "input", "structured", "content"],
+ "additionalProperties": false
},
- "MCPStatusNeedsClientRegistration": {
+ "SessionMessageToolStateCompleted": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "const": "needs_client_registration"
+ "enum": ["completed"]
},
- "error": {
- "type": "string"
- }
- },
- "required": ["status", "error"]
- },
- "MCPStatus": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/MCPStatusConnected"
- },
- {
- "$ref": "#/components/schemas/MCPStatusDisabled"
+ "input": {
+ "type": "object"
},
- {
- "$ref": "#/components/schemas/MCPStatusFailed"
+ "attachments": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/PromptFileAttachment"
+ }
},
- {
- "$ref": "#/components/schemas/MCPStatusNeedsAuth"
+ "content": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ToolTextContent"
+ },
+ {
+ "$ref": "#/components/schemas/ToolFileContent"
+ }
+ ]
+ }
},
- {
- "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
- }
- ]
- },
- "McpUnsupportedOAuthError": {
- "type": "object",
- "properties": {
- "error": {
- "type": "string"
+ "structured": {
+ "type": "object"
}
},
- "required": ["error"]
+ "required": ["status", "input", "content", "structured"],
+ "additionalProperties": false
},
- "Path": {
+ "SessionMessageToolStateError": {
"type": "object",
"properties": {
- "home": {
- "type": "string"
+ "status": {
+ "type": "string",
+ "enum": ["error"]
},
- "state": {
- "type": "string"
+ "input": {
+ "type": "object"
},
- "config": {
- "type": "string"
+ "content": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ToolTextContent"
+ },
+ {
+ "$ref": "#/components/schemas/ToolFileContent"
+ }
+ ]
+ }
},
- "worktree": {
- "type": "string"
+ "structured": {
+ "type": "object"
},
- "directory": {
- "type": "string"
+ "error": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": ["type", "message"],
+ "additionalProperties": false
}
},
- "required": ["home", "state", "config", "worktree", "directory"]
+ "required": ["status", "input", "content", "structured", "error"],
+ "additionalProperties": false
},
- "VcsInfo": {
+ "SessionMessageAssistantTool": {
"type": "object",
"properties": {
- "branch": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["tool"]
},
- "default_branch": {
- "type": "string"
- }
- }
- },
- "VcsFileDiff": {
- "type": "object",
- "properties": {
- "file": {
+ "id": {
"type": "string"
},
- "patch": {
+ "name": {
"type": "string"
},
- "additions": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "provider": {
+ "type": "object",
+ "properties": {
+ "executed": {
+ "type": "boolean"
+ },
+ "metadata": {
+ "type": "object"
+ }
+ },
+ "required": ["executed"],
+ "additionalProperties": false
},
- "deletions": {
- "type": "integer",
- "minimum": 0,
- "maximum": 9007199254740991
+ "state": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/SessionMessageToolStatePending"
+ },
+ {
+ "$ref": "#/components/schemas/SessionMessageToolStateRunning"
+ },
+ {
+ "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
+ },
+ {
+ "$ref": "#/components/schemas/SessionMessageToolStateError"
+ }
+ ]
},
- "status": {
- "type": "string",
- "enum": ["added", "deleted", "modified"]
+ "time": {
+ "type": "object",
+ "properties": {
+ "created": {
+ "type": "number"
+ },
+ "ran": {
+ "type": "number"
+ },
+ "completed": {
+ "type": "number"
+ },
+ "pruned": {
+ "type": "number"
+ }
+ },
+ "required": ["created"],
+ "additionalProperties": false
}
},
- "required": ["file", "patch", "additions", "deletions"]
+ "required": ["type", "id", "name", "state", "time"],
+ "additionalProperties": false
},
- "Command": {
+ "SessionMessageAssistant": {
"type": "object",
"properties": {
- "name": {
+ "id": {
"type": "string"
},
- "description": {
- "type": "string"
+ "metadata": {
+ "type": "object"
+ },
+ "time": {
+ "type": "object",
+ "properties": {
+ "created": {
+ "type": "number"
+ },
+ "completed": {
+ "type": "number"
+ }
+ },
+ "required": ["created"],
+ "additionalProperties": false
+ },
+ "type": {
+ "type": "string",
+ "enum": ["assistant"]
},
"agent": {
"type": "string"
},
"model": {
- "type": "string"
- },
- "source": {
- "type": "string",
- "enum": ["command", "mcp", "skill"]
- },
- "template": {
- "anyOf": [
- {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
},
- {
+ "providerID": {
+ "type": "string"
+ },
+ "variant": {
"type": "string"
}
- ]
- },
- "subtask": {
- "type": "boolean"
+ },
+ "required": ["id", "providerID"],
+ "additionalProperties": false
},
- "hints": {
+ "content": {
"type": "array",
"items": {
- "type": "string"
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/SessionMessageAssistantText"
+ },
+ {
+ "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
+ },
+ {
+ "$ref": "#/components/schemas/SessionMessageAssistantTool"
+ }
+ ]
}
+ },
+ "snapshot": {
+ "type": "object",
+ "properties": {
+ "start": {
+ "type": "string"
+ },
+ "end": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "finish": {
+ "type": "string"
+ },
+ "cost": {
+ "type": "number"
+ },
+ "tokens": {
+ "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
+ },
+ "error": {
+ "type": "string"
}
},
- "required": ["name", "template", "hints"]
+ "required": ["id", "time", "type", "agent", "model", "content"],
+ "additionalProperties": false
},
- "Agent": {
+ "SessionMessageCompaction": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "mode": {
+ "type": {
"type": "string",
- "enum": ["subagent", "primary", "all"]
- },
- "native": {
- "type": "boolean"
+ "enum": ["compaction"]
},
- "hidden": {
- "type": "boolean"
+ "reason": {
+ "type": "string",
+ "enum": ["auto", "manual"]
},
- "topP": {
- "type": "number"
+ "summary": {
+ "type": "string"
},
- "temperature": {
- "type": "number"
+ "include": {
+ "type": "string"
},
- "color": {
+ "id": {
"type": "string"
},
- "permission": {
- "$ref": "#/components/schemas/PermissionRuleset"
+ "metadata": {
+ "type": "object"
},
- "model": {
+ "time": {
"type": "object",
"properties": {
- "modelID": {
- "type": "string"
- },
- "providerID": {
- "type": "string"
+ "created": {
+ "type": "number"
}
},
- "required": ["modelID", "providerID"]
+ "required": ["created"],
+ "additionalProperties": false
+ }
+ },
+ "required": ["type", "reason", "summary", "id", "time"],
+ "additionalProperties": false
+ },
+ "SessionMessage": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/SessionMessageAgentSwitched"
},
- "variant": {
- "type": "string"
+ {
+ "$ref": "#/components/schemas/SessionMessageModelSwitched"
},
- "prompt": {
- "type": "string"
+ {
+ "$ref": "#/components/schemas/SessionMessageUser"
},
- "options": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {}
+ {
+ "$ref": "#/components/schemas/SessionMessageSynthetic"
},
- "steps": {
- "type": "number"
+ {
+ "$ref": "#/components/schemas/SessionMessageShell"
+ },
+ {
+ "$ref": "#/components/schemas/SessionMessageAssistant"
+ },
+ {
+ "$ref": "#/components/schemas/SessionMessageCompaction"
}
- },
- "required": ["name", "mode", "permission", "options"]
+ ]
},
- "LSPStatus": {
+ "EventTuiToastShow1": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
- "name": {
- "type": "string"
- },
- "root": {
- "type": "string"
+ "type": {
+ "type": "string",
+ "enum": ["tui.toast.show"]
},
- "status": {
- "anyOf": [
- {
- "type": "string",
- "const": "connected"
+ "properties": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
},
- {
+ "message": {
+ "type": "string"
+ },
+ "variant": {
"type": "string",
- "const": "error"
+ "enum": ["info", "success", "warning", "error"]
+ },
+ "duration": {
+ "type": "integer",
+ "exclusiveMinimum": 0
}
- ]
+ },
+ "required": ["message", "variant"],
+ "additionalProperties": false
}
},
- "required": ["id", "name", "root", "status"]
+ "required": ["id", "type", "properties"],
+ "additionalProperties": false
},
- "FormatterStatus": {
+ "BadRequestError": {
"type": "object",
+ "required": ["data", "errors", "success"],
"properties": {
- "name": {
- "type": "string"
- },
- "extensions": {
+ "data": {},
+ "errors": {
"type": "array",
"items": {
- "type": "string"
+ "type": "object",
+ "additionalProperties": {}
}
},
- "enabled": {
- "type": "boolean"
+ "success": {
+ "type": "boolean",
+ "enum": [false]
}
- },
- "required": ["name", "extensions", "enabled"]
+ }
+ },
+ "NotFoundError": {
+ "type": "object",
+ "required": ["name", "data"],
+ "properties": {
+ "name": {
+ "type": "string",
+ "enum": ["NotFoundError"]
+ },
+ "data": {
+ "type": "object",
+ "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
}
}
- }
+ },
+ "security": [],
+ "tags": [
+ {
+ "name": "control",
+ "description": "Control plane routes."
+ },
+ {
+ "name": "global",
+ "description": "Global server routes."
+ },
+ {
+ "name": "event",
+ "description": "Instance event stream route."
+ },
+ {
+ "name": "config",
+ "description": "Experimental HttpApi config routes."
+ },
+ {
+ "name": "experimental",
+ "description": "Experimental HttpApi read-only routes."
+ },
+ {
+ "name": "file",
+ "description": "Experimental HttpApi file routes."
+ },
+ {
+ "name": "instance",
+ "description": "Experimental HttpApi instance read routes."
+ },
+ {
+ "name": "mcp",
+ "description": "Experimental HttpApi MCP routes."
+ },
+ {
+ "name": "project",
+ "description": "Experimental HttpApi project routes."
+ },
+ {
+ "name": "pty",
+ "description": "Experimental HttpApi PTY routes."
+ },
+ {
+ "name": "question",
+ "description": "Question routes."
+ },
+ {
+ "name": "permission",
+ "description": "Experimental HttpApi permission routes."
+ },
+ {
+ "name": "provider",
+ "description": "Experimental HttpApi provider routes."
+ },
+ {
+ "name": "session",
+ "description": "Experimental HttpApi session routes."
+ },
+ {
+ "name": "sync",
+ "description": "Experimental HttpApi sync routes."
+ },
+ {
+ "name": "v2",
+ "description": "Experimental v2 routes."
+ },
+ {
+ "name": "v2 messages",
+ "description": "Experimental v2 message routes."
+ },
+ {
+ "name": "tui",
+ "description": "Experimental HttpApi TUI routes."
+ },
+ {
+ "name": "workspace",
+ "description": "Experimental HttpApi workspace routes."
+ },
+ {
+ "name": "pty",
+ "description": "PTY websocket route."
+ }
+ ]
}