chore: generate

pull/15946/head
opencode-agent[bot] 2026-03-04 02:36:18 +00:00
parent 7f37acdaaa
commit 2a0be8316b
4 changed files with 349 additions and 397 deletions

View File

@ -2,9 +2,7 @@
"version": "7", "version": "7",
"dialect": "sqlite", "dialect": "sqlite",
"id": "4ec9de62-88a7-4bec-91cc-0a759e84db21", "id": "4ec9de62-88a7-4bec-91cc-0a759e84db21",
"prevIds": [ "prevIds": ["572fb732-56f4-4b1e-b981-77152c9980dd"],
"572fb732-56f4-4b1e-b981-77152c9980dd"
],
"ddl": [ "ddl": [
{ {
"name": "workspace", "name": "workspace",
@ -773,13 +771,9 @@
"table": "session_share" "table": "session_share"
}, },
{ {
"columns": [ "columns": ["project_id"],
"project_id"
],
"tableTo": "project", "tableTo": "project",
"columnsTo": [ "columnsTo": ["id"],
"id"
],
"onUpdate": "NO ACTION", "onUpdate": "NO ACTION",
"onDelete": "CASCADE", "onDelete": "CASCADE",
"nameExplicit": false, "nameExplicit": false,
@ -788,13 +782,9 @@
"table": "workspace" "table": "workspace"
}, },
{ {
"columns": [ "columns": ["session_id"],
"session_id"
],
"tableTo": "session", "tableTo": "session",
"columnsTo": [ "columnsTo": ["id"],
"id"
],
"onUpdate": "NO ACTION", "onUpdate": "NO ACTION",
"onDelete": "CASCADE", "onDelete": "CASCADE",
"nameExplicit": false, "nameExplicit": false,
@ -803,13 +793,9 @@
"table": "message" "table": "message"
}, },
{ {
"columns": [ "columns": ["message_id"],
"message_id"
],
"tableTo": "message", "tableTo": "message",
"columnsTo": [ "columnsTo": ["id"],
"id"
],
"onUpdate": "NO ACTION", "onUpdate": "NO ACTION",
"onDelete": "CASCADE", "onDelete": "CASCADE",
"nameExplicit": false, "nameExplicit": false,
@ -818,13 +804,9 @@
"table": "part" "table": "part"
}, },
{ {
"columns": [ "columns": ["project_id"],
"project_id"
],
"tableTo": "project", "tableTo": "project",
"columnsTo": [ "columnsTo": ["id"],
"id"
],
"onUpdate": "NO ACTION", "onUpdate": "NO ACTION",
"onDelete": "CASCADE", "onDelete": "CASCADE",
"nameExplicit": false, "nameExplicit": false,
@ -833,13 +815,9 @@
"table": "permission" "table": "permission"
}, },
{ {
"columns": [ "columns": ["project_id"],
"project_id"
],
"tableTo": "project", "tableTo": "project",
"columnsTo": [ "columnsTo": ["id"],
"id"
],
"onUpdate": "NO ACTION", "onUpdate": "NO ACTION",
"onDelete": "CASCADE", "onDelete": "CASCADE",
"nameExplicit": false, "nameExplicit": false,
@ -848,13 +826,9 @@
"table": "session" "table": "session"
}, },
{ {
"columns": [ "columns": ["session_id"],
"session_id"
],
"tableTo": "session", "tableTo": "session",
"columnsTo": [ "columnsTo": ["id"],
"id"
],
"onUpdate": "NO ACTION", "onUpdate": "NO ACTION",
"onDelete": "CASCADE", "onDelete": "CASCADE",
"nameExplicit": false, "nameExplicit": false,
@ -863,13 +837,9 @@
"table": "todo" "table": "todo"
}, },
{ {
"columns": [ "columns": ["session_id"],
"session_id"
],
"tableTo": "session", "tableTo": "session",
"columnsTo": [ "columnsTo": ["id"],
"id"
],
"onUpdate": "NO ACTION", "onUpdate": "NO ACTION",
"onDelete": "CASCADE", "onDelete": "CASCADE",
"nameExplicit": false, "nameExplicit": false,
@ -878,83 +848,63 @@
"table": "session_share" "table": "session_share"
}, },
{ {
"columns": [ "columns": ["email", "url"],
"email",
"url"
],
"nameExplicit": false, "nameExplicit": false,
"name": "control_account_pk", "name": "control_account_pk",
"entityType": "pks", "entityType": "pks",
"table": "control_account" "table": "control_account"
}, },
{ {
"columns": [ "columns": ["session_id", "position"],
"session_id",
"position"
],
"nameExplicit": false, "nameExplicit": false,
"name": "todo_pk", "name": "todo_pk",
"entityType": "pks", "entityType": "pks",
"table": "todo" "table": "todo"
}, },
{ {
"columns": [ "columns": ["id"],
"id"
],
"nameExplicit": false, "nameExplicit": false,
"name": "workspace_pk", "name": "workspace_pk",
"table": "workspace", "table": "workspace",
"entityType": "pks" "entityType": "pks"
}, },
{ {
"columns": [ "columns": ["id"],
"id"
],
"nameExplicit": false, "nameExplicit": false,
"name": "project_pk", "name": "project_pk",
"table": "project", "table": "project",
"entityType": "pks" "entityType": "pks"
}, },
{ {
"columns": [ "columns": ["id"],
"id"
],
"nameExplicit": false, "nameExplicit": false,
"name": "message_pk", "name": "message_pk",
"table": "message", "table": "message",
"entityType": "pks" "entityType": "pks"
}, },
{ {
"columns": [ "columns": ["id"],
"id"
],
"nameExplicit": false, "nameExplicit": false,
"name": "part_pk", "name": "part_pk",
"table": "part", "table": "part",
"entityType": "pks" "entityType": "pks"
}, },
{ {
"columns": [ "columns": ["project_id"],
"project_id"
],
"nameExplicit": false, "nameExplicit": false,
"name": "permission_pk", "name": "permission_pk",
"table": "permission", "table": "permission",
"entityType": "pks" "entityType": "pks"
}, },
{ {
"columns": [ "columns": ["id"],
"id"
],
"nameExplicit": false, "nameExplicit": false,
"name": "session_pk", "name": "session_pk",
"table": "session", "table": "session",
"entityType": "pks" "entityType": "pks"
}, },
{ {
"columns": [ "columns": ["session_id"],
"session_id"
],
"nameExplicit": false, "nameExplicit": false,
"name": "session_share_pk", "name": "session_share_pk",
"table": "session_share", "table": "session_share",
@ -1060,4 +1010,4 @@
} }
], ],
"renames": [] "renames": []
} }

