@opencode-ai/sdk 0.0.0-v0-202510310554 → 0.0.0-windows-202511131652

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.
@@ -72,9 +72,7 @@ export const createClient = (config = {}) => {
72
72
  ...result,
73
73
  };
74
74
  }
75
- const parseAs = (opts.parseAs === "auto"
76
- ? getParseAs(response.headers.get("Content-Type"))
77
- : opts.parseAs) ?? "json";
75
+ const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
78
76
  let data;
79
77
  switch (parseAs) {
80
78
  case "arrayBuffer":
@@ -1,6 +1,6 @@
1
1
  import type { QuerySerializerOptions } from "../core/bodySerializer.gen.js";
2
2
  import type { Client, ClientOptions, Config, RequestOptions } from "./types.gen.js";
3
- export declare const createQuerySerializer: <T = unknown>({ allowReserved, array, object, }?: QuerySerializerOptions) => (queryParams: T) => string;
3
+ export declare const createQuerySerializer: <T = unknown>({ allowReserved, array, object }?: QuerySerializerOptions) => (queryParams: T) => string;
4
4
  /**
5
5
  * Infers parseAs value from provided Content-Type header.
6
6
  */
@@ -1,9 +1,9 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
  import { getAuthToken } from "../core/auth.gen.js";
3
3
  import { jsonBodySerializer } from "../core/bodySerializer.gen.js";
4
- import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from "../core/pathSerializer.gen.js";
4
+ import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam } from "../core/pathSerializer.gen.js";
5
5
  import { getUrl } from "../core/utils.gen.js";
