@opencode-ai/sdk 0.1.0-alpha.8 → 0.3.94

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 (386) hide show
  1. package/{internal/utils.d.mts.map → dist/gen/client/client.d.ts} +2 -1
  2. package/dist/gen/client/client.js +145 -0
  3. package/dist/gen/client/index.d.ts +7 -0
  4. package/dist/gen/client/index.js +4 -0
  5. package/dist/gen/client/types.d.ts +119 -0
  6. package/dist/gen/client/types.js +0 -0
  7. package/dist/gen/client/utils.d.ts +45 -0
  8. package/dist/gen/client/utils.js +284 -0
  9. package/dist/gen/client.gen.d.ts +12 -0
  10. package/dist/gen/client.gen.js +5 -0
  11. package/dist/gen/core/auth.d.ts +18 -0
  12. package/dist/gen/core/auth.js +13 -0
  13. package/dist/gen/core/bodySerializer.d.ts +17 -0
  14. package/dist/gen/core/bodySerializer.js +53 -0
  15. package/dist/gen/core/params.d.ts +33 -0
  16. package/dist/gen/core/params.js +87 -0
  17. package/dist/gen/core/pathSerializer.d.ts +33 -0
  18. package/dist/gen/core/pathSerializer.js +113 -0
  19. package/dist/gen/core/types.d.ts +78 -0
  20. package/dist/gen/core/types.js +0 -0
  21. package/dist/gen/sdk.gen.d.ts +149 -0
  22. package/dist/gen/sdk.gen.js +291 -0
  23. package/dist/gen/types.gen.d.ts +1308 -0
  24. package/dist/gen/types.gen.js +1 -0
  25. package/dist/index.d.ts +3 -0
  26. package/dist/index.js +6 -0
  27. package/package.json +12 -134
  28. package/CHANGELOG.md +0 -71
  29. package/LICENSE +0 -201
  30. package/README.md +0 -352
  31. package/api-promise.d.mts +0 -2
  32. package/api-promise.d.mts.map +0 -1
  33. package/api-promise.d.ts +0 -2
  34. package/api-promise.d.ts.map +0 -1
  35. package/api-promise.js +0 -6
  36. package/api-promise.js.map +0 -1
  37. package/api-promise.mjs +0 -2
  38. package/api-promise.mjs.map +0 -1
  39. package/client.d.mts +0 -185
  40. package/client.d.mts.map +0 -1
  41. package/client.d.ts +0 -185
  42. package/client.d.ts.map +0 -1
  43. package/client.js +0 -459
  44. package/client.js.map +0 -1
  45. package/client.mjs +0 -455
  46. package/client.mjs.map +0 -1
  47. package/core/api-promise.d.mts +0 -46
  48. package/core/api-promise.d.mts.map +0 -1
  49. package/core/api-promise.d.ts +0 -46
  50. package/core/api-promise.d.ts.map +0 -1
  51. package/core/api-promise.js +0 -74
  52. package/core/api-promise.js.map +0 -1
  53. package/core/api-promise.mjs +0 -70
  54. package/core/api-promise.mjs.map +0 -1
  55. package/core/error.d.mts +0 -46
  56. package/core/error.d.mts.map +0 -1
  57. package/core/error.d.ts +0 -46
  58. package/core/error.d.ts.map +0 -1
  59. package/core/error.js +0 -113
  60. package/core/error.js.map +0 -1
  61. package/core/error.mjs +0 -97
  62. package/core/error.mjs.map +0 -1
  63. package/core/resource.d.mts +0 -6
  64. package/core/resource.d.mts.map +0 -1
  65. package/core/resource.d.ts +0 -6
  66. package/core/resource.d.ts.map +0 -1
  67. package/core/resource.js +0 -11
  68. package/core/resource.js.map +0 -1
  69. package/core/resource.mjs +0 -7
  70. package/core/resource.mjs.map +0 -1
  71. package/core/uploads.d.mts +0 -3
  72. package/core/uploads.d.mts.map +0 -1
  73. package/core/uploads.d.ts +0 -3
  74. package/core/uploads.d.ts.map +0 -1
  75. package/core/uploads.js +0 -6
  76. package/core/uploads.js.map +0 -1
  77. package/core/uploads.mjs +0 -2
  78. package/core/uploads.mjs.map +0 -1
  79. package/error.d.mts +0 -2
  80. package/error.d.mts.map +0 -1
  81. package/error.d.ts +0 -2
  82. package/error.d.ts.map +0 -1
  83. package/error.js +0 -6
  84. package/error.js.map +0 -1
  85. package/error.mjs +0 -2
  86. package/error.mjs.map +0 -1
  87. package/index.d.mts +0 -6
  88. package/index.d.mts.map +0 -1
  89. package/index.d.ts +0 -6
  90. package/index.d.ts.map +0 -1
  91. package/index.js +0 -30
  92. package/index.js.map +0 -1
  93. package/index.mjs +0 -7
  94. package/index.mjs.map +0 -1
  95. package/internal/builtin-types.d.mts +0 -73
  96. package/internal/builtin-types.d.mts.map +0 -1
  97. package/internal/builtin-types.d.ts +0 -73
  98. package/internal/builtin-types.d.ts.map +0 -1
  99. package/internal/builtin-types.js +0 -4
  100. package/internal/builtin-types.js.map +0 -1
  101. package/internal/builtin-types.mjs +0 -3
  102. package/internal/builtin-types.mjs.map +0 -1
  103. package/internal/detect-platform.d.mts +0 -15
  104. package/internal/detect-platform.d.mts.map +0 -1
  105. package/internal/detect-platform.d.ts +0 -15
  106. package/internal/detect-platform.d.ts.map +0 -1
  107. package/internal/detect-platform.js +0 -162
  108. package/internal/detect-platform.js.map +0 -1
  109. package/internal/detect-platform.mjs +0 -157
  110. package/internal/detect-platform.mjs.map +0 -1
  111. package/internal/errors.d.mts +0 -3
  112. package/internal/errors.d.mts.map +0 -1
  113. package/internal/errors.d.ts +0 -3
  114. package/internal/errors.d.ts.map +0 -1
  115. package/internal/errors.js +0 -41
  116. package/internal/errors.js.map +0 -1
  117. package/internal/errors.mjs +0 -36
  118. package/internal/errors.mjs.map +0 -1
  119. package/internal/headers.d.mts +0 -20
  120. package/internal/headers.d.mts.map +0 -1
  121. package/internal/headers.d.ts +0 -20
  122. package/internal/headers.d.ts.map +0 -1
  123. package/internal/headers.js +0 -79
  124. package/internal/headers.js.map +0 -1
  125. package/internal/headers.mjs +0 -74
  126. package/internal/headers.mjs.map +0 -1
  127. package/internal/parse.d.mts +0 -12
  128. package/internal/parse.d.mts.map +0 -1
  129. package/internal/parse.d.ts +0 -12
  130. package/internal/parse.d.ts.map +0 -1
  131. package/internal/parse.js +0 -35
  132. package/internal/parse.js.map +0 -1
  133. package/internal/parse.mjs +0 -32
  134. package/internal/parse.mjs.map +0 -1
  135. package/internal/request-options.d.mts +0 -33
  136. package/internal/request-options.d.mts.map +0 -1
  137. package/internal/request-options.d.ts +0 -33
  138. package/internal/request-options.d.ts.map +0 -1
  139. package/internal/request-options.js +0 -14
  140. package/internal/request-options.js.map +0 -1
  141. package/internal/request-options.mjs +0 -10
  142. package/internal/request-options.mjs.map +0 -1
  143. package/internal/shim-types.d.mts +0 -17
  144. package/internal/shim-types.d.mts.map +0 -1
  145. package/internal/shim-types.d.ts +0 -17
  146. package/internal/shim-types.d.ts.map +0 -1
  147. package/internal/shim-types.js +0 -4
  148. package/internal/shim-types.js.map +0 -1
  149. package/internal/shim-types.mjs +0 -3
  150. package/internal/shim-types.mjs.map +0 -1
  151. package/internal/shims.d.mts +0 -20
  152. package/internal/shims.d.mts.map +0 -1
  153. package/internal/shims.d.ts +0 -20
  154. package/internal/shims.d.ts.map +0 -1
  155. package/internal/shims.js +0 -92
  156. package/internal/shims.js.map +0 -1
  157. package/internal/shims.mjs +0 -85
  158. package/internal/shims.mjs.map +0 -1
  159. package/internal/to-file.d.mts +0 -45
  160. package/internal/to-file.d.mts.map +0 -1
  161. package/internal/to-file.d.ts +0 -45
  162. package/internal/to-file.d.ts.map +0 -1
  163. package/internal/to-file.js +0 -91
  164. package/internal/to-file.js.map +0 -1
  165. package/internal/to-file.mjs +0 -88
  166. package/internal/to-file.mjs.map +0 -1
  167. package/internal/tslib.js +0 -81
  168. package/internal/tslib.mjs +0 -17
  169. package/internal/types.d.mts +0 -69
  170. package/internal/types.d.mts.map +0 -1
  171. package/internal/types.d.ts +0 -69
  172. package/internal/types.d.ts.map +0 -1
  173. package/internal/types.js +0 -4
  174. package/internal/types.js.map +0 -1
  175. package/internal/types.mjs +0 -3
  176. package/internal/types.mjs.map +0 -1
  177. package/internal/uploads.d.mts +0 -42
  178. package/internal/uploads.d.mts.map +0 -1
  179. package/internal/uploads.d.ts +0 -42
  180. package/internal/uploads.d.ts.map +0 -1
  181. package/internal/uploads.js +0 -141
  182. package/internal/uploads.js.map +0 -1
  183. package/internal/uploads.mjs +0 -131
  184. package/internal/uploads.mjs.map +0 -1
  185. package/internal/utils/base64.d.mts +0 -3
  186. package/internal/utils/base64.d.mts.map +0 -1
  187. package/internal/utils/base64.d.ts +0 -3
  188. package/internal/utils/base64.d.ts.map +0 -1
  189. package/internal/utils/base64.js +0 -38
  190. package/internal/utils/base64.js.map +0 -1
  191. package/internal/utils/base64.mjs +0 -33
  192. package/internal/utils/base64.mjs.map +0 -1
  193. package/internal/utils/bytes.d.mts +0 -4
  194. package/internal/utils/bytes.d.mts.map +0 -1
  195. package/internal/utils/bytes.d.ts +0 -4
  196. package/internal/utils/bytes.d.ts.map +0 -1
  197. package/internal/utils/bytes.js +0 -31
  198. package/internal/utils/bytes.js.map +0 -1
  199. package/internal/utils/bytes.mjs +0 -26
  200. package/internal/utils/bytes.mjs.map +0 -1
  201. package/internal/utils/env.d.mts +0 -9
  202. package/internal/utils/env.d.mts.map +0 -1
  203. package/internal/utils/env.d.ts +0 -9
  204. package/internal/utils/env.d.ts.map +0 -1
  205. package/internal/utils/env.js +0 -22
  206. package/internal/utils/env.js.map +0 -1
  207. package/internal/utils/env.mjs +0 -18
  208. package/internal/utils/env.mjs.map +0 -1
  209. package/internal/utils/log.d.mts +0 -37
  210. package/internal/utils/log.d.mts.map +0 -1
  211. package/internal/utils/log.d.ts +0 -37
  212. package/internal/utils/log.d.ts.map +0 -1
  213. package/internal/utils/log.js +0 -85
  214. package/internal/utils/log.js.map +0 -1
  215. package/internal/utils/log.mjs +0 -79
  216. package/internal/utils/log.mjs.map +0 -1
  217. package/internal/utils/path.d.mts +0 -15
  218. package/internal/utils/path.d.mts.map +0 -1
  219. package/internal/utils/path.d.ts +0 -15
  220. package/internal/utils/path.d.ts.map +0 -1
  221. package/internal/utils/path.js +0 -58
  222. package/internal/utils/path.js.map +0 -1
  223. package/internal/utils/path.mjs +0 -53
  224. package/internal/utils/path.mjs.map +0 -1
  225. package/internal/utils/sleep.d.mts +0 -2
  226. package/internal/utils/sleep.d.mts.map +0 -1
  227. package/internal/utils/sleep.d.ts +0 -2
  228. package/internal/utils/sleep.d.ts.map +0 -1
  229. package/internal/utils/sleep.js +0 -7
  230. package/internal/utils/sleep.js.map +0 -1
  231. package/internal/utils/sleep.mjs +0 -3
  232. package/internal/utils/sleep.mjs.map +0 -1
  233. package/internal/utils/uuid.d.mts +0 -5
  234. package/internal/utils/uuid.d.mts.map +0 -1
  235. package/internal/utils/uuid.d.ts +0 -5
  236. package/internal/utils/uuid.d.ts.map +0 -1
  237. package/internal/utils/uuid.js +0 -19
  238. package/internal/utils/uuid.js.map +0 -1
  239. package/internal/utils/uuid.mjs +0 -15
  240. package/internal/utils/uuid.mjs.map +0 -1
  241. package/internal/utils/values.d.mts +0 -18
  242. package/internal/utils/values.d.mts.map +0 -1
  243. package/internal/utils/values.d.ts +0 -18
  244. package/internal/utils/values.d.ts.map +0 -1
  245. package/internal/utils/values.js +0 -112
  246. package/internal/utils/values.js.map +0 -1
  247. package/internal/utils/values.mjs +0 -94
  248. package/internal/utils/values.mjs.map +0 -1
  249. package/internal/utils.d.mts +0 -7
  250. package/internal/utils.d.ts +0 -7
  251. package/internal/utils.d.ts.map +0 -1
  252. package/internal/utils.js +0 -11
  253. package/internal/utils.js.map +0 -1
  254. package/internal/utils.mjs +0 -8
  255. package/internal/utils.mjs.map +0 -1
  256. package/resource.d.mts +0 -2
  257. package/resource.d.mts.map +0 -1
  258. package/resource.d.ts +0 -2
  259. package/resource.d.ts.map +0 -1
  260. package/resource.js +0 -6
  261. package/resource.js.map +0 -1
  262. package/resource.mjs +0 -2
  263. package/resource.mjs.map +0 -1
  264. package/resources/app.d.mts +0 -38
  265. package/resources/app.d.mts.map +0 -1
  266. package/resources/app.d.ts +0 -38
  267. package/resources/app.d.ts.map +0 -1
  268. package/resources/app.js +0 -21
  269. package/resources/app.js.map +0 -1
  270. package/resources/app.mjs +0 -17
  271. package/resources/app.mjs.map +0 -1
  272. package/resources/config.d.mts +0 -304
  273. package/resources/config.d.mts.map +0 -1
  274. package/resources/config.d.ts +0 -304
  275. package/resources/config.d.ts.map +0 -1
  276. package/resources/config.js +0 -21
  277. package/resources/config.js.map +0 -1
  278. package/resources/config.mjs +0 -17
  279. package/resources/config.mjs.map +0 -1
  280. package/resources/event.d.mts +0 -120
  281. package/resources/event.d.mts.map +0 -1
  282. package/resources/event.d.ts +0 -120
  283. package/resources/event.d.ts.map +0 -1
  284. package/resources/event.js +0 -15
  285. package/resources/event.js.map +0 -1
  286. package/resources/event.mjs +0 -11
  287. package/resources/event.mjs.map +0 -1
  288. package/resources/file.d.mts +0 -17
  289. package/resources/file.d.mts.map +0 -1
  290. package/resources/file.d.ts +0 -17
  291. package/resources/file.d.ts.map +0 -1
  292. package/resources/file.js +0 -15
  293. package/resources/file.js.map +0 -1
  294. package/resources/file.mjs +0 -11
  295. package/resources/file.mjs.map +0 -1
  296. package/resources/index.d.mts +0 -7
  297. package/resources/index.d.mts.map +0 -1
  298. package/resources/index.d.ts +0 -7
  299. package/resources/index.d.ts.map +0 -1
  300. package/resources/index.js +0 -17
  301. package/resources/index.js.map +0 -1
  302. package/resources/index.mjs +0 -8
  303. package/resources/index.mjs.map +0 -1
  304. package/resources/session.d.mts +0 -211
  305. package/resources/session.d.mts.map +0 -1
  306. package/resources/session.d.ts +0 -211
  307. package/resources/session.d.ts.map +0 -1
  308. package/resources/session.js +0 -70
  309. package/resources/session.js.map +0 -1
  310. package/resources/session.mjs +0 -66
  311. package/resources/session.mjs.map +0 -1
  312. package/resources/shared.d.mts +0 -20
  313. package/resources/shared.d.mts.map +0 -1
  314. package/resources/shared.d.ts +0 -20
  315. package/resources/shared.d.ts.map +0 -1
  316. package/resources/shared.js +0 -4
  317. package/resources/shared.js.map +0 -1
  318. package/resources/shared.mjs +0 -3
  319. package/resources/shared.mjs.map +0 -1
  320. package/resources.d.mts +0 -2
  321. package/resources.d.mts.map +0 -1
  322. package/resources.d.ts +0 -2
  323. package/resources.d.ts.map +0 -1
  324. package/resources.js +0 -5
  325. package/resources.js.map +0 -1
  326. package/resources.mjs +0 -2
  327. package/resources.mjs.map +0 -1
  328. package/src/api-promise.ts +0 -2
  329. package/src/client.ts +0 -783
  330. package/src/core/README.md +0 -3
  331. package/src/core/api-promise.ts +0 -92
  332. package/src/core/error.ts +0 -130
  333. package/src/core/resource.ts +0 -11
  334. package/src/core/uploads.ts +0 -2
  335. package/src/error.ts +0 -2
  336. package/src/index.ts +0 -22
  337. package/src/internal/README.md +0 -3
  338. package/src/internal/builtin-types.ts +0 -93
  339. package/src/internal/detect-platform.ts +0 -196
  340. package/src/internal/errors.ts +0 -33
  341. package/src/internal/headers.ts +0 -97
  342. package/src/internal/parse.ts +0 -50
  343. package/src/internal/request-options.ts +0 -38
  344. package/src/internal/shim-types.ts +0 -26
  345. package/src/internal/shims.ts +0 -107
  346. package/src/internal/to-file.ts +0 -154
  347. package/src/internal/types.ts +0 -95
  348. package/src/internal/uploads.ts +0 -187
  349. package/src/internal/utils/base64.ts +0 -40
  350. package/src/internal/utils/bytes.ts +0 -32
  351. package/src/internal/utils/env.ts +0 -18
  352. package/src/internal/utils/log.ts +0 -126
  353. package/src/internal/utils/path.ts +0 -63
  354. package/src/internal/utils/sleep.ts +0 -3
  355. package/src/internal/utils/uuid.ts +0 -17
  356. package/src/internal/utils/values.ts +0 -105
  357. package/src/internal/utils.ts +0 -8
  358. package/src/lib/.keep +0 -4
  359. package/src/resource.ts +0 -2
  360. package/src/resources/app.ts +0 -59
  361. package/src/resources/config.ts +0 -390
  362. package/src/resources/event.ts +0 -171
  363. package/src/resources/file.ts +0 -24
  364. package/src/resources/index.ts +0 -40
  365. package/src/resources/session.ts +0 -360
  366. package/src/resources/shared.ts +0 -27
  367. package/src/resources.ts +0 -1
  368. package/src/tsconfig.json +0 -11
  369. package/src/uploads.ts +0 -2
  370. package/src/version.ts +0 -1
  371. package/uploads.d.mts +0 -2
  372. package/uploads.d.mts.map +0 -1
  373. package/uploads.d.ts +0 -2
  374. package/uploads.d.ts.map +0 -1
  375. package/uploads.js +0 -6
  376. package/uploads.js.map +0 -1
  377. package/uploads.mjs +0 -2
  378. package/uploads.mjs.map +0 -1
  379. package/version.d.mts +0 -2
  380. package/version.d.mts.map +0 -1
  381. package/version.d.ts +0 -2
  382. package/version.d.ts.map +0 -1
  383. package/version.js +0 -5
  384. package/version.js.map +0 -1
  385. package/version.mjs +0 -2
  386. package/version.mjs.map +0 -1
