@ex-machina/opencode-sdk 1.2.27001 → 1.3.1

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, 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, 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
@@ -60,6 +60,14 @@ export declare class Global extends HeyApiClient {
60
60
  * Clean up and dispose all OpenCode instances, releasing all resources.
61
61
  */
62
62
  dispose<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalDisposeResponses, unknown, ThrowOnError, "fields">;
63
+ /**
64
+ * Upgrade opencode
65
+ *
66
+ * Upgrade opencode to the specified version or latest if not specified.
67
+ */
68
+ upgrade<ThrowOnError extends boolean = false>(parameters?: {
69
+ target?: string;
70
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalUpgradeResponses, GlobalUpgradeErrors, ThrowOnError, "fields">;
63
71
  private _config?;
64
72
  get config(): Config;
65
73
  }
@@ -794,6 +802,9 @@ export declare class Oauth extends HeyApiClient {
794
802
  directory?: string;
795
803
  workspace?: string;
796
804
  method?: number;
805
+ inputs?: {
806
+ [key: string]: string;
807
+ };
797
808
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderOauthAuthorizeResponses, ProviderOauthAuthorizeErrors, ThrowOnError, "fields">;
798
809
  /**
799
810
  * OAuth callback
@@ -896,6 +907,17 @@ export declare class File extends HeyApiClient {
896
907
  workspace?: string;
897
908
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileStatusResponses, unknown, ThrowOnError, "fields">;
898
909
  }
910
+ export declare class Event extends HeyApiClient {
911
+ /**
912
+ * Subscribe to events
913
+ *
914
+ * Get events
915
+ */
916
+ subscribe<ThrowOnError extends boolean = false>(parameters?: {
917
+ directory?: string;
918
+ workspace?: string;
919
+ }, options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<EventSubscribeResponses, unknown>>;
920
+ }
899
921
  export declare class Auth2 extends HeyApiClient {
900
922
  /**
901
923
  * Remove MCP OAuth
@@ -1212,17 +1234,6 @@ export declare class Formatter extends HeyApiClient {
1212
1234
  workspace?: string;
1213
1235
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FormatterStatusResponses, unknown, ThrowOnError, "fields">;
1214
1236
  }
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
1237
  export declare class OpencodeClient extends HeyApiClient {
1227
1238
  static readonly __registry: HeyApiRegistry<OpencodeClient>;
1228
1239
  constructor(args?: {
@@ -1259,6 +1270,8 @@ export declare class OpencodeClient extends HeyApiClient {
1259
1270
  get find(): Find;
1260
1271
  private _file?;
1261
1272
  get file(): File;
1273
+ private _event?;
1274
+ get event(): Event;
1262
1275
  private _mcp?;
1263
1276
  get mcp(): Mcp;
1264
1277
  private _tui?;
@@ -1277,7 +1290,5 @@ export declare class OpencodeClient extends HeyApiClient {
1277
1290
  get lsp(): Lsp;
1278
1291
  private _formatter?;
1279
1292
  get formatter(): Formatter;
1280
- private _event?;
1281
- get event(): Event;
1282
1293
  }
1283
1294
  export {};
@@ -86,6 +86,24 @@ export class Global extends HeyApiClient {
86
86
  ...options,
87
87
  });
88
88
  }
89
+ /**
90
+ * Upgrade opencode
91
+ *
92
+ * Upgrade opencode to the specified version or latest if not specified.
93
+ */
94
+ upgrade(parameters, options) {
95
+ const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "target" }] }]);
96
+ return (options?.client ?? this.client).post({
97
+ url: "/global/upgrade",
98
+ ...options,
99
+ ...params,
100
+ headers: {
101
+ "Content-Type": "application/json",
102
+ ...options?.headers,
103
+ ...params.headers,
104
+ },
105
+ });
106
+ }
89
107
  _config;
90
108
  get config() {
91
109
  return (this._config ??= new Config({ client: this.client }));
@@ -1558,6 +1576,7 @@ export class Oauth extends HeyApiClient {
1558
1576
  { in: "query", key: "directory" },
1559
1577
  { in: "query", key: "workspace" },
1560
1578
  { in: "body", key: "method" },
1579
+ { in: "body", key: "inputs" },
1561
1580
  ],
1562
1581
  },
1563
1582
  ]);
@@ -1779,6 +1798,28 @@ export class File extends HeyApiClient {
1779
1798
  });
1780
1799
  }
