@opencode-ai/sdk 0.1.0-alpha.2 → 0.1.0-alpha.20

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 (300) hide show
  1. package/CHANGELOG.md +173 -0
  2. package/LICENSE +198 -4
  3. package/README.md +27 -9
  4. package/client.d.mts +25 -53
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +25 -53
  7. package/client.d.ts.map +1 -1
  8. package/client.js +25 -55
  9. package/client.js.map +1 -1
  10. package/client.mjs +25 -55
  11. package/client.mjs.map +1 -1
  12. package/core/streaming.d.mts +33 -0
  13. package/core/streaming.d.mts.map +1 -0
  14. package/core/streaming.d.ts +33 -0
  15. package/core/streaming.d.ts.map +1 -0
  16. package/core/streaming.js +263 -0
  17. package/core/streaming.js.map +1 -0
  18. package/core/streaming.mjs +258 -0
  19. package/core/streaming.mjs.map +1 -0
  20. package/internal/decoders/line.d.mts +17 -0
  21. package/internal/decoders/line.d.mts.map +1 -0
  22. package/internal/decoders/line.d.ts +17 -0
  23. package/internal/decoders/line.d.ts.map +1 -0
  24. package/internal/decoders/line.js +113 -0
  25. package/internal/decoders/line.js.map +1 -0
  26. package/internal/decoders/line.mjs +108 -0
  27. package/internal/decoders/line.mjs.map +1 -0
  28. package/internal/parse.d.mts.map +1 -1
  29. package/internal/parse.d.ts.map +1 -1
  30. package/internal/parse.js +10 -0
  31. package/internal/parse.js.map +1 -1
  32. package/internal/parse.mjs +10 -0
  33. package/internal/parse.mjs.map +1 -1
  34. package/internal/request-options.d.mts +44 -0
  35. package/internal/request-options.d.mts.map +1 -1
  36. package/internal/request-options.d.ts +44 -0
  37. package/internal/request-options.d.ts.map +1 -1
  38. package/internal/request-options.js.map +1 -1
  39. package/internal/request-options.mjs.map +1 -1
  40. package/internal/tslib.js +6 -6
  41. package/internal/types.d.mts +8 -6
  42. package/internal/types.d.mts.map +1 -1
  43. package/internal/types.d.ts +8 -6
  44. package/internal/types.d.ts.map +1 -1
  45. package/internal/uploads.js +1 -1
  46. package/internal/uploads.js.map +1 -1
  47. package/internal/uploads.mjs +1 -1
  48. package/internal/uploads.mjs.map +1 -1
  49. package/internal/utils/log.js +1 -1
  50. package/internal/utils/log.js.map +1 -1
  51. package/internal/utils/log.mjs +1 -1
  52. package/internal/utils/log.mjs.map +1 -1
  53. package/internal/utils/path.d.mts.map +1 -1
  54. package/internal/utils/path.d.ts.map +1 -1
  55. package/internal/utils/path.js +26 -5
  56. package/internal/utils/path.js.map +1 -1
  57. package/internal/utils/path.mjs +26 -5
  58. package/internal/utils/path.mjs.map +1 -1
  59. package/package.json +13 -3
  60. package/resources/app.d.mts +130 -0
  61. package/resources/app.d.mts.map +1 -0
  62. package/resources/app.d.ts +130 -0
  63. package/resources/app.d.ts.map +1 -0
  64. package/resources/app.js +39 -0
  65. package/resources/app.js.map +1 -0
  66. package/resources/app.mjs +35 -0
  67. package/resources/app.mjs.map +1 -0
  68. package/resources/config.d.mts +344 -0
  69. package/resources/config.d.mts.map +1 -0
  70. package/resources/config.d.ts +344 -0
  71. package/resources/config.d.ts.map +1 -0
  72. package/resources/{config-get.js → config.js} +6 -6
  73. package/resources/config.js.map +1 -0
  74. package/resources/{config-get.mjs → config.mjs} +4 -4
  75. package/resources/config.mjs.map +1 -0
  76. package/resources/event.d.mts +82 -29
  77. package/resources/event.d.mts.map +1 -1
  78. package/resources/event.d.ts +82 -29
  79. package/resources/event.d.ts.map +1 -1
  80. package/resources/event.js +1 -1
  81. package/resources/event.js.map +1 -1
  82. package/resources/event.mjs +1 -1
  83. package/resources/event.mjs.map +1 -1
  84. package/resources/file.d.mts +31 -0
  85. package/resources/file.d.mts.map +1 -0
  86. package/resources/file.d.ts +31 -0
  87. package/resources/file.d.ts.map +1 -0
  88. package/resources/file.js +21 -0
  89. package/resources/file.js.map +1 -0
  90. package/resources/file.mjs +17 -0
  91. package/resources/file.mjs.map +1 -0
  92. package/resources/find.d.mts +85 -0
  93. package/resources/find.d.mts.map +1 -0
  94. package/resources/find.d.ts +85 -0
  95. package/resources/find.d.ts.map +1 -0
  96. package/resources/find.js +27 -0
  97. package/resources/find.js.map +1 -0
  98. package/resources/find.mjs +23 -0
  99. package/resources/find.mjs.map +1 -0
  100. package/resources/index.d.mts +6 -16
  101. package/resources/index.d.mts.map +1 -1
  102. package/resources/index.d.ts +6 -16
  103. package/resources/index.d.ts.map +1 -1
  104. package/resources/index.js +13 -33
  105. package/resources/index.js.map +1 -1
  106. package/resources/index.mjs +6 -16
  107. package/resources/index.mjs.map +1 -1
  108. package/resources/session.d.mts +272 -0
  109. package/resources/session.d.mts.map +1 -0
  110. package/resources/session.d.ts +272 -0
  111. package/resources/session.d.ts.map +1 -0
  112. package/resources/session.js +70 -0
  113. package/resources/session.js.map +1 -0
  114. package/resources/session.mjs +66 -0
  115. package/resources/session.mjs.map +1 -0
  116. package/resources/shared.d.mts +24 -0
  117. package/resources/shared.d.mts.map +1 -0
  118. package/resources/shared.d.ts +24 -0
  119. package/resources/shared.d.ts.map +1 -0
  120. package/resources/shared.js +4 -0
  121. package/resources/shared.js.map +1 -0
  122. package/resources/shared.mjs +3 -0
  123. package/resources/shared.mjs.map +1 -0
  124. package/src/client.ts +145 -128
  125. package/src/core/streaming.ts +315 -0
  126. package/src/internal/decoders/line.ts +135 -0
  127. package/src/internal/parse.ts +14 -0
  128. package/src/internal/request-options.ts +55 -0
  129. package/src/internal/types.ts +9 -6
  130. package/src/internal/uploads.ts +1 -1
  131. package/src/internal/utils/log.ts +1 -1
  132. package/src/internal/utils/path.ts +32 -7
  133. package/src/resources/app.ts +196 -0
  134. package/src/resources/config.ts +431 -0
  135. package/src/resources/event.ts +119 -39
  136. package/src/resources/file.ts +52 -0
  137. package/src/resources/find.ts +133 -0
  138. package/src/resources/index.ts +65 -32
  139. package/src/resources/session.ts +457 -0
  140. package/src/resources/shared.ts +33 -0
  141. package/src/streaming.ts +2 -0
  142. package/src/version.ts +1 -1
  143. package/streaming.d.mts +2 -0
  144. package/streaming.d.mts.map +1 -0
  145. package/streaming.d.ts +2 -0
  146. package/streaming.d.ts.map +1 -0
  147. package/streaming.js +6 -0
  148. package/streaming.js.map +1 -0
  149. package/streaming.mjs +2 -0
  150. package/streaming.mjs.map +1 -0
  151. package/version.d.mts +1 -1
  152. package/version.d.mts.map +1 -1
  153. package/version.d.ts +1 -1
  154. package/version.d.ts.map +1 -1
  155. package/version.js +1 -1
  156. package/version.js.map +1 -1
  157. package/version.mjs +1 -1
  158. package/version.mjs.map +1 -1
  159. package/resources/app-info.d.mts +0 -31
  160. package/resources/app-info.d.mts.map +0 -1
  161. package/resources/app-info.d.ts +0 -31
  162. package/resources/app-info.d.ts.map +0 -1
  163. package/resources/app-info.js +0 -15
  164. package/resources/app-info.js.map +0 -1
  165. package/resources/app-info.mjs +0 -11
  166. package/resources/app-info.mjs.map +0 -1
  167. package/resources/app-initialize.d.mts +0 -14
  168. package/resources/app-initialize.d.mts.map +0 -1
  169. package/resources/app-initialize.d.ts +0 -14
  170. package/resources/app-initialize.d.ts.map +0 -1
  171. package/resources/app-initialize.js +0 -15
  172. package/resources/app-initialize.js.map +0 -1
  173. package/resources/app-initialize.mjs +0 -11
  174. package/resources/app-initialize.mjs.map +0 -1
  175. package/resources/config-get.d.mts +0 -236
  176. package/resources/config-get.d.mts.map +0 -1
  177. package/resources/config-get.d.ts +0 -236
  178. package/resources/config-get.d.ts.map +0 -1
  179. package/resources/config-get.js.map +0 -1
  180. package/resources/config-get.mjs.map +0 -1
  181. package/resources/file-search.d.mts +0 -17
  182. package/resources/file-search.d.mts.map +0 -1
  183. package/resources/file-search.d.ts +0 -17
  184. package/resources/file-search.d.ts.map +0 -1
  185. package/resources/file-search.js +0 -15
  186. package/resources/file-search.js.map +0 -1
  187. package/resources/file-search.mjs +0 -11
  188. package/resources/file-search.mjs.map +0 -1
  189. package/resources/installation-info.d.mts +0 -17
  190. package/resources/installation-info.d.mts.map +0 -1
  191. package/resources/installation-info.d.ts +0 -17
  192. package/resources/installation-info.d.ts.map +0 -1
  193. package/resources/installation-info.js +0 -15
  194. package/resources/installation-info.js.map +0 -1
  195. package/resources/installation-info.mjs +0 -11
  196. package/resources/installation-info.mjs.map +0 -1
  197. package/resources/path-get.d.mts +0 -19
  198. package/resources/path-get.d.mts.map +0 -1
  199. package/resources/path-get.d.ts +0 -19
  200. package/resources/path-get.d.ts.map +0 -1
  201. package/resources/path-get.js +0 -15
  202. package/resources/path-get.js.map +0 -1
  203. package/resources/path-get.mjs +0 -11
  204. package/resources/path-get.mjs.map +0 -1
  205. package/resources/provider-list.d.mts +0 -58
  206. package/resources/provider-list.d.mts.map +0 -1
  207. package/resources/provider-list.d.ts +0 -58
  208. package/resources/provider-list.d.ts.map +0 -1
  209. package/resources/provider-list.js +0 -15
  210. package/resources/provider-list.js.map +0 -1
  211. package/resources/provider-list.mjs +0 -11
  212. package/resources/provider-list.mjs.map +0 -1
  213. package/resources/session-abort.d.mts +0 -17
  214. package/resources/session-abort.d.mts.map +0 -1
  215. package/resources/session-abort.d.ts +0 -17
  216. package/resources/session-abort.d.ts.map +0 -1
  217. package/resources/session-abort.js +0 -15
  218. package/resources/session-abort.js.map +0 -1
  219. package/resources/session-abort.mjs +0 -11
  220. package/resources/session-abort.mjs.map +0 -1
  221. package/resources/session-chat.d.mts +0 -160
  222. package/resources/session-chat.d.mts.map +0 -1
  223. package/resources/session-chat.d.ts +0 -160
  224. package/resources/session-chat.d.ts.map +0 -1
  225. package/resources/session-chat.js +0 -15
  226. package/resources/session-chat.js.map +0 -1
  227. package/resources/session-chat.mjs +0 -11
  228. package/resources/session-chat.mjs.map +0 -1
  229. package/resources/session-create.d.mts +0 -30
  230. package/resources/session-create.d.mts.map +0 -1
  231. package/resources/session-create.d.ts +0 -30
  232. package/resources/session-create.d.ts.map +0 -1
  233. package/resources/session-create.js +0 -15
  234. package/resources/session-create.js.map +0 -1
  235. package/resources/session-create.mjs +0 -11
  236. package/resources/session-create.mjs.map +0 -1
  237. package/resources/session-initialize.d.mts +0 -19
  238. package/resources/session-initialize.d.mts.map +0 -1
  239. package/resources/session-initialize.d.ts +0 -19
  240. package/resources/session-initialize.d.ts.map +0 -1
  241. package/resources/session-initialize.js +0 -15
  242. package/resources/session-initialize.js.map +0 -1
  243. package/resources/session-initialize.mjs +0 -11
  244. package/resources/session-initialize.mjs.map +0 -1
  245. package/resources/session-list.d.mts +0 -15
  246. package/resources/session-list.d.mts.map +0 -1
  247. package/resources/session-list.d.ts +0 -15
  248. package/resources/session-list.d.ts.map +0 -1
  249. package/resources/session-list.js +0 -15
  250. package/resources/session-list.js.map +0 -1
  251. package/resources/session-list.mjs +0 -11
  252. package/resources/session-list.mjs.map +0 -1
  253. package/resources/session-messages.d.mts +0 -18
  254. package/resources/session-messages.d.mts.map +0 -1
  255. package/resources/session-messages.d.ts +0 -18
  256. package/resources/session-messages.d.ts.map +0 -1
  257. package/resources/session-messages.js +0 -15
  258. package/resources/session-messages.js.map +0 -1
  259. package/resources/session-messages.mjs +0 -11
  260. package/resources/session-messages.mjs.map +0 -1
  261. package/resources/session-share.d.mts +0 -17
  262. package/resources/session-share.d.mts.map +0 -1
  263. package/resources/session-share.d.ts +0 -17
  264. package/resources/session-share.d.ts.map +0 -1
  265. package/resources/session-share.js +0 -15
  266. package/resources/session-share.js.map +0 -1
  267. package/resources/session-share.mjs +0 -11
  268. package/resources/session-share.mjs.map +0 -1
  269. package/resources/session-summarize.d.mts +0 -19
  270. package/resources/session-summarize.d.mts.map +0 -1
  271. package/resources/session-summarize.d.ts +0 -19
  272. package/resources/session-summarize.d.ts.map +0 -1
  273. package/resources/session-summarize.js +0 -15
  274. package/resources/session-summarize.js.map +0 -1
  275. package/resources/session-summarize.mjs +0 -11
  276. package/resources/session-summarize.mjs.map +0 -1
  277. package/resources/session-unshare.d.mts +0 -17
  278. package/resources/session-unshare.d.mts.map +0 -1
  279. package/resources/session-unshare.d.ts +0 -17
  280. package/resources/session-unshare.d.ts.map +0 -1
  281. package/resources/session-unshare.js +0 -15
  282. package/resources/session-unshare.js.map +0 -1
  283. package/resources/session-unshare.mjs +0 -11
  284. package/resources/session-unshare.mjs.map +0 -1
  285. package/src/resources/app-info.ts +0 -46
  286. package/src/resources/app-initialize.ts +0 -20
  287. package/src/resources/config-get.ts +0 -294
  288. package/src/resources/file-search.ts +0 -27
  289. package/src/resources/installation-info.ts +0 -24
  290. package/src/resources/path-get.ts +0 -28
  291. package/src/resources/provider-list.ts +0 -80
  292. package/src/resources/session-abort.ts +0 -27
  293. package/src/resources/session-chat.ts +0 -250
  294. package/src/resources/session-create.ts +0 -44
  295. package/src/resources/session-initialize.ts +0 -34
  296. package/src/resources/session-list.ts +0 -21
  297. package/src/resources/session-messages.ts +0 -31
  298. package/src/resources/session-share.ts +0 -23
  299. package/src/resources/session-summarize.ts +0 -34
  300. package/src/resources/session-unshare.ts +0 -26
