eve 0.63.0 → 0.64.1

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 (485) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/src/ai/evaluate.js +1 -1
  3. package/dist/src/channel/channel-address.d.ts +4 -1
  4. package/dist/src/channel/channel-address.js +1 -1
  5. package/dist/src/channel/channel-operations.d.ts +4 -1
  6. package/dist/src/channel/cross-channel-receive.d.ts +4 -1
  7. package/dist/src/channel/cross-channel-receive.js +1 -1
  8. package/dist/src/channel/session.d.ts +3 -1
  9. package/dist/src/channel/session.js +1 -1
  10. package/dist/src/channel/types.d.ts +7 -0
  11. package/dist/src/chunks/{use-eve-agent-C5-yqRuq.js → use-eve-agent-BdKlQF32.js} +8 -8
  12. package/dist/src/chunks/{use-eve-agent-CVWk5KKy.js → use-eve-agent-IIuxkn6y.js} +8 -8
  13. package/dist/src/cli/commands/build.js +1 -1
  14. package/dist/src/cli/commands/init-agent-workspace.d.ts +2 -0
  15. package/dist/src/cli/commands/init.js +1 -1
  16. package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +1 -1
  17. package/dist/src/cli/commands/registry-pnpm-build-policy-flow.js +1 -1
  18. package/dist/src/cli/dev/tui/line-editor.d.ts +11 -1
  19. package/dist/src/cli/dev/tui/line-editor.js +3 -3
  20. package/dist/src/cli/dev/tui/model-picker.d.ts +2 -0
  21. package/dist/src/cli/dev/tui/model-picker.js +1 -1
  22. package/dist/src/cli/dev/tui/runner.d.ts +0 -1
  23. package/dist/src/cli/dev/tui/runner.js +2 -2
  24. package/dist/src/cli/dev/tui/setup-panel.js +1 -1
  25. package/dist/src/cli/dev/tui/setup-selection-input.js +1 -1
  26. package/dist/src/cli/dev/tui/stream-format.d.ts +6 -0
  27. package/dist/src/cli/dev/tui/stream-format.js +2 -2
  28. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +0 -1
  29. package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
  30. package/dist/src/cli/run.js +1 -1
  31. package/dist/src/client/agent-info-schema.d.ts +8 -14
  32. package/dist/src/client/agent-info-schema.js +1 -1
  33. package/dist/src/client/eve-agent-store.js +1 -1
  34. package/dist/src/client/session.js +1 -1
  35. package/dist/src/client/types.d.ts +4 -2
  36. package/dist/src/compiled/.vendor-stamp.json +11 -11
  37. package/dist/src/compiled/@chat-adapter/slack/_chat-adapter-shared.d.ts +1 -0
  38. package/dist/src/compiled/@chat-adapter/slack/api.d.ts +3 -2
  39. package/dist/src/compiled/@chat-adapter/slack/api.js +1 -1
  40. package/dist/src/compiled/@chat-adapter/slack/blocks.js +1 -1
  41. package/dist/src/compiled/@chat-adapter/slack/format.js +1 -1
  42. package/dist/src/compiled/@chat-adapter/slack/index.d.ts +410 -63
  43. package/dist/src/compiled/@chat-adapter/slack/index.js +47 -25
  44. package/dist/src/compiled/@chat-adapter/twilio/api.d.ts +5 -1
  45. package/dist/src/compiled/@chat-adapter/twilio/api.js +1 -1
  46. package/dist/src/compiled/@chat-adapter/twilio/index.d.ts +37 -3
  47. package/dist/src/compiled/@chat-adapter/twilio/index.js +5 -1
  48. package/dist/src/compiled/@chat-adapter/twilio/webhook.d.ts +2 -2
  49. package/dist/src/compiled/@chat-adapter/twilio/webhook.js +1 -1
  50. package/dist/src/compiled/@linqapp/chat-sdk-adapter/index.js +6 -6
  51. package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +50 -50
  52. package/dist/src/compiled/@vercel/sandbox/index.js +4 -4
  53. package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +2 -1
  54. package/dist/src/compiled/@workflow/core/events-consumer.d.ts +6 -3
  55. package/dist/src/compiled/@workflow/core/index.js +2 -2
  56. package/dist/src/compiled/@workflow/core/private.d.ts +37 -5
  57. package/dist/src/compiled/@workflow/core/private.js +1 -1
  58. package/dist/src/compiled/@workflow/core/runtime/deployment-guard.d.ts +2 -1
  59. package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
  60. package/dist/src/compiled/@workflow/core/runtime/invocations.d.ts +35 -0
  61. package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +90 -0
  62. package/dist/src/compiled/@workflow/core/runtime/quickjs-runtime.d.ts +2 -1
  63. package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +8 -6
  64. package/dist/src/compiled/@workflow/core/runtime/step-single-flight.d.ts +1 -1
  65. package/dist/src/compiled/@workflow/core/runtime.js +4 -4
  66. package/dist/src/compiled/@workflow/core/serialization.d.ts +5 -1
  67. package/dist/src/compiled/@workflow/core/serialization.js +1 -1
  68. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  69. package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +4 -0
  70. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  71. package/dist/src/compiled/@workflow/world/analytics.d.ts +1 -1
  72. package/dist/src/compiled/@workflow/world/attributes-validation.d.ts +5 -0
  73. package/dist/src/compiled/@workflow/world/events.d.ts +2 -2
  74. package/dist/src/compiled/@workflow/world/index.d.ts +2 -1
  75. package/dist/src/compiled/@workflow/world/interfaces.d.ts +12 -1
  76. package/dist/src/compiled/@workflow/world/invocation.d.ts +19 -0
  77. package/dist/src/compiled/@workflow/world/queue.d.ts +24 -3
  78. package/dist/src/compiled/@workflow/world-local/index.js +3 -3
  79. package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
  80. package/dist/src/compiled/_chunks/node/chunk-6QHBXN7B-gl4n6nmi.js +12 -0
  81. package/dist/src/compiled/_chunks/node/chunk-7WDLOIRP-B_IWkVtZ.js +1 -0
  82. package/dist/src/compiled/_chunks/node/chunk-KBOOTKHF-DJqFk2r1.js +1 -0
  83. package/dist/src/compiled/_chunks/node/chunk-TREVQR3E-CLsTAn-O.js +1 -0
  84. package/dist/src/compiled/_chunks/node/dist-DYDVZ-FS.js +98 -0
  85. package/dist/src/compiled/_chunks/node/dist-iEFkK9qw.js +6 -0
  86. package/dist/src/compiled/_chunks/workflow/attribute-changes-DFx4eluc.js +6 -0
  87. package/dist/src/compiled/_chunks/workflow/{dist-D38gP7YF.js → dist-DjECvUyK.js} +1 -1
  88. package/dist/src/compiled/_chunks/workflow/{frames-QcJfYHmh.js → frames-D_Q-7A1N.js} +2 -2
  89. package/dist/src/compiled/_chunks/workflow/{helpers-6kObVbfS.js → helpers-Bw52uyzw.js} +1 -1
  90. package/dist/src/compiled/_chunks/workflow/{logger-NN5YHpYy.js → logger-DFNCa8Nl.js} +1 -1
  91. package/dist/src/compiled/_chunks/workflow/resume-hook-BhA_nDEV.js +1 -0
  92. package/dist/src/compiled/_chunks/workflow/{run-DJevv8zz.js → run-BT6SQv5f.js} +1 -1
  93. package/dist/src/compiled/_chunks/workflow/{serialization-C5KgPESk.js → serialization-Cl0SYU0I.js} +3 -3
  94. package/dist/src/compiled/_chunks/workflow/sleep-DB4AH9-A.js +1 -0
  95. package/dist/src/compiled/_chunks/workflow/{wait-until-BMY_tOr-.js → wait-until-Dzhr6tzf.js} +1 -1
  96. package/dist/src/compiled/_chunks/workflow/{ws-transport-DSDcKH08.js → ws-transport-BpTMh40s.js} +1 -1
  97. package/dist/src/compiled/chat/index.d.ts +1 -725
  98. package/dist/src/compiled/chat/index.js +1 -1
  99. package/dist/src/compiler/artifacts.d.ts +1 -0
  100. package/dist/src/compiler/artifacts.js +1 -1
  101. package/dist/src/compiler/extension-compatibility.d.ts +23 -15
  102. package/dist/src/compiler/extension-compatibility.js +1 -1
  103. package/dist/src/compiler/manifest.d.ts +14 -18
  104. package/dist/src/compiler/manifest.js +1 -1
  105. package/dist/src/compiler/normalize-helpers.js +1 -1
  106. package/dist/src/compiler/normalize-sandbox.d.ts +2 -7
  107. package/dist/src/compiler/normalize-sandbox.js +1 -1
  108. package/dist/src/compiler/workspace-resources.js +1 -1
  109. package/dist/src/context/build-callback-context.d.ts +2 -0
  110. package/dist/src/context/build-callback-context.js +1 -1
  111. package/dist/src/context/container.d.ts +1 -1
  112. package/dist/src/context/container.js +1 -1
  113. package/dist/src/context/key-names.d.ts +1 -0
  114. package/dist/src/context/key-names.js +1 -1
  115. package/dist/src/context/keys.d.ts +7 -2
  116. package/dist/src/context/keys.js +1 -1
  117. package/dist/src/context/providers/sandbox.js +1 -1
  118. package/dist/src/context/providers/session.d.ts +19 -2
  119. package/dist/src/context/session-context.d.ts +1 -1
  120. package/dist/src/discover/sandbox.js +1 -1
  121. package/dist/src/evals/cli/eval.js +1 -1
  122. package/dist/src/evals/context.d.ts +1 -0
  123. package/dist/src/evals/context.js +1 -1
  124. package/dist/src/evals/define-eval-config.d.ts +7 -7
  125. package/dist/src/evals/define-eval-config.js +1 -1
  126. package/dist/src/evals/define-eval.d.ts +5 -2
  127. package/dist/src/evals/index.d.ts +1 -1
  128. package/dist/src/evals/runner/execute-eval.d.ts +2 -0
  129. package/dist/src/evals/runner/execute-eval.js +1 -1
  130. package/dist/src/evals/runner/execute-task.d.ts +2 -0
  131. package/dist/src/evals/runner/execute-task.js +1 -1
  132. package/dist/src/evals/runner/run-evals.d.ts +2 -0
  133. package/dist/src/evals/runner/run-evals.js +1 -1
  134. package/dist/src/evals/target.js +1 -1
  135. package/dist/src/evals/types.d.ts +22 -6
  136. package/dist/src/eve-channel/create-request.d.ts +2 -1
  137. package/dist/src/eve-channel/delivery-policy-request.d.ts +4 -0
  138. package/dist/src/eve-channel/delivery-policy-request.js +1 -0
  139. package/dist/src/eve-channel/index.js +1 -1
  140. package/dist/src/eve-channel/request.d.ts +2 -1
  141. package/dist/src/eve-channel/request.js +1 -1
  142. package/dist/src/execution/coordination-dispatch-shared.d.ts +2 -1
  143. package/dist/src/execution/coordination-dispatch-shared.js +1 -1
  144. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  145. package/dist/src/execution/runtime-context.js +1 -1
  146. package/dist/src/execution/sandbox/active-handles.d.ts +7 -8
  147. package/dist/src/execution/sandbox/active-handles.js +1 -1
  148. package/dist/src/execution/sandbox/bash.js +1 -1
  149. package/dist/src/execution/sandbox/bindings/docker-cli.d.ts +1 -1
  150. package/dist/src/execution/sandbox/bindings/docker-cli.js +1 -1
  151. package/dist/src/execution/sandbox/bindings/docker-container.d.ts +2 -2
  152. package/dist/src/execution/sandbox/bindings/docker-container.js +1 -1
  153. package/dist/src/execution/sandbox/bindings/docker-network.d.ts +1 -1
  154. package/dist/src/execution/sandbox/bindings/docker-network.js +1 -1
  155. package/dist/src/execution/sandbox/bindings/docker-options.d.ts +4 -5
  156. package/dist/src/execution/sandbox/bindings/docker-options.js +1 -1
  157. package/dist/src/execution/sandbox/bindings/docker-session.d.ts +0 -1
  158. package/dist/src/execution/sandbox/bindings/docker-session.js +2 -2
  159. package/dist/src/execution/sandbox/bindings/docker.d.ts +16 -18
  160. package/dist/src/execution/sandbox/bindings/docker.js +1 -1
  161. package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +21 -0
  162. package/dist/src/execution/sandbox/bindings/immutable-resources.js +2 -0
  163. package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +9 -5
  164. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  165. package/dist/src/execution/sandbox/bindings/just-bash.d.ts +13 -26
  166. package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
  167. package/dist/src/execution/sandbox/bindings/{local-backend-utils.d.ts → local-provider-utils.d.ts} +7 -5
  168. package/dist/src/execution/sandbox/bindings/local-provider-utils.js +1 -0
  169. package/dist/src/execution/sandbox/bindings/local.d.ts +3 -3
  170. package/dist/src/execution/sandbox/bindings/local.js +1 -1
  171. package/dist/src/execution/sandbox/bindings/microsandbox-create.js +1 -1
  172. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +30 -8
  173. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
  174. package/dist/src/execution/sandbox/bindings/microsandbox-metadata.d.ts +9 -1
  175. package/dist/src/execution/sandbox/bindings/microsandbox-metadata.js +1 -1
  176. package/dist/src/execution/sandbox/bindings/microsandbox-network.js +1 -1
  177. package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +10 -4
  178. package/dist/src/execution/sandbox/bindings/microsandbox-options.js +1 -1
  179. package/dist/src/execution/sandbox/bindings/microsandbox-platform.js +1 -1
  180. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +7 -5
  181. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
  182. package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
  183. package/dist/src/execution/sandbox/bindings/microsandbox.d.ts +11 -21
  184. package/dist/src/execution/sandbox/bindings/microsandbox.js +1 -1
  185. package/dist/src/execution/sandbox/bindings/vercel-base-runtime.js +2 -2
  186. package/dist/src/execution/sandbox/bindings/vercel-credentials.js +1 -1
  187. package/dist/src/execution/sandbox/bindings/vercel-errors.js +1 -1
  188. package/dist/src/execution/sandbox/bindings/vercel-lifecycle.d.ts +2 -2
  189. package/dist/src/execution/sandbox/bindings/vercel-lifecycle.js +1 -1
  190. package/dist/src/execution/sandbox/bindings/vercel-lookup.js +1 -1
  191. package/dist/src/execution/sandbox/bindings/vercel-options.d.ts +1 -2
  192. package/dist/src/execution/sandbox/bindings/vercel-options.js +1 -1
  193. package/dist/src/execution/sandbox/bindings/vercel.d.ts +20 -12
  194. package/dist/src/execution/sandbox/bindings/vercel.js +2 -2
  195. package/dist/src/execution/sandbox/development-cleanup.js +1 -1
  196. package/dist/src/execution/sandbox/development-lazy-prewarm.d.ts +7 -0
  197. package/dist/src/execution/sandbox/development-lazy-prewarm.js +1 -0
  198. package/dist/src/execution/sandbox/development-run.d.ts +2 -3
  199. package/dist/src/execution/sandbox/dockerfile.d.ts +25 -0
  200. package/dist/src/execution/sandbox/dockerfile.js +1 -0
  201. package/dist/src/execution/sandbox/ensure.d.ts +0 -17
  202. package/dist/src/execution/sandbox/ensure.js +1 -1
  203. package/dist/src/execution/sandbox/logging-session.js +1 -1
  204. package/dist/src/execution/sandbox/prewarm.d.ts +23 -27
  205. package/dist/src/execution/sandbox/prewarm.js +1 -2
  206. package/dist/src/execution/sandbox/provider-files.d.ts +2 -0
  207. package/dist/src/execution/sandbox/provider-files.js +1 -0
  208. package/dist/src/execution/sandbox/provider-host-development.d.ts +2 -0
  209. package/dist/src/execution/sandbox/provider-host-development.js +1 -0
  210. package/dist/src/execution/sandbox/provider-host.d.ts +2 -0
  211. package/dist/src/execution/sandbox/provider-host.js +1 -0
  212. package/dist/src/execution/sandbox/provider-identity.d.ts +1 -0
  213. package/dist/src/execution/sandbox/provider-identity.js +1 -0
  214. package/dist/src/execution/sandbox/ripgrep-probe.d.ts +0 -7
  215. package/dist/src/execution/sandbox/ripgrep-probe.js +1 -1
  216. package/dist/src/execution/sandbox/session.d.ts +8 -8
  217. package/dist/src/execution/sandbox/session.js +1 -1
  218. package/dist/src/execution/session/handoff-steps.js +1 -1
  219. package/dist/src/execution/session/handoff.d.ts +1 -1
  220. package/dist/src/execution/session/handoff.js +1 -1
  221. package/dist/src/execution/session/input-queue.d.ts +2 -1
  222. package/dist/src/execution/session/input-queue.js +1 -1
  223. package/dist/src/execution/session/next-input.js +1 -1
  224. package/dist/src/execution/session/program.js +1 -1
  225. package/dist/src/execution/session/turn-step.js +1 -1
  226. package/dist/src/execution/session-inbox/protocol.js +1 -1
  227. package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
  228. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  229. package/dist/src/execution/tools/sleep-workflow.js +1 -1
  230. package/dist/src/execution/tools/subagent/emit-event-step.js +1 -1
  231. package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -1
  232. package/dist/src/execution/tools/subagent/start.d.ts +1 -0
  233. package/dist/src/framework/sources/modules/sandbox.d.ts +2 -1
  234. package/dist/src/framework/sources/modules/sandbox.js +1 -1
  235. package/dist/src/harness/approval-delivery-coordinator.js +1 -1
  236. package/dist/src/harness/hitl/approval-input-requests.d.ts +1 -1
  237. package/dist/src/harness/hitl/approval-input-requests.js +1 -1
  238. package/dist/src/harness/input-requests.d.ts +6 -0
  239. package/dist/src/harness/input-requests.js +1 -1
  240. package/dist/src/harness/messages.d.ts +2 -1
  241. package/dist/src/harness/messages.js +1 -1
  242. package/dist/src/harness/pending-input-batches.d.ts +1 -0
  243. package/dist/src/harness/pending-input-batches.js +1 -1
  244. package/dist/src/harness/tool-loop.js +2 -2
  245. package/dist/src/instrumentation/ai-sdk-warnings.d.ts +6 -0
  246. package/dist/src/instrumentation/ai-sdk-warnings.js +1 -0
  247. package/dist/src/instrumentation/runtime.d.ts +1 -0
  248. package/dist/src/instrumentation/runtime.js +1 -1
  249. package/dist/src/internal/application/compiled-artifacts.d.ts +2 -0
  250. package/dist/src/internal/application/compiled-artifacts.js +2 -2
  251. package/dist/src/internal/application/optional-package-install.d.ts +3 -0
  252. package/dist/src/internal/application/optional-package-install.js +2 -2
  253. package/dist/src/internal/application/output-publication-lock.d.ts +6 -0
  254. package/dist/src/internal/application/output-publication-lock.js +1 -1
  255. package/dist/src/internal/application/output-publication.js +1 -1
  256. package/dist/src/internal/application/package.js +1 -1
  257. package/dist/src/internal/authored-module-loader.d.ts +1 -0
  258. package/dist/src/internal/authored-module-loader.js +1 -1
  259. package/dist/src/internal/authored-runtime-modules.d.ts +1 -0
  260. package/dist/src/internal/nitro/development-generation.js +1 -1
  261. package/dist/src/internal/nitro/host/artifacts-config.d.ts +6 -1
  262. package/dist/src/internal/nitro/host/artifacts-config.js +1 -1
  263. package/dist/src/internal/nitro/host/build-application.js +1 -1
  264. package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.d.ts +16 -0
  265. package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.js +5 -0
  266. package/dist/src/internal/nitro/host/configure-nitro-routes.js +2 -2
  267. package/dist/src/internal/nitro/host/create-application-nitro.d.ts +3 -3
  268. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  269. package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
  270. package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
  271. package/dist/src/internal/nitro/host/development-runtime-prune-plugin.d.ts +9 -0
  272. package/dist/src/internal/nitro/host/development-runtime-prune-plugin.js +2 -0
  273. package/dist/src/internal/nitro/host/prepare-application-host.d.ts +1 -0
  274. package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
  275. package/dist/src/internal/nitro/host/sandbox-shutdown-plugin.js +1 -1
  276. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  277. package/dist/src/internal/nitro/host/start-production-server.js +2 -2
  278. package/dist/src/internal/nitro/host/types.d.ts +1 -1
  279. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  280. package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts +1 -0
  281. package/dist/src/internal/nitro/routes/runtime-artifacts.js +1 -1
  282. package/dist/src/internal/runtime-registry.d.ts +2 -2
  283. package/dist/src/internal/vercel/build-agent-workspace.d.ts +3 -1
  284. package/dist/src/internal/vercel/build-agent-workspace.js +1 -1
  285. package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +4 -5
  286. package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
  287. package/dist/src/public/channels/github/checkout.js +1 -1
  288. package/dist/src/public/channels/index.d.ts +1 -1
  289. package/dist/src/public/channels/slack/slackChannel.d.ts +3 -1
  290. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  291. package/dist/src/public/definitions/channel.d.ts +1 -1
  292. package/dist/src/public/definitions/sandbox.d.ts +5 -43
  293. package/dist/src/public/definitions/sandbox.js +1 -1
  294. package/dist/src/public/local-dev.d.ts +4 -5
  295. package/dist/src/public/next/vercel-output-config.js +1 -1
  296. package/dist/src/public/sandbox/docker-sandbox.d.ts +16 -40
  297. package/dist/src/public/sandbox/docker.d.ts +2 -2
  298. package/dist/src/public/sandbox/docker.js +1 -1
  299. package/dist/src/public/sandbox/index.d.ts +4 -9
  300. package/dist/src/public/sandbox/index.js +1 -1
  301. package/dist/src/public/sandbox/just-bash-sandbox.d.ts +11 -6
  302. package/dist/src/public/sandbox/just-bash.d.ts +2 -2
  303. package/dist/src/public/sandbox/just-bash.js +1 -1
  304. package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +11 -17
  305. package/dist/src/public/sandbox/microsandbox.d.ts +2 -2
  306. package/dist/src/public/sandbox/microsandbox.js +1 -1
  307. package/dist/src/public/sandbox/provider.d.ts +1 -0
  308. package/dist/src/public/sandbox/provider.js +1 -0
  309. package/dist/src/public/sandbox/vercel-sandbox.d.ts +10 -41
  310. package/dist/src/public/sandbox/vercel.d.ts +2 -2
  311. package/dist/src/public/sandbox/vercel.js +1 -1
  312. package/dist/src/runtime/cache-key.js +1 -1
  313. package/dist/src/runtime/compiled-artifacts-source.d.ts +6 -1
  314. package/dist/src/runtime/compiled-artifacts-source.js +1 -1
  315. package/dist/src/runtime/loaders/artifact-paths.d.ts +1 -0
  316. package/dist/src/runtime/loaders/artifact-paths.js +1 -1
  317. package/dist/src/runtime/loaders/bundled-artifacts.d.ts +3 -0
  318. package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
  319. package/dist/src/runtime/loaders/compile-metadata.js +1 -1
  320. package/dist/src/runtime/loaders/manifest.js +1 -1
  321. package/dist/src/runtime/loaders/module-map.js +1 -1
  322. package/dist/src/runtime/local-dev-capability.d.ts +14 -12
  323. package/dist/src/runtime/local-dev-capability.js +1 -1
  324. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  325. package/dist/src/runtime/resolve-sandbox.d.ts +1 -10
  326. package/dist/src/runtime/resolve-sandbox.js +1 -1
  327. package/dist/src/runtime/sandbox/prepared-artifacts.d.ts +13 -0
  328. package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -0
  329. package/dist/src/runtime/sandbox/registry.d.ts +2 -9
  330. package/dist/src/runtime/sandbox/registry.js +1 -1
  331. package/dist/src/runtime/sessions/runtime-session.js +1 -1
  332. package/dist/src/runtime/types.d.ts +13 -26
  333. package/dist/src/runtime/workspace/types.d.ts +1 -1
  334. package/dist/src/sandbox/providers/default.d.ts +27 -0
  335. package/dist/src/sandbox/providers/default.js +1 -0
  336. package/dist/src/sandbox/providers/docker.d.ts +11 -0
  337. package/dist/src/sandbox/providers/docker.js +1 -0
  338. package/dist/src/sandbox/providers/just-bash.d.ts +4 -0
  339. package/dist/src/sandbox/providers/just-bash.js +1 -0
  340. package/dist/src/sandbox/providers/microsandbox.d.ts +12 -0
  341. package/dist/src/sandbox/providers/microsandbox.js +1 -0
  342. package/dist/src/sandbox/providers/vercel.d.ts +12 -0
  343. package/dist/src/sandbox/providers/vercel.js +1 -0
  344. package/dist/src/sandbox/providers.d.ts +5 -0
  345. package/dist/src/sandbox/providers.js +1 -0
  346. package/dist/src/sandbox/state.d.ts +6 -25
  347. package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +1 -1
  348. package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -1
  349. package/dist/src/self-modification/extension/subagents/agent/sandbox.d.ts +2 -25
  350. package/dist/src/self-modification/extension/subagents/agent/sandbox.js +1 -1
  351. package/dist/src/self-modification/extension/subagents/agent/tools/publish.js +1 -1
  352. package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
  353. package/dist/src/self-modification/filesystem.d.ts +3 -1
  354. package/dist/src/self-modification/filesystem.js +1 -1
  355. package/dist/src/self-modification/git-workspace.d.ts +1 -1
  356. package/dist/src/self-modification/git.d.ts +1 -1
  357. package/dist/src/self-modification/sandbox.d.ts +14 -9
  358. package/dist/src/self-modification/sandbox.js +1 -1
  359. package/dist/src/setup/boxes/select-model.js +1 -1
  360. package/dist/src/setup/cli/select-state.d.ts +4 -2
  361. package/dist/src/setup/cli/select-state.js +1 -1
  362. package/dist/src/setup/flows/model-login.js +1 -1
  363. package/dist/src/{cli/commands/registry-pnpm-build-policy.d.ts → setup/primitives/pm/pnpm-build-policy.d.ts} +4 -0
  364. package/dist/src/setup/primitives/pm/pnpm-build-policy.js +8 -0
  365. package/dist/src/setup/primitives/pm/pnpm.js +3 -2
  366. package/dist/src/setup/scaffold/create/project.js +1 -1
  367. package/dist/src/shared/default-agent-model.d.ts +1 -1
  368. package/dist/src/shared/default-agent-model.js +1 -1
  369. package/dist/src/shared/sandbox-environment.d.ts +45 -0
  370. package/dist/src/shared/sandbox-environment.js +1 -0
  371. package/dist/src/shared/sandbox-network-policy.d.ts +8 -3
  372. package/dist/src/shared/sandbox-network-policy.js +1 -1
  373. package/dist/src/shared/sandbox-prepared-artifacts.d.ts +16 -0
  374. package/dist/src/shared/sandbox-prepared-artifacts.js +1 -0
  375. package/dist/src/shared/sandbox-provider.d.ts +112 -0
  376. package/dist/src/shared/sandbox-provider.js +1 -0
  377. package/dist/src/shared/sandbox-session.d.ts +18 -41
  378. package/dist/src/shared/sandbox-template-error.d.ts +9 -0
  379. package/dist/src/shared/sandbox-template-error.js +1 -0
  380. package/dist/src/subagents/tool.d.ts +1 -1
  381. package/dist/src/subagents/tool.js +1 -1
  382. package/dist/src/svelte/index.js +1 -1
  383. package/dist/src/svelte/use-eve-agent.js +1 -1
  384. package/dist/src/tasks/delivery-context.d.ts +6 -4
  385. package/dist/src/tasks/delivery-context.js +1 -1
  386. package/dist/src/tasks/delivery-policy.d.ts +2 -0
  387. package/dist/src/tasks/delivery-policy.js +1 -1
  388. package/dist/src/tools/framework/agent-contract.js +1 -1
  389. package/dist/src/vue/index.js +1 -1
  390. package/dist/src/vue/use-eve-agent.js +1 -1
  391. package/docs/README.md +40 -45
  392. package/docs/agent-config.md +2 -2
  393. package/docs/channels/eve.mdx +1 -1
  394. package/docs/channels/overview.mdx +48 -0
  395. package/docs/channels/slack.mdx +1 -1
  396. package/docs/concepts/execution-model-and-durability.mdx +1 -1
  397. package/docs/concepts/sessions-runs-and-streaming.md +3 -3
  398. package/docs/dynamic-configuration/meta.json +5 -0
  399. package/docs/evals/overview.mdx +43 -0
  400. package/docs/getting-started.mdx +1 -1
  401. package/docs/guides/client/overview.mdx +1 -1
  402. package/docs/guides/deployment/overview.md +1 -1
  403. package/docs/guides/deployment/self-hosting.md +5 -5
  404. package/docs/guides/deployment/vercel.mdx +10 -18
  405. package/docs/guides/dev-tui.md +1 -1
  406. package/docs/guides/hooks.md +4 -0
  407. package/docs/guides/instrumentation/instrumentation.mdx +1 -1
  408. package/docs/guides/instrumentation/migration.md +1 -6
  409. package/docs/guides/instrumentation/otel.mdx +15 -47
  410. package/docs/memory/meta.json +1 -1
  411. package/docs/memory/overview.mdx +4 -0
  412. package/docs/meta.json +13 -16
  413. package/docs/patterns/meta.json +2 -2
  414. package/docs/protocols/acp.md +1 -1
  415. package/docs/protocols/ucp.mdx +1 -1
  416. package/docs/reference/cli.md +10 -9
  417. package/docs/reference/meta.json +4 -1
  418. package/docs/reference/typescript-api.md +2 -25
  419. package/docs/sandbox/default.mdx +17 -0
  420. package/docs/sandbox/docker.mdx +29 -0
  421. package/docs/sandbox/index.mdx +218 -0
  422. package/docs/sandbox/just-bash.mdx +24 -0
  423. package/docs/sandbox/meta.json +5 -0
  424. package/docs/sandbox/microsandbox.mdx +31 -0
  425. package/docs/sandbox/vercel.mdx +106 -0
  426. package/docs/schedules.mdx +35 -1
  427. package/docs/subagents/index.mdx +31 -13
  428. package/docs/subagents/meta.json +1 -1
  429. package/docs/tools/overview.mdx +14 -6
  430. package/docs/tutorial/run-analysis.mdx +6 -5
  431. package/package.json +20 -11
  432. package/dist/src/cli/commands/registry-pnpm-build-policy.js +0 -6
  433. package/dist/src/compiled/_chunks/node/chunk-5OX2R7AJ-CxVV-owP.js +0 -1
  434. package/dist/src/compiled/_chunks/node/chunk-AYN7QRWH-B__hKQV7.js +0 -1
  435. package/dist/src/compiled/_chunks/node/chunk-QZV7YRVM-Dzw4WEBv.js +0 -1
  436. package/dist/src/compiled/_chunks/node/dist-CweJdVFE.js +0 -6
  437. package/dist/src/compiled/_chunks/node/dist-Da54NuK8.js +0 -96
  438. package/dist/src/compiled/_chunks/workflow/attribute-changes-A6HfMNG3.js +0 -6
  439. package/dist/src/compiled/_chunks/workflow/resume-hook-CAqlhwic.js +0 -1
  440. package/dist/src/compiled/_chunks/workflow/sleep-CbUwdv6O.js +0 -1
  441. package/dist/src/compiled/chat/_mdast.d.ts +0 -24
  442. package/dist/src/compiled/chat/_workflow-serde.d.ts +0 -3
  443. package/dist/src/compiled/chat/jsx-runtime-_JEEAotp.d.ts +0 -907
  444. package/dist/src/execution/sandbox/bindings/local-backend-utils.js +0 -1
  445. package/dist/src/execution/sandbox/development-prewarm.d.ts +0 -15
  446. package/dist/src/execution/sandbox/development-prewarm.js +0 -1
  447. package/dist/src/execution/sandbox/lazy-backend.d.ts +0 -15
  448. package/dist/src/execution/sandbox/lazy-backend.js +0 -1
  449. package/dist/src/execution/sandbox/template-prewarm-lock.d.ts +0 -8
  450. package/dist/src/execution/sandbox/template-prewarm-lock.js +0 -1
  451. package/dist/src/internal/authored-definition/sandbox.d.ts +0 -17
  452. package/dist/src/internal/authored-definition/sandbox.js +0 -1
  453. package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.d.ts +0 -16
  454. package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.js +0 -2
  455. package/dist/src/public/definitions/sandbox-backend.d.ts +0 -17
  456. package/dist/src/public/definitions/sandbox-backend.js +0 -1
  457. package/dist/src/public/sandbox/backends/default.d.ts +0 -1
  458. package/dist/src/public/sandbox/backends/default.js +0 -1
  459. package/dist/src/public/sandbox/backends/docker.d.ts +0 -1
  460. package/dist/src/public/sandbox/backends/docker.js +0 -1
  461. package/dist/src/public/sandbox/backends/just-bash.d.ts +0 -1
  462. package/dist/src/public/sandbox/backends/just-bash.js +0 -1
  463. package/dist/src/public/sandbox/backends/microsandbox.d.ts +0 -1
  464. package/dist/src/public/sandbox/backends/microsandbox.js +0 -1
  465. package/dist/src/public/sandbox/backends/vercel.d.ts +0 -1
  466. package/dist/src/public/sandbox/backends/vercel.js +0 -1
  467. package/dist/src/runtime/sandbox/keys.d.ts +0 -42
  468. package/dist/src/runtime/sandbox/keys.js +0 -1
  469. package/dist/src/runtime/sandbox/template-plan.d.ts +0 -24
  470. package/dist/src/runtime/sandbox/template-plan.js +0 -1
  471. package/dist/src/sandbox/backends/default.d.ts +0 -42
  472. package/dist/src/sandbox/backends/default.js +0 -1
  473. package/dist/src/sandbox/backends/docker.d.ts +0 -14
  474. package/dist/src/sandbox/backends/docker.js +0 -1
  475. package/dist/src/sandbox/backends/just-bash.d.ts +0 -17
  476. package/dist/src/sandbox/backends/just-bash.js +0 -1
  477. package/dist/src/sandbox/backends/microsandbox.d.ts +0 -17
  478. package/dist/src/sandbox/backends/microsandbox.js +0 -1
  479. package/dist/src/sandbox/backends/vercel.d.ts +0 -30
  480. package/dist/src/sandbox/backends/vercel.js +0 -1
  481. package/dist/src/shared/sandbox-backend.d.ts +0 -176
  482. package/dist/src/shared/sandbox-backend.js +0 -1
  483. package/dist/src/shared/sandbox-definition.d.ts +0 -112
  484. package/dist/src/shared/sandbox-definition.js +0 -1
  485. package/docs/sandbox.mdx +0 -342
@@ -1,112 +0,0 @@
1
- import type { SandboxSession } from "#shared/sandbox-session.js";
2
- import type { SandboxBackend } from "#shared/sandbox-backend.js";
3
- import type { SessionContext } from "#context/session-context.js";
4
- /**
5
- * Opens the template session inside a `bootstrap` hook. Optional `options`
6
- * (typed by the backend's bootstrap-use options `BO`) are applied to the
7
- * template before the snapshot is captured. Resolves to the
8
- * {@link SandboxSession} to operate on.
9
- */
10
- export type SandboxBootstrapUseFn<O = Record<string, never>> = (options?: O) => Promise<SandboxSession>;
11
- /**
12
- * Opens the live sandbox session inside an `onSession` hook. Optional
13
- * `options` (typed by the backend's session-use options `SO`) are applied
14
- * to the live session. Resolves to the {@link SandboxSession} for the
15
- * current turn.
16
- */
17
- export type SandboxSessionUseFn<O = Record<string, never>> = (options?: O) => Promise<SandboxSession>;
18
- /**
19
- * Argument passed to a sandbox `bootstrap` hook. `use(options?)` opens the
20
- * template session that the snapshot is captured from; backend-specific
21
- * `options` (typed by the backend's bootstrap-use options `BO`) are applied
22
- * to that template.
23
- */
24
- export interface SandboxBootstrapContext<O = Record<string, never>> {
25
- readonly use: SandboxBootstrapUseFn<O>;
26
- }
27
- /**
28
- * Argument passed to a sandbox `onSession` hook, invoked once per live
29
- * session. `ctx` contains the active session metadata; sandbox access during
30
- * initialization goes through `use(options?)`, which opens the live session
31
- * and applies backend-specific `options` (typed by the backend's session-use
32
- * options `SO`).
33
- */
34
- export interface SandboxSessionContext<O = Record<string, never>> {
35
- readonly ctx: Pick<SessionContext, "session">;
36
- readonly use: SandboxSessionUseFn<O>;
37
- }
38
- /**
39
- * Resolves a build-time revalidation key for a bootstrap snapshot. eve
40
- * evaluates it during compile/build and freezes the result into compiled
41
- * artifacts. Supply one only for external inputs that affect bootstrap
42
- * output; authored source and managed seeds are tracked automatically.
43
- */
44
- export type SandboxRevalidationKeyFn = () => Promise<string> | string;
45
- /**
46
- * Public sandbox definition authored in `agent/sandbox.ts` (shorthand)
47
- * or `agent/sandbox/sandbox.ts` (folder layout, when paired with an
48
- * authored `sandbox/workspace/` subtree).
49
- *
50
- * Each agent (and each subagent) owns exactly one sandbox. When the
51
- * module file is absent the framework auto-provides a default sandbox
52
- * via `defaultSandbox()`. Authors override lifecycle and backend by
53
- * creating `agent/sandbox.ts` (or `agent/sandbox/sandbox.ts` when they
54
- * also want a workspace folder); subagents override independently via
55
- * `subagents/<name>/sandbox.ts` (or the folder form) and do not inherit
56
- * their parent's sandbox (skill seeds differ per agent).
57
- */
58
- interface SandboxDefinitionBase<BO = Record<string, never>, SO = Record<string, never>> {
59
- /**
60
- * Backend that runs this sandbox.
61
- *
62
- * Accepts either a {@link SandboxBackend} value or a zero-arg factory
63
- * function that returns one. The factory form is invoked lazily on
64
- * first framework access and the result is memoized for the lifetime
65
- * of the process, so backend-internal state (such as the Vercel
66
- * backend's prewarmed-template cache) is preserved across every call.
67
- * Use the factory form to defer evaluation, for example when create
68
- * options depend on environment variables that aren't set at module
69
- * load time:
70
- *
71
- * ```ts
72
- * defineSandbox({
73
- * backend: () => vercel({ env: { TOKEN: process.env.TOKEN ?? "" } }),
74
- * });
75
- * ```
76
- *
77
- * When this field is omitted, eve substitutes `defaultSandbox()` at
78
- * runtime, which picks the best available backend: `vercel()`
79
- * on hosted Vercel (where `process.env.VERCEL` is set), then Docker,
80
- * microsandbox, or just-bash
81
- * everywhere else. Set `backend` explicitly to pin the sandbox to a
82
- * specific backend regardless of environment.
83
- */
84
- readonly backend: SandboxBackend<BO, SO> | (() => SandboxBackend<BO, SO>);
85
- /** Human-readable description of this sandbox, surfaced in tooling. */
86
- readonly description?: string;
87
- /**
88
- * Runs once per live session before authored steps use the sandbox.
89
- * Call `input.use(options?)` to open the session and apply per-session
90
- * backend options (typed by `SO`).
91
- */
92
- onSession?(input: SandboxSessionContext<SO>): Promise<void> | void;
93
- }
94
- export interface SandboxDefinitionWithBootstrap<BO = Record<string, never>, SO = Record<string, never>> extends SandboxDefinitionBase<BO, SO> {
95
- bootstrap(input: SandboxBootstrapContext<BO>): Promise<void> | void;
96
- /**
97
- * Optional build-time revalidation key for the reusable sandbox
98
- * snapshot produced by {@link bootstrap}. eve evaluates this
99
- * function during compile/build, stores the resolved string in
100
- * compiled artifacts, and uses that frozen value for both prewarm and
101
- * runtime session create. Authored sandbox source and
102
- * framework-managed seed contents are included automatically; provide
103
- * this key only for external inputs that affect bootstrap output.
104
- */
105
- readonly revalidationKey?: SandboxRevalidationKeyFn;
106
- }
107
- export interface SandboxDefinitionWithoutBootstrap<BO = Record<string, never>, SO = Record<string, never>> extends SandboxDefinitionBase<BO, SO> {
108
- bootstrap?: undefined;
109
- readonly revalidationKey?: never;
110
- }
111
- export type SandboxDefinition<BO = Record<string, never>, SO = Record<string, never>> = SandboxDefinitionWithBootstrap<BO, SO> | SandboxDefinitionWithoutBootstrap<BO, SO>;
112
- export {};
@@ -1 +0,0 @@
1
- export{};
package/docs/sandbox.mdx DELETED
@@ -1,342 +0,0 @@
1
- ---
2
- title: "Sandbox"
3
- description: "The agent's isolated bash environment, including built-in file tools, a seeded /workspace, backends, lifecycle, and network policy."
4
- ---
5
-
6
- The sandbox is the agent's isolated bash environment: a filesystem rooted at `/workspace` where it can run shell commands, execute scripts, and read or write files without ever touching your app runtime. Every eve agent has exactly one. The default `bash`, `read_file`, and `write_file` tools target it; you can also add the framework's `glob` and `grep` tools or access it from authored code.
7
-
8
- A working sandbox exists by default, with nothing to author. eve selects a framework-provided `defineSandbox({})` source for each local agent; `agent/sandbox.ts` or `agent/sandbox/sandbox.ts` replaces that source. Override it only to add setup, seed files, pick a backend, or lock down the network.
9
-
10
- The default sandbox is not a substitute for configuring network policy, credentials, retention, deletion, or other controls your application requires.
11
-
12
- ## Using the sandbox
13
-
14
- The model already has shell and file access through the default tools:
15
-
16
- | Tool | Does |
17
- | -------------------------- | ----------------------------------- |
18
- | `bash` | run a shell command in the sandbox |
19
- | `read_file` / `write_file` | read/write files under `/workspace` |
20
-
21
- These tools run with `/workspace` as the working directory. The model-facing file tools accept both absolute paths and paths beginning with `$HOME/`; eve resolves the latter inside the sandbox before reading, writing, or searching. Any authored runtime function (a tool, a step, a model callback) can get a live sandbox handle with `ctx.getSandbox()`.
22
-
23
- ```ts title="agent/tools/run_analysis.ts"
24
- import { defineTool } from "eve/tools";
25
- import { z } from "zod";
26
-
27
- export default defineTool({
28
- description: "Run a Python analysis script and return its output.",
29
- inputSchema: z.object({ script: z.string() }),
30
- async execute({ script }, ctx) {
31
- const sandbox = await ctx.getSandbox();
32
- await sandbox.writeTextFile({ path: "analysis/run.py", content: script });
33
- const result = await sandbox.run({ command: "python analysis/run.py" });
34
- if (result.exitCode !== 0) {
35
- throw new Error(
36
- `Analysis failed (exit ${result.exitCode}): ${result.stderr || result.stdout}`,
37
- );
38
- }
39
- return { stdout: result.stdout };
40
- },
41
- });
42
- ```
43
-
44
- `ctx.getSandbox()` takes no arguments, is async, and only works inside authored runtime execution.
45
-
46
- `sandbox.run()` resolves with `{ exitCode, stdout, stderr }` when the process exits, including a nonzero exit. Check `exitCode` before reporting success or using generated files. Throw from a tool to report a failed operation to the model, and throw from `bootstrap` to prevent eve from caching an incomplete setup. The built-in `bash` tool returns all three fields so the model can interpret command results itself.
47
-
48
- `/workspace` is one namespace across every backend, so `/workspace/foo` points at the same file whether the backend is local or Vercel. When you need to interpolate a path into a generated command, `sandbox.resolvePath("repo/build.py")` anchors a relative path to its absolute `/workspace/repo/build.py` form.
49
-
50
- The handle does more than `run` and `writeTextFile`. In every method, relative paths resolve from `/workspace` and absolute paths pass through untouched:
51
-
52
- | Method | Does |
53
- | ---------------------------------------- | ----------------------------------------------------------------------------------------------- |
54
- | `run({ command })` | run one command, block until it exits, return `{ exitCode, stdout, stderr }` |
55
- | `spawn(options)` | launch a long-running process (server, watcher) and return a `SandboxProcess` handle |
56
- | `readTextFile` / `writeTextFile` | read/write a UTF-8 (or specified encoding) file; `readTextFile` supports 1-based line ranges |
57
- | `readBinaryFile` / `writeBinaryFile` | read/write raw bytes (images, archives, anything non-text) |
58
- | `readFile` / `writeFile` | stream a file in/out as bytes |
59
- | `removePath({ path, force, recursive })` | delete one file or directory; `force` ignores missing paths, `recursive` removes non-empty dirs |
60
- | `resolvePath(path)` | anchor a relative path to its absolute `/workspace/...` form |
61
- | `setNetworkPolicy(policy)` | change egress policy mid-turn (backend-dependent; see [Network policy](#network-policy)) |
62
-
63
- Since `run` blocks until the command exits, use `spawn` when the process should keep running while the agent does other work:
64
-
65
- ```ts
66
- const sandbox = await ctx.getSandbox();
67
- const server = await sandbox.spawn({ command: "python -m http.server 8000" });
68
- // ...do other work against the server...
69
- await server.kill();
70
- ```
71
-
72
- A `SandboxProcess` exposes `stdout`/`stderr` byte streams, `wait()` (resolves with the exit code), and `kill()` (idempotent).
73
-
74
- `sandbox.id` is a stable per-session identifier that persists across reconnects to the same logical session. Use it as the cache key for per-session state that must outlive individual step executions.
75
-
76
- The option types (`SandboxSpawnOptions`, `SandboxReadBinaryFileOptions`, `SandboxWriteBinaryFileOptions`, and so on) are named exports from `eve/sandbox`, alongside `SandboxProcess`.
77
-
78
- ## Inbound attachments
79
-
80
- Before the first model step, eve writes byte-backed AI SDK `file` parts under
81
- `/workspace/attachments` and stores a sandbox reference in session history.
82
- For provider calls, images up to 3 MiB and PDFs up to 20 MiB are restored as
83
- bytes; other files become text references to their sandbox paths. Unresolved
84
- remote URLs and legacy AI SDK `image` parts are not staged.
85
-
86
- ## Seeding `/workspace`
87
-
88
- Mount authored files into the sandbox at session start by placing them under `agent/sandbox/workspace/`. This requires the folder layout (`agent/sandbox/sandbox.ts`), not the top-level shorthand:
89
-
90
- ```text
91
- agent/sandbox/
92
- sandbox.ts ← optional override (see below)
93
- workspace/
94
- schema.sql ← lands at /workspace/schema.sql
95
- scripts/run.sh ← lands at /workspace/scripts/run.sh
96
- ```
97
-
98
- Every file under `workspace/` mirrors into the sandbox cwd with its structure intact, and eve lists the top-level entries to the model in the prompt automatically. `agent/skills/` files are materialized separately under `$HOME/.agents/skills/`, so `agent/sandbox/workspace/skills/...` is an ordinary workspace subtree when you choose to author one.
99
-
100
- ## Overriding the sandbox
101
-
102
- To add setup, seed files, or pick a backend, author `defineSandbox`. There are two layouts:
103
-
104
- - `agent/sandbox.ts`: shorthand. Use it when you need only a definition, no seeded files.
105
- - `agent/sandbox/sandbox.ts`: folder layout. Use it when you also seed `agent/sandbox/workspace/**`. If both exist, the folder layout wins.
106
-
107
- ```ts title="agent/sandbox/sandbox.ts"
108
- import { defineSandbox } from "eve/sandbox";
109
- import { vercel } from "eve/sandbox/vercel";
110
-
111
- export default defineSandbox({
112
- backend: vercel({ resources: { vcpus: 2 } }),
113
- revalidationKey: () => "repo-bootstrap-v1",
114
- async bootstrap({ use }) {
115
- const sandbox = await use();
116
- const result = await sandbox.run({ command: "sudo apt-get install -y jq" });
117
- if (result.exitCode !== 0) {
118
- throw new Error(
119
- `Sandbox setup failed (exit ${result.exitCode}): ${result.stderr || result.stdout}`,
120
- );
121
- }
122
- },
123
- async onSession({ use }) {
124
- await use({ networkPolicy: "deny-all" });
125
- },
126
- });
127
- ```
128
-
129
- `defineSandbox` and `defaultBackend` live on `eve/sandbox`. Omit `backend` and the runtime falls back to `defaultBackend()` (see [Backends](#backends)).
130
-
131
- ### Sharing a parent's sandbox
132
-
133
- Sandbox definitions use two distinct forms. Pass an object to give an agent or subagent an independent sandbox. Passing a callback to `defineSandbox` opts a declared subagent into sharing: return `parent.sandbox` to select the dispatching agent's exact live sandbox. A raw function export remains a zero-argument definition factory.
134
-
135
- ```ts title="agent/subagents/reviewer/sandbox.ts"
136
- import { defineSandbox } from "eve/sandbox";
137
-
138
- export default defineSandbox(({ parent }) => {
139
- if (parent === null) throw new Error("reviewer must run as a child");
140
- return parent.sandbox;
141
- });
142
- ```
143
-
144
- The parent and child then see the same files, processes, `/workspace`, and sandbox home. Nested children that also select `parent.sandbox` keep using the same owning sandbox rather than creating another one. The owning sandbox's `bootstrap` and `onSession` hooks remain authoritative; the child cannot add its own sandbox hooks or backend configuration.
145
-
146
- An inheriting child must not declare managed files under its own `sandbox/workspace/` or `skills/` directories, including dynamic skills. Eve rejects that configuration before execution. Remove the child resources when the shared workspace is sufficient, or give the child its own sandbox when it needs independently seeded files or skills.
147
-
148
- The built-in `agent` self-delegation path continues to share the root agent's sandbox automatically.
149
-
150
- ## Backends
151
-
152
- The backend decides where the sandbox runs. eve ships four pinned factories from nested `eve/sandbox/*` imports plus an availability-aware default from `eve/sandbox`:
153
-
154
- | Backend | Runs the sandbox |
155
- | ------------------ | ---------------------------------------------------------------------------------------------- |
156
- | `vercel()` | on [Vercel Sandbox](https://vercel.com/docs/sandbox). |
157
- | `docker()` | locally in a Docker container, driven through the `docker` CLI. |
158
- | `microsandbox()` | locally in a lightweight [microsandbox](https://www.npmjs.com/package/microsandbox) VM. |
159
- | `justbash()` | locally in the pure-JS `just-bash` interpreter (no daemon or VM, but no real binaries either). |
160
- | `defaultBackend()` | picks the best available: Vercel Sandbox on hosted Vercel → Docker → microsandbox → just-bash. |
161
-
162
- Configuring a pinned factory uses that backend unconditionally. `docker()` always requires a reachable Docker daemon, and `vercel()` always creates hosted sandboxes (including from local dev, with Vercel credentials).
163
-
164
- With `backend` omitted, eve uses `defaultBackend()`, which resolves on first use in priority order:
165
-
166
- 1. **Vercel Sandbox** when deploying on Vercel (`process.env.VERCEL` is set), since local container/VM runtimes can't run there.
167
- 2. **Docker** when a daemon is reachable through a Docker-compatible `docker` CLI (Docker Desktop, OrbStack, Colima, Podman via its docker-compatible CLI; override the binary with `EVE_DOCKER_PATH`).
168
- 3. **microsandbox** when the host supports it: macOS on Apple Silicon, or glibc Linux with KVM enabled.
169
- 4. **just-bash** as the dependency-free fallback.
170
-
171
- By default, Docker and microsandbox pull `ghcr.io/vercel/eve` while Vercel Sandbox pulls `vcr.vercel.com/vercel/eve/base`. Each image tag matches the installed eve version without build metadata: a commit tarball version such as `0.56.0+git.4c27b3e37fa36d84` uses image tag `0.56.0`. Set `EVE_SANDBOX_IMAGE_TAG` to replace the version-derived tag for these default images. An explicit `image` passed to `docker()`, `microsandbox()`, or `vercel()` takes precedence. A snapshot `source` on `vercel()` takes precedence over its `image` because Vercel Sandbox treats them as mutually exclusive.
172
-
173
- On every backend, authored commands run as the non-root `vercel-sandbox` user through a non-interactive `bash -lc` login shell. `/workspace` and `$HOME` are writable, `$HOME/.local/bin` is on `PATH` for user-scoped executables, and system paths such as `/usr/local` stay root-owned. Use passwordless `sudo` when setup genuinely needs system-wide changes; `sudo` resets the environment, so pass through variables like `NPM_CONFIG_PREFIX` explicitly if a privileged step depends on them.
174
-
175
- `defaultBackend()` also accepts a keyed bag so each inner backend gets its own typed create options:
176
-
177
- ```ts
178
- import { defaultBackend, defineSandbox } from "eve/sandbox";
179
-
180
- export default defineSandbox({
181
- backend: defaultBackend({
182
- vercel: { networkPolicy: "deny-all", resources: { vcpus: 4 } },
183
- docker: { networkPolicy: "deny-all" },
184
- microsandbox: { memoryMiB: 2048 },
185
- }),
186
- });
187
- ```
188
-
189
- ### Docker
190
-
191
- `docker()` drives the Docker CLI directly. By default, it uses the `ghcr.io/vercel/eve` image tag matching the installed eve version without build metadata. eve creates `/workspace` and verifies Bash during framework setup, before authored bootstrap code runs. Configure it through `docker({ image, env, pullPolicy, networkPolicy })`, and install authored runtime tools in sandbox bootstrap or provide them through a custom image. Templates are committed as local Docker images and reused across sessions when the sandbox source, seed files, `revalidationKey`, and Docker backend options still match. Sessions run as long-lived containers whose filesystems persist `/workspace` changes across turns for the same durable session. `eve dev` prunes stale template images in the background.
192
-
193
- ### microsandbox
194
-
195
- `microsandbox()` runs each sandbox in a lightweight local VM with snapshot-backed templates, a `vercel-sandbox` user, and a firewall capable of domain-level network policies and credential brokering. It is the closest local match to hosted Vercel Sandbox. By default, it uses the `ghcr.io/vercel/eve` image tag matching the installed eve version without build metadata. During framework setup, before authored bootstrap code runs, eve verifies Bash and creates `/workspace` and the sandbox user. Install authored runtime tools in sandbox bootstrap or provide them through a custom image. Supported hosts are macOS on Apple Silicon, or Linux (glibc) with KVM. The `microsandbox` npm package and its VM runtime are not bundled with eve, so `eve dev` installs both automatically when missing (disable with `setup: { autoInstall: false }`); production processes fail with actionable install errors instead.
196
-
197
- ### just-bash
198
-
199
- `justbash()` needs no daemon or VM, but commands run in a simulated bash with a virtual filesystem under `.eve/sandbox-cache/`, with no real binaries (`git`, `node`, package managers) and no network isolation. The `just-bash` package is an optional peer dependency, so `eve dev` installs it into your application automatically when missing (disable with `autoInstall: false`); production processes fail with an actionable install error instead.
200
-
201
- Pass `customCommands` to expose a `just-bash` `CustomCommand` inside each live sandbox session. The command participates in shell pipelines, redirections, and exit-code handling like a built-in command:
202
-
203
- ```ts title="agent/sandbox.ts"
204
- import { defineSandbox } from "eve/sandbox";
205
- import { justbash } from "eve/sandbox/just-bash";
206
- import { decodeBytesToUtf8, defineCommand } from "just-bash";
207
-
208
- const uppercase = defineCommand("uppercase", async (_args, context) => ({
209
- stdout: decodeBytesToUtf8(context.stdin).toUpperCase(),
210
- stderr: "",
211
- exitCode: 0,
212
- }));
213
-
214
- export default defineSandbox({
215
- backend: justbash({ customCommands: [uppercase] }),
216
- });
217
- ```
218
-
219
- Custom commands are registered on live and reopened sessions, not during template prewarming. They run trusted host application code and create an explicit bridge from the sandbox to that code. Adapters can use this extension point to expose application APIs such as a Capable App's CLI; the outer eve `bash` tool does not automatically provide per-command Capable approvals.
220
-
221
- You can also write your own backend. A `SandboxBackend` is an adapter object with a `name`, a `create`, and an optional `prewarm`. It can point at your own container runner, VM pool, internal sandbox service, or another isolation layer, as long as it returns the `SandboxSession` operations eve needs. Handles returned by `create` implement `delete()`, `stop()`, and `shutdown()`. See the `SandboxBackend*` types on `eve/sandbox`.
222
-
223
- ## Lifecycle
224
-
225
- There are two hooks, scoped differently:
226
-
227
- - **`bootstrap({ use })`** is template-scoped and runs once when the template is built. Put reusable setup here that every later session inherits, such as cloning a baseline repo, installing dependencies, or seeding files. Call `use()` to get a `SandboxSession`. Only template filesystem state and supported backend metadata carry into later sessions; config like network policy does not. If external inputs affect what bootstrap produces, set `revalidationKey: () => string` so eve knows when to rebuild the template (authored sandbox source and seed contents are already tracked for you).
228
- - **`onSession({ use, ctx })`** is durable-session-scoped and runs once per session (and again if a sandbox definition change replaces the session's sandbox). Put per-session setup here, including network policy, resources, timeout, per-user credentials, and one-time markers. `ctx` contains only the active session metadata, so it can identify the current principal without exposing runtime lifecycle operations while the sandbox is initializing. Call `use(opts?)` to get a `SandboxSession`; `opts` flow to the backend's update path after create.
229
-
230
- If you require a network policy or other configuration for every session, configure it on the backend factory or in `onSession`; do not rely on bootstrap-only configuration.
231
-
232
- ```ts
233
- import { defineSandbox } from "eve/sandbox";
234
- import { vercel } from "eve/sandbox/vercel";
235
-
236
- export default defineSandbox({
237
- backend: vercel(),
238
- async onSession({ use, ctx }) {
239
- const sandbox = await use({ networkPolicy: "deny-all" });
240
- const user = ctx.session.auth.current;
241
- if (user === null) return;
242
- await sandbox.writeTextFile({ path: "SESSION_USER.txt", content: `${user.principalId}\n` });
243
- },
244
- });
245
- ```
246
-
247
- Sessions are persistent, and how the underlying runtime idles out depends on the backend. On the Vercel backend, the VM times out after a period of inactivity (default 30 minutes); eve preserves the filesystem and resumes the sandbox on the next message while the persisted sandbox remains available. The Docker backend keeps a long-lived container per durable session and persists `/workspace` across turns without that timeout, and the just-bash backend stores its virtual filesystem under `.eve/sandbox-cache/`.
248
-
249
- Authored runtime callbacks can stop compute sooner through the handle returned
250
- by `ctx.getSandbox()`:
251
-
252
- ```ts
253
- const sandbox = await ctx.getSandbox();
254
- await sandbox.stop();
255
- ```
256
-
257
- Every built-in backend uses its native lifecycle operation without deleting the
258
- durable session. Treat the stop as the end of sandbox work in the current
259
- callback. On the next callback, `ctx.getSandbox()` reopens the same Docker
260
- container, microsandbox VM or snapshot, or just-bash filesystem and environment.
261
- Vercel can also automatically resume the same handle on its next I/O operation,
262
- just as it would after an inactivity timeout. No separate reconnect step or
263
- stop-specific state is needed. Lifecycle `use()` calls return the I/O-only
264
- `SandboxSession` because bootstrap and session initialization do not own runtime
265
- teardown.
266
-
267
- ### Delete a sandbox
268
-
269
- Permanently delete the current session sandbox from an authored runtime callback:
270
-
271
- ```ts
272
- const sandbox = await ctx.getSandbox();
273
- await sandbox.delete();
274
- ```
275
-
276
- eve stops compute first, deletes the physical sandbox and its disposable backend state, and clears the saved reconnect state. It preserves reusable template state that contains `bootstrap` and seeded workspace files.
277
-
278
- The durable eve session remains active. The next call to `ctx.getSandbox()` provisions a fresh workspace from the current sandbox definition and runs `onSession` again. Files and other workspace changes from the deleted sandbox are not restored.
279
-
280
- Backend behavior differs:
281
-
282
- - **Vercel Sandbox**: stops the persistent sandbox, deletes its record, and asks Vercel to delete snapshots that no other sandbox uses. Snapshot cleanup runs asynchronously.
283
- - **microsandbox**: stops and removes the session VM and its persisted state snapshot
284
- - **Docker and just-bash**: stop compute and discard their session runtime state
285
-
286
- Only the session that owns a shared sandbox can delete it. Deleting the owner's sandbox affects every parent or child currently using it. If the backend rejects deletion, eve preserves the current reconnect state so you can retry.
287
-
288
- Custom backend handles implement the same boundary in `delete()`: remove the session runtime and disposable persisted state without deleting reusable templates.
289
-
290
- Session sandboxes are keyed per durable session, not per deployment, so redeploying your app does not by itself discard them. A definition change to the authored sandbox source, workspace seed content, or `revalidationKey` replaces the sandbox on the next turn and runs `onSession` again.
291
-
292
- For sandboxes with `bootstrap`, unrelated agent changes preserve the template and session sandbox keys even when there are no skill or workspace seed files. You do not need to add a seed file or `revalidationKey` solely to preserve reuse across those changes.
293
-
294
- Reattachment still depends on the backend retaining its physical sandbox state. If a persisted Vercel sandbox is missing or its saved filesystem snapshot is no longer available, eve deletes the unusable record and creates a replacement from the current template when one is configured. Files and other changes made after the original sandbox was created are not restored automatically. Because the durable session still has the same sandbox key, `onSession` does not run again for this replacement. Persist important artifacts outside the sandbox, and do not rely on `onSession` as the only place that applies security-critical configuration.
295
-
296
- When the eve server stops, no sandbox compute outlives it. `eve dev` stops the sandboxes it started when the dev server closes, and a self-hosted production server stops every open sandbox on shutdown (`SIGTERM`/`SIGINT`). Session state persists across the stop — the next server start reattaches each durable session from its stopped container, VM, or snapshot. Custom `SandboxBackend` adapters implement `stop()` for authored runtime calls and `shutdown()` for server teardown. Both stop the underlying compute while keeping the session reattachable from persisted state where the backend supports it; authored `stop()` failures reject, while process-wide shutdown collects and logs failures without blocking teardown.
297
-
298
- ## Network policy
299
-
300
- Egress rules go on the backend factory or in `onSession`'s `use()`. There are three forms:
301
-
302
- ```ts
303
- networkPolicy: "allow-all"; // default
304
- networkPolicy: "deny-all"; // block all egress, including DNS
305
-
306
- networkPolicy: {
307
- allow: ["ai-gateway.vercel.sh", "*.github.com"],
308
- subnets: { deny: ["10.0.0.0/8"] },
309
- };
310
- ```
311
-
312
- Default egress is `allow-all`. For non-public, sensitive, regulated, or production workloads, configure `deny-all` or an explicit allow-list before running untrusted tools or handling sensitive data.
313
-
314
- Set it on the factory (`vercel({ networkPolicy: "deny-all" })`) and it applies before authored `bootstrap` code runs; framework-owned base setup may briefly keep egress open to install required packages. Set it in `onSession`'s `use()` to override per-session. A provider-loss replacement with the same sandbox key does not rerun `onSession`, so enforce the security-critical baseline on the factory. If `bootstrap` needs network access, give the factory only the destinations it needs, then narrow the policy further in `onSession`. To change the policy mid-turn, call `sandbox.setNetworkPolicy(...)` on the live handle.
315
-
316
- Domain-level allow-lists and credential brokering are supported by `vercel()` and `microsandbox()`. The Docker backend honors only `"allow-all"` and `"deny-all"` (at creation and via `setNetworkPolicy`); the just-bash backend rejects `setNetworkPolicy` entirely.
317
-
318
- ## Credential brokering
319
-
320
- Secrets never enter the sandbox. Instead, the network policy's per-domain `transform` injects credentials at the firewall, so a header can authenticate egress to a host while the secret stays out of the sandbox process entirely:
321
-
322
- ```ts
323
- async onSession({ use }) {
324
- await use({
325
- networkPolicy: {
326
- allow: {
327
- "github.com": [{ transform: [{ headers: { authorization: "Basic your_base64_credentials_here" } }] }],
328
- "*": [],
329
- },
330
- },
331
- });
332
- }
333
- ```
334
-
335
- The `"*": []` catch-all keeps general egress open while the `transform` applies only to `github.com`. For mid-turn brokering, call `setNetworkPolicy` with the same shape. The [Vercel Sandbox docs](https://vercel.com/docs/sandbox) cover the brokering mechanism itself.
336
-
337
- ## What to read next
338
-
339
- - [Subagents](./subagents): each subagent gets its own sandbox, independent of its parent.
340
- - [Tools](./tools): authored tools run in the app runtime (full `process.env`); only sandbox tools run in the sandbox.
341
- - [Security model](./concepts/security-model): the app-runtime/sandbox trust boundary in full.
342
- - [Vercel Sandbox](https://vercel.com/docs/sandbox): platform docs, including credential brokering and persistence limits.