From 7605acff650db0d41d80429b662b5c0725d89675 Mon Sep 17 00:00:00 2001 From: James Long Date: Fri, 17 Apr 2026 02:06:20 -0400 Subject: refactor(core): move server routes around to clarify workspacing (#23031) --- packages/sdk/js/src/v2/gen/sdk.gen.ts | 602 ++++++++++++++++---------------- packages/sdk/js/src/v2/gen/types.gen.ts | 362 +++++++++---------- 2 files changed, 482 insertions(+), 482 deletions(-) (limited to 'packages/sdk/js') diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts index d7bf43f50..f484147a4 100644 --- a/packages/sdk/js/src/v2/gen/sdk.gen.ts +++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts @@ -510,11 +510,11 @@ export class App extends HeyApiClient { } } -export class Project extends HeyApiClient { +export class Adaptor extends HeyApiClient { /** - * List all projects + * List workspace adaptors * - * Get a list of projects that have been opened with OpenCode. + * List all available workspace adaptors for the current project. */ public list( parameters?: { @@ -534,19 +534,21 @@ export class Project extends HeyApiClient { }, ], ) - return (options?.client ?? this.client).get({ - url: "/project", + return (options?.client ?? this.client).get({ + url: "/experimental/workspace/adaptor", ...options, ...params, }) } +} +export class Workspace extends HeyApiClient { /** - * Get current project + * List workspaces * - * Retrieve the currently active project that OpenCode is working with. + * List all workspaces. */ - public current( + public list( parameters?: { directory?: string workspace?: string @@ -564,22 +566,26 @@ export class Project extends HeyApiClient { }, ], ) - return (options?.client ?? this.client).get({ - url: "/project/current", + return (options?.client ?? this.client).get({ + url: "/experimental/workspace", ...options, ...params, }) } /** - * Initialize git repository + * Create workspace * - * Create a git repository for the current project and return the refreshed project info. + * Create a workspace for the current project. */ - public initGit( + public create( parameters?: { directory?: string workspace?: string + id?: string + type?: string + branch?: string | null + extra?: unknown | null }, options?: Options, ) { @@ -590,39 +596,39 @@ export class Project extends HeyApiClient { args: [ { in: "query", key: "directory" }, { in: "query", key: "workspace" }, + { in: "body", key: "id" }, + { in: "body", key: "type" }, + { in: "body", key: "branch" }, + { in: "body", key: "extra" }, ], }, ], ) - return (options?.client ?? this.client).post({ - url: "/project/git/init", + return (options?.client ?? this.client).post< + ExperimentalWorkspaceCreateResponses, + ExperimentalWorkspaceCreateErrors, + ThrowOnError + >({ + url: "/experimental/workspace", ...options, ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, }) } /** - * Update project + * Workspace status * - * Update project properties such as name, icon, and commands. + * Get connection status for workspaces in the current project. */ - public update( - parameters: { - projectID: string + public status( + parameters?: { directory?: string workspace?: string - name?: string - icon?: { - url?: string - override?: string - color?: string - } - commands?: { - /** - * Startup script to run when creating a new workspace (worktree) - */ - start?: string - } }, options?: Options, ) { @@ -631,37 +637,27 @@ export class Project extends HeyApiClient { [ { args: [ - { in: "path", key: "projectID" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, - { in: "body", key: "name" }, - { in: "body", key: "icon" }, - { in: "body", key: "commands" }, ], }, ], ) - return (options?.client ?? this.client).patch({ - url: "/project/{projectID}", + return (options?.client ?? this.client).get({ + url: "/experimental/workspace/status", ...options, ...params, - headers: { - "Content-Type": "application/json", - ...options?.headers, - ...params.headers, - }, }) } -} -export class Pty extends HeyApiClient { /** - * List PTY sessions + * Remove workspace * - * Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode. + * Remove an existing workspace. */ - public list( - parameters?: { + public remove( + parameters: { + id: string directory?: string workspace?: string }, @@ -672,35 +668,35 @@ export class Pty extends HeyApiClient { [ { args: [ + { in: "path", key: "id" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, ], }, ], ) - return (options?.client ?? this.client).get({ - url: "/pty", + return (options?.client ?? this.client).delete< + ExperimentalWorkspaceRemoveResponses, + ExperimentalWorkspaceRemoveErrors, + ThrowOnError + >({ + url: "/experimental/workspace/{id}", ...options, ...params, }) } /** - * Create PTY session + * Restore session into workspace * - * Create a new pseudo-terminal (PTY) session for running shell commands and processes. + * Replay a session's sync events into the target workspace in batches. */ - public create( - parameters?: { + public sessionRestore( + parameters: { + id: string directory?: string workspace?: string - command?: string - args?: Array - cwd?: string - title?: string - env?: { - [key: string]: string - } + sessionID?: string }, options?: Options, ) { @@ -709,19 +705,20 @@ export class Pty extends HeyApiClient { [ { args: [ + { in: "path", key: "id" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, - { in: "body", key: "command" }, - { in: "body", key: "args" }, - { in: "body", key: "cwd" }, - { in: "body", key: "title" }, - { in: "body", key: "env" }, + { in: "body", key: "sessionID" }, ], }, ], ) - return (options?.client ?? this.client).post({ - url: "/pty", + return (options?.client ?? this.client).post< + ExperimentalWorkspaceSessionRestoreResponses, + ExperimentalWorkspaceSessionRestoreErrors, + ThrowOnError + >({ + url: "/experimental/workspace/{id}/session-restore", ...options, ...params, headers: { @@ -732,14 +729,20 @@ export class Pty extends HeyApiClient { }) } + private _adaptor?: Adaptor + get adaptor(): Adaptor { + return (this._adaptor ??= new Adaptor({ client: this.client })) + } +} + +export class Console extends HeyApiClient { /** - * Remove PTY session + * Get active Console provider metadata * - * Remove and terminate a specific pseudo-terminal (PTY) session. + * Get the active Console org name and the set of provider IDs managed by that Console org. */ - public remove( - parameters: { - ptyID: string + public get( + parameters?: { directory?: string workspace?: string }, @@ -750,28 +753,26 @@ export class Pty extends HeyApiClient { [ { args: [ - { in: "path", key: "ptyID" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, ], }, ], ) - return (options?.client ?? this.client).delete({ - url: "/pty/{ptyID}", + return (options?.client ?? this.client).get({ + url: "/experimental/console", ...options, ...params, }) } /** - * Get PTY session + * List switchable Console orgs * - * Retrieve detailed information about a specific pseudo-terminal (PTY) session. + * Get the available Console orgs across logged-in accounts, including the current active org. */ - public get( - parameters: { - ptyID: string + public listOrgs( + parameters?: { directory?: string workspace?: string }, @@ -782,35 +783,30 @@ export class Pty extends HeyApiClient { [ { args: [ - { in: "path", key: "ptyID" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, ], }, ], ) - return (options?.client ?? this.client).get({ - url: "/pty/{ptyID}", + return (options?.client ?? this.client).get({ + url: "/experimental/console/orgs", ...options, ...params, }) } /** - * Update PTY session + * Switch active Console org * - * Update properties of an existing pseudo-terminal (PTY) session. + * Persist a new active Console account/org selection for the current local OpenCode state. */ - public update( - parameters: { - ptyID: string + public switchOrg( + parameters?: { directory?: string workspace?: string - title?: string - size?: { - rows: number - cols: number - } + accountID?: string + orgID?: string }, options?: Options, ) { @@ -819,17 +815,16 @@ export class Pty extends HeyApiClient { [ { args: [ - { in: "path", key: "ptyID" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, - { in: "body", key: "title" }, - { in: "body", key: "size" }, + { in: "body", key: "accountID" }, + { in: "body", key: "orgID" }, ], }, ], ) - return (options?.client ?? this.client).put({ - url: "/pty/{ptyID}", + return (options?.client ?? this.client).post({ + url: "/experimental/console/switch", ...options, ...params, headers: { @@ -839,17 +834,24 @@ export class Pty extends HeyApiClient { }, }) } +} +export class Session extends HeyApiClient { /** - * Connect to PTY session + * List sessions * - * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time. + * Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default. */ - public connect( - parameters: { - ptyID: string + public list( + parameters?: { directory?: string workspace?: string + roots?: boolean + start?: number + cursor?: number + search?: string + limit?: number + archived?: boolean }, options?: Options, ) { @@ -858,28 +860,33 @@ export class Pty extends HeyApiClient { [ { args: [ - { in: "path", key: "ptyID" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, + { in: "query", key: "roots" }, + { in: "query", key: "start" }, + { in: "query", key: "cursor" }, + { in: "query", key: "search" }, + { in: "query", key: "limit" }, + { in: "query", key: "archived" }, ], }, ], ) - return (options?.client ?? this.client).get({ - url: "/pty/{ptyID}/connect", + return (options?.client ?? this.client).get({ + url: "/experimental/session", ...options, ...params, }) } } -export class Config2 extends HeyApiClient { +export class Resource extends HeyApiClient { /** - * Get configuration + * Get MCP resources * - * Retrieve the current OpenCode configuration settings and preferences. + * Get all available MCP resources from connected servers. Optionally filter by name. */ - public get( + public list( parameters?: { directory?: string workspace?: string @@ -897,23 +904,46 @@ export class Config2 extends HeyApiClient { }, ], ) - return (options?.client ?? this.client).get({ - url: "/config", + return (options?.client ?? this.client).get({ + url: "/experimental/resource", ...options, ...params, }) } +} +export class Experimental extends HeyApiClient { + private _workspace?: Workspace + get workspace(): Workspace { + return (this._workspace ??= new Workspace({ client: this.client })) + } + + private _console?: Console + get console(): Console { + return (this._console ??= new Console({ client: this.client })) + } + + private _session?: Session + get session(): Session { + return (this._session ??= new Session({ client: this.client })) + } + + private _resource?: Resource + get resource(): Resource { + return (this._resource ??= new Resource({ client: this.client })) + } +} + +export class Project extends HeyApiClient { /** - * Update configuration + * List all projects * - * Update OpenCode configuration settings and preferences. + * Get a list of projects that have been opened with OpenCode. */ - public update( + public list( parameters?: { directory?: string workspace?: string - config?: Config3 }, options?: Options, ) { @@ -924,29 +954,23 @@ export class Config2 extends HeyApiClient { args: [ { in: "query", key: "directory" }, { in: "query", key: "workspace" }, - { key: "config", map: "body" }, ], }, ], ) - return (options?.client ?? this.client).patch({ - url: "/config", + return (options?.client ?? this.client).get({ + url: "/project", ...options, ...params, - headers: { - "Content-Type": "application/json", - ...options?.headers, - ...params.headers, - }, }) } /** - * List config providers + * Get current project * - * Get a list of all configured AI providers and their default models. + * Retrieve the currently active project that OpenCode is working with. */ - public providers( + public current( parameters?: { directory?: string workspace?: string @@ -964,21 +988,19 @@ export class Config2 extends HeyApiClient { }, ], ) - return (options?.client ?? this.client).get({ - url: "/config/providers", + return (options?.client ?? this.client).get({ + url: "/project/current", ...options, ...params, }) } -} -export class Console extends HeyApiClient { /** - * Get active Console provider metadata + * Initialize git repository * - * Get the active Console org name and the set of provider IDs managed by that Console org. + * Create a git repository for the current project and return the refreshed project info. */ - public get( + public initGit( parameters?: { directory?: string workspace?: string @@ -996,19 +1018,73 @@ export class Console extends HeyApiClient { }, ], ) - return (options?.client ?? this.client).get({ - url: "/experimental/console", + return (options?.client ?? this.client).post({ + url: "/project/git/init", + ...options, + ...params, + }) + } + + /** + * Update project + * + * Update project properties such as name, icon, and commands. + */ + public update( + parameters: { + projectID: string + directory?: string + workspace?: string + name?: string + icon?: { + url?: string + override?: string + color?: string + } + commands?: { + /** + * Startup script to run when creating a new workspace (worktree) + */ + start?: string + } + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "projectID" }, + { in: "query", key: "directory" }, + { in: "query", key: "workspace" }, + { in: "body", key: "name" }, + { in: "body", key: "icon" }, + { in: "body", key: "commands" }, + ], + }, + ], + ) + return (options?.client ?? this.client).patch({ + url: "/project/{projectID}", ...options, ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, }) } +} +export class Pty extends HeyApiClient { /** - * List switchable Console orgs + * List PTY sessions * - * Get the available Console orgs across logged-in accounts, including the current active org. + * Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode. */ - public listOrgs( + public list( parameters?: { directory?: string workspace?: string @@ -1026,24 +1102,29 @@ export class Console extends HeyApiClient { }, ], ) - return (options?.client ?? this.client).get({ - url: "/experimental/console/orgs", + return (options?.client ?? this.client).get({ + url: "/pty", ...options, ...params, }) } /** - * Switch active Console org + * Create PTY session * - * Persist a new active Console account/org selection for the current local OpenCode state. + * Create a new pseudo-terminal (PTY) session for running shell commands and processes. */ - public switchOrg( + public create( parameters?: { directory?: string workspace?: string - accountID?: string - orgID?: string + command?: string + args?: Array + cwd?: string + title?: string + env?: { + [key: string]: string + } }, options?: Options, ) { @@ -1054,14 +1135,17 @@ export class Console extends HeyApiClient { args: [ { in: "query", key: "directory" }, { in: "query", key: "workspace" }, - { in: "body", key: "accountID" }, - { in: "body", key: "orgID" }, + { in: "body", key: "command" }, + { in: "body", key: "args" }, + { in: "body", key: "cwd" }, + { in: "body", key: "title" }, + { in: "body", key: "env" }, ], }, ], ) - return (options?.client ?? this.client).post({ - url: "/experimental/console/switch", + return (options?.client ?? this.client).post({ + url: "/pty", ...options, ...params, headers: { @@ -1071,16 +1155,15 @@ export class Console extends HeyApiClient { }, }) } -} -export class Adaptor extends HeyApiClient { /** - * List workspace adaptors + * Remove PTY session * - * List all available workspace adaptors for the current project. + * Remove and terminate a specific pseudo-terminal (PTY) session. */ - public list( - parameters?: { + public remove( + parameters: { + ptyID: string directory?: string workspace?: string }, @@ -1091,28 +1174,28 @@ export class Adaptor extends HeyApiClient { [ { args: [ + { in: "path", key: "ptyID" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, ], }, ], ) - return (options?.client ?? this.client).get({ - url: "/experimental/workspace/adaptor", + return (options?.client ?? this.client).delete({ + url: "/pty/{ptyID}", ...options, ...params, }) } -} -export class Workspace extends HeyApiClient { /** - * List workspaces + * Get PTY session * - * List all workspaces. + * Retrieve detailed information about a specific pseudo-terminal (PTY) session. */ - public list( - parameters?: { + public get( + parameters: { + ptyID: string directory?: string workspace?: string }, @@ -1123,32 +1206,35 @@ export class Workspace extends HeyApiClient { [ { args: [ + { in: "path", key: "ptyID" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, ], }, ], ) - return (options?.client ?? this.client).get({ - url: "/experimental/workspace", + return (options?.client ?? this.client).get({ + url: "/pty/{ptyID}", ...options, ...params, }) } /** - * Create workspace + * Update PTY session * - * Create a workspace for the current project. + * Update properties of an existing pseudo-terminal (PTY) session. */ - public create( - parameters?: { + public update( + parameters: { + ptyID: string directory?: string workspace?: string - id?: string - type?: string - branch?: string | null - extra?: unknown | null + title?: string + size?: { + rows: number + cols: number + } }, options?: Options, ) { @@ -1157,22 +1243,17 @@ export class Workspace extends HeyApiClient { [ { args: [ + { in: "path", key: "ptyID" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, - { in: "body", key: "id" }, - { in: "body", key: "type" }, - { in: "body", key: "branch" }, - { in: "body", key: "extra" }, + { in: "body", key: "title" }, + { in: "body", key: "size" }, ], }, ], ) - return (options?.client ?? this.client).post< - ExperimentalWorkspaceCreateResponses, - ExperimentalWorkspaceCreateErrors, - ThrowOnError - >({ - url: "/experimental/workspace", + return (options?.client ?? this.client).put({ + url: "/pty/{ptyID}", ...options, ...params, headers: { @@ -1184,12 +1265,13 @@ export class Workspace extends HeyApiClient { } /** - * Workspace status + * Connect to PTY session * - * Get connection status for workspaces in the current project. + * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time. */ - public status( - parameters?: { + public connect( + parameters: { + ptyID: string directory?: string workspace?: string }, @@ -1200,27 +1282,29 @@ export class Workspace extends HeyApiClient { [ { args: [ + { in: "path", key: "ptyID" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, ], }, ], ) - return (options?.client ?? this.client).get({ - url: "/experimental/workspace/status", + return (options?.client ?? this.client).get({ + url: "/pty/{ptyID}/connect", ...options, ...params, }) } +} +export class Config2 extends HeyApiClient { /** - * Remove workspace + * Get configuration * - * Remove an existing workspace. + * Retrieve the current OpenCode configuration settings and preferences. */ - public remove( - parameters: { - id: string + public get( + parameters?: { directory?: string workspace?: string }, @@ -1231,35 +1315,29 @@ export class Workspace extends HeyApiClient { [ { args: [ - { in: "path", key: "id" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, ], }, ], ) - return (options?.client ?? this.client).delete< - ExperimentalWorkspaceRemoveResponses, - ExperimentalWorkspaceRemoveErrors, - ThrowOnError - >({ - url: "/experimental/workspace/{id}", + return (options?.client ?? this.client).get({ + url: "/config", ...options, ...params, }) } /** - * Restore session into workspace + * Update configuration * - * Replay a session's sync events into the target workspace in batches. + * Update OpenCode configuration settings and preferences. */ - public sessionRestore( - parameters: { - id: string + public update( + parameters?: { directory?: string workspace?: string - sessionID?: string + config?: Config3 }, options?: Options, ) { @@ -1268,20 +1346,15 @@ export class Workspace extends HeyApiClient { [ { args: [ - { in: "path", key: "id" }, { in: "query", key: "directory" }, { in: "query", key: "workspace" }, - { in: "body", key: "sessionID" }, + { key: "config", map: "body" }, ], }, ], ) - return (options?.client ?? this.client).post< - ExperimentalWorkspaceSessionRestoreResponses, - ExperimentalWorkspaceSessionRestoreErrors, - ThrowOnError - >({ - url: "/experimental/workspace/{id}/session-restore", + return (options?.client ?? this.client).patch({ + url: "/config", ...options, ...params, headers: { @@ -1292,63 +1365,12 @@ export class Workspace extends HeyApiClient { }) } - private _adaptor?: Adaptor - get adaptor(): Adaptor { - return (this._adaptor ??= new Adaptor({ client: this.client })) - } -} - -export class Session extends HeyApiClient { - /** - * List sessions - * - * Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default. - */ - public list( - parameters?: { - directory?: string - workspace?: string - roots?: boolean - start?: number - cursor?: number - search?: string - limit?: number - archived?: boolean - }, - options?: Options, - ) { - const params = buildClientParams( - [parameters], - [ - { - args: [ - { in: "query", key: "directory" }, - { in: "query", key: "workspace" }, - { in: "query", key: "roots" }, - { in: "query", key: "start" }, - { in: "query", key: "cursor" }, - { in: "query", key: "search" }, - { in: "query", key: "limit" }, - { in: "query", key: "archived" }, - ], - }, - ], - ) - return (options?.client ?? this.client).get({ - url: "/experimental/session", - ...options, - ...params, - }) - } -} - -export class Resource extends HeyApiClient { /** - * Get MCP resources + * List config providers * - * Get all available MCP resources from connected servers. Optionally filter by name. + * Get a list of all configured AI providers and their default models. */ - public list( + public providers( parameters?: { directory?: string workspace?: string @@ -1366,36 +1388,14 @@ export class Resource extends HeyApiClient { }, ], ) - return (options?.client ?? this.client).get({ - url: "/experimental/resource", + return (options?.client ?? this.client).get({ + url: "/config/providers", ...options, ...params, }) } } -export class Experimental extends HeyApiClient { - private _console?: Console - get console(): Console { - return (this._console ??= new Console({ client: this.client })) - } - - private _workspace?: Workspace - get workspace(): Workspace { - return (this._workspace ??= new Workspace({ client: this.client })) - } - - private _session?: Session - get session(): Session { - return (this._session ??= new Session({ client: this.client })) - } - - private _resource?: Resource - get resource(): Resource { - return (this._resource ??= new Resource({ client: this.client })) - } -} - export class Tool extends HeyApiClient { /** * List tool IDs @@ -4314,6 +4314,11 @@ export class OpencodeClient extends HeyApiClient { return (this._app ??= new App({ client: this.client })) } + private _experimental?: Experimental + get experimental(): Experimental { + return (this._experimental ??= new Experimental({ client: this.client })) + } + private _project?: Project get project(): Project { return (this._project ??= new Project({ client: this.client })) @@ -4329,11 +4334,6 @@ export class OpencodeClient extends HeyApiClient { return (this._config ??= new Config2({ client: this.client })) } - private _experimental?: Experimental - get experimental(): Experimental { - return (this._experimental ??= new Experimental({ client: this.client })) - } - private _tool?: Tool get tool(): Tool { return (this._tool ??= new Tool({ client: this.client })) diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index 25c3cfa66..839dae8b2 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -1706,6 +1706,16 @@ export type WellKnownAuth = { export type Auth = OAuth | ApiAuth | WellKnownAuth +export type Workspace = { + id: string + type: string + name: string + branch: string | null + directory: string | null + extra: unknown | null + projectID: string +} + export type NotFoundError = { name: "NotFoundError" data: { @@ -1808,16 +1818,6 @@ export type ToolListItem = { export type ToolList = Array -export type Workspace = { - id: string - type: string - name: string - branch: string | null - directory: string | null - extra: unknown | null - projectID: string -} - export type Worktree = { name: string branch: string @@ -2394,6 +2394,177 @@ export type AppLogResponses = { export type AppLogResponse = AppLogResponses[keyof AppLogResponses] +export type ExperimentalWorkspaceAdaptorListData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace/adaptor" +} + +export type ExperimentalWorkspaceAdaptorListResponses = { + /** + * Workspace adaptors + */ + 200: Array<{ + type: string + name: string + description: string + }> +} + +export type ExperimentalWorkspaceAdaptorListResponse = + ExperimentalWorkspaceAdaptorListResponses[keyof ExperimentalWorkspaceAdaptorListResponses] + +export type ExperimentalWorkspaceListData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace" +} + +export type ExperimentalWorkspaceListResponses = { + /** + * Workspaces + */ + 200: Array +} + +export type ExperimentalWorkspaceListResponse = + ExperimentalWorkspaceListResponses[keyof ExperimentalWorkspaceListResponses] + +export type ExperimentalWorkspaceCreateData = { + body?: { + id?: string + type: string + branch: string | null + extra: unknown | null + } + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace" +} + +export type ExperimentalWorkspaceCreateErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ExperimentalWorkspaceCreateError = + ExperimentalWorkspaceCreateErrors[keyof ExperimentalWorkspaceCreateErrors] + +export type ExperimentalWorkspaceCreateResponses = { + /** + * Workspace created + */ + 200: Workspace +} + +export type ExperimentalWorkspaceCreateResponse = + ExperimentalWorkspaceCreateResponses[keyof ExperimentalWorkspaceCreateResponses] + +export type ExperimentalWorkspaceStatusData = { + body?: never + path?: never + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace/status" +} + +export type ExperimentalWorkspaceStatusResponses = { + /** + * Workspace status + */ + 200: Array<{ + workspaceID: string + status: "connected" | "connecting" | "disconnected" | "error" + error?: string + }> +} + +export type ExperimentalWorkspaceStatusResponse = + ExperimentalWorkspaceStatusResponses[keyof ExperimentalWorkspaceStatusResponses] + +export type ExperimentalWorkspaceRemoveData = { + body?: never + path: { + id: string + } + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace/{id}" +} + +export type ExperimentalWorkspaceRemoveErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ExperimentalWorkspaceRemoveError = + ExperimentalWorkspaceRemoveErrors[keyof ExperimentalWorkspaceRemoveErrors] + +export type ExperimentalWorkspaceRemoveResponses = { + /** + * Workspace removed + */ + 200: Workspace +} + +export type ExperimentalWorkspaceRemoveResponse = + ExperimentalWorkspaceRemoveResponses[keyof ExperimentalWorkspaceRemoveResponses] + +export type ExperimentalWorkspaceSessionRestoreData = { + body?: { + sessionID: string + } + path: { + id: string + } + query?: { + directory?: string + workspace?: string + } + url: "/experimental/workspace/{id}/session-restore" +} + +export type ExperimentalWorkspaceSessionRestoreErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type ExperimentalWorkspaceSessionRestoreError = + ExperimentalWorkspaceSessionRestoreErrors[keyof ExperimentalWorkspaceSessionRestoreErrors] + +export type ExperimentalWorkspaceSessionRestoreResponses = { + /** + * Session replay started + */ + 200: { + total: number + } +} + +export type ExperimentalWorkspaceSessionRestoreResponse = + ExperimentalWorkspaceSessionRestoreResponses[keyof ExperimentalWorkspaceSessionRestoreResponses] + export type ProjectListData = { body?: never path?: never @@ -2883,177 +3054,6 @@ export type ToolListResponses = { export type ToolListResponse = ToolListResponses[keyof ToolListResponses] -export type ExperimentalWorkspaceAdaptorListData = { - body?: never - path?: never - query?: { - directory?: string - workspace?: string - } - url: "/experimental/workspace/adaptor" -} - -export type ExperimentalWorkspaceAdaptorListResponses = { - /** - * Workspace adaptors - */ - 200: Array<{ - type: string - name: string - description: string - }> -} - -export type ExperimentalWorkspaceAdaptorListResponse = - ExperimentalWorkspaceAdaptorListResponses[keyof ExperimentalWorkspaceAdaptorListResponses] - -export type ExperimentalWorkspaceListData = { - body?: never - path?: never - query?: { - directory?: string - workspace?: string - } - url: "/experimental/workspace" -} - -export type ExperimentalWorkspaceListResponses = { - /** - * Workspaces - */ - 200: Array -} - -export type ExperimentalWorkspaceListResponse = - ExperimentalWorkspaceListResponses[keyof ExperimentalWorkspaceListResponses] - -export type ExperimentalWorkspaceCreateData = { - body?: { - id?: string - type: string - branch: string | null - extra: unknown | null - } - path?: never - query?: { - directory?: string - workspace?: string - } - url: "/experimental/workspace" -} - -export type ExperimentalWorkspaceCreateErrors = { - /** - * Bad request - */ - 400: BadRequestError -} - -export type ExperimentalWorkspaceCreateError = - ExperimentalWorkspaceCreateErrors[keyof ExperimentalWorkspaceCreateErrors] - -export type ExperimentalWorkspaceCreateResponses = { - /** - * Workspace created - */ - 200: Workspace -} - -export type ExperimentalWorkspaceCreateResponse = - ExperimentalWorkspaceCreateResponses[keyof ExperimentalWorkspaceCreateResponses] - -export type ExperimentalWorkspaceStatusData = { - body?: never - path?: never - query?: { - directory?: string - workspace?: string - } - url: "/experimental/workspace/status" -} - -export type ExperimentalWorkspaceStatusResponses = { - /** - * Workspace status - */ - 200: Array<{ - workspaceID: string - status: "connected" | "connecting" | "disconnected" | "error" - error?: string - }> -} - -export type ExperimentalWorkspaceStatusResponse = - ExperimentalWorkspaceStatusResponses[keyof ExperimentalWorkspaceStatusResponses] - -export type ExperimentalWorkspaceRemoveData = { - body?: never - path: { - id: string - } - query?: { - directory?: string - workspace?: string - } - url: "/experimental/workspace/{id}" -} - -export type ExperimentalWorkspaceRemoveErrors = { - /** - * Bad request - */ - 400: BadRequestError -} - -export type ExperimentalWorkspaceRemoveError = - ExperimentalWorkspaceRemoveErrors[keyof ExperimentalWorkspaceRemoveErrors] - -export type ExperimentalWorkspaceRemoveResponses = { - /** - * Workspace removed - */ - 200: Workspace -} - -export type ExperimentalWorkspaceRemoveResponse = - ExperimentalWorkspaceRemoveResponses[keyof ExperimentalWorkspaceRemoveResponses] - -export type ExperimentalWorkspaceSessionRestoreData = { - body?: { - sessionID: string - } - path: { - id: string - } - query?: { - directory?: string - workspace?: string - } - url: "/experimental/workspace/{id}/session-restore" -} - -export type ExperimentalWorkspaceSessionRestoreErrors = { - /** - * Bad request - */ - 400: BadRequestError -} - -export type ExperimentalWorkspaceSessionRestoreError = - ExperimentalWorkspaceSessionRestoreErrors[keyof ExperimentalWorkspaceSessionRestoreErrors] - -export type ExperimentalWorkspaceSessionRestoreResponses = { - /** - * Session replay started - */ - 200: { - total: number - } -} - -export type ExperimentalWorkspaceSessionRestoreResponse = - ExperimentalWorkspaceSessionRestoreResponses[keyof ExperimentalWorkspaceSessionRestoreResponses] - export type WorktreeRemoveData = { body?: WorktreeRemoveInput path?: never -- cgit v1.2.3