@opencode-ai/sdk 0.0.0-dev-202510152354 → 0.0.0-opentui-202510160000
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
|
*/
|
|
@@ -592,6 +604,7 @@ export type AssistantMessage = {
|
|
|
592
604
|
};
|
|
593
605
|
error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError;
|
|
594
606
|
system: Array<string>;
|
|
607
|
+
finish?: string;
|
|
595
608
|
modelID: string;
|
|
596
609
|
providerID: string;
|
|
597
610
|
mode: string;
|
|
@@ -682,10 +695,16 @@ export type FilePart = {
|
|
|
682
695
|
};
|
|
683
696
|
export type ToolStatePending = {
|
|
684
697
|
status: "pending";
|
|
698
|
+
input: {
|
|
699
|
+
[key: string]: unknown;
|
|
700
|
+
};
|
|
701
|
+
raw: string;
|
|
685
702
|
};
|
|
686
703
|
export type ToolStateRunning = {
|
|
687
704
|
status: "running";
|
|
688
|
-
input:
|
|
705
|
+
input: {
|
|
706
|
+
[key: string]: unknown;
|
|
707
|
+
};
|
|
689
708
|
title?: string;
|
|
690
709
|
metadata?: {
|
|
691
710
|
[key: string]: unknown;
|
|
@@ -932,6 +951,23 @@ export type Agent = {
|
|
|
932
951
|
[key: string]: unknown;
|
|
933
952
|
};
|
|
934
953
|
};
|
|
954
|
+
export type McpStatusConnected = {
|
|
955
|
+
status: "connected";
|
|
956
|
+
};
|
|
957
|
+
export type McpStatusDisabled = {
|
|
958
|
+
status: "disabled";
|
|
959
|
+
};
|
|
960
|
+
export type McpStatusFailed = {
|
|
961
|
+
status: "failed";
|
|
962
|
+
error: string;
|
|
963
|
+
};
|
|
964
|
+
export type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed;
|
|
965
|
+
export type LspStatus = {
|
|
966
|
+
id: string;
|
|
967
|
+
name: string;
|
|
968
|
+
root: string;
|
|
969
|
+
status: "connected" | "error";
|
|
970
|
+
};
|
|
935
971
|
export type OAuth = {
|
|
936
972
|
type: "oauth";
|
|
937
973
|
refresh: string;
|
|
@@ -961,6 +997,12 @@ export type EventLspClientDiagnostics = {
|
|
|
961
997
|
path: string;
|
|
962
998
|
};
|
|
963
999
|
};
|
|
1000
|
+
export type EventLspUpdated = {
|
|
1001
|
+
type: "lsp.updated";
|
|
1002
|
+
properties: {
|
|
1003
|
+
[key: string]: unknown;
|
|
1004
|
+
};
|
|
1005
|
+
};
|
|
964
1006
|
export type EventMessageUpdated = {
|
|
965
1007
|
type: "message.updated";
|
|
966
1008
|
properties: {
|
|
@@ -1072,13 +1114,7 @@ export type EventServerConnected = {
|
|
|
1072
1114
|
[key: string]: unknown;
|
|
1073
1115
|
};
|
|
1074
1116
|
};
|
|
1075
|
-
export type
|
|
1076
|
-
type: "ide.installed";
|
|
1077
|
-
properties: {
|
|
1078
|
-
ide: string;
|
|
1079
|
-
};
|
|
1080
|
-
};
|
|
1081
|
-
export type Event = EventInstallationUpdated | EventLspClientDiagnostics | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCompacted | EventPermissionUpdated | EventPermissionReplied | EventFileEdited | EventFileWatcherUpdated | EventTodoUpdated | EventSessionIdle | EventSessionUpdated | EventSessionDeleted | EventSessionError | EventServerConnected | EventIdeInstalled;
|
|
1117
|
+
export type Event = EventInstallationUpdated | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCompacted | EventPermissionUpdated | EventPermissionReplied | EventFileEdited | EventFileWatcherUpdated | EventTodoUpdated | EventSessionIdle | EventSessionUpdated | EventSessionDeleted | EventSessionError | EventServerConnected;
|
|
1082
1118
|
export type ProjectListData = {
|
|
1083
1119
|
body?: never;
|
|
1084
1120
|
path?: never;
|
|
@@ -2060,8 +2096,26 @@ export type McpStatusResponses = {
|
|
|
2060
2096
|
/**
|
|
2061
2097
|
* MCP server status
|
|
2062
2098
|
*/
|
|
2063
|
-
200:
|
|
2099
|
+
200: {
|
|
2100
|
+
[key: string]: McpStatus;
|
|
2101
|
+
};
|
|
2102
|
+
};
|
|
2103
|
+
export type McpStatusResponse = McpStatusResponses[keyof McpStatusResponses];
|
|
2104
|
+
export type LspStatusData = {
|
|
2105
|
+
body?: never;
|
|
2106
|
+
path?: never;
|
|
2107
|
+
query?: {
|
|
2108
|
+
directory?: string;
|
|
2109
|
+
};
|
|
2110
|
+
url: "/lsp";
|
|
2111
|
+
};
|
|
2112
|
+
export type LspStatusResponses = {
|
|
2113
|
+
/**
|
|
2114
|
+
* LSP server status
|
|
2115
|
+
*/
|
|
2116
|
+
200: Array<LspStatus>;
|
|
2064
2117
|
};
|
|
2118
|
+
export type LspStatusResponse = LspStatusResponses[keyof LspStatusResponses];
|
|
2065
2119
|
export type TuiAppendPromptData = {
|
|
2066
2120
|
body?: {
|
|
2067
2121
|
text: string;
|
package/package.json
CHANGED