experimental-ash 0.3.0-alpha.36 → 0.3.0-alpha.38

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/{docs → dist/docs}/internals/compiler-and-artifacts.md +1 -1
  2. package/{docs → dist/docs}/internals/message-runtime.md +0 -1
  3. package/{docs → dist/docs}/public/README.md +1 -1
  4. package/{docs → dist/docs}/public/agent-ts.md +1 -1
  5. package/{docs → dist/docs}/public/channels/README.md +3 -0
  6. package/dist/docs/public/channels/slack.md +142 -0
  7. package/{docs → dist/docs}/public/context-control.md +1 -1
  8. package/{docs → dist/docs}/public/meta.json +1 -1
  9. package/{docs → dist/docs}/public/project-layout.md +16 -16
  10. package/{docs → dist/docs}/public/runs-and-streaming.md +1 -4
  11. package/{docs/public/sandboxes.md → dist/docs/public/sandbox.md} +116 -67
  12. package/{docs → dist/docs}/public/session-context.md +1 -1
  13. package/{docs → dist/docs}/public/subagents.md +4 -4
  14. package/{docs → dist/docs}/public/tools.md +4 -4
  15. package/{docs → dist/docs}/public/typescript-api.md +6 -7
  16. package/{docs → dist/docs}/public/vercel-deployment.md +2 -2
  17. package/{docs → dist/docs}/public/workspace.md +3 -3
  18. package/dist/src/chunks/chunk-2BCVGULU.js +37 -0
  19. package/dist/src/chunks/chunk-2BCVGULU.js.map +7 -0
  20. package/dist/src/chunks/chunk-35LANRWR.js +87 -0
  21. package/dist/src/chunks/chunk-35LANRWR.js.map +7 -0
  22. package/dist/src/chunks/chunk-3G5VE3NT.js +3480 -0
  23. package/dist/src/chunks/chunk-3G5VE3NT.js.map +7 -0
  24. package/dist/src/chunks/chunk-3PI3EJGN.js +48 -0
  25. package/dist/src/chunks/chunk-3PI3EJGN.js.map +7 -0
  26. package/dist/src/chunks/chunk-5BOA7PVK.js +592 -0
  27. package/dist/src/chunks/chunk-5BOA7PVK.js.map +7 -0
  28. package/dist/src/chunks/chunk-5DCBVGNU.js +61 -0
  29. package/dist/src/chunks/chunk-5DCBVGNU.js.map +7 -0
  30. package/dist/src/chunks/chunk-5MZKUEVL.js +106 -0
  31. package/dist/src/chunks/chunk-5MZKUEVL.js.map +7 -0
  32. package/dist/src/chunks/chunk-5QAWKFQA.js +134 -0
  33. package/dist/src/chunks/chunk-5QAWKFQA.js.map +7 -0
  34. package/dist/src/chunks/chunk-A7Q4YIKU.js +203 -0
  35. package/dist/src/chunks/chunk-A7Q4YIKU.js.map +7 -0
  36. package/dist/src/chunks/chunk-AFK4DTZH.js +35 -0
  37. package/dist/src/chunks/chunk-AFK4DTZH.js.map +7 -0
  38. package/dist/src/chunks/chunk-AL5YANUC.js +89 -0
  39. package/dist/src/chunks/chunk-AL5YANUC.js.map +7 -0
  40. package/dist/src/chunks/chunk-APDYQG3O.js +15 -0
  41. package/dist/src/chunks/chunk-APDYQG3O.js.map +7 -0
  42. package/dist/src/chunks/chunk-BMHAGZOU.js +35 -0
  43. package/dist/src/chunks/chunk-BMHAGZOU.js.map +7 -0
  44. package/dist/src/chunks/chunk-DB7AV7FN.js +44 -0
  45. package/dist/src/chunks/chunk-DB7AV7FN.js.map +7 -0
  46. package/dist/src/chunks/chunk-E7IAIRUB.js +169 -0
  47. package/dist/src/chunks/chunk-E7IAIRUB.js.map +7 -0
  48. package/dist/src/chunks/chunk-GJL2PGSX.js +61 -0
  49. package/dist/src/chunks/chunk-GJL2PGSX.js.map +7 -0
  50. package/dist/src/chunks/chunk-HDY67XYG.js +34344 -0
  51. package/dist/src/chunks/chunk-HDY67XYG.js.map +7 -0
  52. package/dist/src/chunks/chunk-IJXFNYAN.js +193 -0
  53. package/dist/src/chunks/chunk-IJXFNYAN.js.map +7 -0
  54. package/dist/src/chunks/chunk-IKHNAPQA.js +9800 -0
  55. package/dist/src/chunks/chunk-IKHNAPQA.js.map +7 -0
  56. package/dist/src/chunks/chunk-IM3GMMPU.js +29 -0
  57. package/dist/src/chunks/chunk-IM3GMMPU.js.map +7 -0
  58. package/dist/src/chunks/chunk-KCXGTLFG.js +229 -0
  59. package/dist/src/chunks/chunk-KCXGTLFG.js.map +7 -0
  60. package/dist/src/chunks/chunk-LCRB4QVX.js +27 -0
  61. package/dist/src/chunks/chunk-LCRB4QVX.js.map +7 -0
  62. package/dist/src/chunks/chunk-LHXJBQL7.js +71 -0
  63. package/dist/src/chunks/chunk-LHXJBQL7.js.map +7 -0
  64. package/dist/src/chunks/chunk-OOUH2UZR.js +546 -0
  65. package/dist/src/chunks/chunk-OOUH2UZR.js.map +7 -0
  66. package/dist/src/chunks/chunk-OR2PYMRV.js +35 -0
  67. package/dist/src/chunks/chunk-OR2PYMRV.js.map +7 -0
  68. package/dist/src/chunks/chunk-P22MMFUP.js +33 -0
  69. package/dist/src/chunks/chunk-P22MMFUP.js.map +7 -0
  70. package/dist/src/chunks/chunk-QP35EBQ7.js +131 -0
  71. package/dist/src/chunks/chunk-QP35EBQ7.js.map +7 -0
  72. package/dist/src/chunks/chunk-QUZBDAM5.js +76 -0
  73. package/dist/src/chunks/chunk-QUZBDAM5.js.map +7 -0
  74. package/dist/src/chunks/chunk-SILEFYT3.js +119 -0
  75. package/dist/src/chunks/chunk-SILEFYT3.js.map +7 -0
  76. package/dist/src/chunks/chunk-SQI7OWK2.js +184 -0
  77. package/dist/src/chunks/chunk-SQI7OWK2.js.map +7 -0
  78. package/dist/src/chunks/chunk-TY5REWC3.js +44 -0
  79. package/dist/src/chunks/chunk-TY5REWC3.js.map +7 -0
  80. package/dist/src/chunks/chunk-UQPZY6ZZ.js +3493 -0
  81. package/dist/src/chunks/chunk-UQPZY6ZZ.js.map +7 -0
  82. package/dist/src/chunks/chunk-V3ZR2VJX.js +81 -0
  83. package/dist/src/chunks/chunk-V3ZR2VJX.js.map +7 -0
  84. package/dist/src/chunks/chunk-VAOZLYCZ.js +738 -0
  85. package/dist/src/chunks/chunk-VAOZLYCZ.js.map +7 -0
  86. package/dist/src/chunks/chunk-W3JJ5DZF.js +2362 -0
  87. package/dist/src/chunks/chunk-W3JJ5DZF.js.map +7 -0
  88. package/dist/src/chunks/chunk-XIS5VWUF.js +16 -0
  89. package/dist/src/chunks/chunk-XIS5VWUF.js.map +7 -0
  90. package/dist/src/chunks/chunk-YTRI464Y.js +15 -0
  91. package/dist/src/chunks/chunk-YTRI464Y.js.map +7 -0
  92. package/dist/src/chunks/chunk-ZCQU2IQJ.js +85 -0
  93. package/dist/src/chunks/chunk-ZCQU2IQJ.js.map +7 -0
  94. package/dist/src/chunks/dev-authored-source-watcher-AQSC6QOJ.js +2968 -0
  95. package/dist/src/chunks/dev-authored-source-watcher-AQSC6QOJ.js.map +7 -0
  96. package/dist/src/chunks/host-G4LSBCND.js +20 -0
  97. package/dist/src/chunks/host-G4LSBCND.js.map +7 -0
  98. package/dist/src/chunks/token-APS2CB5L.js +71 -0
  99. package/dist/src/chunks/token-APS2CB5L.js.map +7 -0
  100. package/dist/src/chunks/token-util-5UM65FIP.js +7 -0
  101. package/dist/src/chunks/token-util-5UM65FIP.js.map +7 -0
  102. package/dist/src/cli/commands/info.js +228 -160
  103. package/dist/src/cli/commands/info.js.map +7 -1
  104. package/dist/src/cli/commands/init.js +94 -76
  105. package/dist/src/cli/commands/init.js.map +7 -1
  106. package/dist/src/cli/dev/environment.js +12 -32
  107. package/dist/src/cli/dev/environment.js.map +7 -1
  108. package/dist/src/cli/dev/input-requests.js +15 -165
  109. package/dist/src/cli/dev/input-requests.js.map +7 -1
  110. package/dist/src/cli/dev/input.js +9 -31
  111. package/dist/src/cli/dev/input.js.map +7 -1
  112. package/dist/src/cli/dev/repl.d.ts.map +1 -1
  113. package/dist/src/cli/dev/repl.js +1049 -937
  114. package/dist/src/cli/dev/repl.js.map +7 -1
  115. package/dist/src/cli/dev/terminal.js +9 -180
  116. package/dist/src/cli/dev/terminal.js.map +7 -1
  117. package/dist/src/cli/dev/url.js +9 -27
  118. package/dist/src/cli/dev/url.js.map +7 -1
  119. package/dist/src/cli/run.js +217 -228
  120. package/dist/src/cli/run.js.map +7 -1
  121. package/dist/src/cli/templates/init-app/agent/agent.ts +1 -1
  122. package/dist/src/cli/templates/init-app/agent/system.md +1 -1
  123. package/dist/src/cli/templates/init-app/agent/tools/hello.ts +12 -0
  124. package/dist/src/cli/templates/init-app/package.json +1 -0
  125. package/dist/src/cli/ui/output.js +18 -93
  126. package/dist/src/cli/ui/output.js.map +7 -1
  127. package/dist/src/client/index.d.ts +1 -1
  128. package/dist/src/client/index.d.ts.map +1 -1
  129. package/dist/src/client/index.js.map +1 -1
  130. package/dist/src/compiler/compile-from-memory.d.ts +2 -2
  131. package/dist/src/compiler/compile-from-memory.d.ts.map +1 -1
  132. package/dist/src/compiler/compile-from-memory.js +2 -3
  133. package/dist/src/compiler/compile-from-memory.js.map +1 -1
  134. package/dist/src/compiler/manifest.d.ts +5 -12
  135. package/dist/src/compiler/manifest.d.ts.map +1 -1
  136. package/dist/src/compiler/manifest.js +3 -5
  137. package/dist/src/compiler/manifest.js.map +1 -1
  138. package/dist/src/compiler/model-catalog.d.ts +33 -0
  139. package/dist/src/compiler/model-catalog.d.ts.map +1 -1
  140. package/dist/src/compiler/model-catalog.js +103 -72
  141. package/dist/src/compiler/model-catalog.js.map +1 -1
  142. package/dist/src/compiler/module-map.js +5 -5
  143. package/dist/src/compiler/module-map.js.map +1 -1
  144. package/dist/src/compiler/normalize-agent-config.d.ts +11 -0
  145. package/dist/src/compiler/normalize-agent-config.d.ts.map +1 -1
  146. package/dist/src/compiler/normalize-agent-config.js +33 -4
  147. package/dist/src/compiler/normalize-agent-config.js.map +1 -1
  148. package/dist/src/compiler/normalize-manifest.js +3 -2
  149. package/dist/src/compiler/normalize-manifest.js.map +1 -1
  150. package/dist/src/compiler/normalize-sandbox.d.ts.map +1 -1
  151. package/dist/src/compiler/normalize-sandbox.js +0 -1
  152. package/dist/src/compiler/normalize-sandbox.js.map +1 -1
  153. package/dist/src/context/providers/sandbox.js +2 -2
  154. package/dist/src/context/providers/sandbox.js.map +1 -1
  155. package/dist/src/discover/discover-agent.d.ts +3 -3
  156. package/dist/src/discover/discover-agent.d.ts.map +1 -1
  157. package/dist/src/discover/discover-agent.js +5 -5
  158. package/dist/src/discover/discover-agent.js.map +1 -1
  159. package/dist/src/discover/discover-subagent.js +2 -2
  160. package/dist/src/discover/discover-subagent.js.map +1 -1
  161. package/dist/src/discover/filesystem.d.ts +2 -2
  162. package/dist/src/discover/filesystem.d.ts.map +1 -1
  163. package/dist/src/discover/filesystem.js +2 -2
  164. package/dist/src/discover/filesystem.js.map +1 -1
  165. package/dist/src/discover/grammar.d.ts +2 -2
  166. package/dist/src/discover/grammar.d.ts.map +1 -1
  167. package/dist/src/discover/grammar.js +2 -2
  168. package/dist/src/discover/grammar.js.map +1 -1
  169. package/dist/src/discover/manifest.d.ts +15 -33
  170. package/dist/src/discover/manifest.d.ts.map +1 -1
  171. package/dist/src/discover/manifest.js +2 -11
  172. package/dist/src/discover/manifest.js.map +1 -1
  173. package/dist/src/discover/{sandboxes.d.ts → sandbox.d.ts} +7 -2
  174. package/dist/src/discover/sandbox.d.ts.map +1 -0
  175. package/dist/src/discover/{sandboxes.js → sandbox.js} +55 -19
  176. package/dist/src/discover/sandbox.js.map +1 -0
  177. package/dist/src/evals/cli/eval.js +168 -183
  178. package/dist/src/evals/cli/eval.js.map +7 -1
  179. package/dist/src/evals/define-eval-suite.js +9 -44
  180. package/dist/src/evals/define-eval-suite.js.map +7 -1
  181. package/dist/src/evals/index.js +9 -5
  182. package/dist/src/evals/index.js.map +7 -1
  183. package/dist/src/evals/loaders/index.js +20 -27
  184. package/dist/src/evals/loaders/index.js.map +7 -1
  185. package/dist/src/evals/loaders/json.js +9 -19
  186. package/dist/src/evals/loaders/json.js.map +7 -1
  187. package/dist/src/evals/loaders/yaml.js +10 -26
  188. package/dist/src/evals/loaders/yaml.js.map +7 -1
  189. package/dist/src/evals/reporters/index.js +14 -14
  190. package/dist/src/evals/reporters/index.js.map +7 -1
  191. package/dist/src/evals/runner/artifacts.js +11 -84
  192. package/dist/src/evals/runner/artifacts.js.map +7 -1
  193. package/dist/src/evals/runner/derive-run-facts.js +9 -60
  194. package/dist/src/evals/runner/derive-run-facts.js.map +7 -1
  195. package/dist/src/evals/runner/discover.js +14 -82
  196. package/dist/src/evals/runner/discover.js.map +7 -1
  197. package/dist/src/evals/runner/execute-case.js +10 -89
  198. package/dist/src/evals/runner/execute-case.js.map +7 -1
  199. package/dist/src/evals/runner/execute-suite.js +14 -129
  200. package/dist/src/evals/runner/execute-suite.js.map +7 -1
  201. package/dist/src/evals/runner/reporters/braintrust.js +10 -141
  202. package/dist/src/evals/runner/reporters/braintrust.js.map +7 -1
  203. package/dist/src/evals/runner/reporters/console.js +10 -116
  204. package/dist/src/evals/runner/reporters/console.js.map +7 -1
  205. package/dist/src/evals/runner/reporters/types.js +2 -2
  206. package/dist/src/evals/runner/reporters/types.js.map +7 -1
  207. package/dist/src/evals/runner/resolve-git-metadata.js +9 -33
  208. package/dist/src/evals/runner/resolve-git-metadata.js.map +7 -1
  209. package/dist/src/evals/scorers/autoevals-client.js +10 -88
  210. package/dist/src/evals/scorers/autoevals-client.js.map +7 -1
  211. package/dist/src/evals/scorers/autoevals.js +18 -75
  212. package/dist/src/evals/scorers/autoevals.js.map +7 -1
  213. package/dist/src/evals/scorers/json.js +9 -32
  214. package/dist/src/evals/scorers/json.js.map +7 -1
  215. package/dist/src/evals/scorers/run.js +15 -53
  216. package/dist/src/evals/scorers/run.js.map +7 -1
  217. package/dist/src/evals/scorers/sql.js +9 -35
  218. package/dist/src/evals/scorers/sql.js.map +7 -1
  219. package/dist/src/evals/scorers/text.js +14 -40
  220. package/dist/src/evals/scorers/text.js.map +7 -1
  221. package/dist/src/evals/scores/index.js +35 -72
  222. package/dist/src/evals/scores/index.js.map +7 -1
  223. package/dist/src/evals/types.js +2 -2
  224. package/dist/src/evals/types.js.map +7 -1
  225. package/dist/src/execution/sandbox/bash-tool.d.ts.map +1 -0
  226. package/dist/src/execution/{sandboxes → sandbox}/bash-tool.js +2 -2
  227. package/dist/src/execution/sandbox/bash-tool.js.map +1 -0
  228. package/dist/src/execution/sandbox/bindings/local.d.ts.map +1 -0
  229. package/dist/src/execution/{sandboxes → sandbox}/bindings/local.js +7 -6
  230. package/dist/src/execution/sandbox/bindings/local.js.map +1 -0
  231. package/dist/src/execution/{sandboxes → sandbox}/bindings/vercel.d.ts +5 -5
  232. package/dist/src/execution/sandbox/bindings/vercel.d.ts.map +1 -0
  233. package/dist/src/execution/{sandboxes → sandbox}/bindings/vercel.js +54 -9
  234. package/dist/src/execution/sandbox/bindings/vercel.js.map +1 -0
  235. package/dist/src/execution/{sandboxes → sandbox}/ensure.d.ts +13 -15
  236. package/dist/src/execution/sandbox/ensure.d.ts.map +1 -0
  237. package/dist/src/execution/sandbox/ensure.js +120 -0
  238. package/dist/src/execution/sandbox/ensure.js.map +1 -0
  239. package/dist/src/execution/sandbox/glob-tool.d.ts.map +1 -0
  240. package/dist/src/execution/{sandboxes → sandbox}/glob-tool.js +4 -4
  241. package/dist/src/execution/sandbox/glob-tool.js.map +1 -0
  242. package/dist/src/execution/sandbox/grep-tool.d.ts.map +1 -0
  243. package/dist/src/execution/{sandboxes → sandbox}/grep-tool.js +4 -4
  244. package/dist/src/execution/sandbox/grep-tool.js.map +1 -0
  245. package/dist/src/execution/sandbox/prewarm.d.ts.map +1 -0
  246. package/dist/src/execution/{sandboxes → sandbox}/prewarm.js +61 -51
  247. package/dist/src/execution/sandbox/prewarm.js.map +1 -0
  248. package/dist/src/execution/sandbox/read-file-tool.d.ts.map +1 -0
  249. package/dist/src/execution/{sandboxes → sandbox}/read-file-tool.js +2 -2
  250. package/dist/src/execution/sandbox/read-file-tool.js.map +1 -0
  251. package/dist/src/execution/sandbox/require-sandbox.d.ts.map +1 -0
  252. package/dist/src/execution/{sandboxes → sandbox}/require-sandbox.js +3 -3
  253. package/dist/src/execution/sandbox/require-sandbox.js.map +1 -0
  254. package/dist/src/execution/sandbox/ripgrep-probe.d.ts.map +1 -0
  255. package/dist/src/execution/sandbox/ripgrep-probe.js.map +1 -0
  256. package/dist/src/execution/sandbox/session.d.ts.map +1 -0
  257. package/dist/src/execution/sandbox/session.js.map +1 -0
  258. package/dist/src/execution/sandbox/shell-quote.d.ts.map +1 -0
  259. package/dist/src/execution/sandbox/shell-quote.js.map +1 -0
  260. package/dist/src/execution/sandbox/truncate-output.d.ts.map +1 -0
  261. package/dist/src/execution/sandbox/truncate-output.js.map +1 -0
  262. package/dist/src/execution/sandbox/write-file-tool.d.ts.map +1 -0
  263. package/dist/src/execution/{sandboxes → sandbox}/write-file-tool.js +1 -1
  264. package/dist/src/execution/sandbox/write-file-tool.js.map +1 -0
  265. package/dist/src/execution/web-fetch/tool.js +1 -1
  266. package/dist/src/execution/web-fetch/tool.js.map +1 -1
  267. package/dist/src/internal/application/package.js +1 -1
  268. package/dist/src/internal/authored-definition/core.d.ts.map +1 -1
  269. package/dist/src/internal/authored-definition/core.js +3 -0
  270. package/dist/src/internal/authored-definition/core.js.map +1 -1
  271. package/dist/src/internal/authored-definition/schema-backed.d.ts +1 -1
  272. package/dist/src/internal/authored-definition/schema-backed.d.ts.map +1 -1
  273. package/dist/src/internal/authored-definition/schema-backed.js +4 -3
  274. package/dist/src/internal/authored-definition/schema-backed.js.map +1 -1
  275. package/dist/src/internal/authored-module-loader.js +11 -1
  276. package/dist/src/internal/authored-module-loader.js.map +1 -1
  277. package/dist/src/internal/nitro/host/build-application.js +1 -1
  278. package/dist/src/internal/nitro/host/build-application.js.map +1 -1
  279. package/dist/src/internal/nitro/host/create-application-nitro.d.ts.map +1 -1
  280. package/dist/src/internal/nitro/host/create-application-nitro.js +2 -0
  281. package/dist/src/internal/nitro/host/create-application-nitro.js.map +1 -1
  282. package/dist/src/internal/nitro/host/{prewarm-vercel-sandboxes.d.ts → prewarm-vercel-sandbox.d.ts} +2 -2
  283. package/dist/src/internal/nitro/host/prewarm-vercel-sandbox.d.ts.map +1 -0
  284. package/dist/src/internal/nitro/host/{prewarm-vercel-sandboxes.js → prewarm-vercel-sandbox.js} +2 -2
  285. package/dist/src/internal/nitro/host/prewarm-vercel-sandbox.js.map +1 -0
  286. package/dist/src/internal/nitro/host/vercel-build-output-config.d.ts +9 -0
  287. package/dist/src/internal/nitro/host/vercel-build-output-config.d.ts.map +1 -0
  288. package/dist/src/internal/nitro/host/vercel-build-output-config.js +15 -0
  289. package/dist/src/internal/nitro/host/vercel-build-output-config.js.map +1 -0
  290. package/dist/src/internal/nitro/routes/home-page/build-home-page-response.d.ts +1 -1
  291. package/dist/src/internal/nitro/routes/home-page/build-home-page-response.d.ts.map +1 -1
  292. package/dist/src/internal/nitro/routes/home-page/build-home-page-response.js +20 -19
  293. package/dist/src/internal/nitro/routes/home-page/build-home-page-response.js.map +1 -1
  294. package/dist/src/internal/nitro/routes/web-ui/assets/{index-BEQWswDI.js → index-BNNLLyx5.js} +3 -3
  295. package/dist/src/internal/nitro/routes/web-ui/index.html +1 -1
  296. package/dist/src/internal/runtime-model.d.ts +2 -8
  297. package/dist/src/internal/runtime-model.d.ts.map +1 -1
  298. package/dist/src/internal/runtime-model.js +1 -10
  299. package/dist/src/internal/runtime-model.js.map +1 -1
  300. package/dist/src/protocol/message.d.ts +1 -41
  301. package/dist/src/protocol/message.d.ts.map +1 -1
  302. package/dist/src/protocol/message.js.map +1 -1
  303. package/dist/src/public/definitions/sandbox-backend.d.ts +7 -8
  304. package/dist/src/public/definitions/sandbox-backend.d.ts.map +1 -1
  305. package/dist/src/public/definitions/sandbox.d.ts +35 -12
  306. package/dist/src/public/definitions/sandbox.d.ts.map +1 -1
  307. package/dist/src/public/definitions/sandbox.js.map +1 -1
  308. package/dist/src/public/sandbox/backends/default.d.ts.map +1 -0
  309. package/dist/src/public/{sandboxes → sandbox}/backends/default.js +2 -2
  310. package/dist/src/public/sandbox/backends/default.js.map +1 -0
  311. package/dist/src/public/sandbox/backends/local.d.ts.map +1 -0
  312. package/dist/src/public/{sandboxes → sandbox}/backends/local.js +1 -1
  313. package/dist/src/public/sandbox/backends/local.js.map +1 -0
  314. package/dist/src/public/sandbox/backends/vercel.d.ts +12 -0
  315. package/dist/src/public/sandbox/backends/vercel.d.ts.map +1 -0
  316. package/dist/src/public/sandbox/backends/vercel.js +13 -0
  317. package/dist/src/public/sandbox/backends/vercel.js.map +1 -0
  318. package/dist/src/public/sandbox/index.d.ts +12 -0
  319. package/dist/src/public/sandbox/index.d.ts.map +1 -0
  320. package/dist/src/public/sandbox/index.js +10 -0
  321. package/dist/src/public/sandbox/index.js.map +1 -0
  322. package/dist/src/public/sandbox/vercel-sandbox.d.ts +32 -0
  323. package/dist/src/public/sandbox/vercel-sandbox.d.ts.map +1 -0
  324. package/dist/src/public/sandbox/vercel-sandbox.js +2 -0
  325. package/dist/src/public/sandbox/vercel-sandbox.js.map +1 -0
  326. package/dist/src/public/sandboxes/vercel-sandbox.d.ts +42 -0
  327. package/dist/src/public/sandboxes/vercel-sandbox.d.ts.map +1 -0
  328. package/dist/src/public/sandboxes/vercel-sandbox.js +2 -0
  329. package/dist/src/public/sandboxes/vercel-sandbox.js.map +1 -0
  330. package/dist/src/public/tools/define-bash-tool.js +1 -1
  331. package/dist/src/public/tools/define-bash-tool.js.map +1 -1
  332. package/dist/src/public/tools/define-glob-tool.js +1 -1
  333. package/dist/src/public/tools/define-glob-tool.js.map +1 -1
  334. package/dist/src/public/tools/define-grep-tool.js +1 -1
  335. package/dist/src/public/tools/define-grep-tool.js.map +1 -1
  336. package/dist/src/public/tools/define-read-file-tool.d.ts.map +1 -1
  337. package/dist/src/public/tools/define-read-file-tool.js +1 -1
  338. package/dist/src/public/tools/define-read-file-tool.js.map +1 -1
  339. package/dist/src/public/tools/define-write-file-tool.js +1 -1
  340. package/dist/src/public/tools/define-write-file-tool.js.map +1 -1
  341. package/dist/src/runtime/agent/bootstrap.d.ts +0 -2
  342. package/dist/src/runtime/agent/bootstrap.d.ts.map +1 -1
  343. package/dist/src/runtime/agent/bootstrap.js +0 -2
  344. package/dist/src/runtime/agent/bootstrap.js.map +1 -1
  345. package/dist/src/runtime/framework-tools/bash.js +1 -1
  346. package/dist/src/runtime/framework-tools/bash.js.map +1 -1
  347. package/dist/src/runtime/framework-tools/glob.js +1 -1
  348. package/dist/src/runtime/framework-tools/glob.js.map +1 -1
  349. package/dist/src/runtime/framework-tools/grep.js +1 -1
  350. package/dist/src/runtime/framework-tools/grep.js.map +1 -1
  351. package/dist/src/runtime/framework-tools/read-file.d.ts.map +1 -1
  352. package/dist/src/runtime/framework-tools/read-file.js +1 -1
  353. package/dist/src/runtime/framework-tools/read-file.js.map +1 -1
  354. package/dist/src/runtime/framework-tools/write-file.js +1 -1
  355. package/dist/src/runtime/framework-tools/write-file.js.map +1 -1
  356. package/dist/src/runtime/graph.d.ts +1 -1
  357. package/dist/src/runtime/graph.d.ts.map +1 -1
  358. package/dist/src/runtime/resolve-agent-graph.d.ts.map +1 -1
  359. package/dist/src/runtime/resolve-agent-graph.js +4 -5
  360. package/dist/src/runtime/resolve-agent-graph.js.map +1 -1
  361. package/dist/src/runtime/resolve-agent.d.ts.map +1 -1
  362. package/dist/src/runtime/resolve-agent.js +28 -35
  363. package/dist/src/runtime/resolve-agent.js.map +1 -1
  364. package/dist/src/runtime/resolve-sandbox.d.ts.map +1 -1
  365. package/dist/src/runtime/resolve-sandbox.js +1 -2
  366. package/dist/src/runtime/resolve-sandbox.js.map +1 -1
  367. package/dist/src/runtime/{sandboxes → sandbox}/keys.d.ts +3 -6
  368. package/dist/src/runtime/sandbox/keys.d.ts.map +1 -0
  369. package/dist/src/runtime/{sandboxes → sandbox}/keys.js +6 -7
  370. package/dist/src/runtime/sandbox/keys.js.map +1 -0
  371. package/dist/src/runtime/sandbox/registry.d.ts +61 -0
  372. package/dist/src/runtime/sandbox/registry.d.ts.map +1 -0
  373. package/dist/src/runtime/sandbox/registry.js +43 -0
  374. package/dist/src/runtime/sandbox/registry.js.map +1 -0
  375. package/dist/src/runtime/types.d.ts +16 -16
  376. package/dist/src/runtime/types.d.ts.map +1 -1
  377. package/dist/src/sandbox/state.d.ts +8 -6
  378. package/dist/src/sandbox/state.d.ts.map +1 -1
  379. package/dist/src/services/inspect-application.d.ts.map +1 -1
  380. package/dist/src/services/inspect-application.js +8 -0
  381. package/dist/src/services/inspect-application.js.map +1 -1
  382. package/dist/src/shared/agent-definition.d.ts +1 -1
  383. package/dist/src/shared/agent-definition.d.ts.map +1 -1
  384. package/dist/src/shared/subagent-definition.d.ts +1 -1
  385. package/dist/src/shared/subagent-definition.d.ts.map +1 -1
  386. package/package.json +21 -26
  387. package/dist/src/cli/templates/init-app/agent/tools/get_weather.ts +0 -14
  388. package/dist/src/discover/sandboxes.d.ts.map +0 -1
  389. package/dist/src/discover/sandboxes.js.map +0 -1
  390. package/dist/src/execution/sandboxes/bash-tool.d.ts.map +0 -1
  391. package/dist/src/execution/sandboxes/bash-tool.js.map +0 -1
  392. package/dist/src/execution/sandboxes/bindings/local.d.ts.map +0 -1
  393. package/dist/src/execution/sandboxes/bindings/local.js.map +0 -1
  394. package/dist/src/execution/sandboxes/bindings/vercel.d.ts.map +0 -1
  395. package/dist/src/execution/sandboxes/bindings/vercel.js.map +0 -1
  396. package/dist/src/execution/sandboxes/ensure.d.ts.map +0 -1
  397. package/dist/src/execution/sandboxes/ensure.js +0 -135
  398. package/dist/src/execution/sandboxes/ensure.js.map +0 -1
  399. package/dist/src/execution/sandboxes/glob-tool.d.ts.map +0 -1
  400. package/dist/src/execution/sandboxes/glob-tool.js.map +0 -1
  401. package/dist/src/execution/sandboxes/grep-tool.d.ts.map +0 -1
  402. package/dist/src/execution/sandboxes/grep-tool.js.map +0 -1
  403. package/dist/src/execution/sandboxes/prewarm.d.ts.map +0 -1
  404. package/dist/src/execution/sandboxes/prewarm.js.map +0 -1
  405. package/dist/src/execution/sandboxes/read-file-tool.d.ts.map +0 -1
  406. package/dist/src/execution/sandboxes/read-file-tool.js.map +0 -1
  407. package/dist/src/execution/sandboxes/require-sandbox.d.ts.map +0 -1
  408. package/dist/src/execution/sandboxes/require-sandbox.js.map +0 -1
  409. package/dist/src/execution/sandboxes/ripgrep-probe.d.ts.map +0 -1
  410. package/dist/src/execution/sandboxes/ripgrep-probe.js.map +0 -1
  411. package/dist/src/execution/sandboxes/session.d.ts.map +0 -1
  412. package/dist/src/execution/sandboxes/session.js.map +0 -1
  413. package/dist/src/execution/sandboxes/shell-quote.d.ts.map +0 -1
  414. package/dist/src/execution/sandboxes/shell-quote.js.map +0 -1
  415. package/dist/src/execution/sandboxes/truncate-output.d.ts.map +0 -1
  416. package/dist/src/execution/sandboxes/truncate-output.js.map +0 -1
  417. package/dist/src/execution/sandboxes/write-file-tool.d.ts.map +0 -1
  418. package/dist/src/execution/sandboxes/write-file-tool.js.map +0 -1
  419. package/dist/src/internal/nitro/host/prewarm-vercel-sandboxes.d.ts.map +0 -1
  420. package/dist/src/internal/nitro/host/prewarm-vercel-sandboxes.js.map +0 -1
  421. package/dist/src/public/sandboxes/backends/default.d.ts.map +0 -1
  422. package/dist/src/public/sandboxes/backends/default.js.map +0 -1
  423. package/dist/src/public/sandboxes/backends/local.d.ts.map +0 -1
  424. package/dist/src/public/sandboxes/backends/local.js.map +0 -1
  425. package/dist/src/public/sandboxes/backends/vercel.d.ts +0 -11
  426. package/dist/src/public/sandboxes/backends/vercel.d.ts.map +0 -1
  427. package/dist/src/public/sandboxes/backends/vercel.js +0 -12
  428. package/dist/src/public/sandboxes/backends/vercel.js.map +0 -1
  429. package/dist/src/public/sandboxes/defaults.d.ts +0 -12
  430. package/dist/src/public/sandboxes/defaults.d.ts.map +0 -1
  431. package/dist/src/public/sandboxes/defaults.js +0 -17
  432. package/dist/src/public/sandboxes/defaults.js.map +0 -1
  433. package/dist/src/public/sandboxes/index.d.ts +0 -10
  434. package/dist/src/public/sandboxes/index.d.ts.map +0 -1
  435. package/dist/src/public/sandboxes/index.js +0 -9
  436. package/dist/src/public/sandboxes/index.js.map +0 -1
  437. package/dist/src/public/sandboxes/internal.d.ts +0 -14
  438. package/dist/src/public/sandboxes/internal.d.ts.map +0 -1
  439. package/dist/src/public/sandboxes/internal.js +0 -25
  440. package/dist/src/public/sandboxes/internal.js.map +0 -1
  441. package/dist/src/runtime/framework-sandboxes/default.d.ts +0 -29
  442. package/dist/src/runtime/framework-sandboxes/default.d.ts.map +0 -1
  443. package/dist/src/runtime/framework-sandboxes/default.js +0 -37
  444. package/dist/src/runtime/framework-sandboxes/default.js.map +0 -1
  445. package/dist/src/runtime/framework-sandboxes/index.d.ts +0 -2
  446. package/dist/src/runtime/framework-sandboxes/index.d.ts.map +0 -1
  447. package/dist/src/runtime/framework-sandboxes/index.js +0 -2
  448. package/dist/src/runtime/framework-sandboxes/index.js.map +0 -1
  449. package/dist/src/runtime/sandboxes/keys.d.ts.map +0 -1
  450. package/dist/src/runtime/sandboxes/keys.js.map +0 -1
  451. package/dist/src/runtime/sandboxes/registry.d.ts +0 -40
  452. package/dist/src/runtime/sandboxes/registry.d.ts.map +0 -1
  453. package/dist/src/runtime/sandboxes/registry.js +0 -41
  454. package/dist/src/runtime/sandboxes/registry.js.map +0 -1
  455. /package/{docs → dist/docs}/external-agent-protocol.md +0 -0
  456. /package/{docs → dist/docs}/internals/README.md +0 -0
  457. /package/{docs → dist/docs}/internals/context.md +0 -0
  458. /package/{docs → dist/docs}/internals/core-beliefs.md +0 -0
  459. /package/{docs → dist/docs}/internals/discovery.md +0 -0
  460. /package/{docs → dist/docs}/internals/hooks.md +0 -0
  461. /package/{docs → dist/docs}/internals/mechanical-invariants.md +0 -0
  462. /package/{docs → dist/docs}/internals/testing.md +0 -0
  463. /package/{docs → dist/docs}/public/auth-and-route-protection.md +0 -0
  464. /package/{docs → dist/docs}/public/channels/attachments.md +0 -0
  465. /package/{docs → dist/docs}/public/cli-build-and-debugging.md +0 -0
  466. /package/{docs → dist/docs}/public/connections.md +0 -0
  467. /package/{docs → dist/docs}/public/evals.md +0 -0
  468. /package/{docs → dist/docs}/public/getting-started.md +0 -0
  469. /package/{docs → dist/docs}/public/hooks.md +0 -0
  470. /package/{docs → dist/docs}/public/human-in-the-loop.md +0 -0
  471. /package/{docs → dist/docs}/public/instrumentation.md +0 -0
  472. /package/{docs → dist/docs}/public/schedules.md +0 -0
  473. /package/{docs → dist/docs}/public/skills.md +0 -0
  474. /package/dist/src/execution/{sandboxes → sandbox}/bash-tool.d.ts +0 -0
  475. /package/dist/src/execution/{sandboxes → sandbox}/bindings/local.d.ts +0 -0
  476. /package/dist/src/execution/{sandboxes → sandbox}/glob-tool.d.ts +0 -0
  477. /package/dist/src/execution/{sandboxes → sandbox}/grep-tool.d.ts +0 -0
  478. /package/dist/src/execution/{sandboxes → sandbox}/prewarm.d.ts +0 -0
  479. /package/dist/src/execution/{sandboxes → sandbox}/read-file-tool.d.ts +0 -0
  480. /package/dist/src/execution/{sandboxes → sandbox}/require-sandbox.d.ts +0 -0
  481. /package/dist/src/execution/{sandboxes → sandbox}/ripgrep-probe.d.ts +0 -0
  482. /package/dist/src/execution/{sandboxes → sandbox}/ripgrep-probe.js +0 -0
  483. /package/dist/src/execution/{sandboxes → sandbox}/session.d.ts +0 -0
  484. /package/dist/src/execution/{sandboxes → sandbox}/session.js +0 -0
  485. /package/dist/src/execution/{sandboxes → sandbox}/shell-quote.d.ts +0 -0
  486. /package/dist/src/execution/{sandboxes → sandbox}/shell-quote.js +0 -0
  487. /package/dist/src/execution/{sandboxes → sandbox}/truncate-output.d.ts +0 -0
  488. /package/dist/src/execution/{sandboxes → sandbox}/truncate-output.js +0 -0
  489. /package/dist/src/execution/{sandboxes → sandbox}/write-file-tool.d.ts +0 -0
  490. /package/dist/src/public/{sandboxes → sandbox}/backends/default.d.ts +0 -0
  491. /package/dist/src/public/{sandboxes → sandbox}/backends/local.d.ts +0 -0
