@opencode-ai/sdk 1.2.23 → 1.2.25

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.
@@ -4,4 +4,5 @@ import { OpencodeClient } from "./gen/sdk.gen.js";
4
4
  export { type Config as OpencodeClientConfig, OpencodeClient };
5
5
  export declare function createOpencodeClient(config?: Config & {
6
6
  directory?: string;
7
+ experimental_workspaceID?: string;
7
8
  }): OpencodeClient;
package/dist/v2/client.js CHANGED
@@ -22,6 +22,12 @@ export function createOpencodeClient(config) {
22
22
  "x-opencode-directory": encodedDirectory,
23
23
  };
24
24
  }
25
+ if (config?.experimental_workspaceID) {
26
+ config.headers = {
27
+ ...config.headers,
28
+ "x-opencode-workspace": config.experimental_workspaceID,
29
+ };
30
+ }
25
31
  const client = createClient(config);
26
32
  return new OpencodeClient({ client });
27
33
  }
@@ -393,6 +393,7 @@ export declare class Session2 extends HeyApiClient {
393
393
  parentID?: string;
394
394
  title?: string;
395
395
  permission?: PermissionRuleset;
396
+ workspaceID?: string;
396
397
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionCreateResponses, SessionCreateErrors, ThrowOnError, "fields">;
397
398
  /**
398
399
  * Get session status
@@ -752,6 +752,7 @@ export class Session2 extends HeyApiClient {
752
752
  { in: "body", key: "parentID" },
753
753
  { in: "body", key: "title" },
754
754
  { in: "body", key: "permission" },
755
+ { in: "body", key: "workspaceID" },
755
756
  ],
756
757
  },
757
758
  ]);
@@ -1001,7 +1001,11 @@ export type ProviderConfig = {
1001
1001
  * Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.
1002
1002
  */
1003
1003
  timeout?: number | false;
1004
- [key: string]: unknown | string | boolean | number | false | undefined;
1004
+ /**
1005
+ * Timeout in milliseconds between streamed SSE chunks for this provider. If no chunk arrives within this window, the request is aborted.
1006
+ */
1007
+ chunkTimeout?: number;
1008
+ [key: string]: unknown | string | boolean | number | false | number | undefined;
1005
1009
  };
1006
1010
  };
1007
1011
  export type McpLocalConfig = {
@@ -2341,6 +2345,7 @@ export type SessionCreateData = {
2341
2345
  parentID?: string;
2342
2346
  title?: string;
2343
2347
  permission?: PermissionRuleset;
2348
+ workspaceID?: string;
2344
2349
  };
2345
2350
  path?: never;
2346
2351
  query?: {
@@ -2512,9 +2517,6 @@ export type SessionChildrenResponse = SessionChildrenResponses[keyof SessionChil
2512
2517
  export type SessionTodoData = {
2513
2518
  body?: never;
2514
2519
  path: {
2515
- /**
2516
- * Session ID
2517
- */
2518
2520
  sessionID: string;
2519
2521
  };
2520
2522
  query?: {
@@ -2548,9 +2550,6 @@ export type SessionInitData = {
2548
2550
  messageID: string;
2549
2551
  };
2550
2552
  path: {
2551
- /**
2552
- * Session ID
2553
- */
2554
2553
  sessionID: string;
2555
2554
  };
2556
2555
  query?: {
@@ -2710,9 +2709,6 @@ export type SessionSummarizeData = {
2710
2709
  auto?: boolean;
2711
2710
  };
2712
2711
  path: {
2713
- /**
2714
- * Session ID
2715
- */
2716
2712
  sessionID: string;
2717
2713
  };
2718
2714
  query?: {
@@ -2742,9 +2738,6 @@ export type SessionSummarizeResponse = SessionSummarizeResponses[keyof SessionSu
2742
2738
  export type SessionMessagesData = {
2743
2739
  body?: never;
2744
2740
  path: {
2745
- /**
2746
- * Session ID
2747
- */
2748
2741
  sessionID: string;
2749
2742
  };
2750
2743
  query?: {
@@ -2796,9 +2789,6 @@ export type SessionPromptData = {
2796
2789
  parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
2797
2790
  };
2798
2791
  path: {
2799
- /**
2800
- * Session ID
2801
- */
2802
2792
  sessionID: string;
2803
2793
  };
2804
2794
  query?: {
@@ -2831,13 +2821,7 @@ export type SessionPromptResponse = SessionPromptResponses[keyof SessionPromptRe
2831
2821
  export type SessionDeleteMessageData = {
2832
2822
  body?: never;
2833
2823
  path: {
2834
- /**
2835
- * Session ID
2836
- */
2837
2824
  sessionID: string;
2838
- /**
2839
- * Message ID
2840
- */
2841
2825
  messageID: string;
2842
2826
  };
2843
2827
  query?: {
@@ -2867,13 +2851,7 @@ export type SessionDeleteMessageResponse = SessionDeleteMessageResponses[keyof S
2867
2851
  export type SessionMessageData = {
2868
2852
  body?: never;
2869
2853
  path: {
2870
- /**
2871
- * Session ID
2872
- */
2873
2854
  sessionID: string;
2874
- /**
2875
- * Message ID
2876
- */
2877
2855
  messageID: string;
2878
2856
  };
2879
2857
  query?: {
@@ -2906,17 +2884,8 @@ export type SessionMessageResponse = SessionMessageResponses[keyof SessionMessag
2906
2884
  export type PartDeleteData = {
2907
2885
  body?: never;
2908
2886
  path: {
2909
- /**
2910
- * Session ID
2911
- */
2912
2887
  sessionID: string;
2913
- /**
2914
- * Message ID
2915
- */
2916
2888
  messageID: string;
2917
- /**
2918
- * Part ID
2919
- */
2920
2889
  partID: string;
2921
2890
  };
2922
2891
  query?: {
@@ -2946,17 +2915,8 @@ export type PartDeleteResponse = PartDeleteResponses[keyof PartDeleteResponses];
2946
2915
  export type PartUpdateData = {
2947
2916
  body?: Part;
2948
2917
  path: {
2949
- /**
2950
- * Session ID
2951
- */
2952
2918
  sessionID: string;
2953
- /**
2954
- * Message ID
2955
- */
2956
2919
  messageID: string;
2957
- /**
2958
- * Part ID
2959
- */
2960
2920
  partID: string;
2961
2921
  };
2962
2922
  query?: {
@@ -3004,9 +2964,6 @@ export type SessionPromptAsyncData = {
3004
2964
  parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
3005
2965
  };
3006
2966
  path: {
3007
- /**
3008
- * Session ID
3009
- */
3010
2967
  sessionID: string;
3011
2968
  };
3012
2969
  query?: {
@@ -3051,9 +3008,6 @@ export type SessionCommandData = {
3051
3008
  }>;
3052
3009
  };
3053
3010
  path: {
3054
- /**
3055
- * Session ID
3056
- */
3057
3011
  sessionID: string;
3058
3012
  };
3059
3013
  query?: {
@@ -3093,9 +3047,6 @@ export type SessionShellData = {
3093
3047
  command: string;
3094
3048
  };
3095
3049
  path: {
3096
- /**
3097
- * Session ID
3098
- */
3099
3050
  sessionID: string;
3100
3051
  };
3101
3052
  query?: {
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": "1.2.23",
4
+ "version": "1.2.25",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {