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.
- package/CHANGELOG.md +44 -0
- package/dist/src/ai/evaluate.js +1 -1
- package/dist/src/channel/channel-address.d.ts +4 -1
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/channel-operations.d.ts +4 -1
- package/dist/src/channel/cross-channel-receive.d.ts +4 -1
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/session.d.ts +3 -1
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +7 -0
- package/dist/src/chunks/{use-eve-agent-C5-yqRuq.js → use-eve-agent-BdKlQF32.js} +8 -8
- package/dist/src/chunks/{use-eve-agent-CVWk5KKy.js → use-eve-agent-IIuxkn6y.js} +8 -8
- package/dist/src/cli/commands/build.js +1 -1
- package/dist/src/cli/commands/init-agent-workspace.d.ts +2 -0
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.js +1 -1
- package/dist/src/cli/dev/tui/line-editor.d.ts +11 -1
- package/dist/src/cli/dev/tui/line-editor.js +3 -3
- package/dist/src/cli/dev/tui/model-picker.d.ts +2 -0
- package/dist/src/cli/dev/tui/model-picker.js +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +0 -1
- package/dist/src/cli/dev/tui/runner.js +2 -2
- package/dist/src/cli/dev/tui/setup-panel.js +1 -1
- package/dist/src/cli/dev/tui/setup-selection-input.js +1 -1
- package/dist/src/cli/dev/tui/stream-format.d.ts +6 -0
- package/dist/src/cli/dev/tui/stream-format.js +2 -2
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +0 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
- package/dist/src/cli/run.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +8 -14
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/types.d.ts +4 -2
- package/dist/src/compiled/.vendor-stamp.json +11 -11
- package/dist/src/compiled/@chat-adapter/slack/_chat-adapter-shared.d.ts +1 -0
- package/dist/src/compiled/@chat-adapter/slack/api.d.ts +3 -2
- package/dist/src/compiled/@chat-adapter/slack/api.js +1 -1
- package/dist/src/compiled/@chat-adapter/slack/blocks.js +1 -1
- package/dist/src/compiled/@chat-adapter/slack/format.js +1 -1
- package/dist/src/compiled/@chat-adapter/slack/index.d.ts +410 -63
- package/dist/src/compiled/@chat-adapter/slack/index.js +47 -25
- package/dist/src/compiled/@chat-adapter/twilio/api.d.ts +5 -1
- package/dist/src/compiled/@chat-adapter/twilio/api.js +1 -1
- package/dist/src/compiled/@chat-adapter/twilio/index.d.ts +37 -3
- package/dist/src/compiled/@chat-adapter/twilio/index.js +5 -1
- package/dist/src/compiled/@chat-adapter/twilio/webhook.d.ts +2 -2
- package/dist/src/compiled/@chat-adapter/twilio/webhook.js +1 -1
- package/dist/src/compiled/@linqapp/chat-sdk-adapter/index.js +6 -6
- package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +50 -50
- package/dist/src/compiled/@vercel/sandbox/index.js +4 -4
- package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +2 -1
- package/dist/src/compiled/@workflow/core/events-consumer.d.ts +6 -3
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/private.d.ts +37 -5
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/deployment-guard.d.ts +2 -1
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/invocations.d.ts +35 -0
- package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +90 -0
- package/dist/src/compiled/@workflow/core/runtime/quickjs-runtime.d.ts +2 -1
- package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +8 -6
- package/dist/src/compiled/@workflow/core/runtime/step-single-flight.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime.js +4 -4
- package/dist/src/compiled/@workflow/core/serialization.d.ts +5 -1
- package/dist/src/compiled/@workflow/core/serialization.js +1 -1
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +4 -0
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/world/analytics.d.ts +1 -1
- package/dist/src/compiled/@workflow/world/attributes-validation.d.ts +5 -0
- package/dist/src/compiled/@workflow/world/events.d.ts +2 -2
- package/dist/src/compiled/@workflow/world/index.d.ts +2 -1
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +12 -1
- package/dist/src/compiled/@workflow/world/invocation.d.ts +19 -0
- package/dist/src/compiled/@workflow/world/queue.d.ts +24 -3
- package/dist/src/compiled/@workflow/world-local/index.js +3 -3
- package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
- package/dist/src/compiled/_chunks/node/chunk-6QHBXN7B-gl4n6nmi.js +12 -0
- package/dist/src/compiled/_chunks/node/chunk-7WDLOIRP-B_IWkVtZ.js +1 -0
- package/dist/src/compiled/_chunks/node/chunk-KBOOTKHF-DJqFk2r1.js +1 -0
- package/dist/src/compiled/_chunks/node/chunk-TREVQR3E-CLsTAn-O.js +1 -0
- package/dist/src/compiled/_chunks/node/dist-DYDVZ-FS.js +98 -0
- package/dist/src/compiled/_chunks/node/dist-iEFkK9qw.js +6 -0
- package/dist/src/compiled/_chunks/workflow/attribute-changes-DFx4eluc.js +6 -0
- package/dist/src/compiled/_chunks/workflow/{dist-D38gP7YF.js → dist-DjECvUyK.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{frames-QcJfYHmh.js → frames-D_Q-7A1N.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/{helpers-6kObVbfS.js → helpers-Bw52uyzw.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{logger-NN5YHpYy.js → logger-DFNCa8Nl.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-BhA_nDEV.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{run-DJevv8zz.js → run-BT6SQv5f.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{serialization-C5KgPESk.js → serialization-Cl0SYU0I.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/sleep-DB4AH9-A.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{wait-until-BMY_tOr-.js → wait-until-Dzhr6tzf.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{ws-transport-DSDcKH08.js → ws-transport-BpTMh40s.js} +1 -1
- package/dist/src/compiled/chat/index.d.ts +1 -725
- package/dist/src/compiled/chat/index.js +1 -1
- package/dist/src/compiler/artifacts.d.ts +1 -0
- package/dist/src/compiler/artifacts.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +23 -15
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +14 -18
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-helpers.js +1 -1
- package/dist/src/compiler/normalize-sandbox.d.ts +2 -7
- 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.d.ts +2 -0
- package/dist/src/context/build-callback-context.js +1 -1
- package/dist/src/context/container.d.ts +1 -1
- package/dist/src/context/container.js +1 -1
- package/dist/src/context/key-names.d.ts +1 -0
- package/dist/src/context/key-names.js +1 -1
- package/dist/src/context/keys.d.ts +7 -2
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/providers/sandbox.js +1 -1
- package/dist/src/context/providers/session.d.ts +19 -2
- package/dist/src/context/session-context.d.ts +1 -1
- package/dist/src/discover/sandbox.js +1 -1
- package/dist/src/evals/cli/eval.js +1 -1
- package/dist/src/evals/context.d.ts +1 -0
- package/dist/src/evals/context.js +1 -1
- package/dist/src/evals/define-eval-config.d.ts +7 -7
- package/dist/src/evals/define-eval-config.js +1 -1
- package/dist/src/evals/define-eval.d.ts +5 -2
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/runner/execute-eval.d.ts +2 -0
- package/dist/src/evals/runner/execute-eval.js +1 -1
- package/dist/src/evals/runner/execute-task.d.ts +2 -0
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/runner/run-evals.d.ts +2 -0
- package/dist/src/evals/runner/run-evals.js +1 -1
- package/dist/src/evals/target.js +1 -1
- package/dist/src/evals/types.d.ts +22 -6
- package/dist/src/eve-channel/create-request.d.ts +2 -1
- package/dist/src/eve-channel/delivery-policy-request.d.ts +4 -0
- package/dist/src/eve-channel/delivery-policy-request.js +1 -0
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.d.ts +2 -1
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +2 -1
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/active-handles.d.ts +7 -8
- package/dist/src/execution/sandbox/active-handles.js +1 -1
- package/dist/src/execution/sandbox/bash.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-cli.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/docker-cli.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-container.d.ts +2 -2
- package/dist/src/execution/sandbox/bindings/docker-container.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-network.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/docker-network.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-options.d.ts +4 -5
- package/dist/src/execution/sandbox/bindings/docker-options.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-session.d.ts +0 -1
- package/dist/src/execution/sandbox/bindings/docker-session.js +2 -2
- package/dist/src/execution/sandbox/bindings/docker.d.ts +16 -18
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +21 -0
- package/dist/src/execution/sandbox/bindings/immutable-resources.js +2 -0
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +9 -5
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash.d.ts +13 -26
- package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
- package/dist/src/execution/sandbox/bindings/{local-backend-utils.d.ts → local-provider-utils.d.ts} +7 -5
- package/dist/src/execution/sandbox/bindings/local-provider-utils.js +1 -0
- package/dist/src/execution/sandbox/bindings/local.d.ts +3 -3
- package/dist/src/execution/sandbox/bindings/local.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-create.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +30 -8
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-metadata.d.ts +9 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-metadata.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-network.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +10 -4
- package/dist/src/execution/sandbox/bindings/microsandbox-options.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-platform.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +7 -5
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox.d.ts +11 -21
- package/dist/src/execution/sandbox/bindings/microsandbox.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-base-runtime.js +2 -2
- package/dist/src/execution/sandbox/bindings/vercel-credentials.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-errors.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-lifecycle.d.ts +2 -2
- package/dist/src/execution/sandbox/bindings/vercel-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-lookup.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-options.d.ts +1 -2
- package/dist/src/execution/sandbox/bindings/vercel-options.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +20 -12
- package/dist/src/execution/sandbox/bindings/vercel.js +2 -2
- package/dist/src/execution/sandbox/development-cleanup.js +1 -1
- package/dist/src/execution/sandbox/development-lazy-prewarm.d.ts +7 -0
- package/dist/src/execution/sandbox/development-lazy-prewarm.js +1 -0
- package/dist/src/execution/sandbox/development-run.d.ts +2 -3
- package/dist/src/execution/sandbox/dockerfile.d.ts +25 -0
- package/dist/src/execution/sandbox/dockerfile.js +1 -0
- package/dist/src/execution/sandbox/ensure.d.ts +0 -17
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/logging-session.js +1 -1
- package/dist/src/execution/sandbox/prewarm.d.ts +23 -27
- package/dist/src/execution/sandbox/prewarm.js +1 -2
- package/dist/src/execution/sandbox/provider-files.d.ts +2 -0
- package/dist/src/execution/sandbox/provider-files.js +1 -0
- package/dist/src/execution/sandbox/provider-host-development.d.ts +2 -0
- package/dist/src/execution/sandbox/provider-host-development.js +1 -0
- package/dist/src/execution/sandbox/provider-host.d.ts +2 -0
- package/dist/src/execution/sandbox/provider-host.js +1 -0
- package/dist/src/execution/sandbox/provider-identity.d.ts +1 -0
- package/dist/src/execution/sandbox/provider-identity.js +1 -0
- package/dist/src/execution/sandbox/ripgrep-probe.d.ts +0 -7
- package/dist/src/execution/sandbox/ripgrep-probe.js +1 -1
- package/dist/src/execution/sandbox/session.d.ts +8 -8
- package/dist/src/execution/sandbox/session.js +1 -1
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +1 -1
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +2 -1
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session-inbox/protocol.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/subagent/emit-event-step.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -1
- package/dist/src/execution/tools/subagent/start.d.ts +1 -0
- package/dist/src/framework/sources/modules/sandbox.d.ts +2 -1
- package/dist/src/framework/sources/modules/sandbox.js +1 -1
- package/dist/src/harness/approval-delivery-coordinator.js +1 -1
- package/dist/src/harness/hitl/approval-input-requests.d.ts +1 -1
- package/dist/src/harness/hitl/approval-input-requests.js +1 -1
- package/dist/src/harness/input-requests.d.ts +6 -0
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/messages.d.ts +2 -1
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/pending-input-batches.d.ts +1 -0
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/instrumentation/ai-sdk-warnings.d.ts +6 -0
- package/dist/src/instrumentation/ai-sdk-warnings.js +1 -0
- package/dist/src/instrumentation/runtime.d.ts +1 -0
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.d.ts +2 -0
- package/dist/src/internal/application/compiled-artifacts.js +2 -2
- package/dist/src/internal/application/optional-package-install.d.ts +3 -0
- package/dist/src/internal/application/optional-package-install.js +2 -2
- package/dist/src/internal/application/output-publication-lock.d.ts +6 -0
- package/dist/src/internal/application/output-publication-lock.js +1 -1
- package/dist/src/internal/application/output-publication.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +1 -0
- package/dist/src/internal/authored-module-loader.js +1 -1
- package/dist/src/internal/authored-runtime-modules.d.ts +1 -0
- package/dist/src/internal/nitro/development-generation.js +1 -1
- package/dist/src/internal/nitro/host/artifacts-config.d.ts +6 -1
- package/dist/src/internal/nitro/host/artifacts-config.js +1 -1
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.d.ts +16 -0
- package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.js +5 -0
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +2 -2
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts +3 -3
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/development-runtime-prune-plugin.d.ts +9 -0
- package/dist/src/internal/nitro/host/development-runtime-prune-plugin.js +2 -0
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts +1 -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 +2 -2
- package/dist/src/internal/nitro/host/types.d.ts +1 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts +1 -0
- package/dist/src/internal/nitro/routes/runtime-artifacts.js +1 -1
- package/dist/src/internal/runtime-registry.d.ts +2 -2
- package/dist/src/internal/vercel/build-agent-workspace.d.ts +3 -1
- package/dist/src/internal/vercel/build-agent-workspace.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +4 -5
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
- package/dist/src/public/channels/github/checkout.js +1 -1
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +3 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +1 -1
- package/dist/src/public/definitions/sandbox.d.ts +5 -43
- package/dist/src/public/definitions/sandbox.js +1 -1
- package/dist/src/public/local-dev.d.ts +4 -5
- package/dist/src/public/next/vercel-output-config.js +1 -1
- package/dist/src/public/sandbox/docker-sandbox.d.ts +16 -40
- package/dist/src/public/sandbox/docker.d.ts +2 -2
- package/dist/src/public/sandbox/docker.js +1 -1
- package/dist/src/public/sandbox/index.d.ts +4 -9
- package/dist/src/public/sandbox/index.js +1 -1
- package/dist/src/public/sandbox/just-bash-sandbox.d.ts +11 -6
- package/dist/src/public/sandbox/just-bash.d.ts +2 -2
- package/dist/src/public/sandbox/just-bash.js +1 -1
- package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +11 -17
- package/dist/src/public/sandbox/microsandbox.d.ts +2 -2
- package/dist/src/public/sandbox/microsandbox.js +1 -1
- package/dist/src/public/sandbox/provider.d.ts +1 -0
- package/dist/src/public/sandbox/provider.js +1 -0
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +10 -41
- package/dist/src/public/sandbox/vercel.d.ts +2 -2
- package/dist/src/public/sandbox/vercel.js +1 -1
- package/dist/src/runtime/cache-key.js +1 -1
- package/dist/src/runtime/compiled-artifacts-source.d.ts +6 -1
- package/dist/src/runtime/compiled-artifacts-source.js +1 -1
- package/dist/src/runtime/loaders/artifact-paths.d.ts +1 -0
- package/dist/src/runtime/loaders/artifact-paths.js +1 -1
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +3 -0
- package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
- package/dist/src/runtime/loaders/compile-metadata.js +1 -1
- package/dist/src/runtime/loaders/manifest.js +1 -1
- package/dist/src/runtime/loaders/module-map.js +1 -1
- package/dist/src/runtime/local-dev-capability.d.ts +14 -12
- package/dist/src/runtime/local-dev-capability.js +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-sandbox.d.ts +1 -10
- package/dist/src/runtime/resolve-sandbox.js +1 -1
- package/dist/src/runtime/sandbox/prepared-artifacts.d.ts +13 -0
- package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -0
- package/dist/src/runtime/sandbox/registry.d.ts +2 -9
- package/dist/src/runtime/sandbox/registry.js +1 -1
- package/dist/src/runtime/sessions/runtime-session.js +1 -1
- package/dist/src/runtime/types.d.ts +13 -26
- package/dist/src/runtime/workspace/types.d.ts +1 -1
- package/dist/src/sandbox/providers/default.d.ts +27 -0
- package/dist/src/sandbox/providers/default.js +1 -0
- package/dist/src/sandbox/providers/docker.d.ts +11 -0
- package/dist/src/sandbox/providers/docker.js +1 -0
- package/dist/src/sandbox/providers/just-bash.d.ts +4 -0
- package/dist/src/sandbox/providers/just-bash.js +1 -0
- package/dist/src/sandbox/providers/microsandbox.d.ts +12 -0
- package/dist/src/sandbox/providers/microsandbox.js +1 -0
- package/dist/src/sandbox/providers/vercel.d.ts +12 -0
- package/dist/src/sandbox/providers/vercel.js +1 -0
- package/dist/src/sandbox/providers.d.ts +5 -0
- package/dist/src/sandbox/providers.js +1 -0
- package/dist/src/sandbox/state.d.ts +6 -25
- package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/sandbox.d.ts +2 -25
- package/dist/src/self-modification/extension/subagents/agent/sandbox.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/publish.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
- package/dist/src/self-modification/filesystem.d.ts +3 -1
- package/dist/src/self-modification/filesystem.js +1 -1
- package/dist/src/self-modification/git-workspace.d.ts +1 -1
- package/dist/src/self-modification/git.d.ts +1 -1
- package/dist/src/self-modification/sandbox.d.ts +14 -9
- package/dist/src/self-modification/sandbox.js +1 -1
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/cli/select-state.d.ts +4 -2
- package/dist/src/setup/cli/select-state.js +1 -1
- package/dist/src/setup/flows/model-login.js +1 -1
- package/dist/src/{cli/commands/registry-pnpm-build-policy.d.ts → setup/primitives/pm/pnpm-build-policy.d.ts} +4 -0
- package/dist/src/setup/primitives/pm/pnpm-build-policy.js +8 -0
- package/dist/src/setup/primitives/pm/pnpm.js +3 -2
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/shared/default-agent-model.d.ts +1 -1
- package/dist/src/shared/default-agent-model.js +1 -1
- package/dist/src/shared/sandbox-environment.d.ts +45 -0
- package/dist/src/shared/sandbox-environment.js +1 -0
- package/dist/src/shared/sandbox-network-policy.d.ts +8 -3
- package/dist/src/shared/sandbox-network-policy.js +1 -1
- package/dist/src/shared/sandbox-prepared-artifacts.d.ts +16 -0
- package/dist/src/shared/sandbox-prepared-artifacts.js +1 -0
- package/dist/src/shared/sandbox-provider.d.ts +112 -0
- package/dist/src/shared/sandbox-provider.js +1 -0
- package/dist/src/shared/sandbox-session.d.ts +18 -41
- package/dist/src/shared/sandbox-template-error.d.ts +9 -0
- package/dist/src/shared/sandbox-template-error.js +1 -0
- package/dist/src/subagents/tool.d.ts +1 -1
- package/dist/src/subagents/tool.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tasks/delivery-context.d.ts +6 -4
- package/dist/src/tasks/delivery-context.js +1 -1
- package/dist/src/tasks/delivery-policy.d.ts +2 -0
- package/dist/src/tasks/delivery-policy.js +1 -1
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/README.md +40 -45
- package/docs/agent-config.md +2 -2
- package/docs/channels/eve.mdx +1 -1
- package/docs/channels/overview.mdx +48 -0
- package/docs/channels/slack.mdx +1 -1
- package/docs/concepts/execution-model-and-durability.mdx +1 -1
- package/docs/concepts/sessions-runs-and-streaming.md +3 -3
- package/docs/dynamic-configuration/meta.json +5 -0
- package/docs/evals/overview.mdx +43 -0
- package/docs/getting-started.mdx +1 -1
- package/docs/guides/client/overview.mdx +1 -1
- package/docs/guides/deployment/overview.md +1 -1
- package/docs/guides/deployment/self-hosting.md +5 -5
- package/docs/guides/deployment/vercel.mdx +10 -18
- package/docs/guides/dev-tui.md +1 -1
- package/docs/guides/hooks.md +4 -0
- package/docs/guides/instrumentation/instrumentation.mdx +1 -1
- package/docs/guides/instrumentation/migration.md +1 -6
- package/docs/guides/instrumentation/otel.mdx +15 -47
- package/docs/memory/meta.json +1 -1
- package/docs/memory/overview.mdx +4 -0
- package/docs/meta.json +13 -16
- package/docs/patterns/meta.json +2 -2
- package/docs/protocols/acp.md +1 -1
- package/docs/protocols/ucp.mdx +1 -1
- package/docs/reference/cli.md +10 -9
- package/docs/reference/meta.json +4 -1
- package/docs/reference/typescript-api.md +2 -25
- package/docs/sandbox/default.mdx +17 -0
- package/docs/sandbox/docker.mdx +29 -0
- package/docs/sandbox/index.mdx +218 -0
- package/docs/sandbox/just-bash.mdx +24 -0
- package/docs/sandbox/meta.json +5 -0
- package/docs/sandbox/microsandbox.mdx +31 -0
- package/docs/sandbox/vercel.mdx +106 -0
- package/docs/schedules.mdx +35 -1
- package/docs/subagents/index.mdx +31 -13
- package/docs/subagents/meta.json +1 -1
- package/docs/tools/overview.mdx +14 -6
- package/docs/tutorial/run-analysis.mdx +6 -5
- package/package.json +20 -11
- package/dist/src/cli/commands/registry-pnpm-build-policy.js +0 -6
- package/dist/src/compiled/_chunks/node/chunk-5OX2R7AJ-CxVV-owP.js +0 -1
- package/dist/src/compiled/_chunks/node/chunk-AYN7QRWH-B__hKQV7.js +0 -1
- package/dist/src/compiled/_chunks/node/chunk-QZV7YRVM-Dzw4WEBv.js +0 -1
- package/dist/src/compiled/_chunks/node/dist-CweJdVFE.js +0 -6
- package/dist/src/compiled/_chunks/node/dist-Da54NuK8.js +0 -96
- package/dist/src/compiled/_chunks/workflow/attribute-changes-A6HfMNG3.js +0 -6
- package/dist/src/compiled/_chunks/workflow/resume-hook-CAqlhwic.js +0 -1
- package/dist/src/compiled/_chunks/workflow/sleep-CbUwdv6O.js +0 -1
- package/dist/src/compiled/chat/_mdast.d.ts +0 -24
- package/dist/src/compiled/chat/_workflow-serde.d.ts +0 -3
- package/dist/src/compiled/chat/jsx-runtime-_JEEAotp.d.ts +0 -907
- package/dist/src/execution/sandbox/bindings/local-backend-utils.js +0 -1
- package/dist/src/execution/sandbox/development-prewarm.d.ts +0 -15
- package/dist/src/execution/sandbox/development-prewarm.js +0 -1
- package/dist/src/execution/sandbox/lazy-backend.d.ts +0 -15
- package/dist/src/execution/sandbox/lazy-backend.js +0 -1
- package/dist/src/execution/sandbox/template-prewarm-lock.d.ts +0 -8
- package/dist/src/execution/sandbox/template-prewarm-lock.js +0 -1
- package/dist/src/internal/authored-definition/sandbox.d.ts +0 -17
- package/dist/src/internal/authored-definition/sandbox.js +0 -1
- package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.d.ts +0 -16
- package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.js +0 -2
- package/dist/src/public/definitions/sandbox-backend.d.ts +0 -17
- package/dist/src/public/definitions/sandbox-backend.js +0 -1
- package/dist/src/public/sandbox/backends/default.d.ts +0 -1
- package/dist/src/public/sandbox/backends/default.js +0 -1
- package/dist/src/public/sandbox/backends/docker.d.ts +0 -1
- package/dist/src/public/sandbox/backends/docker.js +0 -1
- package/dist/src/public/sandbox/backends/just-bash.d.ts +0 -1
- package/dist/src/public/sandbox/backends/just-bash.js +0 -1
- package/dist/src/public/sandbox/backends/microsandbox.d.ts +0 -1
- package/dist/src/public/sandbox/backends/microsandbox.js +0 -1
- package/dist/src/public/sandbox/backends/vercel.d.ts +0 -1
- package/dist/src/public/sandbox/backends/vercel.js +0 -1
- package/dist/src/runtime/sandbox/keys.d.ts +0 -42
- package/dist/src/runtime/sandbox/keys.js +0 -1
- package/dist/src/runtime/sandbox/template-plan.d.ts +0 -24
- package/dist/src/runtime/sandbox/template-plan.js +0 -1
- package/dist/src/sandbox/backends/default.d.ts +0 -42
- package/dist/src/sandbox/backends/default.js +0 -1
- package/dist/src/sandbox/backends/docker.d.ts +0 -14
- package/dist/src/sandbox/backends/docker.js +0 -1
- package/dist/src/sandbox/backends/just-bash.d.ts +0 -17
- package/dist/src/sandbox/backends/just-bash.js +0 -1
- package/dist/src/sandbox/backends/microsandbox.d.ts +0 -17
- package/dist/src/sandbox/backends/microsandbox.js +0 -1
- package/dist/src/sandbox/backends/vercel.d.ts +0 -30
- package/dist/src/sandbox/backends/vercel.js +0 -1
- package/dist/src/shared/sandbox-backend.d.ts +0 -176
- package/dist/src/shared/sandbox-backend.js +0 -1
- package/dist/src/shared/sandbox-definition.d.ts +0 -112
- package/dist/src/shared/sandbox-definition.js +0 -1
- package/docs/sandbox.mdx +0 -342
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{randomUUID}from"node:crypto";import{access,cp,mkdir,rename,rm,utimes}from"node:fs/promises";import{dirname,join}from"node:path";import{resolveSandboxModelPath}from"#shared/skill-paths.js";import{WORKSPACE_ROOT}from"#runtime/workspace/types.js";import{bufferToStream,streamToBuffer}from"#execution/sandbox/stream-utils.js";function createFileBackedInternalSandboxSession(e){return{id:e.id,resolvePath:resolveWorkspacePath,async spawn(t){return await e.sandbox.spawn(t)},async readFile(t){let n=await e.sandbox.readFileBytes(t.path);return n===null?null:bufferToStream(n)},async removePath(t){await e.sandbox.removePath(t)},async writeFile(t){let n=await streamToBuffer(t.content);await e.sandbox.writeFiles([{content:n,path:t.path}])}}}function resolveWorkspacePath(e){return e.startsWith(`/`)?e:`${WORKSPACE_ROOT}/${e}`}async function pathExists(e){try{return await access(e),!0}catch{return!1}}async function copyDirectoryAtomically(e,t){let n=`${t}.${randomUUID()}.tmp`;await rm(n,{force:!0,recursive:!0}),await mkdir(dirname(t),{recursive:!0});try{await cp(e,n,{recursive:!0}),await rename(n,t)}catch(e){if(await rm(n,{force:!0,recursive:!0}).catch(()=>{}),await pathExists(t))return;throw e}}async function touchDirectory(e){let t=new Date;await utimes(e,t,t)}function resolveLocalBackendTemplateRootPath(e,t,n){return join(resolveLocalBackendTemplatesDirectory(e,t),n)}function resolveLocalBackendTemplatesDirectory(e,t){return join(e,t,`templates`)}function resolveLocalBackendSessionRootPath(e,t,n){return join(e,t,`sessions`,n)}async function writeSandboxSeedFiles(e,t){for(let n of t){let t=await resolveSandboxModelPath({path:n.path,sandbox:e});typeof n.content==`string`?await e.writeTextFile({content:n.content,path:t}):await e.writeBinaryFile({content:n.content,path:t})}}export{copyDirectoryAtomically,createFileBackedInternalSandboxSession,pathExists,resolveLocalBackendSessionRootPath,resolveLocalBackendTemplateRootPath,resolveLocalBackendTemplatesDirectory,resolveWorkspacePath,touchDirectory,writeSandboxSeedFiles};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type RuntimeCompiledArtifactsSource } from "#runtime/compiled-artifacts-source.js";
|
|
2
|
-
export declare function startDevelopmentSandboxPrewarmInBackground(input: {
|
|
3
|
-
readonly appRoot: string;
|
|
4
|
-
readonly compiledArtifactsSource: RuntimeCompiledArtifactsSource;
|
|
5
|
-
readonly log?: (message: string) => void;
|
|
6
|
-
}): void;
|
|
7
|
-
export declare function subscribeDevelopmentSandboxPrewarmLogs(input: {
|
|
8
|
-
readonly appRoot: string;
|
|
9
|
-
readonly log: (message: string) => void;
|
|
10
|
-
}): () => void;
|
|
11
|
-
export declare function waitForDevelopmentSandboxPrewarm(input: {
|
|
12
|
-
readonly appRoot: string;
|
|
13
|
-
readonly compiledArtifactsSource: RuntimeCompiledArtifactsSource;
|
|
14
|
-
readonly log?: (message: string) => void;
|
|
15
|
-
}): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{prewarmAppSandboxes}from"./prewarm.js";import{toErrorMessage}from"#shared/errors.js";import{getRuntimeCompiledArtifactsAppRoot,getRuntimeCompiledArtifactsSandboxAppRoot}from"#runtime/compiled-artifacts-source.js";const pendingDevelopmentPrewarms=new Map,retainedDevelopmentPrewarmLogs=new Map,completedDevelopmentPrewarmSignatures=new Map;function startDevelopmentSandboxPrewarmInBackground(e){let t=resolvePrewarmKeys(e),n=findPendingPrewarm(t);if(n!==void 0){registerPrewarmAliases(t,n);return}let r={logs:[],promise:Promise.resolve(),subscribers:new Set};for(let e of t)retainedDevelopmentPrewarmLogs.delete(e);let i=resolvePrewarmSignatureCacheKey(e),a=prewarmAppSandboxes({appRoot:e.appRoot,compiledArtifactsSource:e.compiledArtifactsSource,log:t=>recordPrewarmLog(r,t,e.log),onPrewarmSignature:e=>{completedDevelopmentPrewarmSignatures.set(i,e)},shouldPrewarmSignature:e=>completedDevelopmentPrewarmSignatures.get(i)!==e});r.promise=a,registerPrewarmAliases(t,r),a.catch(t=>{recordPrewarmLog(r,`eve: failed to initialize sandbox templates in the background: ${toErrorMessage(t)}`,e.log)}).finally(()=>{for(let e of t)pendingDevelopmentPrewarms.get(e)===r&&pendingDevelopmentPrewarms.delete(e),r.subscribers.size===0&&r.logs.length>0&&retainedDevelopmentPrewarmLogs.set(e,[...r.logs])})}function subscribeDevelopmentSandboxPrewarmLogs(e){let t=findPendingPrewarm([e.appRoot]);if(t!==void 0){for(let n of t.logs)e.log(n);return t.subscribers.add(e.log),()=>t.subscribers.delete(e.log)}let n=retainedDevelopmentPrewarmLogs.get(e.appRoot);if(n===void 0)return()=>{};retainedDevelopmentPrewarmLogs.delete(e.appRoot);for(let t of n)e.log(t);return()=>{}}async function waitForDevelopmentSandboxPrewarm(e){let t=findPendingPrewarm(resolvePrewarmKeys(e));if(t===void 0)return;let unsubscribe;if(e.log!==void 0){for(let n of t.logs)e.log(n);let subscriber=t=>e.log?.(t);t.subscribers.add(subscriber),unsubscribe=()=>t.subscribers.delete(subscriber)}try{await withProgressHeartbeat(`waiting for background sandbox template prewarm`,e.log,()=>t.promise)}finally{unsubscribe?.()}}function resolvePrewarmKeys(e){let t=new Set([e.appRoot]),n=getRuntimeCompiledArtifactsAppRoot(e.compiledArtifactsSource);n!==void 0&&t.add(n);let r=getRuntimeCompiledArtifactsSandboxAppRoot(e.compiledArtifactsSource);return r!==void 0&&t.add(r),[...t]}function resolvePrewarmSignatureCacheKey(e){return getRuntimeCompiledArtifactsSandboxAppRoot(e.compiledArtifactsSource)??e.appRoot}function findPendingPrewarm(e){for(let t of e){let e=pendingDevelopmentPrewarms.get(t);if(e!==void 0)return e}}function registerPrewarmAliases(e,t){for(let n of e)pendingDevelopmentPrewarms.set(n,t)}function recordPrewarmLog(e,t,n){e.logs.push(t),e.logs.length>50&&e.logs.splice(0,e.logs.length-50),n?.(t);for(let n of e.subscribers)n(t)}async function withProgressHeartbeat(e,t,n){if(t===void 0)return await n();let r=Date.now(),i=setInterval(()=>{t(`${e} (${Math.round((Date.now()-r)/1e3)}s elapsed)`)},1e4);i.unref?.();try{return await n()}finally{clearInterval(i)}}export{startDevelopmentSandboxPrewarmInBackground,subscribeDevelopmentSandboxPrewarmLogs,waitForDevelopmentSandboxPrewarm};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { SandboxBackend } from "#public/definitions/sandbox-backend.js";
|
|
2
|
-
/**
|
|
3
|
-
* Wraps a backend-producing function in a `SandboxBackend` proxy that
|
|
4
|
-
* invokes the function exactly once, on first access to any of `.name`,
|
|
5
|
-
* `.create`, or `.prewarm`. Subsequent accesses return the same cached
|
|
6
|
-
* underlying backend.
|
|
7
|
-
*
|
|
8
|
-
* Used by `defaultSandbox()` for env-conditional selection, and by the
|
|
9
|
-
* authored-definition normalizer when an author passes a callback to
|
|
10
|
-
* `SandboxDefinition.backend` (e.g. `backend: () => vercel({...})`)
|
|
11
|
-
* so the factory runs at first use rather than at module load — while
|
|
12
|
-
* still preserving backend-internal state (such as the Vercel backend's
|
|
13
|
-
* prewarmed-templates map) across every framework call.
|
|
14
|
-
*/
|
|
15
|
-
export declare function lazyBackend<BO, SO>(factory: () => SandboxBackend<BO, SO>): SandboxBackend<BO, SO>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function lazyBackend(e){let t;function resolve(){return t===void 0&&(t=e()),t}return{get name(){return resolve().name},create(e){return resolve().create(e)},prewarm(e){return resolve().prewarm(e)}}}export{lazyBackend};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface SandboxTemplatePrewarmLockInput {
|
|
2
|
-
readonly appRoot: string;
|
|
3
|
-
readonly backendName: string;
|
|
4
|
-
readonly log?: (message: string) => void;
|
|
5
|
-
readonly templateKey: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function waitForSandboxTemplatePrewarmLock(input: SandboxTemplatePrewarmLockInput): Promise<void>;
|
|
8
|
-
export declare function withSandboxTemplatePrewarmLock<T>(input: SandboxTemplatePrewarmLockInput, callback: () => Promise<T>): Promise<T>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{mkdir,rm,stat,writeFile}from"node:fs/promises";import{dirname,join}from"node:path";import{resolveSandboxCacheDirectory}from"#internal/application/paths.js";const LOCK_TIMEOUT_MS=9e5;async function waitForSandboxTemplatePrewarmLock(e){await waitForLockRelease(resolveSandboxTemplatePrewarmLockPath(e),e.log)}async function withSandboxTemplatePrewarmLock(e,t){let n=resolveSandboxTemplatePrewarmLockPath(e);await acquireLock(n);try{return await t()}finally{await rm(n,{force:!0,recursive:!0}).catch(()=>{})}}function resolveSandboxTemplatePrewarmLockPath(e){return join(resolveSandboxCacheDirectory(e.appRoot),`template-locks`,e.backendName,`${e.templateKey}.lock`)}async function acquireLock(e){let t=Date.now();for(;;){await mkdir(dirname(e),{recursive:!0});try{await mkdir(e),await writeFile(join(e,`owner.json`),`${JSON.stringify({createdAt:new Date().toISOString(),pid:process.pid})}\n`);return}catch(n){if(!isFileExistsError(n))throw n;await waitForExistingLock(e,t,void 0)}}}async function waitForLockRelease(e,t){let n=Date.now(),r=n+1e4;for(;;){try{await stat(e)}catch(e){if(isNotFoundError(e))return;throw e}let i=Date.now();if(t!==void 0&&i>=r){let e=Math.round((i-n)/1e3);t(e===0?`waiting for sandbox template prewarm to finish`:`waiting for sandbox template prewarm to finish (${e}s elapsed)`),r=i+1e4}await waitForExistingLock(e,n,t)}}async function waitForExistingLock(e,t,n){let r=await stat(e).catch(e=>{if(isNotFoundError(e))return null;throw e});if(r!==null){if(Date.now()-r.mtimeMs>18e5){n?.(`removing stale sandbox template prewarm lock`),await rm(e,{force:!0,recursive:!0}).catch(()=>{});return}if(Date.now()-t>LOCK_TIMEOUT_MS)throw Error(`Timed out waiting for sandbox template prewarm lock "${e}" after ${LOCK_TIMEOUT_MS}ms.`);await new Promise(e=>setTimeout(e,250))}}function isFileExistsError(e){return typeof e==`object`&&!!e&&`code`in e&&e.code===`EEXIST`}function isNotFoundError(e){return typeof e==`object`&&!!e&&`code`in e&&e.code===`ENOENT`}export{waitForSandboxTemplatePrewarmLock,withSandboxTemplatePrewarmLock};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { SandboxBackend } from "#public/definitions/sandbox-backend.js";
|
|
2
|
-
import type { SandboxDefinition, SandboxRevalidationKeyFn } from "#public/definitions/sandbox.js";
|
|
3
|
-
type NormalizedSandboxDefinition = Readonly<Omit<SandboxDefinition, "backend">> & {
|
|
4
|
-
readonly backend?: SandboxBackend;
|
|
5
|
-
readonly description?: string;
|
|
6
|
-
readonly revalidationKey?: SandboxRevalidationKeyFn;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Normalizes one authored sandbox definition into the canonical internal
|
|
10
|
-
* shape. If the author supplied a `backend` callback (e.g.
|
|
11
|
-
* `backend: () => vercel({...})`), it is wrapped via
|
|
12
|
-
* {@link lazyBackend} so downstream consumers always see a plain
|
|
13
|
-
* `SandboxBackend` value — the callback fires exactly once on first
|
|
14
|
-
* access and the resulting backend is memoized.
|
|
15
|
-
*/
|
|
16
|
-
export declare function normalizeSandboxDefinition(value: unknown, message: string): NormalizedSandboxDefinition;
|
|
17
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{expectFunction,expectObjectRecord,expectOnlyKnownKeys}from"#internal/authored-module.js";import{lazyBackend}from"#execution/sandbox/lazy-backend.js";function normalizeSandboxDefinition(e,t){let n=expectObjectRecord(e,t);expectOnlyKnownKeys(n,[`backend`,`bootstrap`,`description`,`onSession`,`revalidationKey`],t);let r={};if(n.backend!==void 0&&(r.backend=expectSandboxBackend(n.backend,t)),n.description!==void 0){if(typeof n.description!=`string`)throw Error(`${t} The "description" field must be a string when set.`);r.description=n.description}if(n.bootstrap!==void 0&&(r.bootstrap=expectFunction(n.bootstrap,t)),n.revalidationKey!==void 0&&(r.revalidationKey=expectFunction(n.revalidationKey,t)),r.bootstrap===void 0&&r.revalidationKey!==void 0)throw Error(`${t} The "revalidationKey" field can only be set when "bootstrap" is set.`);return n.onSession!==void 0&&(r.onSession=expectFunction(n.onSession,t)),r}function expectSandboxBackend(e,t){if(typeof e==`function`)return lazyBackend(e);let n=expectObjectRecord(e,`${t} The "backend" field must be a SandboxBackend value (use docker(), vercel(), or your own factory) or a zero-arg function returning one.`);if(typeof n.name!=`string`||n.name.length===0)throw Error(`${t} The "backend" value must expose a non-empty string "name" identifier.`);if(typeof n.create!=`function`)throw Error(`${t} The "backend" value must expose a "create" function.`);if(n.prewarm!==void 0&&typeof n.prewarm!=`function`)throw Error(`${t} The "backend.prewarm" property must be a function when set.`);return n}export{normalizeSandboxDefinition};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
interface BundlerPluginShape {
|
|
2
|
-
readonly name: string;
|
|
3
|
-
load?(id: string): string | null | undefined;
|
|
4
|
-
resolveId?(source: string, importer: string | undefined): string | {
|
|
5
|
-
id: string;
|
|
6
|
-
} | null | undefined;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Creates the bundler plugin that prunes the local sandbox backends
|
|
10
|
-
* (Docker, just-bash, microsandbox) from hosted Nitro server bundles.
|
|
11
|
-
* Every local-engine export flows through `bindings/local.js`, so
|
|
12
|
-
* stubbing that one module removes all of them; the stub mirrors the
|
|
13
|
-
* facade's export surface.
|
|
14
|
-
*/
|
|
15
|
-
export declare function createCompiledSandboxBackendPrunePlugin(): BundlerPluginShape;
|
|
16
|
-
export {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const PRUNED_LOCAL_SANDBOX_MODULE_ID=`\0eve-pruned-local-sandbox-backends`,LOCAL_BINDING_SOURCE_RE=/[/\\]bindings[/\\]local\.js$/;function createCompiledSandboxBackendPrunePlugin(){return{name:`eve-hosted-sandbox-backend-prune`,load(e){return e===PRUNED_LOCAL_SANDBOX_MODULE_ID?[`function pruned() {`,` throw new Error("Local sandbox backends are pruned from hosted server bundles.");`,`}`,`export const createDockerSandboxBackend = pruned;`,`export const createJustBashSandboxBackend = pruned;`,`export const createMicrosandboxSandboxBackend = pruned;`,`export const DOCKER_BACKEND_NAME = "docker";`,`export const JUST_BASH_BACKEND_NAME = "just-bash";`,`export const MICROSANDBOX_BACKEND_NAME = "microsandbox";`,`export const isLinuxDockerDaemonAvailableSync = () => false;`,`export const isMicrosandboxPlatformSupported = () => false;`,`export const pruneDockerSandboxTemplates = pruned;`,`export const pruneJustBashSandboxTemplates = pruned;`,`export const pruneMicrosandboxTemplates = pruned;`,`export const pruneLocalSandboxTemplates = pruned;`,`export const pruneLocalSandboxTemplatesInBackground = pruned;`,`export const stopDevelopmentSandboxResources = pruned;`,``].join(`
|
|
2
|
-
`):null},resolveId(e){return LOCAL_BINDING_SOURCE_RE.test(e)?PRUNED_LOCAL_SANDBOX_MODULE_ID:null}}}export{createCompiledSandboxBackendPrunePlugin};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export type { SandboxBackendHandle, SandboxBackendSessionState, SandboxDeleteOptions, SandboxSeedFile, SandboxBackendTags, SandboxBackendRuntimeContext, SandboxBackendCreateInput, SandboxBackendPrewarmInput, SandboxBackendPrewarmResult, SandboxBackend, } from "#shared/sandbox-backend.js";
|
|
2
|
-
/**
|
|
3
|
-
* Thrown by a backend's `create` when the requested template was never
|
|
4
|
-
* provisioned. Run `eve build` or call `prewarmAppSandboxes()` before
|
|
5
|
-
* serving traffic. `backendName` and `templateKey` identify the missing
|
|
6
|
-
* template. Use {@link SandboxTemplateNotProvisionedError.is} to narrow.
|
|
7
|
-
*/
|
|
8
|
-
export declare class SandboxTemplateNotProvisionedError extends Error {
|
|
9
|
-
readonly backendName: string;
|
|
10
|
-
readonly templateKey: string;
|
|
11
|
-
constructor(input: {
|
|
12
|
-
readonly backendName: string;
|
|
13
|
-
readonly templateKey: string;
|
|
14
|
-
});
|
|
15
|
-
/** Type guard for {@link SandboxTemplateNotProvisionedError}. */
|
|
16
|
-
static is(error: unknown): error is SandboxTemplateNotProvisionedError;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var SandboxTemplateNotProvisionedError=class SandboxTemplateNotProvisionedError extends Error{backendName;templateKey;constructor(e){super(`Sandbox template "${e.templateKey}" is not provisioned for backend "${e.backendName}". Run \`eve build\` or invoke \`prewarmAppSandboxes()\` before serving traffic.`),this.name=`SandboxTemplateNotProvisionedError`,this.backendName=e.backendName,this.templateKey=e.templateKey}static is(e){return e instanceof SandboxTemplateNotProvisionedError||typeof e==`object`&&!!e&&e.name===`SandboxTemplateNotProvisionedError`&&typeof e.backendName==`string`&&typeof e.templateKey==`string`}};export{SandboxTemplateNotProvisionedError};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "#sandbox/backends/default.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from"#sandbox/backends/default.js";export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "#sandbox/backends/docker.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from"#sandbox/backends/docker.js";export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "#sandbox/backends/just-bash.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from"#sandbox/backends/just-bash.js";export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "#sandbox/backends/microsandbox.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from"#sandbox/backends/microsandbox.js";export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "#sandbox/backends/vercel.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from"#sandbox/backends/vercel.js";export{};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type RuntimeCompiledArtifactsSource } from "#runtime/compiled-artifacts-source.js";
|
|
2
|
-
import type { RuntimeSandboxTemplatePlan } from "#runtime/sandbox/template-plan.js";
|
|
3
|
-
/**
|
|
4
|
-
* Input for deriving the stable runtime keys used for one sandbox definition.
|
|
5
|
-
*/
|
|
6
|
-
interface CreateRuntimeSandboxKeysInput {
|
|
7
|
-
readonly backendName: string;
|
|
8
|
-
readonly compiledArtifactsSource: RuntimeCompiledArtifactsSource;
|
|
9
|
-
readonly nodeId: string;
|
|
10
|
-
readonly sessionId: string;
|
|
11
|
-
readonly sourceId: string;
|
|
12
|
-
readonly templatePlan: RuntimeSandboxTemplatePlan;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Creates the stable runtime template and session keys for one sandbox
|
|
16
|
-
* definition under the current artifact source and backend.
|
|
17
|
-
*
|
|
18
|
-
* Both keys derive from one {@link RuntimeSandboxKeyParts} value, so the
|
|
19
|
-
* coupling holds by construction: the session key rotates exactly when
|
|
20
|
-
* the template content rotates.
|
|
21
|
-
*/
|
|
22
|
-
export declare function createRuntimeSandboxKeys(input: CreateRuntimeSandboxKeysInput): Promise<{
|
|
23
|
-
readonly sessionKey: string;
|
|
24
|
-
readonly templateKey: string | null;
|
|
25
|
-
}>;
|
|
26
|
-
/**
|
|
27
|
-
* Creates the stable reusable template key for one sandbox definition,
|
|
28
|
-
* or `null` when the sandbox should start from a fresh backend runtime.
|
|
29
|
-
*
|
|
30
|
-
* The template key factors in the graph `nodeId` so that two
|
|
31
|
-
* runtime agents (root and subagents) do not collide on the same
|
|
32
|
-
* template when they each own a sandbox authored at the same logical
|
|
33
|
-
* path.
|
|
34
|
-
*/
|
|
35
|
-
export declare function createRuntimeSandboxTemplateKey(input: {
|
|
36
|
-
readonly backendName: string;
|
|
37
|
-
readonly compiledArtifactsSource: RuntimeCompiledArtifactsSource;
|
|
38
|
-
readonly nodeId: string;
|
|
39
|
-
readonly sourceId: string;
|
|
40
|
-
readonly templatePlan: RuntimeSandboxTemplatePlan;
|
|
41
|
-
}): Promise<string | null>;
|
|
42
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createHash}from"node:crypto";import{realpath}from"node:fs/promises";import{resolveVercelProjectIdFromEnvironment}from"#shared/vercel-project.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{getRuntimeCompiledArtifactsCacheKey,getRuntimeCompiledArtifactsSandboxAppRoot}from"#runtime/compiled-artifacts-source.js";import{loadCompileMetadata}from"#runtime/loaders/compile-metadata.js";async function createRuntimeSandboxKeys(e){let t=await deriveRuntimeSandboxKeyParts(e);return{sessionKey:buildRuntimeSandboxSessionKey(e,t),templateKey:buildRuntimeSandboxTemplateKey(e,t)}}async function createRuntimeSandboxTemplateKey(e){return buildRuntimeSandboxTemplateKey(e,await deriveRuntimeSandboxKeyParts(e))}async function deriveRuntimeSandboxKeyParts(e){return{metadata:await loadCompileMetadataForKeys(e.compiledArtifactsSource),scope:await resolveRuntimeSandboxScope(e),versionHash:e.templatePlan.kind===`none`?null:resolveRuntimeSandboxVersionHash({nodeId:e.nodeId,sourceId:e.sourceId,templatePlan:e.templatePlan})}}function buildRuntimeSandboxTemplateKey(e,t){if(t.versionHash===null)return null;let n=createStableHash(`${resolvePackageVersionForTemplateKey(t.metadata)}:7:${t.versionHash}`).slice(0,20);return sanitizeRuntimeSandboxKey(`eve-sbx-tpl-${e.backendName}-${t.scope}-${n}`)}function buildRuntimeSandboxSessionKey(e,t){let n=createStableHash(`7:${t.versionHash??`none`}`).slice(0,12),r=sanitizeRuntimeSandboxKey(e.nodeId);return sanitizeRuntimeSandboxKey(`eve-sbx-ses-${e.backendName}-${t.scope}-${n}-${e.sessionId}-${r}`)}function resolvePackageVersionForTemplateKey(e){return e?.generator.version??resolveInstalledPackageInfo().version}async function loadCompileMetadataForKeys(e){try{return await loadCompileMetadata({compiledArtifactsSource:e})}catch{return null}}async function resolveRuntimeSandboxScope(e){if(e.backendName===`vercel`){let e=resolveVercelProjectIdFromEnvironment();if(e!==void 0)return createStableHash(`vercel-project:${e}`).slice(0,16)}let t=getRuntimeCompiledArtifactsSandboxAppRoot(e.compiledArtifactsSource);return t===void 0?createStableHash(getRuntimeCompiledArtifactsCacheKey(e.compiledArtifactsSource)).slice(0,16):createStableHash(await realpath(t)).slice(0,16)}function resolveRuntimeSandboxVersionHash(e){let t=e.templatePlan.contentHash??``;return e.templatePlan.kind===`bootstrap`?createStableHash(`bootstrap:${e.templatePlan.revalidationKey??``}:${e.templatePlan.sourceHash}:${t}:${e.nodeId}:${e.sourceId}`):createStableHash(`workspace-content:${t}:${e.nodeId}:${e.sourceId}`)}function createStableHash(e){return createHash(`sha256`).update(e).digest(`hex`)}function sanitizeRuntimeSandboxKey(e){return e.replaceAll(/[^a-zA-Z0-9._-]+/g,`-`).slice(0,120)}export{createRuntimeSandboxKeys,createRuntimeSandboxTemplateKey};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { CompiledWorkspaceResourceRoot } from "#compiler/manifest.js";
|
|
2
|
-
import type { ResolvedSandboxDefinition } from "#runtime/types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Describes whether one sandbox needs a prewarmed template and, if so,
|
|
5
|
-
* which inputs must participate in the template key.
|
|
6
|
-
*/
|
|
7
|
-
export type RuntimeSandboxTemplatePlan = {
|
|
8
|
-
readonly kind: "none";
|
|
9
|
-
} | {
|
|
10
|
-
readonly contentHash?: string;
|
|
11
|
-
readonly kind: "workspace-content";
|
|
12
|
-
} | {
|
|
13
|
-
readonly contentHash?: string;
|
|
14
|
-
readonly kind: "bootstrap";
|
|
15
|
-
readonly revalidationKey?: string;
|
|
16
|
-
readonly sourceHash: string;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Chooses the template strategy for one resolved sandbox definition.
|
|
20
|
-
*/
|
|
21
|
-
export declare function createRuntimeSandboxTemplatePlan(input: {
|
|
22
|
-
readonly definition: ResolvedSandboxDefinition;
|
|
23
|
-
readonly workspaceResourceRoot: CompiledWorkspaceResourceRoot;
|
|
24
|
-
}): RuntimeSandboxTemplatePlan;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function createRuntimeSandboxTemplatePlan(e){if(e.definition.bootstrap!==void 0){if(e.definition.sourceHash===void 0)throw Error(`Sandbox "${e.definition.logicalPath}" defines bootstrap() but has no compiled sourceHash.`);return{contentHash:e.workspaceResourceRoot.contentHash,kind:`bootstrap`,revalidationKey:e.definition.revalidationKey,sourceHash:e.definition.sourceHash}}return e.workspaceResourceRoot.contentHash===void 0&&e.workspaceResourceRoot.rootEntries.length===0?{kind:`none`}:{contentHash:e.workspaceResourceRoot.contentHash,kind:`workspace-content`}}export{createRuntimeSandboxTemplatePlan};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type DefaultSandboxProbes } from "./probes.js";
|
|
2
|
-
import type { SandboxBackend } from "#public/definitions/sandbox-backend.js";
|
|
3
|
-
import type { DockerSandboxCreateOptions } from "#public/sandbox/docker-sandbox.js";
|
|
4
|
-
import type { JustBashSandboxCreateOptions } from "#public/sandbox/just-bash-sandbox.js";
|
|
5
|
-
import type { MicrosandboxSandboxCreateOptions } from "#public/sandbox/microsandbox-sandbox.js";
|
|
6
|
-
import type { VercelSandboxCreateOptions } from "#public/sandbox/vercel-sandbox.js";
|
|
7
|
-
export { SANDBOX_BACKEND_PROBES, type DefaultSandboxProbes } from "./probes.js";
|
|
8
|
-
/**
|
|
9
|
-
* Input to {@link defaultSandbox}: a separate options bag per inner
|
|
10
|
-
* backend. The framework picks one backend at runtime based on
|
|
11
|
-
* availability and passes it the matching bag; the others are ignored.
|
|
12
|
-
*/
|
|
13
|
-
export interface DefaultSandboxOptions {
|
|
14
|
-
readonly docker?: DockerSandboxCreateOptions;
|
|
15
|
-
readonly justBash?: JustBashSandboxCreateOptions;
|
|
16
|
-
readonly microsandbox?: MicrosandboxSandboxCreateOptions;
|
|
17
|
-
readonly vercel?: VercelSandboxCreateOptions;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Constructs an availability-aware sandbox backend. On first use it
|
|
21
|
-
* picks the best backend the host supports, in priority order:
|
|
22
|
-
*
|
|
23
|
-
* 1. **Vercel Sandbox** when deploying on Vercel (`process.env.VERCEL`
|
|
24
|
-
* is set) — local container/VM runtimes cannot run there.
|
|
25
|
-
* 2. **Docker** when a Linux-container Docker daemon is reachable.
|
|
26
|
-
* 3. **microsandbox** when the host supports it (macOS on Apple
|
|
27
|
-
* Silicon, or glibc Linux with KVM); `eve dev` auto-installs the
|
|
28
|
-
* package into the project.
|
|
29
|
-
* 4. **just-bash** as the dependency-free fallback; `eve dev`
|
|
30
|
-
* auto-installs the package into the project.
|
|
31
|
-
*
|
|
32
|
-
* The selection is cached for the process lifetime. To pin a backend
|
|
33
|
-
* unconditionally, configure its factory directly (`docker()`,
|
|
34
|
-
* `microsandbox()`, `justbash()`,
|
|
35
|
-
* `vercel()`).
|
|
36
|
-
*/
|
|
37
|
-
export declare function defaultSandbox(opts?: DefaultSandboxOptions): SandboxBackend;
|
|
38
|
-
/**
|
|
39
|
-
* The selection chain behind {@link defaultSandbox}. Internal —
|
|
40
|
-
* exported for tests, which inject probes.
|
|
41
|
-
*/
|
|
42
|
-
export declare function selectDefaultSandbox(opts: DefaultSandboxOptions | undefined, probes: DefaultSandboxProbes): SandboxBackend;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SANDBOX_BACKEND_PROBES}from"./probes.js";import{lazyBackend}from"#execution/sandbox/lazy-backend.js";import{docker}from"#sandbox/backends/docker.js";import{justbash}from"#sandbox/backends/just-bash.js";import{microsandbox}from"#sandbox/backends/microsandbox.js";import{vercel}from"#sandbox/backends/vercel.js";function defaultSandbox(e){return lazyBackend(()=>selectDefaultSandbox(e,SANDBOX_BACKEND_PROBES))}function selectDefaultSandbox(e,t){return t.isDeployedOnVercel()?vercel(e?.vercel):t.isDockerAvailable()?docker(e?.docker):t.isMicrosandboxSupported()?microsandbox(e?.microsandbox):justbash(e?.justBash)}export{SANDBOX_BACKEND_PROBES,defaultSandbox,selectDefaultSandbox};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { SandboxBackend } from "#public/definitions/sandbox-backend.js";
|
|
2
|
-
import type { DockerSandboxCreateOptions } from "#public/sandbox/docker-sandbox.js";
|
|
3
|
-
/**
|
|
4
|
-
* Constructs the Docker sandbox backend: the workspace runs inside a
|
|
5
|
-
* real Linux container driven through the Docker CLI, using the
|
|
6
|
-
* official Ubuntu 26.04 image by default.
|
|
7
|
-
*
|
|
8
|
-
* Requires a running Docker-compatible daemon reachable through a
|
|
9
|
-
* `docker` CLI (Docker Desktop, OrbStack, Colima, Podman via its
|
|
10
|
-
* docker-compatible CLI, …; override the binary with `EVE_DOCKER_PATH`).
|
|
11
|
-
* Configuring this backend pins it unconditionally — when you want
|
|
12
|
-
* fallback behavior, use `defaultBackend()` instead.
|
|
13
|
-
*/
|
|
14
|
-
export declare function docker(opts?: DockerSandboxCreateOptions): SandboxBackend;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createDockerSandboxBackend}from"#execution/sandbox/bindings/local.js";function docker(e){return createDockerSandboxBackend({createOptions:e})}export{docker};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { SandboxBackend } from "#public/definitions/sandbox-backend.js";
|
|
2
|
-
import type { JustBashSandboxCreateOptions } from "#public/sandbox/just-bash-sandbox.js";
|
|
3
|
-
/**
|
|
4
|
-
* Constructs the just-bash sandbox backend: a pure-JS bash interpreter
|
|
5
|
-
* over a virtual filesystem stored under `.eve/sandbox-cache/`. It
|
|
6
|
-
* needs no daemon or VM, but commands run in a simulated shell — no
|
|
7
|
-
* real binaries (`git`, `node`, package managers) and no network
|
|
8
|
-
* isolation.
|
|
9
|
-
*
|
|
10
|
-
* The `just-bash` package is not bundled with eve. When it is missing,
|
|
11
|
-
* `eve dev` installs it into the application automatically (disable
|
|
12
|
-
* with `autoInstall: false`); production processes fail with an
|
|
13
|
-
* actionable install error instead. Configuring this backend pins it
|
|
14
|
-
* unconditionally — when you want fallback behavior, use
|
|
15
|
-
* `defaultBackend()` instead.
|
|
16
|
-
*/
|
|
17
|
-
export declare function justbash(opts?: JustBashSandboxCreateOptions): SandboxBackend;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createJustBashSandboxBackend}from"#execution/sandbox/bindings/local.js";function justbash(e){return createJustBashSandboxBackend({createOptions:e})}export{justbash};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { SandboxBackend } from "#public/definitions/sandbox-backend.js";
|
|
2
|
-
import type { MicrosandboxBootstrapUseOptions, MicrosandboxSandboxCreateOptions, MicrosandboxSessionUseOptions } from "#public/sandbox/microsandbox-sandbox.js";
|
|
3
|
-
/**
|
|
4
|
-
* Constructs the microsandbox sandbox backend: lightweight local VMs
|
|
5
|
-
* via [microsandbox](https://www.npmjs.com/package/microsandbox) with
|
|
6
|
-
* snapshot-backed templates and a firewall capable of domain-level
|
|
7
|
-
* network policies and credential brokering.
|
|
8
|
-
*
|
|
9
|
-
* Supported hosts: macOS on Apple Silicon, or Linux (glibc) with KVM
|
|
10
|
-
* enabled. The `microsandbox` package is not bundled with eve. When it
|
|
11
|
-
* (or its VM runtime) is missing, `eve dev` installs both
|
|
12
|
-
* automatically (disable with `setup: { autoInstall: false }`);
|
|
13
|
-
* production processes fail with actionable errors instead.
|
|
14
|
-
* Configuring this backend pins it unconditionally — when you want
|
|
15
|
-
* fallback behavior, use `defaultBackend()` instead.
|
|
16
|
-
*/
|
|
17
|
-
export declare function microsandbox(opts?: MicrosandboxSandboxCreateOptions): SandboxBackend<MicrosandboxBootstrapUseOptions, MicrosandboxSessionUseOptions>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createMicrosandboxSandboxBackend}from"#execution/sandbox/bindings/local.js";function microsandbox(e){return createMicrosandboxSandboxBackend({createOptions:e})}export{microsandbox};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { SandboxBackend } from "#public/definitions/sandbox-backend.js";
|
|
2
|
-
import type { VercelSandboxBootstrapUseOptions, VercelSandboxOptions, VercelSandboxSessionUseOptions } from "#public/sandbox/vercel-sandbox.js";
|
|
3
|
-
/**
|
|
4
|
-
* Constructs the [Vercel Sandbox](https://vercel.com/docs/sandbox)
|
|
5
|
-
* backend. Configuring this backend pins it unconditionally —
|
|
6
|
-
* including for local development, where it creates real hosted
|
|
7
|
-
* sandboxes (requires Vercel credentials).
|
|
8
|
-
*
|
|
9
|
-
* The optional provider creation fields are forwarded to Vercel Sandbox creation
|
|
10
|
-
* for every fresh sandbox the framework creates (template at prewarm,
|
|
11
|
-
* session at first-time create). On resume (`Sandbox.get`), no create
|
|
12
|
-
* happens, so opts are not re-applied. `networkPolicy` is applied after
|
|
13
|
-
* framework-owned base setup for fresh templates and template-less
|
|
14
|
-
* sessions, before authored bootstrap code runs.
|
|
15
|
-
*
|
|
16
|
-
* `opts.source`, if supplied, is used only on the template create:
|
|
17
|
-
* the author's snapshot, git revision, or tarball becomes the base
|
|
18
|
-
* layer of the template. Bootstrap, seed files, and framework setup
|
|
19
|
-
* still run on top, and every session derives from the resulting
|
|
20
|
-
* eve-owned snapshot. `source` is stripped from session creates so the
|
|
21
|
-
* framework's snapshot always wins.
|
|
22
|
-
*
|
|
23
|
-
* `bootstrap({ use })` applies its options to the template via
|
|
24
|
-
* `sandbox.update(...)`; those settings persist into the snapshot.
|
|
25
|
-
* `onSession({ use })` applies its options to the live session via the
|
|
26
|
-
* SDK's `update` under the hood, overriding any overlapping field
|
|
27
|
-
* from `opts`. `sessionCreateOptions`, when provided, is resolved only
|
|
28
|
-
* when creating a fresh live session and can attach session-specific Drives.
|
|
29
|
-
*/
|
|
30
|
-
export declare function vercel(opts?: VercelSandboxOptions): SandboxBackend<VercelSandboxBootstrapUseOptions, VercelSandboxSessionUseOptions>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createVercelSandbox}from"#execution/sandbox/bindings/vercel.js";function vercel(e){let{sessionCreateOptions:t,...n}=e??{};return createVercelSandbox({createOptions:n,resolveSessionCreateOptions:t})}export{vercel};
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import type { SandboxBootstrapContext, SandboxSessionUseFn } from "#shared/sandbox-definition.js";
|
|
2
|
-
import type { SandboxSession } from "#shared/sandbox-session.js";
|
|
3
|
-
/**
|
|
4
|
-
* Live sandbox handle returned by a {@link SandboxBackend}.
|
|
5
|
-
*
|
|
6
|
-
* Wraps the public {@link SandboxSession} with lifecycle methods so the
|
|
7
|
-
* runtime orchestrator can persist reconnect metadata and release
|
|
8
|
-
* resources.
|
|
9
|
-
*/
|
|
10
|
-
export interface SandboxBackendHandle<SO = Record<string, never>> {
|
|
11
|
-
readonly session: SandboxSession;
|
|
12
|
-
readonly useSessionFn: SandboxSessionUseFn<SO>;
|
|
13
|
-
captureState(): Promise<SandboxBackendSessionState>;
|
|
14
|
-
/**
|
|
15
|
-
* Permanently deletes this sandbox and its disposable backend state.
|
|
16
|
-
* Reusable or shared template state must not be deleted.
|
|
17
|
-
*/
|
|
18
|
-
delete(options?: SandboxDeleteOptions): Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* Stops the underlying compute at an authored runtime boundary while
|
|
21
|
-
* preserving any backend state needed to reopen the durable session.
|
|
22
|
-
* Provider errors must reject this call.
|
|
23
|
-
*/
|
|
24
|
-
stop(): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Stops the underlying compute because the eve server is shutting
|
|
27
|
-
* down; nothing may be left running afterwards. The session must
|
|
28
|
-
* remain reattachable from persisted state on the next server start
|
|
29
|
-
* when the backend supports durable sessions.
|
|
30
|
-
*/
|
|
31
|
-
shutdown(): Promise<void>;
|
|
32
|
-
}
|
|
33
|
-
/** Options for permanently deleting one sandbox. */
|
|
34
|
-
export interface SandboxDeleteOptions {
|
|
35
|
-
readonly abortSignal?: AbortSignal;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Serializable per-sandbox reconnect record stored on the harness session.
|
|
39
|
-
*
|
|
40
|
-
* `backendName` matches the {@link SandboxBackend.name} of the backend
|
|
41
|
-
* that produced this state. The runtime reads it to decide whether a
|
|
42
|
-
* previously persisted handle is still compatible with the current
|
|
43
|
-
* backend.
|
|
44
|
-
*/
|
|
45
|
-
export interface SandboxBackendSessionState {
|
|
46
|
-
readonly backendName: string;
|
|
47
|
-
readonly metadata: Record<string, unknown>;
|
|
48
|
-
readonly sessionKey: string;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* One file written into a sandbox template before template state capture.
|
|
52
|
-
*/
|
|
53
|
-
export interface SandboxSeedFile {
|
|
54
|
-
readonly path: string;
|
|
55
|
-
readonly content: string | Buffer;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Diagnostic tags attached to provider-owned sandbox resources.
|
|
59
|
-
*
|
|
60
|
-
* Built-in backends may forward these into their hosting platform's
|
|
61
|
-
* native tagging system. eve supplies stable tags such as the active
|
|
62
|
-
* agent, channel, and session id so sandboxes can be found and
|
|
63
|
-
* attributed in provider dashboards.
|
|
64
|
-
*/
|
|
65
|
-
export type SandboxBackendTags = Readonly<Record<string, string>>;
|
|
66
|
-
/**
|
|
67
|
-
* Framework-owned runtime context handed to a backend on every
|
|
68
|
-
* {@link SandboxBackend.create} call.
|
|
69
|
-
*
|
|
70
|
-
* Backends use this to derive any per-call state that depends on the
|
|
71
|
-
* surrounding application. For example, the local backend computes its
|
|
72
|
-
* cache directory from `appRoot`. Backends that don't need anything
|
|
73
|
-
* here may ignore the field entirely.
|
|
74
|
-
*/
|
|
75
|
-
export interface SandboxBackendRuntimeContext {
|
|
76
|
-
readonly appRoot: string;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Input passed to {@link SandboxBackend.create} when the runtime needs a
|
|
80
|
-
* live sandbox session.
|
|
81
|
-
*/
|
|
82
|
-
export interface SandboxBackendCreateInput {
|
|
83
|
-
/**
|
|
84
|
-
* Reusable template key to open this session from. `null` means eve
|
|
85
|
-
* intentionally skipped template prewarm because the sandbox has no
|
|
86
|
-
* `bootstrap()` and no seed files, so the backend should create a
|
|
87
|
-
* fresh session from its default base runtime.
|
|
88
|
-
*/
|
|
89
|
-
readonly templateKey: string | null;
|
|
90
|
-
readonly sessionKey: string;
|
|
91
|
-
readonly existingMetadata?: Record<string, unknown>;
|
|
92
|
-
/**
|
|
93
|
-
* Runtime tags the backend should attach to sandbox resources when
|
|
94
|
-
* the underlying provider supports tags.
|
|
95
|
-
*/
|
|
96
|
-
readonly tags?: SandboxBackendTags;
|
|
97
|
-
readonly runtimeContext: SandboxBackendRuntimeContext;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Input passed to {@link SandboxBackend.prewarm} when the build pipeline
|
|
101
|
-
* is preparing reusable templates.
|
|
102
|
-
*
|
|
103
|
-
* Every authored sandbox in the compiled graph receives exactly one
|
|
104
|
-
* `prewarm(...)` call before runtime opens its first session. The
|
|
105
|
-
* backend captures reusable template state from the supplied
|
|
106
|
-
* `bootstrap` hook and `seedFiles`, then `backend.create(...)` opens
|
|
107
|
-
* durable sessions from that state.
|
|
108
|
-
*/
|
|
109
|
-
export interface SandboxBackendPrewarmInput<BO = Record<string, never>> {
|
|
110
|
-
readonly templateKey: string;
|
|
111
|
-
readonly bootstrap?: (input: SandboxBootstrapContext<BO>) => void | Promise<void>;
|
|
112
|
-
/**
|
|
113
|
-
* Optional progress logger for backend-specific prewarm phases.
|
|
114
|
-
*/
|
|
115
|
-
readonly log?: (message: string) => void;
|
|
116
|
-
readonly runtimeContext: SandboxBackendRuntimeContext;
|
|
117
|
-
readonly seedFiles: ReadonlyArray<SandboxSeedFile>;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Outcome of one {@link SandboxBackend.prewarm} call.
|
|
121
|
-
*
|
|
122
|
-
* The build pipeline uses this to report in the build logs whether a
|
|
123
|
-
* template state was reused from a prior deploy or captured fresh, so
|
|
124
|
-
* a cache hit is distinguishable from an expensive rebuild.
|
|
125
|
-
*/
|
|
126
|
-
export interface SandboxBackendPrewarmResult {
|
|
127
|
-
/**
|
|
128
|
-
* `true` when existing template state was reused without rebuilding it;
|
|
129
|
-
* `false` when the backend captured fresh template state.
|
|
130
|
-
*/
|
|
131
|
-
readonly reused: boolean;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Pluggable sandbox backend.
|
|
135
|
-
*
|
|
136
|
-
* A `SandboxBackend` is a value an author attaches to a
|
|
137
|
-
* {@link SandboxDefinition} to choose which underlying runtime hosts the
|
|
138
|
-
* sandbox. eve ships built-in backends (`docker()`,
|
|
139
|
-
* `justbash()`, `microsandbox()`,
|
|
140
|
-
* `vercel()`, and the availability-aware
|
|
141
|
-
* `defaultSandbox()`), but the interface is public so authors can write
|
|
142
|
-
* their own.
|
|
143
|
-
*
|
|
144
|
-
* A backend implements the full two-phase lifecycle:
|
|
145
|
-
* {@link SandboxBackend.prewarm} captures reusable template state at
|
|
146
|
-
* build time, and {@link SandboxBackend.create} starts or reattaches a
|
|
147
|
-
* live session from that template at runtime.
|
|
148
|
-
*/
|
|
149
|
-
export interface SandboxBackend<BO = Record<string, never>, SO = Record<string, never>> {
|
|
150
|
-
/**
|
|
151
|
-
* Stable identifier for this backend implementation.
|
|
152
|
-
*
|
|
153
|
-
* Participates in cache-key derivation and the persisted reconnect
|
|
154
|
-
* state, so two backends that should not share template state
|
|
155
|
-
* must use distinct names. Built-in backends use `"vercel"` and
|
|
156
|
-
* `"local"`. Custom backends pick a unique string.
|
|
157
|
-
*/
|
|
158
|
-
readonly name: string;
|
|
159
|
-
/**
|
|
160
|
-
* Creates or reattaches one live sandbox session from a template
|
|
161
|
-
* previously captured by {@link SandboxBackend.prewarm}. Throws
|
|
162
|
-
* {@link SandboxTemplateNotProvisionedError} when the requested
|
|
163
|
-
* template is missing.
|
|
164
|
-
*/
|
|
165
|
-
create(input: SandboxBackendCreateInput): Promise<SandboxBackendHandle<SO>>;
|
|
166
|
-
/**
|
|
167
|
-
* Build-time prewarm hook. eve invokes this for every authored
|
|
168
|
-
* sandbox in the compiled graph before serving traffic so the backend
|
|
169
|
-
* can capture reusable template state. Idempotent against existing state
|
|
170
|
-
* keyed by `templateKey`.
|
|
171
|
-
*
|
|
172
|
-
* Returns whether the state was reused from a prior run or captured
|
|
173
|
-
* fresh so the build pipeline can surface that in its logs.
|
|
174
|
-
*/
|
|
175
|
-
prewarm(input: SandboxBackendPrewarmInput<BO>): Promise<SandboxBackendPrewarmResult>;
|
|
176
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|