1781
1800
  }
1801
+ export class Event extends HeyApiClient {
1802
+ /**
1803
+ * Subscribe to events
1804
+ *
1805
+ * Get events
1806
+ */
1807
+ subscribe(parameters, options) {
1808
+ const params = buildClientParams([parameters], [
1809
+ {
1810
+ args: [
1811
+ { in: "query", key: "directory" },
1812
+ { in: "query", key: "workspace" },
1813
+ ],
1814
+ },
1815
+ ]);
1816
+ return (options?.client ?? this.client).sse.get({
1817
+ url: "/event",
1818
+ ...options,
1819
+ ...params,
1820
+ });
1821
+ }
1822
+ }
1782
1823
  export class Auth2 extends HeyApiClient {
1783
1824
  /**
1784
1825
  * Remove MCP OAuth
@@ -2472,28 +2513,6 @@ export class Formatter extends HeyApiClient {
2472
2513
  });
2473
2514
  }
2474
2515
  }
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
2516
  export class OpencodeClient extends HeyApiClient {
2498
2517
  static __registry = new HeyApiRegistry();
2499
2518
  constructor(args) {
@@ -2560,6 +2579,10 @@ export class OpencodeClient extends HeyApiClient {
2560
2579
  get file() {
2561
2580
  return (this._file ??= new File({ client: this.client }));
2562
2581
  }
2582
+ _event;
2583
+ get event() {
2584
+ return (this._event ??= new Event({ client: this.client }));
2585
+ }
2563
2586
  _mcp;
2564
2587
  get mcp() {
2565
2588
  return (this._mcp ??= new Mcp({ client: this.client }));
@@ -2596,8 +2619,4 @@ export class OpencodeClient extends HeyApiClient {
2596
2619
  get formatter() {
2597
2620
  return (this._formatter ??= new Formatter({ client: this.client }));
2598
2621
  }
2599
- _event;
2600
- get event() {
2601
- return (this._event ??= new Event({ client: this.client }));
2602
- }
2603
2622
  }
@@ -46,115 +46,6 @@ export type EventServerInstanceDisposed = {
46
46
  directory: string;
47
47
  };
48
48
  };
49
- export type QuestionOption = {
50
- /**
51
- * Display text (1-5 words, concise)
52
- */
53
- label: string;
54
- /**
55
- * Explanation of choice
56
- */
57
- description: string;
58
- };
59
- export type QuestionInfo = {
60
- /**
61
- * Complete question
62
- */
63
- question: string;
64
- /**
65
- * Very short label (max 30 chars)
66
- */
67
- header: string;
68
- /**
69
- * Available choices
70
- */
71
- options: Array<QuestionOption>;
72
- /**
73
- * Allow selecting multiple choices
74
- */
75
- multiple?: boolean;
76
- /**
77
- * Allow typing a custom answer (default: true)
78
- */
79
- custom?: boolean;
80
- };
81
- export type QuestionRequest = {
82
- id: string;
83
- sessionID: string;
84
- /**
85
- * Questions to ask
86
- */
87
- questions: Array<QuestionInfo>;
88
- tool?: {
89
- messageID: string;
90
- callID: string;
91
- };
92
- };
93
- export type EventQuestionAsked = {
94
- type: "question.asked";
95
- properties: QuestionRequest;
96
- };
97
- export type QuestionAnswer = Array<string>;
98
- export type EventQuestionReplied = {
99
- type: "question.replied";
100
- properties: {
101
- sessionID: string;
102
- requestID: string;
103
- answers: Array<QuestionAnswer>;
104
- };
105
- };
106
- export type EventQuestionRejected = {
107
- type: "question.rejected";
108
- properties: {
109
- sessionID: string;
110
- requestID: string;
111
- };
112
- };
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;
125
- };
126
- };
127
- export type EventPermissionAsked = {
128
- type: "permission.asked";
129
- properties: PermissionRequest;
130
- };
131
- export type EventPermissionReplied = {
132
- type: "permission.replied";
133
- properties: {
134
- sessionID: string;
135
- requestID: string;
136
- reply: "once" | "always" | "reject";
137
- };
138
- };
139
- export type EventFileWatcherUpdated = {
140
- type: "file.watcher.updated";
141
- properties: {
142
- file: string;
143
- event: "add" | "change" | "unlink";
144
- };
145
- };
146
- export type EventVcsBranchUpdated = {
147
- type: "vcs.branch.updated";
148
- properties: {
149
- branch?: string;
150
- };
151
- };
152
- export type EventFileEdited = {
153
- type: "file.edited";
154
- properties: {
155
- file: string;
156
- };
157
- };
158
49
  export type EventServerConnected = {
159
50
  type: "server.connected";
160
51
  properties: {
@@ -180,6 +71,12 @@ export type EventLspUpdated = {
180
71
  [key: string]: unknown;
181
72
  };
182
73
  };
74
+ export type EventFileEdited = {
75
+ type: "file.edited";
76
+ properties: {
77
+ file: string;
78
+ };
79
+ };
183
80
  export type OutputFormatText = {
184
81
  type: "text";
185
82
  };
@@ -576,6 +473,32 @@ export type EventMessagePartRemoved = {
576
473
  partID: string;
577
474
  };
578
475
  };
