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

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 (74) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/client.d.mts +7 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/core/streaming.d.mts +5 -3
  11. package/core/streaming.d.mts.map +1 -1
  12. package/core/streaming.d.ts +5 -3
  13. package/core/streaming.d.ts.map +1 -1
  14. package/core/streaming.js +16 -10
  15. package/core/streaming.js.map +1 -1
  16. package/core/streaming.mjs +16 -10
  17. package/core/streaming.mjs.map +1 -1
  18. package/internal/parse.js +2 -2
  19. package/internal/parse.js.map +1 -1
  20. package/internal/parse.mjs +2 -2
  21. package/internal/parse.mjs.map +1 -1
  22. package/internal/request-options.d.mts +42 -0
  23. package/internal/request-options.d.mts.map +1 -1
  24. package/internal/request-options.d.ts +42 -0
  25. package/internal/request-options.d.ts.map +1 -1
  26. package/internal/request-options.js.map +1 -1
  27. package/internal/request-options.mjs.map +1 -1
  28. package/package.json +1 -1
  29. package/resources/event.d.mts +11 -1
  30. package/resources/event.d.mts.map +1 -1
  31. package/resources/event.d.ts +11 -1
  32. package/resources/event.d.ts.map +1 -1
  33. package/resources/file.d.mts +22 -6
  34. package/resources/file.d.mts.map +1 -1
  35. package/resources/file.d.ts +22 -6
  36. package/resources/file.d.ts.map +1 -1
  37. package/resources/file.js +8 -2
  38. package/resources/file.js.map +1 -1
  39. package/resources/file.mjs +8 -2
  40. package/resources/file.mjs.map +1 -1
  41. package/resources/find.d.mts +60 -0
  42. package/resources/find.d.mts.map +1 -0
  43. package/resources/find.d.ts +60 -0
  44. package/resources/find.d.ts.map +1 -0
  45. package/resources/find.js +27 -0
  46. package/resources/find.js.map +1 -0
  47. package/resources/find.mjs +23 -0
  48. package/resources/find.mjs.map +1 -0
  49. package/resources/index.d.mts +2 -1
  50. package/resources/index.d.mts.map +1 -1
  51. package/resources/index.d.ts +2 -1
  52. package/resources/index.d.ts.map +1 -1
  53. package/resources/index.js +3 -1
  54. package/resources/index.js.map +1 -1
  55. package/resources/index.mjs +1 -0
  56. package/resources/index.mjs.map +1 -1
  57. package/resources/session.d.mts +4 -0
  58. package/resources/session.d.mts.map +1 -1
  59. package/resources/session.d.ts +4 -0
  60. package/resources/session.d.ts.map +1 -1
  61. package/src/client.ts +27 -3
  62. package/src/core/streaming.ts +22 -8
  63. package/src/internal/parse.ts +2 -2
  64. package/src/internal/request-options.ts +53 -0
  65. package/src/resources/event.ts +16 -1
  66. package/src/resources/file.ts +35 -6
  67. package/src/resources/find.ts +95 -0
  68. package/src/resources/index.ts +10 -1
  69. package/src/resources/session.ts +6 -0
  70. package/src/version.ts +1 -1
  71. package/version.d.mts +1 -1
  72. package/version.d.ts +1 -1
  73. package/version.js +1 -1
  74. package/version.mjs +1 -1
@@ -0,0 +1,95 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class Find extends APIResource {
8
+ /**
9
+ * Find files
10
+ */
11
+ files(query: FindFilesParams, options?: RequestOptions): APIPromise<FindFilesResponse> {
12
+ return this._client.get('/find/file', { query, ...options });
13
+ }
14
+
15
+ /**
16
+ * Find workspace symbols
17
+ */
18
+ symbols(query: FindSymbolsParams, options?: RequestOptions): APIPromise<FindSymbolsResponse> {
19
+ return this._client.get('/find/symbol', { query, ...options });
20
+ }
21
+
22
+ /**
23
+ * Find text in files
24
+ */
25
+ text(query: FindTextParams, options?: RequestOptions): APIPromise<FindTextResponse> {
26
+ return this._client.get('/find', { query, ...options });
27
+ }
28
+ }
29
+
30
+ export type FindFilesResponse = Array<string>;
31
+
32
+ export type FindSymbolsResponse = Array<unknown>;
33
+
34
+ export type FindTextResponse = Array<FindTextResponse.FindTextResponseItem>;
35
+
36
+ export namespace FindTextResponse {
37
+ export interface FindTextResponseItem {
38
+ absolute_offset: number;
39
+
40
+ line_number: number;
41
+
42
+ lines: FindTextResponseItem.Lines;
43
+
44
+ path: FindTextResponseItem.Path;
45
+
46
+ submatches: Array<FindTextResponseItem.Submatch>;
47
+ }
48
+
49
+ export namespace FindTextResponseItem {
50
+ export interface Lines {
51
+ text: string;
52
+ }
53
+
54
+ export interface Path {
55
+ text: string;
56
+ }
57
+
58
+ export interface Submatch {
59
+ end: number;
60
+
61
+ match: Submatch.Match;
62
+
63
+ start: number;
64
+ }
65
+
66
+ export namespace Submatch {
67
+ export interface Match {
68
+ text: string;
69
+ }
70
+ }
71
+ }
72
+ }
73
+
74
+ export interface FindFilesParams {
75
+ query: string;
76
+ }
77
+
78
+ export interface FindSymbolsParams {
79
+ query: string;
80
+ }
81
+
82
+ export interface FindTextParams {
83
+ pattern: string;
84
+ }
85
+
86
+ export declare namespace Find {
87
+ export {
88
+ type FindFilesResponse as FindFilesResponse,
89
+ type FindSymbolsResponse as FindSymbolsResponse,
90
+ type FindTextResponse as FindTextResponse,
91
+ type FindFilesParams as FindFilesParams,
92
+ type FindSymbolsParams as FindSymbolsParams,
93
+ type FindTextParams as FindTextParams,
94
+ };
95
+ }
@@ -13,7 +13,16 @@ export {
13
13
  type ConfigProvidersResponse,
14
14
  } from './config';
15
15
  export { Event, type EventListResponse } from './event';
16
- export { File, type FileSearchResponse, type FileSearchParams } from './file';
16
+ export { File, type FileReadResponse, type FileStatusResponse, type FileReadParams } from './file';
17
+ export {
18
+ Find,
19
+ type FindFilesResponse,
20
+ type FindSymbolsResponse,
21
+ type FindTextResponse,
22
+ type FindFilesParams,
23
+ type FindSymbolsParams,
24
+ type FindTextParams,
25
+ } from './find';
17
26
  export {
18
27
  SessionResource,
19
28
  type FilePart,
@@ -113,6 +113,8 @@ export namespace Message {
113
113
  assistant?: Metadata.Assistant;
114
114
 
115
115
  error?: Shared.ProviderAuthError | Shared.UnknownError | Metadata.MessageOutputLengthError;
116
+
117
+ user?: Metadata.User;
116
118
  }
117
119
 
118
120
  export namespace Metadata {
@@ -185,6 +187,10 @@ export namespace Message {
185
187
 
186
188
  name: 'MessageOutputLengthError';
187
189
  }
190
+
191
+ export interface User {
192
+ snapshot?: string;
193
+ }
188
194
  }
189
195
  }
190
196
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-alpha.11'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.13'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.11";
1
+ export declare const VERSION = "0.1.0-alpha.13";
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.11";
1
+ export declare const VERSION = "0.1.0-alpha.13";
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.11'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-alpha.13'; // 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.11'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.13'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map