@ex-machina/opencode-sdk 1.2.27002 → 1.3.2001

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.
@@ -1,5 +1,5 @@
1
1
  import { type Client, type Options as Options2, type TDataShape } from "./client/index.js";
2
- import type { AgentPartInput, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListResponses, Config as Config3, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiSessionSelect, EventTuiToastShow, ExperimentalResourceListResponses, ExperimentalSessionListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, FileListResponses, FilePartInput, FilePartSource, FileReadResponses, FileStatusResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, InstanceDisposeResponses, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetResponses, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, ProjectCurrentResponses, ProjectInitGitResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionAskErrors, QuestionAskInput, QuestionAskResponses, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteMessageErrors, SessionDeleteMessageResponses, SessionDeleteResponses, SessionDiffResponses, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SubtaskPartInput, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptResponses, TuiControlNextResponses, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpResponses, TuiOpenModelsResponses, TuiOpenSessionsResponses, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastResponses, TuiSubmitPromptResponses, VcsGetResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeListResponses, WorktreeRemoveErrors, WorktreeRemoveInput, WorktreeRemoveResponses, WorktreeResetErrors, WorktreeResetInput, WorktreeResetResponses } from "./types.gen.js";
2
+ import type { AgentPartInput, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListResponses, Config as Config3, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiSessionSelect, EventTuiToastShow, ExperimentalResourceListResponses, ExperimentalSessionListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, FileListResponses, FilePartInput, FilePartSource, FileReadResponses, FileStatusResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, GlobalSyncEventSubscribeResponses, GlobalUpgradeErrors, GlobalUpgradeResponses, InstanceDisposeResponses, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetResponses, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, ProjectCurrentResponses, ProjectInitGitResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionAskErrors, QuestionAskInput, QuestionAskResponses, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteMessageErrors, SessionDeleteMessageResponses, SessionDeleteResponses, SessionDiffResponses, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SubtaskPartInput, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptResponses, TuiControlNextResponses, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpResponses, TuiOpenModelsResponses, TuiOpenSessionsResponses, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastResponses, TuiSubmitPromptResponses, VcsDiffResponses, VcsGetResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeListResponses, WorktreeRemoveErrors, WorktreeRemoveInput, WorktreeRemoveResponses, WorktreeResetErrors, WorktreeResetInput, WorktreeResetResponses } from "./types.gen.js";
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -25,6 +25,14 @@ declare class HeyApiRegistry<T> {
25
25
  get(key?: string): T;
26
26
  set(value: T, key?: string): void;
27
27
  }
