withruntime 0.49.0 → 1.0.0

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 (491) hide show
  1. package/dist/generated/apps.d.ts +309 -0
  2. package/dist/generated/apps.js +333 -0
  3. package/dist/generated/audit.d.ts +47 -0
  4. package/dist/generated/audit.js +14 -0
  5. package/dist/generated/browsers.d.ts +309 -0
  6. package/dist/generated/browsers.js +333 -0
  7. package/dist/generated/builds.d.ts +309 -0
  8. package/dist/generated/builds.js +333 -0
  9. package/dist/generated/ci.d.ts +309 -0
  10. package/dist/generated/ci.js +333 -0
  11. package/dist/generated/containers.d.ts +309 -0
  12. package/dist/generated/containers.js +333 -0
  13. package/dist/generated/desktops.d.ts +309 -0
  14. package/dist/generated/desktops.js +333 -0
  15. package/dist/generated/domains.d.ts +80 -0
  16. package/dist/generated/domains.js +58 -0
  17. package/dist/generated/egressIps.d.ts +36 -0
  18. package/dist/generated/egressIps.js +14 -0
  19. package/dist/generated/events.d.ts +37 -0
  20. package/dist/generated/events.js +14 -0
  21. package/dist/generated/feedback.d.ts +44 -0
  22. package/dist/generated/feedback.js +13 -0
  23. package/dist/generated/functions.d.ts +309 -0
  24. package/dist/generated/functions.js +333 -0
  25. package/dist/generated/identities.d.ts +36 -0
  26. package/dist/generated/identities.js +22 -0
  27. package/dist/generated/images.d.ts +200 -0
  28. package/dist/generated/images.js +65 -0
  29. package/dist/generated/index.d.ts +143 -0
  30. package/dist/generated/index.js +184 -0
  31. package/dist/generated/jobRuns.d.ts +68 -0
  32. package/dist/generated/jobRuns.js +22 -0
  33. package/dist/generated/jobs.d.ts +144 -0
  34. package/dist/generated/jobs.js +85 -0
  35. package/dist/generated/keys.d.ts +105 -0
  36. package/dist/generated/keys.js +26 -0
  37. package/dist/generated/me.d.ts +33 -0
  38. package/dist/generated/me.js +13 -0
  39. package/dist/generated/networks.d.ts +32 -0
  40. package/dist/generated/networks.js +14 -0
  41. package/dist/generated/notebooks.d.ts +309 -0
  42. package/dist/generated/notebooks.js +333 -0
  43. package/dist/generated/otel.d.ts +46 -0
  44. package/dist/generated/otel.js +22 -0
  45. package/dist/generated/ports.d.ts +55 -0
  46. package/dist/generated/ports.js +22 -0
  47. package/dist/generated/previews.d.ts +86 -0
  48. package/dist/generated/previews.js +67 -0
  49. package/dist/generated/projects.d.ts +47 -0
  50. package/dist/generated/projects.js +26 -0
  51. package/dist/generated/roles.d.ts +36 -0
  52. package/dist/generated/roles.js +22 -0
  53. package/dist/generated/routes.d.ts +3 -0
  54. package/dist/generated/routes.js +4 -0
  55. package/dist/generated/runtime.d.ts +176 -0
  56. package/dist/generated/runtime.js +416 -0
  57. package/dist/generated/sandboxes.d.ts +952 -0
  58. package/dist/generated/sandboxes.js +342 -0
  59. package/dist/generated/secrets.d.ts +116 -0
  60. package/dist/generated/secrets.js +54 -0
  61. package/dist/generated/sessions.d.ts +47 -0
  62. package/dist/generated/sessions.js +17 -0
  63. package/dist/generated/signing.d.ts +68 -0
  64. package/dist/generated/signing.js +187 -0
  65. package/dist/generated/sites.d.ts +309 -0
  66. package/dist/generated/sites.js +333 -0
  67. package/dist/generated/snapshots.d.ts +27 -0
  68. package/dist/generated/snapshots.js +22 -0
  69. package/dist/generated/tunnels.d.ts +68 -0
  70. package/dist/generated/tunnels.js +14 -0
  71. package/dist/generated/usage.d.ts +155 -0
  72. package/dist/generated/usage.js +17 -0
  73. package/dist/generated/volumes.d.ts +36 -0
  74. package/dist/generated/volumes.js +26 -0
  75. package/dist/generated/webhooks.d.ts +44 -0
  76. package/dist/generated/webhooks.js +22 -0
  77. package/dist/generated/workspaces.d.ts +309 -0
  78. package/dist/generated/workspaces.js +333 -0
  79. package/dist/v2/cli.d.ts +7 -0
  80. package/dist/v2/cli.js +283 -0
  81. package/dist/v2/index.d.ts +1 -0
  82. package/dist/v2/index.js +4 -0
  83. package/dist/v2/login.d.ts +35 -0
  84. package/dist/v2/login.js +225 -0
  85. package/dist/v2/mcp.d.ts +1 -0
  86. package/dist/v2/mcp.js +49 -0
  87. package/dist/v2/openapi.json +75750 -0
  88. package/dist/v2/shims/base.d.ts +33 -0
  89. package/dist/v2/shims/base.js +54 -0
  90. package/dist/v2/shims/blaxel.d.ts +60 -0
  91. package/dist/v2/shims/blaxel.js +71 -0
  92. package/dist/v2/shims/cloudflare.d.ts +52 -0
  93. package/dist/v2/shims/cloudflare.js +55 -0
  94. package/dist/v2/shims/daytona.d.ts +58 -0
  95. package/dist/v2/shims/daytona.js +74 -0
  96. package/dist/v2/shims/e2b.d.ts +142 -0
  97. package/dist/v2/shims/e2b.js +238 -0
  98. package/dist/v2/shims/fly.d.ts +6 -0
  99. package/dist/v2/shims/fly.js +91 -0
  100. package/dist/v2/shims/modal.d.ts +54 -0
  101. package/dist/v2/shims/modal.js +79 -0
  102. package/dist/v2/shims/morph.d.ts +60 -0
  103. package/dist/v2/shims/morph.js +87 -0
  104. package/dist/v2/shims/vercel.d.ts +53 -0
  105. package/dist/v2/shims/vercel.js +90 -0
  106. package/dist/v2/table.d.ts +53 -0
  107. package/dist/v2/table.js +122 -0
  108. package/package.json +20 -310
  109. package/BLAXEL.md +0 -290
  110. package/COMPATIBILITY.md +0 -447
  111. package/DAYTONA.md +0 -237
  112. package/E2B.md +0 -314
  113. package/README.md +0 -331
  114. package/README.src.md +0 -333
  115. package/VERCEL.md +0 -230
  116. package/agent-platforms-inventory.json +0 -387
  117. package/compatibility-lock.json +0 -305
  118. package/dist/agents/browser.d.ts +0 -12
  119. package/dist/agents/browser.js +0 -12
  120. package/dist/agents/index.d.ts +0 -11
  121. package/dist/agents/index.js +0 -11
  122. package/dist/agents-cli.d.ts +0 -16
  123. package/dist/agents-cli.js +0 -1237
  124. package/dist/agents-deploy.d.ts +0 -196
  125. package/dist/agents-deploy.js +0 -872
  126. package/dist/agents-file.d.ts +0 -19
  127. package/dist/agents-file.js +0 -135
  128. package/dist/ai/index.d.ts +0 -49
  129. package/dist/ai/index.js +0 -31
  130. package/dist/ai-harness/index.d.ts +0 -194
  131. package/dist/ai-harness/index.js +0 -522
  132. package/dist/api-defaults.d.ts +0 -17
  133. package/dist/api-defaults.js +0 -22
  134. package/dist/apps/index.d.ts +0 -10
  135. package/dist/apps/index.js +0 -11
  136. package/dist/apps-cli.d.ts +0 -16
  137. package/dist/apps-cli.js +0 -1021
  138. package/dist/billing-cli.d.ts +0 -23
  139. package/dist/billing-cli.js +0 -264
  140. package/dist/blaxel/client.d.ts +0 -59
  141. package/dist/blaxel/client.js +0 -86
  142. package/dist/blaxel/context.d.ts +0 -59
  143. package/dist/blaxel/context.js +0 -162
  144. package/dist/blaxel/errors.d.ts +0 -130
  145. package/dist/blaxel/errors.js +0 -315
  146. package/dist/blaxel/filesystem.d.ts +0 -147
  147. package/dist/blaxel/filesystem.js +0 -585
  148. package/dist/blaxel/index.d.ts +0 -287
  149. package/dist/blaxel/index.js +0 -351
  150. package/dist/blaxel/interpreter.d.ts +0 -71
  151. package/dist/blaxel/interpreter.js +0 -256
  152. package/dist/blaxel/lookup.d.ts +0 -39
  153. package/dist/blaxel/lookup.js +0 -84
  154. package/dist/blaxel/pagination.d.ts +0 -39
  155. package/dist/blaxel/pagination.js +0 -88
  156. package/dist/blaxel/preview.d.ts +0 -136
  157. package/dist/blaxel/preview.js +0 -304
  158. package/dist/blaxel/process.d.ts +0 -126
  159. package/dist/blaxel/process.js +0 -581
  160. package/dist/blaxel/sandbox.d.ts +0 -198
  161. package/dist/blaxel/sandbox.js +0 -856
  162. package/dist/blaxel/session.d.ts +0 -31
  163. package/dist/blaxel/session.js +0 -136
  164. package/dist/blaxel/snapshot.d.ts +0 -123
  165. package/dist/blaxel/snapshot.js +0 -199
  166. package/dist/blaxel/types.d.ts +0 -145
  167. package/dist/blaxel/types.js +0 -60
  168. package/dist/blaxel/unsupported.d.ts +0 -20
  169. package/dist/blaxel/unsupported.js +0 -32
  170. package/dist/browser-stub.d.ts +0 -1
  171. package/dist/browser-stub.js +0 -1
  172. package/dist/browsers/index.d.ts +0 -9
  173. package/dist/browsers/index.js +0 -10
  174. package/dist/browsers-cli.d.ts +0 -13
  175. package/dist/browsers-cli.js +0 -279
  176. package/dist/builds/index.d.ts +0 -10
  177. package/dist/builds/index.js +0 -11
  178. package/dist/ci/index.d.ts +0 -13
  179. package/dist/ci/index.js +0 -14
  180. package/dist/ci-cli.d.ts +0 -20
  181. package/dist/ci-cli.js +0 -537
  182. package/dist/ci-import.d.ts +0 -23
  183. package/dist/ci-import.js +0 -565
  184. package/dist/claude-agent-sdk/index.d.ts +0 -7
  185. package/dist/claude-agent-sdk/index.js +0 -65
  186. package/dist/cli/logs.d.ts +0 -21
  187. package/dist/cli/logs.js +0 -188
  188. package/dist/cli-extras.d.ts +0 -39
  189. package/dist/cli-extras.js +0 -267
  190. package/dist/cli-name.d.ts +0 -6
  191. package/dist/cli-name.js +0 -8
  192. package/dist/cli-update.d.ts +0 -11
  193. package/dist/cli-update.js +0 -46
  194. package/dist/cli-words.d.ts +0 -36
  195. package/dist/cli-words.js +0 -167
  196. package/dist/cli.d.ts +0 -92
  197. package/dist/cli.js +0 -5463
  198. package/dist/client.d.ts +0 -189
  199. package/dist/client.js +0 -205
  200. package/dist/cloudflare/errors.d.ts +0 -166
  201. package/dist/cloudflare/errors.js +0 -183
  202. package/dist/cloudflare/identity.d.ts +0 -7
  203. package/dist/cloudflare/identity.js +0 -13
  204. package/dist/cloudflare/index.d.ts +0 -545
  205. package/dist/cloudflare/index.js +0 -1106
  206. package/dist/cloudflare/interpreter.d.ts +0 -119
  207. package/dist/cloudflare/interpreter.js +0 -232
  208. package/dist/cloudflare/mime.d.ts +0 -1
  209. package/dist/cloudflare/mime.js +0 -66
  210. package/dist/cloudflare/streams.d.ts +0 -46
  211. package/dist/cloudflare/streams.js +0 -175
  212. package/dist/cloudflare/types.d.ts +0 -338
  213. package/dist/cloudflare/types.js +0 -80
  214. package/dist/cloudflare/watch.d.ts +0 -9
  215. package/dist/cloudflare/watch.js +0 -24
  216. package/dist/cloudflare/worker.d.ts +0 -706
  217. package/dist/cloudflare/worker.js +0 -633
  218. package/dist/codesandbox/guest-service.d.ts +0 -31
  219. package/dist/codesandbox/guest-service.js +0 -490
  220. package/dist/codesandbox/index.d.ts +0 -574
  221. package/dist/codesandbox/index.js +0 -1747
  222. package/dist/compat/core.d.ts +0 -58
  223. package/dist/compat/core.js +0 -267
  224. package/dist/compat/files.d.ts +0 -27
  225. package/dist/compat/files.js +0 -157
  226. package/dist/compat/lease.d.ts +0 -37
  227. package/dist/compat/lease.js +0 -93
  228. package/dist/compat/shell.d.ts +0 -4
  229. package/dist/compat/shell.js +0 -165
  230. package/dist/containers/index.d.ts +0 -10
  231. package/dist/containers/index.js +0 -11
  232. package/dist/credentials.d.ts +0 -71
  233. package/dist/credentials.js +0 -340
  234. package/dist/daytona/client.d.ts +0 -48
  235. package/dist/daytona/client.js +0 -45
  236. package/dist/daytona/computer-use.d.ts +0 -171
  237. package/dist/daytona/computer-use.js +0 -382
  238. package/dist/daytona/context.d.ts +0 -41
  239. package/dist/daytona/context.js +0 -50
  240. package/dist/daytona/daytona.d.ts +0 -213
  241. package/dist/daytona/daytona.js +0 -578
  242. package/dist/daytona/errors.d.ts +0 -117
  243. package/dist/daytona/errors.js +0 -201
  244. package/dist/daytona/filesystem.d.ts +0 -99
  245. package/dist/daytona/filesystem.js +0 -300
  246. package/dist/daytona/git.d.ts +0 -33
  247. package/dist/daytona/git.js +0 -128
  248. package/dist/daytona/image.d.ts +0 -49
  249. package/dist/daytona/image.js +0 -146
  250. package/dist/daytona/index.d.ts +0 -87
  251. package/dist/daytona/index.js +0 -102
  252. package/dist/daytona/process.d.ts +0 -143
  253. package/dist/daytona/process.js +0 -565
  254. package/dist/daytona/sandbox.d.ts +0 -222
  255. package/dist/daytona/sandbox.js +0 -505
  256. package/dist/desktops/index.d.ts +0 -9
  257. package/dist/desktops/index.js +0 -10
  258. package/dist/domains/index.d.ts +0 -9
  259. package/dist/domains/index.js +0 -10
  260. package/dist/e2b/client.d.ts +0 -76
  261. package/dist/e2b/client.js +0 -124
  262. package/dist/e2b/code-interpreter.d.ts +0 -134
  263. package/dist/e2b/code-interpreter.js +0 -239
  264. package/dist/e2b/commands.d.ts +0 -135
  265. package/dist/e2b/commands.js +0 -452
  266. package/dist/e2b/errors.d.ts +0 -125
  267. package/dist/e2b/errors.js +0 -247
  268. package/dist/e2b/filesystem.d.ts +0 -111
  269. package/dist/e2b/filesystem.js +0 -374
  270. package/dist/e2b/index.d.ts +0 -35
  271. package/dist/e2b/index.js +0 -69
  272. package/dist/e2b/pty.d.ts +0 -24
  273. package/dist/e2b/pty.js +0 -83
  274. package/dist/e2b/sandbox.d.ts +0 -248
  275. package/dist/e2b/sandbox.js +0 -781
  276. package/dist/e2b/unsupported.d.ts +0 -38
  277. package/dist/e2b/unsupported.js +0 -48
  278. package/dist/e2b/users.d.ts +0 -39
  279. package/dist/e2b/users.js +0 -207
  280. package/dist/errors.d.ts +0 -100
  281. package/dist/errors.js +0 -198
  282. package/dist/file-source.d.ts +0 -16
  283. package/dist/file-source.js +0 -162
  284. package/dist/fly/index.d.ts +0 -102
  285. package/dist/fly/index.js +0 -930
  286. package/dist/freestyle/index.d.ts +0 -629
  287. package/dist/freestyle/index.js +0 -1187
  288. package/dist/functions/index.d.ts +0 -10
  289. package/dist/functions/index.js +0 -11
  290. package/dist/identity.d.ts +0 -30
  291. package/dist/identity.js +0 -141
  292. package/dist/image-context.d.ts +0 -39
  293. package/dist/image-context.js +0 -176
  294. package/dist/images/index.d.ts +0 -9
  295. package/dist/images/index.js +0 -10
  296. package/dist/index.d.ts +0 -87
  297. package/dist/index.js +0 -51
  298. package/dist/inngest/index.d.ts +0 -96
  299. package/dist/inngest/index.js +0 -183
  300. package/dist/ips/index.d.ts +0 -9
  301. package/dist/ips/index.js +0 -10
  302. package/dist/jobs/index.d.ts +0 -9
  303. package/dist/jobs/index.js +0 -10
  304. package/dist/jobs-code/cron.d.ts +0 -12
  305. package/dist/jobs-code/cron.js +0 -93
  306. package/dist/jobs-code/registry.d.ts +0 -31
  307. package/dist/jobs-code/registry.js +0 -30
  308. package/dist/jobs-code/runner.d.ts +0 -1
  309. package/dist/jobs-code/runner.js +0 -74
  310. package/dist/jobs-deploy.d.ts +0 -22
  311. package/dist/jobs-deploy.js +0 -247
  312. package/dist/jobs-import.d.ts +0 -15
  313. package/dist/jobs-import.js +0 -231
  314. package/dist/keys.d.ts +0 -55
  315. package/dist/keys.js +0 -211
  316. package/dist/login.d.ts +0 -88
  317. package/dist/login.js +0 -369
  318. package/dist/machine.d.ts +0 -222
  319. package/dist/machine.js +0 -578
  320. package/dist/mcp.d.ts +0 -16
  321. package/dist/mcp.js +0 -377
  322. package/dist/modal/index.d.ts +0 -532
  323. package/dist/modal/index.js +0 -1284
  324. package/dist/morph/index.d.ts +0 -255
  325. package/dist/morph/index.js +0 -641
  326. package/dist/network-cli.d.ts +0 -17
  327. package/dist/network-cli.js +0 -523
  328. package/dist/networks/index.d.ts +0 -11
  329. package/dist/networks/index.js +0 -10
  330. package/dist/openai-agents/index.d.ts +0 -132
  331. package/dist/openai-agents/index.js +0 -738
  332. package/dist/page.d.ts +0 -13
  333. package/dist/page.js +0 -39
  334. package/dist/ports/index.d.ts +0 -9
  335. package/dist/ports/index.js +0 -10
  336. package/dist/product-names.d.ts +0 -52
  337. package/dist/product-names.js +0 -174
  338. package/dist/product-renames.d.ts +0 -103
  339. package/dist/product-renames.js +0 -189
  340. package/dist/products/agents.d.ts +0 -935
  341. package/dist/products/agents.js +0 -581
  342. package/dist/products/api-keys.d.ts +0 -113
  343. package/dist/products/api-keys.js +0 -32
  344. package/dist/products/apps.d.ts +0 -409
  345. package/dist/products/apps.js +0 -231
  346. package/dist/products/audit.d.ts +0 -51
  347. package/dist/products/audit.js +0 -10
  348. package/dist/products/balancers.d.ts +0 -87
  349. package/dist/products/balancers.js +0 -8
  350. package/dist/products/billing.d.ts +0 -76
  351. package/dist/products/billing.js +0 -26
  352. package/dist/products/browser.d.ts +0 -73
  353. package/dist/products/browser.js +0 -29
  354. package/dist/products/browsers.d.ts +0 -184
  355. package/dist/products/browsers.js +0 -180
  356. package/dist/products/builds.d.ts +0 -175
  357. package/dist/products/builds.js +0 -234
  358. package/dist/products/ci.d.ts +0 -406
  359. package/dist/products/ci.js +0 -133
  360. package/dist/products/containers.d.ts +0 -71
  361. package/dist/products/containers.js +0 -6
  362. package/dist/products/desktop.d.ts +0 -141
  363. package/dist/products/desktop.js +0 -83
  364. package/dist/products/desktops.d.ts +0 -71
  365. package/dist/products/desktops.js +0 -27
  366. package/dist/products/functions.d.ts +0 -2
  367. package/dist/products/functions.js +0 -5
  368. package/dist/products/images.d.ts +0 -229
  369. package/dist/products/images.js +0 -235
  370. package/dist/products/index.d.ts +0 -84
  371. package/dist/products/index.js +0 -105
  372. package/dist/products/interpreter.d.ts +0 -97
  373. package/dist/products/interpreter.js +0 -106
  374. package/dist/products/jobs.d.ts +0 -408
  375. package/dist/products/jobs.js +0 -256
  376. package/dist/products/limits.d.ts +0 -61
  377. package/dist/products/limits.js +0 -10
  378. package/dist/products/logs.d.ts +0 -245
  379. package/dist/products/logs.js +0 -274
  380. package/dist/products/mcp.d.ts +0 -88
  381. package/dist/products/mcp.js +0 -58
  382. package/dist/products/mounts.d.ts +0 -49
  383. package/dist/products/mounts.js +0 -21
  384. package/dist/products/network-products.d.ts +0 -268
  385. package/dist/products/network-products.js +0 -127
  386. package/dist/products/network.d.ts +0 -62
  387. package/dist/products/network.js +0 -19
  388. package/dist/products/observability.d.ts +0 -264
  389. package/dist/products/observability.js +0 -123
  390. package/dist/products/plans.d.ts +0 -133
  391. package/dist/products/plans.js +0 -24
  392. package/dist/products/previews.d.ts +0 -70
  393. package/dist/products/previews.js +0 -39
  394. package/dist/products/private-network.d.ts +0 -22
  395. package/dist/products/private-network.js +0 -10
  396. package/dist/products/queues.d.ts +0 -149
  397. package/dist/products/queues.js +0 -213
  398. package/dist/products/referrals.d.ts +0 -50
  399. package/dist/products/referrals.js +0 -8
  400. package/dist/products/reservations.d.ts +0 -108
  401. package/dist/products/reservations.js +0 -41
  402. package/dist/products/resources.d.ts +0 -55
  403. package/dist/products/resources.js +0 -122
  404. package/dist/products/secrets.d.ts +0 -316
  405. package/dist/products/secrets.js +0 -333
  406. package/dist/products/signed-requests.d.ts +0 -21
  407. package/dist/products/signed-requests.js +0 -11
  408. package/dist/products/sso.d.ts +0 -44
  409. package/dist/products/sso.js +0 -8
  410. package/dist/products/streams.d.ts +0 -73
  411. package/dist/products/streams.js +0 -17
  412. package/dist/products/switching.d.ts +0 -123
  413. package/dist/products/switching.js +0 -26
  414. package/dist/products/tailscale.d.ts +0 -57
  415. package/dist/products/tailscale.js +0 -17
  416. package/dist/products/uptime.d.ts +0 -97
  417. package/dist/products/uptime.js +0 -42
  418. package/dist/products/volumes.d.ts +0 -190
  419. package/dist/products/volumes.js +0 -114
  420. package/dist/products/watch.d.ts +0 -112
  421. package/dist/products/watch.js +0 -249
  422. package/dist/proxy.d.ts +0 -30
  423. package/dist/proxy.js +0 -200
  424. package/dist/record-cli.d.ts +0 -23
  425. package/dist/record-cli.js +0 -308
  426. package/dist/renamed-products.d.ts +0 -38
  427. package/dist/renamed-products.js +0 -34
  428. package/dist/resumable.d.ts +0 -32
  429. package/dist/resumable.js +0 -201
  430. package/dist/runloop/index.d.ts +0 -333
  431. package/dist/runloop/index.js +0 -560
  432. package/dist/runloop/pagination.d.ts +0 -46
  433. package/dist/runloop/pagination.js +0 -82
  434. package/dist/runloop/sdk.d.ts +0 -131
  435. package/dist/runloop/sdk.js +0 -167
  436. package/dist/runloop/snapshots.d.ts +0 -52
  437. package/dist/runloop/snapshots.js +0 -244
  438. package/dist/sandbox.d.ts +0 -371
  439. package/dist/sandbox.js +0 -1500
  440. package/dist/sandboxes/index.d.ts +0 -11
  441. package/dist/sandboxes/index.js +0 -12
  442. package/dist/sealing.d.ts +0 -6
  443. package/dist/sealing.js +0 -14
  444. package/dist/snapshots/index.d.ts +0 -9
  445. package/dist/snapshots/index.js +0 -11
  446. package/dist/snapshots.d.ts +0 -82
  447. package/dist/snapshots.js +0 -65
  448. package/dist/sprites/index.d.ts +0 -563
  449. package/dist/sprites/index.js +0 -1370
  450. package/dist/ssh.d.ts +0 -56
  451. package/dist/ssh.js +0 -416
  452. package/dist/switched-off.d.ts +0 -5
  453. package/dist/switched-off.js +0 -8
  454. package/dist/tar.d.ts +0 -15
  455. package/dist/tar.js +0 -526
  456. package/dist/terminal.d.ts +0 -24
  457. package/dist/terminal.js +0 -32
  458. package/dist/tools/index.d.ts +0 -62
  459. package/dist/tools/index.js +0 -181
  460. package/dist/transport.d.ts +0 -165
  461. package/dist/transport.js +0 -883
  462. package/dist/trigger/index.d.ts +0 -202
  463. package/dist/trigger/index.js +0 -244
  464. package/dist/tunnel.d.ts +0 -70
  465. package/dist/tunnel.js +0 -316
  466. package/dist/types.d.ts +0 -574
  467. package/dist/types.js +0 -1
  468. package/dist/vercel/client.d.ts +0 -40
  469. package/dist/vercel/client.js +0 -39
  470. package/dist/vercel/command.d.ts +0 -117
  471. package/dist/vercel/command.js +0 -391
  472. package/dist/vercel/errors.d.ts +0 -53
  473. package/dist/vercel/errors.js +0 -131
  474. package/dist/vercel/filesystem.d.ts +0 -153
  475. package/dist/vercel/filesystem.js +0 -297
  476. package/dist/vercel/index.d.ts +0 -24
  477. package/dist/vercel/index.js +0 -36
  478. package/dist/vercel/sandbox-user.d.ts +0 -70
  479. package/dist/vercel/sandbox-user.js +0 -207
  480. package/dist/vercel/sandbox.d.ts +0 -372
  481. package/dist/vercel/sandbox.js +0 -1037
  482. package/dist/vercel/snapshot.d.ts +0 -94
  483. package/dist/vercel/snapshot.js +0 -137
  484. package/dist/volumes/index.d.ts +0 -9
  485. package/dist/volumes/index.js +0 -10
  486. package/dist/wait.d.ts +0 -12
  487. package/dist/wait.js +0 -47
  488. package/dist/wallet.d.ts +0 -45
  489. package/dist/wallet.js +0 -56
  490. package/dist/wireguard.d.ts +0 -7
  491. package/dist/wireguard.js +0 -13
