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

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