@opencode-ai/sdk 0.9.11 → 0.10.0
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 -5
- package/dist/gen/sdk.gen.js +0 -13
- package/dist/gen/types.gen.d.ts +1 -43
- package/package.json +7 -4
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,
|
|
2
|
+
import type { ProjectListData, ProjectListResponses, ProjectCurrentData, ProjectCurrentResponses, ConfigGetData, ConfigGetResponses, ToolIdsData, ToolIdsResponses, ToolIdsErrors, ToolListData, ToolListResponses, ToolListErrors, PathGetData, PathGetResponses, SessionListData, SessionListResponses, SessionCreateData, SessionCreateResponses, SessionCreateErrors, SessionDeleteData, SessionDeleteResponses, SessionGetData, SessionGetResponses, SessionUpdateData, SessionUpdateResponses, SessionChildrenData, SessionChildrenResponses, SessionInitData, SessionInitResponses, SessionAbortData, SessionAbortResponses, SessionUnshareData, SessionUnshareResponses, SessionShareData, SessionShareResponses, SessionSummarizeData, SessionSummarizeResponses, SessionMessagesData, SessionMessagesResponses, SessionPromptData, SessionPromptResponses, SessionMessageData, SessionMessageResponses, SessionCommandData, SessionCommandResponses, SessionShellData, SessionShellResponses, SessionRevertData, SessionRevertResponses, SessionUnrevertData, SessionUnrevertResponses, PostSessionIdPermissionsPermissionIdData, PostSessionIdPermissionsPermissionIdResponses, CommandListData, CommandListResponses, ConfigProvidersData, ConfigProvidersResponses, FindTextData, FindTextResponses, FindFilesData, FindFilesResponses, FindSymbolsData, FindSymbolsResponses, FileListData, FileListResponses, FileReadData, FileReadResponses, FileStatusData, FileStatusResponses, AppLogData, AppLogResponses, AppAgentsData, AppAgentsResponses, TuiAppendPromptData, TuiAppendPromptResponses, TuiOpenHelpData, TuiOpenHelpResponses, TuiOpenSessionsData, TuiOpenSessionsResponses, TuiOpenThemesData, TuiOpenThemesResponses, TuiOpenModelsData, TuiOpenModelsResponses, TuiSubmitPromptData, TuiSubmitPromptResponses, TuiClearPromptData, TuiClearPromptResponses, TuiExecuteCommandData, TuiExecuteCommandResponses, 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
|
|
@@ -40,10 +40,6 @@ declare class Config extends _HeyApiClient {
|
|
|
40
40
|
providers<ThrowOnError extends boolean = false>(options?: Options<ConfigProvidersData, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigProvidersResponses, unknown, ThrowOnError, "fields">;
|
|
41
41
|
}
|
|
42
42
|
declare class Tool extends _HeyApiClient {
|
|
43
|
-
/**
|
|
44
|
-
* Register a new HTTP callback tool
|
|
45
|
-
*/
|
|
46
|
-
register<ThrowOnError extends boolean = false>(options?: Options<ToolRegisterData, ThrowOnError>): import("./client/types.gen.js").RequestResult<ToolRegisterResponses, ToolRegisterErrors, ThrowOnError, "fields">;
|
|
47
43
|
/**
|
|
48
44
|
* List all tool IDs (including built-in and dynamically registered)
|
|
49
45
|
*/
|
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -49,19 +49,6 @@ class Config extends _HeyApiClient {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
class Tool extends _HeyApiClient {
|
|
52
|
-
/**
|
|
53
|
-
* Register a new HTTP callback tool
|
|
54
|
-
*/
|
|
55
|
-
register(options) {
|
|
56
|
-
return (options?.client ?? this._client).post({
|
|
57
|
-
url: "/experimental/tool/register",
|
|
58
|
-
...options,
|
|
59
|
-
headers: {
|
|
60
|
-
"Content-Type": "application/json",
|
|
61
|
-
...options?.headers,
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
52
|
/**
|
|
66
53
|
* List all tool IDs (including built-in and dynamically registered)
|
|
67
54
|
*/
|
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -479,32 +479,12 @@ export type Config = {
|
|
|
479
479
|
disable_paste_summary?: boolean;
|
|
480
480
|
};
|
|
481
481
|
};
|
|
482
|
+
export type ToolIds = Array<string>;
|
|
482
483
|
export type _Error = {
|
|
483
484
|
data: {
|
|
484
485
|
[key: string]: unknown;
|
|
485
486
|
};
|
|
486
487
|
};
|
|
487
|
-
export type HttpParamSpec = {
|
|
488
|
-
type: "string" | "number" | "boolean" | "array";
|
|
489
|
-
description?: string;
|
|
490
|
-
optional?: boolean;
|
|
491
|
-
items?: "string" | "number" | "boolean";
|
|
492
|
-
};
|
|
493
|
-
export type HttpToolRegistration = {
|
|
494
|
-
id: string;
|
|
495
|
-
description: string;
|
|
496
|
-
parameters: {
|
|
497
|
-
type: "object";
|
|
498
|
-
properties: {
|
|
499
|
-
[key: string]: HttpParamSpec;
|
|
500
|
-
};
|
|
501
|
-
};
|
|
502
|
-
callbackUrl: string;
|
|
503
|
-
headers?: {
|
|
504
|
-
[key: string]: string;
|
|
505
|
-
};
|
|
506
|
-
};
|
|
507
|
-
export type ToolIds = Array<string>;
|
|
508
488
|
export type ToolListItem = {
|
|
509
489
|
id: string;
|
|
510
490
|
description: string;
|
|
@@ -1093,28 +1073,6 @@ export type ConfigGetResponses = {
|
|
|
1093
1073
|
200: Config;
|
|
1094
1074
|
};
|
|
1095
1075
|
export type ConfigGetResponse = ConfigGetResponses[keyof ConfigGetResponses];
|
|
1096
|
-
export type ToolRegisterData = {
|
|
1097
|
-
body?: HttpToolRegistration;
|
|
1098
|
-
path?: never;
|
|
1099
|
-
query?: {
|
|
1100
|
-
directory?: string;
|
|
1101
|
-
};
|
|
1102
|
-
url: "/experimental/tool/register";
|
|
1103
|
-
};
|
|
1104
|
-
export type ToolRegisterErrors = {
|
|
1105
|
-
/**
|
|
1106
|
-
* Bad request
|
|
1107
|
-
*/
|
|
1108
|
-
400: _Error;
|
|
1109
|
-
};
|
|
1110
|
-
export type ToolRegisterError = ToolRegisterErrors[keyof ToolRegisterErrors];
|
|
1111
|
-
export type ToolRegisterResponses = {
|
|
1112
|
-
/**
|
|
1113
|
-
* Tool registered successfully
|
|
1114
|
-
*/
|
|
1115
|
-
200: boolean;
|
|
1116
|
-
};
|
|
1117
|
-
export type ToolRegisterResponse = ToolRegisterResponses[keyof ToolRegisterResponses];
|
|
1118
1076
|
export type ToolIdsData = {
|
|
1119
1077
|
body?: never;
|
|
1120
1078
|
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.
|
|
4
|
+
"version": "0.10.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit"
|
|
@@ -9,15 +9,18 @@
|
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"development": "./src/index.ts",
|
|
12
|
-
"import": "./dist/index.js"
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
13
14
|
},
|
|
14
15
|
"./client": {
|
|
15
16
|
"development": "./src/client.ts",
|
|
16
|
-
"import": "./dist/client.js"
|
|
17
|
+
"import": "./dist/client.js",
|
|
18
|
+
"types": "./dist/client.d.ts"
|
|
17
19
|
},
|
|
18
20
|
"./server": {
|
|
19
21
|
"development": "./src/server.ts",
|
|
20
|
-
"import": "./dist/server.js"
|
|
22
|
+
"import": "./dist/server.js",
|
|
23
|
+
"types": "./dist/server.d.ts"
|
|
21
24
|
}
|
|
22
25
|
},
|
|
23
26
|
"files": [
|