@@ -31,7 +31,7 @@ Discovery avoids executing authored code. The module map is the handoff — it s
31
31
 
32
32
  ## Key Artifacts
33
33
 
34
- **`compiled-agent-manifest.json`** — the normalized runtime-facing manifest. Preserves config, prompt, skill, sandbox, schedule, and tool metadata; flattened subagent nodes with explicit `subagentEdges`; manifest kind and version. `sandboxes` and `sandboxWorkspaces` arrays are always size 0 or 1 (single-sandbox model).
34
+ **`compiled-agent-manifest.json`** — the normalized runtime-facing manifest. Preserves config, prompt, skill, sandbox, schedule, and tool metadata; flattened subagent nodes with explicit `subagentEdges`; manifest kind and version. `sandbox` is `null` or one entry, and `sandboxWorkspaces` is an array of size 0 or 1 (single-sandbox model).
35
35
 
36
36
  **`compile-metadata.json`** — artifact paths, SHA-256 digests, diagnostics summary, compile status, generator version, and `sourceGraphHash`. The `sourceGraphHash` drives sandbox template cache invalidation — runtime and Vercel build-time prewarm both derive template keys from it.
37
37
 
@@ -35,7 +35,6 @@ session.started → turn.started → step.started →
35
35
  message.appended / reasoning.appended →