package/README.md DELETED
@@ -1,352 +0,0 @@
1
- # Opencode TypeScript API Library
2
-
3
- [![NPM version](<https://img.shields.io/npm/v/@opencode-ai/sdk.svg?label=npm%20(stable)>)](https://npmjs.org/package/@opencode-ai/sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@opencode-ai/sdk)
4
-
5
- This library provides convenient access to the Opencode REST API from server-side TypeScript or JavaScript.
6
-
7
- The REST API documentation can be found on [opencode.ai](https://opencode.ai/docs). The full API of this library can be found in [api.md](api.md).
8
-
9
- It is generated with [Stainless](https://www.stainless.com/).
10
-
11
- ## Installation
12
-
13
- ```sh
14
- npm install @opencode-ai/sdk
15
- ```
16
-
17
- ## Usage
18
-
19
- The full API of this library can be found in [api.md](api.md).
20
-
21
- <!-- prettier-ignore -->
22
- ```js
23
- import Opencode from '@opencode-ai/sdk';
24
-
25
- const client = new Opencode();
26
-
27
- const events = await client.event.list();
28
- ```
29
-
30
- ### Request & Response types
31
-
32
- This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
33
-
34
- <!-- prettier-ignore -->
35
- ```ts
36
- import Opencode from '@opencode-ai/sdk';
37
-
38
- const client = new Opencode();
39
-
40
- const events: Opencode.EventListResponse = await client.event.list();
41
- ```
42
-
43
- Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
44
-
45
- ## Handling errors
46
-
47
- When the library is unable to connect to the API,
48
- or if the API returns a non-success status code (i.e., 4xx or 5xx response),
49
- a subclass of `APIError` will be thrown:
50
-
51
- <!-- prettier-ignore -->
52
- ```ts
53
- const events = await client.event.list().catch(async (err) => {
54
- if (err instanceof Opencode.APIError) {
55
- console.log(err.status); // 400
56
- console.log(err.name); // BadRequestError
57
- console.log(err.headers); // {server: 'nginx', ...}
58
- } else {
59
- throw err;
60
- }
61
- });
62
- ```
63
-
64
- Error codes are as follows:
65
-
66
- | Status Code | Error Type |
67
- | ----------- | -------------------------- |
68
- | 400 | `BadRequestError` |
69
- | 401 | `AuthenticationError` |
70
- | 403 | `PermissionDeniedError` |
71
- | 404 | `NotFoundError` |
72
- | 422 | `UnprocessableEntityError` |
73
- | 429 | `RateLimitError` |
74
- | >=500 | `InternalServerError` |
75
- | N/A | `APIConnectionError` |
76
-
77
- ### Retries
78
-
79
- Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
80
- Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
81
- 429 Rate Limit, and >=500 Internal errors will all be retried by default.
82
-
83
- You can use the `maxRetries` option to configure or disable this:
84
-
85
- <!-- prettier-ignore -->
86
- ```js
87
- // Configure the default for all requests:
88
- const client = new Opencode({
89
- maxRetries: 0, // default is 2
90
- });
91
-
92
- // Or, configure per-request:
93
- await client.event.list({
94
- maxRetries: 5,
95
- });
96
- ```
97
-
98
- ### Timeouts
99
-
100
- Requests time out after 1 minute by default. You can configure this with a `timeout` option:
101
-
102
- <!-- prettier-ignore -->
103
- ```ts
104
- // Configure the default for all requests:
105
- const client = new Opencode({
106
- timeout: 20 * 1000, // 20 seconds (default is 1 minute)
107
- });
108
-
109
- // Override per-request:
110
- await client.event.list({
111
- timeout: 5 * 1000,
112
- });
113
- ```
114
-
115
- On timeout, an `APIConnectionTimeoutError` is thrown.
116
-
117
- Note that requests which time out will be [retried twice by default](#retries).
118
-
119
- ## Advanced Usage
120
-
121
- ### Accessing raw Response data (e.g., headers)
122
-
123
- The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
124
- This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
125
-
126
- You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
127
- Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
128
-
129
- <!-- prettier-ignore -->
130
- ```ts
131
- const client = new Opencode();
132
-
133
- const response = await client.event.list().asResponse();
134
- console.log(response.headers.get('X-My-Header'));
135
- console.log(response.statusText); // access the underlying Response object
136
-
137
- const { data: events, response: raw } = await client.event.list().withResponse();
138
- console.log(raw.headers.get('X-My-Header'));
139
- console.log(events);
140
- ```
141
-
142
- ### Logging
143
-
144
- > [!IMPORTANT]
145
- > All log messages are intended for debugging only. The format and content of log messages
146
- > may change between releases.
147
-
148
- #### Log levels
149
-
150
- The log level can be configured in two ways:
151
-
152
- 1. Via the `OPENCODE_LOG` environment variable
153
- 2. Using the `logLevel` client option (overrides the environment variable if set)
154
-
155
- ```ts
156
- import Opencode from '@opencode-ai/sdk';
157
-
158
- const client = new Opencode({
159
- logLevel: 'debug', // Show all log messages
160
- });
161
- ```
162
-
163
- Available log levels, from most to least verbose:
164
-
165
- - `'debug'` - Show debug messages, info, warnings, and errors
166
- - `'info'` - Show info messages, warnings, and errors
167
- - `'warn'` - Show warnings and errors (default)
168
- - `'error'` - Show only errors
169
- - `'off'` - Disable all logging
170
-
171
- At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.
172
- Some authentication-related headers are redacted, but sensitive data in request and response bodies
173
- may still be visible.
174
-
175
- #### Custom logger
176
-
177
- By default, this library logs to `globalThis.console`. You can also provide a custom logger.
178
- Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.
179
-
180
- When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages
181
- below the configured level will not be sent to your logger.
182
-
183
- ```ts
184
- import Opencode from '@opencode-ai/sdk';
185
- import pino from 'pino';
186
-
187
- const logger = pino();
188
-
189
- const client = new Opencode({
190
- logger: logger.child({ name: 'Opencode' }),
191
- logLevel: 'debug', // Send all messages to pino, allowing it to filter
192
- });
193
- ```
194
-
195
- ### Making custom/undocumented requests
196
-
197
- This library is typed for convenient access to the documented API. If you need to access undocumented
198
- endpoints, params, or response properties, the library can still be used.
199
-
200
- #### Undocumented endpoints
201
-
202
- To make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.
203
- Options on the client, such as retries, will be respected when making these requests.
204
-
205
- ```ts
206
- await client.post('/some/path', {
207
- body: { some_prop: 'foo' },
208
- query: { some_query_arg: 'bar' },
209
- });
210
- ```
211
-
212
- #### Undocumented request params
213
-
214
- To make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented
215
- parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you
216
- send will be sent as-is.
217
-
218
- ```ts
219
- client.event.list({
220
- // ...
221
- // @ts-expect-error baz is not yet public
222
- baz: 'undocumented option',
223
- });
224
- ```
225
-
226
- For requests with the `GET` verb, any extra params will be in the query, all other requests will send the
227
- extra param in the body.
228
-
229
- If you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request
230
- options.
231
-
232
- #### Undocumented response properties
233
-
234
- To access undocumented response properties, you may access the response object with `// @ts-expect-error` on
235
- the response object, or cast the response object to the requisite type. Like the request params, we do not
236
- validate or strip extra properties from the response from the API.
237
-
238
- ### Customizing the fetch client
239
-
240
- By default, this library expects a global `fetch` function is defined.
241
-
242
- If you want to use a different `fetch` function, you can either polyfill the global:
243
-
244
- ```ts
245
- import fetch from 'my-fetch';
246
-
247
- globalThis.fetch = fetch;
248
- ```
249
-
250
- Or pass it to the client:
251
-
252
- ```ts
253
- import Opencode from '@opencode-ai/sdk';
254
- import fetch from 'my-fetch';
255
-
256
- const client = new Opencode({ fetch });
257
- ```
258
-
259
- ### Fetch options
260
-
261
- If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
262
-
263
- ```ts
264
- import Opencode from '@opencode-ai/sdk';
265
-
266
- const client = new Opencode({
267
- fetchOptions: {
268
- // `RequestInit` options
269
- },
270
- });
271
- ```
272
-
273
- #### Configuring proxies
274
-
275
- To modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy
276
- options to requests:
277
-
278
- <img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
279
-
280
- ```ts
281
- import Opencode from '@opencode-ai/sdk';
282
- import * as undici from 'undici';
283
-
284
- const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
285
- const client = new Opencode({
286
- fetchOptions: {
287
- dispatcher: proxyAgent,
288
- },
289
- });
290
- ```
291
-
292
- <img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>
293
-
294
- ```ts
295
- import Opencode from '@opencode-ai/sdk';
296
-
297
- const client = new Opencode({
298
- fetchOptions: {
299
- proxy: 'http://localhost:8888',
300
- },
301
- });
302
- ```
303
-
304
- <img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
305
-
306
- ```ts
307
- import Opencode from 'npm:@opencode-ai/sdk';
308
-
309
- const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
310
- const client = new Opencode({
311
- fetchOptions: {
312
- client: httpClient,
313
- },
314
- });
315
- ```
316
-
317
- ## Frequently Asked Questions
318
-
319
- ## Semantic versioning
320
-
321
- This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
322
-
323
- 1. Changes that only affect static types, without breaking runtime behavior.
324
- 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
325
- 3. Changes that we do not expect to impact the vast majority of users in practice.
326
-
327
- We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
328
-
329
- We are keen for your feedback; please open an [issue](https://www.github.com/sst/opencode-sdk-js/issues) with questions, bugs, or suggestions.
330
-
331
- ## Requirements
332
-
333
- TypeScript >= 4.9 is supported.
334
-
335
- The following runtimes are supported:
336
-
337
- - Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
338
- - Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
339
- - Deno v1.28.0 or higher.
340
- - Bun 1.0 or later.
341
- - Cloudflare Workers.
342
- - Vercel Edge Runtime.
343
- - Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
344
- - Nitro v2.6 or greater.
345
-
346
- Note that React Native is not supported at this time.
347
-
348
- If you are interested in other runtime environments, please open or upvote an issue on GitHub.
349
-
350
- ## Contributing
351
-
352
- See [the contributing documentation](./CONTRIBUTING.md).
package/api-promise.d.mts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./core/api-promise.mjs";
2
- //# sourceMappingURL=api-promise.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-promise.d.mts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
package/api-promise.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./core/api-promise.js";
2
- //# sourceMappingURL=api-promise.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-promise.d.ts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
package/api-promise.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("./internal/tslib.js");
4
- /** @deprecated Import from ./core/api-promise instead */
5
- tslib_1.__exportStar(require("./core/api-promise.js"), exports);
6
- //# sourceMappingURL=api-promise.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-promise.js","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,gEAAmC"}
package/api-promise.mjs DELETED
@@ -1,2 +0,0 @@
1
- export * from "./core/api-promise.mjs";
2
- //# sourceMappingURL=api-promise.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-promise.mjs","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
package/client.d.mts DELETED
@@ -1,185 +0,0 @@
1
- import type { RequestInit, RequestInfo } from "./internal/builtin-types.mjs";
2
- import type { PromiseOrValue, MergedRequestInit, FinalizedRequestInit } from "./internal/types.mjs";
3
- export type { Logger, LogLevel } from "./internal/utils/log.mjs";
4
- import * as Opts from "./internal/request-options.mjs";
5
- import * as Errors from "./core/error.mjs";
6
- import * as Uploads from "./core/uploads.mjs";
7
- import * as API from "./resources/index.mjs";
8
- import { APIPromise } from "./core/api-promise.mjs";
9
- import { App, AppInitResponse, AppResource } from "./resources/app.mjs";
10
- import { Config, ConfigProvidersResponse, ConfigResource, Keybinds, McpLocal, McpRemote, Model, Provider } from "./resources/config.mjs";
11
- import { Event, EventListResponse } from "./resources/event.mjs";
12
- import { File, FileSearchParams, FileSearchResponse } from "./resources/file.mjs";
13
- import { FilePart, Message, MessagePart, ReasoningPart, Session, SessionAbortResponse, SessionChatParams, SessionDeleteResponse, SessionInitParams, SessionInitResponse, SessionListResponse, SessionMessagesResponse, SessionResource, SessionSummarizeParams, SessionSummarizeResponse, SourceURLPart, StepStartPart, TextPart, ToolCall, ToolInvocationPart, ToolPartialCall, ToolResult } from "./resources/session.mjs";
14
- import { type Fetch } from "./internal/builtin-types.mjs";
15
- import { HeadersLike, NullableHeaders } from "./internal/headers.mjs";
16
- import { FinalRequestOptions, RequestOptions } from "./internal/request-options.mjs";
17
- import { type LogLevel, type Logger } from "./internal/utils/log.mjs";
18
- export interface ClientOptions {
19
- /**
20
- * Override the default base URL for the API, e.g., "https://api.example.com/v2/"
21
- *
22
- * Defaults to process.env['OPENCODE_BASE_URL'].
23
- */
24
- baseURL?: string | null | undefined;
25
- /**
26
- * The maximum amount of time (in milliseconds) that the client should wait for a response
27
- * from the server before timing out a single request.
28
- *
29
- * Note that request timeouts are retried by default, so in a worst-case scenario you may wait
30
- * much longer than this timeout before the promise succeeds or fails.
31
- */
32
- timeout?: number | undefined;
33
- /**
34
- * Additional `RequestInit` options to be passed to `fetch` calls.
35
- * Properties will be overridden by per-request `fetchOptions`.
36
- */
37
- fetchOptions?: MergedRequestInit | undefined;
38
- /**
39
- * Specify a custom `fetch` function implementation.
40
- *
41
- * If not provided, we expect that `fetch` is defined globally.
42
- */
43
- fetch?: Fetch | undefined;
44
- /**
45
- * The maximum number of times that the client will retry a request in case of a
46
- * temporary failure, like a network error or a 5XX error from the server.
47
- *
48
- * @default 2
49
- */
50
- maxRetries?: number | undefined;
51
- /**
52
- * Default headers to include with every request to the API.
53
- *
54
- * These can be removed in individual requests by explicitly setting the
55
- * header to `null` in request options.
56
- */
57
- defaultHeaders?: HeadersLike | undefined;
58
- /**
59
- * Default query parameters to include with every request to the API.
60
- *
61
- * These can be removed in individual requests by explicitly setting the
62
- * param to `undefined` in request options.
63
- */
64
- defaultQuery?: Record<string, string | undefined> | undefined;
65
- /**
66
- * Set the log level.
67
- *
68
- * Defaults to process.env['OPENCODE_LOG'] or 'warn' if it isn't set.
69
- */
70
- logLevel?: LogLevel | undefined;
71
- /**
72
- * Set the logger.
73
- *
74
- * Defaults to globalThis.console.
75
- */
76
- logger?: Logger | undefined;
77
- }
78
- /**
79
- * API Client for interfacing with the Opencode API.
80
- */
81
- export declare class Opencode {
82
- #private;
83
- baseURL: string;
84
- maxRetries: number;
85
- timeout: number;
86
- logger: Logger | undefined;
87
- logLevel: LogLevel | undefined;
88
- fetchOptions: MergedRequestInit | undefined;
89
- private fetch;
90
- protected idempotencyHeader?: string;
91
- private _options;
92
- /**
93
- * API Client for interfacing with the Opencode API.
94
- *
95
- * @param {string} [opts.baseURL=process.env['OPENCODE_BASE_URL'] ?? http://localhost:54321] - Override the default base URL for the API.
96
- * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
97
- * @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
98
- * @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
99
- * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
100
- * @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
101
- * @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
102
- */
103
- constructor({ baseURL, ...opts }?: ClientOptions);
104
- /**
105
- * Create a new client instance re-using the same options given to the current client with optional overriding.
106
- */
107
- withOptions(options: Partial<ClientOptions>): this;
108
- protected defaultQuery(): Record<string, string | undefined> | undefined;
109
- protected validateHeaders({ values, nulls }: NullableHeaders): void;
110
- /**
111
- * Basic re-implementation of `qs.stringify` for primitive types.
112
- */
113
- protected stringifyQuery(query: Record<string, unknown>): string;
114
- private getUserAgent;
115
- protected defaultIdempotencyKey(): string;
116
- protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError;
117
- buildURL(path: string, query: Record<string, unknown> | null | undefined, defaultBaseURL?: string | undefined): string;
118
- /**
119
- * Used as a callback for mutating the given `FinalRequestOptions` object.
120
- */
121
- protected prepareOptions(options: FinalRequestOptions): Promise<void>;
122
- /**
123
- * Used as a callback for mutating the given `RequestInit` object.
124
- *
125
- * This is useful for cases where you want to add certain headers based off of
126
- * the request properties, e.g. `method` or `url`.
127
- */
128
- protected prepareRequest(request: RequestInit, { url, options }: {
129
- url: string;
130
- options: FinalRequestOptions;
131
- }): Promise<void>;
132
- get<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
133
- post<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
134
- patch<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
135
- put<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
136
- delete<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp>;
137
- private methodRequest;
138
- request<Rsp>(options: PromiseOrValue<FinalRequestOptions>, remainingRetries?: number | null): APIPromise<Rsp>;
139
- private makeRequest;
140
- fetchWithTimeout(url: RequestInfo, init: RequestInit | undefined, ms: number, controller: AbortController): Promise<Response>;
141
- private shouldRetry;
142
- private retryRequest;
143
- private calculateDefaultRetryTimeoutMillis;
144
- buildRequest(inputOptions: FinalRequestOptions, { retryCount }?: {
145
- retryCount?: number;
146
- }): {
147
- req: FinalizedRequestInit;
148
- url: string;
149
- timeout: number;
150
- };
151
- private buildHeaders;
152
- private buildBody;
153
- static Opencode: typeof Opencode;
154
- static DEFAULT_TIMEOUT: number;
155
- static OpencodeError: typeof Errors.OpencodeError;
156
- static APIError: typeof Errors.APIError;
157
- static APIConnectionError: typeof Errors.APIConnectionError;
158
- static APIConnectionTimeoutError: typeof Errors.APIConnectionTimeoutError;
159
- static APIUserAbortError: typeof Errors.APIUserAbortError;
160
- static NotFoundError: typeof Errors.NotFoundError;
161
- static ConflictError: typeof Errors.ConflictError;
162
- static RateLimitError: typeof Errors.RateLimitError;
163
- static BadRequestError: typeof Errors.BadRequestError;
164
- static AuthenticationError: typeof Errors.AuthenticationError;
165
- static InternalServerError: typeof Errors.InternalServerError;
166
- static PermissionDeniedError: typeof Errors.PermissionDeniedError;
167
- static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
168
- static toFile: typeof Uploads.toFile;
169
- event: API.Event;
170
- app: API.AppResource;
171
- file: API.File;
172
- config: API.ConfigResource;
173
- session: API.SessionResource;
174
- }
175
- export declare namespace Opencode {
176
- export type RequestOptions = Opts.RequestOptions;
177
- export { Event as Event, type EventListResponse as EventListResponse };
178
- export { AppResource as AppResource, type App as App, type AppInitResponse as AppInitResponse };
179
- export { File as File, type FileSearchResponse as FileSearchResponse, type FileSearchParams as FileSearchParams, };
180
- export { ConfigResource as ConfigResource, type Config as Config, type Keybinds as Keybinds, type McpLocal as McpLocal, type McpRemote as McpRemote, type Model as Model, type Provider as Provider, type ConfigProvidersResponse as ConfigProvidersResponse, };
181
- export { SessionResource as SessionResource, type FilePart as FilePart, type Message as Message, type MessagePart as MessagePart, type ReasoningPart as ReasoningPart, type Session as Session, type SourceURLPart as SourceURLPart, type StepStartPart as StepStartPart, type TextPart as TextPart, type ToolCall as ToolCall, type ToolInvocationPart as ToolInvocationPart, type ToolPartialCall as ToolPartialCall, type ToolResult as ToolResult, type SessionListResponse as SessionListResponse, type SessionDeleteResponse as SessionDeleteResponse, type SessionAbortResponse as SessionAbortResponse, type SessionInitResponse as SessionInitResponse, type SessionMessagesResponse as SessionMessagesResponse, type SessionSummarizeResponse as SessionSummarizeResponse, type SessionChatParams as SessionChatParams, type SessionInitParams as SessionInitParams, type SessionSummarizeParams as SessionSummarizeParams, };
182
- export type ProviderAuthError = API.ProviderAuthError;
183
- export type UnknownError = API.UnknownError;
184
- }
185
- //# sourceMappingURL=client.d.mts.map
package/client.d.mts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EAAE,GAAG,EAAE,eAAe,EAAE,WAAW,EAAE;OACrC,EACL,MAAM,EACN,uBAAuB,EACvB,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,KAAK,EACL,QAAQ,EACT;OACM,EAAE,KAAK,EAAE,iBAAiB,EAAE;OAC5B,EAAE,IAAI,EAAE,gBAAgB,EAAE,kBAAkB,EAAE;OAC9C,EACL,QAAQ,EACR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