28
+ export declare class SyncEvent extends HeyApiClient {
29
+ /**
30
+ * Subscribe to global sync events
31
+ *
32
+ * Get global sync events
33
+ */
34
+ subscribe<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<GlobalSyncEventSubscribeResponses, unknown>>;
35
+ }
28
36
  export declare class Config extends HeyApiClient {
29
37
  /**
30
38
  * Get global configuration
@@ -60,6 +68,16 @@ export declare class Global extends HeyApiClient {
60
68
  * Clean up and dispose all OpenCode instances, releasing all resources.
61
69
  */
62
70
  dispose<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalDisposeResponses, unknown, ThrowOnError, "fields">;
71
+ /**
72
+ * Upgrade opencode
73
+ *
74
+ * Upgrade opencode to the specified version or latest if not specified.
75
+ */
76
+ upgrade<ThrowOnError extends boolean = false>(parameters?: {
77
+ target?: string;
78
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalUpgradeResponses, GlobalUpgradeErrors, ThrowOnError, "fields">;
79
+ private _syncEvent?;
80
+ get syncEvent(): SyncEvent;
63
81
  private _config?;
64
82
  get config(): Config;
65
83
  }
@@ -794,6 +812,9 @@ export declare class Oauth extends HeyApiClient {
794
812
  directory?: string;
795
813
  workspace?: string;
796
814
  method?: number;
815
+ inputs?: {
816
+ [key: string]: string;
817
+ };
797
818
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderOauthAuthorizeResponses, ProviderOauthAuthorizeErrors, ThrowOnError, "fields">;
798
819
  /**
799
820
  * OAuth callback
@@ -896,6 +917,17 @@ export declare class File extends HeyApiClient {
896
917
  workspace?: string;
897
918
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileStatusResponses, unknown, ThrowOnError, "fields">;
898
919
  }
920
+ export declare class Event extends HeyApiClient {
921
+ /**
922
+ * Subscribe to events
923
+ *
924
+ * Get events
925
+ */
926
+ subscribe<ThrowOnError extends boolean = false>(parameters?: {
927
+ directory?: string;
928
+ workspace?: string;
929
+ }, options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<EventSubscribeResponses, unknown>>;
930
+ }
899
931
  export declare class Auth2 extends HeyApiClient {
900
932
  /**
901
933
  * Remove MCP OAuth
@@ -1143,6 +1175,16 @@ export declare class Vcs extends HeyApiClient {
1143
1175
  directory?: string;
1144
1176
  workspace?: string;
1145
1177
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsGetResponses, unknown, ThrowOnError, "fields">;
1178
+ /**
1179
+ * Get VCS diff
1180
+ *
1181
+ * Retrieve the current git diff for the working tree or against the default branch.
1182
+ */
1183
+ diff<ThrowOnError extends boolean = false>(parameters: {
1184
+ directory?: string;
1185
+ workspace?: string;
1186
+ mode: "git" | "branch";
1187
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsDiffResponses, unknown, ThrowOnError, "fields">;
1146
1188
  }
1147
1189
  export declare class Command extends HeyApiClient {
1148
1190
  /**
@@ -1212,17 +1254,6 @@ export declare class Formatter extends HeyApiClient {
1212
1254
  workspace?: string;
1213
1255
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FormatterStatusResponses, unknown, ThrowOnError, "fields">;
1214
1256
  }
1215
- export declare class Event extends HeyApiClient {
1216
- /**
1217
- * Subscribe to events
1218
- *
1219
- * Get events
1220
- */
1221
- subscribe<ThrowOnError extends boolean = false>(parameters?: {
1222
- directory?: string;
1223
- workspace?: string;
1224
- }, options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<EventSubscribeResponses, unknown>>;
1225
- }
1226
1257
  export declare class OpencodeClient extends HeyApiClient {
1227
1258
  static readonly __registry: HeyApiRegistry<OpencodeClient>;
1228
1259
  constructor(args?: {
@@ -1259,6 +1290,8 @@ export declare class OpencodeClient extends HeyApiClient {
1259
1290
  get find(): Find;
1260
1291
  private _file?;
1261
1292
  get file(): File;
1293
+ private _event?;
1294
+ get event(): Event;
1262
1295
  private _mcp?;
1263
1296
  get mcp(): Mcp;
1264
1297
  private _tui?;
@@ -1277,7 +1310,5 @@ export declare class OpencodeClient extends HeyApiClient {
1277
1310
  get lsp(): Lsp;
1278
1311
  private _formatter?;
1279
1312
  get formatter(): Formatter;
1280
- private _event?;
1281
- get event(): Event;
1282
1313
  }
1283
1314
  export {};
@@ -21,6 +21,19 @@ class HeyApiRegistry {
21
21
  this.instances.set(key ?? this.defaultKey, value);
22
22
  }
23
23
  }
24
+ export class SyncEvent extends HeyApiClient {
25
+ /**
26
+ * Subscribe to global sync events
27
+ *
28
+ * Get global sync events
29
+ */
30
+ subscribe(options) {
31
+ return (options?.client ?? this.client).sse.get({
32
+ url: "/global/sync-event",
33
+ ...options,
34
+ });
35
+ }
36
+ }
24
37
  export class Config extends HeyApiClient {
25
38
  /**
26
39
  * Get global configuration
@@ -86,6 +99,28 @@ export class Global extends HeyApiClient {
86
99
  ...options,
87
100
  });
88
101
  }
102
+ /**
103
+ * Upgrade opencode
104
+ *
105
+ * Upgrade opencode to the specified version or latest if not specified.
106
+ */
107
+ upgrade(parameters, options) {
108
+ const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "target" }] }]);
109
+ return (options?.client ?? this.client).post({
110
+ url: "/global/upgrade",
111
+ ...options,
112
+ ...params,
113
+ headers: {
114
+ "Content-Type": "application/json",
115
+ ...options?.headers,
116
+ ...params.headers,
117
+ },
118
+ });
119
+ }
120
+ _syncEvent;
121
+ get syncEvent() {
122
+ return (this._syncEvent ??= new SyncEvent({ client: this.client }));
123
+ }
89
124
  _config;
90
125
  get config() {
91
126
  return (this._config ??= new Config({ client: this.client }));
@@ -1558,6 +1593,7 @@ export class Oauth extends HeyApiClient {
1558
1593
  { in: "query", key: "directory" },
1559
1594
  { in: "query", key: "workspace" },
1560
1595
  { in: "body", key: "method" },
1596
+ { in: "body", key: "inputs" },
1561
1597
  ],
1562
1598
  },
1563
1599
  ]);
@@ -1779,6 +1815,28 @@ export class File extends HeyApiClient {
1779
1815
  });
1780
1816
  }
1781
1817
  }
1818
+ export class Event extends HeyApiClient {
1819
+ /**
1820
+ * Subscribe to events
1821
+ *
1822
+ * Get events
1823
+ */
1824
+ subscribe(parameters, options) {
1825
+ const params = buildClientParams([parameters], [
1826
+ {
1827
+ args: [
1828
+ { in: "query", key: "directory" },
1829
+ { in: "query", key: "workspace" },
1830
+ ],
1831
+ },
1832
+ ]);
1833
+ return (options?.client ?? this.client).sse.get({
1834
+ url: "/event",
1835
+ ...options,
1836
+ ...params,
1837
+ });
1838
+ }
1839
+ }
1782
1840
  export class Auth2 extends HeyApiClient {
1783
1841
  /**
1784
1842
  * Remove MCP OAuth
@@ -2334,6 +2392,27 @@ export class Vcs extends HeyApiClient {
2334
2392
  ...params,
2335
2393
  });
2336
2394
  }
2395
+ /**
2396
+ * Get VCS diff
2397
+ *
2398
+ * Retrieve the current git diff for the working tree or against the default branch.
2399
+ */
2400
+ diff(parameters, options) {
2401
+ const params = buildClientParams([parameters], [
2402
+ {
2403
+ args: [
2404
+ { in: "query", key: "directory" },
2405
+ { in: "query", key: "workspace" },
2406
+ { in: "query", key: "mode" },
2407
+ ],
2408
+ },
2409
+ ]);
2410
+ return (options?.client ?? this.client).get({
2411
+ url: "/vcs/diff",
2412
+ ...options,
2413
+ ...params,
2414
+ });
2415
+ }
2337
2416
  }
