@opencode-ai/sdk 0.9.10 → 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.
@@ -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, ToolRegisterData, ToolRegisterResponses, ToolRegisterErrors, 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";
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
  */
@@ -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
  */
@@ -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;
@@ -609,9 +589,6 @@ export type TextPart = {
609
589
  type: "text";
610
590
  text: string;
611
591
  synthetic?: boolean;
612
- metadata?: {
613
- [key: string]: unknown;
614
- };
615
592
  time?: {
616
593
  start: number;
617
594
  end?: number;
@@ -723,9 +700,6 @@ export type ToolPart = {
723
700
  callID: string;
724
701
  tool: string;
725
702
  state: ToolState;
726
- metadata?: {
727
- [key: string]: unknown;
728
- };
729
703
  };
730
704
  export type StepStartPart = {
731
705
  id: string;
@@ -782,9 +756,6 @@ export type TextPartInput = {
782
756
  type: "text";
783
757
  text: string;
784
758
  synthetic?: boolean;
785
- metadata?: {
786
- [key: string]: unknown;
787
- };
788
759
  time?: {
789
760
  start: number;
790
761
  end?: number;
@@ -1102,28 +1073,6 @@ export type ConfigGetResponses = {
1102
1073
  200: Config;
1103
1074
  };
1104
1075
  export type ConfigGetResponse = ConfigGetResponses[keyof ConfigGetResponses];
1105
- export type ToolRegisterData = {
1106
- body?: HttpToolRegistration;
1107
- path?: never;
1108
- query?: {
1109
- directory?: string;
1110
- };
1111
- url: "/experimental/tool/register";
1112
- };
1113
- export type ToolRegisterErrors = {
1114
- /**
1115
- * Bad request
1116
- */
1117
- 400: _Error;
1118
- };
1119
- export type ToolRegisterError = ToolRegisterErrors[keyof ToolRegisterErrors];
1120
- export type ToolRegisterResponses = {
1121
- /**
1122
- * Tool registered successfully
1123
- */
1124
- 200: boolean;
1125
- };
1126
- export type ToolRegisterResponse = ToolRegisterResponses[keyof ToolRegisterResponses];
1127
1076
  export type ToolIdsData = {
1128
1077
  body?: never;
1129
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.9.10",
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": [