2025-12-06 01:07:10 +00:00
{
"openapi" : "3.1.1" ,
"info" : {
"title" : "opencode" ,
"description" : "opencode api" ,
"version" : "1.0.0"
} ,
"paths" : {
2025-12-23 01:17:33 +00:00
"/global/health" : {
"get" : {
"operationId" : "global.health" ,
"summary" : "Get health" ,
"description" : "Get health information about the OpenCode server." ,
"responses" : {
"200" : {
"description" : "Health information" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"healthy" : {
"type" : "boolean" ,
"const" : true
} ,
"version" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "healthy" , "version" ]
2025-12-23 01:17:33 +00:00
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
}
]
}
} ,
2025-12-06 01:07:10 +00:00
"/global/event" : {
"get" : {
"operationId" : "global.event" ,
2025-12-08 00:58:04 +00:00
"summary" : "Get global events" ,
"description" : "Subscribe to global events from the OpenCode system using server-sent events." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Event stream" ,
"content" : {
"text/event-stream" : {
"schema" : {
"$ref" : "#/components/schemas/GlobalEvent"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2026-01-27 14:53:48 +00:00
"/global/config" : {
"get" : {
"operationId" : "global.config.get" ,
"summary" : "Get global configuration" ,
"description" : "Retrieve the current global OpenCode configuration settings and preferences." ,
"responses" : {
"200" : {
"description" : "Get global config info" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Config"
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
}
]
} ,
"patch" : {
"operationId" : "global.config.update" ,
"summary" : "Update global configuration" ,
"description" : "Update global OpenCode configuration settings and preferences." ,
"responses" : {
"200" : {
"description" : "Successfully updated global config" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Config"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Config"
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
}
]
}
} ,
2025-12-11 03:22:51 +00:00
"/global/dispose" : {
"post" : {
"operationId" : "global.dispose" ,
"summary" : "Dispose instance" ,
"description" : "Clean up and dispose all OpenCode instances, releasing all resources." ,
"responses" : {
"200" : {
"description" : "Global disposed" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
}
]
}
} ,
2026-01-28 13:28:52 +00:00
"/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"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"parameters" : [
{
"in" : "path" ,
"name" : "providerID" ,
"schema" : {
"type" : "string"
} ,
"required" : true
}
] ,
"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" : {
"operationId" : "auth.remove" ,
"summary" : "Remove auth credentials" ,
"description" : "Remove authentication credentials" ,
"responses" : {
"200" : {
"description" : "Successfully removed authentication credentials" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"parameters" : [
{
"in" : "path" ,
"name" : "providerID" ,
"schema" : {
"type" : "string"
} ,
"required" : true
}
] ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
}
]
}
} ,
2025-12-06 01:07:10 +00:00
"/project" : {
"get" : {
"operationId" : "project.list" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "List all projects" ,
"description" : "Get a list of projects that have been opened with OpenCode." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "List of projects" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Project"
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/project/current" : {
"get" : {
"operationId" : "project.current" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get current project" ,
"description" : "Retrieve the currently active project that OpenCode is working with." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
2025-12-08 00:58:04 +00:00
"description" : "Current project information" ,
2025-12-06 01:07:10 +00:00
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Project"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-06 19:40:36 +00:00
"/project/git/init" : {
"post" : {
"operationId" : "project.initGit" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"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" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Project"
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
}
]
}
} ,
2025-12-09 19:30:32 +00:00
"/project/{projectID}" : {
"patch" : {
"operationId" : "project.update" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-09 19:30:32 +00:00
{
"in" : "path" ,
"name" : "projectID" ,
"schema" : {
"type" : "string"
} ,
"required" : true
}
] ,
"summary" : "Update project" ,
2026-01-22 13:41:20 +00:00
"description" : "Update project properties such as name, icon, and commands." ,
2025-12-09 19:30:32 +00:00
"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"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"icon" : {
2025-12-09 19:54:19 +00:00
"type" : "object" ,
"properties" : {
"url" : {
"type" : "string"
} ,
2026-01-19 21:00:39 +00:00
"override" : {
"type" : "string"
} ,
2025-12-09 19:54:19 +00:00
"color" : {
"type" : "string"
}
2025-12-09 20:11:32 +00:00
}
2026-01-22 13:41:20 +00:00
} ,
"commands" : {
"type" : "object" ,
"properties" : {
"start" : {
"description" : "Startup script to run when creating a new workspace (worktree)" ,
"type" : "string"
}
}
2025-12-09 19:30:32 +00:00
}
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
}
]
}
} ,
2025-12-06 01:07:10 +00:00
"/pty" : {
"get" : {
"operationId" : "pty.list" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "List PTY sessions" ,
"description" : "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "List of sessions" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Pty"
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
} ,
"post" : {
"operationId" : "pty.create" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Create PTY session" ,
"description" : "Create a new pseudo-terminal (PTY) session for running shell commands and processes." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Created session" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Pty"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"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" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "string"
}
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/pty/{ptyID}" : {
2025-12-06 01:07:10 +00:00
"get" : {
"operationId" : "pty.get" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "ptyID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-12 01:50:44 +00:00
"type" : "string" ,
"pattern" : "^pty.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get PTY session" ,
"description" : "Retrieve detailed information about a specific pseudo-terminal (PTY) session." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Session info" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Pty"
}
}
}
} ,
"404" : {
"description" : "Not found" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/NotFoundError"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
} ,
"put" : {
"operationId" : "pty.update" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "ptyID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-12 01:50:44 +00:00
"type" : "string" ,
"pattern" : "^pty.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Update PTY session" ,
"description" : "Update properties of an existing pseudo-terminal (PTY) session." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Updated session" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Pty"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"title" : {
"type" : "string"
} ,
"size" : {
"type" : "object" ,
"properties" : {
"rows" : {
"type" : "number"
} ,
"cols" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "rows" , "cols" ]
2025-12-06 01:07:10 +00:00
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
} ,
"delete" : {
"operationId" : "pty.remove" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "ptyID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-12 01:50:44 +00:00
"type" : "string" ,
"pattern" : "^pty.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Remove PTY session" ,
"description" : "Remove and terminate a specific pseudo-terminal (PTY) session." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Session removed" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
} ,
"404" : {
"description" : "Not found" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/NotFoundError"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/pty/{ptyID}/connect" : {
2025-12-06 01:07:10 +00:00
"get" : {
"operationId" : "pty.connect" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "ptyID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-12 01:50:44 +00:00
"type" : "string" ,
"pattern" : "^pty.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Connect to PTY session" ,
"description" : "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Connected session" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
} ,
"404" : {
"description" : "Not found" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/NotFoundError"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/config" : {
"get" : {
"operationId" : "config.get" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get configuration" ,
"description" : "Retrieve the current OpenCode configuration settings and preferences." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Get config info" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Config"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
} ,
"patch" : {
"operationId" : "config.update" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Update configuration" ,
"description" : "Update OpenCode configuration settings and preferences." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Successfully updated config" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Config"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Config"
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2026-01-16 21:21:54 +00:00
"/config/providers" : {
"get" : {
"operationId" : "config.providers" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-16 21:21:54 +00:00
}
] ,
"summary" : "List config providers" ,
"description" : "Get a list of all configured AI providers and their default models." ,
"responses" : {
"200" : {
"description" : "List of providers" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"providers" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Provider"
}
} ,
"default" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "string"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "providers" , "default" ]
2026-01-16 21:21:54 +00:00
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
}
]
}
} ,
2025-12-06 01:07:10 +00:00
"/experimental/tool/ids" : {
"get" : {
"operationId" : "tool.ids" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "List tool IDs" ,
"description" : "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Tool IDs" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ToolIDs"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/experimental/tool" : {
"get" : {
"operationId" : "tool.list" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "query" ,
"name" : "provider" ,
"schema" : {
"type" : "string"
} ,
"required" : true
} ,
{
"in" : "query" ,
"name" : "model" ,
"schema" : {
"type" : "string"
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "List tools" ,
"description" : "Get a list of available tools with their JSON schema parameters for a specific provider and model combination." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Tools" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ToolList"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-04 02:36:18 +00:00
"/experimental/workspace" : {
2026-01-03 02:17:34 +00:00
"post" : {
2026-03-04 02:36:18 +00:00
"operationId" : "experimental.workspace.create" ,
2026-01-03 02:17:34 +00:00
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-03 02:17:34 +00:00
}
] ,
2026-03-04 02:36:18 +00:00
"summary" : "Create workspace" ,
"description" : "Create a workspace for the current project." ,
2026-01-03 02:17:34 +00:00
"responses" : {
"200" : {
2026-03-04 02:36:18 +00:00
"description" : "Workspace created" ,
2026-01-03 02:17:34 +00:00
"content" : {
"application/json" : {
"schema" : {
2026-03-04 02:36:18 +00:00
"$ref" : "#/components/schemas/Workspace"
2026-01-03 02:17:34 +00:00
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
2026-03-04 02:36:18 +00:00
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string" ,
"pattern" : "^wrk.*"
} ,
"type" : {
"type" : "string"
} ,
"branch" : {
"anyOf" : [
{
"type" : "string"
} ,
{
"type" : "null"
}
]
} ,
"extra" : {
"anyOf" : [
{ } ,
{
"type" : "null"
}
]
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "branch" , "extra" ]
2026-01-03 02:17:34 +00:00
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
2026-03-04 02:36:18 +00:00
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
2026-01-03 02:17:34 +00:00
}
]
} ,
"get" : {
2026-03-04 02:36:18 +00:00
"operationId" : "experimental.workspace.list" ,
2026-01-03 02:17:34 +00:00
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-03 02:17:34 +00:00
}
] ,
2026-03-04 02:36:18 +00:00
"summary" : "List workspaces" ,
"description" : "List all workspaces." ,
2026-01-03 02:17:34 +00:00
"responses" : {
"200" : {
2026-03-04 02:36:18 +00:00
"description" : "Workspaces" ,
2026-01-03 02:17:34 +00:00
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
2026-03-04 02:36:18 +00:00
"$ref" : "#/components/schemas/Workspace"
2026-01-03 02:17:34 +00:00
}
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
2026-03-04 02:36:18 +00:00
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
2026-01-03 02:17:34 +00:00
}
]
2026-03-04 02:36:18 +00:00
}
} ,
"/experimental/workspace/{id}" : {
2026-01-19 13:37:19 +00:00
"delete" : {
2026-03-04 02:36:18 +00:00
"operationId" : "experimental.workspace.remove" ,
2026-01-19 13:37:19 +00:00
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-03-04 02:36:18 +00:00
} ,
{
"in" : "path" ,
"name" : "id" ,
"schema" : {
"type" : "string" ,
"pattern" : "^wrk.*"
} ,
"required" : true
2026-01-19 13:37:19 +00:00
}
] ,
2026-03-04 02:36:18 +00:00
"summary" : "Remove workspace" ,
"description" : "Remove an existing workspace." ,
2026-01-19 13:37:19 +00:00
"responses" : {
"200" : {
2026-03-04 02:36:18 +00:00
"description" : "Workspace removed" ,
2026-01-19 13:37:19 +00:00
"content" : {
"application/json" : {
"schema" : {
2026-03-04 02:36:18 +00:00
"$ref" : "#/components/schemas/Workspace"
2026-01-19 13:37:19 +00:00
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
2026-03-04 02:36:18 +00:00
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
2026-01-19 13:37:19 +00:00
}
]
}
} ,
2026-03-04 02:36:18 +00:00
"/experimental/worktree" : {
2026-02-27 20:37:28 +00:00
"post" : {
2026-03-04 02:36:18 +00:00
"operationId" : "worktree.create" ,
2026-02-27 20:37:28 +00:00
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-02-27 20:37:28 +00:00
}
] ,
2026-03-04 02:36:18 +00:00
"summary" : "Create worktree" ,
"description" : "Create a new git worktree for the current project and run any configured startup scripts." ,
2026-02-27 20:37:28 +00:00
"responses" : {
"200" : {
2026-03-04 02:36:18 +00:00
"description" : "Worktree created" ,
2026-02-27 20:37:28 +00:00
"content" : {
"application/json" : {
"schema" : {
2026-03-04 02:36:18 +00:00
"$ref" : "#/components/schemas/Worktree"
2026-02-27 20:37:28 +00:00
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
2026-03-04 02:36:18 +00:00
"$ref" : "#/components/schemas/WorktreeCreateInput"
2026-02-27 20:37:28 +00:00
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
2026-03-04 02:36:18 +00:00
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
2026-02-27 20:37:28 +00:00
}
]
} ,
2026-03-04 02:36:18 +00:00
"get" : {
"operationId" : "worktree.list" ,
2026-02-27 20:37:28 +00:00
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-02-27 20:37:28 +00:00
}
] ,
2026-03-04 02:36:18 +00:00
"summary" : "List worktrees" ,
"description" : "List all sandbox worktrees for the current project." ,
2026-02-27 20:37:28 +00:00
"responses" : {
"200" : {
2026-03-04 02:36:18 +00:00
"description" : "List of worktree directories" ,
2026-02-27 20:37:28 +00:00
"content" : {
"application/json" : {
"schema" : {
2026-03-04 02:36:18 +00:00
"type" : "array" ,
"items" : {
"type" : "string"
}
2026-02-27 20:37:28 +00:00
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
2026-03-04 02:36:18 +00:00
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
2026-02-27 20:37:28 +00:00
}
]
2026-03-04 02:36:18 +00:00
} ,
"delete" : {
"operationId" : "worktree.remove" ,
2026-02-27 20:37:28 +00:00
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-02-27 20:37:28 +00:00
}
] ,
2026-03-04 02:36:18 +00:00
"summary" : "Remove worktree" ,
"description" : "Remove a git worktree and delete its branch." ,
2026-02-27 20:37:28 +00:00
"responses" : {
"200" : {
2026-03-04 02:36:18 +00:00
"description" : "Worktree removed" ,
2026-02-27 20:37:28 +00:00
"content" : {
"application/json" : {
"schema" : {
2026-03-04 02:36:18 +00:00
"type" : "boolean"
2026-02-27 20:37:28 +00:00
}
}
}
2026-03-04 02:36:18 +00:00
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/WorktreeRemoveInput"
}
}
2026-02-27 20:37:28 +00:00
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
2026-03-04 02:36:18 +00:00
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
2026-02-27 20:37:28 +00:00
}
]
}
} ,
2026-01-19 13:37:19 +00:00
"/experimental/worktree/reset" : {
"post" : {
"operationId" : "worktree.reset" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-19 13:37:19 +00:00
}
] ,
"summary" : "Reset worktree" ,
"description" : "Reset a worktree branch to the primary default branch." ,
"responses" : {
"200" : {
"description" : "Worktree reset" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/WorktreeResetInput"
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
}
]
2026-01-03 02:17:34 +00:00
}
} ,
2026-02-20 13:46:03 +00:00
"/experimental/session" : {
"get" : {
"operationId" : "experimental.session.list" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
} ,
"description" : "Filter sessions by project directory"
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2026-02-20 13:46:03 +00:00
{
"in" : "query" ,
"name" : "roots" ,
"schema" : {
"type" : "boolean"
} ,
"description" : "Only return root sessions (no parentID)"
} ,
{
"in" : "query" ,
"name" : "start" ,
"schema" : {
"type" : "number"
} ,
"description" : "Filter sessions updated on or after this timestamp (milliseconds since epoch)"
} ,
{
"in" : "query" ,
"name" : "cursor" ,
"schema" : {
"type" : "number"
} ,
"description" : "Return sessions updated before this timestamp (milliseconds since epoch)"
} ,
{
"in" : "query" ,
"name" : "search" ,
"schema" : {
"type" : "string"
} ,
"description" : "Filter sessions by title (case-insensitive)"
} ,
{
"in" : "query" ,
"name" : "limit" ,
"schema" : {
"type" : "number"
} ,
"description" : "Maximum number of sessions to return"
} ,
{
"in" : "query" ,
"name" : "archived" ,
"schema" : {
"type" : "boolean"
} ,
"description" : "Include archived sessions (default false)"
}
] ,
"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" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/GlobalSession"
}
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
}
]
}
} ,
2026-01-16 21:21:54 +00:00
"/experimental/resource" : {
2025-12-06 01:07:10 +00:00
"get" : {
2026-01-16 21:21:54 +00:00
"operationId" : "experimental.resource.list" ,
2025-12-06 01:07:10 +00:00
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2026-01-16 21:21:54 +00:00
"summary" : "Get MCP resources" ,
"description" : "Get all available MCP resources from connected servers. Optionally filter by name." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
2026-01-16 21:21:54 +00:00
"description" : "MCP resources" ,
2025-12-06 01:07:10 +00:00
"content" : {
"application/json" : {
"schema" : {
2026-01-16 21:21:54 +00:00
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"$ref" : "#/components/schemas/McpResource"
}
2025-12-06 01:07:10 +00:00
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
2026-01-16 21:21:54 +00:00
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
2025-12-08 00:58:04 +00:00
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/session" : {
"get" : {
"operationId" : "session.list" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
2026-01-14 13:36:44 +00:00
} ,
"description" : "Filter sessions by project directory"
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2026-01-14 13:36:44 +00:00
{
"in" : "query" ,
"name" : "roots" ,
"schema" : {
"type" : "boolean"
} ,
"description" : "Only return root sessions (no parentID)"
2026-01-04 18:39:08 +00:00
} ,
{
"in" : "query" ,
"name" : "start" ,
"schema" : {
"type" : "number"
} ,
"description" : "Filter sessions updated on or after this timestamp (milliseconds since epoch)"
} ,
{
"in" : "query" ,
"name" : "search" ,
"schema" : {
"type" : "string"
} ,
"description" : "Filter sessions by title (case-insensitive)"
} ,
{
"in" : "query" ,
"name" : "limit" ,
"schema" : {
"type" : "number"
} ,
"description" : "Maximum number of sessions to return"
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "List sessions" ,
"description" : "Get a list of all OpenCode sessions, sorted by most recently updated." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "List of sessions" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Session"
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
} ,
"post" : {
"operationId" : "session.create" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Create session" ,
"description" : "Create a new OpenCode session for interacting with AI assistants and managing conversations." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Successfully created session" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Session"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"parentID" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"title" : {
"type" : "string"
2026-01-01 22:54:43 +00:00
} ,
"permission" : {
"$ref" : "#/components/schemas/PermissionRuleset"
2026-03-10 15:14:46 +00:00
} ,
"workspaceID" : {
"type" : "string" ,
"pattern" : "^wrk.*"
2025-12-06 01:07:10 +00:00
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/session/status" : {
"get" : {
"operationId" : "session.status" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get session status" ,
"description" : "Retrieve the current status of all sessions, including active, idle, and completed states." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Get session status" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"$ref" : "#/components/schemas/SessionStatus"
}
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}" : {
2025-12-06 01:07:10 +00:00
"get" : {
"operationId" : "session.get" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get session" ,
"description" : "Retrieve detailed information about a specific OpenCode session." ,
2026-03-13 10:19:52 +00:00
"tags" : [ "Session" ] ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Get 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"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
} ,
"delete" : {
"operationId" : "session.delete" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Delete session" ,
"description" : "Delete a session and permanently remove all associated data, including messages and history." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Successfully deleted session" ,
"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"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
} ,
"patch" : {
"operationId" : "session.update" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Update session" ,
"description" : "Update properties of an existing session, such as title or other metadata." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Successfully updated 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"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"title" : {
"type" : "string"
2025-12-10 21:01:06 +00:00
} ,
"time" : {
"type" : "object" ,
"properties" : {
"archived" : {
"type" : "number"
}
}
2025-12-06 01:07:10 +00:00
}
2025-12-12 02:06:49 +00:00
}
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/children" : {
2025-12-06 01:07:10 +00:00
"get" : {
"operationId" : "session.children" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get session children" ,
2026-03-13 10:19:52 +00:00
"tags" : [ "Session" ] ,
2025-12-08 00:58:04 +00:00
"description" : "Retrieve all child sessions that were forked from the specified parent session." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "List of children" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$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"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/todo" : {
2025-12-06 01:07:10 +00:00
"get" : {
"operationId" : "session.todo" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
2026-03-11 23:17:42 +00:00
"required" : true
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get session todos" ,
"description" : "Retrieve the todo list associated with a specific session, showing tasks and action items." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Todo list" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Todo"
}
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
} ,
"404" : {
"description" : "Not found" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/NotFoundError"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/init" : {
2025-12-06 01:07:10 +00:00
"post" : {
"operationId" : "session.init" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
2026-03-11 23:17:42 +00:00
"required" : true
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Initialize session" ,
"description" : "Analyze the current application and create an AGENTS.md file with project-specific agent configurations." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "200" ,
"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" : {
"modelID" : {
"type" : "string"
} ,
"providerID" : {
"type" : "string"
} ,
"messageID" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "modelID" , "providerID" , "messageID" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/fork" : {
2025-12-06 01:07:10 +00:00
"post" : {
"operationId" : "session.fork" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Fork session" ,
"description" : "Create a new session by forking an existing session at a specific message point." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "200" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Session"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"messageID" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/abort" : {
2025-12-06 01:07:10 +00:00
"post" : {
"operationId" : "session.abort" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Abort session" ,
"description" : "Abort an active session and stop any ongoing AI processing or command execution." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Aborted session" ,
"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"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/share" : {
2025-12-06 01:07:10 +00:00
"post" : {
"operationId" : "session.share" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Share session" ,
"description" : "Create a shareable link for a session, allowing others to view the conversation." ,
2025-12-06 01:07:10 +00:00
"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"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
} ,
"delete" : {
"operationId" : "session.unshare" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Unshare session" ,
"description" : "Remove the shareable link for a session, making it private again." ,
2025-12-06 01:07:10 +00:00
"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"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/diff" : {
2025-12-06 01:07:10 +00:00
"get" : {
"operationId" : "session.diff" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-01-16 21:21:54 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
2026-01-16 21:21:54 +00:00
"required" : true
2025-12-06 01:07:10 +00:00
} ,
{
"in" : "query" ,
"name" : "messageID" ,
"schema" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
}
}
] ,
2026-01-16 21:21:54 +00:00
"summary" : "Get message diff" ,
"description" : "Get the file changes (diff) that resulted from a specific user message in the session." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
2026-01-16 21:21:54 +00:00
"description" : "Successfully retrieved diff" ,
2025-12-06 01:07:10 +00:00
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/FileDiff"
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/summarize" : {
2025-12-06 01:07:10 +00:00
"post" : {
"operationId" : "session.summarize" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
2026-03-11 23:17:42 +00:00
"required" : true
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Summarize session" ,
"description" : "Generate a concise summary of the session using AI compaction to preserve key information." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Summarized session" ,
"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" : {
"providerID" : {
"type" : "string"
} ,
"modelID" : {
"type" : "string"
2025-12-22 03:05:30 +00:00
} ,
"auto" : {
"default" : false ,
"type" : "boolean"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "providerID" , "modelID" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/message" : {
2025-12-06 01:07:10 +00:00
"get" : {
"operationId" : "session.messages" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
2026-03-11 23:17:42 +00:00
"required" : true
2025-12-06 01:07:10 +00:00
} ,
{
"in" : "query" ,
"name" : "limit" ,
"schema" : {
2026-03-13 10:18:43 +00:00
"type" : "integer" ,
"minimum" : 0 ,
"maximum" : 9007199254740991
} ,
"description" : "Maximum number of messages to return"
} ,
{
"in" : "query" ,
"name" : "before" ,
"schema" : {
"type" : "string"
2025-12-06 01:07:10 +00:00
}
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get session messages" ,
"description" : "Retrieve all messages in a session, including user prompts and AI responses." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "List of messages" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"info" : {
"$ref" : "#/components/schemas/Message"
} ,
"parts" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Part"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "info" , "parts" ]
2025-12-06 01:07:10 +00:00
}
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
} ,
"404" : {
"description" : "Not found" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/NotFoundError"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
} ,
"post" : {
"operationId" : "session.prompt" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
2026-03-11 23:17:42 +00:00
"required" : true
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Send message" ,
"description" : "Create and send a new message to a session, streaming the AI response." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Created message" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"info" : {
"$ref" : "#/components/schemas/AssistantMessage"
} ,
"parts" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Part"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "info" , "parts" ]
2025-12-06 01:07:10 +00:00
}
}
}
} ,
"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" : {
"messageID" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"model" : {
"type" : "object" ,
"properties" : {
"providerID" : {
"type" : "string"
} ,
"modelID" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "providerID" , "modelID" ]
2025-12-06 01:07:10 +00:00
} ,
"agent" : {
"type" : "string"
} ,
"noReply" : {
"type" : "boolean"
} ,
"tools" : {
2026-01-01 22:54:43 +00:00
"description" : "@deprecated tools and permissions have been merged, you can set permissions on the session itself now" ,
2025-12-06 01:07:10 +00:00
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "boolean"
}
} ,
2026-02-12 04:55:00 +00:00
"format" : {
"$ref" : "#/components/schemas/OutputFormat"
} ,
2025-12-15 02:11:30 +00:00
"system" : {
"type" : "string"
} ,
2025-12-30 03:44:29 +00:00
"variant" : {
"type" : "string"
} ,
2025-12-06 01:07:10 +00:00
"parts" : {
"type" : "array" ,
"items" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/TextPartInput"
} ,
{
"$ref" : "#/components/schemas/FilePartInput"
} ,
{
"$ref" : "#/components/schemas/AgentPartInput"
} ,
{
"$ref" : "#/components/schemas/SubtaskPartInput"
}
]
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "parts" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/message/{messageID}" : {
2025-12-06 01:07:10 +00:00
"get" : {
"operationId" : "session.message" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
2026-03-11 23:17:42 +00:00
"required" : true
2025-12-06 01:07:10 +00:00
} ,
{
"in" : "path" ,
"name" : "messageID" ,
"schema" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
2026-03-11 23:31:07 +00:00
"required" : true
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get message" ,
"description" : "Retrieve a specific message from a session by its message ID." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Message" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"info" : {
"$ref" : "#/components/schemas/Message"
} ,
"parts" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Part"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "info" , "parts" ]
2025-12-06 01:07:10 +00:00
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
} ,
"404" : {
"description" : "Not found" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/NotFoundError"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
}
]
2026-02-25 14:26:38 +00:00
} ,
"delete" : {
"operationId" : "session.deleteMessage" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2026-02-25 14:26:38 +00:00
{
"in" : "path" ,
"name" : "sessionID" ,
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2026-02-25 14:26:38 +00:00
} ,
2026-03-11 23:17:42 +00:00
"required" : true
2026-02-25 14:26:38 +00:00
} ,
{
"in" : "path" ,
"name" : "messageID" ,
"schema" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2026-02-25 14:26:38 +00:00
} ,
2026-03-11 23:31:07 +00:00
"required" : true
2026-02-25 14:26:38 +00:00
}
] ,
"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"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
} ,
"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.session.deleteMessage({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-20 15:00:20 +00:00
"/session/{sessionID}/message/{messageID}/part/{partID}" : {
"delete" : {
"operationId" : "part.delete" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
{
2026-03-01 01:45:44 +00:00
"in" : "query" ,
"name" : "workspace" ,
2025-12-20 15:00:20 +00:00
"schema" : {
"type" : "string"
2026-03-01 01:45:44 +00:00
}
} ,
{
"in" : "path" ,
"name" : "sessionID" ,
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2026-03-01 01:45:44 +00:00
} ,
2026-03-11 23:17:42 +00:00
"required" : true
2025-12-20 15:00:20 +00:00
} ,
{
"in" : "path" ,
"name" : "messageID" ,
"schema" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-20 15:00:20 +00:00
} ,
2026-03-11 23:31:07 +00:00
"required" : true
2025-12-20 15:00:20 +00:00
} ,
{
"in" : "path" ,
"name" : "partID" ,
"schema" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-20 15:00:20 +00:00
} ,
2026-03-11 23:31:07 +00:00
"required" : true
2025-12-20 15:00:20 +00:00
}
] ,
"description" : "Delete a part from a message" ,
"responses" : {
"200" : {
"description" : "Successfully deleted part" ,
"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"
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
}
]
} ,
"patch" : {
"operationId" : "part.update" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-20 15:00:20 +00:00
{
"in" : "path" ,
"name" : "sessionID" ,
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-20 15:00:20 +00:00
} ,
2026-03-11 23:17:42 +00:00
"required" : true
2025-12-20 15:00:20 +00:00
} ,
{
"in" : "path" ,
"name" : "messageID" ,
"schema" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-20 15:00:20 +00:00
} ,
2026-03-11 23:31:07 +00:00
"required" : true
2025-12-20 15:00:20 +00:00
} ,
{
"in" : "path" ,
"name" : "partID" ,
"schema" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-20 15:00:20 +00:00
} ,
2026-03-11 23:31:07 +00:00
"required" : true
2025-12-20 15:00:20 +00:00
}
] ,
"description" : "Update a part in a message" ,
"responses" : {
"200" : {
"description" : "Successfully updated part" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Part"
}
}
}
} ,
"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" : {
"$ref" : "#/components/schemas/Part"
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
}
]
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/prompt_async" : {
2025-12-06 01:07:10 +00:00
"post" : {
"operationId" : "session.prompt_async" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
2026-03-11 23:17:42 +00:00
"required" : true
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Send async message" ,
"description" : "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"204" : {
"description" : "Prompt accepted"
} ,
"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" : {
"messageID" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"model" : {
"type" : "object" ,
"properties" : {
"providerID" : {
"type" : "string"
} ,
"modelID" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "providerID" , "modelID" ]
2025-12-06 01:07:10 +00:00
} ,
"agent" : {
"type" : "string"
} ,
"noReply" : {
"type" : "boolean"
} ,
"tools" : {
2026-01-01 22:54:43 +00:00
"description" : "@deprecated tools and permissions have been merged, you can set permissions on the session itself now" ,
2025-12-06 01:07:10 +00:00
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "boolean"
}
} ,
2026-02-12 04:55:00 +00:00
"format" : {
"$ref" : "#/components/schemas/OutputFormat"
} ,
2025-12-15 02:11:30 +00:00
"system" : {
"type" : "string"
} ,
2025-12-30 03:44:29 +00:00
"variant" : {
"type" : "string"
} ,
2025-12-06 01:07:10 +00:00
"parts" : {
"type" : "array" ,
"items" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/TextPartInput"
} ,
{
"$ref" : "#/components/schemas/FilePartInput"
} ,
{
"$ref" : "#/components/schemas/AgentPartInput"
} ,
{
"$ref" : "#/components/schemas/SubtaskPartInput"
}
]
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "parts" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/command" : {
2025-12-06 01:07:10 +00:00
"post" : {
"operationId" : "session.command" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
2026-03-11 23:17:42 +00:00
"required" : true
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Send command" ,
"description" : "Send a new command to a session for execution by the AI assistant." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Created message" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"info" : {
"$ref" : "#/components/schemas/AssistantMessage"
} ,
"parts" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Part"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "info" , "parts" ]
2025-12-06 01:07:10 +00:00
}
}
}
} ,
"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" : {
"messageID" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"agent" : {
"type" : "string"
} ,
"model" : {
"type" : "string"
} ,
"arguments" : {
"type" : "string"
} ,
"command" : {
"type" : "string"
2025-12-30 03:44:29 +00:00
} ,
"variant" : {
"type" : "string"
2026-01-05 19:06:57 +00:00
} ,
"parts" : {
"type" : "array" ,
"items" : {
"anyOf" : [
{
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2026-01-05 19:06:57 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "file"
} ,
"mime" : {
"type" : "string"
} ,
"filename" : {
"type" : "string"
} ,
"url" : {
"type" : "string"
} ,
"source" : {
"$ref" : "#/components/schemas/FilePartSource"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "mime" , "url" ]
2026-01-05 19:06:57 +00:00
}
]
}
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "arguments" , "command" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/shell" : {
2025-12-06 01:07:10 +00:00
"post" : {
"operationId" : "session.shell" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
2026-03-11 23:17:42 +00:00
"required" : true
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Run shell command" ,
"description" : "Execute a shell command within the session context and return the AI's response." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Created message" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/AssistantMessage"
}
}
}
} ,
"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" : {
"agent" : {
"type" : "string"
} ,
"model" : {
"type" : "object" ,
"properties" : {
"providerID" : {
"type" : "string"
} ,
"modelID" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "providerID" , "modelID" ]
2025-12-06 01:07:10 +00:00
} ,
"command" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "agent" , "command" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/revert" : {
2025-12-06 01:07:10 +00:00
"post" : {
"operationId" : "session.revert" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Revert message" ,
"description" : "Revert a specific message in a session, undoing its effects and restoring the previous state." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Updated 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"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"messageID" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"partID" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "messageID" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/unrevert" : {
2025-12-06 01:07:10 +00:00
"post" : {
"operationId" : "session.unrevert" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Restore reverted messages" ,
"description" : "Restore all previously reverted messages in a session." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Updated 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"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/session/{sessionID}/permissions/{permissionID}" : {
2025-12-06 01:07:10 +00:00
"post" : {
2025-12-08 00:04:14 +00:00
"operationId" : "permission.respond" ,
2025-12-06 01:07:10 +00:00
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "sessionID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
} ,
{
"in" : "path" ,
"name" : "permissionID" ,
"schema" : {
2026-03-12 01:50:44 +00:00
"type" : "string" ,
"pattern" : "^per.*"
2025-12-06 01:07:10 +00:00
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Respond to permission" ,
2026-01-01 22:54:43 +00:00
"deprecated" : true ,
2025-12-08 00:58:04 +00:00
"description" : "Approve or deny a permission request from the AI assistant." ,
2025-12-06 01:07:10 +00:00
"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" : {
"response" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "once" , "always" , "reject" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "response" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2026-01-01 22:54:43 +00:00
"/permission/{requestID}/reply" : {
"post" : {
"operationId" : "permission.reply" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2026-01-01 22:54:43 +00:00
{
"in" : "path" ,
"name" : "requestID" ,
"schema" : {
2026-03-12 01:50:44 +00:00
"type" : "string" ,
"pattern" : "^per.*"
2026-01-01 22:54:43 +00:00
} ,
"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" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "once" , "always" , "reject" ]
2026-01-03 06:35:01 +00:00
} ,
"message" : {
"type" : "string"
2026-01-01 22:54:43 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "reply" ]
2026-01-01 22:54:43 +00:00
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
}
]
}
} ,
2025-12-27 11:16:39 +00:00
"/permission" : {
"get" : {
"operationId" : "permission.list" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-27 11:16:39 +00:00
}
] ,
"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" : {
2026-01-01 22:54:43 +00:00
"$ref" : "#/components/schemas/PermissionRequest"
2025-12-27 11:16:39 +00:00
}
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
}
]
}
} ,
2026-01-08 03:30:18 +00:00
"/question" : {
"get" : {
"operationId" : "question.list" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-08 03:30:18 +00:00
}
] ,
"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"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2026-01-08 03:30:18 +00:00
{
"in" : "path" ,
"name" : "requestID" ,
"schema" : {
2026-03-12 01:50:44 +00:00
"type" : "string" ,
"pattern" : "^que.*"
2026-01-08 03:30:18 +00:00
} ,
"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" : {
2026-01-08 22:32:21 +00:00
"description" : "User answers in order of questions (each answer is an array of selected labels)" ,
2026-01-08 03:30:18 +00:00
"type" : "array" ,
"items" : {
2026-01-08 22:32:21 +00:00
"$ref" : "#/components/schemas/QuestionAnswer"
2026-01-08 03:30:18 +00:00
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "answers" ]
2026-01-08 03:30:18 +00:00
}
}
}
} ,
"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"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2026-01-08 03:30:18 +00:00
{
"in" : "path" ,
"name" : "requestID" ,
"schema" : {
2026-03-12 01:50:44 +00:00
"type" : "string" ,
"pattern" : "^que.*"
2026-01-08 03:30:18 +00:00
} ,
"required" : true
}
] ,
"summary" : "Reject question request" ,
"description" : "Reject a question request from the AI assistant." ,
"responses" : {
"200" : {
"description" : "Question rejected 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"
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
}
]
}
} ,
2025-12-06 01:07:10 +00:00
"/provider" : {
"get" : {
"operationId" : "provider.list" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "List providers" ,
"description" : "Get a list of all available AI providers, including both available and connected ones." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "List of providers" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"all" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"api" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
"env" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"id" : {
"type" : "string"
} ,
"npm" : {
"type" : "string"
} ,
"models" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
2025-12-10 19:31:11 +00:00
"family" : {
"type" : "string"
} ,
2025-12-06 01:07:10 +00:00
"release_date" : {
"type" : "string"
} ,
"attachment" : {
"type" : "boolean"
} ,
"reasoning" : {
"type" : "boolean"
} ,
"temperature" : {
"type" : "boolean"
} ,
"tool_call" : {
"type" : "boolean"
} ,
2025-12-10 00:27:29 +00:00
"interleaved" : {
"anyOf" : [
{
"type" : "boolean" ,
"const" : true
} ,
{
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "reasoning_content" , "reasoning_details" ]
2025-12-10 00:27:29 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "field" ] ,
2025-12-10 00:27:29 +00:00
"additionalProperties" : false
}
]
} ,
2025-12-06 01:07:10 +00:00
"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"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "input" , "output" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "input" , "output" ]
2025-12-06 01:07:10 +00:00
} ,
"limit" : {
"type" : "object" ,
"properties" : {
"context" : {
"type" : "number"
} ,
2026-01-15 07:35:52 +00:00
"input" : {
"type" : "number"
} ,
2025-12-06 01:07:10 +00:00
"output" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "context" , "output" ]
2025-12-06 01:07:10 +00:00
} ,
"modalities" : {
"type" : "object" ,
"properties" : {
"input" : {
"type" : "array" ,
"items" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "text" , "audio" , "image" , "video" , "pdf" ]
2025-12-06 01:07:10 +00:00
}
} ,
"output" : {
"type" : "array" ,
"items" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "text" , "audio" , "image" , "video" , "pdf" ]
2025-12-06 01:07:10 +00:00
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "input" , "output" ]
2025-12-06 01:07:10 +00:00
} ,
"experimental" : {
"type" : "boolean"
} ,
"status" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "alpha" , "beta" , "deprecated" ]
2025-12-06 01:07:10 +00:00
} ,
"options" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"headers" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "string"
}
} ,
"provider" : {
"type" : "object" ,
"properties" : {
"npm" : {
"type" : "string"
2026-02-12 04:11:57 +00:00
} ,
"api" : {
"type" : "string"
2025-12-06 01:07:10 +00:00
}
2026-02-12 14:28:17 +00:00
}
2025-12-30 22:38:06 +00:00
} ,
"variants" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
}
2025-12-06 01:07:10 +00:00
}
} ,
"required" : [
"id" ,
"name" ,
"release_date" ,
"attachment" ,
"reasoning" ,
"temperature" ,
"tool_call" ,
"limit" ,
"options"
]
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "env" , "id" , "models" ]
2025-12-06 01:07:10 +00:00
}
} ,
"default" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "string"
}
} ,
"connected" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "all" , "default" , "connected" ]
2025-12-06 01:07:10 +00:00
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/provider/auth" : {
"get" : {
"operationId" : "provider.auth" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get provider auth methods" ,
"description" : "Retrieve available authentication methods for all AI providers." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Provider auth methods" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/ProviderAuthMethod"
}
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/provider/{providerID}/oauth/authorize" : {
2025-12-06 01:07:10 +00:00
"post" : {
"operationId" : "provider.oauth.authorize" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "providerID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
"type" : "string"
} ,
"required" : true ,
"description" : "Provider ID"
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "OAuth authorize" ,
"description" : "Initiate OAuth authorization for a specific AI provider to get an authorization URL." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Authorization URL and method" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ProviderAuthAuthorization"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"method" : {
"description" : "Auth method index" ,
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "method" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-08 00:04:14 +00:00
"/provider/{providerID}/oauth/callback" : {
2025-12-06 01:07:10 +00:00
"post" : {
"operationId" : "provider.oauth.callback" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "path" ,
2025-12-08 00:04:14 +00:00
"name" : "providerID" ,
2025-12-06 01:07:10 +00:00
"schema" : {
"type" : "string"
} ,
"required" : true ,
"description" : "Provider ID"
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "OAuth callback" ,
"description" : "Handle the OAuth callback from a provider after user authorization." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "OAuth callback processed successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"method" : {
"description" : "Auth method index" ,
"type" : "number"
} ,
"code" : {
"description" : "OAuth authorization code" ,
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "method" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/find" : {
"get" : {
"operationId" : "find.text" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "query" ,
"name" : "pattern" ,
"schema" : {
"type" : "string"
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Find text" ,
"description" : "Search for text patterns across files in the project using ripgrep." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Matches" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"path" : {
"type" : "object" ,
"properties" : {
"text" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "text" ]
2025-12-06 01:07:10 +00:00
} ,
"lines" : {
"type" : "object" ,
"properties" : {
"text" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "text" ]
2025-12-06 01:07:10 +00:00
} ,
"line_number" : {
"type" : "number"
} ,
"absolute_offset" : {
"type" : "number"
} ,
"submatches" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"match" : {
"type" : "object" ,
"properties" : {
"text" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "text" ]
2025-12-06 01:07:10 +00:00
} ,
"start" : {
"type" : "number"
} ,
"end" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "match" , "start" , "end" ]
2025-12-06 01:07:10 +00:00
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "path" , "lines" , "line_number" , "absolute_offset" , "submatches" ]
2025-12-06 01:07:10 +00:00
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/find/file" : {
"get" : {
"operationId" : "find.files" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "query" ,
"name" : "query" ,
"schema" : {
"type" : "string"
} ,
"required" : true
} ,
{
"in" : "query" ,
"name" : "dirs" ,
"schema" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "true" , "false" ]
2025-12-06 01:07:10 +00:00
}
2025-12-30 10:58:24 +00:00
} ,
{
"in" : "query" ,
"name" : "type" ,
"schema" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "file" , "directory" ]
2025-12-30 10:58:24 +00:00
}
} ,
{
"in" : "query" ,
"name" : "limit" ,
"schema" : {
"type" : "integer" ,
"minimum" : 1 ,
"maximum" : 200
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Find files" ,
2025-12-30 10:58:24 +00:00
"description" : "Search for files or directories by name or pattern in the project directory." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "File paths" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/find/symbol" : {
"get" : {
"operationId" : "find.symbols" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "query" ,
"name" : "query" ,
"schema" : {
"type" : "string"
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Find symbols" ,
"description" : "Search for workspace symbols like functions, classes, and variables using LSP." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Symbols" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Symbol"
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/file" : {
"get" : {
"operationId" : "file.list" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "query" ,
"name" : "path" ,
"schema" : {
"type" : "string"
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "List files" ,
"description" : "List files and directories in a specified path." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Files and directories" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/FileNode"
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/file/content" : {
"get" : {
"operationId" : "file.read" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-06 01:07:10 +00:00
{
"in" : "query" ,
"name" : "path" ,
"schema" : {
"type" : "string"
} ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Read file" ,
"description" : "Read the content of a specified file." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "File content" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/FileContent"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/file/status" : {
"get" : {
"operationId" : "file.status" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get file status" ,
"description" : "Get the git status of all files in the project." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "File status" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/File"
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/mcp" : {
"get" : {
"operationId" : "mcp.status" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get MCP status" ,
"description" : "Get the status of all Model Context Protocol (MCP) servers." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "MCP server status" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"$ref" : "#/components/schemas/MCPStatus"
}
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
} ,
"post" : {
"operationId" : "mcp.add" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Add MCP server" ,
"description" : "Dynamically add a new Model Context Protocol (MCP) server to the system." ,
2025-12-06 01:07:10 +00:00
"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"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"config" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/McpLocalConfig"
} ,
{
"$ref" : "#/components/schemas/McpRemoteConfig"
}
]
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "config" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-07 20:47:51 +00:00
"/mcp/{name}/auth" : {
"post" : {
"operationId" : "mcp.auth.start" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-07 20:47:51 +00:00
{
"schema" : {
"type" : "string"
} ,
"in" : "path" ,
"name" : "name" ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Start MCP OAuth" ,
"description" : "Start OAuth authentication flow for a Model Context Protocol (MCP) server." ,
2025-12-07 20:47:51 +00:00
"responses" : {
"200" : {
"description" : "OAuth flow started" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"authorizationUrl" : {
"description" : "URL to open in browser for authorization" ,
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "authorizationUrl" ]
2025-12-07 20:47:51 +00:00
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
} ,
"404" : {
"description" : "Not found" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/NotFoundError"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
}
]
2025-12-07 20:47:51 +00:00
} ,
"delete" : {
"operationId" : "mcp.auth.remove" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-07 20:47:51 +00:00
{
"schema" : {
"type" : "string"
} ,
"in" : "path" ,
"name" : "name" ,
"required" : true
}
] ,
2025-12-08 00:58:40 +00:00
"summary" : "Remove MCP OAuth" ,
2025-12-07 20:47:51 +00:00
"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
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "success" ]
2025-12-07 20:47:51 +00:00
}
}
}
} ,
"404" : {
"description" : "Not found" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/NotFoundError"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
}
]
2025-12-07 20:47:51 +00:00
}
} ,
"/mcp/{name}/auth/callback" : {
"post" : {
"operationId" : "mcp.auth.callback" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-07 20:47:51 +00:00
{
"schema" : {
"type" : "string"
} ,
"in" : "path" ,
"name" : "name" ,
"required" : true
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Complete MCP OAuth" ,
"description" : "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code." ,
2025-12-07 20:47:51 +00:00
"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"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "code" ]
2025-12-07 20:47:51 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
}
]
2025-12-07 20:47:51 +00:00
}
} ,
"/mcp/{name}/auth/authenticate" : {
"post" : {
"operationId" : "mcp.auth.authenticate" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-07 20:47:51 +00:00
{
"schema" : {
"type" : "string"
} ,
"in" : "path" ,
"name" : "name" ,
"required" : true
}
] ,
2025-12-08 00:58:40 +00:00
"summary" : "Authenticate MCP OAuth" ,
2025-12-07 20:47:51 +00:00
"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" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
} ,
"404" : {
"description" : "Not found" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/NotFoundError"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
}
]
2025-12-07 20:47:51 +00:00
}
} ,
2025-12-08 17:31:22 +00:00
"/mcp/{name}/connect" : {
"post" : {
"operationId" : "mcp.connect" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-08 17:31:22 +00:00
{
"in" : "path" ,
"name" : "name" ,
"schema" : {
"type" : "string"
} ,
"required" : true
}
] ,
"description" : "Connect an MCP server" ,
"responses" : {
"200" : {
"description" : "MCP server connected successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
}
} ,
"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"
}
} ,
2026-03-01 01:45:44 +00:00
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
} ,
2025-12-08 17:31:22 +00:00
{
"in" : "path" ,
"name" : "name" ,
"schema" : {
"type" : "string"
} ,
"required" : true
}
] ,
"description" : "Disconnect an MCP server" ,
"responses" : {
"200" : {
"description" : "MCP server disconnected successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
}
]
}
} ,
2025-12-06 01:07:10 +00:00
"/tui/append-prompt" : {
"post" : {
"operationId" : "tui.appendPrompt" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:40 +00:00
"summary" : "Append TUI prompt" ,
2025-12-06 01:07:10 +00:00
"description" : "Append prompt to the TUI" ,
"responses" : {
"200" : {
"description" : "Prompt processed successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"text" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "text" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/tui/open-help" : {
"post" : {
"operationId" : "tui.openHelp" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Open help dialog" ,
"description" : "Open the help dialog in the TUI to display user assistance information." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Help dialog opened successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/tui/open-sessions" : {
"post" : {
"operationId" : "tui.openSessions" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:40 +00:00
"summary" : "Open sessions dialog" ,
2025-12-06 01:07:10 +00:00
"description" : "Open the session dialog" ,
"responses" : {
"200" : {
"description" : "Session dialog opened successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/tui/open-themes" : {
"post" : {
"operationId" : "tui.openThemes" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:40 +00:00
"summary" : "Open themes dialog" ,
2025-12-06 01:07:10 +00:00
"description" : "Open the theme dialog" ,
"responses" : {
"200" : {
"description" : "Theme dialog opened successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/tui/open-models" : {
"post" : {
"operationId" : "tui.openModels" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:40 +00:00
"summary" : "Open models dialog" ,
2025-12-06 01:07:10 +00:00
"description" : "Open the model dialog" ,
"responses" : {
"200" : {
"description" : "Model dialog opened successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/tui/submit-prompt" : {
"post" : {
"operationId" : "tui.submitPrompt" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:40 +00:00
"summary" : "Submit TUI prompt" ,
2025-12-06 01:07:10 +00:00
"description" : "Submit the prompt" ,
"responses" : {
"200" : {
"description" : "Prompt submitted successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/tui/clear-prompt" : {
"post" : {
"operationId" : "tui.clearPrompt" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:40 +00:00
"summary" : "Clear TUI prompt" ,
2025-12-06 01:07:10 +00:00
"description" : "Clear the prompt" ,
"responses" : {
"200" : {
"description" : "Prompt cleared successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/tui/execute-command" : {
"post" : {
"operationId" : "tui.executeCommand" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:40 +00:00
"summary" : "Execute TUI command" ,
2025-12-06 01:07:10 +00:00
"description" : "Execute a TUI command (e.g. agent_cycle)" ,
"responses" : {
"200" : {
"description" : "Command executed successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"command" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "command" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/tui/show-toast" : {
"post" : {
"operationId" : "tui.showToast" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:40 +00:00
"summary" : "Show TUI toast" ,
2025-12-06 01:07:10 +00:00
"description" : "Show a toast notification in the TUI" ,
"responses" : {
"200" : {
"description" : "Toast notification shown successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"title" : {
"type" : "string"
} ,
"message" : {
"type" : "string"
} ,
"variant" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "info" , "success" , "warning" , "error" ]
2025-12-06 01:07:10 +00:00
} ,
"duration" : {
"description" : "Duration in milliseconds" ,
"default" : 5000 ,
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "message" , "variant" ]
2025-12-06 01:07:10 +00:00
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/tui/publish" : {
"post" : {
"operationId" : "tui.publish" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:40 +00:00
"summary" : "Publish TUI event" ,
2025-12-06 01:07:10 +00:00
"description" : "Publish a TUI event" ,
"responses" : {
"200" : {
"description" : "Event published successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/Event.tui.prompt.append"
} ,
{
"$ref" : "#/components/schemas/Event.tui.command.execute"
} ,
{
"$ref" : "#/components/schemas/Event.tui.toast.show"
2026-01-02 22:58:02 +00:00
} ,
{
"$ref" : "#/components/schemas/Event.tui.session.select"
2025-12-06 01:07:10 +00:00
}
]
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2026-01-02 22:58:02 +00:00
"/tui/select-session" : {
"post" : {
"operationId" : "tui.selectSession" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-02 22:58:02 +00:00
}
] ,
"summary" : "Select session" ,
"description" : "Navigate the TUI to display the specified session." ,
"responses" : {
"200" : {
"description" : "Session selected 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" : {
"sessionID" : {
"description" : "Session ID to navigate to" ,
"type" : "string" ,
2026-03-11 23:17:42 +00:00
"pattern" : "^ses.*"
2026-01-02 22:58:02 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" ]
2026-01-02 22:58:02 +00:00
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
}
]
}
} ,
2025-12-06 01:07:10 +00:00
"/tui/control/next" : {
"get" : {
"operationId" : "tui.control.next" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Get next TUI request" ,
"description" : "Retrieve the next TUI (Terminal User Interface) request from the queue for processing." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Next TUI request" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"path" : {
"type" : "string"
} ,
"body" : { }
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "path" , "body" ]
2025-12-06 01:07:10 +00:00
}
}
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
"/tui/control/response" : {
"post" : {
"operationId" : "tui.control.response" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2025-12-08 00:58:04 +00:00
"summary" : "Submit TUI response" ,
"description" : "Submit a response to the TUI request queue to complete a pending request." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
"description" : "Response submitted successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : { }
}
}
2025-12-08 00:58:04 +00:00
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2026-01-16 21:21:54 +00:00
"/instance/dispose" : {
"post" : {
"operationId" : "instance.dispose" ,
2025-12-06 01:07:10 +00:00
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
] ,
2026-01-16 21:21:54 +00:00
"summary" : "Dispose instance" ,
"description" : "Clean up and dispose the current OpenCode instance, releasing all resources." ,
2025-12-06 01:07:10 +00:00
"responses" : {
"200" : {
2026-01-16 21:21:54 +00:00
"description" : "Instance disposed" ,
2025-12-06 01:07:10 +00:00
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
2026-01-16 21:21:54 +00:00
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
}
]
}
} ,
"/path" : {
"get" : {
"operationId" : "path.get" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-16 21:21:54 +00:00
}
] ,
"summary" : "Get paths" ,
"description" : "Retrieve the current working directory and related path information for the OpenCode instance." ,
"responses" : {
"200" : {
"description" : "Path" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Path"
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
}
]
}
} ,
"/vcs" : {
"get" : {
"operationId" : "vcs.get" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-16 21:21:54 +00:00
}
] ,
"summary" : "Get VCS info" ,
"description" : "Retrieve version control system (VCS) information for the current project, such as git branch." ,
"responses" : {
"200" : {
"description" : "VCS info" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/VcsInfo"
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
}
]
}
} ,
"/command" : {
"get" : {
"operationId" : "command.list" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-16 21:21:54 +00:00
}
] ,
"summary" : "List commands" ,
"description" : "Get a list of all available commands in the OpenCode system." ,
"responses" : {
"200" : {
"description" : "List of commands" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Command"
}
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
}
]
}
} ,
"/log" : {
"post" : {
"operationId" : "app.log" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-16 21:21:54 +00:00
}
] ,
"summary" : "Write log" ,
"description" : "Write a log entry to the server logs with specified level and metadata." ,
"responses" : {
"200" : {
"description" : "Log entry written successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "boolean"
}
}
}
} ,
"400" : {
"description" : "Bad request" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/BadRequestError"
}
}
}
}
} ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object" ,
"properties" : {
"service" : {
"description" : "Service name for the log entry" ,
"type" : "string"
} ,
"level" : {
"description" : "Log level" ,
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "debug" , "info" , "error" , "warn" ]
2026-01-16 21:21:54 +00:00
} ,
"message" : {
"description" : "Log message" ,
"type" : "string"
} ,
"extra" : {
"description" : "Additional metadata for the log entry" ,
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "service" , "level" , "message" ]
2026-01-16 21:21:54 +00:00
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
}
]
}
} ,
"/agent" : {
"get" : {
"operationId" : "app.agents" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-16 21:21:54 +00:00
}
] ,
"summary" : "List agents" ,
"description" : "Get a list of all available AI agents in the OpenCode system." ,
"responses" : {
"200" : {
"description" : "List of agents" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Agent"
}
}
}
}
}
} ,
"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"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-16 21:21:54 +00:00
}
] ,
"summary" : "List skills" ,
"description" : "Get a list of all available skills in the OpenCode system." ,
"responses" : {
"200" : {
"description" : "List of skills" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"description" : {
"type" : "string"
} ,
"location" : {
"type" : "string"
2026-01-31 05:42:31 +00:00
} ,
"content" : {
"type" : "string"
2026-01-16 21:21:54 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "description" , "location" , "content" ]
2026-01-16 21:21:54 +00:00
}
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
}
]
}
} ,
"/lsp" : {
"get" : {
"operationId" : "lsp.status" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-16 21:21:54 +00:00
}
] ,
"summary" : "Get LSP status" ,
"description" : "Get LSP server status" ,
"responses" : {
"200" : {
"description" : "LSP server status" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/LSPStatus"
}
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
}
]
}
} ,
"/formatter" : {
"get" : {
"operationId" : "formatter.status" ,
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-16 21:21:54 +00:00
}
] ,
"summary" : "Get formatter status" ,
"description" : "Get formatter status" ,
"responses" : {
"200" : {
"description" : "Formatter status" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/FormatterStatus"
}
}
}
}
}
} ,
"x-codeSamples" : [
{
"lang" : "js" ,
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
}
]
}
} ,
2026-01-28 13:28:52 +00:00
"/event" : {
"get" : {
"operationId" : "event.subscribe" ,
2026-01-16 21:21:54 +00:00
"parameters" : [
{
"in" : "query" ,
"name" : "directory" ,
"schema" : {
"type" : "string"
}
2026-03-01 01:45:44 +00:00
} ,
{
"in" : "query" ,
"name" : "workspace" ,
"schema" : {
"type" : "string"
}
2026-01-16 21:21:54 +00:00
}
] ,
2026-01-28 13:28:52 +00:00
"summary" : "Subscribe to events" ,
"description" : "Get events" ,
2026-01-16 21:21:54 +00:00
"responses" : {
"200" : {
2026-01-28 13:28:52 +00:00
"description" : "Event stream" ,
2026-01-16 21:21:54 +00:00
"content" : {
2026-01-28 13:28:52 +00:00
"text/event-stream" : {
2026-01-16 21:21:54 +00:00
"schema" : {
2026-01-28 13:28:52 +00:00
"$ref" : "#/components/schemas/Event"
2026-01-16 21:21:54 +00:00
}
}
2025-12-06 01:07:10 +00:00
}
}
} ,
2025-12-08 00:58:04 +00:00
"x-codeSamples" : [
{
"lang" : "js" ,
2026-01-28 13:28:52 +00:00
"source" : "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
2025-12-08 00:58:04 +00:00
}
]
2026-01-28 13:28:52 +00:00
}
}
} ,
"components" : {
"schemas" : {
"Event.installation.updated" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "installation.updated"
2026-01-25 21:59:56 +00:00
} ,
2026-01-28 13:28:52 +00:00
"properties" : {
"type" : "object" ,
"properties" : {
"version" : {
"type" : "string"
2026-01-25 21:59:56 +00:00
}
2026-01-28 13:28:52 +00:00
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "version" ]
2026-01-25 21:59:56 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
2025-12-09 19:54:19 +00:00
"Event.installation.update-available" : {
2025-12-06 01:07:10 +00:00
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
2025-12-09 19:54:19 +00:00
"const" : "installation.update-available"
2025-12-06 01:07:10 +00:00
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"version" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "version" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
2025-12-09 19:54:19 +00:00
"Project" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string"
} ,
"worktree" : {
"type" : "string"
} ,
"vcs" : {
"type" : "string" ,
"const" : "git"
} ,
"name" : {
"type" : "string"
} ,
"icon" : {
"type" : "object" ,
"properties" : {
"url" : {
"type" : "string"
} ,
2026-01-19 21:00:39 +00:00
"override" : {
"type" : "string"
} ,
2025-12-09 19:54:19 +00:00
"color" : {
"type" : "string"
}
2025-12-09 20:11:32 +00:00
}
2025-12-09 19:54:19 +00:00
} ,
2026-01-22 13:41:20 +00:00
"commands" : {
"type" : "object" ,
"properties" : {
"start" : {
"description" : "Startup script to run when creating a new workspace (worktree)" ,
"type" : "string"
}
}
} ,
2025-12-09 19:54:19 +00:00
"time" : {
"type" : "object" ,
"properties" : {
"created" : {
"type" : "number"
} ,
"updated" : {
"type" : "number"
} ,
"initialized" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "created" , "updated" ]
2026-01-03 02:17:34 +00:00
} ,
"sandboxes" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
2025-12-09 19:54:19 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "worktree" , "time" , "sandboxes" ]
2025-12-09 19:54:19 +00:00
} ,
"Event.project.updated" : {
2025-12-06 01:07:10 +00:00
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
2025-12-09 19:54:19 +00:00
"const" : "project.updated"
} ,
"properties" : {
"$ref" : "#/components/schemas/Project"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-09 19:54:19 +00:00
} ,
"Event.server.instance.disposed" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "server.instance.disposed"
2025-12-06 01:07:10 +00:00
} ,
"properties" : {
"type" : "object" ,
"properties" : {
2025-12-09 19:54:19 +00:00
"directory" : {
2025-12-06 01:07:10 +00:00
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "directory" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
2026-01-20 13:34:20 +00:00
"Event.server.connected" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "server.connected"
} ,
"properties" : {
"type" : "object" ,
"properties" : { }
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-01-20 13:34:20 +00:00
} ,
"Event.global.disposed" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "global.disposed"
} ,
"properties" : {
"type" : "object" ,
"properties" : { }
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-01-20 13:34:20 +00:00
} ,
2025-12-06 01:07:10 +00:00
"Event.lsp.client.diagnostics" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "lsp.client.diagnostics"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"serverID" : {
"type" : "string"
} ,
"path" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "serverID" , "path" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.lsp.updated" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "lsp.updated"
} ,
"properties" : {
"type" : "object" ,
"properties" : { }
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
2026-01-16 21:21:54 +00:00
"Event.file.edited" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "file.edited"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"file" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "file" ]
2026-01-16 21:21:54 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-01-16 21:21:54 +00:00
} ,
2026-02-12 04:55:00 +00:00
"OutputFormatText" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "text"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" ]
2026-02-12 04:55:00 +00:00
} ,
"JSONSchema" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"OutputFormatJsonSchema" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "json_schema"
} ,
"schema" : {
"$ref" : "#/components/schemas/JSONSchema"
} ,
"retryCount" : {
"default" : 2 ,
"type" : "integer" ,
"minimum" : 0 ,
"maximum" : 9007199254740991
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "schema" ]
2026-02-12 04:55:00 +00:00
} ,
"OutputFormat" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/OutputFormatText"
} ,
{
"$ref" : "#/components/schemas/OutputFormatJsonSchema"
}
]
} ,
2025-12-06 01:07:10 +00:00
"FileDiff" : {
"type" : "object" ,
"properties" : {
"file" : {
"type" : "string"
} ,
"before" : {
"type" : "string"
} ,
"after" : {
"type" : "string"
} ,
"additions" : {
"type" : "number"
} ,
"deletions" : {
"type" : "number"
2026-02-02 20:27:15 +00:00
} ,
"status" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "added" , "deleted" , "modified" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "file" , "before" , "after" , "additions" , "deletions" ]
2025-12-06 01:07:10 +00:00
} ,
"UserMessage" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"role" : {
"type" : "string" ,
"const" : "user"
} ,
"time" : {
"type" : "object" ,
"properties" : {
"created" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "created" ]
2025-12-06 01:07:10 +00:00
} ,
2026-02-12 04:55:00 +00:00
"format" : {
"$ref" : "#/components/schemas/OutputFormat"
} ,
2025-12-06 01:07:10 +00:00
"summary" : {
"type" : "object" ,
"properties" : {
"title" : {
"type" : "string"
} ,
"body" : {
"type" : "string"
} ,
"diffs" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/FileDiff"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "diffs" ]
2025-12-06 01:07:10 +00:00
} ,
"agent" : {
"type" : "string"
} ,
"model" : {
"type" : "object" ,
"properties" : {
"providerID" : {
"type" : "string"
} ,
"modelID" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "providerID" , "modelID" ]
2025-12-06 01:07:10 +00:00
} ,
"system" : {
"type" : "string"
} ,
"tools" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "boolean"
}
2025-12-30 03:44:29 +00:00
} ,
"variant" : {
"type" : "string"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "role" , "time" , "agent" , "model" ]
2025-12-06 01:07:10 +00:00
} ,
"ProviderAuthError" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string" ,
"const" : "ProviderAuthError"
} ,
"data" : {
"type" : "object" ,
"properties" : {
"providerID" : {
"type" : "string"
} ,
"message" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "providerID" , "message" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "data" ]
2025-12-06 01:07:10 +00:00
} ,
"UnknownError" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string" ,
"const" : "UnknownError"
} ,
"data" : {
"type" : "object" ,
"properties" : {
"message" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "message" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "data" ]
2025-12-06 01:07:10 +00:00
} ,
"MessageOutputLengthError" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string" ,
"const" : "MessageOutputLengthError"
} ,
"data" : {
"type" : "object" ,
"properties" : { }
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "data" ]
2025-12-06 01:07:10 +00:00
} ,
"MessageAbortedError" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string" ,
"const" : "MessageAbortedError"
} ,
"data" : {
"type" : "object" ,
"properties" : {
"message" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "message" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "data" ]
2025-12-06 01:07:10 +00:00
} ,
2026-02-12 04:55:00 +00:00
"StructuredOutputError" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string" ,
"const" : "StructuredOutputError"
} ,
"data" : {
"type" : "object" ,
"properties" : {
"message" : {
"type" : "string"
} ,
"retries" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "message" , "retries" ]
2026-02-12 04:55:00 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "data" ]
2026-02-12 04:55:00 +00:00
} ,
2026-02-09 05:54:56 +00:00
"ContextOverflowError" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string" ,
"const" : "ContextOverflowError"
} ,
"data" : {
"type" : "object" ,
"properties" : {
"message" : {
"type" : "string"
} ,
"responseBody" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "message" ]
2026-02-09 05:54:56 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "data" ]
2026-02-09 05:54:56 +00:00
} ,
2025-12-06 01:07:10 +00:00
"APIError" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string" ,
"const" : "APIError"
} ,
"data" : {
"type" : "object" ,
"properties" : {
"message" : {
"type" : "string"
} ,
"statusCode" : {
"type" : "number"
} ,
"isRetryable" : {
"type" : "boolean"
} ,
"responseHeaders" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "string"
}
} ,
"responseBody" : {
"type" : "string"
2025-12-24 01:21:10 +00:00
} ,
2025-12-24 01:22:38 +00:00
"metadata" : {
2025-12-24 01:21:10 +00:00
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "message" , "isRetryable" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "data" ]
2025-12-06 01:07:10 +00:00
} ,
"AssistantMessage" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"role" : {
"type" : "string" ,
"const" : "assistant"
} ,
"time" : {
"type" : "object" ,
"properties" : {
"created" : {
"type" : "number"
} ,
"completed" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "created" ]
2025-12-06 01:07:10 +00:00
} ,
"error" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/ProviderAuthError"
} ,
{
"$ref" : "#/components/schemas/UnknownError"
} ,
{
"$ref" : "#/components/schemas/MessageOutputLengthError"
} ,
{
"$ref" : "#/components/schemas/MessageAbortedError"
} ,
2026-02-12 04:55:00 +00:00
{
"$ref" : "#/components/schemas/StructuredOutputError"
} ,
2026-02-09 05:54:56 +00:00
{
"$ref" : "#/components/schemas/ContextOverflowError"
} ,
2025-12-06 01:07:10 +00:00
{
"$ref" : "#/components/schemas/APIError"
}
]
} ,
"parentID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"modelID" : {
"type" : "string"
} ,
"providerID" : {
"type" : "string"
} ,
"mode" : {
"type" : "string"
} ,
2025-12-15 02:11:30 +00:00
"agent" : {
"type" : "string"
} ,
2025-12-06 01:07:10 +00:00
"path" : {
"type" : "object" ,
"properties" : {
"cwd" : {
"type" : "string"
} ,
"root" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "cwd" , "root" ]
2025-12-06 01:07:10 +00:00
} ,
"summary" : {
"type" : "boolean"
} ,
"cost" : {
"type" : "number"
} ,
"tokens" : {
"type" : "object" ,
"properties" : {
2026-02-11 01:56:08 +00:00
"total" : {
"type" : "number"
} ,
2025-12-06 01:07:10 +00:00
"input" : {
"type" : "number"
} ,
"output" : {
"type" : "number"
} ,
"reasoning" : {
"type" : "number"
} ,
"cache" : {
"type" : "object" ,
"properties" : {
"read" : {
"type" : "number"
} ,
"write" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "read" , "write" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "input" , "output" , "reasoning" , "cache" ]
2025-12-06 01:07:10 +00:00
} ,
2026-02-12 04:55:00 +00:00
"structured" : { } ,
2026-02-06 22:34:23 +00:00
"variant" : {
"type" : "string"
} ,
2025-12-06 01:07:10 +00:00
"finish" : {
"type" : "string"
}
} ,
"required" : [
"id" ,
"sessionID" ,
"role" ,
"time" ,
"parentID" ,
"modelID" ,
"providerID" ,
"mode" ,
2025-12-15 02:11:30 +00:00
"agent" ,
2025-12-06 01:07:10 +00:00
"path" ,
"cost" ,
"tokens"
]
} ,
"Message" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/UserMessage"
} ,
{
"$ref" : "#/components/schemas/AssistantMessage"
}
]
} ,
"Event.message.updated" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "message.updated"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"info" : {
"$ref" : "#/components/schemas/Message"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "info" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.message.removed" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "message.removed"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" , "messageID" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"TextPart" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "text"
} ,
"text" : {
"type" : "string"
} ,
"synthetic" : {
"type" : "boolean"
} ,
"ignored" : {
"type" : "boolean"
} ,
"time" : {
"type" : "object" ,
"properties" : {
"start" : {
"type" : "number"
} ,
"end" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "start" ]
2025-12-06 01:07:10 +00:00
} ,
"metadata" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "messageID" , "type" , "text" ]
2025-12-06 01:07:10 +00:00
} ,
2026-01-28 16:12:32 +00:00
"SubtaskPart" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2026-01-28 16:12:32 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2026-01-28 16:12:32 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2026-01-28 16:12:32 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "subtask"
} ,
"prompt" : {
"type" : "string"
} ,
"description" : {
"type" : "string"
} ,
"agent" : {
"type" : "string"
} ,
"model" : {
"type" : "object" ,
"properties" : {
"providerID" : {
"type" : "string"
} ,
"modelID" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "providerID" , "modelID" ]
2026-01-28 16:12:32 +00:00
} ,
"command" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "messageID" , "type" , "prompt" , "description" , "agent" ]
2026-01-28 16:12:32 +00:00
} ,
2025-12-06 01:07:10 +00:00
"ReasoningPart" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "reasoning"
} ,
"text" : {
"type" : "string"
} ,
"metadata" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"time" : {
"type" : "object" ,
"properties" : {
"start" : {
"type" : "number"
} ,
"end" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "start" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "messageID" , "type" , "text" , "time" ]
2025-12-06 01:07:10 +00:00
} ,
"FilePartSourceText" : {
"type" : "object" ,
"properties" : {
"value" : {
"type" : "string"
} ,
"start" : {
"type" : "integer" ,
"minimum" : -9007199254740991 ,
"maximum" : 9007199254740991
} ,
"end" : {
"type" : "integer" ,
"minimum" : -9007199254740991 ,
"maximum" : 9007199254740991
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "value" , "start" , "end" ]
2025-12-06 01:07:10 +00:00
} ,
"FileSource" : {
"type" : "object" ,
"properties" : {
"text" : {
"$ref" : "#/components/schemas/FilePartSourceText"
} ,
"type" : {
"type" : "string" ,
"const" : "file"
} ,
"path" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "text" , "type" , "path" ]
2025-12-06 01:07:10 +00:00
} ,
"Range" : {
"type" : "object" ,
"properties" : {
"start" : {
"type" : "object" ,
"properties" : {
"line" : {
"type" : "number"
} ,
"character" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "line" , "character" ]
2025-12-06 01:07:10 +00:00
} ,
"end" : {
"type" : "object" ,
"properties" : {
"line" : {
"type" : "number"
} ,
"character" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "line" , "character" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "start" , "end" ]
2025-12-06 01:07:10 +00:00
} ,
"SymbolSource" : {
"type" : "object" ,
"properties" : {
"text" : {
"$ref" : "#/components/schemas/FilePartSourceText"
} ,
"type" : {
"type" : "string" ,
"const" : "symbol"
} ,
"path" : {
"type" : "string"
} ,
"range" : {
"$ref" : "#/components/schemas/Range"
} ,
"name" : {
"type" : "string"
} ,
"kind" : {
"type" : "integer" ,
"minimum" : -9007199254740991 ,
"maximum" : 9007199254740991
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "text" , "type" , "path" , "range" , "name" , "kind" ]
2025-12-06 01:07:10 +00:00
} ,
2026-01-04 15:13:52 +00:00
"ResourceSource" : {
"type" : "object" ,
"properties" : {
"text" : {
"$ref" : "#/components/schemas/FilePartSourceText"
} ,
"type" : {
"type" : "string" ,
"const" : "resource"
} ,
"clientName" : {
"type" : "string"
} ,
"uri" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "text" , "type" , "clientName" , "uri" ]
2026-01-04 15:13:52 +00:00
} ,
2025-12-06 01:07:10 +00:00
"FilePartSource" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/FileSource"
} ,
{
"$ref" : "#/components/schemas/SymbolSource"
2026-01-04 15:13:52 +00:00
} ,
{
"$ref" : "#/components/schemas/ResourceSource"
2025-12-06 01:07:10 +00:00
}
]
} ,
"FilePart" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "file"
} ,
"mime" : {
"type" : "string"
} ,
"filename" : {
"type" : "string"
} ,
"url" : {
"type" : "string"
} ,
"source" : {
"$ref" : "#/components/schemas/FilePartSource"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "messageID" , "type" , "mime" , "url" ]
2025-12-06 01:07:10 +00:00
} ,
"ToolStatePending" : {
"type" : "object" ,
"properties" : {
"status" : {
"type" : "string" ,
"const" : "pending"
} ,
"input" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"raw" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "status" , "input" , "raw" ]
2025-12-06 01:07:10 +00:00
} ,
"ToolStateRunning" : {
"type" : "object" ,
"properties" : {
"status" : {
"type" : "string" ,
"const" : "running"
} ,
"input" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"title" : {
"type" : "string"
} ,
"metadata" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"time" : {
"type" : "object" ,
"properties" : {
"start" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "start" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "status" , "input" , "time" ]
2025-12-06 01:07:10 +00:00
} ,
"ToolStateCompleted" : {
"type" : "object" ,
"properties" : {
"status" : {
"type" : "string" ,
"const" : "completed"
} ,
"input" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"output" : {
"type" : "string"
} ,
"title" : {
"type" : "string"
} ,
"metadata" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"time" : {
"type" : "object" ,
"properties" : {
"start" : {
"type" : "number"
} ,
"end" : {
"type" : "number"
} ,
"compacted" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "start" , "end" ]
2025-12-06 01:07:10 +00:00
} ,
"attachments" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/FilePart"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "status" , "input" , "output" , "title" , "metadata" , "time" ]
2025-12-06 01:07:10 +00:00
} ,
"ToolStateError" : {
"type" : "object" ,
"properties" : {
"status" : {
"type" : "string" ,
"const" : "error"
} ,
"input" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"error" : {
"type" : "string"
} ,
"metadata" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"time" : {
"type" : "object" ,
"properties" : {
"start" : {
"type" : "number"
} ,
"end" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "start" , "end" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "status" , "input" , "error" , "time" ]
2025-12-06 01:07:10 +00:00
} ,
"ToolState" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/ToolStatePending"
} ,
{
"$ref" : "#/components/schemas/ToolStateRunning"
} ,
{
"$ref" : "#/components/schemas/ToolStateCompleted"
} ,
{
"$ref" : "#/components/schemas/ToolStateError"
}
]
} ,
"ToolPart" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "tool"
} ,
"callID" : {
"type" : "string"
} ,
"tool" : {
"type" : "string"
} ,
"state" : {
"$ref" : "#/components/schemas/ToolState"
} ,
"metadata" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "messageID" , "type" , "callID" , "tool" , "state" ]
2025-12-06 01:07:10 +00:00
} ,
"StepStartPart" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "step-start"
} ,
"snapshot" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "messageID" , "type" ]
2025-12-06 01:07:10 +00:00
} ,
"StepFinishPart" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "step-finish"
} ,
"reason" : {
"type" : "string"
} ,
"snapshot" : {
"type" : "string"
} ,
"cost" : {
"type" : "number"
} ,
"tokens" : {
"type" : "object" ,
"properties" : {
2026-02-11 01:56:08 +00:00
"total" : {
"type" : "number"
} ,
2025-12-06 01:07:10 +00:00
"input" : {
"type" : "number"
} ,
"output" : {
"type" : "number"
} ,
"reasoning" : {
"type" : "number"
} ,
"cache" : {
"type" : "object" ,
"properties" : {
"read" : {
"type" : "number"
} ,
"write" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "read" , "write" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "input" , "output" , "reasoning" , "cache" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "messageID" , "type" , "reason" , "cost" , "tokens" ]
2025-12-06 01:07:10 +00:00
} ,
"SnapshotPart" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "snapshot"
} ,
"snapshot" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "messageID" , "type" , "snapshot" ]
2025-12-06 01:07:10 +00:00
} ,
"PatchPart" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "patch"
} ,
"hash" : {
"type" : "string"
} ,
"files" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "messageID" , "type" , "hash" , "files" ]
2025-12-06 01:07:10 +00:00
} ,
"AgentPart" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "agent"
} ,
"name" : {
"type" : "string"
} ,
"source" : {
"type" : "object" ,
"properties" : {
"value" : {
"type" : "string"
} ,
"start" : {
"type" : "integer" ,
"minimum" : -9007199254740991 ,
"maximum" : 9007199254740991
} ,
"end" : {
"type" : "integer" ,
"minimum" : -9007199254740991 ,
"maximum" : 9007199254740991
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "value" , "start" , "end" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "messageID" , "type" , "name" ]
2025-12-06 01:07:10 +00:00
} ,
"RetryPart" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "retry"
} ,
"attempt" : {
"type" : "number"
} ,
"error" : {
"$ref" : "#/components/schemas/APIError"
} ,
"time" : {
"type" : "object" ,
"properties" : {
"created" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "created" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "messageID" , "type" , "attempt" , "error" , "time" ]
2025-12-06 01:07:10 +00:00
} ,
"CompactionPart" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "compaction"
} ,
"auto" : {
"type" : "boolean"
2026-03-02 07:41:53 +00:00
} ,
"overflow" : {
"type" : "boolean"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "messageID" , "type" , "auto" ]
2025-12-06 01:07:10 +00:00
} ,
"Part" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/TextPart"
} ,
{
2026-01-28 16:12:32 +00:00
"$ref" : "#/components/schemas/SubtaskPart"
2025-12-06 01:07:10 +00:00
} ,
{
"$ref" : "#/components/schemas/ReasoningPart"
} ,
{
"$ref" : "#/components/schemas/FilePart"
} ,
{
"$ref" : "#/components/schemas/ToolPart"
} ,
{
"$ref" : "#/components/schemas/StepStartPart"
} ,
{
"$ref" : "#/components/schemas/StepFinishPart"
} ,
{
"$ref" : "#/components/schemas/SnapshotPart"
} ,
{
"$ref" : "#/components/schemas/PatchPart"
} ,
{
"$ref" : "#/components/schemas/AgentPart"
} ,
{
"$ref" : "#/components/schemas/RetryPart"
} ,
{
"$ref" : "#/components/schemas/CompactionPart"
}
]
} ,
"Event.message.part.updated" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "message.part.updated"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"part" : {
"$ref" : "#/components/schemas/Part"
2026-02-14 04:19:02 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "part" ]
2026-02-14 04:19:02 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-02-14 04:19:02 +00:00
} ,
"Event.message.part.delta" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "message.part.delta"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2026-02-14 04:19:02 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2026-02-14 04:19:02 +00:00
} ,
"partID" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2026-02-14 04:19:02 +00:00
} ,
"field" : {
"type" : "string"
2025-12-06 01:07:10 +00:00
} ,
"delta" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" , "messageID" , "partID" , "field" , "delta" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.message.part.removed" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "message.part.removed"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"partID" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" , "messageID" , "partID" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
2026-01-01 22:54:43 +00:00
"PermissionRequest" : {
2025-12-06 01:07:10 +00:00
"type" : "object" ,
"properties" : {
"id" : {
2026-01-01 22:54:43 +00:00
"type" : "string" ,
"pattern" : "^per.*"
2025-12-06 01:07:10 +00:00
} ,
"sessionID" : {
2026-01-01 22:54:43 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
2026-01-01 22:54:43 +00:00
"permission" : {
2025-12-06 01:07:10 +00:00
"type" : "string"
} ,
2026-01-01 22:54:43 +00:00
"patterns" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
} ,
"metadata" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
2026-01-01 22:54:43 +00:00
"always" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
} ,
2026-01-01 22:54:43 +00:00
"tool" : {
2025-12-06 01:07:10 +00:00
"type" : "object" ,
"properties" : {
2026-01-01 22:54:43 +00:00
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
2026-01-01 22:54:43 +00:00
"callID" : {
2025-12-06 01:07:10 +00:00
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "messageID" , "callID" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "permission" , "patterns" , "metadata" , "always" ]
2025-12-06 01:07:10 +00:00
} ,
2026-01-01 22:54:43 +00:00
"Event.permission.asked" : {
2025-12-15 02:11:30 +00:00
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
2026-01-01 22:54:43 +00:00
"const" : "permission.asked"
2025-12-15 02:11:30 +00:00
} ,
"properties" : {
2026-01-01 22:54:43 +00:00
"$ref" : "#/components/schemas/PermissionRequest"
2025-12-15 02:11:30 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-15 02:11:30 +00:00
} ,
2026-01-01 22:54:43 +00:00
"Event.permission.replied" : {
2025-12-15 02:11:30 +00:00
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
2026-01-01 22:54:43 +00:00
"const" : "permission.replied"
2025-12-15 02:11:30 +00:00
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-15 02:11:30 +00:00
} ,
2026-01-01 22:54:43 +00:00
"requestID" : {
2026-03-12 01:50:44 +00:00
"type" : "string" ,
"pattern" : "^per.*"
2026-01-01 22:54:43 +00:00
} ,
"reply" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "once" , "always" , "reject" ]
2025-12-15 02:11:30 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" , "requestID" , "reply" ]
2025-12-15 02:11:30 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-15 02:11:30 +00:00
} ,
2025-12-06 01:07:10 +00:00
"SessionStatus" : {
"anyOf" : [
{
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "idle"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" ]
2025-12-06 01:07:10 +00:00
} ,
{
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "retry"
} ,
"attempt" : {
"type" : "number"
} ,
"message" : {
"type" : "string"
} ,
"next" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "attempt" , "message" , "next" ]
2025-12-06 01:07:10 +00:00
} ,
{
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "busy"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" ]
2025-12-06 01:07:10 +00:00
}
]
} ,
"Event.session.status" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "session.status"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"status" : {
"$ref" : "#/components/schemas/SessionStatus"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" , "status" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.session.idle" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "session.idle"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
2026-01-08 03:30:18 +00:00
"QuestionOption" : {
"type" : "object" ,
"properties" : {
"label" : {
"description" : "Display text (1-5 words, concise)" ,
2026-01-25 04:12:09 +00:00
"type" : "string"
2026-01-08 03:30:18 +00:00
} ,
"description" : {
"description" : "Explanation of choice" ,
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "label" , "description" ]
2026-01-08 03:30:18 +00:00
} ,
"QuestionInfo" : {
"type" : "object" ,
"properties" : {
"question" : {
"description" : "Complete question" ,
"type" : "string"
} ,
"header" : {
2026-01-18 06:42:13 +00:00
"description" : "Very short label (max 30 chars)" ,
2026-01-25 04:12:09 +00:00
"type" : "string"
2026-01-08 03:30:18 +00:00
} ,
"options" : {
"description" : "Available choices" ,
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/QuestionOption"
}
2026-01-08 22:32:21 +00:00
} ,
"multiple" : {
"description" : "Allow selecting multiple choices" ,
"type" : "boolean"
2026-01-13 20:56:28 +00:00
} ,
"custom" : {
"description" : "Allow typing a custom answer (default: true)" ,
"type" : "boolean"
2026-01-08 03:30:18 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "question" , "header" , "options" ]
2026-01-08 03:30:18 +00:00
} ,
"QuestionRequest" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string" ,
"pattern" : "^que.*"
} ,
"sessionID" : {
"type" : "string" ,
"pattern" : "^ses.*"
} ,
"questions" : {
"description" : "Questions to ask" ,
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/QuestionInfo"
}
} ,
"tool" : {
"type" : "object" ,
"properties" : {
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2026-01-08 03:30:18 +00:00
} ,
"callID" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "messageID" , "callID" ]
2026-01-08 03:30:18 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "sessionID" , "questions" ]
2026-01-08 03:30:18 +00:00
} ,
"Event.question.asked" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "question.asked"
} ,
"properties" : {
"$ref" : "#/components/schemas/QuestionRequest"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-01-08 22:32:21 +00:00
} ,
"QuestionAnswer" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
2026-01-08 03:30:18 +00:00
} ,
"Event.question.replied" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "question.replied"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2026-01-08 03:30:18 +00:00
} ,
"requestID" : {
2026-03-12 01:50:44 +00:00
"type" : "string" ,
"pattern" : "^que.*"
2026-01-08 03:30:18 +00:00
} ,
"answers" : {
"type" : "array" ,
"items" : {
2026-01-08 22:32:21 +00:00
"$ref" : "#/components/schemas/QuestionAnswer"
2026-01-08 03:30:18 +00:00
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" , "requestID" , "answers" ]
2026-01-08 03:30:18 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-01-08 03:30:18 +00:00
} ,
"Event.question.rejected" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "question.rejected"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2026-01-08 03:30:18 +00:00
} ,
"requestID" : {
2026-03-12 01:50:44 +00:00
"type" : "string" ,
"pattern" : "^que.*"
2026-01-08 03:30:18 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" , "requestID" ]
2026-01-08 03:30:18 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-01-08 03:30:18 +00:00
} ,
2025-12-06 01:07:10 +00:00
"Event.session.compacted" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "session.compacted"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
2026-01-26 22:49:23 +00:00
"Event.file.watcher.updated" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "file.watcher.updated"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"file" : {
"type" : "string"
} ,
"event" : {
"anyOf" : [
{
"type" : "string" ,
"const" : "add"
} ,
{
"type" : "string" ,
"const" : "change"
} ,
{
"type" : "string" ,
"const" : "unlink"
}
]
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "file" , "event" ]
2026-01-26 22:49:23 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-01-26 22:49:23 +00:00
} ,
2026-01-01 22:54:43 +00:00
"Todo" : {
"type" : "object" ,
"properties" : {
"content" : {
"description" : "Brief description of the task" ,
"type" : "string"
} ,
"status" : {
"description" : "Current status of the task: pending, in_progress, completed, cancelled" ,
"type" : "string"
} ,
"priority" : {
"description" : "Priority level of the task: high, medium, low" ,
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "content" , "status" , "priority" ]
2026-01-01 22:54:43 +00:00
} ,
"Event.todo.updated" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "todo.updated"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2026-01-01 22:54:43 +00:00
} ,
"todos" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Todo"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" , "todos" ]
2026-01-01 22:54:43 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-01-01 22:54:43 +00:00
} ,
2025-12-23 04:28:11 +00:00
"Event.tui.prompt.append" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "tui.prompt.append"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"text" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "text" ]
2025-12-23 04:28:11 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-23 04:28:11 +00:00
} ,
"Event.tui.command.execute" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "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" ,
2026-01-18 03:55:03 +00:00
"session.line.up" ,
"session.line.down" ,
2025-12-23 04:28:11 +00:00
"session.half.page.up" ,
"session.half.page.down" ,
"session.first" ,
"session.last" ,
"prompt.clear" ,
"prompt.submit" ,
"agent.cycle"
]
} ,
{
"type" : "string"
}
]
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "command" ]
2025-12-23 04:28:11 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-23 04:28:11 +00:00
} ,
"Event.tui.toast.show" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "tui.toast.show"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"title" : {
"type" : "string"
} ,
"message" : {
"type" : "string"
} ,
"variant" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "info" , "success" , "warning" , "error" ]
2025-12-23 04:28:11 +00:00
} ,
"duration" : {
"description" : "Duration in milliseconds" ,
"default" : 5000 ,
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "message" , "variant" ]
2025-12-23 04:28:11 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-23 04:28:11 +00:00
} ,
2026-01-02 22:58:02 +00:00
"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" ,
2026-03-11 23:17:42 +00:00
"pattern" : "^ses.*"
2026-01-02 22:58:02 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" ]
2026-01-02 22:58:02 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-01-02 22:58:02 +00:00
} ,
2025-12-24 01:37:35 +00:00
"Event.mcp.tools.changed" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "mcp.tools.changed"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"server" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "server" ]
2025-12-24 01:37:35 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-24 01:37:35 +00:00
} ,
2026-01-16 01:22:16 +00:00
"Event.mcp.browser.open.failed" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "mcp.browser.open.failed"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"mcpName" : {
"type" : "string"
} ,
"url" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "mcpName" , "url" ]
2026-01-16 01:22:16 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-01-16 01:22:16 +00:00
} ,
2025-12-06 01:07:10 +00:00
"Event.command.executed" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "command.executed"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"sessionID" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"arguments" : {
"type" : "string"
} ,
"messageID" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "sessionID" , "arguments" , "messageID" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
2026-01-01 22:54:43 +00:00
"PermissionAction" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "allow" , "deny" , "ask" ]
2026-01-01 22:54:43 +00:00
} ,
"PermissionRule" : {
"type" : "object" ,
"properties" : {
"permission" : {
"type" : "string"
} ,
"pattern" : {
"type" : "string"
} ,
"action" : {
"$ref" : "#/components/schemas/PermissionAction"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "permission" , "pattern" , "action" ]
2026-01-01 22:54:43 +00:00
} ,
"PermissionRuleset" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/PermissionRule"
}
} ,
2025-12-06 01:07:10 +00:00
"Session" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
2026-01-13 20:56:28 +00:00
"slug" : {
"type" : "string"
} ,
2025-12-06 01:07:10 +00:00
"projectID" : {
"type" : "string"
} ,
2026-03-01 03:10:46 +00:00
"workspaceID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^wrk.*"
2026-03-01 03:10:46 +00:00
} ,
2025-12-06 01:07:10 +00:00
"directory" : {
"type" : "string"
} ,
"parentID" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"summary" : {
"type" : "object" ,
"properties" : {
"additions" : {
"type" : "number"
} ,
"deletions" : {
"type" : "number"
} ,
"files" : {
"type" : "number"
} ,
"diffs" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/FileDiff"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "additions" , "deletions" , "files" ]
2025-12-06 01:07:10 +00:00
} ,
"share" : {
"type" : "object" ,
"properties" : {
"url" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "url" ]
2025-12-06 01:07:10 +00:00
} ,
"title" : {
"type" : "string"
} ,
"version" : {
"type" : "string"
} ,
"time" : {
"type" : "object" ,
"properties" : {
"created" : {
"type" : "number"
} ,
"updated" : {
"type" : "number"
} ,
"compacting" : {
"type" : "number"
2025-12-10 21:01:06 +00:00
} ,
"archived" : {
"type" : "number"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "created" , "updated" ]
2025-12-06 01:07:10 +00:00
} ,
2026-01-01 22:54:43 +00:00
"permission" : {
"$ref" : "#/components/schemas/PermissionRuleset"
} ,
2025-12-06 01:07:10 +00:00
"revert" : {
"type" : "object" ,
"properties" : {
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2025-12-06 01:07:10 +00:00
} ,
"partID" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
"snapshot" : {
"type" : "string"
} ,
"diff" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "messageID" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "slug" , "projectID" , "directory" , "title" , "version" , "time" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.session.created" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "session.created"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"info" : {
"$ref" : "#/components/schemas/Session"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "info" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.session.updated" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "session.updated"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"info" : {
"$ref" : "#/components/schemas/Session"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "info" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.session.deleted" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "session.deleted"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"info" : {
"$ref" : "#/components/schemas/Session"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "info" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.session.diff" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "session.diff"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"diff" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/FileDiff"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "sessionID" , "diff" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.session.error" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "session.error"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"sessionID" : {
2026-03-11 23:17:42 +00:00
"type" : "string" ,
"pattern" : "^ses.*"
2025-12-06 01:07:10 +00:00
} ,
"error" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/ProviderAuthError"
} ,
{
"$ref" : "#/components/schemas/UnknownError"
} ,
{
"$ref" : "#/components/schemas/MessageOutputLengthError"
} ,
{
"$ref" : "#/components/schemas/MessageAbortedError"
} ,
2026-02-12 04:55:00 +00:00
{
"$ref" : "#/components/schemas/StructuredOutputError"
} ,
2026-02-09 05:54:56 +00:00
{
"$ref" : "#/components/schemas/ContextOverflowError"
} ,
2025-12-06 01:07:10 +00:00
{
"$ref" : "#/components/schemas/APIError"
}
]
}
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.vcs.branch.updated" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "vcs.branch.updated"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"branch" : {
"type" : "string"
}
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
2026-02-27 20:37:28 +00:00
"Event.workspace.ready" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "workspace.ready"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" ]
2026-02-27 20:37:28 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-02-27 20:37:28 +00:00
} ,
"Event.workspace.failed" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "workspace.failed"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"message" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "message" ]
2026-02-27 20:37:28 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-02-27 20:37:28 +00:00
} ,
2025-12-06 01:07:10 +00:00
"Pty" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^pty.*"
2025-12-06 01:07:10 +00:00
} ,
"title" : {
"type" : "string"
} ,
"command" : {
"type" : "string"
} ,
"args" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"cwd" : {
"type" : "string"
} ,
"status" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "running" , "exited" ]
2025-12-06 01:07:10 +00:00
} ,
"pid" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "title" , "command" , "args" , "cwd" , "status" , "pid" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.pty.created" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "pty.created"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"info" : {
"$ref" : "#/components/schemas/Pty"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "info" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.pty.updated" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "pty.updated"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"info" : {
"$ref" : "#/components/schemas/Pty"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "info" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.pty.exited" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "pty.exited"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^pty.*"
2025-12-06 01:07:10 +00:00
} ,
"exitCode" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "exitCode" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
"Event.pty.deleted" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "pty.deleted"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string" ,
2025-12-18 21:47:59 +00:00
"pattern" : "^pty.*"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2025-12-06 01:07:10 +00:00
} ,
2026-03-04 02:36:18 +00:00
"Event.worktree.ready" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "worktree.ready"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"branch" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "branch" ]
2026-03-04 02:36:18 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-03-04 02:36:18 +00:00
} ,
"Event.worktree.failed" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "worktree.failed"
} ,
"properties" : {
"type" : "object" ,
"properties" : {
"message" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "message" ]
2026-03-04 02:36:18 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "properties" ]
2026-03-04 02:36:18 +00:00
} ,
2025-12-06 01:07:10 +00:00
"Event" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/Event.installation.updated"
} ,
{
"$ref" : "#/components/schemas/Event.installation.update-available"
} ,
2025-12-09 19:54:19 +00:00
{
"$ref" : "#/components/schemas/Event.project.updated"
} ,
{
"$ref" : "#/components/schemas/Event.server.instance.disposed"
} ,
2026-01-20 13:34:20 +00:00
{
"$ref" : "#/components/schemas/Event.server.connected"
} ,
{
"$ref" : "#/components/schemas/Event.global.disposed"
} ,
2025-12-06 01:07:10 +00:00
{
"$ref" : "#/components/schemas/Event.lsp.client.diagnostics"
} ,
{
"$ref" : "#/components/schemas/Event.lsp.updated"
} ,
2026-01-16 21:21:54 +00:00
{
"$ref" : "#/components/schemas/Event.file.edited"
} ,
2025-12-06 01:07:10 +00:00
{
"$ref" : "#/components/schemas/Event.message.updated"
} ,
{
"$ref" : "#/components/schemas/Event.message.removed"
} ,
{
"$ref" : "#/components/schemas/Event.message.part.updated"
} ,
2026-02-14 04:19:02 +00:00
{
"$ref" : "#/components/schemas/Event.message.part.delta"
} ,
2025-12-06 01:07:10 +00:00
{
"$ref" : "#/components/schemas/Event.message.part.removed"
} ,
{
2026-01-01 22:54:43 +00:00
"$ref" : "#/components/schemas/Event.permission.asked"
2025-12-06 01:07:10 +00:00
} ,
{
"$ref" : "#/components/schemas/Event.permission.replied"
} ,
{
2026-01-01 22:54:43 +00:00
"$ref" : "#/components/schemas/Event.session.status"
2025-12-06 01:07:10 +00:00
} ,
{
2026-01-01 22:54:43 +00:00
"$ref" : "#/components/schemas/Event.session.idle"
2025-12-06 01:07:10 +00:00
} ,
2026-01-08 03:30:18 +00:00
{
"$ref" : "#/components/schemas/Event.question.asked"
} ,
{
"$ref" : "#/components/schemas/Event.question.replied"
} ,
{
"$ref" : "#/components/schemas/Event.question.rejected"
} ,
2025-12-06 01:07:10 +00:00
{
2026-01-01 22:54:43 +00:00
"$ref" : "#/components/schemas/Event.session.compacted"
2025-12-06 01:07:10 +00:00
} ,
{
2026-01-26 22:49:23 +00:00
"$ref" : "#/components/schemas/Event.file.watcher.updated"
2025-12-06 01:07:10 +00:00
} ,
2026-01-18 06:35:48 +00:00
{
2026-01-26 22:49:23 +00:00
"$ref" : "#/components/schemas/Event.todo.updated"
2026-01-18 06:35:48 +00:00
} ,
2025-12-23 04:28:11 +00:00
{
"$ref" : "#/components/schemas/Event.tui.prompt.append"
} ,
{
"$ref" : "#/components/schemas/Event.tui.command.execute"
} ,
{
"$ref" : "#/components/schemas/Event.tui.toast.show"
} ,
2026-01-02 22:58:02 +00:00
{
"$ref" : "#/components/schemas/Event.tui.session.select"
} ,
2025-12-24 01:37:35 +00:00
{
"$ref" : "#/components/schemas/Event.mcp.tools.changed"
} ,
2026-01-16 01:22:16 +00:00
{
"$ref" : "#/components/schemas/Event.mcp.browser.open.failed"
} ,
2025-12-06 01:07:10 +00:00
{
"$ref" : "#/components/schemas/Event.command.executed"
} ,
{
"$ref" : "#/components/schemas/Event.session.created"
} ,
{
"$ref" : "#/components/schemas/Event.session.updated"
} ,
{
"$ref" : "#/components/schemas/Event.session.deleted"
} ,
{
"$ref" : "#/components/schemas/Event.session.diff"
} ,
{
"$ref" : "#/components/schemas/Event.session.error"
} ,
{
"$ref" : "#/components/schemas/Event.vcs.branch.updated"
} ,
{
2026-02-27 20:37:28 +00:00
"$ref" : "#/components/schemas/Event.workspace.ready"
2025-12-06 01:07:10 +00:00
} ,
{
2026-02-27 20:37:28 +00:00
"$ref" : "#/components/schemas/Event.workspace.failed"
2026-01-23 11:19:35 +00:00
} ,
{
2026-02-27 20:37:28 +00:00
"$ref" : "#/components/schemas/Event.pty.created"
2026-01-23 11:19:35 +00:00
} ,
{
2026-02-27 20:37:28 +00:00
"$ref" : "#/components/schemas/Event.pty.updated"
} ,
{
"$ref" : "#/components/schemas/Event.pty.exited"
} ,
{
"$ref" : "#/components/schemas/Event.pty.deleted"
2026-03-04 02:36:18 +00:00
} ,
{
"$ref" : "#/components/schemas/Event.worktree.ready"
} ,
{
"$ref" : "#/components/schemas/Event.worktree.failed"
2025-12-06 01:07:10 +00:00
}
]
} ,
"GlobalEvent" : {
"type" : "object" ,
"properties" : {
"directory" : {
"type" : "string"
} ,
"payload" : {
"$ref" : "#/components/schemas/Event"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "directory" , "payload" ]
2025-12-06 01:07:10 +00:00
} ,
2025-12-26 17:09:31 +00:00
"LogLevel" : {
"description" : "Log level" ,
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "DEBUG" , "INFO" , "WARN" , "ERROR" ]
2025-12-26 17:09:31 +00:00
} ,
2025-12-26 20:48:30 +00:00
"ServerConfig" : {
"description" : "Server configuration for opencode serve and web commands" ,
"type" : "object" ,
"properties" : {
"port" : {
"description" : "Port to listen on" ,
"type" : "integer" ,
"exclusiveMinimum" : 0 ,
"maximum" : 9007199254740991
} ,
"hostname" : {
"description" : "Hostname to listen on" ,
"type" : "string"
} ,
"mdns" : {
"description" : "Enable mDNS service discovery" ,
"type" : "boolean"
2025-12-31 09:51:12 +00:00
} ,
2026-02-02 20:53:36 +00:00
"mdnsDomain" : {
"description" : "Custom domain name for mDNS service (default: opencode.local)" ,
"type" : "string"
} ,
2025-12-31 09:51:12 +00:00
"cors" : {
"description" : "Additional domains to allow for CORS" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
2025-12-26 20:48:30 +00:00
}
} ,
"additionalProperties" : false
} ,
2026-01-01 22:54:43 +00:00
"PermissionActionConfig" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "ask" , "allow" , "deny" ]
2026-01-01 22:54:43 +00:00
} ,
"PermissionObjectConfig" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"$ref" : "#/components/schemas/PermissionActionConfig"
}
} ,
"PermissionRuleConfig" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/PermissionActionConfig"
} ,
{
"$ref" : "#/components/schemas/PermissionObjectConfig"
}
]
} ,
"PermissionConfig" : {
"anyOf" : [
{
"type" : "object" ,
"properties" : {
2026-01-05 19:10:42 +00:00
"__originalKeys" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2026-01-01 22:54:43 +00:00
"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"
} ,
"todoread" : {
"$ref" : "#/components/schemas/PermissionActionConfig"
} ,
2026-01-08 03:30:18 +00:00
"question" : {
"$ref" : "#/components/schemas/PermissionActionConfig"
} ,
2026-01-01 22:54:43 +00:00
"webfetch" : {
"$ref" : "#/components/schemas/PermissionActionConfig"
} ,
"websearch" : {
"$ref" : "#/components/schemas/PermissionActionConfig"
} ,
"codesearch" : {
"$ref" : "#/components/schemas/PermissionActionConfig"
} ,
"lsp" : {
"$ref" : "#/components/schemas/PermissionRuleConfig"
} ,
"doom_loop" : {
"$ref" : "#/components/schemas/PermissionActionConfig"
2026-01-29 18:14:15 +00:00
} ,
"skill" : {
"$ref" : "#/components/schemas/PermissionRuleConfig"
2026-01-01 22:54:43 +00:00
}
} ,
"additionalProperties" : {
"$ref" : "#/components/schemas/PermissionRuleConfig"
}
} ,
{
"$ref" : "#/components/schemas/PermissionActionConfig"
}
]
} ,
2025-12-06 01:07:10 +00:00
"AgentConfig" : {
"type" : "object" ,
"properties" : {
"model" : {
2026-02-05 06:31:08 +00:00
"type" : "string"
2025-12-06 01:07:10 +00:00
} ,
2026-02-01 20:13:33 +00:00
"variant" : {
"description" : "Default model variant for this agent (applies only when using the agent's configured model)." ,
"type" : "string"
} ,
2025-12-06 01:07:10 +00:00
"temperature" : {
"type" : "number"
} ,
"top_p" : {
"type" : "number"
} ,
"prompt" : {
"type" : "string"
} ,
"tools" : {
2026-01-01 22:54:43 +00:00
"description" : "@deprecated Use 'permission' field instead" ,
2025-12-06 01:07:10 +00:00
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "boolean"
}
} ,
"disable" : {
"type" : "boolean"
} ,
"description" : {
"description" : "Description of when to use the agent" ,
"type" : "string"
} ,
"mode" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "subagent" , "primary" , "all" ]
2025-12-06 01:07:10 +00:00
} ,
2026-01-07 04:29:50 +00:00
"hidden" : {
"description" : "Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)" ,
"type" : "boolean"
} ,
2026-01-01 22:54:43 +00:00
"options" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
2025-12-06 01:07:10 +00:00
"color" : {
2026-02-03 21:10:08 +00:00
"description" : "Hex color code (e.g., #FF5733) or theme color (e.g., primary)" ,
"anyOf" : [
{
"type" : "string" ,
"pattern" : "^#[0-9a-fA-F]{6}$"
} ,
{
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "primary" , "secondary" , "accent" , "success" , "warning" , "error" , "info" ]
2026-02-03 21:10:08 +00:00
}
]
2025-12-06 01:07:10 +00:00
} ,
2026-01-01 22:54:43 +00:00
"steps" : {
2025-12-06 01:07:10 +00:00
"description" : "Maximum number of agentic iterations before forcing text-only response" ,
"type" : "integer" ,
"exclusiveMinimum" : 0 ,
"maximum" : 9007199254740991
} ,
2026-01-01 22:54:43 +00:00
"maxSteps" : {
"description" : "@deprecated Use 'steps' field instead." ,
"type" : "integer" ,
"exclusiveMinimum" : 0 ,
"maximum" : 9007199254740991
} ,
2025-12-06 01:07:10 +00:00
"permission" : {
2026-01-01 22:54:43 +00:00
"$ref" : "#/components/schemas/PermissionConfig"
2025-12-06 01:07:10 +00:00
}
} ,
"additionalProperties" : { }
} ,
"ProviderConfig" : {
"type" : "object" ,
"properties" : {
"api" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
"env" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"id" : {
"type" : "string"
} ,
"npm" : {
"type" : "string"
} ,
"models" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
2025-12-10 19:31:11 +00:00
"family" : {
"type" : "string"
} ,
2025-12-06 01:07:10 +00:00
"release_date" : {
"type" : "string"
} ,
"attachment" : {
"type" : "boolean"
} ,
"reasoning" : {
"type" : "boolean"
} ,
"temperature" : {
"type" : "boolean"
} ,
"tool_call" : {
"type" : "boolean"
} ,
2025-12-10 00:27:29 +00:00
"interleaved" : {
"anyOf" : [
{
"type" : "boolean" ,
"const" : true
} ,
{
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "reasoning_content" , "reasoning_details" ]
2025-12-10 00:27:29 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "field" ] ,
2025-12-10 00:27:29 +00:00
"additionalProperties" : false
}
]
} ,
2025-12-06 01:07:10 +00:00
"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"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "input" , "output" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "input" , "output" ]
2025-12-06 01:07:10 +00:00
} ,
"limit" : {
"type" : "object" ,
"properties" : {
"context" : {
"type" : "number"
} ,
2026-01-15 07:35:52 +00:00
"input" : {
"type" : "number"
} ,
2025-12-06 01:07:10 +00:00
"output" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "context" , "output" ]
2025-12-06 01:07:10 +00:00
} ,
"modalities" : {
"type" : "object" ,
"properties" : {
"input" : {
"type" : "array" ,
"items" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "text" , "audio" , "image" , "video" , "pdf" ]
2025-12-06 01:07:10 +00:00
}
} ,
"output" : {
"type" : "array" ,
"items" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "text" , "audio" , "image" , "video" , "pdf" ]
2025-12-06 01:07:10 +00:00
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "input" , "output" ]
2025-12-06 01:07:10 +00:00
} ,
"experimental" : {
"type" : "boolean"
} ,
"status" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "alpha" , "beta" , "deprecated" ]
2025-12-06 01:07:10 +00:00
} ,
"options" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"headers" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "string"
}
} ,
"provider" : {
"type" : "object" ,
"properties" : {
"npm" : {
"type" : "string"
2026-02-12 04:11:57 +00:00
} ,
"api" : {
"type" : "string"
2025-12-06 01:07:10 +00:00
}
2026-02-12 14:28:17 +00:00
}
2025-12-30 22:38:06 +00:00
} ,
"variants" : {
"description" : "Variant-specific configuration" ,
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "object" ,
"properties" : {
"disabled" : {
"description" : "Disable this variant for the model" ,
"type" : "boolean"
}
} ,
"additionalProperties" : { }
}
2025-12-06 01:07:10 +00:00
}
}
}
} ,
"whitelist" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"blacklist" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"options" : {
"type" : "object" ,
"properties" : {
"apiKey" : {
"type" : "string"
} ,
"baseURL" : {
"type" : "string"
} ,
"enterpriseUrl" : {
"description" : "GitHub Enterprise URL for copilot authentication" ,
"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." ,
"anyOf" : [
{
"description" : "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout." ,
"type" : "integer" ,
"exclusiveMinimum" : 0 ,
"maximum" : 9007199254740991
} ,
{
"description" : "Disable timeout for this provider entirely." ,
"type" : "boolean" ,
"const" : false
}
]
2026-03-10 15:14:46 +00:00
} ,
"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
2025-12-06 01:07:10 +00:00
}
} ,
"additionalProperties" : { }
}
} ,
"additionalProperties" : false
} ,
"McpLocalConfig" : {
"type" : "object" ,
"properties" : {
"type" : {
"description" : "Type of MCP server connection" ,
"type" : "string" ,
"const" : "local"
} ,
"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" ,
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "string"
}
} ,
"enabled" : {
"description" : "Enable or disable the MCP server on startup" ,
"type" : "boolean"
} ,
"timeout" : {
2026-01-15 16:32:09 +00:00
"description" : "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified." ,
2025-12-06 01:07:10 +00:00
"type" : "integer" ,
"exclusiveMinimum" : 0 ,
"maximum" : 9007199254740991
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "command" ] ,
2025-12-06 01:07:10 +00:00
"additionalProperties" : false
} ,
2025-12-07 20:47:51 +00:00
"McpOAuthConfig" : {
"type" : "object" ,
"properties" : {
"clientId" : {
"description" : "OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted." ,
"type" : "string"
} ,
"clientSecret" : {
"description" : "OAuth client secret (if required by the authorization server)" ,
"type" : "string"
} ,
"scope" : {
"description" : "OAuth scopes to request during authorization" ,
"type" : "string"
}
} ,
"additionalProperties" : false
} ,
2025-12-06 01:07:10 +00:00
"McpRemoteConfig" : {
"type" : "object" ,
"properties" : {
"type" : {
"description" : "Type of MCP server connection" ,
"type" : "string" ,
"const" : "remote"
} ,
"url" : {
"description" : "URL of the remote MCP server" ,
"type" : "string"
} ,
"enabled" : {
"description" : "Enable or disable the MCP server on startup" ,
"type" : "boolean"
} ,
"headers" : {
"description" : "Headers to send with the request" ,
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "string"
}
} ,
2025-12-07 20:47:51 +00:00
"oauth" : {
"description" : "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection." ,
"anyOf" : [
{
"$ref" : "#/components/schemas/McpOAuthConfig"
} ,
{
"type" : "boolean" ,
"const" : false
}
]
} ,
2025-12-06 01:07:10 +00:00
"timeout" : {
2026-01-15 16:32:09 +00:00
"description" : "Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified." ,
2025-12-06 01:07:10 +00:00
"type" : "integer" ,
"exclusiveMinimum" : 0 ,
"maximum" : 9007199254740991
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "url" ] ,
2025-12-06 01:07:10 +00:00
"additionalProperties" : false
} ,
"LayoutConfig" : {
"description" : "@deprecated Always uses stretch layout." ,
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "auto" , "stretch" ]
2025-12-06 01:07:10 +00:00
} ,
"Config" : {
"type" : "object" ,
"properties" : {
"$schema" : {
"description" : "JSON schema reference for configuration validation" ,
"type" : "string"
} ,
2025-12-26 17:09:31 +00:00
"logLevel" : {
"$ref" : "#/components/schemas/LogLevel"
} ,
2025-12-26 20:48:30 +00:00
"server" : {
"$ref" : "#/components/schemas/ServerConfig"
} ,
2025-12-06 01:07:10 +00:00
"command" : {
"description" : "Command configuration, see https://opencode.ai/docs/commands" ,
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "object" ,
"properties" : {
"template" : {
"type" : "string"
} ,
"description" : {
"type" : "string"
} ,
"agent" : {
"type" : "string"
} ,
"model" : {
2026-02-05 06:31:08 +00:00
"type" : "string"
2025-12-06 01:07:10 +00:00
} ,
"subtask" : {
"type" : "boolean"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "template" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-01-29 18:14:15 +00:00
"skills" : {
"description" : "Additional skill folder paths" ,
"type" : "object" ,
"properties" : {
"paths" : {
"description" : "Additional paths to skill folders" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
2026-02-06 05:37:00 +00:00
} ,
"urls" : {
"description" : "URLs to fetch skills from (e.g., https://example.com/.well-known/skills/)" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
2026-01-29 18:14:15 +00:00
}
}
} ,
2025-12-06 01:07:10 +00:00
"watcher" : {
"type" : "object" ,
"properties" : {
"ignore" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
}
} ,
"plugin" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"snapshot" : {
"type" : "boolean"
} ,
"share" : {
"description" : "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing" ,
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "manual" , "auto" , "disabled" ]
2025-12-06 01:07:10 +00:00
} ,
"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"
} ,
{
"type" : "string" ,
"const" : "notify"
}
]
} ,
"disabled_providers" : {
"description" : "Disable providers that are loaded automatically" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"enabled_providers" : {
"description" : "When set, ONLY these providers will be enabled. All other providers will be ignored" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"model" : {
2026-02-05 06:31:08 +00:00
"description" : "Model to use in the format of provider/model, eg anthropic/claude-2" ,
"type" : "string"
2025-12-06 01:07:10 +00:00
} ,
"small_model" : {
2026-02-05 06:31:08 +00:00
"description" : "Small model to use for tasks like title generation in the format of provider/model" ,
"type" : "string"
2025-12-06 01:07:10 +00:00
} ,
2025-12-20 17:46:48 +00:00
"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." ,
"type" : "string"
} ,
2025-12-06 01:07:10 +00:00
"username" : {
"description" : "Custom username to display in conversations instead of system username" ,
"type" : "string"
} ,
"mode" : {
"description" : "@deprecated Use `agent` field instead." ,
"type" : "object" ,
"properties" : {
"build" : {
"$ref" : "#/components/schemas/AgentConfig"
} ,
"plan" : {
"$ref" : "#/components/schemas/AgentConfig"
}
} ,
"additionalProperties" : {
"$ref" : "#/components/schemas/AgentConfig"
}
} ,
"agent" : {
2026-01-16 17:37:05 +00:00
"description" : "Agent configuration, see https://opencode.ai/docs/agents" ,
2025-12-06 01:07:10 +00:00
"type" : "object" ,
"properties" : {
"plan" : {
"$ref" : "#/components/schemas/AgentConfig"
} ,
"build" : {
"$ref" : "#/components/schemas/AgentConfig"
} ,
"general" : {
"$ref" : "#/components/schemas/AgentConfig"
} ,
"explore" : {
"$ref" : "#/components/schemas/AgentConfig"
2025-12-15 14:59:05 +00:00
} ,
"title" : {
"$ref" : "#/components/schemas/AgentConfig"
} ,
"summary" : {
"$ref" : "#/components/schemas/AgentConfig"
} ,
"compaction" : {
"$ref" : "#/components/schemas/AgentConfig"
2025-12-06 01:07:10 +00:00
}
} ,
"additionalProperties" : {
"$ref" : "#/components/schemas/AgentConfig"
}
} ,
"provider" : {
"description" : "Custom provider configurations and model overrides" ,
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"$ref" : "#/components/schemas/ProviderConfig"
}
} ,
"mcp" : {
"description" : "MCP (Model Context Protocol) server configurations" ,
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"anyOf" : [
{
2026-01-03 07:16:11 +00:00
"anyOf" : [
{
"$ref" : "#/components/schemas/McpLocalConfig"
} ,
{
"$ref" : "#/components/schemas/McpRemoteConfig"
}
]
2025-12-06 01:07:10 +00:00
} ,
{
2026-01-03 07:16:11 +00:00
"type" : "object" ,
"properties" : {
"enabled" : {
"type" : "boolean"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "enabled" ] ,
2026-01-03 07:16:11 +00:00
"additionalProperties" : false
2025-12-06 01:07:10 +00:00
}
]
}
} ,
"formatter" : {
"anyOf" : [
{
"type" : "boolean" ,
"const" : false
} ,
{
"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"
}
}
}
}
}
]
} ,
"lsp" : {
"anyOf" : [
{
"type" : "boolean" ,
"const" : false
} ,
{
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"anyOf" : [
{
"type" : "object" ,
"properties" : {
"disabled" : {
"type" : "boolean" ,
"const" : true
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "disabled" ]
2025-12-06 01:07:10 +00:00
} ,
{
"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" : { }
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "command" ]
2025-12-06 01:07:10 +00:00
}
]
}
}
]
} ,
"instructions" : {
"description" : "Additional instruction files or patterns to include" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"layout" : {
"$ref" : "#/components/schemas/LayoutConfig"
} ,
"permission" : {
2026-01-01 22:54:43 +00:00
"$ref" : "#/components/schemas/PermissionConfig"
2025-12-06 01:07:10 +00:00
} ,
"tools" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "boolean"
}
} ,
"enterprise" : {
"type" : "object" ,
"properties" : {
"url" : {
"description" : "Enterprise URL" ,
"type" : "string"
}
}
} ,
2025-12-27 00:32:34 +00:00
"compaction" : {
"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"
2026-02-11 01:56:08 +00:00
} ,
"reserved" : {
"description" : "Token buffer for compaction. Leaves enough window to avoid overflow during compaction." ,
"type" : "integer" ,
"minimum" : 0 ,
"maximum" : 9007199254740991
2025-12-27 00:32:34 +00:00
}
}
} ,
2025-12-06 01:07:10 +00:00
"experimental" : {
"type" : "object" ,
"properties" : {
2026-01-16 21:21:54 +00:00
"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"
}
} ,
"continue_loop_on_deny" : {
"description" : "Continue the agent loop when a tool call is denied" ,
"type" : "boolean"
} ,
"mcp_timeout" : {
"description" : "Timeout in milliseconds for model context protocol (MCP) requests" ,
"type" : "integer" ,
"exclusiveMinimum" : 0 ,
"maximum" : 9007199254740991
2025-12-31 06:51:59 +00:00
}
}
2025-12-06 01:07:10 +00:00
}
} ,
2026-01-16 21:21:54 +00:00
"additionalProperties" : false
2025-12-06 01:07:10 +00:00
} ,
2026-01-27 14:53:48 +00:00
"BadRequestError" : {
"type" : "object" ,
"properties" : {
"data" : { } ,
"errors" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
}
} ,
"success" : {
"type" : "boolean" ,
"const" : false
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "data" , "errors" , "success" ]
2026-01-28 13:28:52 +00:00
} ,
"OAuth" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "oauth"
} ,
"refresh" : {
"type" : "string"
} ,
"access" : {
"type" : "string"
} ,
"expires" : {
"type" : "number"
} ,
"accountId" : {
"type" : "string"
} ,
"enterpriseUrl" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "refresh" , "access" , "expires" ]
2026-01-28 13:28:52 +00:00
} ,
"ApiAuth" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "api"
} ,
"key" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "key" ]
2026-01-28 13:28:52 +00:00
} ,
"WellKnownAuth" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
"const" : "wellknown"
} ,
"key" : {
"type" : "string"
} ,
"token" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "key" , "token" ]
2026-01-28 13:28:52 +00:00
} ,
"Auth" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/OAuth"
} ,
{
"$ref" : "#/components/schemas/ApiAuth"
} ,
{
"$ref" : "#/components/schemas/WellKnownAuth"
}
2026-01-27 14:53:48 +00:00
]
} ,
"NotFoundError" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string" ,
"const" : "NotFoundError"
} ,
"data" : {
"type" : "object" ,
"properties" : {
"message" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "message" ]
2026-01-27 14:53:48 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "data" ]
2026-01-27 14:53:48 +00:00
} ,
2025-12-06 01:07:10 +00:00
"Model" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string"
} ,
"providerID" : {
"type" : "string"
} ,
"api" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string"
} ,
"url" : {
"type" : "string"
} ,
"npm" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "url" , "npm" ]
2025-12-06 01:07:10 +00:00
} ,
"name" : {
"type" : "string"
} ,
2025-12-10 19:31:11 +00:00
"family" : {
"type" : "string"
} ,
2025-12-06 01:07:10 +00:00
"capabilities" : {
"type" : "object" ,
"properties" : {
"temperature" : {
"type" : "boolean"
} ,
"reasoning" : {
"type" : "boolean"
} ,
"attachment" : {
"type" : "boolean"
} ,
"toolcall" : {
"type" : "boolean"
} ,
"input" : {
"type" : "object" ,
"properties" : {
"text" : {
"type" : "boolean"
} ,
"audio" : {
"type" : "boolean"
} ,
"image" : {
"type" : "boolean"
} ,
"video" : {
"type" : "boolean"
} ,
"pdf" : {
"type" : "boolean"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "text" , "audio" , "image" , "video" , "pdf" ]
2025-12-06 01:07:10 +00:00
} ,
"output" : {
"type" : "object" ,
"properties" : {
"text" : {
"type" : "boolean"
} ,
"audio" : {
"type" : "boolean"
} ,
"image" : {
"type" : "boolean"
} ,
"video" : {
"type" : "boolean"
} ,
"pdf" : {
"type" : "boolean"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "text" , "audio" , "image" , "video" , "pdf" ]
2025-12-10 00:27:29 +00:00
} ,
"interleaved" : {
"anyOf" : [
{
"type" : "boolean"
} ,
{
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "reasoning_content" , "reasoning_details" ]
2025-12-10 00:27:29 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "field" ]
2025-12-10 00:27:29 +00:00
}
]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "temperature" , "reasoning" , "attachment" , "toolcall" , "input" , "output" , "interleaved" ]
2025-12-06 01:07:10 +00:00
} ,
"cost" : {
"type" : "object" ,
"properties" : {
"input" : {
"type" : "number"
} ,
"output" : {
"type" : "number"
} ,
"cache" : {
"type" : "object" ,
"properties" : {
"read" : {
"type" : "number"
} ,
"write" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "read" , "write" ]
2025-12-06 01:07:10 +00:00
} ,
"experimentalOver200K" : {
"type" : "object" ,
"properties" : {
"input" : {
"type" : "number"
} ,
"output" : {
"type" : "number"
} ,
"cache" : {
"type" : "object" ,
"properties" : {
"read" : {
"type" : "number"
} ,
"write" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "read" , "write" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "input" , "output" , "cache" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "input" , "output" , "cache" ]
2025-12-06 01:07:10 +00:00
} ,
"limit" : {
"type" : "object" ,
"properties" : {
"context" : {
"type" : "number"
} ,
2026-01-15 07:35:52 +00:00
"input" : {
"type" : "number"
} ,
2025-12-06 01:07:10 +00:00
"output" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "context" , "output" ]
2025-12-06 01:07:10 +00:00
} ,
"status" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "alpha" , "beta" , "deprecated" , "active" ]
2025-12-06 01:07:10 +00:00
} ,
"options" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"headers" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"type" : "string"
}
2025-12-15 03:42:56 +00:00
} ,
"release_date" : {
"type" : "string"
2025-12-30 03:44:29 +00:00
} ,
"variants" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
2025-12-30 22:38:06 +00:00
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
2025-12-30 03:44:29 +00:00
}
2025-12-06 01:07:10 +00:00
}
} ,
2025-12-15 03:42:56 +00:00
"required" : [
"id" ,
"providerID" ,
"api" ,
"name" ,
"capabilities" ,
"cost" ,
"limit" ,
"status" ,
"options" ,
"headers" ,
"release_date"
]
2025-12-06 01:07:10 +00:00
} ,
2026-01-16 21:21:54 +00:00
"Provider" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
"source" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "env" , "config" , "custom" , "api" ]
2026-01-16 21:21:54 +00:00
} ,
"env" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"key" : {
"type" : "string"
} ,
"options" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"models" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : {
"$ref" : "#/components/schemas/Model"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "name" , "source" , "env" , "options" , "models" ]
2026-01-16 21:21:54 +00:00
} ,
"ToolIDs" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"ToolListItem" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string"
} ,
"description" : {
"type" : "string"
} ,
"parameters" : { }
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "description" , "parameters" ]
2026-01-16 21:21:54 +00:00
} ,
"ToolList" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/ToolListItem"
}
} ,
2026-03-04 02:36:18 +00:00
"Workspace" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string" ,
"pattern" : "^wrk.*"
} ,
"type" : {
"type" : "string"
} ,
"branch" : {
"anyOf" : [
{
"type" : "string"
} ,
{
"type" : "null"
}
]
} ,
"name" : {
"anyOf" : [
{
"type" : "string"
} ,
{
"type" : "null"
}
]
} ,
"directory" : {
"anyOf" : [
{
"type" : "string"
} ,
{
"type" : "null"
}
]
} ,
"extra" : {
"anyOf" : [
{ } ,
{
"type" : "null"
}
]
} ,
"projectID" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "type" , "branch" , "name" , "directory" , "extra" , "projectID" ]
2026-03-04 02:36:18 +00:00
} ,
2026-01-16 21:21:54 +00:00
"Worktree" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"branch" : {
"type" : "string"
} ,
"directory" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "branch" , "directory" ]
2026-01-16 21:21:54 +00:00
} ,
"WorktreeCreateInput" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"startCommand" : {
2026-01-22 13:41:20 +00:00
"description" : "Additional startup script to run after the project's start command" ,
2026-01-16 21:21:54 +00:00
"type" : "string"
}
}
} ,
2026-01-19 13:37:19 +00:00
"WorktreeRemoveInput" : {
"type" : "object" ,
"properties" : {
"directory" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "directory" ]
2026-01-19 13:37:19 +00:00
} ,
"WorktreeResetInput" : {
"type" : "object" ,
"properties" : {
"directory" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "directory" ]
2026-01-19 13:37:19 +00:00
} ,
2026-02-20 13:46:03 +00:00
"ProjectSummary" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
"worktree" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "worktree" ]
2026-02-20 13:46:03 +00:00
} ,
"GlobalSession" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string" ,
"pattern" : "^ses.*"
} ,
"slug" : {
"type" : "string"
} ,
"projectID" : {
"type" : "string"
} ,
2026-03-01 03:10:46 +00:00
"workspaceID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^wrk.*"
2026-03-01 03:10:46 +00:00
} ,
2026-02-20 13:46:03 +00:00
"directory" : {
"type" : "string"
} ,
"parentID" : {
"type" : "string" ,
"pattern" : "^ses.*"
} ,
"summary" : {
"type" : "object" ,
"properties" : {
"additions" : {
"type" : "number"
} ,
"deletions" : {
"type" : "number"
} ,
"files" : {
"type" : "number"
} ,
"diffs" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/FileDiff"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "additions" , "deletions" , "files" ]
2026-02-20 13:46:03 +00:00
} ,
"share" : {
"type" : "object" ,
"properties" : {
"url" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "url" ]
2026-02-20 13:46:03 +00:00
} ,
"title" : {
"type" : "string"
} ,
"version" : {
"type" : "string"
} ,
"time" : {
"type" : "object" ,
"properties" : {
"created" : {
"type" : "number"
} ,
"updated" : {
"type" : "number"
} ,
"compacting" : {
"type" : "number"
} ,
"archived" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "created" , "updated" ]
2026-02-20 13:46:03 +00:00
} ,
"permission" : {
"$ref" : "#/components/schemas/PermissionRuleset"
} ,
"revert" : {
"type" : "object" ,
"properties" : {
"messageID" : {
2026-03-11 23:31:07 +00:00
"type" : "string" ,
"pattern" : "^msg.*"
2026-02-20 13:46:03 +00:00
} ,
"partID" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2026-02-20 13:46:03 +00:00
} ,
"snapshot" : {
"type" : "string"
} ,
"diff" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "messageID" ]
2026-02-20 13:46:03 +00:00
} ,
"project" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/ProjectSummary"
} ,
{
"type" : "null"
}
]
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "slug" , "projectID" , "directory" , "title" , "version" , "time" , "project" ]
2026-02-20 13:46:03 +00:00
} ,
2026-01-16 21:21:54 +00:00
"McpResource" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"uri" : {
"type" : "string"
} ,
"description" : {
"type" : "string"
} ,
"mimeType" : {
"type" : "string"
} ,
"client" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "uri" , "client" ]
2026-01-16 21:21:54 +00:00
} ,
"TextPartInput" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2026-01-16 21:21:54 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "text"
} ,
"text" : {
"type" : "string"
} ,
"synthetic" : {
"type" : "boolean"
} ,
"ignored" : {
"type" : "boolean"
} ,
"time" : {
"type" : "object" ,
"properties" : {
"start" : {
"type" : "number"
} ,
"end" : {
"type" : "number"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "start" ]
2026-01-16 21:21:54 +00:00
} ,
"metadata" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "text" ]
2026-01-16 21:21:54 +00:00
} ,
"FilePartInput" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2026-01-16 21:21:54 +00:00
} ,
"type" : {
"type" : "string" ,
"const" : "file"
} ,
"mime" : {
"type" : "string"
} ,
"filename" : {
"type" : "string"
} ,
"url" : {
"type" : "string"
} ,
"source" : {
"$ref" : "#/components/schemas/FilePartSource"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "mime" , "url" ]
2026-01-16 21:21:54 +00:00
} ,
"AgentPartInput" : {
2025-12-06 01:07:10 +00:00
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2025-12-06 01:07:10 +00:00
} ,
2026-01-16 21:21:54 +00:00
"type" : {
"type" : "string" ,
"const" : "agent"
} ,
2025-12-06 01:07:10 +00:00
"name" : {
"type" : "string"
} ,
"source" : {
2026-01-16 21:21:54 +00:00
"type" : "object" ,
"properties" : {
"value" : {
"type" : "string"
} ,
"start" : {
"type" : "integer" ,
"minimum" : -9007199254740991 ,
"maximum" : 9007199254740991
} ,
"end" : {
"type" : "integer" ,
"minimum" : -9007199254740991 ,
"maximum" : 9007199254740991
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "value" , "start" , "end" ]
2026-01-16 21:21:54 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "name" ]
2026-01-16 21:21:54 +00:00
} ,
"SubtaskPartInput" : {
"type" : "object" ,
"properties" : {
"id" : {
2026-03-11 23:41:43 +00:00
"type" : "string" ,
"pattern" : "^prt.*"
2026-01-16 21:21:54 +00:00
} ,
"type" : {
2025-12-06 01:07:10 +00:00
"type" : "string" ,
2026-01-16 21:21:54 +00:00
"const" : "subtask"
2025-12-06 01:07:10 +00:00
} ,
2026-01-16 21:21:54 +00:00
"prompt" : {
"type" : "string"
2025-12-06 01:07:10 +00:00
} ,
2026-01-16 21:21:54 +00:00
"description" : {
2025-12-06 01:07:10 +00:00
"type" : "string"
} ,
2026-01-16 21:21:54 +00:00
"agent" : {
"type" : "string"
2025-12-06 01:07:10 +00:00
} ,
2026-01-16 21:21:54 +00:00
"model" : {
2025-12-06 01:07:10 +00:00
"type" : "object" ,
2026-01-16 21:21:54 +00:00
"properties" : {
"providerID" : {
"type" : "string"
} ,
"modelID" : {
"type" : "string"
}
2025-12-06 01:07:10 +00:00
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "providerID" , "modelID" ]
2026-01-16 21:21:54 +00:00
} ,
"command" : {
"type" : "string"
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "prompt" , "description" , "agent" ]
2025-12-06 01:07:10 +00:00
} ,
"ProviderAuthMethod" : {
"type" : "object" ,
"properties" : {
"type" : {
"anyOf" : [
{
"type" : "string" ,
"const" : "oauth"
} ,
{
"type" : "string" ,
"const" : "api"
}
]
} ,
"label" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "label" ]
2025-12-06 01:07:10 +00:00
} ,
"ProviderAuthAuthorization" : {
"type" : "object" ,
"properties" : {
"url" : {
"type" : "string"
} ,
"method" : {
"anyOf" : [
{
"type" : "string" ,
"const" : "auto"
} ,
{
"type" : "string" ,
"const" : "code"
}
]
} ,
"instructions" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "url" , "method" , "instructions" ]
2025-12-06 01:07:10 +00:00
} ,
"Symbol" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"kind" : {
"type" : "number"
} ,
"location" : {
"type" : "object" ,
"properties" : {
"uri" : {
"type" : "string"
} ,
"range" : {
"$ref" : "#/components/schemas/Range"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "uri" , "range" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "kind" , "location" ]
2025-12-06 01:07:10 +00:00
} ,
"FileNode" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"path" : {
"type" : "string"
} ,
"absolute" : {
"type" : "string"
} ,
"type" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "file" , "directory" ]
2025-12-06 01:07:10 +00:00
} ,
"ignored" : {
"type" : "boolean"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "path" , "absolute" , "type" , "ignored" ]
2025-12-06 01:07:10 +00:00
} ,
"FileContent" : {
"type" : "object" ,
"properties" : {
"type" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "text" , "binary" ]
2025-12-06 01:07:10 +00:00
} ,
"content" : {
"type" : "string"
} ,
"diff" : {
"type" : "string"
} ,
"patch" : {
"type" : "object" ,
"properties" : {
"oldFileName" : {
"type" : "string"
} ,
"newFileName" : {
"type" : "string"
} ,
"oldHeader" : {
"type" : "string"
} ,
"newHeader" : {
"type" : "string"
} ,
"hunks" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"oldStart" : {
"type" : "number"
} ,
"oldLines" : {
"type" : "number"
} ,
"newStart" : {
"type" : "number"
} ,
"newLines" : {
"type" : "number"
} ,
"lines" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "oldStart" , "oldLines" , "newStart" , "newLines" , "lines" ]
2025-12-06 01:07:10 +00:00
}
} ,
"index" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "oldFileName" , "newFileName" , "hunks" ]
2025-12-06 01:07:10 +00:00
} ,
"encoding" : {
"type" : "string" ,
"const" : "base64"
} ,
"mimeType" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "type" , "content" ]
2025-12-06 01:07:10 +00:00
} ,
"File" : {
"type" : "object" ,
"properties" : {
"path" : {
"type" : "string"
} ,
"added" : {
"type" : "integer" ,
"minimum" : -9007199254740991 ,
"maximum" : 9007199254740991
} ,
"removed" : {
"type" : "integer" ,
"minimum" : -9007199254740991 ,
"maximum" : 9007199254740991
} ,
"status" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "added" , "deleted" , "modified" ]
2025-12-06 01:07:10 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "path" , "added" , "removed" , "status" ]
2025-12-06 01:07:10 +00:00
} ,
"MCPStatusConnected" : {
"type" : "object" ,
"properties" : {
"status" : {
"type" : "string" ,
"const" : "connected"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "status" ]
2025-12-06 01:07:10 +00:00
} ,
"MCPStatusDisabled" : {
"type" : "object" ,
"properties" : {
"status" : {
"type" : "string" ,
"const" : "disabled"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "status" ]
2025-12-06 01:07:10 +00:00
} ,
"MCPStatusFailed" : {
"type" : "object" ,
"properties" : {
"status" : {
"type" : "string" ,
"const" : "failed"
} ,
"error" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "status" , "error" ]
2025-12-06 01:07:10 +00:00
} ,
2025-12-07 20:47:51 +00:00
"MCPStatusNeedsAuth" : {
"type" : "object" ,
"properties" : {
"status" : {
"type" : "string" ,
"const" : "needs_auth"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "status" ]
2025-12-07 20:47:51 +00:00
} ,
"MCPStatusNeedsClientRegistration" : {
"type" : "object" ,
"properties" : {
"status" : {
"type" : "string" ,
"const" : "needs_client_registration"
} ,
"error" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "status" , "error" ]
2025-12-07 20:47:51 +00:00
} ,
2025-12-06 01:07:10 +00:00
"MCPStatus" : {
"anyOf" : [
{
"$ref" : "#/components/schemas/MCPStatusConnected"
} ,
{
"$ref" : "#/components/schemas/MCPStatusDisabled"
} ,
{
"$ref" : "#/components/schemas/MCPStatusFailed"
2025-12-07 20:47:51 +00:00
} ,
{
"$ref" : "#/components/schemas/MCPStatusNeedsAuth"
} ,
{
"$ref" : "#/components/schemas/MCPStatusNeedsClientRegistration"
2025-12-06 01:07:10 +00:00
}
]
} ,
2026-01-16 21:21:54 +00:00
"Path" : {
"type" : "object" ,
"properties" : {
"home" : {
"type" : "string"
} ,
"state" : {
"type" : "string"
} ,
"config" : {
"type" : "string"
} ,
"worktree" : {
"type" : "string"
} ,
"directory" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "home" , "state" , "config" , "worktree" , "directory" ]
2026-01-16 21:21:54 +00:00
} ,
"VcsInfo" : {
"type" : "object" ,
"properties" : {
"branch" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "branch" ]
2026-01-16 21:21:54 +00:00
} ,
"Command" : {
2026-01-04 15:13:52 +00:00
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
2026-01-16 21:21:54 +00:00
"description" : {
"type" : "string"
} ,
"agent" : {
"type" : "string"
} ,
"model" : {
"type" : "string"
} ,
2026-01-31 05:42:31 +00:00
"source" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "command" , "mcp" , "skill" ]
2026-01-16 21:21:54 +00:00
} ,
"template" : {
"anyOf" : [
{
"type" : "string"
} ,
{
"type" : "string"
}
]
} ,
"subtask" : {
"type" : "boolean"
} ,
"hints" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "template" , "hints" ]
2026-01-16 21:21:54 +00:00
} ,
"Agent" : {
"type" : "object" ,
"properties" : {
"name" : {
2026-01-04 15:13:52 +00:00
"type" : "string"
} ,
"description" : {
"type" : "string"
} ,
2026-01-16 21:21:54 +00:00
"mode" : {
"type" : "string" ,
2026-03-13 10:19:52 +00:00
"enum" : [ "subagent" , "primary" , "all" ]
2026-01-16 21:21:54 +00:00
} ,
"native" : {
"type" : "boolean"
} ,
"hidden" : {
"type" : "boolean"
} ,
"topP" : {
"type" : "number"
} ,
"temperature" : {
"type" : "number"
} ,
"color" : {
2026-01-04 15:13:52 +00:00
"type" : "string"
} ,
2026-01-16 21:21:54 +00:00
"permission" : {
"$ref" : "#/components/schemas/PermissionRuleset"
} ,
"model" : {
"type" : "object" ,
"properties" : {
"modelID" : {
"type" : "string"
} ,
"providerID" : {
"type" : "string"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "modelID" , "providerID" ]
2026-01-16 21:21:54 +00:00
} ,
2026-02-01 20:13:33 +00:00
"variant" : {
"type" : "string"
} ,
2026-01-16 21:21:54 +00:00
"prompt" : {
2026-01-04 15:13:52 +00:00
"type" : "string"
2026-01-16 21:21:54 +00:00
} ,
"options" : {
"type" : "object" ,
"propertyNames" : {
"type" : "string"
} ,
"additionalProperties" : { }
} ,
"steps" : {
"type" : "integer" ,
"exclusiveMinimum" : 0 ,
"maximum" : 9007199254740991
2026-01-04 15:13:52 +00:00
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "mode" , "permission" , "options" ]
2026-01-04 15:13:52 +00:00
} ,
2025-12-06 01:07:10 +00:00
"LSPStatus" : {
"type" : "object" ,
"properties" : {
"id" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
"root" : {
"type" : "string"
} ,
"status" : {
"anyOf" : [
{
"type" : "string" ,
"const" : "connected"
} ,
{
"type" : "string" ,
"const" : "error"
}
]
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "id" , "name" , "root" , "status" ]
2025-12-06 01:07:10 +00:00
} ,
"FormatterStatus" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"extensions" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"enabled" : {
"type" : "boolean"
}
} ,
2026-03-13 10:19:52 +00:00
"required" : [ "name" , "extensions" , "enabled" ]
2025-12-06 01:07:10 +00:00
}
}
}
2026-03-13 10:19:52 +00:00
}