eve 0.82.0 → 0.83.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.
- package/CHANGELOG.md +81 -0
- package/NOTICE +1 -1
- package/dist/src/channel/pending-authorization.d.ts +5 -0
- package/dist/src/channel/pending-authorization.js +1 -1
- package/dist/src/channel/session.d.ts +2 -0
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +5 -0
- package/dist/src/chunks/{use-eve-agent-DTu78IAF.js → use-eve-agent-DnbG9c7c.js} +73 -14
- package/dist/src/chunks/{use-eve-agent-DlznYwQk.js → use-eve-agent-ZY7NQ2VW.js} +73 -14
- package/dist/src/cli/dev/local-server-child.js +1 -1
- package/dist/src/cli/dev/local-server-cleanup.js +1 -1
- package/dist/src/cli/dev/tui/question-panel.d.ts +4 -1
- package/dist/src/cli/dev/tui/question-panel.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +4 -4
- package/dist/src/cli/run.js +1 -1
- package/dist/src/client/eve-agent-store.d.ts +1 -1
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/index.d.ts +1 -0
- package/dist/src/client/message-response.d.ts +18 -0
- package/dist/src/client/message-response.js +1 -1
- package/dist/src/client/session-controls.d.ts +6 -0
- package/dist/src/client/session-controls.js +1 -1
- package/dist/src/client/session.d.ts +4 -0
- package/dist/src/client/session.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +8 -8
- package/dist/src/compiled/@eve/catalog/index.js +1 -1
- package/dist/src/compiled/@workflow/core/events-consumer.d.ts +2 -0
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/private.d.ts +5 -3
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +1 -37
- package/dist/src/compiled/@workflow/core/runtime/event-limit-warning.d.ts +32 -0
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +5 -6
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/runs.d.ts +8 -0
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +16 -0
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +15 -18
- package/dist/src/compiled/@workflow/core/runtime/vm-mode.d.ts +20 -0
- package/dist/src/compiled/@workflow/core/runtime.js +4 -4
- package/dist/src/compiled/@workflow/core/seeded-nanoid.d.ts +2 -0
- package/dist/src/compiled/@workflow/core/serialization/compression.d.ts +14 -3
- package/dist/src/compiled/@workflow/core/serialization.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization.js +1 -1
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +0 -18
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.d.ts +48 -0
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world/env-config.d.ts +24 -0
- package/dist/src/compiled/@workflow/world/events.d.ts +126 -7
- package/dist/src/compiled/@workflow/world/index.d.ts +3 -3
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +59 -8
- package/dist/src/compiled/@workflow/world/queue.d.ts +71 -9
- package/dist/src/compiled/@workflow/world/recovery.d.ts +6 -0
- package/dist/src/compiled/@workflow/world/test-support/duplicate-event-fixtures.d.ts +3 -0
- package/dist/src/compiled/@workflow/world/test-support/in-band-fence-conformance.d.ts +46 -0
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +18 -18
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-BW-kbMMn.js → attribute-changes-7se_SE2q.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/dist-CcnNPAp4.js +1 -0
- package/dist/src/compiled/_chunks/workflow/dist-S9cZRway.js +3 -0
- package/dist/src/compiled/_chunks/workflow/helpers-CxNRXH0a.js +1 -0
- package/dist/src/compiled/_chunks/workflow/private-DLYTSBbu.js +1 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-CPiIfe8r.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{run-DzdAqdb1.js → run-BJSLCXR4.js} +6 -6
- package/dist/src/compiled/_chunks/workflow/serialization-B9gneT9Z.js +15 -0
- package/dist/src/compiled/_chunks/workflow/sleep-BL0oQs3R.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{wait-until-xbRRDuUf.js → wait-until-BPou0RGO.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/workflow-routes-BaljomCk.js +1 -0
- package/dist/src/compiled/{@ai-sdk/code-mode → run}/LICENSE +1 -1
- package/dist/src/compiled/run/index.d.ts +384 -0
- package/dist/src/compiled/run/index.js +650 -0
- package/dist/src/compiler/extension-compatibility.d.ts +21 -14
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-sandbox.js +1 -1
- package/dist/src/compiler/workspace-resources.js +1 -1
- package/dist/src/context/build-callback-context.js +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-skill-lifecycle.d.ts +2 -2
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/prewarm.d.ts +27 -0
- package/dist/src/context/prewarm.js +1 -0
- package/dist/src/context/providers/sandbox.d.ts +7 -0
- package/dist/src/context/providers/sandbox.js +1 -1
- package/dist/src/context/run-step.js +1 -1
- package/dist/src/discover/extension-specifier.d.ts +1 -0
- package/dist/src/discover/extension-specifier.js +1 -1
- package/dist/src/discover/lib.d.ts +4 -3
- package/dist/src/discover/lib.js +1 -1
- package/dist/src/discover/named-source-directory.d.ts +3 -2
- package/dist/src/evals/cli/eval.d.ts +2 -0
- package/dist/src/evals/cli/eval.js +2 -2
- package/dist/src/evals/define-eval-config.d.ts +5 -4
- package/dist/src/evals/define-eval-config.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/runner/artifacts.js +2 -2
- package/dist/src/evals/runner/attempt-label.d.ts +2 -0
- package/dist/src/evals/runner/attempt-label.js +1 -0
- package/dist/src/evals/runner/derive-run-facts.d.ts +12 -0
- package/dist/src/evals/runner/derive-run-facts.js +1 -1
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/runner/reporters/braintrust.js +1 -1
- package/dist/src/evals/runner/reporters/console.js +1 -1
- package/dist/src/evals/runner/reporters/datadog.js +1 -1
- package/dist/src/evals/runner/reporters/junit.js +2 -2
- package/dist/src/evals/runner/reporters/types.d.ts +2 -0
- package/dist/src/evals/runner/run-evals.d.ts +5 -0
- package/dist/src/evals/runner/run-evals.js +1 -1
- package/dist/src/evals/session-manager.js +1 -1
- package/dist/src/evals/session.d.ts +4 -1
- package/dist/src/evals/session.js +2 -2
- package/dist/src/evals/types.d.ts +39 -2
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.d.ts +0 -1
- package/dist/src/eve-channel/request.js +2 -2
- package/dist/src/execution/agent-sessions/context.d.ts +1 -1
- package/dist/src/execution/agent-sessions/context.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +3 -0
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/dynamic-workflow/program-step.d.ts +7 -7
- package/dist/src/execution/dynamic-workflow/program-step.js +1 -1
- package/dist/src/execution/dynamic-workflow/schema.d.ts +18 -11
- package/dist/src/execution/dynamic-workflow/schema.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/dynamic-workflow/workflow.js +1 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +3 -1
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/invoke-tool.js +1 -1
- package/dist/src/execution/sandbox/abort-bound-session.js +1 -1
- package/dist/src/execution/sandbox/active-connections.d.ts +28 -0
- package/dist/src/execution/sandbox/active-connections.js +1 -0
- package/dist/src/execution/sandbox/bindings/docker-cli.d.ts +10 -2
- package/dist/src/execution/sandbox/bindings/docker-cli.js +2 -2
- package/dist/src/execution/sandbox/bindings/docker-connection.d.ts +15 -0
- package/dist/src/execution/sandbox/bindings/docker-connection.js +2 -0
- package/dist/src/execution/sandbox/bindings/docker-container.d.ts +2 -0
- package/dist/src/execution/sandbox/bindings/docker-container.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-network.d.ts +5 -0
- package/dist/src/execution/sandbox/bindings/docker-network.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-templates.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker.d.ts +12 -15
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +19 -29
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash.d.ts +2 -4
- package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
- package/dist/src/execution/sandbox/bindings/local-provider-utils.d.ts +0 -20
- package/dist/src/execution/sandbox/bindings/local-provider-utils.js +1 -1
- package/dist/src/execution/sandbox/bindings/local.d.ts +4 -6
- package/dist/src/execution/sandbox/bindings/local.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-base-runtime.d.ts +2 -0
- package/dist/src/execution/sandbox/bindings/vercel-base-runtime.js +2 -2
- package/dist/src/execution/sandbox/bindings/vercel-errors.js +2 -2
- package/dist/src/execution/sandbox/bindings/vercel-lifecycle.d.ts +7 -5
- package/dist/src/execution/sandbox/bindings/vercel-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +5 -11
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -2
- package/dist/src/execution/sandbox/development-cleanup.d.ts +0 -1
- package/dist/src/execution/sandbox/development-cleanup.js +1 -1
- package/dist/src/execution/sandbox/development-lazy-prewarm.js +1 -1
- package/dist/src/execution/sandbox/development-run.d.ts +0 -2
- package/dist/src/execution/sandbox/development-run.js +1 -1
- package/dist/src/execution/sandbox/dockerfile.d.ts +0 -4
- package/dist/src/execution/sandbox/dockerfile.js +1 -1
- package/dist/src/execution/sandbox/ensure.d.ts +31 -11
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/glob-tool.js +3 -3
- package/dist/src/execution/sandbox/grep-tool.js +1 -1
- package/dist/src/execution/sandbox/logging-session.js +1 -1
- package/dist/src/execution/sandbox/prewarm.d.ts +23 -3
- package/dist/src/execution/sandbox/prewarm.js +2 -1
- package/dist/src/execution/sandbox/read-file.js +1 -1
- package/dist/src/execution/sandbox/require-sandbox.d.ts +3 -2
- package/dist/src/execution/sandbox/require-sandbox.js +1 -1
- package/dist/src/execution/sandbox/ripgrep-probe.js +1 -1
- package/dist/src/execution/sandbox/session.d.ts +10 -20
- package/dist/src/execution/sandbox/session.js +2 -2
- package/dist/src/execution/session/admission.js +1 -1
- package/dist/src/execution/session/checkpoint-migrations.js +1 -1
- package/dist/src/execution/session/entry-input.d.ts +5 -4
- package/dist/src/execution/session/entry.js +1 -1
- package/dist/src/execution/session/handoff-state.d.ts +5 -0
- package/dist/src/execution/session/handoff-state.js +1 -0
- package/dist/src/execution/session/handoff-steps.d.ts +1 -5
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +2 -1
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/handover-tracing.d.ts +3 -0
- package/dist/src/execution/session/handover-tracing.js +1 -0
- package/dist/src/execution/session/input-queue.d.ts +3 -0
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.d.ts +3 -0
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/prewarm-step.d.ts +13 -0
- package/dist/src/execution/session/prewarm-step.js +1 -0
- package/dist/src/execution/session/program.d.ts +4 -1
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/state-cursor.d.ts +11 -0
- package/dist/src/execution/session/state-cursor.js +1 -1
- package/dist/src/execution/session/timeout-control.d.ts +4 -0
- package/dist/src/execution/session/timeout-control.js +1 -1
- package/dist/src/execution/session/turn-control.d.ts +5 -2
- package/dist/src/execution/session/turn-control.js +1 -1
- package/dist/src/execution/session/turn-step-types.d.ts +2 -0
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn.d.ts +1 -0
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session-inbox/inbox.d.ts +17 -1
- package/dist/src/execution/session-inbox/inbox.js +1 -1
- package/dist/src/execution/session-inbox/protocol.d.ts +2 -1
- package/dist/src/execution/session-inbox/protocol.js +1 -1
- package/dist/src/execution/session-inbox/resume.d.ts +2 -1
- package/dist/src/execution/session-inbox/resume.js +1 -1
- package/dist/src/execution/session-prewarm.d.ts +8 -0
- package/dist/src/execution/session-prewarm.js +1 -0
- package/dist/src/execution/skills/instructions.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/step-context.d.ts +11 -0
- package/dist/src/execution/tools/workflow/step-execution.js +1 -1
- package/dist/src/execution/tools/workflow/step.js +1 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/extensions/git/extension/lib/github-shell-schema.js +1 -1
- package/dist/src/framework/sources/modules/sandbox.d.ts +1 -1
- package/dist/src/harness/attachment-staging.d.ts +3 -7
- package/dist/src/harness/attachment-staging.js +1 -1
- package/dist/src/harness/hitl/index.d.ts +2 -1
- package/dist/src/harness/hitl/index.js +1 -1
- package/dist/src/harness/hitl/view.d.ts +1 -0
- package/dist/src/harness/hitl/view.js +1 -0
- package/dist/src/harness/model-call/run.js +1 -1
- package/dist/src/harness/semantic-errors/rules/sandbox.d.ts +3 -5
- package/dist/src/harness/semantic-errors/rules/sandbox.js +1 -1
- package/dist/src/harness/step/prompt.js +1 -1
- package/dist/src/harness/tool-history-repair.d.ts +9 -0
- package/dist/src/harness/tool-history-repair.js +1 -0
- package/dist/src/harness/tool-model-output.d.ts +19 -3
- package/dist/src/harness/tool-model-output.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.js +8 -4
- package/dist/src/internal/application/optional-package-import.d.ts +10 -0
- package/dist/src/internal/application/optional-package-import.js +1 -1
- package/dist/src/internal/application/stamped-package-version.js +1 -1
- package/dist/src/internal/attachments/limited-read.d.ts +2 -2
- package/dist/src/internal/authored-module-build-options.d.ts +6 -0
- package/dist/src/internal/authored-module-build-options.js +1 -1
- package/dist/src/internal/authored-module-cache.d.ts +10 -0
- package/dist/src/internal/authored-module-cache.js +1 -0
- package/dist/src/internal/authored-module-graph.js +1 -1
- package/dist/src/internal/authored-module-loader.js +1 -1
- package/dist/src/internal/authored-relative-extension-resolver.js +1 -1
- package/dist/src/internal/bundler/nitro-rolldown.d.ts +3 -1
- package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
- package/dist/src/internal/bundler/pseudo-packages.d.ts +11 -0
- package/dist/src/internal/bundler/pseudo-packages.js +1 -0
- package/dist/src/internal/nitro/host/build-extension.d.ts +6 -0
- package/dist/src/internal/nitro/host/build-extension.js +2 -2
- package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.d.ts +3 -1
- package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.js +3 -5
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts +2 -3
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +2 -0
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
- package/dist/src/internal/nitro/host/dev-build-host.d.ts +83 -0
- package/dist/src/internal/nitro/host/dev-build-host.js +1 -0
- package/dist/src/internal/nitro/host/dev-build-operations.d.ts +6 -0
- package/dist/src/internal/nitro/host/dev-build-operations.js +1 -0
- package/dist/src/internal/nitro/host/dev-build-process.d.ts +1 -0
- package/dist/src/internal/nitro/host/dev-build-process.js +1 -0
- package/dist/src/internal/nitro/host/development-runtime-prune-plugin.d.ts +4 -1
- package/dist/src/internal/nitro/host/development-runtime-prune-plugin.js +3 -2
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.d.ts +13 -0
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.js +1 -1
- package/dist/src/internal/nitro/host/optional-engine-dependency-plugin.js +1 -1
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts +3 -0
- package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
- package/dist/src/internal/nitro/host/sandbox-shutdown-plugin.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/nitro/host/start-production-server.js +3 -3
- package/dist/src/internal/nitro/host/workflow-sandbox-runtime-plugin.js +1 -1
- package/dist/src/internal/nitro/host.js +1 -1
- package/dist/src/internal/workflow/local-world-delivery-auth.d.ts +17 -0
- package/dist/src/internal/workflow/local-world-delivery-auth.js +1 -0
- package/dist/src/internal/workflow/queue-namespace.d.ts +2 -0
- package/dist/src/internal/workflow/queue-namespace.js +1 -1
- package/dist/src/internal/workflow-bundle/builder-support.d.ts +0 -1
- package/dist/src/internal/workflow-bundle/builder-support.js +2 -2
- package/dist/src/internal/workflow-bundle/builder.js +2 -2
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
- package/dist/src/internal/workflow-bundle/vercel-workflow-output.d.ts +1 -1
- package/dist/src/internal/workflow-bundle/vercel-workflow-output.js +1 -1
- package/dist/src/protocol/prewarm-session.d.ts +14 -0
- package/dist/src/protocol/prewarm-session.js +1 -0
- package/dist/src/protocol/routes.d.ts +2 -2
- package/dist/src/public/channels/discord/authorization.d.ts +45 -0
- package/dist/src/public/channels/discord/authorization.js +3 -0
- package/dist/src/public/channels/discord/defaults.d.ts +14 -3
- package/dist/src/public/channels/discord/defaults.js +2 -2
- package/dist/src/public/channels/discord/discordChannel.d.ts +15 -1
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/discord/gateway/connection.d.ts +26 -0
- package/dist/src/public/channels/discord/gateway/connection.js +1 -0
- package/dist/src/public/channels/discord/gateway/forwarder.d.ts +14 -0
- package/dist/src/public/channels/discord/gateway/forwarder.js +1 -0
- package/dist/src/public/channels/discord/gateway/index.d.ts +59 -0
- package/dist/src/public/channels/discord/gateway/index.js +1 -0
- package/dist/src/public/channels/discord/inbound.d.ts +10 -3
- package/dist/src/public/channels/discord/inbound.js +2 -2
- package/dist/src/public/channels/discord/index.d.ts +3 -2
- package/dist/src/public/channels/discord/index.js +1 -1
- package/dist/src/public/channels/discord/messages.d.ts +116 -0
- package/dist/src/public/channels/discord/messages.js +2 -0
- package/dist/src/public/channels/github/checkout.js +1 -1
- package/dist/src/public/channels/linq/linqChannel.d.ts +4 -1
- package/dist/src/public/channels/linq/linqChannel.js +1 -1
- package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
- package/dist/src/public/channels/same-environment-oidc.d.ts +7 -0
- package/dist/src/public/channels/same-environment-oidc.js +1 -0
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/sandbox.d.ts +1 -1
- package/dist/src/public/next/server.js +1 -1
- package/dist/src/public/sandbox/docker-sandbox.d.ts +6 -1
- package/dist/src/public/sandbox/docker.d.ts +1 -8
- package/dist/src/public/sandbox/index.d.ts +3 -3
- package/dist/src/public/sandbox/just-bash-sandbox.d.ts +87 -7
- package/dist/src/public/sandbox/just-bash.d.ts +1 -1
- package/dist/src/public/sandbox/provider.d.ts +5 -1
- package/dist/src/public/sandbox/provider.js +1 -1
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +16 -9
- package/dist/src/public/sandbox/vercel.d.ts +0 -1
- package/dist/src/public/sandbox/vercel.js +1 -1
- package/dist/src/public/tools/agent.d.ts +8 -1
- package/dist/src/public/tools/agent.js +1 -1
- package/dist/src/react/use-eve-agent.d.ts +1 -1
- package/dist/src/runtime/agent/resolve-model.js +1 -1
- package/dist/src/runtime/connections/openapi-client.d.ts +2 -0
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-channel.js +1 -1
- package/dist/src/runtime/resolve-sandbox.js +1 -1
- package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -1
- package/dist/src/runtime/sandbox/registry.d.ts +2 -0
- package/dist/src/runtime/sandbox/registry.js +1 -1
- package/dist/src/runtime/subagents/workflow.d.ts +6 -0
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/runtime/workspace/seed-files.d.ts +9 -12
- package/dist/src/runtime/workspace/seed-files.js +1 -1
- package/dist/src/runtime/workspace/spec.d.ts +1 -1
- package/dist/src/runtime/workspace/spec.js +1 -1
- package/dist/src/runtime/workspace/types.d.ts +2 -6
- package/dist/src/sandbox/provider.d.ts +185 -0
- package/dist/src/sandbox/provider.js +1 -0
- package/dist/src/sandbox/providers/default.d.ts +20 -19
- package/dist/src/sandbox/providers/default.js +1 -1
- package/dist/src/sandbox/providers/docker.d.ts +5 -2
- package/dist/src/sandbox/providers/docker.js +1 -1
- package/dist/src/sandbox/providers/just-bash.d.ts +4 -3
- package/dist/src/sandbox/providers/just-bash.js +1 -1
- package/dist/src/sandbox/providers/vercel.d.ts +4 -10
- package/dist/src/sandbox/providers/vercel.js +1 -1
- package/dist/src/sandbox/providers.d.ts +0 -1
- package/dist/src/sandbox/providers.js +1 -1
- package/dist/src/sandbox/state.d.ts +61 -0
- package/dist/src/sandbox/state.js +1 -1
- package/dist/src/self-modification/deployed-sandbox.d.ts +4 -9
- package/dist/src/self-modification/deployed-sandbox.js +1 -1
- package/dist/src/self-modification/filesystem.d.ts +3 -3
- package/dist/src/self-modification/remote/config.d.ts +2 -2
- package/dist/src/self-modification/remote/config.js +1 -1
- package/dist/src/self-modification/setup.d.ts +0 -1
- package/dist/src/self-modification/setup.js +8 -8
- package/dist/src/setup/integrations/discord/api.d.ts +7 -0
- package/dist/src/setup/integrations/discord/api.js +1 -1
- package/dist/src/setup/integrations/discord/daemon.d.ts +18 -0
- package/dist/src/setup/integrations/discord/daemon.js +21 -0
- package/dist/src/setup/integrations/discord/setup.d.ts +24 -4
- package/dist/src/setup/integrations/discord/setup.js +5 -4
- package/dist/src/setup/integrations/self-modification/setup.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/update/web-options.js +1 -1
- package/dist/src/setup/scaffold/version-tokens.d.ts +0 -1
- package/dist/src/setup/scaffold/version-tokens.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +2 -0
- package/dist/src/shared/built-server-start-failure.d.ts +12 -0
- package/dist/src/shared/built-server-start-failure.js +3 -0
- package/dist/src/shared/framework-eve-server.d.ts +2 -0
- package/dist/src/shared/framework-eve-server.js +2 -2
- package/dist/src/shared/sandbox-environment.d.ts +4 -10
- package/dist/src/shared/sandbox-environment.js +1 -1
- package/dist/src/shared/sandbox-network-policy.d.ts +45 -9
- package/dist/src/shared/sandbox-provider.d.ts +0 -103
- package/dist/src/shared/sandbox-provider.js +1 -1
- package/dist/src/shared/sandbox-recorded-data-error.d.ts +4 -0
- package/dist/src/shared/sandbox-recorded-data-error.js +1 -0
- package/dist/src/shared/sandbox-session-gone-error.d.ts +12 -0
- package/dist/src/shared/sandbox-session-gone-error.js +1 -0
- package/dist/src/shared/sandbox-session.d.ts +97 -83
- package/dist/src/shared/sandbox-template-error.d.ts +19 -4
- package/dist/src/shared/sandbox-template-error.js +1 -1
- package/dist/src/shared/sandbox-tool-session-error.d.ts +4 -0
- package/dist/src/shared/sandbox-tool-session-error.js +1 -0
- package/dist/src/shared/skill-package.js +1 -1
- package/dist/src/shared/skill-paths.d.ts +4 -5
- package/dist/src/shared/skill-paths.js +2 -2
- package/dist/src/shared/workflow-sandbox.d.ts +4 -41
- package/dist/src/shared/workflow-sandbox.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.d.ts +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/definition.js +1 -1
- package/dist/src/tools/durable-callbacks.d.ts +5 -1
- package/dist/src/tools/durable-callbacks.js +1 -1
- package/dist/src/tools/dynamic.d.ts +3 -3
- package/dist/src/tools/model-output.d.ts +23 -5
- package/dist/src/tools/model-output.js +1 -1
- package/dist/src/tools/provided/ask-question-workflow.js +1 -1
- package/dist/src/tools/provided/glob.js +1 -1
- package/dist/src/tools/provided/grep.js +1 -1
- package/dist/src/tools/provided/read-file.js +1 -1
- package/dist/src/tools/provided/sleep-workflow.js +1 -1
- package/dist/src/tools/provided/workflow.js +1 -1
- package/dist/src/tools/provided/write-file.js +1 -1
- package/dist/src/tools/workflow-definition.d.ts +19 -4
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.d.ts +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/channels/custom.mdx +3 -3
- package/docs/channels/discord.mdx +279 -7
- package/docs/channels/eve.mdx +13 -2
- package/docs/channels/linq.mdx +2 -2
- package/docs/channels/mcp.mdx +2 -2
- package/docs/channels/overview.mdx +1 -1
- package/docs/channels/photon.mdx +1 -1
- package/docs/concepts/built-in-tools.md +31 -8
- package/docs/concepts/execution-model-and-durability.mdx +6 -101
- package/docs/concepts/security-model.md +2 -0
- package/docs/concepts/sessions-runs-and-streaming.md +44 -36
- package/docs/connections/openapi.mdx +2 -0
- package/docs/evals/overview.mdx +1 -1
- package/docs/evals/reporters.mdx +5 -5
- package/docs/evals/running.mdx +19 -1
- package/docs/guides/client/messages.mdx +1 -1
- package/docs/guides/deployment/overview.md +4 -4
- package/docs/guides/deployment/self-hosting.md +50 -1
- package/docs/guides/dev-tui.md +1 -1
- package/docs/guides/dynamic-capabilities.md +2 -2
- package/docs/guides/frontend/overview.mdx +34 -10
- package/docs/guides/instrumentation/agent-runs.mdx +16 -0
- package/docs/guides/instrumentation/otel.mdx +23 -0
- package/docs/guides/self-modification.md +1 -1
- package/docs/guides/session-context.md +1 -1
- package/docs/instructions.mdx +1 -1
- package/docs/meta.json +1 -0
- package/docs/reference/agent-files.md +4 -4
- package/docs/reference/cli.md +24 -17
- package/docs/reference/typescript-api.md +9 -3
- package/docs/sandbox/custom-providers.mdx +254 -0
- package/docs/sandbox/default.mdx +71 -4
- package/docs/sandbox/docker.mdx +15 -3
- package/docs/sandbox/index.mdx +32 -106
- package/docs/sandbox/just-bash.mdx +54 -0
- package/docs/sandbox/meta.json +9 -1
- package/docs/sandbox/troubleshooting.mdx +215 -0
- package/docs/sandbox/vercel.mdx +48 -7
- package/docs/skills.mdx +1 -1
- package/docs/subagents/index.mdx +2 -2
- package/docs/tools/overview.mdx +20 -1
- package/docs/tools/workflows.mdx +73 -5
- package/docs/tutorial/run-analysis.mdx +2 -2
- package/docs/use-cases.mdx +250 -0
- package/package.json +14 -20
- package/dist/src/compiled/@ai-sdk/code-mode/_run.d.ts +0 -1
- package/dist/src/compiled/@ai-sdk/code-mode/index.d.ts +0 -325
- package/dist/src/compiled/@ai-sdk/code-mode/index.js +0 -660
- package/dist/src/compiled/_chunks/workflow/dist-CyBgVS7g.js +0 -1
- package/dist/src/compiled/_chunks/workflow/dist-T5NnW-0k.js +0 -3
- package/dist/src/compiled/_chunks/workflow/helpers-DlLD3ov_.js +0 -1
- package/dist/src/compiled/_chunks/workflow/private-tQUuwBoQ.js +0 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-DMsV_b4n.js +0 -1
- package/dist/src/compiled/_chunks/workflow/serialization-DPdYS_w2.js +0 -16
- package/dist/src/compiled/_chunks/workflow/sleep-BY6leHh8.js +0 -1
- package/dist/src/compiled/_chunks/workflow/workflow-routes-CwqB063q.js +0 -1
- package/dist/src/execution/sandbox/active-handles.d.ts +0 -32
- package/dist/src/execution/sandbox/active-handles.js +0 -1
- package/dist/src/execution/sandbox/bindings/docker-session.d.ts +0 -6
- package/dist/src/execution/sandbox/bindings/docker-session.js +0 -2
- package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +0 -15
- package/dist/src/execution/sandbox/bindings/immutable-resources.js +0 -2
- package/dist/src/execution/sandbox/bindings/microsandbox-create.d.ts +0 -12
- package/dist/src/execution/sandbox/bindings/microsandbox-create.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +0 -42
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-metadata.d.ts +0 -29
- package/dist/src/execution/sandbox/bindings/microsandbox-metadata.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-network.d.ts +0 -18
- package/dist/src/execution/sandbox/bindings/microsandbox-network.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +0 -37
- package/dist/src/execution/sandbox/bindings/microsandbox-options.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-platform.d.ts +0 -21
- package/dist/src/execution/sandbox/bindings/microsandbox-platform.js +0 -21
- package/dist/src/execution/sandbox/bindings/microsandbox-process.d.ts +0 -3
- package/dist/src/execution/sandbox/bindings/microsandbox-process.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-provider-state.d.ts +0 -11
- package/dist/src/execution/sandbox/bindings/microsandbox-provider-state.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +0 -82
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.d.ts +0 -12
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox.d.ts +0 -16
- package/dist/src/execution/sandbox/bindings/microsandbox.js +0 -1
- package/dist/src/execution/sandbox/provider-host-development.d.ts +0 -2
- package/dist/src/execution/sandbox/provider-host-development.js +0 -1
- package/dist/src/execution/sandbox/provider-host.d.ts +0 -2
- package/dist/src/execution/sandbox/provider-host.js +0 -1
- package/dist/src/execution/tool-session/sandbox.d.ts +0 -22
- package/dist/src/execution/tool-session/sandbox.js +0 -1
- package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +0 -48
- package/dist/src/public/sandbox/microsandbox-sandbox.js +0 -1
- package/dist/src/public/sandbox/microsandbox.d.ts +0 -9
- package/dist/src/public/sandbox/microsandbox.js +0 -1
- package/dist/src/sandbox/providers/microsandbox.d.ts +0 -12
- package/dist/src/sandbox/providers/microsandbox.js +0 -1
- package/docs/sandbox/microsandbox.mdx +0 -31
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Sandbox Troubleshooting"
|
|
3
|
+
description: "Causes and fixes for common eve sandbox errors in the sandbox file, after a build, when a session resumes, and during eve dev."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Sections whose heading is in code format start with the beginning of an error message, so you can search this page for the text you see. Most sandbox errors come from one of three mismatches: the sandbox file does not match what eve expects, the build output does not match the runtime, or a session's recorded sandbox does not match the current agent.
|
|
7
|
+
|
|
8
|
+
## Errors in the sandbox file
|
|
9
|
+
|
|
10
|
+
### `must export an environment`
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
Sandbox "sandbox.ts" must export an environment.
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
eve compiles the sandbox file during `eve build` and `eve dev`, and it needs the environment as a named `environment` export so it can prepare it before any session exists. Export the environment that the selector opens:
|
|
17
|
+
|
|
18
|
+
```ts title="agent/sandbox.ts"
|
|
19
|
+
import { DefaultSandbox, defineSandbox } from "eve/sandbox";
|
|
20
|
+
|
|
21
|
+
export const environment = DefaultSandbox.environment();
|
|
22
|
+
export default defineSandbox(() => environment.open());
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### `opened an environment other than the one it exports`
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
Sandbox "sandbox.ts" opened an environment other than the one it exports as `environment`.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The selector called `open()` on a different environment object than the exported `environment`. This happens when the selector creates an environment inline, such as `DefaultSandbox.environment().open()`, or imports another sandbox file's environment. Create the environment once at module scope, export it, and call `environment.open()` on that export.
|
|
32
|
+
|
|
33
|
+
### `can open only one sandbox`
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
A sandbox definition can open only one sandbox.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The selector called `environment.open()` more than once. Call `environment.open()` once in the `defineSandbox()` selector and return that sandbox.
|
|
40
|
+
|
|
41
|
+
### `can only open sandboxes inside defineSandbox()`
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
Sandbox environments can only open sandboxes inside defineSandbox().
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Code outside the `defineSandbox()` selector called `environment.open()`, for example a tool or a module's top level. Only the selector opens the sandbox. From tools and other runtime code, use `ctx.getSandbox()` to reach the session's sandbox, or `ctx.getSandbox(environment)` to keep the provider-specific session type.
|
|
48
|
+
|
|
49
|
+
### `selects parent.sandbox but agent node ... has no parent`
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
Sandbox "sandbox.ts" selects parent.sandbox but agent node "..." has no parent.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The sandbox file uses `defineParentSandbox()`, but the agent is not a declared subagent, so it has no parent sandbox to share. eve reports this when it loads the agent graph. Only a declared subagent can [share its parent's sandbox](/docs/sandbox#share-a-parent-sandbox). Give this agent its own sandbox file with `defineSandbox()` and an exported environment.
|
|
56
|
+
|
|
57
|
+
## Errors after a build or deploy
|
|
58
|
+
|
|
59
|
+
Production never prepares sandbox environments. `eve build` prepares them and records one artifact for each agent sandbox, such as a Docker image, a Vercel snapshot, or a just-bash template, and the runtime only uses those recorded artifacts.
|
|
60
|
+
|
|
61
|
+
### `No prepared ... sandbox environment is recorded`
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
No prepared "docker" sandbox environment is recorded for agent node "...".
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The deployed build output has no prepared artifact for this agent. This usually means the output came from `eve build --skip-sandbox-prewarm`, which [the CLI reference](/docs/reference/cli) marks as not deployable. Run `eve build` without that flag and deploy its output together with the runtime.
|
|
68
|
+
|
|
69
|
+
### `The prepared sandbox artifact ... was created with provider`
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
The prepared sandbox artifact for agent node "..." was created with provider "vercel", but this process selects provider "docker".
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The sandbox file selected one provider when eve prepared the sandbox and a different one in the process that uses it. This happens when the sandbox file chooses a provider by reading the host, for example with `process.env.VERCEL ? VercelSandbox.environment() : DockerSandbox.environment()`, and the build and runtime hosts differ. `DefaultSandbox.environment()` does not cause this, because it [records its choice when it prepares the sandbox](/docs/sandbox/default#the-build-records-the-choice). Select one provider explicitly, or use `DefaultSandbox.environment()`, then rebuild with `eve build`, or restart `eve dev` locally.
|
|
76
|
+
|
|
77
|
+
### `DefaultSandbox has no sandbox provider for this build`
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
DefaultSandbox has no sandbox provider for this build: it did not run on Vercel, no Docker daemon was reachable, and production builds do not fall back to just-bash.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The production `eve build` ran outside Vercel without a reachable Docker daemon, so `DefaultSandbox` recorded no provider, and the first session that opens the sandbox fails. A `RUN eve build` step in a Dockerfile usually has no Docker daemon, even when the running container later mounts `/var/run/docker.sock`. Start Docker and run `eve build` again, deploy to Vercel, or select a provider explicitly in the sandbox file, for example `DockerSandbox.environment()` from `eve/sandbox/docker`. See [How eve selects the provider](/docs/sandbox/default#how-eve-selects-the-provider).
|
|
84
|
+
|
|
85
|
+
### `Sandbox template ... is not available to this runtime`
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
Sandbox template "..." for provider "docker" is not available to this runtime.
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The build recorded an artifact, but the provider can no longer use its template. When the provider knows the cause, the message includes it:
|
|
92
|
+
|
|
93
|
+
| Provider | Common cause |
|
|
94
|
+
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
95
|
+
| Docker | The Docker daemon has no image with that name: it was removed, for example by `docker image prune -a`, or the build used another Docker daemon. |
|
|
96
|
+
| Vercel | The Vercel Sandbox snapshot expired or was deleted. |
|
|
97
|
+
| just-bash | The template directory under `.eve/sandbox-cache/` was deleted, or the build ran on another machine. |
|
|
98
|
+
| Custom | The image, snapshot, or template that the artifact names no longer exists, so the provider threw `SandboxTemplateNotProvisionedError`. |
|
|
99
|
+
|
|
100
|
+
The runtime never recreates a template. Run `eve build` again and deploy its output.
|
|
101
|
+
|
|
102
|
+
### `Invalid prepared ... artifact`
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
Invalid prepared Docker sandbox artifact.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The recorded artifact does not match the format that this eve version expects, usually because the build used a different eve version than the runtime. Run `eve build` with the same eve version that the runtime uses, then redeploy.
|
|
109
|
+
|
|
110
|
+
## Errors when a session resumes
|
|
111
|
+
|
|
112
|
+
A session records which provider created its sandbox, and later turns resume that sandbox directly without running the selector again.
|
|
113
|
+
|
|
114
|
+
### `This session's sandbox was created by provider`
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
This session's sandbox was created by provider "just-bash", but the agent now selects provider "docker".
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
eve logs this warning when a session resumes on a build whose sandbox file selects a different provider than the one that created the session's sandbox, for example after you change providers or `DefaultSandbox` records a different choice in a new build. eve cannot move a sandbox between providers, so the session continues in a fresh sandbox from the current provider, without the old sandbox's files. eve does not delete the old sandbox. Remove it with the old provider's tooling, for example `docker rm` for a Docker container. To keep the session's files instead, restore the previous provider before the session resumes.
|
|
121
|
+
|
|
122
|
+
### `DefaultSandbox selected just-bash, which always allows network access`
|
|
123
|
+
|
|
124
|
+
```text
|
|
125
|
+
DefaultSandbox selected just-bash, which always allows network access and accepts only the "allow-all" network policy.
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The sandbox passed a `networkPolicy` other than `"allow-all"` to `open()`, or called `setNetworkPolicy()`, while `DefaultSandbox` uses just-bash during `eve dev` or `eve eval` because Docker is not reachable. just-bash cannot restrict network access. Start Docker and restart `eve dev` so `DefaultSandbox` selects Docker, or select `VercelSandbox.environment()` or `DockerSandbox.environment()` explicitly.
|
|
129
|
+
|
|
130
|
+
### `Invalid ... session state`
|
|
131
|
+
|
|
132
|
+
```text
|
|
133
|
+
Invalid Docker sandbox session state.
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The session's recorded sandbox state does not match the format that this eve version expects, usually because the session started under a different eve version. Start a new session to get a fresh sandbox.
|
|
137
|
+
|
|
138
|
+
## Errors during eve dev
|
|
139
|
+
|
|
140
|
+
During `eve dev`, the first sandbox access prepares every sandbox environment in the current build. See [Prepare a reusable environment](/docs/sandbox#prepare-a-reusable-environment).
|
|
141
|
+
|
|
142
|
+
### `Timed out after 10 minutes waiting for another request or eve dev worker`
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
Timed out after 10 minutes waiting for another request or eve dev worker to prepare sandbox environments (this request needs provider "docker").
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Another request or `eve dev` worker is still preparing environments. Check the `eve dev` output, or run `eve logs`, to find the slow step, such as an image pull, a Dockerfile build, or a `prepare` callback. Retry after preparation finishes, or restart `eve dev` to cancel it.
|
|
149
|
+
|
|
150
|
+
## Custom provider errors
|
|
151
|
+
|
|
152
|
+
These errors come from a provider defined with `defineSandboxProvider()`, or from a keyed tool call on a provider that cannot keep its sandbox. See [Custom sandbox providers](/docs/sandbox/custom-providers).
|
|
153
|
+
|
|
154
|
+
### `cannot keep a sandbox between invokeTool calls`
|
|
155
|
+
|
|
156
|
+
```text
|
|
157
|
+
Sandbox provider "acme" cannot keep a sandbox between invokeTool calls, so a call with a key cannot open one.
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
A keyed `invokeTool` call, such as an MCP tool session, requested the sandbox, and the provider does not keep sandboxes between calls. Call the tool without a key, use Vercel Sandbox or just-bash, or set `toolSessions: true` on a custom provider that bounds how long it keeps those sandboxes. Docker does not support keyed calls. See [Keep sandboxes for keyed tool calls](/docs/sandbox/custom-providers#keep-sandboxes-for-keyed-tool-calls).
|
|
161
|
+
|
|
162
|
+
### `Sandbox connection extensions cannot replace the session members eve provides`
|
|
163
|
+
|
|
164
|
+
```text
|
|
165
|
+
Sandbox connection extensions cannot replace the session members eve provides: run. Rename them.
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
The connection's `extensions` define a member that eve already provides on every sandbox session, such as `run`, `readFile`, `stop`, or `delete`. Rename the extension member.
|
|
169
|
+
|
|
170
|
+
### `ctx.templateKey() reserves`
|
|
171
|
+
|
|
172
|
+
```text
|
|
173
|
+
ctx.templateKey() reserves "sourceRevision": eve adds the workspace and skill files and the sandbox source revision itself.
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The identity passed to `ctx.templateKey()` in `prepare()` sets `resources` or `sourceRevision`. eve adds both to every template key. Rename that identity field.
|
|
177
|
+
|
|
178
|
+
### `returned non-serializable session state`
|
|
179
|
+
|
|
180
|
+
```text
|
|
181
|
+
Sandbox provider "acme" returned non-serializable session state.
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
`start()` returned state that is not JSON-compatible, such as a class instance, a function, or `undefined`. Return only strings, numbers, booleans, `null`, arrays, and plain objects, and keep live clients in the connection instead.
|
|
185
|
+
|
|
186
|
+
## Provider setup errors
|
|
187
|
+
|
|
188
|
+
### Docker is not installed or not running
|
|
189
|
+
|
|
190
|
+
```text
|
|
191
|
+
The Docker sandbox provider requires Docker, but the `docker` CLI was not found.
|
|
192
|
+
The Docker sandbox provider requires a running Docker daemon, but it is not reachable.
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Install and start Docker Desktop, OrbStack, Colima, or another runtime with a Docker-compatible `docker` CLI. To use another compatible CLI, such as Podman, set `EVE_DOCKER_PATH` to its path. If you do not need Docker specifically, use `DefaultSandbox.environment()`, which falls back to just-bash during `eve dev` and `eve eval`.
|
|
196
|
+
|
|
197
|
+
### The just-bash package is missing
|
|
198
|
+
|
|
199
|
+
```text
|
|
200
|
+
The just-bash sandbox provider requires the `just-bash` package, which is not bundled with eve.
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
`eve dev` installs `just-bash` automatically unless the environment sets `autoInstall: false`. Other commands require you to install it. Add it to your application, for example with `pnpm add -D just-bash`, which matches what `eve dev` installs. See [just-bash Sandbox](/docs/sandbox/just-bash#automatic-installation).
|
|
204
|
+
|
|
205
|
+
### `Cannot build deployable Vercel output because this app requires sandbox templates`
|
|
206
|
+
|
|
207
|
+
```text
|
|
208
|
+
Cannot build deployable Vercel output because this app requires sandbox templates and VERCEL_OIDC_TOKEN is missing.
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
eve raises this during a Vercel build, when `VERCEL` is set, if the app needs sandbox templates prepared and `VERCEL_OIDC_TOKEN` is missing. Do not deploy the `.vercel/output` from a build that failed this way. For a local `vercel build`, run `vercel link` and `vercel pull`, then retry. In a build on Vercel, Vercel sets `VERCEL_OIDC_TOKEN` automatically; see [Vercel OIDC federation](https://vercel.com/docs/oidc).
|
|
212
|
+
|
|
213
|
+
### Vercel Sandbox authentication fails
|
|
214
|
+
|
|
215
|
+
When `eve build` or the runtime cannot create a Vercel Sandbox because of missing or expired credentials, the Vercel Sandbox SDK reports an authentication or OIDC token error. Locally, run `eve link` to link a project and pull `VERCEL_OIDC_TOKEN` into `.env.local`. Outside Vercel without a linked project, set `VERCEL_TOKEN`, `VERCEL_TEAM_ID`, and `VERCEL_PROJECT_ID`. See [Vercel Sandbox authentication](/docs/sandbox/vercel#authentication) for the full resolution order.
|
package/docs/sandbox/vercel.mdx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Vercel Sandbox"
|
|
3
|
-
description: "Create
|
|
3
|
+
description: "Create persistent sandboxes on Vercel, from a prepared snapshot when the environment has build-time setup."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`VercelSandbox.environment()` prepares a reusable Vercel Sandbox snapshot and creates persistent session sandboxes from its recorded snapshot ID.
|
|
6
|
+
`VercelSandbox.environment()` prepares a reusable Vercel Sandbox snapshot when the environment has build-time setup, and creates persistent session sandboxes from its recorded snapshot ID.
|
|
7
7
|
|
|
8
8
|
```ts
|
|
9
9
|
import { defineSandbox } from "eve/sandbox";
|
|
@@ -27,12 +27,40 @@ export default defineSandbox(() =>
|
|
|
27
27
|
);
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
## Authentication
|
|
31
|
+
|
|
32
|
+
eve needs a Vercel token, team ID, and project ID to create Vercel Sandboxes. `eve build` needs them to capture the snapshot, and the runtime needs them to create and resume session sandboxes. Deployments on Vercel provide them automatically.
|
|
33
|
+
|
|
34
|
+
eve resolves each value from the first source that is set:
|
|
35
|
+
|
|
36
|
+
| Value | Sources, in order |
|
|
37
|
+
| ---------- | --------------------------------------------------------------- |
|
|
38
|
+
| Token | `token` environment option, `VERCEL_OIDC_TOKEN`, `VERCEL_TOKEN` |
|
|
39
|
+
| Team ID | `teamId` environment option, `VERCEL_TEAM_ID`, `VERCEL_ORG_ID` |
|
|
40
|
+
| Project ID | `projectId` environment option, `VERCEL_PROJECT_ID` |
|
|
41
|
+
|
|
42
|
+
When all three resolve, eve uses them. Otherwise, eve requests a Vercel OIDC token and reads the team and project from the token. On Vercel, the deployment provides that token. Elsewhere, eve reads `VERCEL_OIDC_TOKEN` and, when it is missing or expired, refreshes it with your Vercel CLI login and the project linked in `.vercel/project.json`. If that also fails, eve falls back to the Vercel Sandbox SDK's own credential lookup, which reports an authentication error if it finds none.
|
|
43
|
+
|
|
44
|
+
For local development, link the app to a Vercel project and pull its environment into `.env.local`:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
eve link
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`vercel link` followed by `vercel env pull` produces the same `.env.local`. A running `eve dev` reloads env files automatically.
|
|
51
|
+
|
|
52
|
+
Outside Vercel and without a linked project, such as in CI or on a self-hosted server, set `VERCEL_TOKEN`, `VERCEL_TEAM_ID`, and `VERCEL_PROJECT_ID`, or pass `token`, `teamId`, and `projectId` to `VercelSandbox.environment()`.
|
|
53
|
+
|
|
30
54
|
## Snapshot preparation
|
|
31
55
|
|
|
32
|
-
eve creates a temporary persistent Vercel Sandbox during build, installs the base runtime, writes managed workspace and skill files, runs the authored `prepare` callback,
|
|
56
|
+
eve creates a temporary, non-persistent Vercel Sandbox during build, installs the base runtime, writes managed workspace and skill files, and runs the authored `prepare` callback. It then checks the base runtime again before capturing the snapshot, so a `prepare` callback that breaks it fails the build. The build artifact records the snapshot ID.
|
|
33
57
|
|
|
34
58
|
When a live session sandbox does not exist, eve creates it directly from that snapshot ID. Runtime does not need to look up the temporary template Sandbox.
|
|
35
59
|
|
|
60
|
+
When the environment has no `prepare` callback, no managed workspace or skill files, and no `source`, a snapshot would contain only the base runtime. eve skips it: the build records no snapshot ID, and each new session sandbox starts from the image and installs the base runtime itself. A `source` always produces a snapshot, so sessions start from what the build captured instead of fetching the source again.
|
|
61
|
+
|
|
62
|
+
A new session sandbox created from a prepared snapshot of the standard eve image, without Drive mounts, inherits the base runtime the build checked and runs no setup command. Existing or resumed sandboxes, custom images or snapshot sources, sandboxes with Drive mounts, and sandboxes created without a prepared snapshot still run base-runtime setup when eve attaches them.
|
|
63
|
+
|
|
36
64
|
## Initialize after open
|
|
37
65
|
|
|
38
66
|
Initialize session-specific state after `open()` and before returning the sandbox. This selector writes a configuration file into the persistent `/workspace` filesystem:
|
|
@@ -67,6 +95,8 @@ export default defineSandbox(async () => {
|
|
|
67
95
|
});
|
|
68
96
|
```
|
|
69
97
|
|
|
98
|
+
Relative paths, including a relative `workingDirectory` passed to `run()` or `spawn()`, resolve from `/workspace`.
|
|
99
|
+
|
|
70
100
|
Use the environment's `prepare` callback for immutable setup that every new session should inherit. Use post-open initialization for state that belongs only to one durable session.
|
|
71
101
|
|
|
72
102
|
## Network policy
|
|
@@ -106,11 +136,16 @@ const sandboxName = sandbox.name;
|
|
|
106
136
|
|
|
107
137
|
## Mount a Drive
|
|
108
138
|
|
|
109
|
-
A [Vercel Sandbox Drive](https://vercel.com/docs/sandbox/concepts/drives) stores files independently of a sandbox.
|
|
139
|
+
A [Vercel Sandbox Drive](https://vercel.com/docs/sandbox/concepts/drives) stores files independently of a sandbox. Install `@vercel/sandbox` in your app, create or retrieve the Drive before calling `open()`, then pass it in `mounts` under an absolute path:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
pnpm add @vercel/sandbox
|
|
143
|
+
```
|
|
110
144
|
|
|
111
145
|
```ts
|
|
146
|
+
import { Drive } from "@vercel/sandbox";
|
|
112
147
|
import { defineSandbox } from "eve/sandbox";
|
|
113
|
-
import {
|
|
148
|
+
import { VercelSandbox } from "eve/sandbox/vercel";
|
|
114
149
|
|
|
115
150
|
const REGION = "iad1";
|
|
116
151
|
|
|
@@ -130,6 +165,8 @@ export default defineSandbox(async () => {
|
|
|
130
165
|
});
|
|
131
166
|
```
|
|
132
167
|
|
|
168
|
+
`Drive.getOrCreate()` comes from your app's own `@vercel/sandbox`, so it resolves credentials through the SDK, not eve: it reads `token`, `teamId`, and `projectId` passed to it, or a Vercel OIDC token, which the SDK refreshes from your Vercel CLI login and linked project. It does not read `VERCEL_TOKEN`, `VERCEL_TEAM_ID`, `VERCEL_PROJECT_ID`, or the credentials passed to `VercelSandbox.environment()`, so outside Vercel without a linked project, pass them to `Drive.getOrCreate()` too.
|
|
169
|
+
|
|
133
170
|
This example mounts the Drive read-write at `/data`. Files written there remain on the Drive after the sandbox stops. Keep Drive mounts separate from eve's managed `/workspace` directory.
|
|
134
171
|
|
|
135
172
|
Set the same region on the environment and the Drive. The environment region places the prepared snapshot and each session sandbox together with the Drive.
|
|
@@ -148,13 +185,17 @@ return environment.open({
|
|
|
148
185
|
|
|
149
186
|
Before mounting `drive.snapshot()`, seed a new Drive by mounting it read-write and writing at least one file. An uninitialized Drive cannot be mounted as a snapshot.
|
|
150
187
|
|
|
188
|
+
Each `mounts` entry is a `Drive`, which mounts read-write, or a `{ drive, mode }` reference to an existing Drive by name, where `mode` is `"read-write"` or `"snapshot"`. `drive.snapshot()` returns such a reference.
|
|
189
|
+
|
|
151
190
|
Vercel allows up to four non-overlapping, absolute Drive mount paths per sandbox. See the Vercel documentation for [Drive lifecycle, limits, and pricing](https://vercel.com/docs/sandbox/concepts/drives).
|
|
152
191
|
|
|
153
192
|
## Live sandbox options
|
|
154
193
|
|
|
155
|
-
`open()` also accepts Vercel compute resources, timeout, and Drive mounts.
|
|
194
|
+
`open()` also accepts Vercel compute resources, timeout, environment variables, and Drive mounts. These options apply only when creating the sandbox. Reopening the same key or resuming recorded state keeps the native sandbox's original environment variables, mounts, and network policy. Pass `env` to `run()` or `spawn()` for a per-command override, or call `setNetworkPolicy()` to change the live network policy.
|
|
195
|
+
|
|
196
|
+
Configure project credentials and custom fetch behavior on the environment, not in `open()`, because resume does not reconstruct start-only options.
|
|
156
197
|
|
|
157
|
-
Initialize the returned sandbox directly in `defineSandbox()`. If initialization fails, eve
|
|
198
|
+
Initialize the returned sandbox directly in `defineSandbox()`. If initialization fails, eve keeps the sandbox and runs the selector against it again on the next access, so make initialization safe to repeat; session end deletes the sandbox. After initialization succeeds, the provider persists only immutable JSON-compatible state. If the named Vercel Sandbox later disappears, resume does not recreate it; eve reruns the selector to start a fresh sandbox instead.
|
|
158
199
|
|
|
159
200
|
eve owns the persistent sandbox identity and prepared snapshot source.
|
|
160
201
|
|
package/docs/skills.mdx
CHANGED
|
@@ -9,7 +9,7 @@ A skill is a model-loadable procedure that follows the `SKILL.md` convention. It
|
|
|
9
9
|
|
|
10
10
|
eve scans the files under `agent/skills/` and lists each one's name and description in the system prompt. When a request matches a skill's description (or you name the skill outright), the model loads it with `eve__skill({ name })`, and the skill's markdown becomes the call's result in the active turn. An agent with skills always has the [`eve__skill` tool](./concepts/built-in-tools#eve__search-eve__tool-and-eve__skill). A load reports a `load-skill` action named for the skill, and `t.loadedSkill` asserts it in [evals](./evals/assertions).
|
|
11
11
|
|
|
12
|
-
Listing skills and loading their instructions do not require a sandbox: loading returns static instructions from the compiled agent and dynamic instructions from session state. Only access to supporting package files requires a sandbox. Builds may also prewarm sandbox templates that contain static package files. Supporting files are available under `$HOME/.agents/skills/<skill>/`, with
|
|
12
|
+
Listing skills and loading their instructions do not require a sandbox: loading returns static instructions from the compiled agent and dynamic instructions from session state. Only access to supporting package files requires a sandbox. Builds may also prewarm sandbox templates that contain static package files. Supporting files are available under `$HOME/.agents/skills/<skill>/`, with `skills/<skill>/` under the workspace root as the fallback when `$HOME` is unavailable. Sibling references inside `SKILL.md`, such as `references/checklist.md`, are relative to the directory containing that specific `SKILL.md`.
|
|
13
13
|
|
|
14
14
|
The description is a routing hint, not a label. Write it as the task that should trigger activation:
|
|
15
15
|
|
package/docs/subagents/index.mdx
CHANGED
|
@@ -34,7 +34,7 @@ The copy uses the root's instructions, connections, auth, and sandbox. It receiv
|
|
|
34
34
|
|
|
35
35
|
The parent transfers data to the child through the `message` input it gives the subagent. Do not include sensitive data in a subagent request unless that child and its inherited tools, connections, sandbox, and telemetry path are appropriate for that data.
|
|
36
36
|
|
|
37
|
-
An authored workflow can open the same root-copy target through `ctx.agent("agent")`. To keep the copied configuration but use another model for that child session, pass a [model override to `ctx.agent`](./tools/workflows#delegate-work-ctxagent). The model-facing
|
|
37
|
+
An authored workflow can open the same root-copy target through `ctx.agent("agent")`. To keep the copied configuration but use another model for that child session, pass a [model override to `ctx.agent`](./tools/workflows#delegate-work-ctxagent). The default model-facing tool does not accept a model choice; an authored [`agentWithModel` tool](./concepts/built-in-tools#agent) can expose that choice in its input.
|
|
38
38
|
|
|
39
39
|
To prevent the root session from delegating to a fresh copy of itself, set `tool: false` on the root agent:
|
|
40
40
|
|
|
@@ -212,7 +212,7 @@ The root built-in `agent` tool is the exception. Its children reuse the root's s
|
|
|
212
212
|
|
|
213
213
|
## What the parent sees
|
|
214
214
|
|
|
215
|
-
eve lowers every tool-enabled subagent visible to the current agent (the root built-in copy, declared, or [remote](./guides/remote-agents)) into a model-visible tool with the same `{ message, taskId? }` shape. The parent packs `message` with everything the child needs, since the child never sees the parent's history. To require structured output from a child, open a session with it from an authored workflow tool with [`ctx.agent(name)`](./tools/workflows#delegate-work-ctxagent) and pass `outputSchema` to `send()`; the schema applies to that turn, and the session accepts follow-up messages until the workflow run finishes.
|
|
215
|
+
By default, eve lowers every tool-enabled subagent visible to the current agent (the root built-in copy, declared, or [remote](./guides/remote-agents)) into a model-visible tool with the same `{ message, taskId? }` shape. The opt-in [`agentWithModel` root-copy tool](./concepts/built-in-tools#agent) instead uses `{ message, model, taskId? }`. The parent packs `message` with everything the child needs, since the child never sees the parent's history. To require structured output from a child, open a session with it from an authored workflow tool with [`ctx.agent(name)`](./tools/workflows#delegate-work-ctxagent) and pass `outputSchema` to `send()`; the schema applies to that turn, and the session accepts follow-up messages until the workflow run finishes.
|
|
216
216
|
|
|
217
217
|
Declared subagents can call nested subagents defined under their own directories. eve does not apply a separate depth limit; nesting ends where the authored directory tree ends. The built-in `agent` follows the stricter root-only rule above, so `limits.maxSubagentDepth` no longer exists.
|
|
218
218
|
|
package/docs/tools/overview.mdx
CHANGED
|
@@ -123,7 +123,7 @@ eve does not append the sentence for a function, because whether the call ends t
|
|
|
123
123
|
|
|
124
124
|
The turn ends only when every tool call in the model's step can end the turn and succeeds, and every `endsTurn` function returns `true`. Otherwise the model receives the results and continues as usual. Text the model writes before the call is narration, so channels do not post it as the reply. While [tasks](/docs/tools/tasks) are still working, the turn waits for them and then calls the model again.
|
|
125
125
|
|
|
126
|
-
eve ignores `endsTurn` in delegated sessions, which must return a reply to their caller, and on turns that request structured output; the model does not see the appended sentence there, and eve does not call an `endsTurn` function. `defineWorkflowTool` rejects `endsTurn` at build time. Dynamic tool entries accept `endsTurn
|
|
126
|
+
eve ignores `endsTurn` in delegated sessions, which must return a reply to their caller, and on turns that request structured output; the model does not see the appended sentence there, and eve does not call an `endsTurn` function. `defineWorkflowTool` rejects `endsTurn` at build time. Dynamic tool entries accept `endsTurn` too, including a function. eve replays the function from a durable descriptor, as it does `execute`. To end a turn without taking any other action, add the opt-in [`no_reply`](/docs/concepts/built-in-tools#no_reply) tool.
|
|
127
127
|
|
|
128
128
|
### Label tool activity
|
|
129
129
|
|
|
@@ -339,6 +339,25 @@ eve writes each returned file to the session sandbox and keeps only a reference
|
|
|
339
339
|
|
|
340
340
|
When compaction drops older tool results, each file becomes a text reference such as `Attached file /workspace/.eve/attachments/<hash>/chart.png (image/png)`. The built-in `read_file` tool shows PNG, JPEG, GIF, and WebP images up to 3 MiB and PDFs up to 20 MiB to the model as files, so the agent can open a compacted image or PDF again.
|
|
341
341
|
|
|
342
|
+
#### Send a file by URL
|
|
343
|
+
|
|
344
|
+
For large files that already live in object storage, such as PDFs behind a presigned S3 link, return the URL instead of the bytes with `toolOutputPart.fileUrl`:
|
|
345
|
+
|
|
346
|
+
```ts
|
|
347
|
+
toModelOutput(output) {
|
|
348
|
+
return toolOutput.content([
|
|
349
|
+
toolOutputPart.text(`Contract ${output.id}:`),
|
|
350
|
+
toolOutputPart.fileUrl(output.signedUrl, { mediaType: "application/pdf" }),
|
|
351
|
+
]);
|
|
352
|
+
},
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
eve keeps only the URL in session history and does not write the file to the sandbox. The model provider fetches the URL itself when it supports that for the file's type; otherwise the AI SDK downloads the file before the call. Only `https:` URLs are accepted.
|
|
356
|
+
|
|
357
|
+
Every later model call sends the same URL again, so it must stay readable for the rest of the session. A presigned URL that expires mid-session makes later model calls fail. The provider still counts the file's input tokens on each call, the same as an inline file.
|
|
358
|
+
|
|
359
|
+
Unlike a staged file, a URL part has no sandbox path to fall back on. When compaction drops the tool result, the file becomes `Attached file <filename> (<mediaType>)` and the URL is gone. If the agent may need the file again later, also return a text part with an id or path the tool can fetch it by.
|
|
360
|
+
|
|
342
361
|
Do not return secrets, credentials, unnecessary personal data, or unbounded sensitive content from tools. Filter, minimize, and redact tool outputs before returning them.
|
|
343
362
|
|
|
344
363
|
## What to read next
|
package/docs/tools/workflows.mdx
CHANGED
|
@@ -90,9 +90,9 @@ or days later, the run resumes, deploys, and returns. The model sees one tool re
|
|
|
90
90
|
`agent`, `agents`, `ask`, and `reply`; each call it receives carries its own `callId` and
|
|
91
91
|
`abortSignal`.
|
|
92
92
|
A `"use step"` helper that receives `ctx` directly gets a restricted `WorkflowStepToolContext` with
|
|
93
|
-
`session`, `callId`, `toolName`, `abortSignal`, `getToken`, and `requireAuth`. Read `ctx.agents`, call
|
|
93
|
+
`session`, `callId`, `toolName`, `abortSignal`, `getSandbox`, `getToken`, and `requireAuth`. Read `ctx.agents`, call
|
|
94
94
|
`ctx.agent()`, and call `ctx.ask()` in the workflow body; pass only the serializable values the step needs.
|
|
95
|
-
`getSandbox`
|
|
95
|
+
Call `getSandbox`, `getToken`, and `requireAuth` in a step: the workflow body throws when it calls them.
|
|
96
96
|
- The tool's input must be a JSON object. Workflow bodies are for static tools under `agent/tools/`,
|
|
97
97
|
not tools returned from `defineDynamic` resolvers.
|
|
98
98
|
|
|
@@ -146,9 +146,21 @@ continue a child from an earlier call. Agent authorization, questions, approvals
|
|
|
146
146
|
behave as they do for sessions an authored workflow tool opens with `ctx.agent`.
|
|
147
147
|
|
|
148
148
|
The sandbox resumes after every pending call in the current batch settles. `Promise.all` supports
|
|
149
|
-
fan-out followed by fan-in
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
fan-out followed by fan-in. The program must await every `ctx.agent` call before it returns. A call
|
|
150
|
+
that is still pending at that point, such as one that is never awaited or one that loses a
|
|
151
|
+
`Promise.race` or `Promise.any`, fails the workflow.
|
|
152
|
+
|
|
153
|
+
A failed child turn, an invalid call, or a call over the `maxSubagents` budget throws a
|
|
154
|
+
`WorkflowProgramAgentError` at that `ctx.agent` call, which the program can catch; the message
|
|
155
|
+
says which.
|
|
156
|
+
|
|
157
|
+
The sandbox converts the program's return value and each `ctx.agent` input with `JSON.stringify`,
|
|
158
|
+
so a `Date` becomes a string and functions and `undefined` members drop. A return value that
|
|
159
|
+
converts to nothing, such as `undefined`, becomes `null`. Each converted value may be up to 1 MiB of
|
|
160
|
+
JSON, each child reply up to 4 MiB of JSON, and the program source up to 256 KiB.
|
|
161
|
+
|
|
162
|
+
Each start or resume may spend up to 30 seconds running JavaScript and up to 5 minutes in total.
|
|
163
|
+
Time spent waiting for child agents does not count toward either limit.
|
|
152
164
|
|
|
153
165
|
### Migrate from `experimental_workflow`
|
|
154
166
|
|
|
@@ -438,6 +450,62 @@ itself contains no credentials.
|
|
|
438
450
|
Cancelling an authorization wait withdraws its callback. Cancellation uses the existing turn
|
|
439
451
|
cancellation path rather than a separate authorization completion event.
|
|
440
452
|
|
|
453
|
+
## Use the session sandbox in a step
|
|
454
|
+
|
|
455
|
+
Pass `ctx` directly to a step helper and call `ctx.getSandbox()` there. The step opens the
|
|
456
|
+
[sandbox](/docs/sandbox) of the session that called the tool, the same sandbox that session's
|
|
457
|
+
turns use. When the session shares its parent's sandbox, as a copy started by the built-in `agent`
|
|
458
|
+
tool does, the step opens that shared sandbox. The step sees files the session wrote, and the
|
|
459
|
+
session's later tool calls see files the step writes:
|
|
460
|
+
|
|
461
|
+
```ts title="agent/tools/analyze.ts"
|
|
462
|
+
import { defineWorkflowTool, type WorkflowStepToolContext } from "eve/tools";
|
|
463
|
+
import { z } from "zod";
|
|
464
|
+
|
|
465
|
+
export default defineWorkflowTool({
|
|
466
|
+
description: "Prepare the input file for an analysis run.",
|
|
467
|
+
inputSchema: z.object({ value: z.string() }),
|
|
468
|
+
async task(input, ctx) {
|
|
469
|
+
"use workflow";
|
|
470
|
+
await prepareInput(ctx, input);
|
|
471
|
+
return { path: "/workspace/input.json" };
|
|
472
|
+
},
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
async function prepareInput(ctx: WorkflowStepToolContext, input: { value: string }) {
|
|
476
|
+
"use step";
|
|
477
|
+
const sandbox = await ctx.getSandbox();
|
|
478
|
+
await sandbox.writeTextFile({ path: "/workspace/input.json", content: JSON.stringify(input) });
|
|
479
|
+
}
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
- The workflow body cannot open the sandbox, because it replays. `ctx.getSandbox()` in the body
|
|
483
|
+
throws and tells you to pass `ctx` to a step helper.
|
|
484
|
+
- The step opens the sandbox directly, with any sandbox provider. If the session recorded its
|
|
485
|
+
sandbox before it called the tool, the step resumes it. Otherwise, or if that sandbox is gone by
|
|
486
|
+
the time the step runs, the step opens it the way the session's first turn would: it runs your
|
|
487
|
+
`defineSandbox()` definition, and the provider finds or creates the sandbox by the session's id. The session's later turns open the same sandbox. Your
|
|
488
|
+
definition can run once for each caller that opens the sandbox before the session records it,
|
|
489
|
+
so make its initialization safe to repeat.
|
|
490
|
+
- The step does not own the sandbox. When the step ends, even by throwing, eve lets go of the
|
|
491
|
+
step's handle and leaves the sandbox running for the session. eve never stops or deletes the
|
|
492
|
+
sandbox for a step, and `sandbox.stop()` and `sandbox.delete()` in a step fail without a retry,
|
|
493
|
+
because the session's turns may be using the sandbox.
|
|
494
|
+
- The session removes the sandbox when the session ends, even when only a step opened it. A step
|
|
495
|
+
that is still running when the session ends can open the sandbox again after that cleanup, and
|
|
496
|
+
nothing removes the new one.
|
|
497
|
+
- When the eve server shuts down, it stops the sandboxes its sessions opened, but not one that
|
|
498
|
+
only a step opened. With Docker, that container keeps running until the session ends or you
|
|
499
|
+
stop it.
|
|
500
|
+
- A step can use the sandbox while the session's turns use it too, as subagents that share a
|
|
501
|
+
sandbox do. Give each one its own files to write.
|
|
502
|
+
- Steps run at least once and retry after a failure, so make sandbox writes safe to repeat. Write
|
|
503
|
+
whole files instead of appending to them, or check for earlier output first.
|
|
504
|
+
- When the session shares its parent's sandbox, the step opens it by the parent's session id with
|
|
505
|
+
the parent's sandbox definition, and the parent removes it when the parent ends.
|
|
506
|
+
- A step runs wherever the workflow runs. A sandbox that lives on one machine, such as just-bash
|
|
507
|
+
on the local disk, is reachable from a step only on that machine, as in local development.
|
|
508
|
+
|
|
441
509
|
## Ask a human: `ctx.ask`
|
|
442
510
|
|
|
443
511
|
```ts
|
|
@@ -29,9 +29,9 @@ Top-level workspace entries get advertised to the model automatically, so it kno
|
|
|
29
29
|
|
|
30
30
|
## Install the chart dependencies
|
|
31
31
|
|
|
32
|
-
Python needs a sandbox that runs real binaries. For local development, start a Docker-compatible daemon and run `docker info` to verify it is reachable before restarting `npm run dev`.
|
|
32
|
+
Python needs a sandbox that runs real binaries. For local development, start a Docker-compatible daemon and run `docker info` to verify it is reachable before restarting `npm run dev`. The `just-bash` fallback cannot run Python or install packages; installing Python on your laptop does not add it to the sandbox. You can [continue to the next chapter](./remember-definitions) if you do not want to set up a local container yet.
|
|
33
33
|
|
|
34
|
-
The default eve images for Docker
|
|
34
|
+
The default eve images for Docker and Vercel Sandbox include Python, but not matplotlib. Add this definition alongside `workspace/` to install matplotlib in a virtual environment. It uses the same environment for installation and chart execution, without changing the system Python:
|
|
35
35
|
|
|
36
36
|
```ts title="agent/sandbox/sandbox.ts"
|
|
37
37
|
import { DefaultSandbox, defineSandbox } from "eve/sandbox";
|