6
- export const createQuerySerializer = ({ allowReserved, array, object, } = {}) => {
6
+ export const createQuerySerializer = ({ allowReserved, array, object } = {}) => {
7
7
  const querySerializer = (queryParams) => {
8
8
  const search = [];
9
9
  if (queryParams && typeof queryParams === "object") {
@@ -82,9 +82,7 @@ const checkForExistence = (options, name) => {
82
82
  if (!name) {
83
83
  return false;
84
84
  }
85
- if (options.headers.has(name) ||
86
- options.query?.[name] ||
87
- options.headers.get("Cookie")?.includes(`${name}=`)) {
85
+ if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
88
86
  return true;
89
87
  }
90
88
  return false;
@@ -1,5 +1,5 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- import { createClient, createConfig, } from "./client/index.js";
2
+ import { createClient, createConfig } from "./client/index.js";
3
3
  export const client = createClient(createConfig({
4
4
  baseUrl: "http://localhost:4096",
5
5
  }));
@@ -25,7 +25,7 @@ export declare const separatorObjectExplode: (style: ObjectSeparatorStyle) => ".
25
25
  export declare const serializeArrayParam: ({ allowReserved, explode, name, style, value, }: SerializeOptions<ArraySeparatorStyle> & {
26
26
  value: unknown[];
27
27
  }) => string;
28
- export declare const serializePrimitiveParam: ({ allowReserved, name, value, }: SerializePrimitiveParam) => string;
28
+ export declare const serializePrimitiveParam: ({ allowReserved, name, value }: SerializePrimitiveParam) => string;
29
29
  export declare const serializeObjectParam: ({ allowReserved, explode, name, style, value, valueOnly, }: SerializeOptions<ObjectSeparatorStyle> & {
30
30
  value: Record<string, unknown> | Date;
31
31
  valueOnly?: boolean;
@@ -64,7 +64,7 @@ export const serializeArrayParam = ({ allowReserved, explode, name, style, value
64
64
  .join(separator);
65
65
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
66
66
  };
67
- export const serializePrimitiveParam = ({ allowReserved, name, value, }) => {
67
+ export const serializePrimitiveParam = ({ allowReserved, name, value }) => {
68
68
  if (value === undefined || value === null) {
69
69
  return "";
70
70
  }
@@ -1,5 +1,5 @@
1
1
  import type { Options as ClientOptions, TDataShape, Client } from "./client/index.js";
2
- import type { ProjectListData, ProjectListResponses, ProjectCurrentData, ProjectCurrentResponses, ConfigGetData, ConfigGetResponses, ConfigUpdateData, ConfigUpdateResponses, ConfigUpdateErrors, ToolIdsData, ToolIdsResponses, ToolIdsErrors, ToolListData, ToolListResponses, ToolListErrors, PathGetData, PathGetResponses, SessionListData, SessionListResponses, SessionCreateData, SessionCreateResponses, SessionCreateErrors, SessionDeleteData, SessionDeleteResponses, SessionDeleteErrors, SessionGetData, SessionGetResponses, SessionGetErrors, SessionUpdateData, SessionUpdateResponses, SessionUpdateErrors, SessionChildrenData, SessionChildrenResponses, SessionChildrenErrors, SessionTodoData, SessionTodoResponses, SessionTodoErrors, SessionInitData, SessionInitResponses, SessionInitErrors, SessionForkData, SessionForkResponses, SessionAbortData, SessionAbortResponses, SessionAbortErrors, SessionUnshareData, SessionUnshareResponses, SessionUnshareErrors, SessionShareData, SessionShareResponses, SessionShareErrors, SessionDiffData, SessionDiffResponses, SessionSummarizeData, SessionSummarizeResponses, SessionSummarizeErrors, SessionMessagesData, SessionMessagesResponses, SessionMessagesErrors, SessionPromptData, SessionPromptResponses, SessionPromptErrors, SessionMessageData, SessionMessageResponses, SessionMessageErrors, SessionCommandData, SessionCommandResponses, SessionCommandErrors, SessionShellData, SessionShellResponses, SessionShellErrors, SessionRevertData, SessionRevertResponses, SessionRevertErrors, SessionUnrevertData, SessionUnrevertResponses, SessionUnrevertErrors, PostSessionIdPermissionsPermissionIdData, PostSessionIdPermissionsPermissionIdResponses, PostSessionIdPermissionsPermissionIdErrors, CommandListData, CommandListResponses, ConfigProvidersData, ConfigProvidersResponses, FindTextData, FindTextResponses, FindFilesData, FindFilesResponses, FindSymbolsData, FindSymbolsResponses, FileListData, FileListResponses, FileReadData, FileReadResponses, FileStatusData, FileStatusResponses, AppLogData, AppLogResponses, AppLogErrors, AppAgentsData, AppAgentsResponses, McpStatusData, McpStatusResponses, TuiAppendPromptData, TuiAppendPromptResponses, TuiAppendPromptErrors, TuiOpenHelpData, TuiOpenHelpResponses, TuiOpenSessionsData, TuiOpenSessionsResponses, TuiOpenThemesData, TuiOpenThemesResponses, TuiOpenModelsData, TuiOpenModelsResponses, TuiSubmitPromptData, TuiSubmitPromptResponses, TuiClearPromptData, TuiClearPromptResponses, TuiExecuteCommandData, TuiExecuteCommandResponses, TuiExecuteCommandErrors, TuiShowToastData, TuiShowToastResponses, TuiControlNextData, TuiControlNextResponses, TuiControlResponseData, TuiControlResponseResponses, AuthSetData, AuthSetResponses, AuthSetErrors, EventSubscribeData, EventSubscribeResponses } from "./types.gen.js";
2
+ import type { ProjectListData, ProjectListResponses, ProjectCurrentData, ProjectCurrentResponses, ConfigGetData, ConfigGetResponses, ConfigUpdateData, ConfigUpdateResponses, ConfigUpdateErrors, ToolIdsData, ToolIdsResponses, ToolIdsErrors, ToolListData, ToolListResponses, ToolListErrors, PathGetData, PathGetResponses, SessionListData, SessionListResponses, SessionCreateData, SessionCreateResponses, SessionCreateErrors, SessionDeleteData, SessionDeleteResponses, SessionDeleteErrors, SessionGetData, SessionGetResponses, SessionGetErrors, SessionUpdateData, SessionUpdateResponses, SessionUpdateErrors, SessionChildrenData, SessionChildrenResponses, SessionChildrenErrors, SessionTodoData, SessionTodoResponses, SessionTodoErrors, SessionInitData, SessionInitResponses, SessionInitErrors, SessionForkData, SessionForkResponses, SessionAbortData, SessionAbortResponses, SessionAbortErrors, SessionUnshareData, SessionUnshareResponses, SessionUnshareErrors, SessionShareData, SessionShareResponses, SessionShareErrors, SessionDiffData, SessionDiffResponses, SessionDiffErrors, SessionSummarizeData, SessionSummarizeResponses, SessionSummarizeErrors, SessionMessagesData, SessionMessagesResponses, SessionMessagesErrors, SessionPromptData, SessionPromptResponses, SessionPromptErrors, SessionMessageData, SessionMessageResponses, SessionMessageErrors, SessionCommandData, SessionCommandResponses, SessionCommandErrors, SessionShellData, SessionShellResponses, SessionShellErrors, SessionRevertData, SessionRevertResponses, SessionRevertErrors, SessionUnrevertData, SessionUnrevertResponses, SessionUnrevertErrors, PostSessionIdPermissionsPermissionIdData, PostSessionIdPermissionsPermissionIdResponses, PostSessionIdPermissionsPermissionIdErrors, CommandListData, CommandListResponses, ConfigProvidersData, ConfigProvidersResponses, FindTextData, FindTextResponses, FindFilesData, FindFilesResponses, FindSymbolsData, FindSymbolsResponses, FileListData, FileListResponses, FileReadData, FileReadResponses, FileStatusData, FileStatusResponses, AppLogData, AppLogResponses, AppLogErrors, AppAgentsData, AppAgentsResponses, McpStatusData, McpStatusResponses, McpAddData, McpAddResponses, McpAddErrors, LspStatusData, LspStatusResponses, FormatterStatusData, FormatterStatusResponses, TuiAppendPromptData, TuiAppendPromptResponses, TuiAppendPromptErrors, TuiOpenHelpData, TuiOpenHelpResponses, TuiOpenSessionsData, TuiOpenSessionsResponses, TuiOpenThemesData, TuiOpenThemesResponses, TuiOpenModelsData, TuiOpenModelsResponses, TuiSubmitPromptData, TuiSubmitPromptResponses, TuiClearPromptData, TuiClearPromptResponses, TuiExecuteCommandData, TuiExecuteCommandResponses, TuiExecuteCommandErrors, TuiShowToastData, TuiShowToastResponses, TuiPublishData, TuiPublishResponses, TuiPublishErrors, TuiControlNextData, TuiControlNextResponses, TuiControlResponseData, TuiControlResponseResponses, AuthSetData, AuthSetResponses, AuthSetErrors, EventSubscribeData, EventSubscribeResponses } from "./types.gen.js";
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -109,9 +109,9 @@ declare class Session extends _HeyApiClient {
109
109
  */
110
110
  share<ThrowOnError extends boolean = false>(options: Options<SessionShareData, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionShareResponses, SessionShareErrors, ThrowOnError, "fields">;
111
111
  /**
112
- * Get the diff that resulted from this user message
112
+ * Get the diff for this session
113
113
  */
114
- diff<ThrowOnError extends boolean = false>(options: Options<SessionDiffData, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionDiffResponses, unknown, ThrowOnError, "fields">;
114
+ diff<ThrowOnError extends boolean = false>(options: Options<SessionDiffData, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionDiffResponses, SessionDiffErrors, ThrowOnError, "fields">;
115
115
  /**
116
116
  * Summarize the session
117
117
  */
@@ -194,6 +194,22 @@ declare class Mcp extends _HeyApiClient {
194
194
  * Get MCP server status
195
195
  */
196
196
  status<ThrowOnError extends boolean = false>(options?: Options<McpStatusData, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpStatusResponses, unknown, ThrowOnError, "fields">;
197
+ /**
198
+ * Add MCP server dynamically
199
+ */
200
+ add<ThrowOnError extends boolean = false>(options?: Options<McpAddData, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpAddResponses, McpAddErrors, ThrowOnError, "fields">;
201
+ }
202
+ declare class Lsp extends _HeyApiClient {
203
+ /**
204
+ * Get LSP server status
205
+ */
206
+ status<ThrowOnError extends boolean = false>(options?: Options<LspStatusData, ThrowOnError>): import("./client/types.gen.js").RequestResult<LspStatusResponses, unknown, ThrowOnError, "fields">;
207
+ }
208
+ declare class Formatter extends _HeyApiClient {
209
+ /**
210
+ * Get formatter status
211
+ */
212
+ status<ThrowOnError extends boolean = false>(options?: Options<FormatterStatusData, ThrowOnError>): import("./client/types.gen.js").RequestResult<FormatterStatusResponses, unknown, ThrowOnError, "fields">;
197
213
  }
198
214
  declare class Control extends _HeyApiClient {
199
215
  /**
@@ -242,6 +258,10 @@ declare class Tui extends _HeyApiClient {
242
258
  * Show a toast notification in the TUI
243
259
  */
244
260
  showToast<ThrowOnError extends boolean = false>(options?: Options<TuiShowToastData, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiShowToastResponses, unknown, ThrowOnError, "fields">;
261
+ /**
262
+ * Publish a TUI event
263
+ */
264
+ publish<ThrowOnError extends boolean = false>(options?: Options<TuiPublishData, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiPublishResponses, TuiPublishErrors, ThrowOnError, "fields">;
245
265
  control: Control;
246
266
  }
247
267
  declare class Auth extends _HeyApiClient {
@@ -271,6 +291,8 @@ export declare class OpencodeClient extends _HeyApiClient {
271
291
  file: File;
272
292
  app: App;
273
293
  mcp: Mcp;
294
+ lsp: Lsp;
295
+ formatter: Formatter;
274
296
  tui: Tui;
275
297
  auth: Auth;
276
298
  event: Event;
@@ -218,7 +218,7 @@ class Session extends _HeyApiClient {
218
218
  });
219
219
  }
220
220
  /**
221
- * Get the diff that resulted from this user message
221
+ * Get the diff for this session
222
222
  */
223
223
  diff(options) {
224
224
  return (options.client ?? this._client).get({
@@ -422,6 +422,41 @@ class Mcp extends _HeyApiClient {
422
422
  ...options,
423
423
  });
424
424
  }
425
+ /**
426
+ * Add MCP server dynamically
427
+ */
428
+ add(options) {
429
+ return (options?.client ?? this._client).post({
430
+ url: "/mcp",
431
+ ...options,
432
+ headers: {
433
+ "Content-Type": "application/json",
434
+ ...options?.headers,
435
+ },
436
+ });
437
+ }
438
+ }
439
+ class Lsp extends _HeyApiClient {
440
+ /**
441
+ * Get LSP server status
442
+ */
443
+ status(options) {
444
+ return (options?.client ?? this._client).get({
445
+ url: "/lsp",
446
+ ...options,
447
+ });
448
+ }
449
+ }
450
+ class Formatter extends _HeyApiClient {
451
+ /**
452
+ * Get formatter status
453
+ */
454
+ status(options) {
455
+ return (options?.client ?? this._client).get({
456
+ url: "/formatter",
457
+ ...options,
458
+ });
459
+ }
425
460
  }
426
461
  class Control extends _HeyApiClient {
427
462
  /**
@@ -541,6 +576,19 @@ class Tui extends _HeyApiClient {
541
576
  },
542
577
  });
543
578
  }
579
+ /**
580
+ * Publish a TUI event
581
+ */
582
+ publish(options) {
583
+ return (options?.client ?? this._client).post({
584
+ url: "/tui/publish",
585
+ ...options,
586
+ headers: {
587
+ "Content-Type": "application/json",
588
+ ...options?.headers,
589
+ },
590
+ });
591
+ }
544
592
  control = new Control({ client: this._client });
545
593
  }
546
594
  class Auth extends _HeyApiClient {
@@ -593,6 +641,8 @@ export class OpencodeClient extends _HeyApiClient {
593
641
  file = new File({ client: this._client });
594
642
  app = new App({ client: this._client });
595
643
  mcp = new Mcp({ client: this._client });
644
+ lsp = new Lsp({ client: this._client });
645
+ formatter = new Formatter({ client: this._client });
596
646
  tui = new Tui({ client: this._client });
597
647
  auth = new Auth({ client: this._client });
598
648
  event = new Event({ client: this._client });
@@ -15,10 +15,6 @@ export type KeybindsConfig = {
15
15
  * Leader key for keybind combinations
16
16
  */
17
17
  leader?: string;
18
- /**
19
- * Show help dialog
20
- */
21
- app_help?: string;
22
18
  /**
23
19
  * Exit the application
24
20
  */
@@ -32,17 +28,13 @@ export type KeybindsConfig = {
32
28
  */
33
29
  theme_list?: string;
34
30
  /**
35
- * Create/update AGENTS.md
36
- */
37
- project_init?: string;
38
- /**
39
- * Toggle tool details
31
+ * Toggle sidebar
40
32
  */
41
- tool_details?: string;
33
+ sidebar_toggle?: string;
42
34
  /**
43
- * Toggle thinking blocks
35
+ * View status
44
36
  */
45
- thinking_blocks?: string;
37
+ status_view?: string;
46
38
  /**
47
39
  * Export session to editor
48
40
  */
@@ -75,14 +67,6 @@ export type KeybindsConfig = {
75
67
  * Compact the session
76
68
  */
77
69
  session_compact?: string;
78
- /**
79
- * Cycle to next child session
80
- */
81
- session_child_cycle?: string;
82
- /**
83
- * Cycle to previous child session
84
- */
85
- session_child_cycle_reverse?: string;
86
70
  /**
87
71
  * Scroll messages up by one page
88
72
  */
@@ -119,18 +103,26 @@ export type KeybindsConfig = {
119
103
  * Redo message
120
104
  */
121
105
  messages_redo?: string;
106
+ /**
107
+ * Toggle code block concealment in messages
108
+ */
109
+ messages_toggle_conceal?: string;
122
110
  /**
123
111
  * List available models
124
112
  */
125
113
  model_list?: string;
126
114
  /**
127
- * Next recent model
115
+ * Next recently used model
128
116
  */
129
117
  model_cycle_recent?: string;
130
118
  /**
131
- * Previous recent model
119
+ * Previous recently used model
132
120
  */
133
121
  model_cycle_recent_reverse?: string;
122
+ /**
123
+ * List available commands
124
+ */
125
+ command_list?: string;
134
126
  /**
135
127
  * List agents
136
128
  */
@@ -147,6 +139,10 @@ export type KeybindsConfig = {
147
139
  * Clear input field
148
140
  */
149
141
  input_clear?: string;
142
+ /**
143
+ * Forward delete
144
+ */
145
+ input_forward_delete?: string;
150
146
  /**
151
147
  * Paste from clipboard
152
148
  */
@@ -160,53 +156,21 @@ export type KeybindsConfig = {
160
156
  */
161
157
  input_newline?: string;
162
158
  /**
163
- * @deprecated use agent_cycle. Next mode
159
+ * Previous history item
164
160
  */
165
- switch_mode?: string;
161
+ history_previous?: string;
166
162
  /**
167
- * @deprecated use agent_cycle_reverse. Previous mode
163
+ * Next history item
168
164
  */
169
- switch_mode_reverse?: string;
165
+ history_next?: string;
170
166
  /**
171
- * @deprecated use agent_cycle. Next agent
167
+ * Next child session
172
168
  */
173
- switch_agent?: string;
174
- /**
175
- * @deprecated use agent_cycle_reverse. Previous agent
176
- */
177
- switch_agent_reverse?: string;
178
- /**
179
- * @deprecated Currently not available. List files
180
- */
181
- file_list?: string;
182
- /**
183
- * @deprecated Close file
184
- */
185
- file_close?: string;
186
- /**
187
- * @deprecated Search file
188
- */
189
- file_search?: string;
190
- /**
191
- * @deprecated Split/unified diff
192
- */
193
- file_diff_toggle?: string;
194
- /**
195
- * @deprecated Navigate to previous message
196
- */
197
- messages_previous?: string;
198
- /**
199
- * @deprecated Navigate to next message
200
- */
201
- messages_next?: string;
202
- /**
203
- * @deprecated Toggle layout
204
- */
205
- messages_layout_toggle?: string;
169
+ session_child_cycle?: string;
206
170
  /**
207
- * @deprecated use messages_undo. Revert message
171
+ * Previous child session
208
172
  */
209
- messages_revert?: string;
173
+ session_child_cycle_reverse?: string;
210
174
  };
211
175
  export type AgentConfig = {
212
176
  model?: string;
@@ -222,12 +186,18 @@ export type AgentConfig = {
222
186
  */
223
187
  description?: string;
224
188
  mode?: "subagent" | "primary" | "all";
189
+ /**
190
+ * Hex color code for the agent (e.g., #FF5733)
191
+ */
192
+ color?: string;
225
193
  permission?: {
226
194
  edit?: "ask" | "allow" | "deny";
227
195
  bash?: ("ask" | "allow" | "deny") | {
228
196
  [key: string]: "ask" | "allow" | "deny";
229
197
  };
230
198
  webfetch?: "ask" | "allow" | "deny";
199
+ doom_loop?: "ask" | "allow" | "deny";
200
+ external_directory?: "ask" | "allow" | "deny";
231
201
  };
232
202
  [key: string]: unknown | string | number | {
233
203
  [key: string]: boolean;
@@ -237,6 +207,8 @@ export type AgentConfig = {
237
207
  [key: string]: "ask" | "allow" | "deny";
238
208
  };
239
209
  webfetch?: "ask" | "allow" | "deny";
210
+ doom_loop?: "ask" | "allow" | "deny";
211
+ external_directory?: "ask" | "allow" | "deny";
240
212
  } | undefined;
241
213
  };
242
214
  export type McpLocalConfig = {
@@ -309,6 +281,15 @@ export type Config = {
309
281
  * TUI scroll speed
310
282
  */
311
283
  scroll_speed?: number;
284
+ /**
285
+ * Scroll acceleration settings
286
+ */
287
+ scroll_acceleration?: {
288
+ /**
289
+ * Enable scroll acceleration
290
+ */
291
+ enabled: boolean;
292
+ };
312
293
  };
313
294
  /**
314
295
  * Command configuration, see https://opencode.ai/docs/commands
@@ -406,7 +387,7 @@ export type Config = {
406
387
  output: Array<"text" | "audio" | "image" | "video" | "pdf">;
407
388
  };
408
389
  experimental?: boolean;
409
- status?: "alpha" | "beta";
390
+ status?: "alpha" | "beta" | "deprecated";
410
391
  options?: {
411
392
  [key: string]: unknown;
412
393
  };
@@ -421,6 +402,10 @@ export type Config = {
421
402
  options?: {
422
403
  apiKey?: string;
423
404
  baseURL?: string;
405
+ /**
406
+ * GitHub Enterprise URL for copilot authentication
407
+ */
408
+ enterpriseUrl?: string;
424
409
  /**
425
410
  * Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.
426
411
  */
@@ -471,6 +456,8 @@ export type Config = {
471
456
  [key: string]: "ask" | "allow" | "deny";
472
457
  };
473
458
  webfetch?: "ask" | "allow" | "deny";
459
+ doom_loop?: "ask" | "allow" | "deny";
460
+ external_directory?: "ask" | "allow" | "deny";
474
461
  };
475
462
  tools?: {
476
463
  [key: string]: boolean;
@@ -532,7 +519,10 @@ export type Session = {
532
519
  directory: string;
533
520
  parentID?: string;
534
521
  summary?: {
535
- diffs: Array<FileDiff>;
522
+ additions: number;
523
+ deletions: number;
524
+ files: number;
525
+ diffs?: Array<FileDiff>;
536
526
  };
537
527
  share?: {
538
528
  url: string;
@@ -634,7 +624,6 @@ export type AssistantMessage = {
634
624
  completed?: number;
635
625
  };
636
626
  error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
637
- system: Array<string>;
638
627
  parentID: string;
639
628
  modelID: string;
640
629
  providerID: string;
@@ -726,10 +715,16 @@ export type FilePart = {
726
715
  };
727
716
  export type ToolStatePending = {
728
717
  status: "pending";
718
+ input: {
719
+ [key: string]: unknown;
720
+ };
721
+ raw: string;
729
722
  };
730
723
  export type ToolStateRunning = {
731
724
  status: "running";
732
- input: unknown;
725
+ input: {
726
+ [key: string]: unknown;
727
+ };
733
728
  title?: string;
734
729
  metadata?: {
735
730
  [key: string]: unknown;
@@ -908,7 +903,7 @@ export type Model = {
908
903
  output: Array<"text" | "audio" | "image" | "video" | "pdf">;
909
904
  };
910
905
  experimental?: boolean;
911
- status?: "alpha" | "beta";
906
+ status?: "alpha" | "beta" | "deprecated";
912
907
  options: {
913
908
  [key: string]: unknown;
914
909
  };
@@ -978,12 +973,15 @@ export type Agent = {
978
973
  builtIn: boolean;
979
974
  topP?: number;
980
975
  temperature?: number;
976
+ color?: string;
981
977
  permission: {
982
978
  edit: "ask" | "allow" | "deny";
983
979
  bash: {
984
980
  [key: string]: "ask" | "allow" | "deny";
985
981
  };
986
982
  webfetch?: "ask" | "allow" | "deny";
983
+ doom_loop?: "ask" | "allow" | "deny";
984
+ external_directory?: "ask" | "allow" | "deny";
987
985
  };
988
986
  model?: {
989
987
  modelID: string;
@@ -997,11 +995,58 @@ export type Agent = {
997
995
  [key: string]: unknown;
998
996
  };
999
997
  };
998
+ export type McpStatusConnected = {
999
+ status: "connected";
1000
+ };
1001
+ export type McpStatusDisabled = {
1002
+ status: "disabled";
1003
+ };
1004
+ export type McpStatusFailed = {
1005
+ status: "failed";
1006
+ error: string;
1007
+ };
1008
+ export type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed;
1009
+ export type LspStatus = {
1010
+ id: string;
1011
+ name: string;
1012
+ root: string;
1013
+ status: "connected" | "error";
1014
+ };
1015
+ export type FormatterStatus = {
1016
+ name: string;
1017
+ extensions: Array<string>;
1018
+ enabled: boolean;
1019
+ };
1020
+ export type EventTuiPromptAppend = {
1021
+ type: "tui.prompt.append";
1022
+ properties: {
1023
+ text: string;
1024
+ };
1025
+ };
1026
+ export type EventTuiCommandExecute = {
1027
+ type: "tui.command.execute";
1028
+ properties: {
1029
+ command: ("session.list" | "session.new" | "session.share" | "session.interrupt" | "session.compact" | "session.page.up" | "session.page.down" | "session.half.page.up" | "session.half.page.down" | "session.first" | "session.last" | "prompt.clear" | "prompt.submit" | "agent.cycle") | string;
1030
+ };
1031
+ };
1032
+ export type EventTuiToastShow = {
1033
+ type: "tui.toast.show";
1034
+ properties: {
1035
+ title?: string;
1036
+ message: string;
1037
+ variant: "info" | "success" | "warning" | "error";
1038
+ /**
1039
+ * Duration in milliseconds
1040
+ */
1041
+ duration?: number;
1042
+ };
1043
+ };
1000
1044
  export type OAuth = {
1001
1045
  type: "oauth";
1002
1046
  refresh: string;
1003
1047
  access: string;
1004
1048
  expires: number;
1049
+ enterpriseUrl?: string;
1005
1050
  };
1006
1051
  export type ApiAuth = {
1007
1052
  type: "api";
@@ -1026,6 +1071,12 @@ export type EventLspClientDiagnostics = {
1026
1071
  path: string;
1027
1072
  };
1028
1073
  };
1074
+ export type EventLspUpdated = {
1075
+ type: "lsp.updated";
1076
+ properties: {
1077
+ [key: string]: unknown;
1078
+ };
1079
+ };
1029
1080
  export type EventMessageUpdated = {
1030
1081
  type: "message.updated";
1031
1082
  properties: {
@@ -1093,13 +1144,6 @@ export type EventFileEdited = {
1093
1144
  file: string;
1094
1145
  };
1095
1146
  };
1096
- export type EventFileWatcherUpdated = {
1097
- type: "file.watcher.updated";
1098
- properties: {
1099
- file: string;
1100
- event: "add" | "change" | "unlink";
1101
- };
1102
- };
1103
1147
  export type EventTodoUpdated = {
1104
1148
  type: "todo.updated";
1105
1149
  properties: {
@@ -1107,6 +1151,15 @@ export type EventTodoUpdated = {
1107
1151
  todos: Array<Todo>;
1108
1152
  };
1109
1153
  };
1154
+ export type EventCommandExecuted = {
1155
+ type: "command.executed";
1156
+ properties: {
1157
+ name: string;
1158
+ sessionID: string;
1159
+ arguments: string;
1160
+ messageID: string;
1161
+ };
1162
+ };
1110
1163
  export type EventSessionIdle = {
1111
1164
  type: "session.idle";
1112
1165
  properties: {
@@ -1131,6 +1184,13 @@ export type EventSessionDeleted = {
1131
1184
  info: Session;
1132
1185
  };
1133
1186
  };
1187
+ export type EventSessionDiff = {
1188
+ type: "session.diff";
1189
+ properties: {
1190
+ sessionID: string;
1191
+ diff: Array<FileDiff>;
1192
+ };
1193
+ };
1134
1194
  export type EventSessionError = {
1135
1195
  type: "session.error";
1136
1196
  properties: {
@@ -1144,13 +1204,14 @@ export type EventServerConnected = {
1144
1204
  [key: string]: unknown;
1145
1205
  };
1146
1206
  };
1147
- export type EventIdeInstalled = {
1148
- type: "ide.installed";
1207
+ export type EventFileWatcherUpdated = {
1208
+ type: "file.watcher.updated";
1149
1209
  properties: {
1150
- ide: string;
1210
+ file: string;
1211
+ event: "add" | "change" | "unlink";
1151
1212
  };
1152
1213
  };
1153
- export type Event = EventInstallationUpdated | EventLspClientDiagnostics | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCompacted | EventPermissionUpdated | EventPermissionReplied | EventFileEdited | EventFileWatcherUpdated | EventTodoUpdated | EventSessionIdle | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionError | EventServerConnected | EventIdeInstalled;
1214
+ export type Event = EventInstallationUpdated | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCompacted | EventPermissionUpdated | EventPermissionReplied | EventFileEdited | EventTodoUpdated | EventCommandExecuted | EventSessionIdle | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventServerConnected | EventFileWatcherUpdated;
1154
1215
  export type ProjectListData = {
1155
1216
  body?: never;
1156
1217
  path?: never;
@@ -1605,6 +1666,9 @@ export type SessionShareResponse = SessionShareResponses[keyof SessionShareRespo
1605
1666
  export type SessionDiffData = {
1606
1667
  body?: never;
1607
1668
  path: {
1669
+ /**
1670
+ * Session ID
1671
+ */
1608
1672
  id: string;
1609
1673
  };
1610
1674
  query?: {
@@ -1613,9 +1677,20 @@ export type SessionDiffData = {
1613
1677
  };
1614
1678
  url: "/session/{id}/diff";
1615
1679
  };
1680
+ export type SessionDiffErrors = {
1681
+ /**
1682
+ * Bad request
1683
+ */
1684
+ 400: BadRequestError;
1685
+ /**
1686
+ * Not found
1687
+ */
1688
+ 404: NotFoundError;
1689
+ };
1690
+ export type SessionDiffError = SessionDiffErrors[keyof SessionDiffErrors];
1616
1691
  export type SessionDiffResponses = {
1617
1692
  /**
1618
- * Successfully retrieved diff
1693
+ * List of diffs
1619
1694
  */
1620
1695
  200: Array<FileDiff>;
1621
1696
  };
@@ -1664,6 +1739,7 @@ export type SessionMessagesData = {
1664
1739
  };
1665
1740
  query?: {
1666
1741
  directory?: string;
1742
+ limit?: number;
1667
1743
  };
1668
1744
  url: "/session/{id}/message";
1669
1745
  };
@@ -2010,6 +2086,7 @@ export type FindFilesData = {
2010
2086
  query: {
2011
2087
  directory?: string;
2012
2088
  query: string;
2089
+ dirs?: "true" | "false";
2013
2090
  };
2014
2091
  url: "/find/file";
2015
2092
  };
@@ -2151,8 +2228,68 @@ export type McpStatusResponses = {
2151
2228
  /**
2152
2229
  * MCP server status
2153
2230
  */
2154
- 200: unknown;
2231
+ 200: {
2232
+ [key: string]: McpStatus;
2233
+ };
2234
+ };
2235
+ export type McpStatusResponse = McpStatusResponses[keyof McpStatusResponses];
2236
+ export type McpAddData = {
2237
+ body?: {
2238
+ name: string;
2239
+ config: McpLocalConfig | McpRemoteConfig;
2240
+ };
2241
+ path?: never;
2242
+ query?: {
2243
+ directory?: string;
2244
+ };
2245
+ url: "/mcp";
2155
2246
  };
2247
+ export type McpAddErrors = {
2248
+ /**
2249
+ * Bad request
2250
+ */
2251
+ 400: BadRequestError;
2252
+ };
2253
+ export type McpAddError = McpAddErrors[keyof McpAddErrors];
2254
+ export type McpAddResponses = {
2255
+ /**
2256
+ * MCP server added successfully
2257
+ */
2258
+ 200: {
2259
+ [key: string]: McpStatus;
2260
+ };
2261
+ };
2262
+ export type McpAddResponse = McpAddResponses[keyof McpAddResponses];
2263
+ export type LspStatusData = {
2264
+ body?: never;
2265
+ path?: never;
2266
+ query?: {
2267
+ directory?: string;
2268
+ };
2269
+ url: "/lsp";
2270
+ };
2271
+ export type LspStatusResponses = {
2272
+ /**
2273
+ * LSP server status
2274
+ */
2275
+ 200: Array<LspStatus>;
2276
+ };
2277
+ export type LspStatusResponse = LspStatusResponses[keyof LspStatusResponses];
2278
+ export type FormatterStatusData = {
2279
+ body?: never;
2280
+ path?: never;
2281
+ query?: {
2282
+ directory?: string;
2283
+ };
2284
+ url: "/formatter";
2285
+ };
2286
+ export type FormatterStatusResponses = {
2287
+ /**
2288
+ * Formatter status
2289
+ */
2290
+ 200: Array<FormatterStatus>;
2291
+ };
2292
+ export type FormatterStatusResponse = FormatterStatusResponses[keyof FormatterStatusResponses];
2156
2293
  export type TuiAppendPromptData = {
2157
2294
  body?: {
2158
2295
  text: string;
@@ -2296,6 +2433,10 @@ export type TuiShowToastData = {
2296
2433
  title?: string;
2297
2434
  message: string;
2298
2435
  variant: "info" | "success" | "warning" | "error";
2436
+ /**
2437
+ * Duration in milliseconds
2438
+ */
2439
+ duration?: number;
2299
2440
  };
2300
2441
  path?: never;
2301
2442
  query?: {
@@ -2310,6 +2451,28 @@ export type TuiShowToastResponses = {
2310
2451
  200: boolean;
2311
2452
  };
2312
2453
  export type TuiShowToastResponse = TuiShowToastResponses[keyof TuiShowToastResponses];
2454
+ export type TuiPublishData = {
2455
+ body?: EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow;
2456
+ path?: never;
2457
+ query?: {
2458
+ directory?: string;
2459
+ };
2460
+ url: "/tui/publish";
2461
+ };
2462
+ export type TuiPublishErrors = {
2463
+ /**
2464
+ * Bad request
2465
+ */
2466
+ 400: BadRequestError;
2467
+ };
2468
+ export type TuiPublishError = TuiPublishErrors[keyof TuiPublishErrors];
2469
+ export type TuiPublishResponses = {
2470
+ /**
2471
+ * Event published successfully
2472
+ */
2473
+ 200: boolean;
2474
+ };
2475
+ export type TuiPublishResponse = TuiPublishResponses[keyof TuiPublishResponses];
2313
2476
  export type TuiControlNextData = {
2314
2477
  body?: never;
2315
2478
  path?: never;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/sdk",
4
- "version": "0.0.0-v0-202510310554",
4
+ "version": "0.0.0-windows-202511131652",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "typecheck": "tsgo --noEmit",