@opencode-ai/sdk 0.0.0-dev-202510161504 → 0.0.0-opentui-202510161437
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 +8 -1
- package/dist/gen/sdk.gen.js +12 -0
- package/dist/gen/types.gen.d.ts +63 -9
- 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, 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, 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, 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, LspStatusData, LspStatusResponses, TuiAppendPromptData, TuiAppendPromptResponses, TuiAppendPromptErrors, TuiOpenHelpData, TuiOpenHelpResponses, TuiOpenSessionsData, TuiOpenSessionsResponses, TuiOpenThemesData, TuiOpenThemesResponses, TuiOpenModelsData, TuiOpenModelsResponses, TuiSubmitPromptData, TuiSubmitPromptResponses, TuiClearPromptData, TuiClearPromptResponses, TuiExecuteCommandData, TuiExecuteCommandResponses, TuiExecuteCommandErrors, TuiShowToastData, TuiShowToastResponses, 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
|
|
@@ -191,6 +191,12 @@ declare class Mcp extends _HeyApiClient {
|
|
|
191
191
|
*/
|
|
192
192
|
status<ThrowOnError extends boolean = false>(options?: Options<McpStatusData, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpStatusResponses, unknown, ThrowOnError, "fields">;
|
|
193
193
|
}
|
|
194
|
+
declare class Lsp extends _HeyApiClient {
|
|
195
|
+
/**
|
|
196
|
+
* Get LSP server status
|
|
197
|
+
*/
|
|
198
|
+
status<ThrowOnError extends boolean = false>(options?: Options<LspStatusData, ThrowOnError>): import("./client/types.gen.js").RequestResult<LspStatusResponses, unknown, ThrowOnError, "fields">;
|
|
199
|
+
}
|
|
194
200
|
declare class Tui extends _HeyApiClient {
|
|
195
201
|
/**
|
|
196
202
|
* Append prompt to the TUI
|
|
@@ -256,6 +262,7 @@ export declare class OpencodeClient extends _HeyApiClient {
|
|
|
256
262
|
file: File;
|
|
257
263
|
app: App;
|
|
258
264
|
mcp: Mcp;
|
|
265
|
+
lsp: Lsp;
|
|
259
266
|
tui: Tui;
|
|
260
267
|
auth: Auth;
|
|
261
268
|
event: Event;
|
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -414,6 +414,17 @@ class Mcp extends _HeyApiClient {
|
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
+
class Lsp extends _HeyApiClient {
|
|
418
|
+
/**
|
|
419
|
+
* Get LSP server status
|
|
420
|
+
*/
|
|
421
|
+
status(options) {
|
|
422
|
+
return (options?.client ?? this._client).get({
|
|
423
|
+
url: "/lsp",
|
|
424
|
+
...options,
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
}
|
|
417
428
|
class Tui extends _HeyApiClient {
|
|
418
429
|
/**
|
|
419
430
|
* Append prompt to the TUI
|
|
@@ -559,6 +570,7 @@ export class OpencodeClient extends _HeyApiClient {
|
|
|
559
570
|
file = new File({ client: this._client });
|
|
560
571
|
app = new App({ client: this._client });
|
|
561
572
|
mcp = new Mcp({ client: this._client });
|
|
573
|
+
lsp = new Lsp({ client: this._client });
|
|
562
574
|
tui = new Tui({ client: this._client });
|
|
563
575
|
auth = new Auth({ client: this._client });
|
|
564
576
|
event = new Event({ client: this._client });
|
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -43,6 +43,14 @@ export type KeybindsConfig = {
|
|
|
43
43
|
* Toggle thinking blocks
|
|
44
44
|
*/
|
|
45
45
|
thinking_blocks?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Toggle sidebar
|
|
48
|
+
*/
|
|
49
|
+
sidebar_toggle?: string;
|
|
50
|
+
/**
|
|
51
|
+
* View status
|
|
52
|
+
*/
|
|
53
|
+
status_view?: string;
|
|
46
54
|
/**
|
|
47
55
|
* Export session to editor
|
|
48
56
|
*/
|
|
@@ -123,6 +131,10 @@ export type KeybindsConfig = {
|
|
|
123
131
|
* List available models
|
|
124
132
|
*/
|
|
125
133
|
model_list?: string;
|
|
134
|
+
/**
|
|
135
|
+
* List available commands
|
|
136
|
+
*/
|
|
137
|
+
command_list?: string;
|
|
126
138
|
/**
|
|
127
139
|
* Next recent model
|
|
128
140
|
*/
|
|
@@ -593,6 +605,7 @@ export type AssistantMessage = {
|
|
|
593
605
|
};
|
|
594
606
|
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError;
|
|
595
607
|
system: Array<string>;
|
|
608
|
+
finish?: string;
|
|
596
609
|
modelID: string;
|
|
597
610
|
providerID: string;
|
|
598
611
|
mode: string;
|
|
@@ -683,10 +696,16 @@ export type FilePart = {
|
|
|
683
696
|
};
|
|
684
697
|
export type ToolStatePending = {
|
|
685
698
|
status: "pending";
|
|
699
|
+
input: {
|
|
700
|
+
[key: string]: unknown;
|
|
701
|
+
};
|
|
702
|
+
raw: string;
|
|
686
703
|
};
|
|
687
704
|
export type ToolStateRunning = {
|
|
688
705
|
status: "running";
|
|
689
|
-
input:
|
|
706
|
+
input: {
|
|
707
|
+
[key: string]: unknown;
|
|
708
|
+
};
|
|
690
709
|
title?: string;
|
|
691
710
|
metadata?: {
|
|
692
711
|
[key: string]: unknown;
|
|
@@ -934,6 +953,23 @@ export type Agent = {
|
|
|
934
953
|
[key: string]: unknown;
|
|
935
954
|
};
|
|
936
955
|
};
|
|
956
|
+
export type McpStatusConnected = {
|
|
957
|
+
status: "connected";
|
|
958
|
+
};
|
|
959
|
+
export type McpStatusDisabled = {
|
|
960
|
+
status: "disabled";
|
|
961
|
+
};
|
|
962
|
+
export type McpStatusFailed = {
|
|
963
|
+
status: "failed";
|
|
964
|
+
error: string;
|
|
965
|
+
};
|
|
966
|
+
export type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed;
|
|
967
|
+
export type LspStatus = {
|
|
968
|
+
id: string;
|
|
969
|
+
name: string;
|
|
970
|
+
root: string;
|
|
971
|
+
status: "connected" | "error";
|
|
972
|
+
};
|
|
937
973
|
export type OAuth = {
|
|
938
974
|
type: "oauth";
|
|
939
975
|
refresh: string;
|
|
@@ -963,6 +999,12 @@ export type EventLspClientDiagnostics = {
|
|
|
963
999
|
path: string;
|
|
964
1000
|
};
|
|
965
1001
|
};
|
|
1002
|
+
export type EventLspUpdated = {
|
|
1003
|
+
type: "lsp.updated";
|
|
1004
|
+
properties: {
|
|
1005
|
+
[key: string]: unknown;
|
|
1006
|
+
};
|
|
1007
|
+
};
|
|
966
1008
|
export type EventMessageUpdated = {
|
|
967
1009
|
type: "message.updated";
|
|
968
1010
|
properties: {
|
|
@@ -1074,13 +1116,7 @@ export type EventServerConnected = {
|
|
|
1074
1116
|
[key: string]: unknown;
|
|
1075
1117
|
};
|
|
1076
1118
|
};
|
|
1077
|
-
export type
|
|
1078
|
-
type: "ide.installed";
|
|
1079
|
-
properties: {
|
|
1080
|
-
ide: string;
|
|
1081
|
-
};
|
|
1082
|
-
};
|
|
1083
|
-
export type Event = EventInstallationUpdated | EventLspClientDiagnostics | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCompacted | EventPermissionUpdated | EventPermissionReplied | EventFileEdited | EventFileWatcherUpdated | EventTodoUpdated | EventSessionIdle | EventSessionUpdated | EventSessionDeleted | EventSessionError | EventServerConnected | EventIdeInstalled;
|
|
1119
|
+
export type Event = EventInstallationUpdated | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCompacted | EventPermissionUpdated | EventPermissionReplied | EventFileEdited | EventFileWatcherUpdated | EventTodoUpdated | EventSessionIdle | EventSessionUpdated | EventSessionDeleted | EventSessionError | EventServerConnected;
|
|
1084
1120
|
export type ProjectListData = {
|
|
1085
1121
|
body?: never;
|
|
1086
1122
|
path?: never;
|
|
@@ -2062,8 +2098,26 @@ export type McpStatusResponses = {
|
|
|
2062
2098
|
/**
|
|
2063
2099
|
* MCP server status
|
|
2064
2100
|
*/
|
|
2065
|
-
200:
|
|
2101
|
+
200: {
|
|
2102
|
+
[key: string]: McpStatus;
|
|
2103
|
+
};
|
|
2104
|
+
};
|
|
2105
|
+
export type McpStatusResponse = McpStatusResponses[keyof McpStatusResponses];
|
|
2106
|
+
export type LspStatusData = {
|
|
2107
|
+
body?: never;
|
|
2108
|
+
path?: never;
|
|
2109
|
+
query?: {
|
|
2110
|
+
directory?: string;
|
|
2111
|
+
};
|
|
2112
|
+
url: "/lsp";
|
|
2113
|
+
};
|
|
2114
|
+
export type LspStatusResponses = {
|
|
2115
|
+
/**
|
|
2116
|
+
* LSP server status
|
|
2117
|
+
*/
|
|
2118
|
+
200: Array<LspStatus>;
|
|
2066
2119
|
};
|
|
2120
|
+
export type LspStatusResponse = LspStatusResponses[keyof LspStatusResponses];
|
|
2067
2121
|
export type TuiAppendPromptData = {
|
|
2068
2122
|
body?: {
|
|
2069
2123
|
text: string;
|
package/package.json
CHANGED