@opencode-ai/client 0.0.0-dev-18198 → 0.0.0-dev-18202

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2001,6 +2001,175 @@ export interface PtyApi<E = never> {
2001
2001
  readonly token: PtyConnectTokenOperation<E>;
2002
2002
  };
2003
2003
  }
2004
+ export type ExperimentalPersistentPtyListInput = {
2005
+ readonly sessionID: Session.ID;
2006
+ };
2007
+ export type ExperimentalPersistentPtyListOutput = ReadonlyArray<{
2008
+ readonly id: Pty.ID;
2009
+ readonly title: string;
2010
+ readonly command: string;
2011
+ readonly args: ReadonlyArray<string>;
2012
+ readonly cwd: string;
2013
+ readonly status: "running" | "exited";
2014
+ readonly pid: number;
2015
+ readonly exitCode?: number | undefined;
2016
+ readonly sessionID: Session.ID;
2017
+ readonly foregroundProcess: string | null;
2018
+ readonly size: {
2019
+ readonly cols: number;
2020
+ readonly rows: number;
2021
+ };
2022
+ readonly output: {
2023
+ readonly head: number;
2024
+ readonly tail: number;
2025
+ };
2026
+ }>;
2027
+ export type ExperimentalPersistentPtyListOperation<E = never> = (input: ExperimentalPersistentPtyListInput) => Effect.Effect<ExperimentalPersistentPtyListOutput, E>;
2028
+ export type ExperimentalPersistentPtyCreateInput = {
2029
+ readonly sessionID: Session.ID;
2030
+ readonly command: string;
2031
+ readonly args: ReadonlyArray<string>;
2032
+ readonly cwd: string;
2033
+ readonly title: string;
2034
+ readonly env: {
2035
+ readonly [x: string]: string;
2036
+ };
2037
+ readonly size?: {
2038
+ readonly cols: number;
2039
+ readonly rows: number;
2040
+ } | undefined;
2041
+ };
2042
+ export type ExperimentalPersistentPtyCreateOutput = {
2043
+ readonly id: Pty.ID;
2044
+ readonly title: string;
2045
+ readonly command: string;
2046
+ readonly args: ReadonlyArray<string>;
2047
+ readonly cwd: string;
2048
+ readonly status: "running" | "exited";
2049
+ readonly pid: number;
2050
+ readonly exitCode?: number | undefined;
2051
+ readonly sessionID: Session.ID;
2052
+ readonly foregroundProcess: string | null;
2053
+ readonly size: {
2054
+ readonly cols: number;
2055
+ readonly rows: number;
2056
+ };
2057
+ readonly output: {
2058
+ readonly head: number;
2059
+ readonly tail: number;
2060
+ };
2061
+ };
2062
+ export type ExperimentalPersistentPtyCreateOperation<E = never> = (input: ExperimentalPersistentPtyCreateInput) => Effect.Effect<ExperimentalPersistentPtyCreateOutput, E>;
2063
+ export type ExperimentalPersistentPtyShutdownOutput = void;
2064
+ export type ExperimentalPersistentPtyShutdownOperation<E = never> = () => Effect.Effect<ExperimentalPersistentPtyShutdownOutput, E>;
2065
+ export type ExperimentalPersistentPtyGetInput = {
2066
+ readonly ptyID: Pty.ID;
2067
+ };
2068
+ export type ExperimentalPersistentPtyGetOutput = {
2069
+ readonly id: Pty.ID;
2070
+ readonly title: string;
2071
+ readonly command: string;
2072
+ readonly args: ReadonlyArray<string>;
2073
+ readonly cwd: string;
2074
+ readonly status: "running" | "exited";
2075
+ readonly pid: number;
2076
+ readonly exitCode?: number | undefined;
2077
+ readonly sessionID: Session.ID;
2078
+ readonly foregroundProcess: string | null;
2079
+ readonly size: {
2080
+ readonly cols: number;
2081
+ readonly rows: number;
2082
+ };
2083
+ readonly output: {
2084
+ readonly head: number;
2085
+ readonly tail: number;
2086
+ };
2087
+ };
2088
+ export type ExperimentalPersistentPtyGetOperation<E = never> = (input: ExperimentalPersistentPtyGetInput) => Effect.Effect<ExperimentalPersistentPtyGetOutput, E>;
2089
+ export type ExperimentalPersistentPtyUpdateInput = {
2090
+ readonly ptyID: Pty.ID;
2091
+ readonly attachmentID?: string | undefined;
2092
+ readonly size: {
2093
+ readonly cols: number;
2094
+ readonly rows: number;
2095
+ };
2096
+ };
2097
+ export type ExperimentalPersistentPtyUpdateOutput = {
2098
+ readonly id: Pty.ID;
2099
+ readonly title: string;
2100
+ readonly command: string;
2101
+ readonly args: ReadonlyArray<string>;
2102
+ readonly cwd: string;
2103
+ readonly status: "running" | "exited";
2104
+ readonly pid: number;
2105
+ readonly exitCode?: number | undefined;
2106
+ readonly sessionID: Session.ID;
2107
+ readonly foregroundProcess: string | null;
2108
+ readonly size: {
2109
+ readonly cols: number;
2110
+ readonly rows: number;
2111
+ };
2112
+ readonly output: {
2113
+ readonly head: number;
2114
+ readonly tail: number;
2115
+ };
2116
+ };
2117
+ export type ExperimentalPersistentPtyUpdateOperation<E = never> = (input: ExperimentalPersistentPtyUpdateInput) => Effect.Effect<ExperimentalPersistentPtyUpdateOutput, E>;
2118
+ export type ExperimentalPersistentPtySnapshotInput = {
2119
+ readonly ptyID: Pty.ID;
2120
+ };
2121
+ export type ExperimentalPersistentPtySnapshotOutput = {
2122
+ readonly info: {
2123
+ readonly id: Pty.ID;
2124
+ readonly title: string;
2125
+ readonly command: string;
2126
+ readonly args: ReadonlyArray<string>;
2127
+ readonly cwd: string;
2128
+ readonly status: "running" | "exited";
2129
+ readonly pid: number;
2130
+ readonly exitCode?: number | undefined;
2131
+ readonly sessionID: Session.ID;
2132
+ readonly foregroundProcess: string | null;
2133
+ readonly size: {
2134
+ readonly cols: number;
2135
+ readonly rows: number;
2136
+ };
2137
+ readonly output: {
2138
+ readonly head: number;
2139
+ readonly tail: number;
2140
+ };
2141
+ };
2142
+ readonly text: string;
2143
+ readonly checkpoint: globalThis.Uint8Array;
2144
+ readonly cursor: {
2145
+ readonly x: number;
2146
+ readonly y: number;
2147
+ };
2148
+ };
2149
+ export type ExperimentalPersistentPtySnapshotOperation<E = never> = (input: ExperimentalPersistentPtySnapshotInput) => Effect.Effect<ExperimentalPersistentPtySnapshotOutput, E>;
2150
+ export type ExperimentalPersistentPtyRemoveInput = {
2151
+ readonly ptyID: Pty.ID;
2152
+ };
2153
+ export type ExperimentalPersistentPtyRemoveOutput = void;
2154
+ export type ExperimentalPersistentPtyRemoveOperation<E = never> = (input: ExperimentalPersistentPtyRemoveInput) => Effect.Effect<ExperimentalPersistentPtyRemoveOutput, E>;
2155
+ export type ExperimentalPersistentPtyConnectTokenInput = {
2156
+ readonly ptyID: Pty.ID;
2157
+ readonly "x-opencode-ticket"?: string | undefined;
2158
+ };
2159
+ export type ExperimentalPersistentPtyConnectTokenOutput = PtyTicket.ConnectToken;
2160
+ export type ExperimentalPersistentPtyConnectTokenOperation<E = never> = (input: ExperimentalPersistentPtyConnectTokenInput) => Effect.Effect<ExperimentalPersistentPtyConnectTokenOutput, E>;
2161
+ export interface ExperimentalApi<E = never> {
2162
+ readonly persistentPty: {
2163
+ readonly list: ExperimentalPersistentPtyListOperation<E>;
2164
+ readonly create: ExperimentalPersistentPtyCreateOperation<E>;
2165
+ readonly shutdown: ExperimentalPersistentPtyShutdownOperation<E>;
2166
+ readonly get: ExperimentalPersistentPtyGetOperation<E>;
2167
+ readonly update: ExperimentalPersistentPtyUpdateOperation<E>;
2168
+ readonly snapshot: ExperimentalPersistentPtySnapshotOperation<E>;
2169
+ readonly remove: ExperimentalPersistentPtyRemoveOperation<E>;
2170
+ readonly connectToken: ExperimentalPersistentPtyConnectTokenOperation<E>;
2171
+ };
2172
+ }
2004
2173
  export type ShellListInput = {
2005
2174
  readonly location?: {
2006
2175
  readonly directory?: string | undefined;
@@ -2302,6 +2471,7 @@ export interface AppApi<E = never> {
2302
2471
  readonly skill: SkillApi<E>;
2303
2472
  readonly event: EventApi<E>;
2304
2473
  readonly pty: PtyApi<E>;
2474
+ readonly experimental: ExperimentalApi<E>;
2305
2475
  readonly shell: ShellApi<E>;
2306
2476
  readonly reference: ReferenceApi<E>;
2307
2477
  readonly worktree: WorktreeApi<E>;
@@ -1,7 +1,7 @@
1
1
  import { Effect, Stream, Schema } from "effect";
2
2
  import { Sse } from "effect/unstable/encoding";
3
3
  import { HttpClientError } from "effect/unstable/http";
4
- import type { HealthGetOutput, ServerGetOutput, LocationGetInput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, SessionListInput, SessionListOutput, SessionStatsInput, SessionStatsOutput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionExportOutput, SessionActiveOutput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionContextOutput, SessionInboxListInput, SessionInboxListOutput, SessionInboxCancelInput, SessionInboxSteerInput, SessionInboxQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryListOutput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionGenerateOutput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionInterruptOutput, SessionBackgroundInput, SessionMessageInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, MessageListOutput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, GenerateTextOutput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialUpdateInput, CredentialRemoveInput, ProjectListOutput, ProjectUpdateInput, ProjectCurrentInput, FormRequestListInput, FormRequestListOutput, FormListInput, FormListOutput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedListOutput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionCreateOutput, PermissionListInput, PermissionListOutput, PermissionGetInput, PermissionReplyInput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, WorkspaceCreateInput, WorkspaceDestroyInput, VcsGetInput, VcsGetOutput, VcsStatusInput, VcsStatusOutput, VcsBranchesInput, VcsBranchesOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } from "../api/api.js";
4
+ import type { HealthGetOutput, ServerGetOutput, LocationGetInput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, SessionListInput, SessionListOutput, SessionStatsInput, SessionStatsOutput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionExportOutput, SessionActiveOutput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionContextOutput, SessionInboxListInput, SessionInboxListOutput, SessionInboxCancelInput, SessionInboxSteerInput, SessionInboxQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryListOutput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionGenerateOutput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionInterruptOutput, SessionBackgroundInput, SessionMessageInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, MessageListOutput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, GenerateTextOutput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialUpdateInput, CredentialRemoveInput, ProjectListOutput, ProjectUpdateInput, ProjectCurrentInput, FormRequestListInput, FormRequestListOutput, FormListInput, FormListOutput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedListOutput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionCreateOutput, PermissionListInput, PermissionListOutput, PermissionGetInput, PermissionReplyInput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyListOutput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyCreateOutput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyGetOutput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtyUpdateOutput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtySnapshotOutput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, WorkspaceCreateInput, WorkspaceDestroyInput, VcsGetInput, VcsGetOutput, VcsStatusInput, VcsStatusOutput, VcsBranchesInput, VcsBranchesOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } from "../api/api.js";
5
5
  import { ClientError } from "./client-error.js";
6
6
  export declare const make: (options?: {
7
7
  readonly baseUrl?: URL | string;
@@ -1949,21 +1949,18 @@ export declare const make: (options?: {
1949
1949
  } | {
1950
1950
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
1951
1951
  readonly data: {
1952
- readonly id: string & import("effect/Brand").Brand<"Plugin.ID">;
1952
+ readonly info: {
1953
+ readonly id: string & import("effect/Brand").Brand<"PtyID">;
1954
+ readonly command: string;
1955
+ readonly title: string;
1956
+ readonly status: "running" | "exited";
1957
+ readonly pid: number;
1958
+ readonly cwd: string;
1959
+ readonly args: readonly string[];
1960
+ readonly exitCode?: number | undefined;
1961
+ };
1953
1962
  };
1954
- readonly type: "plugin.added";
1955
- readonly created: number;
1956
- readonly location?: {
1957
- readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
1958
- readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
1959
- } | undefined;
1960
- readonly metadata?: {
1961
- readonly [x: string]: unknown;
1962
- } | undefined;
1963
- } | {
1964
- readonly id: string & import("effect/Brand").Brand<"Event.ID">;
1965
- readonly data: {};
1966
- readonly type: "plugin.updated";
1963
+ readonly type: "pty.created";
1967
1964
  readonly created: number;
1968
1965
  readonly location?: {
1969
1966
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
@@ -1986,7 +1983,7 @@ export declare const make: (options?: {
1986
1983
  readonly exitCode?: number | undefined;
1987
1984
  };
1988
1985
  };
1989
- readonly type: "pty.created";
1986
+ readonly type: "pty.updated";
1990
1987
  readonly created: number;
1991
1988
  readonly location?: {
1992
1989
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
@@ -1998,18 +1995,58 @@ export declare const make: (options?: {
1998
1995
  } | {
1999
1996
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
2000
1997
  readonly data: {
2001
- readonly info: {
1998
+ readonly id: string & import("effect/Brand").Brand<"PtyID">;
1999
+ readonly exitCode: number;
2000
+ };
2001
+ readonly type: "pty.exited";
2002
+ readonly created: number;
2003
+ readonly location?: {
2004
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
2005
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
2006
+ } | undefined;
2007
+ readonly metadata?: {
2008
+ readonly [x: string]: unknown;
2009
+ } | undefined;
2010
+ } | {
2011
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
2012
+ readonly data: {
2013
+ readonly id: string & import("effect/Brand").Brand<"PtyID">;
2014
+ };
2015
+ readonly type: "pty.deleted";
2016
+ readonly created: number;
2017
+ readonly location?: {
2018
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
2019
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
2020
+ } | undefined;
2021
+ readonly metadata?: {
2022
+ readonly [x: string]: unknown;
2023
+ } | undefined;
2024
+ } | {
2025
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
2026
+ readonly data: {
2027
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
2028
+ readonly terminal: {
2002
2029
  readonly id: string & import("effect/Brand").Brand<"PtyID">;
2030
+ readonly size: {
2031
+ readonly cols: number;
2032
+ readonly rows: number;
2033
+ };
2034
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
2003
2035
  readonly command: string;
2004
2036
  readonly title: string;
2005
2037
  readonly status: "running" | "exited";
2038
+ readonly output: {
2039
+ readonly head: number;
2040
+ readonly tail: number;
2041
+ };
2006
2042
  readonly pid: number;
2007
2043
  readonly cwd: string;
2008
2044
  readonly args: readonly string[];
2045
+ readonly foregroundProcess: string | null;
2009
2046
  readonly exitCode?: number | undefined;
2010
2047
  };
2011
2048
  };
2012
- readonly type: "pty.updated";
2049
+ readonly type: "persistent-pty.added";
2013
2050
  readonly created: number;
2014
2051
  readonly location?: {
2015
2052
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
@@ -2021,10 +2058,10 @@ export declare const make: (options?: {
2021
2058
  } | {
2022
2059
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
2023
2060
  readonly data: {
2024
- readonly id: string & import("effect/Brand").Brand<"PtyID">;
2025
- readonly exitCode: number;
2061
+ readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
2062
+ readonly ptyID: string & import("effect/Brand").Brand<"PtyID">;
2026
2063
  };
2027
- readonly type: "pty.exited";
2064
+ readonly type: "persistent-pty.removed";
2028
2065
  readonly created: number;
2029
2066
  readonly location?: {
2030
2067
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
@@ -2036,9 +2073,21 @@ export declare const make: (options?: {
2036
2073
  } | {
2037
2074
  readonly id: string & import("effect/Brand").Brand<"Event.ID">;
2038
2075
  readonly data: {
2039
- readonly id: string & import("effect/Brand").Brand<"PtyID">;
2076
+ readonly id: string & import("effect/Brand").Brand<"Plugin.ID">;
2040
2077
  };
2041
- readonly type: "pty.deleted";
2078
+ readonly type: "plugin.added";
2079
+ readonly created: number;
2080
+ readonly location?: {
2081
+ readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
2082
+ readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
2083
+ } | undefined;
2084
+ readonly metadata?: {
2085
+ readonly [x: string]: unknown;
2086
+ } | undefined;
2087
+ } | {
2088
+ readonly id: string & import("effect/Brand").Brand<"Event.ID">;
2089
+ readonly data: {};
2090
+ readonly type: "plugin.updated";
2042
2091
  readonly created: number;
2043
2092
  readonly location?: {
2044
2093
  readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
@@ -2201,6 +2250,18 @@ export declare const make: (options?: {
2201
2250
  token: (input: PtyConnectTokenInput) => Effect.Effect<PtyConnectTokenOutput, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").ForbiddenError | import("@opencode-ai/protocol/errors").PtyNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
2202
2251
  };
2203
2252
  };
2253
+ experimental: {
2254
+ persistentPty: {
2255
+ list: (input: ExperimentalPersistentPtyListInput) => Effect.Effect<ExperimentalPersistentPtyListOutput, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").ServiceUnavailableError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
2256
+ create: (input: ExperimentalPersistentPtyCreateInput) => Effect.Effect<ExperimentalPersistentPtyCreateOutput, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").ServiceUnavailableError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
2257
+ shutdown: () => Effect.Effect<void, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").ServiceUnavailableError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
2258
+ get: (input: ExperimentalPersistentPtyGetInput) => Effect.Effect<ExperimentalPersistentPtyGetOutput, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").ServiceUnavailableError | import("@opencode-ai/protocol/errors").PtyNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
2259
+ update: (input: ExperimentalPersistentPtyUpdateInput) => Effect.Effect<ExperimentalPersistentPtyUpdateOutput, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").ServiceUnavailableError | import("@opencode-ai/protocol/errors").PtyNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
2260
+ snapshot: (input: ExperimentalPersistentPtySnapshotInput) => Effect.Effect<ExperimentalPersistentPtySnapshotOutput, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").ServiceUnavailableError | import("@opencode-ai/protocol/errors").PtyNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
2261
+ remove: (input: ExperimentalPersistentPtyRemoveInput) => Effect.Effect<void, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").ServiceUnavailableError | import("@opencode-ai/protocol/errors").PtyNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
2262
+ connectToken: (input: ExperimentalPersistentPtyConnectTokenInput) => Effect.Effect<import("@opencode-ai/schema/pty-ticket").ConnectToken, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").ServiceUnavailableError | import("@opencode-ai/protocol/errors").ForbiddenError | import("@opencode-ai/protocol/errors").PtyNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
2263
+ };
2264
+ };
2204
2265
  shell: {
2205
2266
  list: (input?: ShellListInput) => Effect.Effect<ShellListOutput, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
2206
2267
  create: (input: ShellCreateInput) => Effect.Effect<ShellCreateOutput, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
@@ -412,6 +412,42 @@ const adaptGroupPty = (raw) => ({
412
412
  remove: EndpointPtyRemove(raw),
413
413
  connect: { token: EndpointPtyConnectToken(raw) },
414
414
  });
415
+ const EndpointExperimentalPersistentPtyList = (raw) => (input) => preserveEffect()(raw["persistentPty.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
416
+ const EndpointExperimentalPersistentPtyCreate = (raw) => (input) => preserveEffect()(raw["persistentPty.create"]({
417
+ params: { sessionID: input["sessionID"] },
418
+ payload: {
419
+ command: input["command"],
420
+ args: input["args"],
421
+ cwd: input["cwd"],
422
+ title: input["title"],
423
+ env: input["env"],
424
+ size: input["size"],
425
+ },
426
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
427
+ const EndpointExperimentalPersistentPtyShutdown = (raw) => () => preserveEffect()(raw["persistentPty.shutdown"]({}).pipe(Effect.mapError(mapClientError)));
428
+ const EndpointExperimentalPersistentPtyGet = (raw) => (input) => preserveEffect()(raw["persistentPty.get"]({ params: { ptyID: input["ptyID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
429
+ const EndpointExperimentalPersistentPtyUpdate = (raw) => (input) => preserveEffect()(raw["persistentPty.update"]({
430
+ params: { ptyID: input["ptyID"] },
431
+ payload: { attachmentID: input["attachmentID"], size: input["size"] },
432
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
433
+ const EndpointExperimentalPersistentPtySnapshot = (raw) => (input) => preserveEffect()(raw["persistentPty.snapshot"]({ params: { ptyID: input["ptyID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
434
+ const EndpointExperimentalPersistentPtyRemove = (raw) => (input) => preserveEffect()(raw["persistentPty.remove"]({ params: { ptyID: input["ptyID"] } }).pipe(Effect.mapError(mapClientError)));
435
+ const EndpointExperimentalPersistentPtyConnectToken = (raw) => (input) => preserveEffect()(raw["persistentPty.connectToken"]({
436
+ params: { ptyID: input["ptyID"] },
437
+ headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
438
+ }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
439
+ const adaptGroupExperimental = (raw) => ({
440
+ persistentPty: {
441
+ list: EndpointExperimentalPersistentPtyList(raw),
442
+ create: EndpointExperimentalPersistentPtyCreate(raw),
443
+ shutdown: EndpointExperimentalPersistentPtyShutdown(raw),
444
+ get: EndpointExperimentalPersistentPtyGet(raw),
445
+ update: EndpointExperimentalPersistentPtyUpdate(raw),
446
+ snapshot: EndpointExperimentalPersistentPtySnapshot(raw),
447
+ remove: EndpointExperimentalPersistentPtyRemove(raw),
448
+ connectToken: EndpointExperimentalPersistentPtyConnectToken(raw),
449
+ },
450
+ });
415
451
  const EndpointShellList = (raw) => (input) => preserveEffect()(raw["shell.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
416
452
  const EndpointShellCreate = (raw) => (input) => preserveEffect()(raw["shell.create"]({
417
453
  query: { location: input["location"] },
@@ -518,6 +554,7 @@ const adaptClient = (raw) => ({
518
554
  skill: adaptGroupSkill(raw["server.skill"]),
519
555
  event: adaptGroupEvent(raw["server.event"]),
520
556
  pty: adaptGroupPty(raw["server.pty"]),
557
+ experimental: adaptGroupExperimental(raw["server.experimental"]),
521
558
  shell: adaptGroupShell(raw["server.shell"]),
522
559
  reference: adaptGroupReference(raw["server.reference"]),
523
560
  worktree: adaptGroupWorktree(raw["server.worktree"]),
@@ -1,4 +1,4 @@
1
- import type { ServerGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, SessionListInput, SessionStatsInput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionInboxListInput, SessionInboxCancelInput, SessionInboxSteerInput, SessionInboxQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialUpdateInput, CredentialRemoveInput, ProjectListOutput, ProjectUpdateInput, ProjectCurrentInput, FormRequestListInput, FormRequestListOutput, FormListInput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, WorkspaceCreateInput, WorkspaceDestroyInput, VcsGetInput, VcsGetOutput, VcsStatusInput, VcsStatusOutput, VcsBranchesInput, VcsBranchesOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } from "./types.js";
1
+ import type { ServerGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, SessionListInput, SessionStatsInput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionInboxListInput, SessionInboxCancelInput, SessionInboxSteerInput, SessionInboxQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialUpdateInput, CredentialRemoveInput, ProjectListOutput, ProjectUpdateInput, ProjectCurrentInput, FormRequestListInput, FormRequestListOutput, FormListInput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, WorkspaceCreateInput, WorkspaceDestroyInput, VcsGetInput, VcsGetOutput, VcsStatusInput, VcsStatusOutput, VcsBranchesInput, VcsBranchesOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } from "./types.js";
2
2
  export interface ClientOptions {
3
3
  readonly baseUrl: string;
4
4
  readonly fetch?: typeof globalThis.fetch;
@@ -191,6 +191,18 @@ export declare function make(options: ClientOptions): {
191
191
  token: (input: PtyConnectTokenInput, requestOptions?: RequestOptions) => Promise<PtyConnectTokenOutput>;
192
192
  };
193
193
  };
194
+ experimental: {
195
+ persistentPty: {
196
+ list: (input: ExperimentalPersistentPtyListInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PersistentPtyInfo[]>;
197
+ create: (input: ExperimentalPersistentPtyCreateInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PersistentPtyInfo>;
198
+ shutdown: (requestOptions?: RequestOptions) => Promise<void>;
199
+ get: (input: ExperimentalPersistentPtyGetInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PersistentPtyInfo>;
200
+ update: (input: ExperimentalPersistentPtyUpdateInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PersistentPtyInfo>;
201
+ snapshot: (input: ExperimentalPersistentPtySnapshotInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PersistentPtySnapshot>;
202
+ remove: (input: ExperimentalPersistentPtyRemoveInput, requestOptions?: RequestOptions) => Promise<void>;
203
+ connectToken: (input: ExperimentalPersistentPtyConnectTokenInput, requestOptions?: RequestOptions) => Promise<import("./types.js").PtyTicketConnectToken>;
204
+ };
205
+ };
194
206
  shell: {
195
207
  list: (input?: ShellListInput, requestOptions?: RequestOptions) => Promise<ShellListOutput>;
196
208
  create: (input: ShellCreateInput, requestOptions?: RequestOptions) => Promise<ShellCreateOutput>;
@@ -999,6 +999,76 @@ export function make(options) {
999
999
  }, requestOptions),
1000
1000
  },
1001
1001
  },
1002
+ experimental: {
1003
+ persistentPty: {
1004
+ list: (input, requestOptions) => request({
1005
+ method: "GET",
1006
+ path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal`,
1007
+ successStatus: 200,
1008
+ declaredStatuses: [400, 503, 401],
1009
+ empty: false,
1010
+ }, requestOptions).then((value) => value.data),
1011
+ create: (input, requestOptions) => request({
1012
+ method: "POST",
1013
+ path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal`,
1014
+ body: {
1015
+ command: input["command"],
1016
+ args: input["args"],
1017
+ cwd: input["cwd"],
1018
+ title: input["title"],
1019
+ env: input["env"],
1020
+ size: input["size"],
1021
+ },
1022
+ successStatus: 200,
1023
+ declaredStatuses: [400, 503, 401],
1024
+ empty: false,
1025
+ }, requestOptions).then((value) => value.data),
1026
+ shutdown: (requestOptions) => request({
1027
+ method: "POST",
1028
+ path: `/api/experimental/persistent-pty/shutdown`,
1029
+ successStatus: 204,
1030
+ declaredStatuses: [503, 401, 400],
1031
+ empty: true,
1032
+ }, requestOptions),
1033
+ get: (input, requestOptions) => request({
1034
+ method: "GET",
1035
+ path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
1036
+ successStatus: 200,
1037
+ declaredStatuses: [404, 503, 401, 400],
1038
+ empty: false,
1039
+ }, requestOptions).then((value) => value.data),
1040
+ update: (input, requestOptions) => request({
1041
+ method: "PUT",
1042
+ path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
1043
+ body: { attachmentID: input["attachmentID"], size: input["size"] },
1044
+ successStatus: 200,
1045
+ declaredStatuses: [404, 503, 401, 400],
1046
+ empty: false,
1047
+ }, requestOptions).then((value) => value.data),
1048
+ snapshot: (input, requestOptions) => request({
1049
+ method: "GET",
1050
+ path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/snapshot`,
1051
+ successStatus: 200,
1052
+ declaredStatuses: [404, 503, 401, 400],
1053
+ empty: false,
1054
+ }, requestOptions).then((value) => value.data),
1055
+ remove: (input, requestOptions) => request({
1056
+ method: "DELETE",
1057
+ path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
1058
+ successStatus: 204,
1059
+ declaredStatuses: [404, 503, 401, 400],
1060
+ empty: true,
1061
+ }, requestOptions),
1062
+ connectToken: (input, requestOptions) => request({
1063
+ method: "POST",
1064
+ path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/connect-token`,
1065
+ headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
1066
+ successStatus: 200,
1067
+ declaredStatuses: [403, 404, 503, 401, 400],
1068
+ empty: false,
1069
+ }, requestOptions).then((value) => value.data),
1070
+ },
1071
+ },
1002
1072
  shell: {
1003
1073
  list: (input, requestOptions) => request({
1004
1074
  method: "GET",
@@ -503,6 +503,26 @@ export type Pty = {
503
503
  pid: number;
504
504
  exitCode?: number;
505
505
  };
506
+ export type PersistentPtyInfo = {
507
+ id: string;
508
+ title: string;
509
+ command: string;
510
+ args: Array<string>;
511
+ cwd: string;
512
+ status: "running" | "exited";
513
+ pid: number;
514
+ exitCode?: number;
515
+ sessionID: string;
516
+ foregroundProcess: string | null;
517
+ size: {
518
+ cols: number;
519
+ rows: number;
520
+ };
521
+ output: {
522
+ head: number;
523
+ tail: number;
524
+ };
525
+ };
506
526
  export type FormMetadata1 = {
507
527
  [x: string]: any;
508
528
  };
@@ -1576,6 +1596,19 @@ export type PtyDeleted = {
1576
1596
  id: string;
1577
1597
  };
1578
1598
  };
1599
+ export type PersistentPtyRemoved = {
1600
+ id: string;
1601
+ created: number;
1602
+ metadata?: {
1603
+ [x: string]: any;
1604
+ };
1605
+ type: "persistent-pty.removed";
1606
+ location?: LocationRef;
1607
+ data: {
1608
+ sessionID: string;
1609
+ ptyID: string;
1610
+ };
1611
+ };
1579
1612
  export type ShellExited = {
1580
1613
  id: string;
1581
1614
  created: number;
@@ -2109,6 +2142,28 @@ export type PtyUpdated = {
2109
2142
  info: Pty;
2110
2143
  };
2111
2144
  };
2145
+ export type PersistentPtyAdded = {
2146
+ id: string;
2147
+ created: number;
2148
+ metadata?: {
2149
+ [x: string]: any;
2150
+ };
2151
+ type: "persistent-pty.added";
2152
+ location?: LocationRef;
2153
+ data: {
2154
+ sessionID: string;
2155
+ terminal: PersistentPtyInfo;
2156
+ };
2157
+ };
2158
+ export type PersistentPtySnapshot = {
2159
+ info: PersistentPtyInfo;
2160
+ text: string;
2161
+ checkpoint: string;
2162
+ cursor: {
2163
+ x: number;
2164
+ y: number;
2165
+ };
2166
+ };
2112
2167
  export type FormStringField1 = {
2113
2168
  key: string;
2114
2169
  title?: string;
@@ -2884,7 +2939,7 @@ export type IntegrationInfo = {
2884
2939
  methods: Array<IntegrationMethod>;
2885
2940
  connections: Array<ConnectionInfo>;
2886
2941
  };
2887
- export type V2Event = ModelsDevRefreshed | IntegrationUpdated | IntegrationConnectionUpdated | CatalogUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionViewed | SessionUsageUpdated | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextDelta | SessionTextEnded | SessionReasoningStarted | SessionReasoningDelta | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputDelta | SessionToolInputEnded | SessionToolCalled | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | PluginAdded | PluginUpdated | WorktreeUpdated | WorktreeResolved | CommandUpdated | ConfigUpdated | SkillUpdated | PtyCreated | PtyUpdated | PtyExited | PtyDeleted | ShellCreated | ShellExited | ShellDeleted | FormCreated | FormReplied | FormCancelled | WebsearchUpdated | SessionStatusUpdated | SessionIdle | TuiPromptAppend | TuiCommandExecute | TuiToastShow | TuiSessionSelect | InstallationUpdated | InstallationUpdateAvailable | VcsBranchUpdated | McpStatusChanged | McpResourcesChanged | V2EventServerConnected;
2942
+ export type V2Event = ModelsDevRefreshed | IntegrationUpdated | IntegrationConnectionUpdated | CatalogUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionViewed | SessionUsageUpdated | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextDelta | SessionTextEnded | SessionReasoningStarted | SessionReasoningDelta | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputDelta | SessionToolInputEnded | SessionToolCalled | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | PluginAdded | PluginUpdated | WorktreeUpdated | WorktreeResolved | CommandUpdated | ConfigUpdated | SkillUpdated | PtyCreated | PtyUpdated | PtyExited | PtyDeleted | PersistentPtyAdded | PersistentPtyRemoved | ShellCreated | ShellExited | ShellDeleted | FormCreated | FormReplied | FormCancelled | WebsearchUpdated | SessionStatusUpdated | SessionIdle | TuiPromptAppend | TuiCommandExecute | TuiToastShow | TuiSessionSelect | InstallationUpdated | InstallationUpdateAvailable | VcsBranchUpdated | McpStatusChanged | McpResourcesChanged | V2EventServerConnected;
2888
2943
  export type UnauthorizedError = {
2889
2944
  readonly _tag: "UnauthorizedError";
2890
2945
  readonly message: string;
@@ -7419,6 +7474,156 @@ export type PtyConnectTokenOutput = {
7419
7474
  };
7420
7475
  data: PtyTicketConnectToken;
7421
7476
  };
7477
+ export type ExperimentalPersistentPtyListInput = {
7478
+ readonly sessionID: {
7479
+ readonly sessionID: string;
7480
+ }["sessionID"];
7481
+ };
7482
+ export type ExperimentalPersistentPtyListOutput = {
7483
+ data: Array<PersistentPtyInfo>;
7484
+ }["data"];
7485
+ export type ExperimentalPersistentPtyCreateInput = {
7486
+ readonly sessionID: {
7487
+ readonly sessionID: string;
7488
+ }["sessionID"];
7489
+ readonly command: {
7490
+ readonly command: string;
7491
+ readonly args: ReadonlyArray<string>;
7492
+ readonly cwd: string;
7493
+ readonly title: string;
7494
+ readonly env: {
7495
+ readonly [x: string]: string;
7496
+ };
7497
+ readonly size?: {
7498
+ readonly cols: number;
7499
+ readonly rows: number;
7500
+ };
7501
+ }["command"];
7502
+ readonly args: {
7503
+ readonly command: string;
7504
+ readonly args: ReadonlyArray<string>;
7505
+ readonly cwd: string;
7506
+ readonly title: string;
7507
+ readonly env: {
7508
+ readonly [x: string]: string;
7509
+ };
7510
+ readonly size?: {
7511
+ readonly cols: number;
7512
+ readonly rows: number;
7513
+ };
7514
+ }["args"];
7515
+ readonly cwd: {
7516
+ readonly command: string;
7517
+ readonly args: ReadonlyArray<string>;
7518
+ readonly cwd: string;
7519
+ readonly title: string;
7520
+ readonly env: {
7521
+ readonly [x: string]: string;
7522
+ };
7523
+ readonly size?: {
7524
+ readonly cols: number;
7525
+ readonly rows: number;
7526
+ };
7527
+ }["cwd"];
7528
+ readonly title: {
7529
+ readonly command: string;
7530
+ readonly args: ReadonlyArray<string>;
7531
+ readonly cwd: string;
7532
+ readonly title: string;
7533
+ readonly env: {
7534
+ readonly [x: string]: string;
7535
+ };
7536
+ readonly size?: {
7537
+ readonly cols: number;
7538
+ readonly rows: number;
7539
+ };
7540
+ }["title"];
7541
+ readonly env: {
7542
+ readonly command: string;
7543
+ readonly args: ReadonlyArray<string>;
7544
+ readonly cwd: string;
7545
+ readonly title: string;
7546
+ readonly env: {
7547
+ readonly [x: string]: string;
7548
+ };
7549
+ readonly size?: {
7550
+ readonly cols: number;
7551
+ readonly rows: number;
7552
+ };
7553
+ }["env"];
7554
+ readonly size?: {
7555
+ readonly command: string;
7556
+ readonly args: ReadonlyArray<string>;
7557
+ readonly cwd: string;
7558
+ readonly title: string;
7559
+ readonly env: {
7560
+ readonly [x: string]: string;
7561
+ };
7562
+ readonly size?: {
7563
+ readonly cols: number;
7564
+ readonly rows: number;
7565
+ };
7566
+ }["size"];
7567
+ };
7568
+ export type ExperimentalPersistentPtyCreateOutput = {
7569
+ data: PersistentPtyInfo;
7570
+ }["data"];
7571
+ export type ExperimentalPersistentPtyShutdownOutput = void;
7572
+ export type ExperimentalPersistentPtyGetInput = {
7573
+ readonly ptyID: {
7574
+ readonly ptyID: string;
7575
+ }["ptyID"];
7576
+ };
7577
+ export type ExperimentalPersistentPtyGetOutput = {
7578
+ data: PersistentPtyInfo;
7579
+ }["data"];
7580
+ export type ExperimentalPersistentPtyUpdateInput = {
7581
+ readonly ptyID: {
7582
+ readonly ptyID: string;
7583
+ }["ptyID"];
7584
+ readonly attachmentID?: {
7585
+ readonly attachmentID?: string;
7586
+ readonly size: {
7587
+ readonly cols: number;
7588
+ readonly rows: number;
7589
+ };
7590
+ }["attachmentID"];
7591
+ readonly size: {
7592
+ readonly attachmentID?: string;
7593
+ readonly size: {
7594
+ readonly cols: number;
7595
+ readonly rows: number;
7596
+ };
7597
+ }["size"];
7598
+ };
7599
+ export type ExperimentalPersistentPtyUpdateOutput = {
7600
+ data: PersistentPtyInfo;
7601
+ }["data"];
7602
+ export type ExperimentalPersistentPtySnapshotInput = {
7603
+ readonly ptyID: {
7604
+ readonly ptyID: string;
7605
+ }["ptyID"];
7606
+ };
7607
+ export type ExperimentalPersistentPtySnapshotOutput = {
7608
+ data: PersistentPtySnapshot;
7609
+ }["data"];
7610
+ export type ExperimentalPersistentPtyRemoveInput = {
7611
+ readonly ptyID: {
7612
+ readonly ptyID: string;
7613
+ }["ptyID"];
7614
+ };
7615
+ export type ExperimentalPersistentPtyRemoveOutput = void;
7616
+ export type ExperimentalPersistentPtyConnectTokenInput = {
7617
+ readonly ptyID: {
7618
+ readonly ptyID: string;
7619
+ }["ptyID"];
7620
+ readonly "x-opencode-ticket"?: {
7621
+ readonly "x-opencode-ticket"?: string | undefined;
7622
+ }["x-opencode-ticket"];
7623
+ };
7624
+ export type ExperimentalPersistentPtyConnectTokenOutput = {
7625
+ data: PtyTicketConnectToken;
7626
+ }["data"];
7422
7627
  export type ShellListInput = {
7423
7628
  readonly location?: {
7424
7629
  readonly location?: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/client",
4
- "version": "0.0.0-dev-18198",
4
+ "version": "0.0.0-dev-18202",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -57,8 +57,8 @@
57
57
  "typecheck": "tsgo --noEmit"
58
58
  },
59
59
  "dependencies": {
60
- "@opencode-ai/schema": "0.0.0-dev-18198",
61
- "@opencode-ai/protocol": "0.0.0-dev-18198"
60
+ "@opencode-ai/schema": "0.0.0-dev-18202",
61
+ "@opencode-ai/protocol": "0.0.0-dev-18202"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "effect": "4.0.0-rc.111",
@@ -74,7 +74,7 @@
74
74
  },
75
75
  "devDependencies": {
76
76
  "@effect/platform-node": "4.0.0-rc.111",
77
- "@opencode-ai/httpapi-codegen": "0.0.0-dev-18198",
77
+ "@opencode-ai/httpapi-codegen": "0.0.0-dev-18202",
78
78
  "@tsconfig/bun": "1.0.9",
79
79
  "@types/bun": "1.3.13",
80
80
  "@typescript/native-preview": "7.0.0-dev.20251207.1",