summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGitHub Action <[email protected]>2025-12-08 00:58:40 +0000
committerGitHub Action <[email protected]>2025-12-08 00:58:40 +0000
commitda7edb5f5cace88634157de215f6a48c02bfb9d4 (patch)
treebcf7bafb10e2a9d129bdc52432cc829d00267ff5
parentbf0f85e37f8ccdf1a749a279f67161b63f5d3bc8 (diff)
downloadopencode-da7edb5f5cace88634157de215f6a48c02bfb9d4.tar.gz
opencode-da7edb5f5cace88634157de215f6a48c02bfb9d4.zip
chore: regen sdk
-rw-r--r--packages/sdk/js/openapi.json807
-rw-r--r--packages/sdk/js/src/v2/gen/sdk.gen.ts262
-rw-r--r--packages/sdk/js/src/v2/gen/types.gen.ts2
-rw-r--r--packages/sdk/openapi.json15
4 files changed, 891 insertions, 195 deletions
diff --git a/packages/sdk/js/openapi.json b/packages/sdk/js/openapi.json
index f6c708ba5..3df67fa7c 100644
--- a/packages/sdk/js/openapi.json
+++ b/packages/sdk/js/openapi.json
@@ -9,7 +9,8 @@
"/global/event": {
"get": {
"operationId": "global.event",
- "description": "Get events",
+ "summary": "Get global events",
+ "description": "Subscribe to global events from the OpenCode system using server-sent events.",
"responses": {
"200": {
"description": "Event stream",
@@ -21,7 +22,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
+ }
+ ]
}
},
"/project": {
@@ -36,8 +43,8 @@
}
}
],
- "description": "List all projects",
"summary": "List all projects",
+ "description": "Get a list of projects that have been opened with OpenCode.",
"responses": {
"200": {
"description": "List of projects",
@@ -52,7 +59,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
+ }
+ ]
}
},
"/project/current": {
@@ -67,10 +80,11 @@
}
}
],
- "description": "Get the current project",
+ "summary": "Get current project",
+ "description": "Retrieve the currently active project that OpenCode is working with.",
"responses": {
"200": {
- "description": "Current project",
+ "description": "Current project information",
"content": {
"application/json": {
"schema": {
@@ -79,7 +93,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
+ }
+ ]
}
},
"/pty": {
@@ -94,7 +114,8 @@
}
}
],
- "description": "List all PTY sessions",
+ "summary": "List PTY sessions",
+ "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
"responses": {
"200": {
"description": "List of sessions",
@@ -109,7 +130,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
+ }
+ ]
},
"post": {
"operationId": "pty.create",
@@ -122,7 +149,8 @@
}
}
],
- "description": "Create a new PTY session",
+ "summary": "Create PTY session",
+ "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
"responses": {
"200": {
"description": "Created session",
@@ -179,7 +207,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
+ }
+ ]
}
},
"/pty/{ptyID}": {
@@ -202,7 +236,8 @@
"required": true
}
],
- "description": "Get PTY session info",
+ "summary": "Get PTY session",
+ "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
"responses": {
"200": {
"description": "Session info",
@@ -224,7 +259,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
+ }
+ ]
},
"put": {
"operationId": "pty.update",
@@ -245,7 +286,8 @@
"required": true
}
],
- "description": "Update PTY session",
+ "summary": "Update PTY session",
+ "description": "Update properties of an existing pseudo-terminal (PTY) session.",
"responses": {
"200": {
"description": "Updated session",
@@ -296,7 +338,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
+ }
+ ]
},
"delete": {
"operationId": "pty.remove",
@@ -317,7 +365,8 @@
"required": true
}
],
- "description": "Remove a PTY session",
+ "summary": "Remove PTY session",
+ "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
"responses": {
"200": {
"description": "Session removed",
@@ -339,7 +388,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
+ }
+ ]
}
},
"/pty/{ptyID}/connect": {
@@ -362,7 +417,8 @@
"required": true
}
],
- "description": "Connect to a PTY session",
+ "summary": "Connect to PTY session",
+ "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
"responses": {
"200": {
"description": "Connected session",
@@ -384,7 +440,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
+ }
+ ]
}
},
"/config": {
@@ -399,7 +461,8 @@
}
}
],
- "description": "Get config info",
+ "summary": "Get configuration",
+ "description": "Retrieve the current OpenCode configuration settings and preferences.",
"responses": {
"200": {
"description": "Get config info",
@@ -411,7 +474,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
+ }
+ ]
},
"patch": {
"operationId": "config.update",
@@ -424,7 +493,8 @@
}
}
],
- "description": "Update config",
+ "summary": "Update configuration",
+ "description": "Update OpenCode configuration settings and preferences.",
"responses": {
"200": {
"description": "Successfully updated config",
@@ -455,7 +525,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
+ }
+ ]
}
},
"/experimental/tool/ids": {
@@ -470,7 +546,8 @@
}
}
],
- "description": "List all tool IDs (including built-in and dynamically registered)",
+ "summary": "List tool IDs",
+ "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
"responses": {
"200": {
"description": "Tool IDs",
@@ -492,7 +569,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
+ }
+ ]
}
},
"/experimental/tool": {
@@ -523,7 +606,8 @@
"required": true
}
],
- "description": "List tools with JSON schema parameters for a provider/model",
+ "summary": "List tools",
+ "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
"responses": {
"200": {
"description": "Tools",
@@ -545,7 +629,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
+ }
+ ]
}
},
"/instance/dispose": {
@@ -560,7 +650,8 @@
}
}
],
- "description": "Dispose the current instance",
+ "summary": "Dispose instance",
+ "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
"responses": {
"200": {
"description": "Instance disposed",
@@ -572,7 +663,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
+ }
+ ]
}
},
"/path": {
@@ -587,7 +684,8 @@
}
}
],
- "description": "Get the current path",
+ "summary": "Get paths",
+ "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
"responses": {
"200": {
"description": "Path",
@@ -599,7 +697,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
+ }
+ ]
}
},
"/vcs": {
@@ -614,7 +718,8 @@
}
}
],
- "description": "Get VCS info for the current instance",
+ "summary": "Get VCS info",
+ "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
"responses": {
"200": {
"description": "VCS info",
@@ -626,7 +731,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
+ }
+ ]
}
},
"/session": {
@@ -641,7 +752,8 @@
}
}
],
- "description": "List all sessions",
+ "summary": "List sessions",
+ "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
"responses": {
"200": {
"description": "List of sessions",
@@ -656,7 +768,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
+ }
+ ]
},
"post": {
"operationId": "session.create",
@@ -669,7 +787,8 @@
}
}
],
- "description": "Create a new session",
+ "summary": "Create session",
+ "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
"responses": {
"200": {
"description": "Successfully created session",
@@ -709,7 +828,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
+ }
+ ]
}
},
"/session/status": {
@@ -724,7 +849,8 @@
}
}
],
- "description": "Get session status",
+ "summary": "Get session status",
+ "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
"responses": {
"200": {
"description": "Get session status",
@@ -752,7 +878,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}": {
@@ -776,7 +908,8 @@
"required": true
}
],
- "description": "Get session",
+ "summary": "Get session",
+ "description": "Retrieve detailed information about a specific OpenCode session.",
"responses": {
"200": {
"description": "Get session",
@@ -808,7 +941,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
+ }
+ ]
},
"delete": {
"operationId": "session.delete",
@@ -830,7 +969,8 @@
"required": true
}
],
- "description": "Delete a session and all its data",
+ "summary": "Delete session",
+ "description": "Delete a session and permanently remove all associated data, including messages and history.",
"responses": {
"200": {
"description": "Successfully deleted session",
@@ -862,7 +1002,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
+ }
+ ]
},
"patch": {
"operationId": "session.update",
@@ -883,7 +1029,8 @@
"required": true
}
],
- "description": "Update session properties",
+ "summary": "Update session",
+ "description": "Update properties of an existing session, such as title or other metadata.",
"responses": {
"200": {
"description": "Successfully updated session",
@@ -929,7 +1076,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/children": {
@@ -953,7 +1106,8 @@
"required": true
}
],
- "description": "Get a session's children",
+ "summary": "Get session children",
+ "description": "Retrieve all child sessions that were forked from the specified parent session.",
"responses": {
"200": {
"description": "List of children",
@@ -988,7 +1142,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/todo": {
@@ -1012,7 +1172,8 @@
"description": "Session ID"
}
],
- "description": "Get the todo list for a session",
+ "summary": "Get session todos",
+ "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
"responses": {
"200": {
"description": "Todo list",
@@ -1047,7 +1208,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/init": {
@@ -1071,7 +1238,8 @@
"description": "Session ID"
}
],
- "description": "Analyze the app and create an AGENTS.md file",
+ "summary": "Initialize session",
+ "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
"responses": {
"200": {
"description": "200",
@@ -1129,7 +1297,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/fork": {
@@ -1153,7 +1327,8 @@
"required": true
}
],
- "description": "Fork an existing session at a specific message",
+ "summary": "Fork session",
+ "description": "Create a new session by forking an existing session at a specific message point.",
"responses": {
"200": {
"description": "200",
@@ -1180,7 +1355,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/abort": {
@@ -1203,7 +1384,8 @@
"required": true
}
],
- "description": "Abort a session",
+ "summary": "Abort session",
+ "description": "Abort an active session and stop any ongoing AI processing or command execution.",
"responses": {
"200": {
"description": "Aborted session",
@@ -1235,7 +1417,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/share": {
@@ -1258,7 +1446,8 @@
"required": true
}
],
- "description": "Share a session",
+ "summary": "Share session",
+ "description": "Create a shareable link for a session, allowing others to view the conversation.",
"responses": {
"200": {
"description": "Successfully shared session",
@@ -1290,7 +1479,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
+ }
+ ]
},
"delete": {
"operationId": "session.unshare",
@@ -1312,7 +1507,8 @@
"required": true
}
],
- "description": "Unshare the session",
+ "summary": "Unshare session",
+ "description": "Remove the shareable link for a session, making it private again.",
"responses": {
"200": {
"description": "Successfully unshared session",
@@ -1344,7 +1540,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/diff": {
@@ -1376,7 +1578,8 @@
}
}
],
- "description": "Get the diff for this session",
+ "summary": "Get session diff",
+ "description": "Get all file changes (diffs) made during this session.",
"responses": {
"200": {
"description": "List of diffs",
@@ -1411,7 +1614,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/summarize": {
@@ -1435,7 +1644,8 @@
"description": "Session ID"
}
],
- "description": "Summarize the session",
+ "summary": "Summarize session",
+ "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
"responses": {
"200": {
"description": "Summarized session",
@@ -1488,7 +1698,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/message": {
@@ -1519,7 +1735,8 @@
}
}
],
- "description": "List messages for a session",
+ "summary": "Get session messages",
+ "description": "Retrieve all messages in a session, including user prompts and AI responses.",
"responses": {
"200": {
"description": "List of messages",
@@ -1569,7 +1786,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
+ }
+ ]
},
"post": {
"operationId": "session.prompt",
@@ -1591,7 +1814,8 @@
"description": "Session ID"
}
],
- "description": "Create and send a new message to a session",
+ "summary": "Send message",
+ "description": "Create and send a new message to a session, streaming the AI response.",
"responses": {
"200": {
"description": "Created message",
@@ -1708,7 +1932,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/message/{messageID}": {
@@ -1741,7 +1971,8 @@
"description": "Message ID"
}
],
- "description": "Get a message from a session",
+ "summary": "Get message",
+ "description": "Retrieve a specific message from a session by its message ID.",
"responses": {
"200": {
"description": "Message",
@@ -1788,7 +2019,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/prompt_async": {
@@ -1812,7 +2049,8 @@
"description": "Session ID"
}
],
- "description": "Create and send a new message to a session, start if needed and return immediately",
+ "summary": "Send async message",
+ "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
"responses": {
"204": {
"description": "Prompt accepted"
@@ -1907,7 +2145,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/command": {
@@ -1931,7 +2175,8 @@
"description": "Session ID"
}
],
- "description": "Send a new command to a session",
+ "summary": "Send command",
+ "description": "Send a new command to a session for execution by the AI assistant.",
"responses": {
"200": {
"description": "Created message",
@@ -2009,7 +2254,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/shell": {
@@ -2033,7 +2284,8 @@
"description": "Session ID"
}
],
- "description": "Run a shell command",
+ "summary": "Run shell command",
+ "description": "Execute a shell command within the session context and return the AI's response.",
"responses": {
"200": {
"description": "Created message",
@@ -2101,7 +2353,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/revert": {
@@ -2124,7 +2382,8 @@
"required": true
}
],
- "description": "Revert a message",
+ "summary": "Revert message",
+ "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
"responses": {
"200": {
"description": "Updated session",
@@ -2178,7 +2437,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/unrevert": {
@@ -2201,7 +2466,8 @@
"required": true
}
],
- "description": "Restore all reverted messages",
+ "summary": "Restore reverted messages",
+ "description": "Restore all previously reverted messages in a session.",
"responses": {
"200": {
"description": "Updated session",
@@ -2233,7 +2499,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
+ }
+ ]
}
},
"/session/{sessionID}/permissions/{permissionID}": {
@@ -2264,7 +2536,8 @@
"required": true
}
],
- "description": "Respond to a permission request",
+ "summary": "Respond to permission",
+ "description": "Approve or deny a permission request from the AI assistant.",
"responses": {
"200": {
"description": "Permission processed successfully",
@@ -2318,7 +2591,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
+ }
+ ]
}
},
"/command": {
@@ -2333,7 +2612,8 @@
}
}
],
- "description": "List all commands",
+ "summary": "List commands",
+ "description": "Get a list of all available commands in the OpenCode system.",
"responses": {
"200": {
"description": "List of commands",
@@ -2348,7 +2628,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
+ }
+ ]
}
},
"/config/providers": {
@@ -2363,7 +2649,8 @@
}
}
],
- "description": "List all providers",
+ "summary": "List config providers",
+ "description": "Get a list of all configured AI providers and their default models.",
"responses": {
"200": {
"description": "List of providers",
@@ -2396,7 +2683,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
+ }
+ ]
}
},
"/provider": {
@@ -2411,7 +2704,8 @@
}
}
],
- "description": "List all providers",
+ "summary": "List providers",
+ "description": "Get a list of all available AI providers, including both available and connected ones.",
"responses": {
"200": {
"description": "List of providers",
@@ -2650,7 +2944,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
+ }
+ ]
}
},
"/provider/auth": {
@@ -2665,7 +2965,8 @@
}
}
],
- "description": "Get provider authentication methods",
+ "summary": "Get provider auth methods",
+ "description": "Retrieve available authentication methods for all AI providers.",
"responses": {
"200": {
"description": "Provider auth methods",
@@ -2686,7 +2987,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
+ }
+ ]
}
},
"/provider/{providerID}/oauth/authorize": {
@@ -2710,7 +3017,8 @@
"description": "Provider ID"
}
],
- "description": "Authorize a provider using OAuth",
+ "summary": "OAuth authorize",
+ "description": "Initiate OAuth authorization for a specific AI provider to get an authorization URL.",
"responses": {
"200": {
"description": "Authorization URL and method",
@@ -2750,7 +3058,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
+ }
+ ]
}
},
"/provider/{providerID}/oauth/callback": {
@@ -2774,7 +3088,8 @@
"description": "Provider ID"
}
],
- "description": "Handle OAuth callback for a provider",
+ "summary": "OAuth callback",
+ "description": "Handle the OAuth callback from a provider after user authorization.",
"responses": {
"200": {
"description": "OAuth callback processed successfully",
@@ -2818,7 +3133,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
+ }
+ ]
}
},
"/find": {
@@ -2841,7 +3162,8 @@
"required": true
}
],
- "description": "Find text in files",
+ "summary": "Find text",
+ "description": "Search for text patterns across files in the project using ripgrep.",
"responses": {
"200": {
"description": "Matches",
@@ -2923,7 +3245,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
+ }
+ ]
}
},
"/find/file": {
@@ -2957,7 +3285,8 @@
}
}
],
- "description": "Find files",
+ "summary": "Find files",
+ "description": "Search for files by name or pattern in the project directory.",
"responses": {
"200": {
"description": "File paths",
@@ -2972,7 +3301,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
+ }
+ ]
}
},
"/find/symbol": {
@@ -2995,7 +3330,8 @@
"required": true
}
],
- "description": "Find workspace symbols",
+ "summary": "Find symbols",
+ "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
"responses": {
"200": {
"description": "Symbols",
@@ -3010,7 +3346,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
+ }
+ ]
}
},
"/file": {
@@ -3033,7 +3375,8 @@
"required": true
}
],
- "description": "List files and directories",
+ "summary": "List files",
+ "description": "List files and directories in a specified path.",
"responses": {
"200": {
"description": "Files and directories",
@@ -3048,7 +3391,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
+ }
+ ]
}
},
"/file/content": {
@@ -3071,7 +3420,8 @@
"required": true
}
],
- "description": "Read a file",
+ "summary": "Read file",
+ "description": "Read the content of a specified file.",
"responses": {
"200": {
"description": "File content",
@@ -3083,7 +3433,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
+ }
+ ]
}
},
"/file/status": {
@@ -3098,7 +3454,8 @@
}
}
],
- "description": "Get file status",
+ "summary": "Get file status",
+ "description": "Get the git status of all files in the project.",
"responses": {
"200": {
"description": "File status",
@@ -3113,7 +3470,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
+ }
+ ]
}
},
"/log": {
@@ -3128,7 +3491,8 @@
}
}
],
- "description": "Write a log entry to the server logs",
+ "summary": "Write log",
+ "description": "Write a log entry to the server logs with specified level and metadata.",
"responses": {
"200": {
"description": "Log entry written successfully",
@@ -3192,7 +3556,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
+ }
+ ]
}
},
"/agent": {
@@ -3207,7 +3577,8 @@
}
}
],
- "description": "List all agents",
+ "summary": "List agents",
+ "description": "Get a list of all available AI agents in the OpenCode system.",
"responses": {
"200": {
"description": "List of agents",
@@ -3222,7 +3593,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
+ }
+ ]
}
},
"/mcp": {
@@ -3237,7 +3614,8 @@
}
}
],
- "description": "Get MCP server status",
+ "summary": "Get MCP status",
+ "description": "Get the status of all Model Context Protocol (MCP) servers.",
"responses": {
"200": {
"description": "MCP server status",
@@ -3255,7 +3633,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
+ }
+ ]
},
"post": {
"operationId": "mcp.add",
@@ -3268,7 +3652,8 @@
}
}
],
- "description": "Add MCP server dynamically",
+ "summary": "Add MCP server",
+ "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
"responses": {
"200": {
"description": "MCP server added successfully",
@@ -3324,7 +3709,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
+ }
+ ]
}
},
"/mcp/{name}/auth": {
@@ -3347,7 +3738,8 @@
"required": true
}
],
- "description": "Start OAuth authentication flow for an MCP server",
+ "summary": "Start MCP OAuth",
+ "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
"responses": {
"200": {
"description": "OAuth flow started",
@@ -3388,7 +3780,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
+ }
+ ]
},
"delete": {
"operationId": "mcp.auth.remove",
@@ -3409,6 +3807,7 @@
"required": true
}
],
+ "summary": "Remove MCP OAuth",
"description": "Remove OAuth credentials for an MCP server",
"responses": {
"200": {
@@ -3440,7 +3839,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
+ }
+ ]
}
},
"/mcp/{name}/auth/callback": {
@@ -3463,7 +3868,8 @@
"required": true
}
],
- "description": "Complete OAuth authentication with authorization code",
+ "summary": "Complete MCP OAuth",
+ "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
"responses": {
"200": {
"description": "OAuth authentication completed",
@@ -3513,7 +3919,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
+ }
+ ]
}
},
"/mcp/{name}/auth/authenticate": {
@@ -3536,6 +3948,7 @@
"required": true
}
],
+ "summary": "Authenticate MCP OAuth",
"description": "Start OAuth flow and wait for callback (opens browser)",
"responses": {
"200": {
@@ -3568,7 +3981,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
+ }
+ ]
}
},
"/lsp": {
@@ -3583,6 +4002,7 @@
}
}
],
+ "summary": "Get LSP status",
"description": "Get LSP server status",
"responses": {
"200": {
@@ -3598,7 +4018,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
+ }
+ ]
}
},
"/formatter": {
@@ -3613,6 +4039,7 @@
}
}
],
+ "summary": "Get formatter status",
"description": "Get formatter status",
"responses": {
"200": {
@@ -3628,7 +4055,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
+ }
+ ]
}
},
"/tui/append-prompt": {
@@ -3643,6 +4076,7 @@
}
}
],
+ "summary": "Append TUI prompt",
"description": "Append prompt to the TUI",
"responses": {
"200": {
@@ -3682,7 +4116,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
+ }
+ ]
}
},
"/tui/open-help": {
@@ -3697,7 +4137,8 @@
}
}
],
- "description": "Open the help dialog",
+ "summary": "Open help dialog",
+ "description": "Open the help dialog in the TUI to display user assistance information.",
"responses": {
"200": {
"description": "Help dialog opened successfully",
@@ -3709,7 +4150,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
+ }
+ ]
}
},
"/tui/open-sessions": {
@@ -3724,6 +4171,7 @@
}
}
],
+ "summary": "Open sessions dialog",
"description": "Open the session dialog",
"responses": {
"200": {
@@ -3736,7 +4184,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
+ }
+ ]
}
},
"/tui/open-themes": {
@@ -3751,6 +4205,7 @@
}
}
],
+ "summary": "Open themes dialog",
"description": "Open the theme dialog",
"responses": {
"200": {
@@ -3763,7 +4218,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
+ }
+ ]
}
},
"/tui/open-models": {
@@ -3778,6 +4239,7 @@
}
}
],
+ "summary": "Open models dialog",
"description": "Open the model dialog",
"responses": {
"200": {
@@ -3790,7 +4252,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
+ }
+ ]
}
},
"/tui/submit-prompt": {
@@ -3805,6 +4273,7 @@
}
}
],
+ "summary": "Submit TUI prompt",
"description": "Submit the prompt",
"responses": {
"200": {
@@ -3817,7 +4286,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
+ }
+ ]
}
},
"/tui/clear-prompt": {
@@ -3832,6 +4307,7 @@
}
}
],
+ "summary": "Clear TUI prompt",
"description": "Clear the prompt",
"responses": {
"200": {
@@ -3844,7 +4320,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
+ }
+ ]
}
},
"/tui/execute-command": {
@@ -3859,6 +4341,7 @@
}
}
],
+ "summary": "Execute TUI command",
"description": "Execute a TUI command (e.g. agent_cycle)",
"responses": {
"200": {
@@ -3898,7 +4381,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
+ }
+ ]
}
},
"/tui/show-toast": {
@@ -3913,6 +4402,7 @@
}
}
],
+ "summary": "Show TUI toast",
"description": "Show a toast notification in the TUI",
"responses": {
"200": {
@@ -3960,7 +4450,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
+ }
+ ]
}
},
"/tui/publish": {
@@ -3975,6 +4471,7 @@
}
}
],
+ "summary": "Publish TUI event",
"description": "Publish a TUI event",
"responses": {
"200": {
@@ -4016,7 +4513,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
+ }
+ ]
}
},
"/tui/control/next": {
@@ -4031,7 +4534,8 @@
}
}
],
- "description": "Get the next TUI request from the queue",
+ "summary": "Get next TUI request",
+ "description": "Retrieve the next TUI (Terminal User Interface) request from the queue for processing.",
"responses": {
"200": {
"description": "Next TUI request",
@@ -4053,7 +4557,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
+ }
+ ]
}
},
"/tui/control/response": {
@@ -4068,7 +4578,8 @@
}
}
],
- "description": "Submit a response to the TUI request queue",
+ "summary": "Submit TUI response",
+ "description": "Submit a response to the TUI request queue to complete a pending request.",
"responses": {
"200": {
"description": "Response submitted successfully",
@@ -4087,7 +4598,13 @@
"schema": {}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
+ }
+ ]
}
},
"/auth/{providerID}": {
@@ -4110,6 +4627,7 @@
"required": true
}
],
+ "summary": "Set auth credentials",
"description": "Set authentication credentials",
"responses": {
"200": {
@@ -4141,7 +4659,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
+ }
+ ]
}
},
"/event": {
@@ -4156,6 +4680,7 @@
}
}
],
+ "summary": "Subscribe to events",
"description": "Get events",
"responses": {
"200": {
@@ -4168,7 +4693,13 @@
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
+ }
+ ]
}
}
},
diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts
index 4cfd6261e..77e3ba1f5 100644
--- a/packages/sdk/js/src/v2/gen/sdk.gen.ts
+++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts
@@ -179,7 +179,9 @@ class HeyApiRegistry<T> {
export class Global extends HeyApiClient {
/**
- * Get events
+ * Get global events
+ *
+ * Subscribe to global events from the OpenCode system using server-sent events.
*/
public event<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) {
return (options?.client ?? this.client).sse.get<GlobalEventResponses, unknown, ThrowOnError>({
@@ -193,7 +195,7 @@ export class Project extends HeyApiClient {
/**
* List all projects
*
- * List all projects
+ * Get a list of projects that have been opened with OpenCode.
*/
public list<ThrowOnError extends boolean = false>(
parameters?: {
@@ -210,7 +212,9 @@ export class Project extends HeyApiClient {
}
/**
- * Get the current project
+ * Get current project
+ *
+ * Retrieve the currently active project that OpenCode is working with.
*/
public current<ThrowOnError extends boolean = false>(
parameters?: {
@@ -229,7 +233,9 @@ export class Project extends HeyApiClient {
export class Pty extends HeyApiClient {
/**
- * List all PTY sessions
+ * List PTY sessions
+ *
+ * Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.
*/
public list<ThrowOnError extends boolean = false>(
parameters?: {
@@ -246,7 +252,9 @@ export class Pty extends HeyApiClient {
}
/**
- * Create a new PTY session
+ * Create PTY session
+ *
+ * Create a new pseudo-terminal (PTY) session for running shell commands and processes.
*/
public create<ThrowOnError extends boolean = false>(
parameters?: {
@@ -289,7 +297,9 @@ export class Pty extends HeyApiClient {
}
/**
- * Remove a PTY session
+ * Remove PTY session
+ *
+ * Remove and terminate a specific pseudo-terminal (PTY) session.
*/
public remove<ThrowOnError extends boolean = false>(
parameters: {
@@ -317,7 +327,9 @@ export class Pty extends HeyApiClient {
}
/**
- * Get PTY session info
+ * Get PTY session
+ *
+ * Retrieve detailed information about a specific pseudo-terminal (PTY) session.
*/
public get<ThrowOnError extends boolean = false>(
parameters: {
@@ -346,6 +358,8 @@ export class Pty extends HeyApiClient {
/**
* Update PTY session
+ *
+ * Update properties of an existing pseudo-terminal (PTY) session.
*/
public update<ThrowOnError extends boolean = false>(
parameters: {
@@ -385,7 +399,9 @@ export class Pty extends HeyApiClient {
}
/**
- * Connect to a PTY session
+ * Connect to PTY session
+ *
+ * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.
*/
public connect<ThrowOnError extends boolean = false>(
parameters: {
@@ -415,7 +431,9 @@ export class Pty extends HeyApiClient {
export class Config extends HeyApiClient {
/**
- * Get config info
+ * Get configuration
+ *
+ * Retrieve the current OpenCode configuration settings and preferences.
*/
public get<ThrowOnError extends boolean = false>(
parameters?: {
@@ -432,7 +450,9 @@ export class Config extends HeyApiClient {
}
/**
- * Update config
+ * Update configuration
+ *
+ * Update OpenCode configuration settings and preferences.
*/
public update<ThrowOnError extends boolean = false>(
parameters?: {
@@ -465,7 +485,9 @@ export class Config extends HeyApiClient {
}
/**
- * List all providers
+ * List config providers
+ *
+ * Get a list of all configured AI providers and their default models.
*/
public providers<ThrowOnError extends boolean = false>(
parameters?: {
@@ -484,7 +506,9 @@ export class Config extends HeyApiClient {
export class Tool extends HeyApiClient {
/**
- * List all tool IDs (including built-in and dynamically registered)
+ * List tool IDs
+ *
+ * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
*/
public ids<ThrowOnError extends boolean = false>(
parameters?: {
@@ -501,7 +525,9 @@ export class Tool extends HeyApiClient {
}
/**
- * List tools with JSON schema parameters for a provider/model
+ * List tools
+ *
+ * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
*/
public list<ThrowOnError extends boolean = false>(
parameters: {
@@ -533,7 +559,9 @@ export class Tool extends HeyApiClient {
export class Instance extends HeyApiClient {
/**
- * Dispose the current instance
+ * Dispose instance
+ *
+ * Clean up and dispose the current OpenCode instance, releasing all resources.
*/
public dispose<ThrowOnError extends boolean = false>(
parameters?: {
@@ -552,7 +580,9 @@ export class Instance extends HeyApiClient {
export class Path extends HeyApiClient {
/**
- * Get the current path
+ * Get paths
+ *
+ * Retrieve the current working directory and related path information for the OpenCode instance.
*/
public get<ThrowOnError extends boolean = false>(
parameters?: {
@@ -571,7 +601,9 @@ export class Path extends HeyApiClient {
export class Vcs extends HeyApiClient {
/**
- * Get VCS info for the current instance
+ * Get VCS info
+ *
+ * Retrieve version control system (VCS) information for the current project, such as git branch.
*/
public get<ThrowOnError extends boolean = false>(
parameters?: {
@@ -590,7 +622,9 @@ export class Vcs extends HeyApiClient {
export class Session extends HeyApiClient {
/**
- * List all sessions
+ * List sessions
+ *
+ * Get a list of all OpenCode sessions, sorted by most recently updated.
*/
public list<ThrowOnError extends boolean = false>(
parameters?: {
@@ -607,7 +641,9 @@ export class Session extends HeyApiClient {
}
/**
- * Create a new session
+ * Create session
+ *
+ * Create a new OpenCode session for interacting with AI assistants and managing conversations.
*/
public create<ThrowOnError extends boolean = false>(
parameters?: {
@@ -643,6 +679,8 @@ export class Session extends HeyApiClient {
/**
* Get session status
+ *
+ * Retrieve the current status of all sessions, including active, idle, and completed states.
*/
public status<ThrowOnError extends boolean = false>(
parameters?: {
@@ -659,7 +697,9 @@ export class Session extends HeyApiClient {
}
/**
- * Delete a session and all its data
+ * Delete session
+ *
+ * Delete a session and permanently remove all associated data, including messages and history.
*/
public delete<ThrowOnError extends boolean = false>(
parameters: {
@@ -688,6 +728,8 @@ export class Session extends HeyApiClient {
/**
* Get session
+ *
+ * Retrieve detailed information about a specific OpenCode session.
*/
public get<ThrowOnError extends boolean = false>(
parameters: {
@@ -715,7 +757,9 @@ export class Session extends HeyApiClient {
}
/**
- * Update session properties
+ * Update session
+ *
+ * Update properties of an existing session, such as title or other metadata.
*/
public update<ThrowOnError extends boolean = false>(
parameters: {
@@ -750,7 +794,9 @@ export class Session extends HeyApiClient {
}
/**
- * Get a session's children
+ * Get session children
+ *
+ * Retrieve all child sessions that were forked from the specified parent session.
*/
public children<ThrowOnError extends boolean = false>(
parameters: {
@@ -778,7 +824,9 @@ export class Session extends HeyApiClient {
}
/**
- * Get the todo list for a session
+ * Get session todos
+ *
+ * Retrieve the todo list associated with a specific session, showing tasks and action items.
*/
public todo<ThrowOnError extends boolean = false>(
parameters: {
@@ -806,7 +854,9 @@ export class Session extends HeyApiClient {
}
/**
- * Analyze the app and create an AGENTS.md file
+ * Initialize session
+ *
+ * Analyze the current application and create an AGENTS.md file with project-specific agent configurations.
*/
public init<ThrowOnError extends boolean = false>(
parameters: {
@@ -845,7 +895,9 @@ export class Session extends HeyApiClient {
}
/**
- * Fork an existing session at a specific message
+ * Fork session
+ *
+ * Create a new session by forking an existing session at a specific message point.
*/
public fork<ThrowOnError extends boolean = false>(
parameters: {
@@ -880,7 +932,9 @@ export class Session extends HeyApiClient {
}
/**
- * Abort a session
+ * Abort session
+ *
+ * Abort an active session and stop any ongoing AI processing or command execution.
*/
public abort<ThrowOnError extends boolean = false>(
parameters: {
@@ -908,7 +962,9 @@ export class Session extends HeyApiClient {
}
/**
- * Unshare the session
+ * Unshare session
+ *
+ * Remove the shareable link for a session, making it private again.
*/
public unshare<ThrowOnError extends boolean = false>(
parameters: {
@@ -936,7 +992,9 @@ export class Session extends HeyApiClient {
}
/**
- * Share a session
+ * Share session
+ *
+ * Create a shareable link for a session, allowing others to view the conversation.
*/
public share<ThrowOnError extends boolean = false>(
parameters: {
@@ -964,7 +1022,9 @@ export class Session extends HeyApiClient {
}
/**
- * Get the diff for this session
+ * Get session diff
+ *
+ * Get all file changes (diffs) made during this session.
*/
public diff<ThrowOnError extends boolean = false>(
parameters: {
@@ -994,7 +1054,9 @@ export class Session extends HeyApiClient {
}
/**
- * Summarize the session
+ * Summarize session
+ *
+ * Generate a concise summary of the session using AI compaction to preserve key information.
*/
public summarize<ThrowOnError extends boolean = false>(
parameters: {
@@ -1031,7 +1093,9 @@ export class Session extends HeyApiClient {
}
/**
- * List messages for a session
+ * Get session messages
+ *
+ * Retrieve all messages in a session, including user prompts and AI responses.
*/
public messages<ThrowOnError extends boolean = false>(
parameters: {
@@ -1061,7 +1125,9 @@ export class Session extends HeyApiClient {
}
/**
- * Create and send a new message to a session
+ * Send message
+ *
+ * Create and send a new message to a session, streaming the AI response.
*/
public prompt<ThrowOnError extends boolean = false>(
parameters: {
@@ -1113,7 +1179,9 @@ export class Session extends HeyApiClient {
}
/**
- * Get a message from a session
+ * Get message
+ *
+ * Retrieve a specific message from a session by its message ID.
*/
public message<ThrowOnError extends boolean = false>(
parameters: {
@@ -1143,7 +1211,9 @@ export class Session extends HeyApiClient {
}
/**
- * Create and send a new message to a session, start if needed and return immediately
+ * Send async message
+ *
+ * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.
*/
public promptAsync<ThrowOnError extends boolean = false>(
parameters: {
@@ -1195,7 +1265,9 @@ export class Session extends HeyApiClient {
}
/**
- * Send a new command to a session
+ * Send command
+ *
+ * Send a new command to a session for execution by the AI assistant.
*/
public command<ThrowOnError extends boolean = false>(
parameters: {
@@ -1238,7 +1310,9 @@ export class Session extends HeyApiClient {
}
/**
- * Run a shell command
+ * Run shell command
+ *
+ * Execute a shell command within the session context and return the AI's response.
*/
public shell<ThrowOnError extends boolean = false>(
parameters: {
@@ -1280,7 +1354,9 @@ export class Session extends HeyApiClient {
}
/**
- * Revert a message
+ * Revert message
+ *
+ * Revert a specific message in a session, undoing its effects and restoring the previous state.
*/
public revert<ThrowOnError extends boolean = false>(
parameters: {
@@ -1317,7 +1393,9 @@ export class Session extends HeyApiClient {
}
/**
- * Restore all reverted messages
+ * Restore reverted messages
+ *
+ * Restore all previously reverted messages in a session.
*/
public unrevert<ThrowOnError extends boolean = false>(
parameters: {
@@ -1347,7 +1425,9 @@ export class Session extends HeyApiClient {
export class Permission extends HeyApiClient {
/**
- * Respond to a permission request
+ * Respond to permission
+ *
+ * Approve or deny a permission request from the AI assistant.
*/
public respond<ThrowOnError extends boolean = false>(
parameters: {
@@ -1386,7 +1466,9 @@ export class Permission extends HeyApiClient {
export class Command extends HeyApiClient {
/**
- * List all commands
+ * List commands
+ *
+ * Get a list of all available commands in the OpenCode system.
*/
public list<ThrowOnError extends boolean = false>(
parameters?: {
@@ -1405,7 +1487,9 @@ export class Command extends HeyApiClient {
export class Oauth extends HeyApiClient {
/**
- * Authorize a provider using OAuth
+ * OAuth authorize
+ *
+ * Initiate OAuth authorization for a specific AI provider to get an authorization URL.
*/
public authorize<ThrowOnError extends boolean = false>(
parameters: {
@@ -1444,7 +1528,9 @@ export class Oauth extends HeyApiClient {
}
/**
- * Handle OAuth callback for a provider
+ * OAuth callback
+ *
+ * Handle the OAuth callback from a provider after user authorization.
*/
public callback<ThrowOnError extends boolean = false>(
parameters: {
@@ -1487,7 +1573,9 @@ export class Oauth extends HeyApiClient {
export class Provider extends HeyApiClient {
/**
- * List all providers
+ * List providers
+ *
+ * Get a list of all available AI providers, including both available and connected ones.
*/
public list<ThrowOnError extends boolean = false>(
parameters?: {
@@ -1504,7 +1592,9 @@ export class Provider extends HeyApiClient {
}
/**
- * Get provider authentication methods
+ * Get provider auth methods
+ *
+ * Retrieve available authentication methods for all AI providers.
*/
public auth<ThrowOnError extends boolean = false>(
parameters?: {
@@ -1525,7 +1615,9 @@ export class Provider extends HeyApiClient {
export class Find extends HeyApiClient {
/**
- * Find text in files
+ * Find text
+ *
+ * Search for text patterns across files in the project using ripgrep.
*/
public text<ThrowOnError extends boolean = false>(
parameters: {
@@ -1554,6 +1646,8 @@ export class Find extends HeyApiClient {
/**
* Find files
+ *
+ * Search for files by name or pattern in the project directory.
*/
public files<ThrowOnError extends boolean = false>(
parameters: {
@@ -1583,7 +1677,9 @@ export class Find extends HeyApiClient {
}
/**
- * Find workspace symbols
+ * Find symbols
+ *
+ * Search for workspace symbols like functions, classes, and variables using LSP.
*/
public symbols<ThrowOnError extends boolean = false>(
parameters: {
@@ -1613,7 +1709,9 @@ export class Find extends HeyApiClient {
export class File extends HeyApiClient {
/**
- * List files and directories
+ * List files
+ *
+ * List files and directories in a specified path.
*/
public list<ThrowOnError extends boolean = false>(
parameters: {
@@ -1641,7 +1739,9 @@ export class File extends HeyApiClient {
}
/**
- * Read a file
+ * Read file
+ *
+ * Read the content of a specified file.
*/
public read<ThrowOnError extends boolean = false>(
parameters: {
@@ -1670,6 +1770,8 @@ export class File extends HeyApiClient {
/**
* Get file status
+ *
+ * Get the git status of all files in the project.
*/
public status<ThrowOnError extends boolean = false>(
parameters?: {
@@ -1688,7 +1790,9 @@ export class File extends HeyApiClient {
export class App extends HeyApiClient {
/**
- * Write a log entry to the server logs
+ * Write log
+ *
+ * Write a log entry to the server logs with specified level and metadata.
*/
public log<ThrowOnError extends boolean = false>(
parameters?: {
@@ -1729,7 +1833,9 @@ export class App extends HeyApiClient {
}
/**
- * List all agents
+ * List agents
+ *
+ * Get a list of all available AI agents in the OpenCode system.
*/
public agents<ThrowOnError extends boolean = false>(
parameters?: {
@@ -1748,6 +1854,8 @@ export class App extends HeyApiClient {
export class Auth extends HeyApiClient {
/**
+ * Remove MCP OAuth
+ *
* Remove OAuth credentials for an MCP server
*/
public remove<ThrowOnError extends boolean = false>(
@@ -1776,7 +1884,9 @@ export class Auth extends HeyApiClient {
}
/**
- * Start OAuth authentication flow for an MCP server
+ * Start MCP OAuth
+ *
+ * Start OAuth authentication flow for a Model Context Protocol (MCP) server.
*/
public start<ThrowOnError extends boolean = false>(
parameters: {
@@ -1804,7 +1914,9 @@ export class Auth extends HeyApiClient {
}
/**
- * Complete OAuth authentication with authorization code
+ * Complete MCP OAuth
+ *
+ * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.
*/
public callback<ThrowOnError extends boolean = false>(
parameters: {
@@ -1839,6 +1951,8 @@ export class Auth extends HeyApiClient {
}
/**
+ * Authenticate MCP OAuth
+ *
* Start OAuth flow and wait for callback (opens browser)
*/
public authenticate<ThrowOnError extends boolean = false>(
@@ -1869,6 +1983,8 @@ export class Auth extends HeyApiClient {
}
/**
+ * Set auth credentials
+ *
* Set authentication credentials
*/
public set<ThrowOnError extends boolean = false>(
@@ -1906,7 +2022,9 @@ export class Auth extends HeyApiClient {
export class Mcp extends HeyApiClient {
/**
- * Get MCP server status
+ * Get MCP status
+ *
+ * Get the status of all Model Context Protocol (MCP) servers.
*/
public status<ThrowOnError extends boolean = false>(
parameters?: {
@@ -1923,7 +2041,9 @@ export class Mcp extends HeyApiClient {
}
/**
- * Add MCP server dynamically
+ * Add MCP server
+ *
+ * Dynamically add a new Model Context Protocol (MCP) server to the system.
*/
public add<ThrowOnError extends boolean = false>(
parameters?: {
@@ -1962,6 +2082,8 @@ export class Mcp extends HeyApiClient {
export class Lsp extends HeyApiClient {
/**
+ * Get LSP status
+ *
* Get LSP server status
*/
public status<ThrowOnError extends boolean = false>(
@@ -1982,6 +2104,8 @@ export class Lsp extends HeyApiClient {
export class Formatter extends HeyApiClient {
/**
* Get formatter status
+ *
+ * Get formatter status
*/
public status<ThrowOnError extends boolean = false>(
parameters?: {
@@ -2000,7 +2124,9 @@ export class Formatter extends HeyApiClient {
export class Control extends HeyApiClient {
/**
- * Get the next TUI request from the queue
+ * Get next TUI request
+ *
+ * Retrieve the next TUI (Terminal User Interface) request from the queue for processing.
*/
public next<ThrowOnError extends boolean = false>(
parameters?: {
@@ -2017,7 +2143,9 @@ export class Control extends HeyApiClient {
}
/**
- * Submit a response to the TUI request queue
+ * Submit TUI response
+ *
+ * Submit a response to the TUI request queue to complete a pending request.
*/
public response<ThrowOnError extends boolean = false>(
parameters?: {
@@ -2042,6 +2170,8 @@ export class Control extends HeyApiClient {
export class Tui extends HeyApiClient {
/**
+ * Append TUI prompt
+ *
* Append prompt to the TUI
*/
public appendPrompt<ThrowOnError extends boolean = false>(
@@ -2075,7 +2205,9 @@ export class Tui extends HeyApiClient {
}
/**
- * Open the help dialog
+ * Open help dialog
+ *
+ * Open the help dialog in the TUI to display user assistance information.
*/
public openHelp<ThrowOnError extends boolean = false>(
parameters?: {
@@ -2092,6 +2224,8 @@ export class Tui extends HeyApiClient {
}
/**
+ * Open sessions dialog
+ *
* Open the session dialog
*/
public openSessions<ThrowOnError extends boolean = false>(
@@ -2109,6 +2243,8 @@ export class Tui extends HeyApiClient {
}
/**
+ * Open themes dialog
+ *
* Open the theme dialog
*/
public openThemes<ThrowOnError extends boolean = false>(
@@ -2126,6 +2262,8 @@ export class Tui extends HeyApiClient {
}
/**
+ * Open models dialog
+ *
* Open the model dialog
*/
public openModels<ThrowOnError extends boolean = false>(
@@ -2143,6 +2281,8 @@ export class Tui extends HeyApiClient {
}
/**
+ * Submit TUI prompt
+ *
* Submit the prompt
*/
public submitPrompt<ThrowOnError extends boolean = false>(
@@ -2160,6 +2300,8 @@ export class Tui extends HeyApiClient {
}
/**
+ * Clear TUI prompt
+ *
* Clear the prompt
*/
public clearPrompt<ThrowOnError extends boolean = false>(
@@ -2177,6 +2319,8 @@ export class Tui extends HeyApiClient {
}
/**
+ * Execute TUI command
+ *
* Execute a TUI command (e.g. agent_cycle)
*/
public executeCommand<ThrowOnError extends boolean = false>(
@@ -2210,6 +2354,8 @@ export class Tui extends HeyApiClient {
}
/**
+ * Show TUI toast
+ *
* Show a toast notification in the TUI
*/
public showToast<ThrowOnError extends boolean = false>(
@@ -2249,6 +2395,8 @@ export class Tui extends HeyApiClient {
}
/**
+ * Publish TUI event
+ *
* Publish a TUI event
*/
public publish<ThrowOnError extends boolean = false>(
@@ -2276,6 +2424,8 @@ export class Tui extends HeyApiClient {
export class Event extends HeyApiClient {
/**
+ * Subscribe to events
+ *
* Get events
*/
public subscribe<ThrowOnError extends boolean = false>(
diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts
index 8bbfa40a3..ffd7ee373 100644
--- a/packages/sdk/js/src/v2/gen/types.gen.ts
+++ b/packages/sdk/js/src/v2/gen/types.gen.ts
@@ -1708,7 +1708,7 @@ export type ProjectCurrentData = {
export type ProjectCurrentResponses = {
/**
- * Current project
+ * Current project information
*/
200: Project
}
diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json
index 54f0c8795..3df67fa7c 100644
--- a/packages/sdk/openapi.json
+++ b/packages/sdk/openapi.json
@@ -3807,6 +3807,7 @@
"required": true
}
],
+ "summary": "Remove MCP OAuth",
"description": "Remove OAuth credentials for an MCP server",
"responses": {
"200": {
@@ -3947,6 +3948,7 @@
"required": true
}
],
+ "summary": "Authenticate MCP OAuth",
"description": "Start OAuth flow and wait for callback (opens browser)",
"responses": {
"200": {
@@ -4000,6 +4002,7 @@
}
}
],
+ "summary": "Get LSP status",
"description": "Get LSP server status",
"responses": {
"200": {
@@ -4036,6 +4039,7 @@
}
}
],
+ "summary": "Get formatter status",
"description": "Get formatter status",
"responses": {
"200": {
@@ -4072,6 +4076,7 @@
}
}
],
+ "summary": "Append TUI prompt",
"description": "Append prompt to the TUI",
"responses": {
"200": {
@@ -4166,6 +4171,7 @@
}
}
],
+ "summary": "Open sessions dialog",
"description": "Open the session dialog",
"responses": {
"200": {
@@ -4199,6 +4205,7 @@
}
}
],
+ "summary": "Open themes dialog",
"description": "Open the theme dialog",
"responses": {
"200": {
@@ -4232,6 +4239,7 @@
}
}
],
+ "summary": "Open models dialog",
"description": "Open the model dialog",
"responses": {
"200": {
@@ -4265,6 +4273,7 @@
}
}
],
+ "summary": "Submit TUI prompt",
"description": "Submit the prompt",
"responses": {
"200": {
@@ -4298,6 +4307,7 @@
}
}
],
+ "summary": "Clear TUI prompt",
"description": "Clear the prompt",
"responses": {
"200": {
@@ -4331,6 +4341,7 @@
}
}
],
+ "summary": "Execute TUI command",
"description": "Execute a TUI command (e.g. agent_cycle)",
"responses": {
"200": {
@@ -4391,6 +4402,7 @@
}
}
],
+ "summary": "Show TUI toast",
"description": "Show a toast notification in the TUI",
"responses": {
"200": {
@@ -4459,6 +4471,7 @@
}
}
],
+ "summary": "Publish TUI event",
"description": "Publish a TUI event",
"responses": {
"200": {
@@ -4614,6 +4627,7 @@
"required": true
}
],
+ "summary": "Set auth credentials",
"description": "Set authentication credentials",
"responses": {
"200": {
@@ -4666,6 +4680,7 @@
}
}
],
+ "summary": "Subscribe to events",
"description": "Get events",
"responses": {
"200": {