2338
2417
  export class Command extends HeyApiClient {
2339
2418
  /**
@@ -2472,28 +2551,6 @@ export class Formatter extends HeyApiClient {
2472
2551
  });
2473
2552
  }
2474
2553
  }
2475
- export class Event extends HeyApiClient {
2476
- /**
2477
- * Subscribe to events
2478
- *
2479
- * Get events
2480
- */
2481
- subscribe(parameters, options) {
2482
- const params = buildClientParams([parameters], [
2483
- {
2484
- args: [
2485
- { in: "query", key: "directory" },
2486
- { in: "query", key: "workspace" },
2487
- ],
2488
- },
2489
- ]);
2490
- return (options?.client ?? this.client).sse.get({
2491
- url: "/event",
2492
- ...options,
2493
- ...params,
2494
- });
2495
- }
2496
- }
2497
2554
  export class OpencodeClient extends HeyApiClient {
2498
2555
  static __registry = new HeyApiRegistry();
2499
2556
  constructor(args) {
@@ -2560,6 +2617,10 @@ export class OpencodeClient extends HeyApiClient {
2560
2617
  get file() {
2561
2618
  return (this._file ??= new File({ client: this.client }));
2562
2619
  }
2620
+ _event;
2621
+ get event() {
2622
+ return (this._event ??= new Event({ client: this.client }));
2623
+ }
2563
2624
  _mcp;
2564
2625
  get mcp() {
2565
2626
  return (this._mcp ??= new Mcp({ client: this.client }));
@@ -2596,8 +2657,4 @@ export class OpencodeClient extends HeyApiClient {
2596
2657
  get formatter() {
2597
2658
  return (this._formatter ??= new Formatter({ client: this.client }));
2598
2659
  }
2599
- _event;
2600
- get event() {
2601
- return (this._event ??= new Event({ client: this.client }));
2602
- }
2603
2660
  }
@@ -46,6 +46,90 @@ export type EventServerInstanceDisposed = {
46
46
  directory: string;
47
47
  };
48
48
  };
49
+ export type EventServerConnected = {
50
+ type: "server.connected";
51
+ properties: {
52
+ [key: string]: unknown;
53
+ };
54
+ };
55
+ export type EventGlobalDisposed = {
56
+ type: "global.disposed";
57
+ properties: {
58
+ [key: string]: unknown;
59
+ };
60
+ };
61
+ export type EventLspClientDiagnostics = {
62
+ type: "lsp.client.diagnostics";
63
+ properties: {
64
+ serverID: string;
65
+ path: string;
66
+ };
67
+ };
68
+ export type EventLspUpdated = {
69
+ type: "lsp.updated";
70
+ properties: {
71
+ [key: string]: unknown;
72
+ };
73
+ };
74
+ export type EventMessagePartDelta = {
75
+ type: "message.part.delta";
76
+ properties: {
77
+ sessionID: string;
78
+ messageID: string;
79
+ partID: string;
80
+ field: string;
81
+ delta: string;
82
+ };
83
+ };
84
+ export type PermissionRequest = {
85
+ id: string;
86
+ sessionID: string;
87
+ permission: string;
88
+ patterns: Array<string>;
89
+ metadata: {
90
+ [key: string]: unknown;
91
+ };
92
+ always: Array<string>;
93
+ tool?: {
94
+ messageID: string;
95
+ callID: string;
96
+ };
97
+ };
98
+ export type EventPermissionAsked = {
99
+ type: "permission.asked";
100
+ properties: PermissionRequest;
101
+ };
102
+ export type EventPermissionReplied = {
103
+ type: "permission.replied";
104
+ properties: {
105
+ sessionID: string;
106
+ requestID: string;
107
+ reply: "once" | "always" | "reject";
108
+ };
109
+ };
110
+ export type SessionStatus = {
111
+ type: "idle";
112
+ } | {
113
+ type: "retry";
114
+ attempt: number;
115
+ message: string;
116
+ next: number;
117
+ } | {
118
+ type: "busy";
119
+ };
120
+ export type EventSessionStatus = {
121
+ type: "session.status";
122
+ properties: {
123
+ sessionID: string;
124
+ status: SessionStatus;
125
+ };
126
+ };
127
+ export type EventSessionIdle = {
128
+ type: "session.idle";
129
+ properties: {
130
+ sessionID: string;
131
+ };
132
+ };
49
133
  export type QuestionOption = {
50
134
  /**
51
135
  * Display text (1-5 words, concise)
@@ -110,30 +194,16 @@ export type EventQuestionRejected = {
110
194
  requestID: string;
111
195
  };
112
196
  };
113
- export type PermissionRequest = {
114
- id: string;
115
- sessionID: string;
116
- permission: string;
117
- patterns: Array<string>;
118
- metadata: {
119
- [key: string]: unknown;
120
- };
121
- always: Array<string>;
122
- tool?: {
123
- messageID: string;
124
- callID: string;
197
+ export type EventSessionCompacted = {
198
+ type: "session.compacted";
199
+ properties: {
200
+ sessionID: string;
125
201
  };
126
202
  };
127
- export type EventPermissionAsked = {
128
- type: "permission.asked";
129
- properties: PermissionRequest;
130
- };
131
- export type EventPermissionReplied = {
132
- type: "permission.replied";
203
+ export type EventFileEdited = {
204
+ type: "file.edited";
133
205
  properties: {
134
- sessionID: string;
135
- requestID: string;
136
- reply: "once" | "always" | "reject";
206
+ file: string;
137
207
  };
138
208
  };
139
209
  export type EventFileWatcherUpdated = {
@@ -143,55 +213,82 @@ export type EventFileWatcherUpdated = {
143
213
  event: "add" | "change" | "unlink";
144
214
  };
145
215
  };
146
- export type EventVcsBranchUpdated = {
147
- type: "vcs.branch.updated";
216
+ export type Todo = {
217
+ /**
218
+ * Brief description of the task
219
+ */
220
+ content: string;
221
+ /**
222
+ * Current status of the task: pending, in_progress, completed, cancelled
223
+ */
224
+ status: string;
225
+ /**
226
+ * Priority level of the task: high, medium, low
227
+ */
228
+ priority: string;
229
+ };
230
+ export type EventTodoUpdated = {
231
+ type: "todo.updated";
148
232
  properties: {
149
- branch?: string;
233
+ sessionID: string;
234
+ todos: Array<Todo>;
150
235
  };
151
236
  };
152
- export type EventFileEdited = {
153
- type: "file.edited";
237
+ export type EventTuiPromptAppend = {
238
+ type: "tui.prompt.append";
154
239
  properties: {
155
- file: string;
240
+ text: string;
156
241
  };
157
242
  };
158
- export type EventServerConnected = {
159
- type: "server.connected";
243
+ export type EventTuiCommandExecute = {
244
+ type: "tui.command.execute";
160
245
  properties: {
161
- [key: string]: unknown;
246
+ command: "session.list" | "session.new" | "session.share" | "session.interrupt" | "session.compact" | "session.page.up" | "session.page.down" | "session.line.up" | "session.line.down" | "session.half.page.up" | "session.half.page.down" | "session.first" | "session.last" | "prompt.clear" | "prompt.submit" | "agent.cycle" | string;
162
247
  };
163
248
  };
164
- export type EventGlobalDisposed = {
165
- type: "global.disposed";
249
+ export type EventTuiToastShow = {
250
+ type: "tui.toast.show";
166
251
  properties: {
167
- [key: string]: unknown;
252
+ title?: string;
253
+ message: string;
254
+ variant: "info" | "success" | "warning" | "error";
255
+ /**
256
+ * Duration in milliseconds
257
+ */
258
+ duration?: number;
168
259
  };
169
260
  };
170
- export type EventLspClientDiagnostics = {
171
- type: "lsp.client.diagnostics";
261
+ export type EventTuiSessionSelect = {
262
+ type: "tui.session.select";
172
263
  properties: {
173
- serverID: string;
174
- path: string;
264
+ /**
265
+ * Session ID to navigate to
266
+ */
267
+ sessionID: string;
175
268
  };
176
269
  };
177
- export type EventLspUpdated = {
178
- type: "lsp.updated";
270
+ export type EventMcpToolsChanged = {
271
+ type: "mcp.tools.changed";
179
272
  properties: {
180
- [key: string]: unknown;
273
+ server: string;
181
274
  };
182
275
  };
183
- export type OutputFormatText = {
184
- type: "text";
185
- };
186
- export type JsonSchema = {
187
- [key: string]: unknown;
276
+ export type EventMcpBrowserOpenFailed = {
277
+ type: "mcp.browser.open.failed";
278
+ properties: {
279
+ mcpName: string;
280
+ url: string;
281
+ };
188
282
  };
189
- export type OutputFormatJsonSchema = {
190
- type: "json_schema";
191
- schema: JsonSchema;
192
- retryCount?: number;
283
+ export type EventCommandExecuted = {
284
+ type: "command.executed";
285
+ properties: {
286
+ name: string;
287
+ sessionID: string;
288
+ arguments: string;
289
+ messageID: string;
290
+ };
193
291
  };
194
- export type OutputFormat = OutputFormatText | OutputFormatJsonSchema;
195
292
  export type FileDiff = {
196
293
  file: string;
197
294
  before: string;
@@ -200,29 +297,12 @@ export type FileDiff = {
200
297
  deletions: number;
201
298
  status?: "added" | "deleted" | "modified";
202
299
  };
203
- export type UserMessage = {
204
- id: string;
205
- sessionID: string;
206
- role: "user";
207
- time: {
208
- created: number;
209
- };
210
- format?: OutputFormat;
211
- summary?: {
212
- title?: string;
213
- body?: string;
214
- diffs: Array<FileDiff>;
215
- };
216
- agent: string;
217
- model: {
218
- providerID: string;
219
- modelID: string;
220
- };
221
- system?: string;
222
- tools?: {
223
- [key: string]: boolean;
300
+ export type EventSessionDiff = {
301
+ type: "session.diff";
302
+ properties: {
303
+ sessionID: string;
304
+ diff: Array<FileDiff>;
224
305
  };
225
- variant?: string;
226
306
  };
227
307
  export type ProviderAuthError = {
228
308
  name: "ProviderAuthError";
@@ -278,6 +358,114 @@ export type ApiError = {
278
358
  };
279
359
  };
280
360
  };
361
+ export type EventSessionError = {
362
+ type: "session.error";
363
+ properties: {
364
+ sessionID?: string;
365
+ error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ApiError;
366
+ };
367
+ };
368
+ export type EventVcsBranchUpdated = {
369
+ type: "vcs.branch.updated";
370
+ properties: {
371
+ branch?: string;
372
+ };
373
+ };
374
+ export type EventWorkspaceReady = {
375
+ type: "workspace.ready";
376
+ properties: {
377
+ name: string;
378
+ };
379
+ };
380
+ export type EventWorkspaceFailed = {
381
+ type: "workspace.failed";
382
+ properties: {
383
+ message: string;
384
+ };
385
+ };
386
+ export type Pty = {
387
+ id: string;
388
+ title: string;
389
+ command: string;
390
+ args: Array<string>;
391
+ cwd: string;
392
+ status: "running" | "exited";
393
+ pid: number;
394
+ };
395
+ export type EventPtyCreated = {
396
+ type: "pty.created";
397
+ properties: {
398
+ info: Pty;
399
+ };
400
+ };
401
+ export type EventPtyUpdated = {
402
+ type: "pty.updated";
403
+ properties: {
404
+ info: Pty;
405
+ };
406
+ };
407
+ export type EventPtyExited = {
408
+ type: "pty.exited";
409
+ properties: {
410
+ id: string;
411
+ exitCode: number;
412
+ };
413
+ };
414
+ export type EventPtyDeleted = {
415
+ type: "pty.deleted";
416
+ properties: {
417
+ id: string;
418
+ };
419
+ };
420
+ export type EventWorktreeReady = {
421
+ type: "worktree.ready";
422
+ properties: {
423
+ name: string;
424
+ branch: string;
425
+ };
426
+ };
427
+ export type EventWorktreeFailed = {
428
+ type: "worktree.failed";
429
+ properties: {
430
+ message: string;
431
+ };
432
+ };
433
+ export type OutputFormatText = {
434
+ type: "text";
435
+ };
436
+ export type JsonSchema = {
437
+ [key: string]: unknown;
438
+ };
439
+ export type OutputFormatJsonSchema = {
440
+ type: "json_schema";
441
+ schema: JsonSchema;
442
+ retryCount?: number;
443
+ };
444
+ export type OutputFormat = OutputFormatText | OutputFormatJsonSchema;
445
+ export type UserMessage = {
446
+ id: string;
447
+ sessionID: string;
448
+ role: "user";
449
+ time: {
450
+ created: number;
451
+ };
452
+ format?: OutputFormat;
453
+ summary?: {
454
+ title?: string;
455
+ body?: string;
456
+ diffs: Array<FileDiff>;
457
+ };
458
+ agent: string;
459
+ model: {
460
+ providerID: string;
461
+ modelID: string;
462
+ };
463
+ system?: string;
464
+ tools?: {
465
+ [key: string]: boolean;
466
+ };
467
+ variant?: string;
468
+ };
281
469
  export type AssistantMessage = {
282
470
  id: string;
283
471
  sessionID: string;
@@ -316,6 +504,7 @@ export type Message = UserMessage | AssistantMessage;
316
504
  export type EventMessageUpdated = {
317
505
  type: "message.updated";
318
506
  properties: {
507
+ sessionID: string;
319
508
  info: Message;
320
509
  };
321
510
  };
@@ -500,185 +689,72 @@ export type StepFinishPart = {
500
689
  output: number;
501
690
  reasoning: number;
502
691
  cache: {
503
- read: number;
504
- write: number;
505
- };
506
- };
507
- };
508
- export type SnapshotPart = {
509
- id: string;
510
- sessionID: string;
511
- messageID: string;
512
- type: "snapshot";
513
- snapshot: string;
514
- };
515
- export type PatchPart = {
516
- id: string;
517
- sessionID: string;
518
- messageID: string;
519
- type: "patch";
520
- hash: string;
521
- files: Array<string>;
522
- };
523
- export type AgentPart = {
524
- id: string;
525
- sessionID: string;
526
- messageID: string;
527
- type: "agent";
528
- name: string;
529
- source?: {
530
- value: string;
531
- start: number;
532
- end: number;
533
- };
534
- };
535
- export type RetryPart = {
536
- id: string;
537
- sessionID: string;
538
- messageID: string;
539
- type: "retry";
540
- attempt: number;
541
- error: ApiError;
542
- time: {
543
- created: number;
544
- };
545
- };
546
- export type CompactionPart = {
547
- id: string;
548
- sessionID: string;
549
- messageID: string;
550
- type: "compaction";
551
- auto: boolean;
552
- overflow?: boolean;
553
- };
554
- export type Part = TextPart | SubtaskPart | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;
555
- export type EventMessagePartUpdated = {
556
- type: "message.part.updated";
557
- properties: {
558
- part: Part;
559
- };
560
- };
561
- export type EventMessagePartDelta = {
562
- type: "message.part.delta";
563
- properties: {
564
- sessionID: string;
565
- messageID: string;
566
- partID: string;
567
- field: string;
568
- delta: string;
569
- };
570
- };
571
- export type EventMessagePartRemoved = {
572
- type: "message.part.removed";
573
- properties: {
574
- sessionID: string;
575
- messageID: string;
576
- partID: string;
577
- };
578
- };
579
- export type SessionStatus = {
580
- type: "idle";
581
- } | {
582
- type: "retry";
583
- attempt: number;
584
- message: string;
585
- next: number;
586
- } | {
587
- type: "busy";
588
- };
589
- export type EventSessionStatus = {
590
- type: "session.status";
591
- properties: {
592
- sessionID: string;
593
- status: SessionStatus;
594
- };
595
- };
596
- export type EventSessionIdle = {
597
- type: "session.idle";
598
- properties: {
599
- sessionID: string;
600
- };
601
- };
602
- export type EventSessionCompacted = {
603
- type: "session.compacted";
604
- properties: {
605
- sessionID: string;
606
- };
607
- };
608
- export type Todo = {
609
- /**
610
- * Brief description of the task
611
- */
612
- content: string;
613
- /**
614
- * Current status of the task: pending, in_progress, completed, cancelled
615
- */
616
- status: string;
617
- /**
618
- * Priority level of the task: high, medium, low
619
- */
620
- priority: string;
621
- };
622
- export type EventTodoUpdated = {
623
- type: "todo.updated";
624
- properties: {
625
- sessionID: string;
626
- todos: Array<Todo>;
627
- };
628
- };
629
- export type EventTuiPromptAppend = {
630
- type: "tui.prompt.append";
631
- properties: {
632
- text: string;
692
+ read: number;
693
+ write: number;
694
+ };
633
695
  };
634
696
  };
635
- export type EventTuiCommandExecute = {
636
- type: "tui.command.execute";
637
- properties: {
638
- command: "session.list" | "session.new" | "session.share" | "session.interrupt" | "session.compact" | "session.page.up" | "session.page.down" | "session.line.up" | "session.line.down" | "session.half.page.up" | "session.half.page.down" | "session.first" | "session.last" | "prompt.clear" | "prompt.submit" | "agent.cycle" | string;
639
- };
697
+ export type SnapshotPart = {
698
+ id: string;
699
+ sessionID: string;
700
+ messageID: string;
701
+ type: "snapshot";
702
+ snapshot: string;
640
703
  };
641
- export type EventTuiToastShow = {
642
- type: "tui.toast.show";
643
- properties: {
644
- title?: string;
645
- message: string;
646
- variant: "info" | "success" | "warning" | "error";
647
- /**
648
- * Duration in milliseconds
649
- */
650
- duration?: number;
651
- };
704
+ export type PatchPart = {
705
+ id: string;
706
+ sessionID: string;
707
+ messageID: string;
708
+ type: "patch";
709
+ hash: string;
710
+ files: Array<string>;
652
711
  };
653
- export type EventTuiSessionSelect = {
654
- type: "tui.session.select";
655
- properties: {
656
- /**
657
- * Session ID to navigate to
658
- */
659
- sessionID: string;
712
+ export type AgentPart = {
713
+ id: string;
714
+ sessionID: string;
715
+ messageID: string;
716
+ type: "agent";
717
+ name: string;
718
+ source?: {
719
+ value: string;
720
+ start: number;
721
+ end: number;
660
722
  };
661
723
  };
662
- export type EventMcpToolsChanged = {
663
- type: "mcp.tools.changed";
664
- properties: {
665
- server: string;
724
+ export type RetryPart = {
725
+ id: string;
726
+ sessionID: string;
727
+ messageID: string;
728
+ type: "retry";
729
+ attempt: number;
730
+ error: ApiError;
731
+ time: {
732
+ created: number;
666
733
  };
667
734
  };
668
- export type EventMcpBrowserOpenFailed = {
669
- type: "mcp.browser.open.failed";
735
+ export type CompactionPart = {
736
+ id: string;
737
+ sessionID: string;
738
+ messageID: string;
739
+ type: "compaction";
740
+ auto: boolean;
741
+ overflow?: boolean;
742
+ };
743
+ export type Part = TextPart | SubtaskPart | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;
744
+ export type EventMessagePartUpdated = {
745
+ type: "message.part.updated";
670
746
  properties: {
671
- mcpName: string;
672
- url: string;
747
+ sessionID: string;
748
+ part: Part;
749
+ time: number;
673
750
  };
674
751
  };
675
- export type EventCommandExecuted = {
676
- type: "command.executed";
752
+ export type EventMessagePartRemoved = {
753
+ type: "message.part.removed";
677
754
  properties: {
678
- name: string;
679
755
  sessionID: string;
680
- arguments: string;
681
756
  messageID: string;
757
+ partID: string;
682
758
  };
683
759
  };
684
760
  export type PermissionAction = "allow" | "deny" | "ask";
@@ -723,98 +799,120 @@ export type Session = {
723
799
  export type EventSessionCreated = {
724
800
  type: "session.created";
725
801
  properties: {
802
+ sessionID: string;
726
803
  info: Session;
727
804
  };
728
805
  };
729
806
  export type EventSessionUpdated = {
730
807
  type: "session.updated";
731
808
  properties: {
809
+ sessionID: string;
732
810
  info: Session;
733
811
  };
734
812
  };
735
813
  export type EventSessionDeleted = {
736
814
  type: "session.deleted";
737
- properties: {
738
- info: Session;
739
- };
740
- };
741
- export type EventSessionDiff = {
742
- type: "session.diff";
743
815
  properties: {
744
816
  sessionID: string;
745
- diff: Array<FileDiff>;
746
- };
747
- };
748
- export type EventSessionError = {
749
- type: "session.error";
750
- properties: {
751
- sessionID?: string;
752
- error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ApiError;
817
+ info: Session;
753
818
  };
754
819
  };
755
- export type EventWorkspaceReady = {
756
- type: "workspace.ready";
757
- properties: {
758
- name: string;
759
- };
820
+ export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventServerConnected | EventGlobalDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessagePartDelta | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionCompacted | EventFileEdited | EventFileWatcherUpdated | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventSessionDiff | EventSessionError | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventWorktreeReady | EventWorktreeFailed | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCreated | EventSessionUpdated | EventSessionDeleted;
821
+ export type GlobalEvent = {
822
+ directory: string;
823
+ payload: Event;
760
824
  };
761
- export type EventWorkspaceFailed = {
762
- type: "workspace.failed";
763
- properties: {
764
- message: string;
825
+ export type SyncEventMessageUpdated = {
826
+ type: "message.updated.1";
827
+ aggregate: "sessionID";
828
+ data: {
829
+ sessionID: string;
830
+ info: Message;
765
831
  };
766
832
  };
767
- export type Pty = {
768
- id: string;
769
- title: string;
770
- command: string;
771
- args: Array<string>;
772
- cwd: string;
773
- status: "running" | "exited";
774
- pid: number;
775
- };
776
- export type EventPtyCreated = {
777
- type: "pty.created";
778
- properties: {
779
- info: Pty;
833
+ export type SyncEventMessageRemoved = {
834
+ type: "message.removed.1";
835
+ aggregate: "sessionID";
836
+ data: {
837
+ sessionID: string;
838
+ messageID: string;
780
839
  };
781
840
  };
782
- export type EventPtyUpdated = {
783
- type: "pty.updated";
784
- properties: {
785
- info: Pty;
841
+ export type SyncEventMessagePartUpdated = {
842
+ type: "message.part.updated.1";
843
+ aggregate: "sessionID";
844
+ data: {
845
+ sessionID: string;
846
+ part: Part;
847
+ time: number;
786
848
  };
787
849
  };
788
- export type EventPtyExited = {
789
- type: "pty.exited";
790
- properties: {
791
- id: string;
792
- exitCode: number;
850
+ export type SyncEventMessagePartRemoved = {
851
+ type: "message.part.removed.1";
852
+ aggregate: "sessionID";
853
+ data: {
854
+ sessionID: string;
855
+ messageID: string;
856
+ partID: string;
793
857
  };
794
858
  };
795
- export type EventPtyDeleted = {
796
- type: "pty.deleted";
797
- properties: {
798
- id: string;
859
+ export type SyncEventSessionCreated = {
860
+ type: "session.created.1";
861
+ aggregate: "sessionID";
862
+ data: {
863
+ sessionID: string;
864
+ info: Session;
799
865
  };
800
866
  };
801
- export type EventWorktreeReady = {
802
- type: "worktree.ready";
803
- properties: {
804
- name: string;
805
- branch: string;
867
+ export type SyncEventSessionUpdated = {
868
+ type: "session.updated.1";
869
+ aggregate: "sessionID";
870
+ data: {
871
+ sessionID: string;
872
+ info: {
873
+ id: string | null;
874
+ slug: string | null;
875
+ projectID: string | null;
876
+ workspaceID: string | null;
877
+ directory: string | null;
878
+ parentID: string | null;
879
+ summary: {
880
+ additions: number;
881
+ deletions: number;
882
+ files: number;
883
+ diffs?: Array<FileDiff>;
884
+ } | null;
885
+ share?: {
886
+ url: string | null;
887
+ };
888
+ title: string | null;
889
+ version: string | null;
890
+ time?: {
891
+ created: number | null;
892
+ updated: number | null;
893
+ compacting: number | null;
894
+ archived: number | null;
895
+ };
896
+ permission: PermissionRuleset | null;
897
+ revert: {
898
+ messageID: string;
899
+ partID?: string;
900
+ snapshot?: string;
901
+ diff?: string;
902
+ } | null;
903
+ };
806
904
  };
807
905
  };
808
- export type EventWorktreeFailed = {
809
- type: "worktree.failed";
810
- properties: {
811
- message: string;
906
+ export type SyncEventSessionDeleted = {
907
+ type: "session.deleted.1";
908
+ aggregate: "sessionID";
909
+ data: {
910
+ sessionID: string;
911
+ info: Session;
812
912
  };
813
913
  };
814
- export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventPermissionAsked | EventPermissionReplied | EventFileWatcherUpdated | EventVcsBranchUpdated | EventFileEdited | EventServerConnected | EventGlobalDisposed | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartDelta | EventMessagePartRemoved | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventWorkspaceReady | EventWorkspaceFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventWorktreeReady | EventWorktreeFailed;
815
- export type GlobalEvent = {
816
- directory: string;
817
- payload: Event;
914
+ export type SyncEvent = {
915
+ payload: SyncEvent;
818
916
  };
819
917
  /**
820
918
  * Log level
@@ -861,7 +959,6 @@ export type PermissionConfig = {
861
959
  task?: PermissionRuleConfig;
862
960
  external_directory?: PermissionRuleConfig;
863
961
  todowrite?: PermissionActionConfig;
864
- todoread?: PermissionActionConfig;
865
962
  question?: PermissionActionConfig;
866
963
  webfetch?: PermissionActionConfig;
867
964
  websearch?: PermissionActionConfig;
@@ -1516,6 +1613,31 @@ export type QuestionAskInput = {
1516
1613
  export type ProviderAuthMethod = {
1517
1614
  type: "oauth" | "api";
1518
1615
  label: string;
1616
+ prompts?: Array<{
1617
+ type: "text";
1618
+ key: string;
1619
+ message: string;
1620
+ placeholder?: string;
1621
+ when?: {
1622
+ key: string;
1623
+ op: "eq" | "neq";
1624
+ value: string;
1625
+ };
1626
+ } | {
1627
+ type: "select";
1628
+ key: string;
1629
+ message: string;
1630
+ options: Array<{
1631
+ label: string;
1632
+ value: string;
1633
+ hint?: string;
1634
+ }>;
1635
+ when?: {
1636
+ key: string;
1637
+ op: "eq" | "neq";
1638
+ value: string;
1639
+ };
1640
+ }>;
1519
1641
  };
1520
1642
  export type ProviderAuthAuthorization = {
1521
1643
  url: string;
@@ -1590,7 +1712,8 @@ export type Path = {
1590
1712
  directory: string;
1591
1713
  };
1592
1714
  export type VcsInfo = {
1593
- branch: string;
1715
+ branch?: string;
1716
+ default_branch?: string;
1594
1717
  };
1595
1718
  export type Command = {
1596
1719
  name: string;
@@ -1663,6 +1786,19 @@ export type GlobalEventResponses = {
1663
1786
  200: GlobalEvent;
1664
1787
  };
1665
1788
  export type GlobalEventResponse = GlobalEventResponses[keyof GlobalEventResponses];
1789
+ export type GlobalSyncEventSubscribeData = {
1790
+ body?: never;
1791
+ path?: never;
1792
+ query?: never;
1793
+ url: "/global/sync-event";
1794
+ };
1795
+ export type GlobalSyncEventSubscribeResponses = {
1796
+ /**
1797
+ * Event stream
1798
+ */
1799
+ 200: SyncEvent;
1800
+ };
1801
+ export type GlobalSyncEventSubscribeResponse = GlobalSyncEventSubscribeResponses[keyof GlobalSyncEventSubscribeResponses];
1666
1802
  export type GlobalConfigGetData = {
1667
1803
  body?: never;
1668
1804
  path?: never;
@@ -1709,6 +1845,34 @@ export type GlobalDisposeResponses = {
1709
1845
  200: boolean;
1710
1846
  };
1711
1847
  export type GlobalDisposeResponse = GlobalDisposeResponses[keyof GlobalDisposeResponses];
1848
+ export type GlobalUpgradeData = {
1849
+ body?: {
1850
+ target?: string;
1851
+ };
1852
+ path?: never;
1853
+ query?: never;
1854
+ url: "/global/upgrade";
1855
+ };
1856
+ export type GlobalUpgradeErrors = {
1857
+ /**
1858
+ * Bad request
1859
+ */
1860
+ 400: BadRequestError;
1861
+ };
1862
+ export type GlobalUpgradeError = GlobalUpgradeErrors[keyof GlobalUpgradeErrors];
1863
+ export type GlobalUpgradeResponses = {
1864
+ /**
1865
+ * Upgrade result
1866
+ */
1867
+ 200: {
1868
+ success: true;
1869
+ version: string;
1870
+ } | {
1871
+ success: false;
1872
+ error: string;
1873
+ };
1874
+ };
1875
+ export type GlobalUpgradeResponse = GlobalUpgradeResponses[keyof GlobalUpgradeResponses];
1712
1876
  export type AuthRemoveData = {
1713
1877
  body?: never;
1714
1878
  path: {
@@ -3445,6 +3609,12 @@ export type ProviderOauthAuthorizeData = {
3445
3609
  * Auth method index
3446
3610
  */
3447
3611
  method: number;
3612
+ /**
3613
+ * Prompt inputs
3614
+ */
3615
+ inputs?: {
3616
+ [key: string]: string;
3617
+ };
3448
3618
  };
3449
3619
  path: {
3450
3620
  /**
@@ -3629,6 +3799,22 @@ export type FileStatusResponses = {
3629
3799
  200: Array<File>;
3630
3800
  };
3631
3801
  export type FileStatusResponse = FileStatusResponses[keyof FileStatusResponses];
3802
+ export type EventSubscribeData = {
3803
+ body?: never;
3804
+ path?: never;
3805
+ query?: {
3806
+ directory?: string;
3807
+ workspace?: string;
3808
+ };
3809
+ url: "/event";
3810
+ };
3811
+ export type EventSubscribeResponses = {
3812
+ /**
3813
+ * Event stream
3814
+ */
3815
+ 200: Event;
3816
+ };
3817
+ export type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];
3632
3818
  export type McpStatusData = {
3633
3819
  body?: never;
3634
3820
  path?: never;
@@ -4143,6 +4329,23 @@ export type VcsGetResponses = {
4143
4329
  200: VcsInfo;
4144
4330
  };
4145
4331
  export type VcsGetResponse = VcsGetResponses[keyof VcsGetResponses];
4332
+ export type VcsDiffData = {
4333
+ body?: never;
4334
+ path?: never;
4335
+ query: {
4336
+ directory?: string;
4337
+ workspace?: string;
4338
+ mode: "git" | "branch";
4339
+ };
4340
+ url: "/vcs/diff";
4341
+ };
4342
+ export type VcsDiffResponses = {
4343
+ /**
4344
+ * VCS diff
4345
+ */
4346
+ 200: Array<FileDiff>;
4347
+ };
4348
+ export type VcsDiffResponse = VcsDiffResponses[keyof VcsDiffResponses];
4146
4349
  export type CommandListData = {
4147
4350
  body?: never;
4148
4351
  path?: never;
@@ -4270,19 +4473,3 @@ export type FormatterStatusResponses = {
4270
4473
  200: Array<FormatterStatus>;
4271
4474
  };
4272
4475
  export type FormatterStatusResponse = FormatterStatusResponses[keyof FormatterStatusResponses];
4273
- export type EventSubscribeData = {
4274
- body?: never;
4275
- path?: never;
4276
- query?: {
4277
- directory?: string;
4278
- workspace?: string;
4279
- };
4280
- url: "/event";
4281
- };
4282
- export type EventSubscribeResponses = {
4283
- /**
4284
- * Event stream
4285
- */
4286
- 200: Event;
4287
- };
4288
- export type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@ex-machina/opencode-sdk",
4
- "version": "1.2.27002",
4
+ "version": "1.3.2001",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {