withruntime 0.50.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 -585
  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,935 +0,0 @@
1
- /** Agents: a coding or support agent's harness (Claude Code, Codex, Gemini
2
- * CLI, or your own code on an agents SDK) in a sandbox of its own per
3
- * session, on your own model key. Your app drives its sessions through this
4
- * API and webhooks. In a private beta: outside it every call is refused with
5
- * `product_in_beta`.
6
- *
7
- * const agent = await runtime.agents.create({
8
- * name: "support",
9
- * definition: {
10
- * ...runtime.agents.templates["claude-code"].definition,
11
- * ...runtime.agents.uses.support.definition,
12
- * instructions: "Answer questions about our product. Be brief.",
13
- * },
14
- * });
15
- * const session = await runtime.agents.start("support", { input: "Hi!", key: "customer:42" });
16
- * for await (const event of session.events()) if (event.kind === "reply") console.log(event.body.text);
17
- *
18
- * A session's sandbox is billed while it runs, at $0.03 per active vCPU-hour
19
- * and $0.01 per GiB-hour of memory; a waiting session's sandbox is paused.
20
- * No session fee, no seats. */
21
- import { Page } from "../page.js";
22
- import type { RequestOptions, Transport } from "../transport.js";
23
- export type AgentDefinition = {
24
- /** What runs the harness, from the sandbox's home. */
25
- command: string;
26
- /** Where each session's sandbox starts: an image of yours; a snapshot of
27
- * a machine you set up by hand (a harness logged in to your own
28
- * subscription included); or a GitHub repository connected to CI/CD,
29
- * `owner/name`, whose warm snapshot (checked out at /workspace/repo at its
30
- * production branch's last passing commit, set up) each session starts
31
- * as a copy of, its harness run there. The default image has Node and
32
- * Python. */
33
- from?: {
34
- image: string;
35
- } | {
36
- snapshot: string;
37
- } | {
38
- repo: string;
39
- };
40
- /** 1, 2, 4, 8 or 16; default 4. */
41
- vcpu?: number;
42
- /** 512 to 65536, a multiple of 256; default 8192 (8 GiB). */
43
- memoryMiB?: number;
44
- /** The agent's standing words, at most 64 KiB. */
45
- instructions?: string;
46
- /** Settings the harness sees; never a secret. */
47
- env?: Record<string, string>;
48
- /** Names of your egress secrets the sandbox may use: it sees a placeholder,
49
- * and the egress proxy adds the value toward the secret's hosts. Model
50
- * keys of any provider go here (ANTHROPIC_API_KEY, OPENAI_API_KEY,
51
- * GEMINI_API_KEY, OPENROUTER_API_KEY, or an OpenAI-compatible endpoint's
52
- * key with env.OPENAI_BASE_URL). */
53
- secrets?: string[];
54
- /** Claude accounts, 1 to 16 egress secrets' names: subscription tokens,
55
- * or API keys for a name holding API_KEY. Each session takes the one with
56
- * the most usage left; the review template moves to the next when one is
57
- * out of usage, and waits for the soonest reset when all are. */
58
- pool?: string[];
59
- /** MCP servers the harness may reach. */
60
- mcp?: {
61
- name: string;
62
- url: string;
63
- }[];
64
- volumes?: {
65
- volume: string;
66
- path: string;
67
- }[];
68
- /** Where each session's sandbox may connect, enforced by its network
69
- * rules from its first packet: with allow, only those hosts. Absent:
70
- * anywhere. */
71
- network?: {
72
- internet: boolean;
73
- allow?: string[];
74
- };
75
- /** How long a session's sandbox runs with nothing happening before it
76
- * pauses; default 60. */
77
- idlePauseSeconds?: number;
78
- /** A session's longest life; default 86400. */
79
- maxSessionSeconds?: number;
80
- /** Sessions running at once; more wait, queued. Default 10. */
81
- maxConcurrent?: number;
82
- /** What one session may cost, its subagents' sessions included, in
83
- * dollars; it stops with reason `budget` there. Default 5. */
84
- maxSessionDollars?: number;
85
- /** What the agent's sessions may cost in a day, in dollars; past it the
86
- * agent starts nothing new (`budget_reached`) until the next. Default 100. */
87
- maxDayDollars?: number;
88
- /** The use it was set up for (`uses`). */
89
- template?: "support" | "team";
90
- /** Whose memory a session reads: `key` (the default), each session key
91
- * its own; `agent`, one all its sessions share, never a support agent's. */
92
- memory?: {
93
- scope: "key" | "agent";
94
- };
95
- /** The model the harness runs (claude-opus-5-5, gpt-5.1-codex,
96
- * gemini-3-pro); absent, the harness's default. The harness reads it as
97
- * RUNTIME_AGENT_MODEL, and Claude Code, the Claude Agent SDK, Codex,
98
- * Gemini CLI and the OpenAI Agents SDK each by their own setting. */
99
- model?: string;
100
- /** What a session's start may override (`StartAgentSession.overrides`). */
101
- sessionOverrides?: AgentSessionOverrideLimits;
102
- /** Child sessions its tree may hold open at once, a workflow's steps
103
- * from inside it included: 1 to 1000, default 100. */
104
- maxChildren?: number;
105
- /** A second model a session asks for advice mid-task (`advise` in the
106
- * sandbox). Each question and answer is kept in the session's log as a
107
- * `note` whose body holds `advice`. */
108
- advisor?: AgentAdvisor;
109
- /** Which tool calls of the harness run, wait for a person, or are
110
- * refused. Each call is a `tool_call` event in the session's log; one that
111
- * waits is an ask of the inbox with the options Allow and Deny
112
- * (`agents.asks.approve`, `agents.asks.deny`), and only that call waits.
113
- * Absent: every call runs. */
114
- permissions?: AgentPermissions;
115
- };
116
- /** The limits an agent's owner sets on its sessions' overrides. A session
117
- * may always narrow its MCP servers and disallow tools. */
118
- export type AgentSessionOverrideLimits = {
119
- /** The models a session may name; absent, any. */
120
- models?: string[];
121
- /** Whether a session may add to the agent's instructions (`append`, the
122
- * default), also replace them (`replace`), or neither (`none`). */
123
- instructions?: "append" | "replace" | "none";
124
- /** The most vCPU a session may ask for; absent, the agent's `vcpu`. */
125
- maxVcpu?: number;
126
- /** The most memory a session may ask for; absent, the agent's `memoryMiB`. */
127
- maxMemoryMiB?: number;
128
- /** The most budget a session may ask for; absent, the agent's `maxSessionDollars`. */
129
- maxSessionDollars?: number;
130
- };
131
- /** One session's own model, instructions, MCP servers, disallowed tools,
132
- * size and budget, within its agent's `sessionOverrides`. Recorded on the
133
- * session (`overrides`) and noted in its log. */
134
- export type AgentSessionOverrides = {
135
- /** The model the harness runs for this session. */
136
- model?: string;
137
- /** Added after the agent's instructions, or in their place with
138
- * `instructionsMode: "replace"`; at most 64 KiB with the agent's. */
139
- instructions?: string;
140
- /** `append` (the default) or `replace`. */
141
- instructionsMode?: "append" | "replace";
142
- /** Names of the agent's MCP servers this session keeps; `[]` keeps none. */
143
- mcp?: string[];
144
- /** Tools the harness may not use: Runtime's own (`spawn`, `pr`, `ask`,
145
- * `remember`, ...; never `wait`, `reply` or `done`) and the harness's
146
- * (Claude Code's `Bash` or `mcp__github`, Gemini CLI's `run_shell_command`). */
147
- disallowedTools?: string[];
148
- /** At most the agent's `sessionOverrides.maxVcpu`, else its own `vcpu`. */
149
- vcpu?: number;
150
- /** At most the agent's `sessionOverrides.maxMemoryMiB`, else its own. */
151
- memoryMiB?: number;
152
- /** This session's budget, its subagents included; at most the agent's
153
- * `sessionOverrides.maxSessionDollars`, else its own. */
154
- maxSessionDollars?: number;
155
- };
156
- /** always_allow: the call runs. always_ask: it waits for a person's Allow or
157
- * Deny. auto: Runtime reads the call and runs it, refuses it (high_risk) or
158
- * holds it for a person (indeterminate). */
159
- export type AgentPermissionPolicy = "always_allow" | "always_ask" | "auto";
160
- export type AgentPermissions = {
161
- /** Default always_allow. */
162
- default?: AgentPermissionPolicy;
163
- /** By the most particular name that matches: the harness's own tool name
164
- * (Bash, Edit, apply_patch, run_shell_command, mcp__github__create_issue),
165
- * an MCP server (mcp:github), or a family (shell, edit, read, web, mcp). */
166
- tools?: Record<string, AgentPermissionPolicy>;
167
- };
168
- export type AgentAdvisor = {
169
- /** claude-opus-5-5, gpt-5.5, gemini-3-pro, or an OpenRouter name. */
170
- model: string;
171
- /** Read from the model's name when left out. */
172
- provider?: "anthropic" | "openai" | "google" | "openrouter" | "openai-compatible";
173
- /** The egress secret its key is, which must be in `secrets` or `pool`;
174
- * the provider's usual one when left out (ANTHROPIC_API_KEY, ...). */
175
- secret?: string;
176
- /** An OpenAI-compatible endpoint, or another host for the provider's API. */
177
- baseUrl?: string;
178
- /** Advice a session may ask for: 1 to 200, default 20. */
179
- maxCalls?: number;
180
- /** The advisor's standing words, at most 16 KiB. */
181
- instructions?: string;
182
- };
183
- export type Agent = {
184
- id: string;
185
- name: string;
186
- version: number;
187
- /** With its defaults written in. */
188
- definition: AgentDefinition;
189
- labels: Record<string, string>;
190
- /** `subscription_for_customers`: its secrets name CLAUDE_CODE_OAUTH_TOKEN
191
- * and it is set up to answer your customers (`template: "support"`). A
192
- * subscription is for your own team's agents; an agent that serves your
193
- * customers uses an API key. */
194
- warnings: "subscription_for_customers"[];
195
- createdAt: string;
196
- updatedAt: string;
197
- };
198
- export type AgentSessionState = "queued" | "running" | "waiting" | "done" | "failed" | "stopped";
199
- /** One session. Subagents' parentSessionId and rootSessionId, its cost and
200
- * treeCost, historyBytes and attachmentBytes join it as the API gains
201
- * them. */
202
- export type AgentSession = {
203
- id: string;
204
- agentId: string;
205
- agentVersion: number;
206
- key: string | null;
207
- trigger: "api" | AgentTriggerKind;
208
- state: AgentSessionState;
209
- /** Why it ended. */
210
- reason: string | null;
211
- /** What the agent said it ended with: a pull request's address, an answer. */
212
- result: string | null;
213
- sandboxId: string | null;
214
- lastSeq: number;
215
- labels: Record<string, string>;
216
- /** What its start overrode of its agent's definition, as given; null,
217
- * nothing. */
218
- overrides: AgentSessionOverrides | null;
219
- /** The workflow it is a step of, or null. */
220
- workflowId: string | null;
221
- createdAt: string;
222
- startedAt: string | null;
223
- endedAt: string | null;
224
- };
225
- export type AgentEvent = {
226
- seq: number;
227
- /** turn and tool: a model turn and a tool call of the session's trace,
228
- * the span in body (`AgentTurn`, `AgentToolCall`). tool_call: one call
229
- * the harness made under the agent's permissions, body {text, tool,
230
- * input, toolUseId, evaluatedPermission, evaluation, askId}. */
231
- kind: "input" | "answer" | "reply" | "ask" | "status" | "result" | "error" | "note" | "child" | "turn" | "tool" | "tool_call";
232
- /** A key's principal id, slack:<user>, github:<login>, agent (the
233
- * harness) or runtime. */
234
- actor: string;
235
- /** Words are body.text. */
236
- body: {
237
- text?: string;
238
- } & Record<string, unknown>;
239
- createdAt: string;
240
- };
241
- /** Token counts and their cost at the provider's list price, in USD. */
242
- export type AgentTokens = {
243
- /** Input tokens not read from or written to the prompt cache. */
244
- inputTokens: number;
245
- outputTokens: number;
246
- cacheReadTokens: number;
247
- cacheWriteTokens: number;
248
- costUsd: number;
249
- };
250
- /** One model request the session's harness made. */
251
- export type AgentTurn = Omit<AgentTokens, "costUsd"> & {
252
- seq: number;
253
- kind: "turn";
254
- /** 16 hex digits; a tool call's `turn` names it. */
255
- id: string;
256
- provider: "anthropic" | "openai" | "google" | "other";
257
- model: string;
258
- startedAt: string;
259
- durationMs: number;
260
- /** Until the first bytes of the answer. */
261
- firstTokenMs: number | null;
262
- /** null for a model with no list price known. */
263
- costUsd: number | null;
264
- stopReason: string | null;
265
- /** The model API's HTTP status. */
266
- status: number;
267
- error: string | null;
268
- toolCalls: {
269
- id: string;
270
- name: string;
271
- }[];
272
- };
273
- /** One tool call: from the turn that asked for it to the request that
274
- * carried its result back. */
275
- export type AgentToolCall = {
276
- seq: number;
277
- kind: "tool";
278
- id: string;
279
- name: string;
280
- turn: string | null;
281
- startedAt: string;
282
- durationMs: number;
283
- /** The call's input and output, each at most 2,000 characters. */
284
- input: string;
285
- output: string;
286
- error: boolean;
287
- };
288
- /** A page of a session's trace: the whole session's totals, by model and
289
- * by tool, and up to `limit` spans after `after`. Read the next page with
290
- * `after: nextAfter` until it is null. */
291
- export type AgentTrace = {
292
- sessionId: string;
293
- totals: AgentTokens & {
294
- turns: number;
295
- toolCalls: number;
296
- unpricedTurns: number;
297
- failedTurns: number;
298
- failedToolCalls: number;
299
- modelMs: number;
300
- toolMs: number;
301
- };
302
- models: (AgentTokens & {
303
- model: string;
304
- provider: string;
305
- turns: number;
306
- unpricedTurns: number;
307
- })[];
308
- tools: {
309
- name: string;
310
- calls: number;
311
- failed: number;
312
- durationMs: number;
313
- }[];
314
- spans: (AgentTurn | AgentToolCall)[];
315
- /** The seq to read the next page after; null when the log held no more. */
316
- nextAfter: number | null;
317
- };
318
- /** OTLP/JSON: an ExportTraceServiceRequest of one page, to POST to a
319
- * collector's /v1/traces; the first page holds the session's root span. */
320
- export type AgentTraceOtlp = {
321
- resourceSpans: Record<string, unknown>[];
322
- nextAfter: number | null;
323
- };
324
- /** Which page of a trace: spans after `after` (0 by default), at most
325
- * `limit` (200 by default, 500 at most). */
326
- export type AgentTracePage = {
327
- after?: number;
328
- limit?: number;
329
- };
330
- export type AgentAskState = "open" | "answered" | "expired" | "withdrawn" | "closed";
331
- /** One row of the account's inbox: a question a session's harness needs
332
- * answered to go on. Asks of one agent's sessions sharing a memory, with the same `step` are
333
- * one row while it is open, and one answer reaches every session asking. */
334
- export type AgentAsk = {
335
- id: string;
336
- /** The agent of the session that asked first. */
337
- agentId: string;
338
- /** What it waits on, in the asker's words. */
339
- step: string | null;
340
- question: string;
341
- /** Why it matters. */
342
- why: string | null;
343
- options: {
344
- label: string;
345
- detail?: string;
346
- }[];
347
- /** The recommended option's label; taken as the answer when it expires. */
348
- pick: string | null;
349
- /** Who sees it: its agent's labels with the ask's own over them. */
350
- labels: Record<string, string>;
351
- state: AgentAskState;
352
- /** An option's label and/or words; `expired` when the pick was taken at
353
- * expiry. */
354
- answer: {
355
- option?: string;
356
- text?: string;
357
- expired?: boolean;
358
- } | null;
359
- /** A key's principal id, or `runtime` for a pick taken at expiry. */
360
- answeredBy: string | null;
361
- /** The sessions asking it, each with its ask event's seq and the answer
362
- * event that woke it. */
363
- sessions: {
364
- sessionId: string;
365
- state: "asking" | "answered" | "expired" | "withdrawn" | "ended";
366
- seq: number;
367
- answerSeq: number | null;
368
- }[];
369
- expiresAt: string | null;
370
- createdAt: string;
371
- updatedAt: string;
372
- closedAt: string | null;
373
- /** The tool call it holds, answered Allow or Deny; null for any other ask. */
374
- toolCall: AgentAskToolCall | null;
375
- };
376
- /** A tool call the agent's permissions hold for a person. */
377
- export type AgentAskToolCall = {
378
- /** The harness's name for it: Bash, apply_patch, mcp__github__create_issue. */
379
- tool: string;
380
- input: Record<string, unknown>;
381
- toolUseId?: string;
382
- /** Its tool_call event in the session's log. */
383
- seq?: number;
384
- policy: "always_ask" | "auto";
385
- /** Why auto held it: indeterminate. */
386
- reasonCode?: string;
387
- };
388
- export type ListAgentAsks = {
389
- /** Open by default. */
390
- state?: AgentAskState[];
391
- agent?: string;
392
- /** Asks carrying every one of these labels: who sees an ask. */
393
- labels?: Record<string, string>;
394
- cursor?: string;
395
- limit?: number;
396
- };
397
- /** An option's label, words, or both. */
398
- export type AnswerAgentAsk = {
399
- option?: string;
400
- text?: string;
401
- };
402
- export type AgentTriggerKind = "slack" | "github" | "schedule" | "webhook";
403
- /** The link that adds Runtime's Slack app to a workspace. */
404
- export type SlackInstallLink = {
405
- url: string;
406
- expiresAt: string;
407
- };
408
- /** A Slack workspace added to the account: its id is a slack trigger's `team`. */
409
- export type SlackTeam = {
410
- team: string;
411
- name: string | null;
412
- botUser: string;
413
- installedAt: string;
414
- };
415
- /** A trigger's rules, each optional. */
416
- export type AgentTriggerRules = {
417
- /** Queue order of its sessions when the agent's maxConcurrent is full:
418
- * -100 to 100, higher first, then oldest. Default 0. */
419
- priority?: number;
420
- /** Sessions it may start in an hour; a call past it is held for you.
421
- * Joining an open session is never capped. Default none. */
422
- maxStartsPerHour?: number;
423
- /** A call whose key's last session has ended: "start" a new one (the
424
- * default), "note" it in the ended session's log and run nothing, or
425
- * "ask" you (the call is held until you start it). */
426
- onEnded?: "start" | "note" | "ask";
427
- /** Where a held call is told: "email" to who added the trigger (the
428
- * default), or "webhook", the account's webhooks' agent.call.held alone. */
429
- notify?: "email" | "webhook";
430
- /** A webhook's only: the key of a call that sends none, from its JSON's
431
- * fields: "{cause}", "{alert.host}:{check}". */
432
- key?: string;
433
- };
434
- export type AgentTrigger = {
435
- id: string;
436
- agentId: string;
437
- kind: AgentTriggerKind;
438
- config: Record<string, unknown>;
439
- rules: AgentTriggerRules;
440
- pausedAt: string | null;
441
- pausedWhy: string | null;
442
- createdAt: string;
443
- /** When it last changed: made, paused or resumed. */
444
- updatedAt: string;
445
- /** A webhook's secret, which each of its calls carries: answered once,
446
- * when it is added, and never again. Keep it where you keep your keys. */
447
- secret?: string;
448
- };
449
- export type CreateAgent = {
450
- name: string;
451
- definition: AgentDefinition;
452
- labels?: Record<string, string>;
453
- };
454
- export type StartAgentSession = {
455
- input: string;
456
- /** Words with the same key join its open session: a Slack thread, a pull
457
- * request, one of your customers (`customer:42`). */
458
- key?: string;
459
- labels?: Record<string, string>;
460
- /** This session's own model, instructions, MCP servers, disallowed tools,
461
- * size and budget, within the agent's `sessionOverrides`: one it does not
462
- * allow is refused (`permission_denied`, naming what it allows). Words
463
- * that join an open session carry its own overrides or none (else
464
- * `conflict`). */
465
- overrides?: AgentSessionOverrides;
466
- };
467
- export type CreateAgentTrigger = ({
468
- kind: "slack";
469
- config: {
470
- team: string;
471
- channel: string;
472
- };
473
- } | {
474
- kind: "github";
475
- config: {
476
- installation: number;
477
- repository: string;
478
- events?: string[];
479
- };
480
- } | {
481
- kind: "schedule";
482
- config: {
483
- cron: string;
484
- timezone?: string;
485
- input: string;
486
- };
487
- } | {
488
- kind: "webhook";
489
- config: Record<string, never>;
490
- }) & {
491
- rules?: AgentTriggerRules;
492
- };
493
- /** One call to a webhook trigger: its words, and the key and labels of the
494
- * session it starts or joins. */
495
- export type AgentTriggerCall = {
496
- text: string;
497
- key?: string;
498
- labels?: Record<string, string>;
499
- };
500
- /** What a call did: started a session, joined its key's open one, was
501
- * noted in its key's ended one, or was held for you (`why`). */
502
- export type AgentTriggerCallOutcome = {
503
- outcome: "started" | "joined" | "noted" | "held";
504
- sessionId: string | null;
505
- seq: number | null;
506
- callId: string | null;
507
- why: AgentHeldCall["why"] | null;
508
- replayed: boolean;
509
- };
510
- /** A call a trigger held for you because no session could take it. None is
511
- * ever dropped. */
512
- export type AgentHeldCall = {
513
- id: string;
514
- triggerId: string;
515
- agentId: string;
516
- key: string | null;
517
- text: string;
518
- labels: Record<string, string>;
519
- /** The trigger was paused; it had started maxStartsPerHour sessions this
520
- * hour; its key's session had ended and onEnded is "ask"; the agent's day
521
- * budget was spent; the account's sessions were at their limit; Agents
522
- * was closed to the account. */
523
- why: "paused" | "rate" | "ended" | "budget" | "quota" | "closed";
524
- state: "held" | "started" | "dismissed";
525
- sessionId: string | null;
526
- notify: "email" | "webhook";
527
- createdAt: string;
528
- resolvedAt: string | null;
529
- };
530
- /** The harnesses' names, so `templates["claude-code"]` is known to be there. */
531
- export type AgentTemplateKey = "claude-code" | "codex" | "gemini-cli" | "claude-agent-sdk" | "openai-agents-sdk" | "review" | "judge" | "browser";
532
- /** A file of an agent's memory (`memory.list`). `scope` is whose: empty for
533
- * the shared memory, which every session reads (one keeping memory per key
534
- * reads what you wrote there, and never changes it), or a session key
535
- * (`customer:42`) for that key's alone. */
536
- export type AgentMemoryEntry = {
537
- scope: string;
538
- path: string;
539
- /** Its text and path, in bytes, as billed. */
540
- bytes: number;
541
- updatedAt: string;
542
- /** A key's principal id, or session:<id> when the agent wrote it. */
543
- updatedBy: string;
544
- };
545
- export type AgentMemoryFile = AgentMemoryEntry & {
546
- content: string;
547
- };
548
- export type AgentMemoryHit = {
549
- scope: string;
550
- path: string;
551
- /** Its words around the match, matches in **bold**. */
552
- snippet: string;
553
- /** Higher is better. */
554
- rank: number;
555
- bytes: number;
556
- updatedAt: string;
557
- };
558
- export type AgentMemoryWritten = {
559
- scope: string;
560
- path: string;
561
- bytes: number;
562
- /** True for a new file, false for one replaced. */
563
- created: boolean;
564
- updatedAt: string;
565
- };
566
- /** The agent's whole memory, every scope: what storage is billed on. */
567
- export type AgentMemoryUsage = {
568
- bytes: number;
569
- files: number;
570
- limitBytes: number;
571
- limitFiles: number;
572
- };
573
- export type AgentMemoryPage = Page<AgentMemoryEntry> & {
574
- readonly usage: AgentMemoryUsage;
575
- };
576
- /** A harness, as data (packages/cloud-guide/agent-templates.json, the same
577
- * in every SDK and the guide). `definition` is what an agent's definition
578
- * takes from it; add a use's (`uses`) and your instructions. */
579
- export type AgentTemplate = {
580
- key: AgentTemplateKey;
581
- title: string;
582
- command: string;
583
- /** The egress secret its API key is stored as, and the host it is for. */
584
- apiKeySecret: string;
585
- apiKeyHost: string;
586
- /** How your own subscription logs it in, for your own team's agents, or
587
- * null when it takes an API key alone. */
588
- subscription: string | null;
589
- definition: Pick<AgentDefinition, "secrets" | "pool" | "vcpu" | "memoryMiB" | "maxSessionSeconds"> & {
590
- command: string;
591
- };
592
- };
593
- /** A use: what an agent is for, merged into a template's definition. */
594
- export type AgentUse = {
595
- key: "support" | "team";
596
- title: string;
597
- /** How its sessions are keyed: the key your app passes per customer, or
598
- * none. */
599
- sessionKey: string | null;
600
- triggers: ("api" | AgentTriggerKind)[];
601
- definition: Partial<AgentDefinition> & {
602
- template: "support" | "team";
603
- };
604
- };
605
- /** The harnesses (agents-contract.md); tests/agents.test.ts holds them
606
- * to packages/cloud-guide/agent-templates.json. */
607
- export declare const AGENT_TEMPLATES: Readonly<Record<AgentTemplateKey, AgentTemplate>>;
608
- /** A harness by a key read from a file or a flag, or undefined. */
609
- export declare function agentTemplate(key: string): AgentTemplate | undefined;
610
- export declare const AGENT_USES: Readonly<Record<"support" | "team", AgentUse>>;
611
- /** One phase of a workflow. */
612
- export type AgentWorkflowPhase = {
613
- /** A letter, then letters, digits, _ or -; {{<name>}} reads its results. */
614
- name: string;
615
- /** Its sessions' agent, by id or name; the workflow's when left out. */
616
- agent?: string;
617
- /** Each session's first words: {{input}}, {{item}}, {{index}} (1-based)
618
- * and {{<earlier phase>}} (its results, numbered) are filled in. */
619
- input: string;
620
- /** A list to fan out over (1 to 1000 items, one session each), or an
621
- * earlier phase's results split: `json`, the JSON array in each result;
622
- * `lines`, its non-empty lines. Absent: one session. */
623
- each?: unknown[] | {
624
- from: string;
625
- split?: "json" | "lines";
626
- };
627
- /** With `each.from`: start each item the moment its source session ends. */
628
- pipeline?: boolean;
629
- };
630
- /** Many sessions in phases, as one piece of work. */
631
- export type RunAgentWorkflow = {
632
- name?: string;
633
- /** The agent of every phase that names none. */
634
- agent?: string;
635
- /** What {{input}} is. */
636
- input?: string;
637
- labels?: Record<string, string>;
638
- /** Sessions it may start in all: 1 to 1000, default 100. */
639
- maxSessions?: number;
640
- /** Its sessions open at once: 1 to 200, default 20. */
641
- maxConcurrent?: number;
642
- /** What it may cost in all, in dollars: default 10. */
643
- maxDollars?: number;
644
- phases: AgentWorkflowPhase[];
645
- };
646
- export type AgentWorkflowState = "running" | "done" | "failed" | "stopped";
647
- export type AgentWorkflow = {
648
- id: string;
649
- name: string | null;
650
- state: AgentWorkflowState;
651
- /** Why it ended: done, steps_failed, max_sessions, budget, stopped,
652
- * parent_ended, quota, subagent_quota, agent_gone, permission_denied. */
653
- reason: string | null;
654
- /** Its last phase's result: one session's as it is, several as a JSON
655
- * array of their results. */
656
- result: string | null;
657
- /** The session that ran it from inside its sandbox, or null. */
658
- parentSessionId: string | null;
659
- spec: RunAgentWorkflow;
660
- maxSessions: number;
661
- maxConcurrent: number;
662
- maxDollars: number;
663
- /** Sessions it has started. */
664
- started: number;
665
- /** Raised at every change. */
666
- version: number;
667
- labels: Record<string, string>;
668
- phases: {
669
- name: string;
670
- agentId: string;
671
- /** Items known so far; final once `ready`. */
672
- total: number;
673
- ready: boolean;
674
- pending: number;
675
- running: number;
676
- done: number;
677
- /** Failed, stopped or skipped. */
678
- failed: number;
679
- }[];
680
- cost: {
681
- dollars: number;
682
- vcpuSeconds: number;
683
- gibSeconds: number;
684
- };
685
- createdAt: string;
686
- updatedAt: string;
687
- endedAt: string | null;
688
- };
689
- export type AgentWorkflowStep = {
690
- phase: string;
691
- item: number;
692
- /** What {{item}} was. */
693
- itemText: string | null;
694
- state: "pending" | "running" | "done" | "failed" | "stopped" | "skipped";
695
- reason: string | null;
696
- /** What its session ended with. */
697
- result: string | null;
698
- sessionId: string | null;
699
- createdAt: string;
700
- startedAt: string | null;
701
- endedAt: string | null;
702
- };
703
- /** One workflow, to follow and stop. */
704
- export type AgentWorkflowHandle = {
705
- readonly id: string;
706
- /** The workflow as it was when run or read. */
707
- readonly workflow: AgentWorkflow;
708
- /** The workflow at each change, as it happens, until it has ended. */
709
- follow(options?: {
710
- after?: number;
711
- signal?: AbortSignal;
712
- }): AsyncGenerator<AgentWorkflow>;
713
- /** Until it has ended; answers it then, with its result. */
714
- wait(options?: {
715
- signal?: AbortSignal;
716
- }): Promise<AgentWorkflow>;
717
- /** Its steps in phase and item order. */
718
- steps(query?: {
719
- state?: AgentWorkflowStep["state"][];
720
- limit?: number;
721
- }, options?: RequestOptions): Promise<Page<AgentWorkflowStep>>;
722
- stop(options?: RequestOptions): Promise<AgentWorkflow>;
723
- get(options?: RequestOptions): Promise<AgentWorkflow>;
724
- };
725
- /** One session, to talk to and follow. */
726
- export type AgentSessionHandle = {
727
- readonly id: string;
728
- /** The session as it was when started or read. */
729
- readonly session: AgentSession;
730
- /** Whether the start's words joined a session already open with its key. */
731
- readonly joined: boolean;
732
- /** The seq of the words that started or joined it. */
733
- readonly seq: number;
734
- /** Words in; answers their seq. */
735
- send(text: string, options?: RequestOptions): Promise<{
736
- seq: number;
737
- }>;
738
- /** Its log after `after` (0 by default), each event as it comes, waiting
739
- * up to 30 seconds a call; ends when the session has ended. */
740
- events(options?: {
741
- after?: number;
742
- signal?: AbortSignal;
743
- }): AsyncGenerator<AgentEvent>;
744
- stop(options?: RequestOptions): Promise<AgentSession>;
745
- /** A page of its trace: every model turn and tool call, with timing,
746
- * tokens and cost, and the session's totals; `{ format: "otlp" }` for
747
- * OpenTelemetry traces. */
748
- trace(options?: RequestOptions & AgentTracePage): Promise<AgentTrace>;
749
- trace(options: RequestOptions & AgentTracePage & {
750
- format: "otlp";
751
- }): Promise<AgentTraceOtlp>;
752
- /** Until it has ended; answers it then. */
753
- wait(options?: {
754
- signal?: AbortSignal;
755
- }): Promise<AgentSession>;
756
- get(options?: RequestOptions): Promise<AgentSession>;
757
- };
758
- export declare function agents(t: Transport): {
759
- /** Claude Managed Agents' API on Runtime: the options Anthropic's SDK
760
- * takes, so code written for it runs here unchanged:
761
- * `new Anthropic(await runtime.agents.anthropic())`. */
762
- anthropic: () => Promise<{
763
- baseURL: string;
764
- apiKey: string;
765
- }>;
766
- /** An agent: a name and a definition its sessions start from. */
767
- create: (input: CreateAgent, options?: RequestOptions) => Promise<Agent>;
768
- /** By its id or its name. */
769
- get: (agent: string, options?: RequestOptions) => Promise<Agent>;
770
- /** Your agents, oldest first. Await for a page, or `for await` for all. */
771
- list: (query?: {
772
- cursor?: string;
773
- limit?: number;
774
- }, options?: RequestOptions) => Promise<Page<Agent>>;
775
- /** A new version of the definition, whole; sessions already started keep theirs. */
776
- update: (agent: string, definition: AgentDefinition, options?: RequestOptions) => Promise<Agent>;
777
- /** Its triggers go and its open sessions stop. */
778
- delete: (agent: string, options?: RequestOptions) => Promise<void>;
779
- /** A session with its first words, or the open one with the same key joined. */
780
- start(agent: string, input: StartAgentSession, options?: RequestOptions): Promise<AgentSessionHandle>;
781
- /** A session you already have, by its id. */
782
- session(id: string, options?: RequestOptions): Promise<AgentSessionHandle>;
783
- sessions: {
784
- get: (id: string, options?: RequestOptions) => Promise<AgentSession>;
785
- /** A session's trace: every model turn and tool call with its timing,
786
- * tokens and cost, totals by model and tool; `{ format: "otlp" }` for
787
- * OpenTelemetry traces in the GenAI semantic conventions. */
788
- trace: {
789
- (id: string, options?: RequestOptions & AgentTracePage): Promise<AgentTrace>;
790
- (id: string, options: RequestOptions & AgentTracePage & {
791
- format: "otlp";
792
- }): Promise<AgentTraceOtlp>;
793
- };
794
- /** Newest first; of one agent, or in some states. */
795
- list: (query?: {
796
- agent?: string;
797
- state?: AgentSessionState[];
798
- cursor?: string;
799
- limit?: number;
800
- }, options?: RequestOptions) => Promise<Page<AgentSession>>;
801
- /** An ended session and its log go. Its history is storage like any
802
- * other, kept until you delete it; an open session is refused
803
- * (`session_open`): stop it first. */
804
- delete: (id: string, options?: RequestOptions) => Promise<void>;
805
- };
806
- /** Many sessions in phases as one piece of work: fanned out over lists
807
- * or earlier results, in parallel and in pipelines, under maxSessions,
808
- * maxConcurrent and maxDollars, ending with one result. The database
809
- * starts each step the moment what it waits on ends; nothing else runs
810
- * between steps, so a workflow costs only its sessions. */
811
- workflows: {
812
- /** Runs it now; answers a handle to follow, wait for and stop. */
813
- run(input: RunAgentWorkflow, options?: RequestOptions): Promise<AgentWorkflowHandle>;
814
- /** One you already have, by its id. */
815
- workflow(id: string, options?: RequestOptions): Promise<AgentWorkflowHandle>;
816
- get: (id: string, options?: RequestOptions) => Promise<AgentWorkflow>;
817
- /** The workflow at each change past `after`, as it happens, until it
818
- * has ended: each read waits up to 30 seconds for the next change. */
819
- follow: (id: string, options?: {
820
- after?: number;
821
- signal?: AbortSignal;
822
- }) => AsyncGenerator<AgentWorkflow>;
823
- /** Newest first, each with its phases' progress and cost. */
824
- list: (query?: {
825
- state?: AgentWorkflowState[];
826
- cursor?: string;
827
- limit?: number;
828
- }, options?: RequestOptions) => Promise<Page<AgentWorkflow>>;
829
- steps: (id: string, query?: {
830
- state?: AgentWorkflowStep["state"][];
831
- cursor?: string;
832
- limit?: number;
833
- }, options?: RequestOptions) => Promise<Page<AgentWorkflowStep>>;
834
- /** Nothing more of it starts, and its open sessions stop. */
835
- stop: (id: string, options?: RequestOptions) => Promise<AgentWorkflow>;
836
- };
837
- /** The account's inbox: the questions its agents' sessions need answered
838
- * to go on, one row per step however many sessions ask it. */
839
- asks: {
840
- /** Newest first; open ones unless `state` says otherwise. */
841
- list: (query?: ListAgentAsks, options?: RequestOptions) => Promise<Page<AgentAsk>>;
842
- get: (id: string, options?: RequestOptions) => Promise<AgentAsk>;
843
- /** Every session asking it reads the answer next, and wakes. An ask no
844
- * longer open is refused with `ask_closed`. */
845
- answer: (id: string, answer: AnswerAgentAsk, options?: RequestOptions) => Promise<AgentAsk>;
846
- /** Lets a tool call the agent's permissions held run (its ask's Allow). */
847
- approve: (id: string, options?: RequestOptions) => Promise<AgentAsk>;
848
- /** Keeps a held tool call from running (its ask's Deny); `message` is
849
- * told to the agent as the reason. */
850
- deny: (id: string, message?: string, options?: RequestOptions) => Promise<AgentAsk>;
851
- };
852
- /** Runtime's Slack app in your workspaces, for `slack` triggers. */
853
- slack: {
854
- /** A link that adds Runtime's Slack app to a workspace, good for 15
855
- * minutes. Open it in a browser signed in to this account, then
856
- * approve the app in Slack; Slack sends the browser back to the
857
- * console once it is added. Opened by anyone outside the account, it
858
- * adds nothing. */
859
- install: (options?: RequestOptions) => Promise<SlackInstallLink>;
860
- /** The workspaces added to this account. */
861
- teams: (options?: RequestOptions) => Promise<SlackTeam[]>;
862
- /** Removes a workspace: its token is revoked, and its triggers refuse
863
- * events until it is added again. */
864
- remove: (team: string, options?: RequestOptions) => Promise<void>;
865
- };
866
- triggers: {
867
- create: (agent: string, input: CreateAgentTrigger, options?: RequestOptions) => Promise<AgentTrigger>;
868
- list: (agent: string, options?: RequestOptions) => Promise<AgentTrigger[]>;
869
- /** Held: a webhook's calls are kept for you (see `held`), saying
870
- * `why`; nothing else is held. */
871
- pause: (id: string, why: string, options?: RequestOptions) => Promise<AgentTrigger>;
872
- resume: (id: string, options?: RequestOptions) => Promise<AgentTrigger>;
873
- delete: (id: string, options?: RequestOptions) => Promise<void>;
874
- /** Its rules, whole, in place: its secret stays. `{}` is every default. */
875
- setRules: (id: string, rules: AgentTriggerRules, options?: RequestOptions) => Promise<AgentTrigger>;
876
- /** A webhook trigger's call, as its sender makes it: by the trigger's
877
- * secret, never your key. A call with the key of an open session joins
878
- * it. Pass `idempotencyKey` to make a retry the same call. */
879
- call: (id: string, secret: string, call: AgentTriggerCall, options?: RequestOptions) => Promise<AgentTriggerCallOutcome>;
880
- /** Calls it held for you, newest first. */
881
- held: (trigger: string, query?: {
882
- state?: AgentHeldCall["state"][];
883
- cursor?: string;
884
- limit?: number;
885
- }, options?: RequestOptions) => Promise<Page<AgentHeldCall>>;
886
- /** Start a held call: one session with it and every call held for its
887
- * key since, oldest first. */
888
- startHeld: (id: string, call: string, options?: RequestOptions) => Promise<{
889
- session: AgentSession;
890
- joined: boolean;
891
- calls: number;
892
- }>;
893
- /** Dismiss a held call: nothing runs. */
894
- dismissHeld: (id: string, call: string, options?: RequestOptions) => Promise<AgentHeldCall>;
895
- };
896
- /** Its built-in memory: text files kept across sessions, which the
897
- * agent reads, writes and searches from inside its sessions. A scope is
898
- * whose: "" (the default) for what every session reads, or a session key
899
- * ("customer:42") for that key's alone. Up to 1 MiB a file, 1 GiB and
900
- * 100,000 files an agent, billed as storage. */
901
- memory: {
902
- /** Its files by scope and path, a page at a time, with its usage.
903
- * Without scope, every scope. */
904
- list: (agent: string, query?: {
905
- scope?: string;
906
- prefix?: string;
907
- cursor?: string;
908
- limit?: number;
909
- }, options?: RequestOptions) => Promise<AgentMemoryPage>;
910
- /** The files whose words or paths match, best first, each with a
911
- * snippet: words, "a phrase", or, -not. Without scope, every scope. */
912
- search: (agent: string, q: string, query?: {
913
- scope?: string;
914
- limit?: number;
915
- }, options?: RequestOptions) => Promise<AgentMemoryHit[]>;
916
- /** One file, with its text; not_found when there is none. */
917
- read: (agent: string, path: string, query?: {
918
- scope?: string;
919
- }, options?: RequestOptions) => Promise<AgentMemoryFile>;
920
- /** Seeds or replaces a file. */
921
- write: (agent: string, path: string, content: string, query?: {
922
- scope?: string;
923
- }, options?: RequestOptions) => Promise<AgentMemoryWritten>;
924
- /** Answers whether there was a file. */
925
- delete: (agent: string, path: string, query?: {
926
- scope?: string;
927
- }, options?: RequestOptions) => Promise<boolean>;
928
- };
929
- /** The harnesses, as data: claude-code, codex, gemini-cli,
930
- * claude-agent-sdk, openai-agents-sdk, review (a CI/CD agent step's
931
- * reviewer) and judge (an agent step held to your instructions alone). */
932
- templates: Readonly<Record<AgentTemplateKey, AgentTemplate>>;
933
- /** The uses, as data: support (your customers) and team (your team). */
934
- uses: Readonly<Record<"team" | "support", AgentUse>>;
935
- };