36
36
  actions.requested → action.result →
37
37
  subagent.called / subagent.completed →
38
- sandbox.initialized / sandbox.restored / sandbox.command →
39
38
  step.completed → turn.completed → session.waiting / session.completed
40
39
  ```
41
40
 
@@ -24,7 +24,7 @@ Read in this order:
24
24
  7. [tools.md](./tools.md)
25
25
  8. [connections.md](./connections.md)
26
26
  9. [workspace.md](./workspace.md)
27
- 10. [sandboxes.md](./sandboxes.md)
27
+ 10. [sandbox.md](./sandbox.md)
28
28
  11. [channels/README.md](./channels/README.md)
29
29
  12. [human-in-the-loop.md](./human-in-the-loop.md)
30
30
  13. [session-context.md](./session-context.md)
@@ -123,7 +123,7 @@ server output instead of being bundled.
123
123
  - `model` optionally overrides the model used for compaction summaries
124
124
 
125
125
  The shared per-run workspace is configured on the sandbox, not on `agent.ts`. See
126
- [`workspace.md`](./workspace.md) and [`sandboxes.md`](./sandboxes.md).
126
+ [`workspace.md`](./workspace.md) and [`sandbox.md`](./sandbox.md).
127
127
 
128
128
  ## `humanInTheLoop`
129
129
 
@@ -84,6 +84,8 @@ export default httpRoute({
84
84
  ## Slack And Other Authored Channels
85
85
 
86
86
  Authored channels can wrap those helpers or build custom transport flows with `defineRoute(...)`.
87
+ For a Slack app backed by Vercel Connex, start with
88
+ [`./slack.md`](./slack.md) to create the Connex client and channel file.
87
89
 
88
90
  Use a custom adapter when you want:
89
91
 
@@ -200,6 +202,7 @@ See [`./attachments.md`](./attachments.md) for the authoring guide.
200
202
 
201
203
  ## What To Read Next
202
204
 
205
+ - [`./slack.md`](./slack.md)
203
206
  - [`./attachments.md`](./attachments.md)
204
207
  - [`../project-layout.md`](../project-layout.md)
205
208
  - [`../typescript-api.md`](../typescript-api.md)
@@ -0,0 +1,142 @@
1
+ ---
2
+ title: "Slack channel setup"
3
+ description: "Create a Slack-backed Ash channel with Vercel Connex."
4
+ type: integration
5
+ related:
6
+ - /channels
7
+ - /connections
8
+ ---
9
+
10
+ Ash Slack channels can use Vercel Connex for both outbound Slack bot tokens and inbound webhook
11
+ verification. With Connex, you do not need to manage `SLACK_BOT_TOKEN` or `SLACK_SIGNING_SECRET`
12
+ environment variables yourself.
13
+
14
+ ## Prerequisites
15
+
16
+ - A Vercel project for the agent.
17
+ - A Slack workspace where you can install the app.
18
+ - Access to Vercel Connex for your team.
19
+
20
+ For local development, link the project and pull Vercel OIDC env vars so Connex can authenticate to
21
+ the Vercel API:
22
+
23
+ ```bash
24
+ vercel link
25
+ vercel env pull
26
+ ```
27
+
28
+ ## Create The Connex Client
29
+
30
+ Create a Slack Connex client, then copy its UID. The UID is the value you pass to Ash, for example
31
+ `slack/my-agent`.
32
+
33
+ ### Dashboard Path
34
+
35
+ Open [Connex in the Vercel dashboard](https://vercel.com/d?to=/%5Bteam%5D/~/connex&title=Go+to+Connex),
36
+ then:
37
+
38
+ 1. Choose **Create Client**.
39
+ 2. Choose **Slack**.
40
+ 3. Choose **Install and Configure Client**.
41
+ 4. Complete the Slack installation flow.
42
+ 5. Choose **Continue**.
43
+ 6. Copy the UID, for example `slack/test`.
44
+
45
+ ### CLI Or Agent-Assisted Path
46
+
47
+ The `vercel connex` command is currently gated for allow-listed teams. If the command is missing,
48
+ update the Vercel CLI and enable the Connex flag in the terminal session where you will run the
49
+ commands:
50
+
51
+ ```bash
52
+ pnpm i -g vercel@latest
53
+ export FF_CONNEX_ENABLED=1
54
+ vercel connex --help
55
+ ```
56
+
57
+ The flag only applies to the current shell session. Export it again in new terminals, or add it to
58
+ your shell config while you are working with Connex.
59
+
60
+ Make sure the CLI is authenticated and scoped to the Vercel team that has Connex access:
61
+
62
+ ```bash
63
+ vercel login
64
+ vercel switch
65
+ vercel link
66
+ ```
67
+
68
+ If you are using an AI coding agent, install the Connex skill first:
69
+
70
+ ```bash
71
+ npx skills add https://github.com/vercel/connex --skill vercel-connex
72
+ ```
73
+
74
+ Then create the Slack client from the project or agent folder that will use it:
75
+
76
+ ```bash
77
+ vercel connex create slack
78
+ ```
79
+
80
+ Run Connex commands from the directory containing the agent's `package.json` or `vercel.json`.
81
+ Connex uses that project context to configure project access, webhooks, and triggers. The command may
82
+ open a browser for Slack installation or OAuth consent; finish that flow before continuing.
83
+
84
+ You can list existing clients with:
85
+
86
+ ```bash
87
+ vercel connex list
88
+ ```
89
+
90
+ ## Install Connex
91
+
92
+ Add the Connex SDK to the Ash project:
93
+
94
+ ```bash
95
+ pnpm add @vercel/connex
96
+ ```
97
+
98
+ ## Add The Slack Channel File
99
+
100
+ Create `agent/channels/slack.ts`:
101
+
102
+ ```ts
103
+ import { slackChannelCredentials } from "@vercel/connex/ash";
104
+ import { slackRoute } from "experimental-ash/channels/slack";
105
+
106
+ export default slackRoute({
107
+ credentials: slackChannelCredentials("slack/my-agent"),
108
+ });
109
+ ```
110
+
111
+ Replace `slack/my-agent` with the UID from the Connex client.
112
+
113
+ The helper returns a complete Slack credentials object:
114
+
115
+ - `botToken` resolves an app-scoped Slack token through Connex for outbound posts.
116
+ - `webhookVerifier` verifies Connex-forwarded Slack webhooks with Vercel OIDC.
117
+
118
+ That means token rotation, refresh, multi-workspace tenancy, and inbound request verification stay in
119
+ Connex instead of in your app environment.
120
+
121
+ ## Customize Delivery
122
+
123
+ If you need custom Slack rendering or interaction handling, keep the same credentials and add an
124
+ adapter:
125
+
126
+ ```ts
127
+ import { slackChannelCredentials } from "@vercel/connex/ash";
128
+ import { defineSlackAdapter, slackRoute } from "experimental-ash/channels/slack";
129
+
130
+ const adapter = defineSlackAdapter({
131
+ "turn.started": async (_data, ctx) => {
132
+ await ctx.thread.post({ markdown: "Working on it..." });
133
+ },
134
+ });
135
+
136
+ export default slackRoute({
137
+ credentials: slackChannelCredentials("slack/my-agent"),
138
+ adapter,
139
+ });
140
+ ```
141
+
142
+ See [Channels](/docs/channels) for the full Slack adapter surface.
@@ -97,7 +97,7 @@ Today that mainly means:
97
97
  - skill files are available under the active runtime workspace root
98
98
  - the model can inspect them with the shared `bash` tool
99
99
 
100
- See [`workspace.md`](./workspace.md) and [`sandboxes.md`](./sandboxes.md).
100
+ See [`workspace.md`](./workspace.md) and [`sandbox.md`](./sandbox.md).
101
101
 
102
102
  ## 5. Delegate To A Specialist With A Subagent
103
103
 
@@ -9,7 +9,7 @@
9
9
  "tools",
10
10
  "hooks",
11
11
  "human-in-the-loop",
12
- "sandboxes",
12
+ "sandbox",
13
13
  "channels",
14
14
  "auth-and-route-protection",
15
15
  "subagents",
@@ -32,21 +32,21 @@ my-agent/
32
32
 
33
33
  ## Slot Guide
34
34
 
35
- | Path | Purpose | Notes |
36
- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
37
- | `system.md` or `system.ts` | Base system prompt | Exactly one system prompt is expected |
38
- | `system/` | Additive always-on prompt layers | Loaded in deterministic path order. Module-backed layers are evaluated when a new session starts and then frozen for that session. |
39
- | `agent.ts` | Runtime config | Model, name, metadata, workspace, build, compaction |
40
- | `instrumentation.ts` | Telemetry config | OTel exporter setup and AI SDK span settings; auto-discovered and run before agent code |
41
- | `channels/` | HTTP or messaging entrypoints | Root-only today |
42
- | `connections/` | External service connections (MCP) | Each file defines one connection; name derived from filename |
43
- | `hooks/` | Lifecycle and stream-event subscribers | Module-backed only. Recursive directories supported. See [`hooks.md`](./hooks.md). |
44
- | `skills/` | On-demand procedures and capability packs | Flat markdown, module-backed skills, or packaged skills |
45
- | `lib/` | Shared authored helper code | Import-only source, not mounted into the workspace |
46
- | `sandbox/` | The agent's single sandbox. Optional `sandbox/sandbox.ts` for lifecycle overrides and optional `sandbox/workspace/**` for seeded files. Framework default applies when neither is authored. | Supported on the root agent and local subagents |
47
- | `tools/` | Typed executable integrations | Module-backed only |
48
- | `schedules/` | Recurring jobs; each schedule is a directory with `schedule.ts` + `prompt.md` | Root-only today |
49
- | `subagents/` | Specialist child agents | Each child is its own local package |
35
+ | Path | Purpose | Notes |
36
+ | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
37
+ | `system.md` or `system.ts` | Base system prompt | Exactly one system prompt is expected |
38
+ | `system/` | Additive always-on prompt layers | Loaded in deterministic path order. Module-backed layers are evaluated when a new session starts and then frozen for that session. |
39
+ | `agent.ts` | Runtime config | Model, name, metadata, workspace, build, compaction |
40
+ | `instrumentation.ts` | Telemetry config | OTel exporter setup and AI SDK span settings; auto-discovered and run before agent code |
41
+ | `channels/` | HTTP or messaging entrypoints | Root-only today |
42
+ | `connections/` | External service connections (MCP) | Each file defines one connection; name derived from filename |
43
+ | `hooks/` | Lifecycle and stream-event subscribers | Module-backed only. Recursive directories supported. See [`hooks.md`](./hooks.md). |
44
+ | `skills/` | On-demand procedures and capability packs | Flat markdown, module-backed skills, or packaged skills |
45
+ | `lib/` | Shared authored helper code | Import-only source, not mounted into the workspace |
46
+ | `sandbox/` or `sandbox.ts` | The agent's single sandbox. Use top-level `sandbox.ts` for a definition-only override; use `sandbox/sandbox.ts` + optional `sandbox/workspace/**` when you also want seeded files. Framework default applies when neither is authored. | Supported on the root agent and local subagents |
47
+ | `tools/` | Typed executable integrations | Module-backed only |
48
+ | `schedules/` | Recurring jobs; each schedule is a directory with `schedule.ts` + `prompt.md` | Root-only today |
49
+ | `subagents/` | Specialist child agents | Each child is its own local package |
50
50
 
51
51
  ## Root Agent Example
52
52
 
@@ -137,7 +137,7 @@ the sandbox workspace today:
137
137
  - skill files under `skills/` are seeded into `/workspace/skills/...`
138
138
  - files under `agent/sandbox/workspace/` are mirrored into `/workspace/...` at session bootstrap
139
139
 
140
- See [`sandboxes.md`](./sandboxes.md#seeding-workspace-files) for the convention.
140
+ See [`sandbox.md`](./sandbox.md#seeding-workspace-files) for the convention.
141
141
 
142
142
  Important boundary:
143
143
 
@@ -40,9 +40,6 @@ Common stream events:
40
40
  - `turn.started`
41
41
  - `message.received`
42
42
  - `step.started`
43
- - `sandbox.initialized`
44
- - `sandbox.restored`
45
- - `sandbox.command`
46
43
  - `actions.requested`
47
44
  - `action.result`
48
45
  - `subagent.called`
@@ -98,7 +95,7 @@ Ash uses three nested concepts:
98
95
  - `turn`: one user-visible roundtrip inside that session
99
96
  - `step`: one model call inside that turn
100
97
 
101
- That is why tools, sandboxes, and subagents feel synchronous from authored code even though the
98
+ That is why tools, the sandbox, and subagents feel synchronous from authored code even though the
102
99
  overall session remains durable.
103
100
 
104
101
  Important behavior:
@@ -21,36 +21,48 @@ If you never author a sandbox override, the framework default is what you get.
21
21
 
22
22
  ## Overriding The Sandbox
23
23
 
24
- To customize the sandbox — to add backend options, bootstrap commands, or per-session setup —
25
- create `agent/sandbox/sandbox.ts` and spread `defaultSandbox`:
24
+ To customize the sandbox — to add bootstrap commands or per-session setup —
25
+ author a sandbox definition module:
26
26
 
27
27
  ```ts
28
- // agent/sandbox/sandbox.ts
29
- import { defineSandbox } from "experimental-ash/sandboxes";
30
- import { defaultSandbox } from "experimental-ash/sandboxes/defaults";
28
+ // agent/sandbox.ts
29
+ import { defineSandbox } from "experimental-ash/sandbox";
31
30
 
32
31
  export default defineSandbox({
33
- ...defaultSandbox,
34
- async bootstrap({ sandbox }) {
32
+ async bootstrap({ use }) {
33
+ const sandbox = await use();
35
34
  await sandbox.runCommand("apt-get install -y jq");
36
35
  },
37
36
  });
38
37
  ```
39
38
 
39
+ You don't need to spread anything: when `backend` is omitted, the runtime substitutes
40
+ `defaultBackend()` automatically (see [Backend Selection](#backend-selection) below).
41
+
42
+ Two layouts are supported. Pick whichever matches what you need:
43
+
44
+ - `agent/sandbox.ts` — top-level shorthand. Use this when you only need a definition module and
45
+ no seeded workspace files. The shorthand cannot carry a `workspace/` folder.
46
+ - `agent/sandbox/sandbox.ts` — folder layout. Use this when you also want to seed
47
+ `agent/sandbox/workspace/**` into the live sandbox cwd at session bootstrap.
48
+
49
+ When both are present, the folder layout wins and the top-level shorthand is ignored.
50
+
40
51
  The public lifecycle surface is intentionally small:
41
52
 
42
- - `bootstrap` — template-scoped setup (runs once when the template is built)
43
- - `onSession` durable-session-scoped setup (runs once per session)
53
+ - `bootstrap({ use })` — template-scoped setup (runs once when the template is built). Call `use()`
54
+ to get a `SandboxSession` for filesystem setup. Only filesystem state survives snapshotting.
55
+ - `onSession({ use })` — durable-session-scoped setup (runs once per session). Call `use(opts?)` to
56
+ get the backend-specific sandbox (e.g. `VercelSandbox`) with session-level configuration applied.
44
57
  - `sandbox.resolvePath(path)` — translate a logical `/workspace/...` path into the live filesystem
45
58
  - `sandbox.runCommand(command)` — run a shell command inside the sandbox
46
59
 
47
- `defineSandbox` and `defaultSandbox` live on `experimental-ash/sandboxes` and
48
- `experimental-ash/sandboxes/defaults`.
60
+ `defineSandbox` lives on `experimental-ash/sandbox`.
49
61
 
50
62
  ## Seeding Workspace Files
51
63
 
52
- You can mount a folder of authored files into the sandbox filesystem at session bootstrap by
53
- putting them under `agent/sandbox/workspace/`:
64
+ Seeding workspace files requires the folder layout. You can mount a folder of authored files into
65
+ the sandbox filesystem at session bootstrap by putting them under `agent/sandbox/workspace/`:
54
66
 
55
67
  ```text
56
68
  agent/sandbox/
@@ -67,7 +79,8 @@ Rules:
67
79
  - The workspace folder is optional. An empty or missing `workspace/` is identical to today — no
68
80
  mounts.
69
81
  - `sandbox.ts` is also optional. You can author _just_ a `workspace/` folder and the framework
70
- default definition still applies.
82
+ default definition still applies. (To author only a definition without seeded files, prefer the
83
+ top-level `agent/sandbox.ts` shorthand instead.)
71
84
  - The workspace prompt section advertises the top-level entries to the model automatically.
72
85
 
73
86
  ### Reserved `skills/` Subtree
@@ -93,7 +106,7 @@ export default defineBashTool({
93
106
 
94
107
  These share the executor core, input schema, and result shape of the framework `bash`, `read_file`,
95
108
  and `write_file` tools. The runtime name comes from the file stem (here, `repo_shell`). There is no
96
- `sandboxes` option on these factories — every tool runs in the single sandbox.
109
+ `sandbox` option on these factories — every tool runs in the single sandbox.
97
110
 
98
111
  ## Using The Sandbox From Authored Code
99
112
 
@@ -101,7 +114,7 @@ Any authored runtime function (tool, step, or model callback) can bind a live sa
101
114
  `getSandbox()`:
102
115
 
103
116
  ```ts
104
- import { getSandbox } from "experimental-ash/sandboxes";
117
+ import { getSandbox } from "experimental-ash/sandbox";
105
118
  import { defineTool } from "experimental-ash/tools";
106
119
  import { z } from "zod";
107
120
 
@@ -154,7 +167,8 @@ from authored helpers.
154
167
  Each subagent has its own sandbox, independent of its parent. This is intentional: subagents carry
155
168
  different skills, so they should not inherit the parent's filesystem.
156
169
 
157
- - If a subagent authors `subagents/<name>/sandbox/sandbox.ts`, that definition is used.
170
+ - If a subagent authors `subagents/<name>/sandbox.ts` (or `subagents/<name>/sandbox/sandbox.ts`),
171
+ that definition is used. The same shorthand-vs-folder rules apply as for the root agent.
158
172
  - If a subagent authors only `subagents/<name>/sandbox/workspace/`, the framework default applies
159
173
  with that workspace seeded in.
160
174
  - If a subagent authors neither, the framework default is used as-is.
@@ -171,6 +185,9 @@ Inside a subagent's authored code, `getSandbox()` binds to the subagent's own sa
171
185
  - installing dependencies
172
186
  - seeding files or directories every later session should start with
173
187
 
188
+ Call `use()` to get a `SandboxSession`. Only filesystem state survives — configuration changes
189
+ like network policy or resource allocation do not persist into the snapshot.
190
+
174
191
  Framework-managed seed files (compiled skills, authored `workspace/` entries) are written into the
175
192
  template before the authored `bootstrap` runs, so your bootstrap can read them.
176
193
 
@@ -178,10 +195,14 @@ template before the authored `bootstrap` runs, so your bootstrap can read them.
178
195
 
179
196
  `onSession` is durable-session-scoped. Use it for one-time setup for the current Ash session:
180
197
 
198
+ - configuring network policy, resources, or timeout
181
199
  - creating a session-specific working copy
182
200
  - configuring per-user credentials for CLI tools
183
201
  - writing one-time markers
184
- - lightweight setup that should not be baked into the template
202
+
203
+ Call `use(opts?)` to get the backend-specific sandbox. When using `vercelBackend()`, this returns
204
+ a `VercelSandbox` with `update()` for session-level configuration. Options passed to `use()` are
205
+ applied immediately; you can call `sandbox.update()` again later if needed.
185
206
 
186
207
  Unlike `bootstrap`, `onSession` runs inside the active Ash runtime context, so user-scoped setup can
187
208
  call `getSession()` and derive the current principal without baking credentials into the reusable
@@ -189,10 +210,12 @@ template:
189
210
 
190
211
  ```ts
191
212
  import { getSession } from "experimental-ash/context";
192
- import { defineSandbox } from "experimental-ash/sandboxes";
213
+ import { defineSandbox, vercelBackend } from "experimental-ash/sandbox";
193
214
 
194
215
  export default defineSandbox({
195
- async onSession({ sandbox }) {
216
+ backend: vercelBackend(),
217
+ async onSession({ use }) {
218
+ const sandbox = await use({ networkPolicy: "deny-all" });
196
219
  const user = getSession().auth.current;
197
220
  if (user === null) return;
198
221
 
@@ -206,22 +229,27 @@ export default defineSandbox({
206
229
 
207
230
  ## Backend Selection
208
231
 
209
- Ash ships two built-in backends, exposed as factory functions from `experimental-ash/sandboxes`:
232
+ Ash ships two built-in backends, exposed as factory functions from `experimental-ash/sandbox`:
210
233
 
211
- - `vercelBackend(options?)` — runs the sandbox on Vercel Sandbox via `@vercel/sandbox`.
234
+ - `vercelBackend()` — runs the sandbox on Vercel Sandbox via `@vercel/sandbox`. Returns a
235
+ `VercelSandbox` from `onSession`'s `use()` with full SDK capabilities.
212
236
  - `localBackend()` — runs the sandbox locally via `just-bash`. Default for `pnpm ash dev`.
213
237
 
214
238
  Attach a backend via `defineSandbox({ backend })`:
215
239
 
216
240
  ```ts
217
241
  // agent/sandbox/sandbox.ts
218
- import { defineSandbox, vercelBackend } from "experimental-ash/sandboxes";
242
+ import { defineSandbox, vercelBackend } from "experimental-ash/sandbox";
219
243
 
220
244
  export default defineSandbox({
221
- backend: vercelBackend({ runtime: "node24" }),
222
- async bootstrap({ sandbox }) {
245
+ backend: vercelBackend(),
246
+ async bootstrap({ use }) {
247
+ const sandbox = await use();
223
248
  await sandbox.runCommand("git clone https://example.com/repo.git repo");
224
249
  },
250
+ async onSession({ use }) {
251
+ await use({ networkPolicy: "deny-all" });
252
+ },
225
253
  });
226
254
  ```
227
255
 
@@ -233,82 +261,103 @@ default; production builds on Vercel use the Vercel backend by default.
233
261
  If you want the env-aware default explicitly, use `defaultBackend()`:
234
262
 
235
263
  ```ts
236
- import { defaultBackend, defineSandbox } from "experimental-ash/sandboxes";
264
+ import { defaultBackend, defineSandbox } from "experimental-ash/sandbox";
237
265
 
238
266
  export default defineSandbox({
239
267
  backend: defaultBackend(),
240
268
  });
241
269
  ```
242
270
 
243
- ### Vercel Backend Options
271
+ ### Vercel Backend: Session Configuration
244
272
 
245
- `vercelBackend(options)` accepts the same parameters as `@vercel/sandbox`'s `Sandbox.create`, minus
246
- the four fields Ash owns internally (`name`, `persistent`, `source`, `signal`). The option type is
247
- **inferred** from the SDK so new SDK fields flow through automatically without any ash-side change.
248
- Hover the `options` argument in your editor to see the live set of fields.
273
+ `vercelBackend()` takes no options. All configuration is done through lifecycle hooks:
274
+
275
+ - **Immutable creation config** (runtime, ports, env) passed via `bootstrap`'s `use()`:
249
276
 
250
277
  ```ts
251
- vercelBackend({
252
- networkPolicy: "deny-all",
253
- runtime: "node24",
254
- resources: { vcpus: 4 },
255
- ports: [3000],
256
- env: { NODE_ENV: "production" },
257
- });
278
+ async bootstrap({ use }) {
279
+ const sandbox = await use({ runtime: "node24", ports: [3000] });
280
+ await sandbox.runCommand("npm install");
281
+ }
258
282
  ```
259
283
 
260
- Ash also attaches Vercel Sandbox tags for runtime attribution:
284
+ - **Session-level config** (networkPolicy, resources, timeout, tags) passed via `onSession`'s
285
+ `use()` or `sandbox.update()`:
261
286
 
262
- - `agent` — the active agent or subagent name
263
- - `channel` the active channel adapter kind
264
- - `sessionId` the Ash session id
287
+ ```ts
288
+ async onSession({ use }) {
289
+ const sandbox = await use({
290
+ networkPolicy: "deny-all",
291
+ resources: { vcpus: 4 },
292
+ timeout: 60 * 60 * 1_000,
293
+ });
294
+ // Can also update later:
295
+ await sandbox.update({ tags: { user: "casey" } });
296
+ }
297
+ ```
298
+
299
+ This split ensures that `bootstrap` only does filesystem setup (which survives snapshotting), while
300
+ `onSession` configures the live session (network policy, resources, etc. do not survive snapshots).
301
+
302
+ ### Network Policies
303
+
304
+ Network policies are set per-session via `onSession`. Three forms are supported:
305
+
306
+ ```ts
307
+ await use({ networkPolicy: "allow-all" }); // default
308
+ await use({ networkPolicy: "deny-all" }); // block all egress, including DNS
309
+
310
+ await use({
311
+ networkPolicy: {
312
+ allow: ["ai-gateway.vercel.sh", "*.github.com"],
313
+ subnets: { deny: ["10.0.0.0/8"] },
314
+ },
315
+ });
316
+ ```
265
317
 
266
- Custom `tags` passed to `vercelBackend(options)` are merged with those Ash-owned tags. Vercel
267
- Sandbox supports at most five tags, so custom tags have two free slots unless they intentionally
268
- share an Ash-owned key.
318
+ Since network policy is applied in `onSession` (after the template snapshot), it does not constrain
319
+ `bootstrap`. You can freely `git clone` and `npm install` in bootstrap, then lock down the network
320
+ in `onSession`.
269
321
 
270
322
  ### Timeout
271
323
 
272
324
  The `@vercel/sandbox` SDK shuts down idle VMs after a configurable timeout (default 5 minutes). Ash
273
- raises this default to **30 minutes** so sandboxes survive across workflow step boundaries. You can
274
- override it via `vercelBackend()`:
325
+ raises this default to **30 minutes** so the sandbox survives across workflow step boundaries. You can
326
+ override it in `onSession`:
275
327
 
276
328
  ```ts
277
- vercelBackend({ timeout: 60 * 60 * 1_000 }); // 1 hour
329
+ async onSession({ use }) {
330
+ await use({ timeout: 60 * 60 * 1_000 }); // 1 hour
331
+ }
278
332
  ```
279
333
 
280
334
  The maximum timeout depends on your Vercel plan: **5 hours** for Pro/Enterprise, **45 minutes** for
281
335
  Hobby. If a sandbox expires between steps, the next step will fail with a `410 Gone` error.
282
336
 
283
- ### Network Policies
337
+ ### Tags
284
338
 
285
- The Vercel backend exposes the underlying SDK's `networkPolicy` field unchanged. Three forms are
286
- supported:
339
+ Ash attaches Vercel Sandbox tags for runtime attribution:
287
340
 
288
- ```ts
289
- vercelBackend({ networkPolicy: "allow-all" }); // default
290
- vercelBackend({ networkPolicy: "deny-all" }); // block all egress, including DNS
341
+ - `agent` — the active agent or subagent name
342
+ - `channel` the active channel adapter kind
343
+ - `sessionId` the Ash session id
291
344
 
292
- vercelBackend({
293
- networkPolicy: {
294
- allow: ["ai-gateway.vercel.sh", "*.github.com"],
295
- subnets: { deny: ["10.0.0.0/8"] },
296
- },
297
- });
345
+ Custom tags can be set via `onSession`:
346
+
347
+ ```ts
348
+ async onSession({ use }) {
349
+ await use({ tags: { team: "infra" } });
350
+ }
298
351
  ```
299
352
 
300
- Important caveat: any options you pass to `vercelBackend()` are applied to **both** the build-time
301
- template snapshot (when `bootstrap()` runs) and per-session sandbox creation. A restrictive
302
- `networkPolicy` will therefore also constrain `bootstrap()`. Make sure your bootstrap works within
303
- whatever constraints you set — for example, a `deny-all` policy will block `git clone` and
304
- `npm install`. If you need a less restrictive bootstrap, allowlist only the hosts your bootstrap
305
- needs (e.g. `["registry.npmjs.org"]`) instead of using `deny-all`.
353
+ Vercel Sandbox supports at most five tags. Ash-owned tags take three slots, leaving two for custom
354
+ tags.
306
355
 
307
356
  ### Custom Backends
308
357
 
309
358
  A `SandboxBackend` is just an object with a `name` and a `create` function (and optionally
310
359
  `prewarm`). You can write your own and pass it to `defineSandbox({ backend })`. See
311
- `experimental-ash/sandboxes` for the `SandboxBackend`, `SandboxBackendCreateInput`, and
360
+ `experimental-ash/sandbox` for the `SandboxBackend`, `SandboxBackendCreateInput`, and
312
361
  `SandboxBackendPrewarmInput` interface types.
313
362
 
314
363
  ## Vercel Behavior
@@ -83,7 +83,7 @@ Important behavior:
83
83
  backend-native path for a logical `/workspace/...` location before passing it to shell code or a
84
84
  child process.
85
85
 
86
- See [`sandboxes.md`](./sandboxes.md) for lifecycle details.
86
+ See [`sandbox.md`](./sandbox.md) for lifecycle details.
87
87
 
88
88
  ## `getSkill(identifier)`
89
89
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: "Subagents"
3
- description: "Delegate specialized work to child agents with their own prompts, tools, and sandboxes."
3
+ description: "Delegate specialized work to child agents with their own prompts, tools, and sandbox."
4
4
  ---
5
5
 
6
6
  Subagents let the root agent delegate specialized work to local child agents.
@@ -61,9 +61,9 @@ Subagent execution gets:
61
61
 
62
62
  The subagent's sandbox does not inherit from the parent. Different agents generally have different
63
63
  skills, so sharing a filesystem would be confusing. Each subagent gets the framework default
64
- sandbox unless it authors its own override at `subagents/<name>/sandbox/sandbox.ts`. A subagent can
65
- also author only `subagents/<name>/sandbox/workspace/` to seed files without overriding the
66
- definition.
64
+ sandbox unless it authors its own override at `subagents/<name>/sandbox.ts` (or
65
+ `subagents/<name>/sandbox/sandbox.ts` when paired with a `workspace/` folder). A subagent can also
66
+ author only `subagents/<name>/sandbox/workspace/` to seed files without overriding the definition.
67
67
 
68
68
  ## Stream Behavior
69
69