@opencode-ai/sdk 0.0.0-opentui-202510310534 → 0.0.0-v0-202510310554
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.
- package/dist/gen/sdk.gen.d.ts +1 -12
- package/dist/gen/sdk.gen.js +0 -25
- package/dist/gen/types.gen.d.ts +83 -98
- package/package.json +1 -1
package/dist/gen/sdk.gen.d.ts
CHANGED
|
@@ -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,
|
|
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";
|
|
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
|
|
@@ -195,12 +195,6 @@ declare class Mcp extends _HeyApiClient {
|
|
|
195
195
|
*/
|
|
196
196
|
status<ThrowOnError extends boolean = false>(options?: Options<McpStatusData, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpStatusResponses, unknown, ThrowOnError, "fields">;
|
|
197
197
|
}
|
|
198
|
-
declare class Lsp extends _HeyApiClient {
|
|
199
|
-
/**
|
|
200
|
-
* Get LSP server status
|
|
201
|
-
*/
|
|
202
|
-
status<ThrowOnError extends boolean = false>(options?: Options<LspStatusData, ThrowOnError>): import("./client/types.gen.js").RequestResult<LspStatusResponses, unknown, ThrowOnError, "fields">;
|
|
203
|
-
}
|
|
204
198
|
declare class Control extends _HeyApiClient {
|
|
205
199
|
/**
|
|
206
200
|
* Get the next TUI request from the queue
|
|
@@ -248,10 +242,6 @@ declare class Tui extends _HeyApiClient {
|
|
|
248
242
|
* Show a toast notification in the TUI
|
|
249
243
|
*/
|
|
250
244
|
showToast<ThrowOnError extends boolean = false>(options?: Options<TuiShowToastData, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiShowToastResponses, unknown, ThrowOnError, "fields">;
|
|
251
|
-
/**
|
|
252
|
-
* Publish a TUI event
|
|
253
|
-
*/
|
|
254
|
-
publish<ThrowOnError extends boolean = false>(options?: Options<TuiPublishData, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiPublishResponses, TuiPublishErrors, ThrowOnError, "fields">;
|
|
255
245
|
control: Control;
|
|
256
246
|
}
|
|
257
247
|
declare class Auth extends _HeyApiClient {
|
|
@@ -281,7 +271,6 @@ export declare class OpencodeClient extends _HeyApiClient {
|
|
|
281
271
|
file: File;
|
|
282
272
|
app: App;
|
|
283
273
|
mcp: Mcp;
|
|
284
|
-
lsp: Lsp;
|
|
285
274
|
tui: Tui;
|
|
286
275
|
auth: Auth;
|
|
287
276
|
event: Event;
|
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -423,17 +423,6 @@ class Mcp extends _HeyApiClient {
|
|
|
423
423
|
});
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
class Lsp extends _HeyApiClient {
|
|
427
|
-
/**
|
|
428
|
-
* Get LSP server status
|
|
429
|
-
*/
|
|
430
|
-
status(options) {
|
|
431
|
-
return (options?.client ?? this._client).get({
|
|
432
|
-
url: "/lsp",
|
|
433
|
-
...options,
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
426
|
class Control extends _HeyApiClient {
|
|
438
427
|
/**
|
|
439
428
|
* Get the next TUI request from the queue
|
|
@@ -552,19 +541,6 @@ class Tui extends _HeyApiClient {
|
|
|
552
541
|
},
|
|
553
542
|
});
|
|
554
543
|
}
|
|
555
|
-
/**
|
|
556
|
-
* Publish a TUI event
|
|
557
|
-
*/
|
|
558
|
-
publish(options) {
|
|
559
|
-
return (options?.client ?? this._client).post({
|
|
560
|
-
url: "/tui/publish",
|
|
561
|
-
...options,
|
|
562
|
-
headers: {
|
|
563
|
-
"Content-Type": "application/json",
|
|
564
|
-
...options?.headers,
|
|
565
|
-
},
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
544
|
control = new Control({ client: this._client });
|
|
569
545
|
}
|
|
570
546
|
class Auth extends _HeyApiClient {
|
|
@@ -617,7 +593,6 @@ export class OpencodeClient extends _HeyApiClient {
|
|
|
617
593
|
file = new File({ client: this._client });
|
|
618
594
|
app = new App({ client: this._client });
|
|
619
595
|
mcp = new Mcp({ client: this._client });
|
|
620
|
-
lsp = new Lsp({ client: this._client });
|
|
621
596
|
tui = new Tui({ client: this._client });
|
|
622
597
|
auth = new Auth({ client: this._client });
|
|
623
598
|
event = new Event({ client: this._client });
|
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ 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;
|
|
18
22
|
/**
|
|
19
23
|
* Exit the application
|
|
20
24
|
*/
|
|
@@ -28,13 +32,17 @@ export type KeybindsConfig = {
|
|
|
28
32
|
*/
|
|
29
33
|
theme_list?: string;
|
|
30
34
|
/**
|
|
31
|
-
*
|
|
35
|
+
* Create/update AGENTS.md
|
|
36
|
+
*/
|
|
37
|
+
project_init?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Toggle tool details
|
|
32
40
|
*/
|
|
33
|
-
|
|
41
|
+
tool_details?: string;
|
|
34
42
|
/**
|
|
35
|
-
*
|
|
43
|
+
* Toggle thinking blocks
|
|
36
44
|
*/
|
|
37
|
-
|
|
45
|
+
thinking_blocks?: string;
|
|
38
46
|
/**
|
|
39
47
|
* Export session to editor
|
|
40
48
|
*/
|
|
@@ -67,6 +75,14 @@ export type KeybindsConfig = {
|
|
|
67
75
|
* Compact the session
|
|
68
76
|
*/
|
|
69
77
|
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;
|
|
70
86
|
/**
|
|
71
87
|
* Scroll messages up by one page
|
|
72
88
|
*/
|
|
@@ -108,9 +124,13 @@ export type KeybindsConfig = {
|
|
|
108
124
|
*/
|
|
109
125
|
model_list?: string;
|
|
110
126
|
/**
|
|
111
|
-
*
|
|
127
|
+
* Next recent model
|
|
128
|
+
*/
|
|
129
|
+
model_cycle_recent?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Previous recent model
|
|
112
132
|
*/
|
|
113
|
-
|
|
133
|
+
model_cycle_recent_reverse?: string;
|
|
114
134
|
/**
|
|
115
135
|
* List agents
|
|
116
136
|
*/
|
|
@@ -139,6 +159,54 @@ export type KeybindsConfig = {
|
|
|
139
159
|
* Insert newline in input
|
|
140
160
|
*/
|
|
141
161
|
input_newline?: string;
|
|
162
|
+
/**
|
|
163
|
+
* @deprecated use agent_cycle. Next mode
|
|
164
|
+
*/
|
|
165
|
+
switch_mode?: string;
|
|
166
|
+
/**
|
|
167
|
+
* @deprecated use agent_cycle_reverse. Previous mode
|
|
168
|
+
*/
|
|
169
|
+
switch_mode_reverse?: string;
|
|
170
|
+
/**
|
|
171
|
+
* @deprecated use agent_cycle. Next agent
|
|
172
|
+
*/
|
|
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;
|
|
206
|
+
/**
|
|
207
|
+
* @deprecated use messages_undo. Revert message
|
|
208
|
+
*/
|
|
209
|
+
messages_revert?: string;
|
|
142
210
|
};
|
|
143
211
|
export type AgentConfig = {
|
|
144
212
|
model?: string;
|
|
@@ -658,16 +726,10 @@ export type FilePart = {
|
|
|
658
726
|
};
|
|
659
727
|
export type ToolStatePending = {
|
|
660
728
|
status: "pending";
|
|
661
|
-
input: {
|
|
662
|
-
[key: string]: unknown;
|
|
663
|
-
};
|
|
664
|
-
raw: string;
|
|
665
729
|
};
|
|
666
730
|
export type ToolStateRunning = {
|
|
667
731
|
status: "running";
|
|
668
|
-
input:
|
|
669
|
-
[key: string]: unknown;
|
|
670
|
-
};
|
|
732
|
+
input: unknown;
|
|
671
733
|
title?: string;
|
|
672
734
|
metadata?: {
|
|
673
735
|
[key: string]: unknown;
|
|
@@ -935,43 +997,6 @@ export type Agent = {
|
|
|
935
997
|
[key: string]: unknown;
|
|
936
998
|
};
|
|
937
999
|
};
|
|
938
|
-
export type McpStatusConnected = {
|
|
939
|
-
status: "connected";
|
|
940
|
-
};
|
|
941
|
-
export type McpStatusDisabled = {
|
|
942
|
-
status: "disabled";
|
|
943
|
-
};
|
|
944
|
-
export type McpStatusFailed = {
|
|
945
|
-
status: "failed";
|
|
946
|
-
error: string;
|
|
947
|
-
};
|
|
948
|
-
export type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed;
|
|
949
|
-
export type LspStatus = {
|
|
950
|
-
id: string;
|
|
951
|
-
name: string;
|
|
952
|
-
root: string;
|
|
953
|
-
status: "connected" | "error";
|
|
954
|
-
};
|
|
955
|
-
export type EventTuiPromptAppend = {
|
|
956
|
-
type: "tui.prompt.append";
|
|
957
|
-
properties: {
|
|
958
|
-
text: string;
|
|
959
|
-
};
|
|
960
|
-
};
|
|
961
|
-
export type EventTuiCommandExecute = {
|
|
962
|
-
type: "tui.command.execute";
|
|
963
|
-
properties: {
|
|
964
|
-
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;
|
|
965
|
-
};
|
|
966
|
-
};
|
|
967
|
-
export type EventTuiToastShow = {
|
|
968
|
-
type: "tui.toast.show";
|
|
969
|
-
properties: {
|
|
970
|
-
title?: string;
|
|
971
|
-
message: string;
|
|
972
|
-
variant: "info" | "success" | "warning" | "error";
|
|
973
|
-
};
|
|
974
|
-
};
|
|
975
1000
|
export type OAuth = {
|
|
976
1001
|
type: "oauth";
|
|
977
1002
|
refresh: string;
|
|
@@ -1001,12 +1026,6 @@ export type EventLspClientDiagnostics = {
|
|
|
1001
1026
|
path: string;
|
|
1002
1027
|
};
|
|
1003
1028
|
};
|
|
1004
|
-
export type EventLspUpdated = {
|
|
1005
|
-
type: "lsp.updated";
|
|
1006
|
-
properties: {
|
|
1007
|
-
[key: string]: unknown;
|
|
1008
|
-
};
|
|
1009
|
-
};
|
|
1010
1029
|
export type EventMessageUpdated = {
|
|
1011
1030
|
type: "message.updated";
|
|
1012
1031
|
properties: {
|
|
@@ -1125,7 +1144,13 @@ export type EventServerConnected = {
|
|
|
1125
1144
|
[key: string]: unknown;
|
|
1126
1145
|
};
|
|
1127
1146
|
};
|
|
1128
|
-
export type
|
|
1147
|
+
export type EventIdeInstalled = {
|
|
1148
|
+
type: "ide.installed";
|
|
1149
|
+
properties: {
|
|
1150
|
+
ide: string;
|
|
1151
|
+
};
|
|
1152
|
+
};
|
|
1153
|
+
export type Event = EventInstallationUpdated | EventLspClientDiagnostics | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCompacted | EventPermissionUpdated | EventPermissionReplied | EventFileEdited | EventFileWatcherUpdated | EventTodoUpdated | EventSessionIdle | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionError | EventServerConnected | EventIdeInstalled;
|
|
1129
1154
|
export type ProjectListData = {
|
|
1130
1155
|
body?: never;
|
|
1131
1156
|
path?: never;
|
|
@@ -2126,26 +2151,8 @@ export type McpStatusResponses = {
|
|
|
2126
2151
|
/**
|
|
2127
2152
|
* MCP server status
|
|
2128
2153
|
*/
|
|
2129
|
-
200:
|
|
2130
|
-
[key: string]: McpStatus;
|
|
2131
|
-
};
|
|
2132
|
-
};
|
|
2133
|
-
export type McpStatusResponse = McpStatusResponses[keyof McpStatusResponses];
|
|
2134
|
-
export type LspStatusData = {
|
|
2135
|
-
body?: never;
|
|
2136
|
-
path?: never;
|
|
2137
|
-
query?: {
|
|
2138
|
-
directory?: string;
|
|
2139
|
-
};
|
|
2140
|
-
url: "/lsp";
|
|
2141
|
-
};
|
|
2142
|
-
export type LspStatusResponses = {
|
|
2143
|
-
/**
|
|
2144
|
-
* LSP server status
|
|
2145
|
-
*/
|
|
2146
|
-
200: Array<LspStatus>;
|
|
2154
|
+
200: unknown;
|
|
2147
2155
|
};
|
|
2148
|
-
export type LspStatusResponse = LspStatusResponses[keyof LspStatusResponses];
|
|
2149
2156
|
export type TuiAppendPromptData = {
|
|
2150
2157
|
body?: {
|
|
2151
2158
|
text: string;
|
|
@@ -2303,28 +2310,6 @@ export type TuiShowToastResponses = {
|
|
|
2303
2310
|
200: boolean;
|
|
2304
2311
|
};
|
|
2305
2312
|
export type TuiShowToastResponse = TuiShowToastResponses[keyof TuiShowToastResponses];
|
|
2306
|
-
export type TuiPublishData = {
|
|
2307
|
-
body?: EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow;
|
|
2308
|
-
path?: never;
|
|
2309
|
-
query?: {
|
|
2310
|
-
directory?: string;
|
|
2311
|
-
};
|
|
2312
|
-
url: "/tui/publish";
|
|
2313
|
-
};
|
|
2314
|
-
export type TuiPublishErrors = {
|
|
2315
|
-
/**
|
|
2316
|
-
* Bad request
|
|
2317
|
-
*/
|
|
2318
|
-
400: BadRequestError;
|
|
2319
|
-
};
|
|
2320
|
-
export type TuiPublishError = TuiPublishErrors[keyof TuiPublishErrors];
|
|
2321
|
-
export type TuiPublishResponses = {
|
|
2322
|
-
/**
|
|
2323
|
-
* Event published successfully
|
|
2324
|
-
*/
|
|
2325
|
-
200: boolean;
|
|
2326
|
-
};
|
|
2327
|
-
export type TuiPublishResponse = TuiPublishResponses[keyof TuiPublishResponses];
|
|
2328
2313
|
export type TuiControlNextData = {
|
|
2329
2314
|
body?: never;
|
|
2330
2315
|
path?: never;
|
package/package.json
CHANGED