View File

@ -902,12 +902,10 @@ export class Workspace extends HeyApiClient {
parameters?: { parameters?: {
directory?: string directory?: string
workspace?: string workspace?: string
body?: { id?: string
branch?: string | null type?: string
} & { branch?: string | null
type: "worktree" extra?: unknown | null
name: string
}
}, },
options?: Options<never, ThrowOnError>, options?: Options<never, ThrowOnError>,
) { ) {
@ -918,7 +916,10 @@ export class Workspace extends HeyApiClient {
args: [ args: [
{ in: "query", key: "directory" }, { in: "query", key: "directory" },
{ in: "query", key: "workspace" }, { in: "query", key: "workspace" },
{ key: "body", map: "body" }, { in: "body", key: "id" },
{ in: "body", key: "type" },
{ in: "body", key: "branch" },
{ in: "body", key: "extra" },
], ],
}, },
], ],

View File

@ -889,21 +889,6 @@ export type EventVcsBranchUpdated = {
} }
} }
export type EventWorktreeReady = {
type: "worktree.ready"
properties: {
name: string
branch: string
}
}
export type EventWorktreeFailed = {
type: "worktree.failed"
properties: {
message: string
}
}
export type EventWorkspaceReady = { export type EventWorkspaceReady = {
type: "workspace.ready" type: "workspace.ready"
properties: { properties: {
@ -957,6 +942,21 @@ export type EventPtyDeleted = {
} }
} }
export type EventWorktreeReady = {
type: "worktree.ready"
properties: {
name: string
branch: string
}
}
export type EventWorktreeFailed = {
type: "worktree.failed"
properties: {
message: string
}
}
export type Event = export type Event =
| EventInstallationUpdated | EventInstallationUpdated
| EventInstallationUpdateAvailable | EventInstallationUpdateAvailable
@ -995,14 +995,14 @@ export type Event =
| EventSessionDiff | EventSessionDiff
| EventSessionError | EventSessionError
| EventVcsBranchUpdated | EventVcsBranchUpdated
| EventWorktreeReady
| EventWorktreeFailed
| EventWorkspaceReady | EventWorkspaceReady
| EventWorkspaceFailed | EventWorkspaceFailed
| EventPtyCreated | EventPtyCreated
| EventPtyUpdated | EventPtyUpdated
| EventPtyExited | EventPtyExited
| EventPtyDeleted | EventPtyDeleted
| EventWorktreeReady
| EventWorktreeFailed
export type GlobalEvent = { export type GlobalEvent = {
directory: string directory: string
@ -1633,14 +1633,12 @@ export type ToolList = Array<ToolListItem>
export type Workspace = { export type Workspace = {
id: string id: string
type: string
branch: string | null branch: string | null
name: string | null
directory: string | null
extra: unknown | null
projectID: string projectID: string
config: {
type: "worktree"
directory: string
name: string
branch: string
}
} }
export type Worktree = { export type Worktree = {
@ -2468,10 +2466,10 @@ export type ExperimentalWorkspaceListResponse =
export type ExperimentalWorkspaceCreateData = { export type ExperimentalWorkspaceCreateData = {
body?: { body?: {
branch?: string | null id?: string
} & { type: string
type: "worktree" branch: string | null
name: string extra: unknown | null
} }
path?: never path?: never
query?: { query?: {

View File

@ -1108,6 +1108,196 @@
] ]
} }
}, },
"/experimental/workspace": {
"post": {
"operationId": "experimental.workspace.create",
"parameters": [
{
"in": "query",
"name": "directory",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "workspace",
"schema": {
"type": "string"
}
}
],
"summary": "Create workspace",
"description": "Create a workspace for the current project.",
"responses": {
"200": {
"description": "Workspace created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Workspace"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestError"
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^wrk.*"
},
"type": {
"type": "string"
},
"branch": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"extra": {
"anyOf": [
{},
{
"type": "null"
}
]
}
},
"required": ["type", "branch", "extra"]
}
}
}
},
"x-codeSamples": [
{
"lang": "js",
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
}
]
},
"get": {
"operationId": "experimental.workspace.list",
"parameters": [
{
"in": "query",
"name": "directory",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "workspace",
"schema": {
"type": "string"
}
}
],
"summary": "List workspaces",
"description": "List all workspaces.",
"responses": {
"200": {
"description": "Workspaces",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Workspace"
}
}
}
}
}
},
"x-codeSamples": [
{
"lang": "js",
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
}
]
}
},
"/experimental/workspace/{id}": {
"delete": {
"operationId": "experimental.workspace.remove",
"parameters": [
{
"in": "query",
"name": "directory",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "workspace",
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "id",
"schema": {
"type": "string",
"pattern": "^wrk.*"
},
"required": true
}
],
"summary": "Remove workspace",
"description": "Remove an existing workspace.",
"responses": {
"200": {
"description": "Workspace removed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Workspace"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestError"
}
}
}
}
},
"x-codeSamples": [
{
"lang": "js",
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
}
]
}
},
"/experimental/worktree": { "/experimental/worktree": {
"post": { "post": {
"operationId": "worktree.create", "operationId": "worktree.create",
@ -1268,207 +1458,6 @@
] ]
} }
}, },
"/experimental/workspace/{id}": {
"post": {
"operationId": "experimental.workspace.create",
"parameters": [
{
"in": "query",
"name": "directory",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "workspace",
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "id",
"schema": {
"type": "string",
"pattern": "^wrk.*"
},
"required": true
}
],
"summary": "Create workspace",
"description": "Create a workspace for the current project.",
"responses": {
"200": {
"description": "Workspace created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Workspace"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestError"
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"branch": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"config": {
"anyOf": [
{
"type": "object",
"properties": {
"directory": {
"type": "string"
},
"type": {
"type": "string",
"const": "worktree"
}
},
"required": ["directory", "type"]
}
]
}
},
"required": ["branch", "config"]
}
}
}
},
"x-codeSamples": [
{
"lang": "js",
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
}
]
},
"delete": {
"operationId": "experimental.workspace.remove",
"parameters": [
{
"in": "query",
"name": "directory",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "workspace",
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "id",
"schema": {
"type": "string",
"pattern": "^wrk.*"
},
"required": true
}
],
"summary": "Remove workspace",
"description": "Remove an existing workspace.",
"responses": {
"200": {
"description": "Workspace removed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Workspace"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestError"
}
}
}
}
},
"x-codeSamples": [
{
"lang": "js",
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
}
]
}
},
"/experimental/workspace": {
"get": {
"operationId": "experimental.workspace.list",
"parameters": [
{
"in": "query",
"name": "directory",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "workspace",
"schema": {
"type": "string"
}
}
],
"summary": "List workspaces",
"description": "List all workspaces.",
"responses": {
"200": {
"description": "Workspaces",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Workspace"
}
}
}
}
}
},
"x-codeSamples": [
{
"lang": "js",
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
}
]
}
},
"/experimental/worktree/reset": { "/experimental/worktree/reset": {
"post": { "post": {
"operationId": "worktree.reset", "operationId": "worktree.reset",
@ -9280,47 +9269,6 @@
}, },
"required": ["type", "properties"] "required": ["type", "properties"]
}, },
"Event.worktree.ready": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "worktree.ready"
},
"properties": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"branch": {
"type": "string"
}
},
"required": ["name", "branch"]
}
},
"required": ["type", "properties"]
},
"Event.worktree.failed": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "worktree.failed"
},
"properties": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": ["message"]
}
},
"required": ["type", "properties"]
},
"Event.workspace.ready": { "Event.workspace.ready": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -9472,6 +9420,47 @@
}, },
"required": ["type", "properties"] "required": ["type", "properties"]
}, },
"Event.worktree.ready": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "worktree.ready"
},
"properties": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"branch": {
"type": "string"
}
},
"required": ["name", "branch"]
}
},
"required": ["type", "properties"]
},
"Event.worktree.failed": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "worktree.failed"
},
"properties": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": ["message"]
}
},
"required": ["type", "properties"]
},
"Event": { "Event": {
"anyOf": [ "anyOf": [
{ {
@ -9585,12 +9574,6 @@
{ {
"$ref": "#/components/schemas/Event.vcs.branch.updated" "$ref": "#/components/schemas/Event.vcs.branch.updated"
}, },
{
"$ref": "#/components/schemas/Event.worktree.ready"
},
{
"$ref": "#/components/schemas/Event.worktree.failed"
},
{ {
"$ref": "#/components/schemas/Event.workspace.ready" "$ref": "#/components/schemas/Event.workspace.ready"
}, },
@ -9608,6 +9591,12 @@
}, },
{ {
"$ref": "#/components/schemas/Event.pty.deleted" "$ref": "#/components/schemas/Event.pty.deleted"
},
{
"$ref": "#/components/schemas/Event.worktree.ready"
},
{
"$ref": "#/components/schemas/Event.worktree.failed"
} }
] ]
}, },
@ -11001,6 +10990,60 @@
"$ref": "#/components/schemas/ToolListItem" "$ref": "#/components/schemas/ToolListItem"
} }
}, },
"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"
}
},
"required": ["id", "type", "branch", "name", "directory", "extra", "projectID"]
},
"Worktree": { "Worktree": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -11028,46 +11071,6 @@
} }
} }
}, },
"Workspace": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^wrk.*"
},
"branch": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"projectID": {
"type": "string"
},
"config": {
"anyOf": [
{
"type": "object",
"properties": {
"directory": {
"type": "string"
},
"type": {
"type": "string",
"const": "worktree"
}
},
"required": ["directory", "type"]
}
]
}
},
"required": ["id", "branch", "projectID", "config"]
},
"WorktreeRemoveInput": { "WorktreeRemoveInput": {
"type": "object", "type": "object",
"properties": { "properties": {