@@ -1,229 +0,0 @@
1
- import { Page } from "../page.js";
2
- import type { RequestOptions, Transport } from "../transport.js";
3
- /** A file for a small build context sent inline, or a recipe. */
4
- export type ImageFile = {
5
- path: string;
6
- content: string;
7
- encoding?: "utf8" | "base64";
8
- mode?: number;
9
- };
10
- export type ImageRecipe = {
11
- /** "runtime" (the default) or an image reference. */
12
- base?: string;
13
- apt?: string[];
14
- pip?: string[];
15
- npm?: string[];
16
- commands?: string[];
17
- env?: Record<string, string>;
18
- files?: ImageFile[];
19
- workdir?: string;
20
- };
21
- export type ImageBuildLimits = {
22
- vcpu?: number;
23
- memoryMiB?: number;
24
- diskMiB?: number;
25
- maxImageMiB?: number;
26
- timeoutSeconds?: number;
27
- /** The most this build's layer cache may keep. */
28
- cacheMiB?: number;
29
- };
30
- /** What a sandbox from the image runs as it starts, and when its create
31
- * answers: once `readyPort` is listened on, or `readyCommand` exits 0. */
32
- export type ImageStart = {
33
- command?: string;
34
- argv?: string[];
35
- cwd?: string;
36
- env?: Record<string, string>;
37
- readyCommand?: string;
38
- readyPort?: number;
39
- readyTimeoutSeconds?: number;
40
- };
41
- /** An uploaded build context: its archive's chunks and the files it holds. */
42
- export type ImageContext = {
43
- archive: {
44
- sha256: string;
45
- size: number;
46
- chunks: string[];
47
- };
48
- files: {
49
- path: string;
50
- sha256: string;
51
- size: number;
52
- mode?: number;
53
- }[];
54
- };
55
- /** Exactly one of `image`, `dockerfile` or `recipe`. */
56
- export type CreateImage = {
57
- /** Each build of a name is its next version. */
58
- name?: string;
59
- /** Tags the build takes when ready; a named image with none takes `latest`. */
60
- tags?: string[];
61
- labels?: Record<string, string>;
62
- region?: string;
63
- build?: ImageBuildLimits;
64
- env?: Record<string, string>;
65
- /** Overrides a Dockerfile's CMD and HEALTHCHECK; null runs nothing. */
66
- start?: ImageStart | null;
67
- /** false: build every step afresh and keep no cache. */
68
- cache?: boolean;
69
- } & ({
70
- image: string;
71
- dockerfile?: never;
72
- recipe?: never;
73
- } | {
74
- dockerfile: string;
75
- /** A small context sent inline (1 MiB in all). */
76
- files?: ImageFile[];
77
- /** A folder to send as the context, with its .dockerignore; uploaded
78
- * as chunks, and only the ones the server does not have. */
79
- contextDir?: string;
80
- /** An already uploaded context (`uploadContext`). */
81
- context?: ImageContext;
82
- dockerignore?: string;
83
- buildArgs?: Record<string, string>;
84
- /** Build this stage instead of the last. */
85
- target?: string;
86
- image?: never;
87
- recipe?: never;
88
- } | {
89
- recipe: ImageRecipe;
90
- image?: never;
91
- dockerfile?: never;
92
- });
93
- export type ImageState = "queued" | "building" | "ready" | "failed" | "deleting" | "deleted";
94
- export type Image = {
95
- id: string;
96
- kind: "image";
97
- status: string;
98
- state: ImageState;
99
- name: string | null;
100
- version: number | null;
101
- tags: string[];
102
- pendingTags?: string[];
103
- labels: Record<string, string>;
104
- region: string;
105
- source: {
106
- kind: "dockerfile" | "oci" | "recipe";
107
- digest: string;
108
- base: unknown;
109
- steps: number;
110
- planVersion?: number;
111
- stages?: number;
112
- contextBytes?: number | null;
113
- };
114
- build: ImageBuildLimits & {
115
- startedAt: string | null;
116
- endedAt: string | null;
117
- cachedSteps: number;
118
- builderVersion: string | null;
119
- };
120
- cache?: {
121
- enabled: boolean;
122
- maxMiB: number;
123
- from: string | null;
124
- checkpoints: number;
125
- bytes: number;
126
- };
127
- start?: ImageStart | null;
128
- sizeBytes: number | null;
129
- sizeMiB: number | null;
130
- storedBytes: number | null;
131
- rootfsSha256: string | null;
132
- env: Record<string, string>;
133
- workdir: string;
134
- error: string | null;
135
- logs: {
136
- bytes: number;
137
- lines: number;
138
- truncated: boolean;
139
- };
140
- createdAt: string;
141
- readyAt: string | null;
142
- /** What the source asked for that an image does not carry (on create). */
143
- notes?: string[];
144
- };
145
- export type ImageLogLine = {
146
- seq: number;
147
- at: string;
148
- stream: "build" | "system";
149
- text: string;
150
- };
151
- export type ImageLogs = {
152
- lines: ImageLogLine[];
153
- nextAfter: number;
154
- state: ImageState;
155
- truncated: boolean;
156
- done: boolean;
157
- };
158
- export type ImageRegistry = {
159
- id: string;
160
- registry: string;
161
- kind: "basic" | "ecr";
162
- username: string;
163
- region: string | null;
164
- createdAt: string;
165
- };
166
- /** Credentials for pulling private images: a user name and token or password
167
- * (Docker Hub, GitHub, Google with username `_json_key`), or an AWS access
168
- * key for Amazon ECR. Sealed for Runtime's hosts; never returned. */
169
- export type SetImageRegistry = {
170
- registry: string;
171
- username: string;
172
- password: string;
173
- } | {
174
- registry: string;
175
- accessKeyId: string;
176
- secretAccessKey: string;
177
- };
178
- /** Custom images: `runtime.images.build({ recipe: { pip: ["pandas"] } })`, or
179
- * `runtime.images.build({ name: "app", dockerfile, contextDir: "." })`, then
180
- * `runtime.sandboxes.create({ image: "app" })`. */
181
- export declare function images(t: Transport): {
182
- /** Queue a build and return at once, state "queued". With `contextDir`,
183
- * the folder is packed and its missing chunks uploaded first. */
184
- create(input: CreateImage, options?: RequestOptions): Promise<Image>;
185
- /** Build and wait until the image is ready or failed, streaming log lines
186
- * to `onLog`. Throws when the build fails, with the build's own error. */
187
- build(input: CreateImage, options?: RequestOptions & {
188
- onLog?: (line: ImageLogLine) => void;
189
- pollMs?: number;
190
- }): Promise<Image>;
191
- uploadContext: (folder: string, options?: RequestOptions & {
192
- dockerignore?: string;
193
- dockerfile?: string;
194
- }) => Promise<ImageContext & {
195
- dockerignore?: string;
196
- }>;
197
- get: (id: string, options?: RequestOptions) => Promise<Image>;
198
- resolve: (ref: string, options?: RequestOptions) => Promise<Image>;
199
- logs: (id: string, after?: number, options?: RequestOptions) => Promise<ImageLogs>;
200
- followLogs: (id: string, onLog: (line: ImageLogLine) => void, options?: RequestOptions & {
201
- after?: number;
202
- pollMs?: number;
203
- }) => Promise<Image>;
204
- list: (query?: {
205
- state?: ImageState;
206
- name?: string;
207
- limit?: number;
208
- cursor?: string;
209
- }, options?: RequestOptions) => Promise<Page<Image>>;
210
- /** Every version of a name, newest first. */
211
- versions: (name: string, options?: RequestOptions) => Promise<Page<Image>>;
212
- /** Point `tag` of the image's name at this version. */
213
- tag(ref: string, tag: string, options?: RequestOptions): Promise<Image>;
214
- untag(ref: string, tag: string, options?: RequestOptions): Promise<Image>;
215
- /** Delete one version (by id, name:tag or name@version) and its tags. A
216
- * bare name deletes its latest tag's version, or its only version when
217
- * it has one and no latest tag; with several, the error names its tags. */
218
- delete(ref: string, options?: RequestOptions): Promise<Image>;
219
- /** Credentials for private registries. The secret is sealed on arrival
220
- * and never returned. */
221
- registries: {
222
- list: (options?: RequestOptions) => Promise<ImageRegistry[]>;
223
- set: (input: SetImageRegistry, options?: RequestOptions) => Promise<ImageRegistry>;
224
- delete: (registry: string, options?: RequestOptions) => Promise<{
225
- registry: string;
226
- deleted: boolean;
227
- }>;
228
- };
229
- };
@@ -1,235 +0,0 @@
1
- import { RuntimeError } from "../errors.js";
2
- import { Page } from "../page.js";
3
- const UUID = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i;
4
- const PARALLEL_UPLOADS = 4;
5
- /** Custom images: `runtime.images.build({ recipe: { pip: ["pandas"] } })`, or
6
- * `runtime.images.build({ name: "app", dockerfile, contextDir: "." })`, then
7
- * `runtime.sandboxes.create({ image: "app" })`. */
8
- export function images(t) {
9
- const enc = encodeURIComponent;
10
- const get = (id, options) => t.json({ method: "GET", path: `/v1/images/${enc(id)}`, ...options });
11
- /** An image by id, name (its latest tag), name:tag or name@version. */
12
- const resolve = (ref, options) => UUID.test(ref)
13
- ? get(ref, options)
14
- : t.json({ method: "GET", path: "/v1/images/resolve", query: { ref }, ...options });
15
- const idOf = async (ref, options) => UUID.test(ref) ? ref : (await resolve(ref, options)).id;
16
- const logs = (id, after = 0, options) => t.json({
17
- method: "GET",
18
- path: `/v1/images/${enc(id)}/logs`,
19
- query: { after },
20
- ...options,
21
- });
22
- const list = async (query = {}, options) => {
23
- const page = await t.json({
24
- method: "GET",
25
- path: "/v1/images",
26
- query,
27
- ...options,
28
- });
29
- return new Page(page.data, page.nextCursor, (cursor) => list({ ...query, cursor }, options));
30
- };
31
- /** Pack a folder as a build context and upload the chunks the server does
32
- * not have yet. Node and Bun. */
33
- async function uploadContext(folder, options = {}) {
34
- const { dockerignore, dockerfile, ...request } = options;
35
- const { packContext, chunkArchive } = await import("../image-context.js");
36
- const packed = await packContext(folder, {
37
- ...(dockerignore === undefined ? {} : { dockerignore }),
38
- ...(dockerfile === undefined ? {} : { dockerfile }),
39
- });
40
- const archive = await chunkArchive(packed.archive);
41
- const { missing } = await t.json({
42
- method: "POST",
43
- path: "/v1/images/context/missing",
44
- body: { digests: archive.chunks.map((c) => c.sha256) },
45
- ...request,
46
- });
47
- const wanted = new Set(missing);
48
- const queue = archive.chunks.filter((chunk) => wanted.has(chunk.sha256));
49
- const upload = async () => {
50
- for (let chunk = queue.shift(); chunk; chunk = queue.shift())
51
- await t.json({
52
- method: "PUT",
53
- path: `/v1/images/context/${chunk.sha256}`,
54
- bytes: chunk.bytes,
55
- ...request,
56
- });
57
- };
58
- await Promise.all(Array.from({ length: PARALLEL_UPLOADS }, upload));
59
- return {
60
- archive: {
61
- sha256: archive.sha256,
62
- size: archive.size,
63
- chunks: archive.chunks.map((c) => c.sha256),
64
- },
65
- files: packed.files,
66
- ...(packed.dockerignore === undefined ? {} : { dockerignore: packed.dockerignore }),
67
- };
68
- }
69
- /** The request, with a context folder uploaded and named instead. */
70
- async function prepare(input, options) {
71
- if (!("contextDir" in input) || input.contextDir === undefined)
72
- return input;
73
- const { contextDir, ...rest } = input;
74
- const uploaded = await uploadContext(contextDir, {
75
- ...(rest.dockerignore === undefined ? {} : { dockerignore: rest.dockerignore }),
76
- ...(options?.signal ? { signal: options.signal } : {}),
77
- });
78
- const { dockerignore, ...context } = uploaded;
79
- return {
80
- ...rest,
81
- context,
82
- ...(dockerignore === undefined ? {} : { dockerignore }),
83
- };
84
- }
85
- /** Build log lines as they are written, until the build ends. Streams when
86
- * the server can, and polls when it cannot. */
87
- async function followLogs(id, onLog, options = {}) {
88
- const { after: from = 0, pollMs = 1000, ...request } = options;
89
- let after = from;
90
- try {
91
- for (;;) {
92
- let resume = false;
93
- for await (const event of t.events({
94
- method: "GET",
95
- path: `/v1/images/${enc(id)}/logs`,
96
- query: { after, follow: true },
97
- ...request,
98
- })) {
99
- if (event.type === "line") {
100
- onLog(event);
101
- after = event.seq;
102
- }
103
- else if (event.type === "done")
104
- return event.image;
105
- else if (event.type === "continue") {
106
- after = event.after;
107
- resume = true;
108
- }
109
- else if (event.type === "error")
110
- throw new Error(event.error.message);
111
- }
112
- if (!resume)
113
- break;
114
- }
115
- }
116
- catch (error) {
117
- if (request.signal?.aborted)
118
- throw error;
119
- }
120
- // A server without streamed logs, or a stream that broke: poll.
121
- for (;;) {
122
- const page = await logs(id, after, request);
123
- for (const line of page.lines)
124
- onLog(line);
125
- after = page.nextAfter;
126
- if (page.done)
127
- return get(id, request);
128
- const image = await get(id, request);
129
- if (image.state !== "queued" && image.state !== "building") {
130
- for (const line of (await logs(id, after, request)).lines)
131
- onLog(line);
132
- return image;
133
- }
134
- await new Promise((resolve) => setTimeout(resolve, pollMs));
135
- }
136
- }
137
- return {
138
- /** Queue a build and return at once, state "queued". With `contextDir`,
139
- * the folder is packed and its missing chunks uploaded first. */
140
- async create(input, options) {
141
- return t.json({
142
- method: "POST",
143
- path: "/v1/images",
144
- body: await prepare(input, options),
145
- ...options,
146
- });
147
- },
148
- /** Build and wait until the image is ready or failed, streaming log lines
149
- * to `onLog`. Throws when the build fails, with the build's own error. */
150
- async build(input, options = {}) {
151
- const { onLog, pollMs = 1000, ...request } = options;
152
- let image = await t.json({
153
- method: "POST",
154
- path: "/v1/images",
155
- body: await prepare(input, request),
156
- ...request,
157
- });
158
- if (onLog)
159
- image = await followLogs(image.id, onLog, { ...request, pollMs });
160
- while (image.state === "queued" || image.state === "building") {
161
- await new Promise((resolve) => setTimeout(resolve, pollMs));
162
- image = await get(image.id, { ...(request.signal ? { signal: request.signal } : {}) });
163
- }
164
- if (image.state !== "ready")
165
- throw new Error(`Image ${image.id} ${image.state}: ${image.error ?? "no error given"}`);
166
- return image;
167
- },
168
- uploadContext,
169
- get,
170
- resolve,
171
- logs,
172
- followLogs,
173
- list,
174
- /** Every version of a name, newest first. */
175
- versions: (name, options) => list({ name, limit: 100 }, options),
176
- /** Point `tag` of the image's name at this version. */
177
- async tag(ref, tag, options) {
178
- return t.json({
179
- method: "POST",
180
- path: `/v1/images/${enc(await idOf(ref, options))}:tag`,
181
- body: { tag },
182
- ...options,
183
- });
184
- },
185
- async untag(ref, tag, options) {
186
- return t.json({
187
- method: "POST",
188
- path: `/v1/images/${enc(await idOf(ref, options))}:untag`,
189
- body: { tag },
190
- ...options,
191
- });
192
- },
193
- /** Delete one version (by id, name:tag or name@version) and its tags. A
194
- * bare name deletes its latest tag's version, or its only version when
195
- * it has one and no latest tag; with several, the error names its tags. */
196
- async delete(ref, options) {
197
- const id = await idOf(ref, options).catch(async (error) => {
198
- if (!(error instanceof RuntimeError && error.code === "image_not_found") ||
199
- /[:@]/.test(ref))
200
- throw error;
201
- const live = (await list({ name: ref, limit: 100 }, options)).data.filter((image) => image.state !== "deleted" && image.state !== "deleting");
202
- if (live.length !== 1)
203
- throw error;
204
- return live[0].id;
205
- });
206
- return t.json({
207
- method: "POST",
208
- path: `/v1/images/${enc(id)}:delete`,
209
- body: {},
210
- ...options,
211
- });
212
- },
213
- /** Credentials for private registries. The secret is sealed on arrival
214
- * and never returned. */
215
- registries: {
216
- list: async (options) => (await t.json({
217
- method: "GET",
218
- path: "/v1/images/registries",
219
- ...options,
220
- })).data,
221
- set: (input, options) => t.json({
222
- method: "POST",
223
- path: "/v1/images/registries",
224
- body: input,
225
- ...options,
226
- }),
227
- delete: (registry, options) => t.json({
228
- method: "POST",
229
- path: "/v1/images/registries:delete",
230
- body: { registry },
231
- ...options,
232
- }),
233
- },
234
- };
235
- }
@@ -1,84 +0,0 @@
1
- import type { Transport } from "../transport.js";
2
- import type { Sandbox } from "../sandbox.js";
3
- import { images } from "./images.js";
4
- import { sandboxDesktop } from "./desktop.js";
5
- import { sandboxBrowser } from "./browser.js";
6
- import { sandboxInterpreter } from "./interpreter.js";
7
- import { sandboxNetwork } from "./network.js";
8
- import { domains, ips, networks, ports } from "./network-products.js";
9
- import { sandboxPreviews } from "./previews.js";
10
- import { referrals } from "./referrals.js";
11
- import { plans } from "./plans.js";
12
- import { billing } from "./billing.js";
13
- import { audit } from "./audit.js";
14
- import { sso } from "./sso.js";
15
- import { switching } from "./switching.js";
16
- import { limits } from "./limits.js";
17
- import { keys } from "./api-keys.js";
18
- import { reservations } from "./reservations.js";
19
- import { volumes } from "./volumes.js";
20
- import { jobs } from "./jobs.js";
21
- import { sandboxMounts } from "./mounts.js";
22
- import { sandboxTailscale } from "./tailscale.js";
23
- import { secrets } from "./secrets.js";
24
- import { mcp, sandboxMcp } from "./mcp.js";
25
- import { events, otel, sandboxMetrics, webhooks } from "./observability.js";
26
- import { agents } from "./agents.js";
27
- import { builds } from "./builds.js";
28
- import { ci } from "./ci.js";
29
- import { containers } from "./containers.js";
30
- import { browsers } from "./browsers.js";
31
- import { desktops } from "./desktops.js";
32
- import { apps } from "./apps.js";
33
- import { functions } from "./functions.js";
34
- export declare const clientExtensions: {
35
- images: typeof images;
36
- volumes: typeof volumes;
37
- jobs: typeof jobs;
38
- referrals: typeof referrals;
39
- plans: typeof plans;
40
- billing: typeof billing;
41
- limits: typeof limits;
42
- keys: typeof keys;
43
- reservations: typeof reservations;
44
- switching: typeof switching;
45
- secrets: typeof secrets;
46
- webhooks: typeof webhooks;
47
- otel: typeof otel;
48
- events: typeof events;
49
- audit: typeof audit;
50
- mcp: typeof mcp;
51
- sso: typeof sso;
52
- domains: typeof domains;
53
- ports: typeof ports;
54
- ips: typeof ips;
55
- networks: typeof networks;
56
- agents: typeof agents;
57
- builds: typeof builds;
58
- ci: typeof ci;
59
- containers: typeof containers;
60
- browsers: typeof browsers;
61
- desktops: typeof desktops;
62
- apps: typeof apps;
63
- functions: typeof functions;
64
- };
65
- export declare const sandboxExtensions: {
66
- interpreter: typeof sandboxInterpreter;
67
- previews: typeof sandboxPreviews;
68
- network: typeof sandboxNetwork;
69
- desktop: typeof sandboxDesktop;
70
- browser: typeof sandboxBrowser;
71
- mounts: typeof sandboxMounts;
72
- tailscale: typeof sandboxTailscale;
73
- metrics: typeof sandboxMetrics;
74
- mcp: typeof sandboxMcp;
75
- };
76
- export type ClientExtensions = {
77
- readonly [K in keyof typeof clientExtensions]: ReturnType<(typeof clientExtensions)[K]>;
78
- };
79
- export type SandboxExtensions = {
80
- readonly [K in keyof typeof sandboxExtensions]: ReturnType<(typeof sandboxExtensions)[K]>;
81
- };
82
- /** The factories as plain pairs, for the constructors that install them. */
83
- export declare function clientFactories(): Array<[string, (t: Transport) => unknown]>;
84
- export declare function sandboxFactories(): Array<[string, (t: Transport, sandbox: Sandbox) => unknown]>;
@@ -1,105 +0,0 @@
1
- import { images } from "./images.js";
2
- import { sandboxDesktop } from "./desktop.js";
3
- import { sandboxBrowser } from "./browser.js";
4
- import { sandboxInterpreter } from "./interpreter.js";
5
- import { sandboxNetwork } from "./network.js";
6
- import { domains, ips, networks, ports } from "./network-products.js";
7
- import { sandboxPreviews } from "./previews.js";
8
- import { referrals } from "./referrals.js";
9
- import { plans } from "./plans.js";
10
- import { billing } from "./billing.js";
11
- import { audit } from "./audit.js";
12
- import { sso } from "./sso.js";
13
- import { switching } from "./switching.js";
14
- import { limits } from "./limits.js";
15
- import { keys } from "./api-keys.js";
16
- import { reservations } from "./reservations.js";
17
- import { volumes } from "./volumes.js";
18
- import { jobs } from "./jobs.js";
19
- import { sandboxMounts } from "./mounts.js";
20
- import { sandboxTailscale } from "./tailscale.js";
21
- import { secrets } from "./secrets.js";
22
- import { mcp, sandboxMcp } from "./mcp.js";
23
- import { events, otel, sandboxMetrics, webhooks } from "./observability.js";
24
- import { agents } from "./agents.js";
25
- import { builds } from "./builds.js";
26
- import { ci } from "./ci.js";
27
- import { containers } from "./containers.js";
28
- import { browsers } from "./browsers.js";
29
- import { desktops } from "./desktops.js";
30
- // The hub loads this file, so it loads apps.ts and resources.ts too: request
31
- // builders over Transport whose top level holds only types, functions and
32
- // imports of files the hub loads, so importing them runs nothing in the hub
33
- // (agents/hub-sdk-products.test.ts parses every product file the hub loads).
34
- import { apps } from "./apps.js";
35
- import { functions } from "./functions.js";
36
- /* HOW A LANE ADDS A PRODUCT TO THE SDK
37
- *
38
- * 1. Write src/products/<name>.ts exporting a factory:
39
- * export function images(t: Transport) {
40
- * return {
41
- * create: (input: CreateImage, options?: RequestOptions) =>
42
- * t.json<Image>({ method: "POST", path: "/v1/images", body: input, ...options }),
43
- * ...
44
- * };
45
- * }
46
- * and, for methods that belong on a sandbox (sbx.previews.create(3000)):
47
- * export function sandboxPreviews(t: Transport, sandbox: Sandbox) { return { ... } }
48
- * 2. Add ONE line to the matching object below. The Runtime client and every
49
- * Sandbox pick it up, typed, with the shared auth, retries, keys and errors.
50
- */
51
- export const clientExtensions = {
52
- images,
53
- volumes,
54
- jobs,
55
- referrals,
56
- plans,
57
- billing,
58
- limits,
59
- keys,
60
- reservations,
61
- switching,
62
- secrets,
63
- webhooks,
64
- otel,
65
- events,
66
- audit,
67
- mcp,
68
- sso,
69
- domains,
70
- ports,
71
- ips,
72
- networks,
73
- agents,
74
- // Builds (beta): the API answers product_in_beta outside its list.
75
- builds,
76
- // CI/CD (beta): the API answers product_in_beta outside its list.
77
- ci,
78
- containers,
79
- // Browsers and Desktops (beta): the API answers product_in_beta outside its list.
80
- browsers,
81
- desktops,
82
- // A private beta (PRODUCT_BETAS): an account outside it is refused with
83
- // product_in_beta until Apps launches.
84
- apps,
85
- // The same until Functions launches.
86
- functions,
87
- };
88
- export const sandboxExtensions = {
89
- interpreter: sandboxInterpreter,
90
- previews: sandboxPreviews,
91
- network: sandboxNetwork,
92
- desktop: sandboxDesktop,
93
- browser: sandboxBrowser,
94
- mounts: sandboxMounts,
95
- tailscale: sandboxTailscale,
96
- metrics: sandboxMetrics,
97
- mcp: sandboxMcp,
98
- };
99
- /** The factories as plain pairs, for the constructors that install them. */
100
- export function clientFactories() {
101
- return Object.entries(clientExtensions);
102
- }
103
- export function sandboxFactories() {
104
- return Object.entries(sandboxExtensions);
105
- }