@opencode-ai/sdk 0.1.0-alpha.13 → 0.1.0-alpha.14

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/client.d.mts +0 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +0 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/core/streaming.d.mts +3 -5
  9. package/core/streaming.d.mts.map +1 -1
  10. package/core/streaming.d.ts +3 -5
  11. package/core/streaming.d.ts.map +1 -1
  12. package/core/streaming.js +10 -16
  13. package/core/streaming.js.map +1 -1
  14. package/core/streaming.mjs +10 -16
  15. package/core/streaming.mjs.map +1 -1
  16. package/internal/parse.js +2 -2
  17. package/internal/parse.js.map +1 -1
  18. package/internal/parse.mjs +2 -2
  19. package/internal/parse.mjs.map +1 -1
  20. package/internal/request-options.d.mts +0 -42
  21. package/internal/request-options.d.mts.map +1 -1
  22. package/internal/request-options.d.ts +0 -42
  23. package/internal/request-options.d.ts.map +1 -1
  24. package/internal/request-options.js.map +1 -1
  25. package/internal/request-options.mjs.map +1 -1
  26. package/package.json +1 -1
  27. package/resources/config.d.mts +4 -0
  28. package/resources/config.d.mts.map +1 -1
  29. package/resources/config.d.ts +4 -0
  30. package/resources/config.d.ts.map +1 -1
  31. package/resources/event.d.mts +11 -1
  32. package/resources/event.d.mts.map +1 -1
  33. package/resources/event.d.ts +11 -1
  34. package/resources/event.d.ts.map +1 -1
  35. package/resources/session.d.mts +8 -4
  36. package/resources/session.d.mts.map +1 -1
  37. package/resources/session.d.ts +8 -4
  38. package/resources/session.d.ts.map +1 -1
  39. package/src/client.ts +0 -2
  40. package/src/core/streaming.ts +8 -22
  41. package/src/internal/parse.ts +2 -2
  42. package/src/internal/request-options.ts +0 -53
  43. package/src/resources/config.ts +5 -0
  44. package/src/resources/event.ts +15 -0
  45. package/src/resources/session.ts +13 -5
  46. package/src/version.ts +1 -1
  47. package/version.d.mts +1 -1
  48. package/version.d.ts +1 -1
  49. package/version.js +1 -1
  50. package/version.mjs +1 -1
@@ -10,70 +10,17 @@ import { type HeadersLike } from './headers';
10
10
  export type FinalRequestOptions = RequestOptions & { method: HTTPMethod; path: string };
11
11
 
12
12
  export type RequestOptions = {
13
- /**
14
- * The HTTP method for the request (e.g., 'get', 'post', 'put', 'delete').
15
- */
16
13
  method?: HTTPMethod;
17
-
18
- /**
19
- * The URL path for the request.
20
- *
21
- * @example "/v1/foo"
22
- */
23
14
  path?: string;
24
-
25
- /**
26
- * Query parameters to include in the request URL.
27
- */
28
15
  query?: object | undefined | null;
29
-
30
- /**
31
- * The request body. Can be a string, JSON object, FormData, or other supported types.
32
- */
33
16
  body?: unknown;
34
-
35
- /**
36
- * HTTP headers to include with the request. Can be a Headers object, plain object, or array of tuples.
37
- */
38
17
  headers?: HeadersLike;
39
-
40
- /**
41
- * The maximum number of times that the client will retry a request in case of a
42
- * temporary failure, like a network error or a 5XX error from the server.
43
- *
44
- * @default 2
45
- */
46
18
  maxRetries?: number;
47
-
48
19
  stream?: boolean | undefined;
49
-
50
- /**
51
- * The maximum amount of time (in milliseconds) that the client should wait for a response
52
- * from the server before timing out a single request.
53
- *
54
- * @unit milliseconds
55
- */
56
20
  timeout?: number;
57
-
58
- /**
59
- * Additional `RequestInit` options to be passed to the underlying `fetch` call.
60
- * These options will be merged with the client's default fetch options.
61
- */
62
21
  fetchOptions?: MergedRequestInit;
63
-
64
- /**
65
- * An AbortSignal that can be used to cancel the request.
66
- */
67
22
  signal?: AbortSignal | undefined | null;
68
-
69
- /**
70
- * A unique key for this request to enable idempotency.
71
- */
72
23
  idempotencyKey?: string;
73
-
74
- /**
75
- * Override the default base URL for this specific request.
76
- */
77
24
  defaultBaseURL?: string | undefined;
78
25
 
79
26
  __binaryResponse?: boolean | undefined;
@@ -43,6 +43,11 @@ export interface Config {
43
43
 
44
44
  experimental?: Config.Experimental;
45
45
 
46
+ /**
47
+ * Additional instruction files or patterns to include
48
+ */
49
+ instructions?: Array<string>;
50
+
46
51
  /**
47
52
  * Custom keybind configurations
48
53
  */
@@ -23,6 +23,7 @@ export type EventListResponse =
23
23
  | EventListResponse.EventStorageWrite
24
24
  | EventListResponse.EventInstallationUpdated
25
25
  | EventListResponse.EventMessageUpdated
26
+ | EventListResponse.EventMessageRemoved
26
27
  | EventListResponse.EventMessagePartUpdated
27
28
  | EventListResponse.EventSessionUpdated
28
29
  | EventListResponse.EventSessionDeleted
@@ -121,6 +122,20 @@ export namespace EventListResponse {
121
122
  }
122
123
  }
123
124
 
125
+ export interface EventMessageRemoved {
126
+ properties: EventMessageRemoved.Properties;
127
+
128
+ type: 'message.removed';
129
+ }
130
+
131
+ export namespace EventMessageRemoved {
132
+ export interface Properties {
133
+ messageID: string;
134
+
135
+ sessionID: string;
136
+ }
137
+ }
138
+
124
139
  export interface EventMessagePartUpdated {
125
140
  properties: EventMessagePartUpdated.Properties;
126
141
 
@@ -114,7 +114,7 @@ export namespace Message {
114
114
 
115
115
  error?: Shared.ProviderAuthError | Shared.UnknownError | Metadata.MessageOutputLengthError;
116
116
 
117
- user?: Metadata.User;
117
+ snapshot?: string;
118
118
  }
119
119
 
120
120
  export namespace Metadata {
@@ -129,6 +129,8 @@ export namespace Message {
129
129
 
130
130
  title: string;
131
131
 
132
+ snapshot?: string;
133
+
132
134
  [k: string]: unknown;
133
135
  }
134
136
 
@@ -187,10 +189,6 @@ export namespace Message {
187
189
 
188
190
  name: 'MessageOutputLengthError';
189
191
  }
190
-
191
- export interface User {
192
- snapshot?: string;
193
- }
194
192
  }
195
193
  }
196
194
 
@@ -221,6 +219,8 @@ export interface Session {
221
219
 
222
220
  parentID?: string;
223
221
 
222
+ revert?: Session.Revert;
223
+
224
224
  share?: Session.Share;
225
225
  }
226
226
 
@@ -231,6 +231,14 @@ export namespace Session {
231
231
  updated: number;
232
232
  }
233
233
 
234
+ export interface Revert {
235
+ messageID: string;
236
+
237
+ part: number;
238
+
239
+ snapshot?: string;
240
+ }
241
+
234
242
  export interface Share {
235
243
  url: string;
236
244
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-alpha.13'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.14'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.13";
1
+ export declare const VERSION = "0.1.0-alpha.14";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.13";
1
+ export declare const VERSION = "0.1.0-alpha.14";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.0-alpha.13'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-alpha.14'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.0-alpha.13'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.14'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map