476
+ export type PermissionRequest = {
477
+ id: string;
478
+ sessionID: string;
479
+ permission: string;
480
+ patterns: Array<string>;
481
+ metadata: {
482
+ [key: string]: unknown;
483
+ };
484
+ always: Array<string>;
485
+ tool?: {
486
+ messageID: string;
487
+ callID: string;
488
+ };
489
+ };
490
+ export type EventPermissionAsked = {
491
+ type: "permission.asked";
492
+ properties: PermissionRequest;
493
+ };
494
+ export type EventPermissionReplied = {
495
+ type: "permission.replied";
496
+ properties: {
497
+ sessionID: string;
498
+ requestID: string;
499
+ reply: "once" | "always" | "reject";
500
+ };
501
+ };
579
502
  export type SessionStatus = {
580
503
  type: "idle";
581
504
  } | {
@@ -599,12 +522,83 @@ export type EventSessionIdle = {
599
522
  sessionID: string;
600
523
  };
601
524
  };
525
+ export type QuestionOption = {
526
+ /**
527
+ * Display text (1-5 words, concise)
528
+ */
529
+ label: string;
530
+ /**
531
+ * Explanation of choice
532
+ */
533
+ description: string;
534
+ };
535
+ export type QuestionInfo = {
536
+ /**
537
+ * Complete question
538
+ */
539
+ question: string;
540
+ /**
541
+ * Very short label (max 30 chars)
542
+ */
543
+ header: string;
544
+ /**
545
+ * Available choices
546
+ */
547
+ options: Array<QuestionOption>;
548
+ /**
549
+ * Allow selecting multiple choices
550
+ */
551
+ multiple?: boolean;
552
+ /**
553
+ * Allow typing a custom answer (default: true)
554
+ */
555
+ custom?: boolean;
556
+ };
557
+ export type QuestionRequest = {
558
+ id: string;
559
+ sessionID: string;
560
+ /**
561
+ * Questions to ask
562
+ */
563
+ questions: Array<QuestionInfo>;
564
+ tool?: {
565
+ messageID: string;
566
+ callID: string;
567
+ };
568
+ };
569
+ export type EventQuestionAsked = {
570
+ type: "question.asked";
571
+ properties: QuestionRequest;
572
+ };
573
+ export type QuestionAnswer = Array<string>;
574
+ export type EventQuestionReplied = {
575
+ type: "question.replied";
576
+ properties: {
577
+ sessionID: string;
578
+ requestID: string;
579
+ answers: Array<QuestionAnswer>;
580
+ };
581
+ };
582
+ export type EventQuestionRejected = {
583
+ type: "question.rejected";
584
+ properties: {
585
+ sessionID: string;
586
+ requestID: string;
587
+ };
588
+ };
602
589
  export type EventSessionCompacted = {
603
590
  type: "session.compacted";
604
591
  properties: {
605
592
  sessionID: string;
606
593
  };
607
594
  };