@@ -1,57 +1,37 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
- import * as SessionChatAPI from './session-chat';
5
- import * as SessionCreateAPI from './session-create';
4
+ import * as SessionAPI from './session';
5
+ import * as Shared from './shared';
6
6
  import { APIPromise } from '../core/api-promise';
7
+ import { Stream } from '../core/streaming';
7
8
  import { RequestOptions } from '../internal/request-options';
8
9
 
9
10
  export class Event extends APIResource {
10
11
  /**
11
12
  * Get events
12
13
  */
13
- list(options?: RequestOptions): APIPromise<EventListResponse> {
14
- return this._client.get('/event', options);
14
+ list(options?: RequestOptions): APIPromise<Stream<EventListResponse>> {
15
+ return this._client.get('/event', { ...options, stream: true }) as APIPromise<Stream<EventListResponse>>;
15
16
  }
16
17
  }
17
18
 
18
19
  export type EventListResponse =
19
- | EventListResponse.EventStorageWrite
20
- | EventListResponse.EventInstallationUpdated
21
20
  | EventListResponse.EventLspClientDiagnostics
22
21
  | EventListResponse.EventPermissionUpdated
22
+ | EventListResponse.EventFileEdited
23
+ | EventListResponse.EventInstallationUpdated
23
24
  | EventListResponse.EventMessageUpdated
25
+ | EventListResponse.EventMessageRemoved
24
26
  | EventListResponse.EventMessagePartUpdated
27
+ | EventListResponse.EventStorageWrite
25
28
  | EventListResponse.EventSessionUpdated
26
- | EventListResponse.EventSessionError;
29
+ | EventListResponse.EventSessionDeleted
30
+ | EventListResponse.EventSessionIdle
31
+ | EventListResponse.EventSessionError
32
+ | EventListResponse.EventFileWatcherUpdated;
27
33
 
28
34
  export namespace EventListResponse {
29
- export interface EventStorageWrite {
30
- properties: EventStorageWrite.Properties;
31
-
32
- type: 'storage.write';
33
- }
34
-
35
- export namespace EventStorageWrite {
36
- export interface Properties {
37
- key: string;
38
-
39
- content?: unknown;
40
- }
41
- }
42
-
43
- export interface EventInstallationUpdated {
44
- properties: EventInstallationUpdated.Properties;
45
-
46
- type: 'installation.updated';
47
- }
48
-
49
- export namespace EventInstallationUpdated {
50
- export interface Properties {
51
- version: string;
52
- }
53
- }
54
-
55
35
  export interface EventLspClientDiagnostics {
56
36
  properties: EventLspClientDiagnostics.Properties;
57
37
 
@@ -92,6 +72,30 @@ export namespace EventListResponse {
92
72
  }
93
73
  }
94
74
 
75
+ export interface EventFileEdited {
76
+ properties: EventFileEdited.Properties;
77
+
78
+ type: 'file.edited';
79
+ }
80
+
81
+ export namespace EventFileEdited {
82
+ export interface Properties {
83
+ file: string;
84
+ }
85
+ }
86
+
87
+ export interface EventInstallationUpdated {
88
+ properties: EventInstallationUpdated.Properties;
89
+
90
+ type: 'installation.updated';
91
+ }
92
+
93
+ export namespace EventInstallationUpdated {
94
+ export interface Properties {
95
+ version: string;
96
+ }
97
+ }
98
+
95
99
  export interface EventMessageUpdated {
96
100
  properties: EventMessageUpdated.Properties;
97
101
 
@@ -100,7 +104,21 @@ export namespace EventListResponse {
100
104
 
101
105
  export namespace EventMessageUpdated {
102
106
  export interface Properties {
103
- info: SessionChatAPI.MessageInfo;
107
+ info: SessionAPI.Message;
108
+ }
109
+ }
110
+
111
+ export interface EventMessageRemoved {
112
+ properties: EventMessageRemoved.Properties;
113
+
114
+ type: 'message.removed';
115
+ }
116
+
117
+ export namespace EventMessageRemoved {
118
+ export interface Properties {
119
+ messageID: string;
120
+
121
+ sessionID: string;
104
122
  }
105
123
  }
106
124
 
@@ -112,11 +130,21 @@ export namespace EventListResponse {
112
130
 
113
131
  export namespace EventMessagePartUpdated {
114
132
  export interface Properties {
115
- messageID: string;
133
+ part: SessionAPI.Part;
134
+ }
135
+ }
136
+
137
+ export interface EventStorageWrite {
138
+ properties: EventStorageWrite.Properties;
116
139
 
117
- part: SessionChatAPI.MessagePart;
140
+ type: 'storage.write';
141
+ }
118
142
 
119
- sessionID: string;
143
+ export namespace EventStorageWrite {
144
+ export interface Properties {
145
+ key: string;
146
+
147
+ content?: unknown;
120
148
  }
121
149
  }
122
150
 
@@ -128,7 +156,31 @@ export namespace EventListResponse {
128
156
 
129
157
  export namespace EventSessionUpdated {
130
158
  export interface Properties {
131
- info: SessionCreateAPI.SessionInfo;
159
+ info: SessionAPI.Session;
160
+ }
161
+ }
162
+
163
+ export interface EventSessionDeleted {
164
+ properties: EventSessionDeleted.Properties;
165
+
166
+ type: 'session.deleted';
167
+ }
168
+
169
+ export namespace EventSessionDeleted {
170
+ export interface Properties {
171
+ info: SessionAPI.Session;
172
+ }
173
+ }
174
+
175
+ export interface EventSessionIdle {
176
+ properties: EventSessionIdle.Properties;
177
+
178
+ type: 'session.idle';
179
+ }
180
+
181
+ export namespace EventSessionIdle {
182
+ export interface Properties {
183
+ sessionID: string;
132
184
  }
133
185
  }
134
186
 
@@ -140,7 +192,35 @@ export namespace EventListResponse {
140
192
 
141
193
  export namespace EventSessionError {
142
194
  export interface Properties {
143
- error?: SessionChatAPI.ProviderAuthError | SessionChatAPI.UnknownError;
195
+ error?:
196
+ | Shared.ProviderAuthError
197
+ | Shared.UnknownError
198
+ | Properties.MessageOutputLengthError
199
+ | Shared.MessageAbortedError;
200
+
201
+ sessionID?: string;
202
+ }
203
+
204
+ export namespace Properties {
205
+ export interface MessageOutputLengthError {
206
+ data: unknown;
207
+
208
+ name: 'MessageOutputLengthError';
209
+ }
210
+ }
211
+ }
212
+
213
+ export interface EventFileWatcherUpdated {
214
+ properties: EventFileWatcherUpdated.Properties;
215
+
216
+ type: 'file.watcher.updated';
217
+ }
218
+
219
+ export namespace EventFileWatcherUpdated {
220
+ export interface Properties {
221
+ event: 'rename' | 'change';
222
+
223
+ file: string;
144
224
  }
145
225
  }
146
226
  }
@@ -0,0 +1,52 @@
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 FileResource extends APIResource {
8
+ /**
9
+ * Read a file
10
+ */
11
+ read(query: FileReadParams, options?: RequestOptions): APIPromise<FileReadResponse> {
12
+ return this._client.get('/file', { query, ...options });
13
+ }
14
+
15
+ /**
16
+ * Get file status
17
+ */
18
+ status(options?: RequestOptions): APIPromise<FileStatusResponse> {
19
+ return this._client.get('/file/status', options);
20
+ }
21
+ }
22
+
23
+ export interface File {
24
+ added: number;
25
+
26
+ path: string;
27
+
28
+ removed: number;
29
+
30
+ status: 'added' | 'deleted' | 'modified';
31
+ }
32
+
33
+ export interface FileReadResponse {
34
+ content: string;
35
+
36
+ type: 'raw' | 'patch';
37
+ }
38
+
39
+ export type FileStatusResponse = Array<File>;
40
+
41
+ export interface FileReadParams {
42
+ path: string;
43
+ }
44
+
45
+ export declare namespace FileResource {
46
+ export {
47
+ type File as File,
48
+ type FileReadResponse as FileReadResponse,
49
+ type FileStatusResponse as FileStatusResponse,
50
+ type FileReadParams as FileReadParams,
51
+ };
52
+ }
@@ -0,0 +1,133 @@
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 interface Match {
31
+ absolute_offset: number;
32
+
33
+ line_number: number;
34
+
35
+ lines: Match.Lines;
36
+
37
+ path: Match.Path;
38
+
39
+ submatches: Array<Match.Submatch>;
40
+ }
41
+
42
+ export namespace Match {
43
+ export interface Lines {
44
+ text: string;
45
+ }
46
+
47
+ export interface Path {
48
+ text: string;
49
+ }
50
+
51
+ export interface Submatch {
52
+ end: number;
53
+
54
+ match: Submatch.Match;
55
+
56
+ start: number;
57
+ }
58
+
59
+ export namespace Submatch {
60
+ export interface Match {
61
+ text: string;
62
+ }
63
+ }
64
+ }
65
+
66
+ export interface Symbol {
67
+ kind: number;
68
+
69
+ location: Symbol.Location;
70
+
71
+ name: string;
72
+ }
73
+
74
+ export namespace Symbol {
75
+ export interface Location {
76
+ range: Location.Range;
77
+
78
+ uri: string;
79
+ }
80
+
81
+ export namespace Location {
82
+ export interface Range {
83
+ end: Range.End;
84
+
85
+ start: Range.Start;
86
+ }
87
+
88
+ export namespace Range {
89
+ export interface End {
90
+ character: number;
91
+
92
+ line: number;
93
+ }
94
+
95
+ export interface Start {
96
+ character: number;
97
+
98
+ line: number;
99
+ }
100
+ }
101
+ }
102
+ }
103
+
104
+ export type FindFilesResponse = Array<string>;
105
+
106
+ export type FindSymbolsResponse = Array<Symbol>;
107
+
108
+ export type FindTextResponse = Array<Match>;
109
+
110
+ export interface FindFilesParams {
111
+ query: string;
112
+ }
113
+
114
+ export interface FindSymbolsParams {
115
+ query: string;
116
+ }
117
+
118
+ export interface FindTextParams {
119
+ pattern: string;
120
+ }
121
+
122
+ export declare namespace Find {
123
+ export {
124
+ type Match as Match,
125
+ type Symbol as Symbol,
126
+ type FindFilesResponse as FindFilesResponse,
127
+ type FindSymbolsResponse as FindSymbolsResponse,
128
+ type FindTextResponse as FindTextResponse,
129
+ type FindFilesParams as FindFilesParams,
130
+ type FindSymbolsParams as FindSymbolsParams,
131
+ type FindTextParams as FindTextParams,
132
+ };
133
+ }
@@ -1,38 +1,71 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { AppInfo, type AppInfoCreateResponse } from './app-info';
4
- export { AppInitialize, type AppInitializeInitializeResponse } from './app-initialize';
5
- export { ConfigGet, type ConfigGetRetrieveResponse } from './config-get';
6
- export { Event, type EventListResponse } from './event';
7
- export { FileSearch, type FileSearchSearchResponse, type FileSearchSearchParams } from './file-search';
8
- export { InstallationInfo, type InstallationInfoCreateResponse } from './installation-info';
9
- export { PathGet, type PathGetCreateResponse } from './path-get';
10
- export { ProviderList, type ProviderListCreateResponse } from './provider-list';
11
- export { SessionAbort, type SessionAbortAbortResponse, type SessionAbortAbortParams } from './session-abort';
3
+ export * from './shared';
4
+ export {
5
+ AppResource,
6
+ type App,
7
+ type LogLevel,
8
+ type Mode,
9
+ type Model,
10
+ type Provider,
11
+ type AppInitResponse,
12
+ type AppLogResponse,
13
+ type AppModesResponse,
14
+ type AppProvidersResponse,
15
+ type AppLogParams,
16
+ } from './app';
12
17
  export {
13
- SessionChat,
14
- type MessageInfo,
15
- type MessagePart,
16
- type ProviderAuthError,
17
- type UnknownError,
18
- type SessionChatCreateParams,
19
- } from './session-chat';
20
- export { SessionCreate, type SessionInfo } from './session-create';
18
+ ConfigResource,
19
+ type Config,
20
+ type KeybindsConfig,
21
+ type LayoutConfig,
22
+ type McpLocalConfig,
23
+ type McpRemoteConfig,
24
+ type ModeConfig,
25
+ } from './config';
26
+ export { Event, type EventListResponse } from './event';
21
27
  export {
22
- SessionInitialize,
23
- type SessionInitializeCreateResponse,
24
- type SessionInitializeCreateParams,
25
- } from './session-initialize';
26
- export { SessionList, type SessionListCreateResponse } from './session-list';
28
+ FileResource,
29
+ type File,
30
+ type FileReadResponse,
31
+ type FileStatusResponse,
32
+ type FileReadParams,
33
+ } from './file';
27
34
  export {
28
- SessionMessages,
29
- type SessionMessageCreateResponse,
30
- type SessionMessageCreateParams,
31
- } from './session-messages';
32
- export { SessionShare, type SessionShareCreateParams } from './session-share';
35
+ Find,
36
+ type Match,
37
+ type Symbol,
38
+ type FindFilesResponse,
39
+ type FindSymbolsResponse,
40
+ type FindTextResponse,
41
+ type FindFilesParams,
42
+ type FindSymbolsParams,
43
+ type FindTextParams,
44
+ } from './find';
33
45
  export {
34
- SessionSummarize,
35
- type SessionSummarizeSummarizeResponse,
36
- type SessionSummarizeSummarizeParams,
37
- } from './session-summarize';
38
- export { SessionUnshare, type SessionUnshareUnshareParams } from './session-unshare';
46
+ SessionResource,
47
+ type AssistantMessage,
48
+ type FilePart,
49
+ type Message,
50
+ type Part,
51
+ type Session,
52
+ type SnapshotPart,
53
+ type StepFinishPart,
54
+ type StepStartPart,
55
+ type TextPart,
56
+ type ToolPart,
57
+ type ToolStateCompleted,
58
+ type ToolStateError,
59
+ type ToolStatePending,
60
+ type ToolStateRunning,
61
+ type UserMessage,
62
+ type SessionListResponse,
63
+ type SessionDeleteResponse,
64
+ type SessionAbortResponse,
65
+ type SessionInitResponse,
66
+ type SessionMessagesResponse,
67
+ type SessionSummarizeResponse,
68
+ type SessionChatParams,
69
+ type SessionInitParams,
70
+ type SessionSummarizeParams,
71
+ } from './session';