diff options
| author | opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> | 2026-02-20 13:46:03 +0000 |
|---|---|---|
| committer | opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> | 2026-02-20 13:46:03 +0000 |
| commit | 7867ba441ff416ebda51fe13b0b139fc6d81de25 (patch) | |
| tree | c49ffbffbae2e01055fb25021faa9d7ce01f7b0d /packages/sdk/openapi.json | |
| parent | 7419ebc872ae99f0d8bb8cca0579619f46712723 (diff) | |
| download | opencode-7867ba441ff416ebda51fe13b0b139fc6d81de25.tar.gz opencode-7867ba441ff416ebda51fe13b0b139fc6d81de25.zip | |
chore: generate
Diffstat (limited to 'packages/sdk/openapi.json')
| -rw-r--r-- | packages/sdk/openapi.json | 209 |
1 files changed, 209 insertions, 0 deletions
diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index 85a1af9d7..2741c2362 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -1202,6 +1202,92 @@ ] } }, + "/experimental/session": { + "get": { + "operationId": "experimental.session.list", + "parameters": [ + { + "in": "query", + "name": "directory", + "schema": { + "type": "string" + }, + "description": "Filter sessions by project directory" + }, + { + "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})" + } + ] + } + }, "/experimental/resource": { "get": { "operationId": "experimental.resource.list", @@ -10499,6 +10585,129 @@ }, "required": ["directory"] }, + "ProjectSummary": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "worktree": { + "type": "string" + } + }, + "required": ["id", "worktree"] + }, + "GlobalSession": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^ses.*" + }, + "slug": { + "type": "string" + }, + "projectID": { + "type": "string" + }, + "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" + } + } + }, + "required": ["additions", "deletions", "files"] + }, + "share": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": ["url"] + }, + "title": { + "type": "string" + }, + "version": { + "type": "string" + }, + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "updated": { + "type": "number" + }, + "compacting": { + "type": "number" + }, + "archived": { + "type": "number" + } + }, + "required": ["created", "updated"] + }, + "permission": { + "$ref": "#/components/schemas/PermissionRuleset" + }, + "revert": { + "type": "object", + "properties": { + "messageID": { + "type": "string" + }, + "partID": { + "type": "string" + }, + "snapshot": { + "type": "string" + }, + "diff": { + "type": "string" + } + }, + "required": ["messageID"] + }, + "project": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProjectSummary" + }, + { + "type": "null" + } + ] + } + }, + "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"] + }, "McpResource": { "type": "object", "properties": { |