595
+ export type EventFileWatcherUpdated = {
596
+ type: "file.watcher.updated";
597
+ properties: {
598
+ file: string;
599
+ event: "add" | "change" | "unlink";
600
+ };
601
+ };
608
602
  export type Todo = {
609
603
  /**
610
604
  * Brief description of the task
@@ -752,6 +746,12 @@ export type EventSessionError = {
752
746
  error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ApiError;
753
747
  };
754
748
  };
749
+ export type EventVcsBranchUpdated = {
750
+ type: "vcs.branch.updated";
751
+ properties: {
752
+ branch?: string;
753
+ };
754
+ };
755
755
  export type EventWorkspaceReady = {
756
756
  type: "workspace.ready";
757
757
  properties: {
@@ -811,7 +811,7 @@ export type EventWorktreeFailed = {
811
811
  message: string;
812
812
  };
813
813
  };
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;
814
+ export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventServerConnected | EventGlobalDisposed | EventLspClientDiagnostics | EventLspUpdated | EventFileEdited | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartDelta | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionCompacted | EventFileWatcherUpdated | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventWorktreeReady | EventWorktreeFailed;
815
815
  export type GlobalEvent = {
816
816
  directory: string;
817
817
  payload: Event;
@@ -1516,6 +1516,31 @@ export type QuestionAskInput = {
1516
1516
  export type ProviderAuthMethod = {
1517
1517
  type: "oauth" | "api";
1518
1518
  label: string;
1519
+ prompts?: Array<{
1520
+ type: "text";
1521
+ key: string;
1522
+ message: string;
1523
+ placeholder?: string;
1524
+ when?: {
1525
+ key: string;
1526
+ op: "eq" | "neq";
1527
+ value: string;
1528
+ };
1529
+ } | {
1530
+ type: "select";
1531
+ key: string;
1532
+ message: string;
1533
+ options: Array<{
1534
+ label: string;
1535
+ value: string;
1536
+ hint?: string;
1537
+ }>;
1538
+ when?: {
1539
+ key: string;
1540
+ op: "eq" | "neq";
1541
+ value: string;
1542
+ };
1543
+ }>;
1519
1544
  };
1520
1545
  export type ProviderAuthAuthorization = {
1521
1546
  url: string;
@@ -1709,6 +1734,34 @@ export type GlobalDisposeResponses = {
1709
1734
  200: boolean;
1710
1735
  };
1711
1736
  export type GlobalDisposeResponse = GlobalDisposeResponses[keyof GlobalDisposeResponses];
1737
+ export type GlobalUpgradeData = {
1738
+ body?: {
1739
+ target?: string;
1740
+ };
1741
+ path?: never;
1742
+ query?: never;
1743
+ url: "/global/upgrade";
1744
+ };
1745
+ export type GlobalUpgradeErrors = {
1746
+ /**
1747
+ * Bad request
1748
+ */
1749
+ 400: BadRequestError;
1750
+ };
1751
+ export type GlobalUpgradeError = GlobalUpgradeErrors[keyof GlobalUpgradeErrors];
1752
+ export type GlobalUpgradeResponses = {
1753
+ /**
1754
+ * Upgrade result
1755
+ */
1756
+ 200: {
1757
+ success: true;
1758
+ version: string;
1759
+ } | {
1760
+ success: false;
1761
+ error: string;
1762
+ };
1763
+ };
1764
+ export type GlobalUpgradeResponse = GlobalUpgradeResponses[keyof GlobalUpgradeResponses];
1712
1765
  export type AuthRemoveData = {
1713
1766
  body?: never;
1714
1767
  path: {
@@ -3445,6 +3498,12 @@ export type ProviderOauthAuthorizeData = {
3445
3498
  * Auth method index
3446
3499
  */
3447
3500
  method: number;
3501
+ /**
3502
+ * Prompt inputs
3503
+ */
3504
+ inputs?: {
3505
+ [key: string]: string;
3506
+ };
3448
3507
  };
3449
3508
  path: {
3450
3509
  /**
@@ -3629,6 +3688,22 @@ export type FileStatusResponses = {
3629
3688
  200: Array<File>;
3630
3689
  };
3631
3690
  export type FileStatusResponse = FileStatusResponses[keyof FileStatusResponses];
3691
+ export type EventSubscribeData = {
3692
+ body?: never;
3693
+ path?: never;
3694
+ query?: {
3695
+ directory?: string;
3696
+ workspace?: string;
3697
+ };
3698
+ url: "/event";
3699
+ };
3700
+ export type EventSubscribeResponses = {
3701
+ /**
3702
+ * Event stream
3703
+ */
3704
+ 200: Event;
3705
+ };
3706
+ export type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];
3632
3707
  export type McpStatusData = {
3633
3708
  body?: never;
3634
3709
  path?: never;
@@ -4270,19 +4345,3 @@ export type FormatterStatusResponses = {
4270
4345
  200: Array<FormatterStatus>;
4271
4346
  };
4272
4347
  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.27001",
4
+ "version": "1.3.1",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {