eve 0.63.0 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -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/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/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.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-prewarm.d.ts +5 -0
- package/dist/src/execution/sandbox/development-prewarm.js +1 -1
- 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/package.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/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/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/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 +110 -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/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 -12
- package/docs/guides/dev-tui.md +1 -1
- package/docs/guides/hooks.md +4 -0
- 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 +1 -24
- package/docs/sandbox/default.mdx +17 -0
- package/docs/sandbox/docker.mdx +29 -0
- package/docs/sandbox/index.mdx +216 -0
- package/docs/sandbox/just-bash.mdx +18 -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/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/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,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { VercelSandbox, type VercelSandboxEnvironmentOptions, type VercelSandboxRuntimeOptions, } from "#sandbox/providers/vercel.js";
|
|
2
2
|
export { Drive } from "#compiled/@vercel/sandbox/index.js";
|
|
3
|
-
export type {
|
|
3
|
+
export type { VercelSandboxMount, VercelSandboxMountMode, VercelSandboxMounts, } from "#public/sandbox/vercel-sandbox.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{VercelSandbox}from"#sandbox/providers/vercel.js";import{Drive}from"#compiled/@vercel/sandbox/index.js";export{Drive,VercelSandbox};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getRuntimeCompiledArtifactsCacheKey}from"#runtime/compiled-artifacts-source.js";import{
|
|
1
|
+
import{getRuntimeCompiledArtifactsCacheKey}from"#runtime/compiled-artifacts-source.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{loadCompileMetadata}from"#runtime/loaders/compile-metadata.js";async function resolveRuntimeCompiledArtifactsVersionedCacheKey(e){let t=getRuntimeCompiledArtifactsCacheKey(e),n=await resolveCompileMetadataMtimeMs(e);try{let r=(await loadCompileMetadata({compiledArtifactsSource:e}))?.discovery.sourceGraphHash;return r===void 0||r.length===0?n===void 0?t:`${t}:mtime-${formatMtimeMsForCacheKey(n)}`:n===void 0?`${t}:${r}`:`${t}:${r}:mtime-${formatMtimeMsForCacheKey(n)}`}catch{return n===void 0?t:`${t}:mtime-${formatMtimeMsForCacheKey(n)}`}}async function resolveCompileMetadataMtimeMs(e){if(e.kind!==`disk`)return;let{stat:t}=await import(`node:fs/promises`),{compileMetadataPath:n}=resolveRuntimeCompilerArtifactPaths(e.appRoot);try{return(await t(n)).mtimeMs}catch{return}}function formatMtimeMsForCacheKey(e){return Math.floor(e).toString(36)}export{resolveRuntimeCompiledArtifactsVersionedCacheKey};
|
|
@@ -8,6 +8,8 @@ export type RuntimeCompiledArtifactsSource = RuntimeBundledCompiledArtifactsSour
|
|
|
8
8
|
*/
|
|
9
9
|
export interface RuntimeBundledCompiledArtifactsSource {
|
|
10
10
|
readonly kind: "bundled";
|
|
11
|
+
/** Stable app partition embedded by a production build for local providers. */
|
|
12
|
+
readonly sandboxScope?: string;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Disk-backed compiled artifacts rooted at one authored application.
|
|
@@ -23,6 +25,8 @@ export interface RuntimeDiskCompiledArtifactsSource {
|
|
|
23
25
|
* emitted by the build.
|
|
24
26
|
*/
|
|
25
27
|
readonly moduleMapLoaderPath?: string;
|
|
28
|
+
/** Stable app partition shared by production build preparation and runtime. */
|
|
29
|
+
readonly sandboxScope?: string;
|
|
26
30
|
/**
|
|
27
31
|
* Stable application root used for local sandbox template/session caches.
|
|
28
32
|
* In development, `appRoot` can point at an immutable runtime snapshot
|
|
@@ -41,7 +45,7 @@ export interface RuntimeDiskCompiledArtifactsSource {
|
|
|
41
45
|
/**
|
|
42
46
|
* Creates the bundled compiled-artifact source.
|
|
43
47
|
*/
|
|
44
|
-
export declare function createBundledRuntimeCompiledArtifactsSource(): RuntimeBundledCompiledArtifactsSource;
|
|
48
|
+
export declare function createBundledRuntimeCompiledArtifactsSource(sandboxScope?: string): RuntimeBundledCompiledArtifactsSource;
|
|
45
49
|
/**
|
|
46
50
|
* Creates the disk-backed compiled-artifact source for one authored app root.
|
|
47
51
|
*/
|
|
@@ -49,6 +53,7 @@ export declare function createDiskRuntimeCompiledArtifactsSource(appRoot: string
|
|
|
49
53
|
readonly durableReference?: "development-generation";
|
|
50
54
|
readonly moduleMapLoaderPath?: string;
|
|
51
55
|
readonly sandboxAppRoot?: string;
|
|
56
|
+
readonly sandboxScope?: string;
|
|
52
57
|
}): RuntimeDiskCompiledArtifactsSource;
|
|
53
58
|
/**
|
|
54
59
|
* Returns the disk-backed app root when one exists for the artifact source.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function createBundledRuntimeCompiledArtifactsSource(){return{kind:`bundled`}}function createDiskRuntimeCompiledArtifactsSource(e,t={}){return t.moduleMapLoaderPath!==void 0||t.sandboxAppRoot!==void 0||t.durableReference!==void 0?{appRoot:e,durableReference:t.durableReference,kind:`disk`,moduleMapLoaderPath:t.moduleMapLoaderPath,sandboxAppRoot:t.sandboxAppRoot}:{appRoot:e,kind:`disk`}}function getRuntimeCompiledArtifactsAppRoot(e){return e.kind===`disk`?e.appRoot:void 0}function getRuntimeCompiledArtifactsSandboxAppRoot(e){return e.kind===`disk`?e.sandboxAppRoot??e.appRoot:void 0}function getRuntimeCompiledArtifactsCacheKey(e){return e.kind===`disk`?e.moduleMapLoaderPath===void 0?`disk:${e.appRoot}`:`disk:${e.appRoot}:authored-source:${e.moduleMapLoaderPath}`:`bundled`}export{createBundledRuntimeCompiledArtifactsSource,createDiskRuntimeCompiledArtifactsSource,getRuntimeCompiledArtifactsAppRoot,getRuntimeCompiledArtifactsCacheKey,getRuntimeCompiledArtifactsSandboxAppRoot};
|
|
1
|
+
function createBundledRuntimeCompiledArtifactsSource(e){return e===void 0?{kind:`bundled`}:{kind:`bundled`,sandboxScope:e}}function createDiskRuntimeCompiledArtifactsSource(e,t={}){return t.moduleMapLoaderPath!==void 0||t.sandboxAppRoot!==void 0||t.sandboxScope!==void 0||t.durableReference!==void 0?{appRoot:e,durableReference:t.durableReference,kind:`disk`,moduleMapLoaderPath:t.moduleMapLoaderPath,sandboxAppRoot:t.sandboxAppRoot,sandboxScope:t.sandboxScope}:{appRoot:e,kind:`disk`}}function getRuntimeCompiledArtifactsAppRoot(e){return e.kind===`disk`?e.appRoot:void 0}function getRuntimeCompiledArtifactsSandboxAppRoot(e){return e.kind===`disk`?e.sandboxAppRoot??e.appRoot:void 0}function getRuntimeCompiledArtifactsCacheKey(e){return e.kind===`disk`?e.moduleMapLoaderPath===void 0?`disk:${e.appRoot}`:`disk:${e.appRoot}:authored-source:${e.moduleMapLoaderPath}`:`bundled`}export{createBundledRuntimeCompiledArtifactsSource,createDiskRuntimeCompiledArtifactsSource,getRuntimeCompiledArtifactsAppRoot,getRuntimeCompiledArtifactsCacheKey,getRuntimeCompiledArtifactsSandboxAppRoot};
|
|
@@ -10,6 +10,7 @@ export interface RuntimeCompilerArtifactPaths {
|
|
|
10
10
|
readonly discoveryManifestPath: string;
|
|
11
11
|
readonly discoveryDirectoryPath: string;
|
|
12
12
|
readonly moduleMapPath: string;
|
|
13
|
+
readonly sandboxPreparedArtifactsPath: string;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Resolves the stable eve artifact paths for one application root without
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function resolveRuntimeCompilerArtifactPaths(e){let t=normalizeFilesystemPath(e),n=`${t}/.eve/discovery`,r=`${t}/.eve/compile`;return{appRoot:t,compiledManifestPath:`${r}/compiled-agent-manifest.json`,compileDirectoryPath:r,compileMetadataPath:`${r}/compile-metadata.json`,diagnosticsPath:`${n}/diagnostics.json`,discoveryDirectoryPath:n,discoveryManifestPath:`${n}/agent-discovery-manifest.json`,moduleMapPath:`${r}/module-map.mjs`}}function normalizeFilesystemPath(e){let t=e.replaceAll(`\\`,`/`);return t===`/`?t:t.replace(/\/+$/,``)}export{resolveRuntimeCompilerArtifactPaths};
|
|
1
|
+
function resolveRuntimeCompilerArtifactPaths(e){let t=normalizeFilesystemPath(e),n=`${t}/.eve/discovery`,r=`${t}/.eve/compile`;return{appRoot:t,compiledManifestPath:`${r}/compiled-agent-manifest.json`,compileDirectoryPath:r,compileMetadataPath:`${r}/compile-metadata.json`,diagnosticsPath:`${n}/diagnostics.json`,discoveryDirectoryPath:n,discoveryManifestPath:`${n}/agent-discovery-manifest.json`,moduleMapPath:`${r}/module-map.mjs`,sandboxPreparedArtifactsPath:`${r}/sandbox-prepared-artifacts.json`}}function normalizeFilesystemPath(e){let t=e.replaceAll(`\\`,`/`);return t===`/`?t:t.replace(/\/+$/,``)}export{resolveRuntimeCompilerArtifactPaths};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CompileMetadata } from "#compiler/artifacts.js";
|
|
2
2
|
import type { CompiledAgentManifest } from "#compiler/manifest.js";
|
|
3
3
|
import type { CompiledModuleMap } from "#compiler/module-map.js";
|
|
4
|
+
import type { SandboxPreparedArtifactsManifest } from "#shared/sandbox-prepared-artifacts.js";
|
|
4
5
|
/**
|
|
5
6
|
* Bundled compiled artifacts installed by Nitro when authored runtime state is
|
|
6
7
|
* embedded directly into the server bundle.
|
|
@@ -9,6 +10,7 @@ export interface BundledCompiledArtifacts {
|
|
|
9
10
|
manifest: CompiledAgentManifest;
|
|
10
11
|
metadata?: CompileMetadata;
|
|
11
12
|
moduleMap: CompiledModuleMap;
|
|
13
|
+
sandboxPreparedArtifacts?: SandboxPreparedArtifactsManifest;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
* Input for running code against one isolated bundled compiled-artifact
|
|
@@ -33,4 +35,5 @@ export declare function withBundledCompiledArtifacts<T>(input: WithBundledCompil
|
|
|
33
35
|
* Reads the bundled compiled-artifact snapshot for the active runtime
|
|
34
36
|
* session, or `null` if none has been installed.
|
|
35
37
|
*/
|
|
38
|
+
export declare function updateBundledSandboxPreparedArtifacts(sandboxPreparedArtifacts: SandboxPreparedArtifactsManifest): boolean;
|
|
36
39
|
export declare function readBundledCompiledArtifacts(): BundledCompiledArtifacts | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRuntimeSession,getActiveRuntimeSession,setRuntimeSessionCompiledArtifacts,withRuntimeSession}from"#runtime/sessions/runtime-session.js";function installBundledCompiledArtifacts(e){setRuntimeSessionCompiledArtifacts(getActiveRuntimeSession(),{manifest:e.manifest,metadata:e.metadata,moduleMap:e.moduleMap})}async function withBundledCompiledArtifacts(e,t){let n=createRuntimeSession(e.sessionId??`bundled-compiled-artifacts`);return await withRuntimeSession(n,async()=>(installBundledCompiledArtifacts(e),await t()))}function readBundledCompiledArtifacts(){return getActiveRuntimeSession().compiledArtifacts}export{installBundledCompiledArtifacts,readBundledCompiledArtifacts,withBundledCompiledArtifacts};
|
|
1
|
+
import{createRuntimeSession,getActiveRuntimeSession,setRuntimeSessionCompiledArtifacts,withRuntimeSession}from"#runtime/sessions/runtime-session.js";function installBundledCompiledArtifacts(e){setRuntimeSessionCompiledArtifacts(getActiveRuntimeSession(),{manifest:e.manifest,metadata:e.metadata,moduleMap:e.moduleMap,sandboxPreparedArtifacts:e.sandboxPreparedArtifacts})}async function withBundledCompiledArtifacts(e,t){let n=createRuntimeSession(e.sessionId??`bundled-compiled-artifacts`);return await withRuntimeSession(n,async()=>(installBundledCompiledArtifacts(e),await t()))}function updateBundledSandboxPreparedArtifacts(e){let t=getActiveRuntimeSession(),n=t.compiledArtifacts;return n!==null&&(setRuntimeSessionCompiledArtifacts(t,{...n,sandboxPreparedArtifacts:e}),!0)}function readBundledCompiledArtifacts(){return getActiveRuntimeSession().compiledArtifacts}export{installBundledCompiledArtifacts,readBundledCompiledArtifacts,updateBundledSandboxPreparedArtifacts,withBundledCompiledArtifacts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{COMPILE_METADATA_KIND,COMPILE_METADATA_VERSION}from"#compiler/artifacts.js";import{formatValidationError}from"#runtime/validation.js";import{
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{COMPILE_METADATA_KIND,COMPILE_METADATA_VERSION}from"#compiler/artifacts.js";import{formatValidationError}from"#runtime/validation.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";const compileArtifactDigestSchema=z.object({path:z.string(),sha256:z.string()}).strict(),compileMetadataSchema=z.object({compile:z.object({manifest:compileArtifactDigestSchema,moduleMap:compileArtifactDigestSchema}).strict(),discovery:z.object({diagnostics:compileArtifactDigestSchema,manifest:compileArtifactDigestSchema,sourceGraphHash:z.string(),summary:z.object({errors:z.number().finite(),warnings:z.number().finite()}).strict()}).strict(),generator:z.object({name:z.string(),version:z.string()}).strict(),kind:z.literal(COMPILE_METADATA_KIND),status:z.union([z.literal(`failed`),z.literal(`ready`)]),version:z.literal(COMPILE_METADATA_VERSION)}).strict();var LoadCompileMetadataError=class extends Error{metadataPath;constructor(e,t){super(e),this.name=`LoadCompileMetadataError`,t!==void 0&&(this.metadataPath=t)}};async function loadCompileMetadata(e){let t=e.compiledArtifactsSource.kind===`disk`?resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).compileMetadataPath:void 0;if(t!==void 0){let{readFile:e}=await import(`node:fs/promises`),n;try{n=JSON.parse(await e(t,`utf8`))}catch(e){throw new LoadCompileMetadataError(formatLoadErrorMessage(e),t)}return parseCompileMetadata(n,t)}let n=readBundledCompiledArtifacts()?.metadata;return n===void 0?null:parseCompileMetadata(n,`bundled compile metadata`)}function parseCompileMetadata(e,t){let n=compileMetadataSchema.safeParse(e);if(!n.success)throw new LoadCompileMetadataError(`Expected "${t}" to contain valid eve compile metadata. ${formatValidationError(n.error)}`,t);return n.data}function formatLoadErrorMessage(e){return e instanceof Error?e.message:`Unknown compile metadata load failure.`}export{loadCompileMetadata};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{compiledAgentManifestSchema}from"#compiler/manifest.js";import{formatValidationError}from"#runtime/validation.js";import{validateCompiledAgentManifest}from"#compiler/validate-artifact.js";import{
|
|
1
|
+
import{compiledAgentManifestSchema}from"#compiler/manifest.js";import{formatValidationError}from"#runtime/validation.js";import{validateCompiledAgentManifest}from"#compiler/validate-artifact.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";const BUNDLED_MANIFEST_SOURCE=`bundled compiled manifest`;var LoadCompiledManifestError=class extends Error{manifestPath;constructor(e,t){super(e),this.name=`LoadCompiledManifestError`,t!==void 0&&(this.manifestPath=t)}};async function loadCompiledManifest(e){let t=e.compiledArtifactsSource.kind===`disk`?resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).compiledManifestPath:void 0;if(t!==void 0){let{readFile:e}=await import(`node:fs/promises`),n;try{n=JSON.parse(await e(t,`utf8`))}catch(e){throw new LoadCompiledManifestError(formatLoadErrorMessage(e),t)}return parseCompiledManifest(n,t)}let n=readBundledCompiledArtifacts();if(n!==null)return parseCompiledManifest(n.manifest,BUNDLED_MANIFEST_SOURCE);throw new LoadCompiledManifestError(`Compiled manifest is unavailable without an app root or bundled compiled artifacts.`,BUNDLED_MANIFEST_SOURCE)}function parseCompiledManifest(e,t){let n=compiledAgentManifestSchema.safeParse(e);if(!n.success)throw new LoadCompiledManifestError(`Expected "${t}" to contain a valid compiled eve agent manifest. ${formatValidationError(n.error)}`,t);try{validateCompiledAgentManifest(n.data)}catch(e){throw new LoadCompiledManifestError(`Expected "${t}" to contain a semantically valid compiled eve agent manifest. ${formatLoadErrorMessage(e)}`,t)}return n.data}function formatLoadErrorMessage(e){return e instanceof Error?e.message:`Unknown manifest load failure.`}export{LoadCompiledManifestError,loadCompiledManifest};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{compiledModuleMapSchema}from"#compiler/module-map.js";import{formatValidationError}from"#runtime/validation.js";import{
|
|
1
|
+
import{compiledModuleMapSchema}from"#compiler/module-map.js";import{formatValidationError}from"#runtime/validation.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";const BUNDLED_MODULE_MAP_SOURCE=`bundled compiled module map`;var LoadCompiledModuleMapError=class extends Error{moduleMapPath;constructor(e,t){super(e),this.name=`LoadCompiledModuleMapError`,t!==void 0&&(this.moduleMapPath=t)}};async function loadCompiledModuleMap(e){let t=e.compiledArtifactsSource.kind===`disk`?resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).moduleMapPath:void 0;if(t!==void 0){let e=createFileImportSpecifier(t);try{let n=await import(e);return parseCompiledModuleMap(n.moduleMap??n.default,t)}catch(e){throw new LoadCompiledModuleMapError(formatLoadErrorMessage(e),t)}}let n=readBundledCompiledArtifacts();if(n!==null)return parseCompiledModuleMap(n.moduleMap,BUNDLED_MODULE_MAP_SOURCE);throw new LoadCompiledModuleMapError(`Compiled module map is unavailable without an app root or bundled compiled artifacts.`,BUNDLED_MODULE_MAP_SOURCE)}function parseCompiledModuleMap(e,t){let n=compiledModuleMapSchema.safeParse(e);if(!n.success)throw new LoadCompiledModuleMapError(`Expected "${t}" to export a valid compiled eve module map. ${formatValidationError(n.error)}`,t);return n.data}function formatLoadErrorMessage(e){return e instanceof Error?e.message:`Unknown module-map load failure.`}function createFileImportSpecifier(e){let t=e.replaceAll(`\\`,`/`);return/^[A-Za-z]:\//.test(t)?`file:///${encodeURI(t)}`:t.startsWith(`/`)?`file://${encodeURI(t)}`:t}export{LoadCompiledModuleMapError,loadCompiledModuleMap};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export declare const LOCAL_DEV_INTERACTIVE_CLIENT_HEADER = "x-eve-dev-interactive-client";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* same-machine request to `eve dev`.
|
|
3
|
+
* Host facilities available to authored code running on an `eve dev` server.
|
|
5
4
|
*
|
|
6
|
-
* Absence
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* Absence means this host has no authored tree to mutate or watcher to pause.
|
|
6
|
+
* When present, the capability is available to every execution on that host;
|
|
7
|
+
* callers admitted to the development server are trusted with enabled local
|
|
8
|
+
* editing tools.
|
|
10
9
|
*/
|
|
11
10
|
export interface LocalDevCapability {
|
|
12
11
|
/**
|
|
@@ -15,8 +14,9 @@ export interface LocalDevCapability {
|
|
|
15
14
|
*/
|
|
16
15
|
readonly appRoot: string;
|
|
17
16
|
/**
|
|
18
|
-
* Whether the
|
|
19
|
-
*
|
|
17
|
+
* Whether the originating client is the dev TUI and can run a flow that asks
|
|
18
|
+
* questions in its terminal. This inherited hint is not proof that the
|
|
19
|
+
* current sender has a live terminal.
|
|
20
20
|
*/
|
|
21
21
|
readonly interactiveClient: boolean;
|
|
22
22
|
/**
|
|
@@ -39,13 +39,15 @@ export declare function installLocalDevCapabilityEnvironment(input: {
|
|
|
39
39
|
readonly serverUrl: string;
|
|
40
40
|
}): () => void;
|
|
41
41
|
/**
|
|
42
|
-
* Seeds
|
|
43
|
-
*
|
|
42
|
+
* Seeds the inherited dev-TUI hint only when the dev host signed a loopback
|
|
43
|
+
* peer address. Client-supplied address headers cannot create that hint.
|
|
44
44
|
*/
|
|
45
45
|
export declare function withLocalDevRequestScope<T>(request: Request, callback: () => Promise<T>): Promise<T>;
|
|
46
46
|
/**
|
|
47
|
-
* Resolves
|
|
48
|
-
*
|
|
47
|
+
* Resolves local development host facilities, or `undefined` when this host
|
|
48
|
+
* lacks the authored root or watcher control origin installed by `eve dev`.
|
|
49
|
+
* Request provenance affects only the optional dev-TUI hint, never access to
|
|
50
|
+
* the authored tree.
|
|
49
51
|
*
|
|
50
52
|
* This is deliberately not a {@link import("#public/definitions/tool.js").ToolContext}
|
|
51
53
|
* field: both values are meaningless in a deployed runtime, and a capability
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{randomUUID}from"node:crypto";import{isLoopbackHostname}from"#shared/network-address.js";import{ContextContainer,contextStorage}from"#context/container.js";import{resumeDevelopmentRuntimeArtifacts,suspendDevelopmentRuntimeArtifacts}from"#services/dev-client/runtime-artifacts.js";import{DEVELOPMENT_WORKFLOW_SECRET_ENV}from"#internal/workflow/development-world-protocol.js";import{DEVELOPMENT_CLIENT_ADDRESS_SIGNATURE_HEADER,isTrustedDevelopmentClientAddress,readTrustedDevelopmentClientAddress}from"#internal/nitro/dev-client-address.js";const LOCAL_DEV_APP_ROOT_ENV=`EVE_DEV_APP_ROOT`,LOCAL_DEV_CONTROL_URL_ENV=`EVE_DEV_CONTROL_URL`,LOCAL_DEV_INTERACTIVE_CLIENT_HEADER=`x-eve-dev-interactive-client`;function installLocalDevCapabilityEnvironment(e){let t=process.env[LOCAL_DEV_APP_ROOT_ENV],n=process.env[LOCAL_DEV_CONTROL_URL_ENV];return process.env[LOCAL_DEV_APP_ROOT_ENV]=e.appRoot,process.env[LOCAL_DEV_CONTROL_URL_ENV]=new URL(e.serverUrl).origin,()=>{restore(LOCAL_DEV_APP_ROOT_ENV,t),restore(LOCAL_DEV_CONTROL_URL_ENV,n)}}async function withLocalDevRequestScope(e,t){let n=process.env[DEVELOPMENT_WORKFLOW_SECRET_ENV],r=readTrustedDevelopmentClientAddress(e.headers,n),i=e.headers.get(DEVELOPMENT_CLIENT_ADDRESS_SIGNATURE_HEADER);return r===void 0||i===null||!isLoopbackHostname(r)?await
|
|
1
|
+
import{randomUUID}from"node:crypto";import{isLoopbackHostname}from"#shared/network-address.js";import{ContextContainer,contextStorage}from"#context/container.js";import{resumeDevelopmentRuntimeArtifacts,suspendDevelopmentRuntimeArtifacts}from"#services/dev-client/runtime-artifacts.js";import{DEVELOPMENT_WORKFLOW_SECRET_ENV}from"#internal/workflow/development-world-protocol.js";import{DEVELOPMENT_CLIENT_ADDRESS_SIGNATURE_HEADER,isTrustedDevelopmentClientAddress,readTrustedDevelopmentClientAddress}from"#internal/nitro/dev-client-address.js";const LOCAL_DEV_APP_ROOT_ENV=`EVE_DEV_APP_ROOT`,LOCAL_DEV_CONTROL_URL_ENV=`EVE_DEV_CONTROL_URL`,LOCAL_DEV_INTERACTIVE_CLIENT_HEADER=`x-eve-dev-interactive-client`;function installLocalDevCapabilityEnvironment(e){let t=process.env[LOCAL_DEV_APP_ROOT_ENV],n=process.env[LOCAL_DEV_CONTROL_URL_ENV];return process.env[LOCAL_DEV_APP_ROOT_ENV]=e.appRoot,process.env[LOCAL_DEV_CONTROL_URL_ENV]=new URL(e.serverUrl).origin,()=>{restore(LOCAL_DEV_APP_ROOT_ENV,t),restore(LOCAL_DEV_CONTROL_URL_ENV,n)}}async function withLocalDevRequestScope(e,t){let n=process.env[DEVELOPMENT_WORKFLOW_SECRET_ENV],r=readTrustedDevelopmentClientAddress(e.headers,n),i=e.headers.get(DEVELOPMENT_CLIENT_ADDRESS_SIGNATURE_HEADER);return r===void 0||i===null||!isLoopbackHostname(r)?await contextStorage.run(new ContextContainer({localDevRequest:void 0}),t):await contextStorage.run(new ContextContainer({localDevRequest:{address:r,interactiveClient:e.headers.get(LOCAL_DEV_INTERACTIVE_CLIENT_HEADER)===`1`,signature:i}}),t)}function getLocalDevCapability(e=process.env){let t=e[LOCAL_DEV_APP_ROOT_ENV],n=e[LOCAL_DEV_CONTROL_URL_ENV];if(t===void 0||t===``||n===void 0||n===``)return;let r=contextStorage.getStore()?.localDevRequest;return{appRoot:t,interactiveClient:r!==void 0&&typeof r.address==`string`&&typeof r.signature==`string`&&typeof r.interactiveClient==`boolean`&&isLoopbackHostname(r.address)&&isTrustedDevelopmentClientAddress(r.address,r.signature,process.env[DEVELOPMENT_WORKFLOW_SECRET_ENV])?r.interactiveClient:!1,async withSuspendedSource(e){let t=randomUUID();if(!await suspendDevelopmentRuntimeArtifacts({leaseId:t,serverUrl:n}))throw Error(`Could not pause the eve development server. Its authored-source watcher must be suspended before the authored tree is modified.`);let r;try{r={ok:!0,value:await e()}}catch(e){r={error:e,ok:!1}}if(await resumeDevelopmentRuntimeArtifacts({leaseId:t,serverUrl:n})===void 0&&await resumeDevelopmentRuntimeArtifacts({leaseId:t,serverUrl:n})===void 0)throw Error(`Could not resume the eve development server after modifying the authored tree. Restart eve dev before making further source changes.`,r.ok?void 0:{cause:r.error});if(!r.ok)throw r.error;return r.value}}}function restore(e,t){t===void 0?delete process.env[e]:process.env[e]=t}export{LOCAL_DEV_INTERACTIVE_CLIENT_HEADER,getLocalDevCapability,installLocalDevCapabilityEnvironment,withLocalDevRequestScope};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{expectObjectRecord}from"#internal/authored-module.js";import{stripLogicalPathExtension}from"#discover/filesystem.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{validateCompiledModuleMap}from"#compiler/validate-artifact.js";import{createRuntimeSubagentRegistry}from"#runtime/subagents/registry.js";import{LOAD_SKILL_TOOL_NAME}from"#runtime/skills/fragment-context.js";import{createRuntimeToolRegistry}from"#runtime/tools/registry.js";import{ROOT_RUNTIME_AGENT_NODE_ID}from"#runtime/graph.js";import{loadResolvedModuleExport}from"#runtime/resolve-helpers.js";import{createResolvedRuntimeTurnAgent}from"#runtime/agent/bootstrap.js";import{createWorkspacePromptSection}from"#runtime/workspace/spec.js";import{createRuntimeHookRegistry}from"#runtime/hooks/registry.js";import{resolveAgent}from"#runtime/resolve-agent.js";import{resolveDynamicSubagentDefinition}from"#runtime/resolve-dynamic-subagent.js";import{createRuntimeSandboxRegistry}from"#runtime/sandbox/registry.js";var ResolveRuntimeAgentGraphError=class extends Error{logicalPath;nodeId;sourceId;constructor(e,t={}){super(e),this.name=`ResolveRuntimeAgentGraphError`,t.logicalPath!==void 0&&(this.logicalPath=t.logicalPath),t.nodeId!==void 0&&(this.nodeId=t.nodeId),t.sourceId!==void 0&&(this.sourceId=t.sourceId)}};async function resolveRuntimeAgentGraph(e){validateCompiledModuleMap(e.manifest,e.moduleMap);let t=new Map,n=createChildNodeIdsByParentNodeId(e.manifest),r=new Map(e.manifest.subagents.map(e=>[e.nodeId,e])),i=await resolveRuntimeAgentNode({childNodeIdsByParentNodeId:n,manifest:e.manifest,moduleMap:e.moduleMap,nodeId:ROOT_COMPILED_AGENT_NODE_ID,nodesByNodeId:t,subagentNodesById:r});return attachInheritedSandboxWorkspaceResources({manifest:e.manifest,nodesByNodeId:t}),{nodesByNodeId:t,root:i}}async function resolveRuntimeAgentNode(e){let t=toRuntimeNodeId(e.nodeId);if(e.nodesByNodeId.has(t))throw new ResolveRuntimeAgentGraphError(`Found multiple runtime agent nodes for node id "${t}".`,{nodeId:t,sourceId:e.sourceId});let n=await resolveAgent({manifest:e.manifest,moduleMap:e.moduleMap,nodeId:e.nodeId}),r=await createRuntimeToolRegistry({tools:n.tools},{nodeId:t}),i=createRuntimeSandboxRegistry({sandbox:n.sandbox,workspaceResourceRoot:n.workspaceResourceRoot}),a=createRuntimeSubagentRegistry({disabledToolNames:e.manifest.sourceComposition.entries.flatMap(e=>e.kind!==`disabled`||!e.source.logicalPath.startsWith(`tools/`)?[]:[stripLogicalPathExtension(e.source.logicalPath).replace(/^tools\//,``).replaceAll(`/`,`-`)]),reservedToolNames:[LOAD_SKILL_TOOL_NAME,...r.preparedTools.map(e=>e.name)],subagents:await resolveRuntimeSubagents({childNodeIdsByParentNodeId:e.childNodeIdsByParentNodeId,manifest:e.manifest,moduleMap:e.moduleMap,nodesByNodeId:e.nodesByNodeId,parentNodeId:e.nodeId,subagentNodesById:e.subagentNodesById})}),o={agent:n,channels:n.channels,hookRegistry:createRuntimeHookRegistry(n.hooks),nodeId:t,sandboxRegistry:i,sourceId:e.sourceId,subagentRegistry:a,toolRegistry:r,turnAgent:createResolvedRuntimeTurnAgent({agent:n,dynamicSubagentsAvailable:a.dynamicResolvers.length>0,id:e.agentId,nodeId:t,tools:[...r.preparedTools,...a.preparedTools]})};return e.nodesByNodeId.set(t,o),o}async function resolveRuntimeSubagents(e){let t=[],n=e.childNodeIdsByParentNodeId.get(e.parentNodeId)??[];for(let r of n){let n=e.subagentNodesById.get(r);if(n===void 0)throw new ResolveRuntimeAgentGraphError(`Missing compiled subagent node "${r}" while resolving runtime subagents.`,{nodeId:toRuntimeNodeId(e.parentNodeId),sourceId:r});t.push(await resolveRuntimeSubagent({childNodeIdsByParentNodeId:e.childNodeIdsByParentNodeId,moduleMap:e.moduleMap,nodesByNodeId:e.nodesByNodeId,sourceRef:n,subagentNodesById:e.subagentNodesById}))}for(let n of e.manifest.remoteAgents)t.push(await resolveRuntimeRemoteAgent({moduleMap:e.moduleMap,nodeScopeId:e.parentNodeId,sourceRef:n}));return t}async function resolveRuntimeSubagent(e){let t={...e.sourceRef.configResolver===void 0?{description:e.sourceRef.description,tool:e.sourceRef.agent.config.tool}:{dynamic:await resolveDynamicSubagentDefinition({definition:e.sourceRef.configResolver,moduleMap:e.moduleMap,nodeId:e.sourceRef.nodeId})},kind:`subagent`,logicalPath:e.sourceRef.logicalPath,name:e.sourceRef.name,nodeId:toRuntimeNodeId(e.sourceRef.nodeId),sourceId:e.sourceRef.sourceId,sourceKind:`module`};return await resolveRuntimeAgentNode({agentId:e.sourceRef.name,childNodeIdsByParentNodeId:e.childNodeIdsByParentNodeId,manifest:e.sourceRef.agent,moduleMap:e.moduleMap,nodeId:e.sourceRef.nodeId,nodesByNodeId:e.nodesByNodeId,sourceId:e.sourceRef.sourceId,subagentNodesById:e.subagentNodesById}),t}async function resolveRuntimeRemoteAgent(e){let t=await loadResolvedModuleExport({definition:e.sourceRef,kindLabel:`remote agent`,moduleMap:e.moduleMap,nodeId:e.nodeScopeId}),n=expectObjectRecord(t,`Expected remote agent source "${e.sourceRef.logicalPath}" to export an object.`),r={description:e.sourceRef.description,kind:`remote`,logicalPath:e.sourceRef.logicalPath,name:e.sourceRef.name,nodeId:toRuntimeNodeId(e.sourceRef.nodeId),outputSchema:e.sourceRef.outputSchema,path:e.sourceRef.path,sourceId:e.sourceRef.sourceId,sourceKind:`module`,tool:e.sourceRef.tool,url:await resolveRemoteAgentUrl({bakedUrl:e.sourceRef.url,logicalPath:e.sourceRef.logicalPath,resolvedUrl:n.url})};typeof n.auth==`function`&&(r.auth=n.auth),n.forwardPrincipal===!0&&(r.forwardPrincipal=!0);let i=resolveRemoteAgentHeaders(n.headers);return i!==void 0&&(r.headers=i),r}async function resolveRemoteAgentUrl(e){if(typeof e.resolvedUrl==`function`){let t=await e.resolvedUrl();if(typeof t!=`string`||t.length===0)throw Error(`Remote agent "${e.logicalPath}" url function must return a non-empty string.`);return t}let t=e.bakedUrl??(typeof e.resolvedUrl==`string`?e.resolvedUrl:``);if(t.length===0)throw Error(`Remote agent "${e.logicalPath}" is missing a url.`);return t}function resolveRemoteAgentHeaders(e){if(e===void 0)return;if(typeof e==`function`)return e;if(typeof e!=`object`||!e||Array.isArray(e))return;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&(t[n]=r);return t}function attachInheritedSandboxWorkspaceResources(e){let t=new Map(e.manifest.subagents.map(e=>[e.nodeId,e.parentNodeId]));for(let[n,r]of e.nodesByNodeId){if(r.sandboxRegistry.sandbox.definition.
|
|
1
|
+
import{expectObjectRecord}from"#internal/authored-module.js";import{stripLogicalPathExtension}from"#discover/filesystem.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{validateCompiledModuleMap}from"#compiler/validate-artifact.js";import{createRuntimeSubagentRegistry}from"#runtime/subagents/registry.js";import{LOAD_SKILL_TOOL_NAME}from"#runtime/skills/fragment-context.js";import{createRuntimeToolRegistry}from"#runtime/tools/registry.js";import{ROOT_RUNTIME_AGENT_NODE_ID}from"#runtime/graph.js";import{loadResolvedModuleExport}from"#runtime/resolve-helpers.js";import{createResolvedRuntimeTurnAgent}from"#runtime/agent/bootstrap.js";import{createWorkspacePromptSection}from"#runtime/workspace/spec.js";import{createRuntimeHookRegistry}from"#runtime/hooks/registry.js";import{resolveAgent}from"#runtime/resolve-agent.js";import{resolveDynamicSubagentDefinition}from"#runtime/resolve-dynamic-subagent.js";import{createRuntimeSandboxRegistry}from"#runtime/sandbox/registry.js";var ResolveRuntimeAgentGraphError=class extends Error{logicalPath;nodeId;sourceId;constructor(e,t={}){super(e),this.name=`ResolveRuntimeAgentGraphError`,t.logicalPath!==void 0&&(this.logicalPath=t.logicalPath),t.nodeId!==void 0&&(this.nodeId=t.nodeId),t.sourceId!==void 0&&(this.sourceId=t.sourceId)}};async function resolveRuntimeAgentGraph(e){validateCompiledModuleMap(e.manifest,e.moduleMap);let t=new Map,n=createChildNodeIdsByParentNodeId(e.manifest),r=new Map(e.manifest.subagents.map(e=>[e.nodeId,e])),i=await resolveRuntimeAgentNode({childNodeIdsByParentNodeId:n,manifest:e.manifest,moduleMap:e.moduleMap,nodeId:ROOT_COMPILED_AGENT_NODE_ID,nodesByNodeId:t,subagentNodesById:r});return attachInheritedSandboxWorkspaceResources({manifest:e.manifest,nodesByNodeId:t}),{nodesByNodeId:t,root:i}}async function resolveRuntimeAgentNode(e){let t=toRuntimeNodeId(e.nodeId);if(e.nodesByNodeId.has(t))throw new ResolveRuntimeAgentGraphError(`Found multiple runtime agent nodes for node id "${t}".`,{nodeId:t,sourceId:e.sourceId});let n=await resolveAgent({manifest:e.manifest,moduleMap:e.moduleMap,nodeId:e.nodeId}),r=await createRuntimeToolRegistry({tools:n.tools},{nodeId:t}),i=createRuntimeSandboxRegistry({sandbox:n.sandbox,workspaceResourceRoot:n.workspaceResourceRoot}),a=createRuntimeSubagentRegistry({disabledToolNames:e.manifest.sourceComposition.entries.flatMap(e=>e.kind!==`disabled`||!e.source.logicalPath.startsWith(`tools/`)?[]:[stripLogicalPathExtension(e.source.logicalPath).replace(/^tools\//,``).replaceAll(`/`,`-`)]),reservedToolNames:[LOAD_SKILL_TOOL_NAME,...r.preparedTools.map(e=>e.name)],subagents:await resolveRuntimeSubagents({childNodeIdsByParentNodeId:e.childNodeIdsByParentNodeId,manifest:e.manifest,moduleMap:e.moduleMap,nodesByNodeId:e.nodesByNodeId,parentNodeId:e.nodeId,subagentNodesById:e.subagentNodesById})}),o={agent:n,channels:n.channels,hookRegistry:createRuntimeHookRegistry(n.hooks),nodeId:t,sandboxRegistry:i,sourceId:e.sourceId,subagentRegistry:a,toolRegistry:r,turnAgent:createResolvedRuntimeTurnAgent({agent:n,dynamicSubagentsAvailable:a.dynamicResolvers.length>0,id:e.agentId,nodeId:t,tools:[...r.preparedTools,...a.preparedTools]})};return e.nodesByNodeId.set(t,o),o}async function resolveRuntimeSubagents(e){let t=[],n=e.childNodeIdsByParentNodeId.get(e.parentNodeId)??[];for(let r of n){let n=e.subagentNodesById.get(r);if(n===void 0)throw new ResolveRuntimeAgentGraphError(`Missing compiled subagent node "${r}" while resolving runtime subagents.`,{nodeId:toRuntimeNodeId(e.parentNodeId),sourceId:r});t.push(await resolveRuntimeSubagent({childNodeIdsByParentNodeId:e.childNodeIdsByParentNodeId,moduleMap:e.moduleMap,nodesByNodeId:e.nodesByNodeId,sourceRef:n,subagentNodesById:e.subagentNodesById}))}for(let n of e.manifest.remoteAgents)t.push(await resolveRuntimeRemoteAgent({moduleMap:e.moduleMap,nodeScopeId:e.parentNodeId,sourceRef:n}));return t}async function resolveRuntimeSubagent(e){let t={...e.sourceRef.configResolver===void 0?{description:e.sourceRef.description,tool:e.sourceRef.agent.config.tool}:{dynamic:await resolveDynamicSubagentDefinition({definition:e.sourceRef.configResolver,moduleMap:e.moduleMap,nodeId:e.sourceRef.nodeId})},kind:`subagent`,logicalPath:e.sourceRef.logicalPath,name:e.sourceRef.name,nodeId:toRuntimeNodeId(e.sourceRef.nodeId),sourceId:e.sourceRef.sourceId,sourceKind:`module`};return await resolveRuntimeAgentNode({agentId:e.sourceRef.name,childNodeIdsByParentNodeId:e.childNodeIdsByParentNodeId,manifest:e.sourceRef.agent,moduleMap:e.moduleMap,nodeId:e.sourceRef.nodeId,nodesByNodeId:e.nodesByNodeId,sourceId:e.sourceRef.sourceId,subagentNodesById:e.subagentNodesById}),t}async function resolveRuntimeRemoteAgent(e){let t=await loadResolvedModuleExport({definition:e.sourceRef,kindLabel:`remote agent`,moduleMap:e.moduleMap,nodeId:e.nodeScopeId}),n=expectObjectRecord(t,`Expected remote agent source "${e.sourceRef.logicalPath}" to export an object.`),r={description:e.sourceRef.description,kind:`remote`,logicalPath:e.sourceRef.logicalPath,name:e.sourceRef.name,nodeId:toRuntimeNodeId(e.sourceRef.nodeId),outputSchema:e.sourceRef.outputSchema,path:e.sourceRef.path,sourceId:e.sourceRef.sourceId,sourceKind:`module`,tool:e.sourceRef.tool,url:await resolveRemoteAgentUrl({bakedUrl:e.sourceRef.url,logicalPath:e.sourceRef.logicalPath,resolvedUrl:n.url})};typeof n.auth==`function`&&(r.auth=n.auth),n.forwardPrincipal===!0&&(r.forwardPrincipal=!0);let i=resolveRemoteAgentHeaders(n.headers);return i!==void 0&&(r.headers=i),r}async function resolveRemoteAgentUrl(e){if(typeof e.resolvedUrl==`function`){let t=await e.resolvedUrl();if(typeof t!=`string`||t.length===0)throw Error(`Remote agent "${e.logicalPath}" url function must return a non-empty string.`);return t}let t=e.bakedUrl??(typeof e.resolvedUrl==`string`?e.resolvedUrl:``);if(t.length===0)throw Error(`Remote agent "${e.logicalPath}" is missing a url.`);return t}function resolveRemoteAgentHeaders(e){if(e===void 0)return;if(typeof e==`function`)return e;if(typeof e!=`object`||!e||Array.isArray(e))return;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&(t[n]=r);return t}function attachInheritedSandboxWorkspaceResources(e){let t=new Map(e.manifest.subagents.map(e=>[e.nodeId,e.parentNodeId]));for(let[n,r]of e.nodesByNodeId){if(r.sandboxRegistry.sandbox.definition.kind!==`parent`)continue;if(r.agent.dynamicSkillResolvers.length>0)throw new ResolveRuntimeAgentGraphError(`Sandbox "${r.sandboxRegistry.sandbox.definition.logicalPath}" selects parent.sandbox but agent node "${n}" defines dynamic skills. Remove the child dynamic skills or give the child its own sandbox.`,{nodeId:n});let i=t.get(n);if(i===void 0)throw new ResolveRuntimeAgentGraphError(`Sandbox "${r.sandboxRegistry.sandbox.definition.logicalPath}" selects parent.sandbox but agent node "${n}" has no parent.`,{nodeId:n});let a=resolveSandboxOwnerNode({nodeId:i,nodesByNodeId:e.nodesByNodeId,parentNodeIdByChildNodeId:t});r.sandboxRegistry.sandbox.inheritance={definition:a.sandboxRegistry.sandbox.definition,nodeId:a.nodeId,workspaceResourceRoot:a.sandboxRegistry.sandbox.workspaceResourceRoot};let o=createWorkspacePromptSection(a.agent.workspaceSpec);o!==void 0&&(r.turnAgent.instructions=[...r.turnAgent.instructions,o])}}function resolveSandboxOwnerNode(e){let t=e.nodesByNodeId.get(toRuntimeNodeId(e.nodeId));if(t===void 0)throw new ResolveRuntimeAgentGraphError(`Missing parent runtime node "${e.nodeId}".`,{nodeId:e.nodeId});if(t.sandboxRegistry.sandbox.definition.kind!==`parent`)return t;let n=e.parentNodeIdByChildNodeId.get(e.nodeId);if(n===void 0)throw new ResolveRuntimeAgentGraphError(`Inherited sandbox node "${e.nodeId}" has no parent.`,{nodeId:e.nodeId});return resolveSandboxOwnerNode({...e,nodeId:n})}function createChildNodeIdsByParentNodeId(e){let t=new Map;for(let n of e.subagents){let e=t.get(n.parentNodeId);if(e===void 0){t.set(n.parentNodeId,[n.nodeId]);continue}e.push(n.nodeId)}return t}function toRuntimeNodeId(e){return e===ROOT_COMPILED_AGENT_NODE_ID?ROOT_RUNTIME_AGENT_NODE_ID:e}export{resolveRuntimeAgentGraph};
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CompiledSandboxDefinition } from "#compiler/manifest.js";
|
|
2
2
|
import type { CompiledModuleMap } from "#compiler/module-map.js";
|
|
3
3
|
import type { ResolvedSandboxDefinition } from "#runtime/types.js";
|
|
4
|
-
/**
|
|
5
|
-
* Resolves one compiled sandbox entry into a runtime-owned definition
|
|
6
|
-
* with live `backend`, `bootstrap`, and `onSession` lifecycle handlers
|
|
7
|
-
* (when present) attached from the authored module.
|
|
8
|
-
*
|
|
9
|
-
* If the authored module omits `backend`, the resolver substitutes
|
|
10
|
-
* {@link defaultSandbox} so the rest of the runtime can rely on a
|
|
11
|
-
* non-null backend value.
|
|
12
|
-
*/
|
|
13
4
|
export declare function resolveSandboxDefinition(definition: CompiledSandboxDefinition, moduleMap: CompiledModuleMap, nodeId: string | undefined): Promise<ResolvedSandboxDefinition>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{expectObjectRecord}from"#internal/authored-module.js";import{
|
|
1
|
+
import{expectObjectRecord,getAuthoredModuleExport}from"#internal/authored-module.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{getBoundSandboxEnvironment,isSandboxEnvironment}from"#shared/sandbox-environment.js";import{defineParentSandbox}from"#public/definitions/sandbox.js";import{ResolveAgentError}from"#runtime/resolve-helpers.js";async function resolveSandboxDefinition(e,t,n){if(e.inheritsParent===!0)return{exportName:e.exportName,kind:`parent`,logicalPath:e.logicalPath,revisionHash:e.revisionHash,selector:defineParentSandbox(),sourceId:e.sourceId,sourceKind:`module`};let r=t.nodes[n??ROOT_COMPILED_AGENT_NODE_ID]?.modules[e.sourceId],i=expectObjectRecord(r,`Missing sandbox module "${e.logicalPath}".`),a=getAuthoredModuleExport(i,e);if(typeof a!=`function`)throw new ResolveAgentError(`Sandbox "${e.logicalPath}" does not export a selector.`);let o=e.environmentExportName?i[e.environmentExportName]:getBoundSandboxEnvironment(a),s={exportName:e.exportName,logicalPath:e.logicalPath,revisionHash:e.revisionHash,selector:a,sourceId:e.sourceId,sourceKind:`module`};if(!isSandboxEnvironment(o))throw new ResolveAgentError(`Sandbox "${e.logicalPath}" has no environment.`);return{...s,environment:o,kind:`independent`}}export{resolveSandboxDefinition};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RuntimeCompiledArtifactsSource } from "#runtime/compiled-artifacts-source.js";
|
|
2
|
+
import { type SandboxPreparedArtifactEntry, type SandboxPreparedArtifactsManifest } from "#shared/sandbox-prepared-artifacts.js";
|
|
3
|
+
import type { SandboxPreparedArtifact } from "#shared/sandbox-provider.js";
|
|
4
|
+
export declare function writeSandboxPreparedArtifactsManifest(input: {
|
|
5
|
+
readonly compileDirectoryPath: string;
|
|
6
|
+
readonly entries: readonly SandboxPreparedArtifactEntry[];
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
export declare function loadSandboxPreparedArtifact(input: {
|
|
9
|
+
readonly compiledArtifactsSource: RuntimeCompiledArtifactsSource;
|
|
10
|
+
readonly nodeId: string;
|
|
11
|
+
readonly providerName: string;
|
|
12
|
+
}): Promise<SandboxPreparedArtifact | undefined>;
|
|
13
|
+
export declare function loadSandboxPreparedArtifactsManifest(source: RuntimeCompiledArtifactsSource): Promise<SandboxPreparedArtifactsManifest | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{readFile,writeFile}from"node:fs/promises";import{createSandboxPreparedArtifactsManifest,sandboxPreparedArtifactsManifestSchema}from"#shared/sandbox-prepared-artifacts.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";async function writeSandboxPreparedArtifactsManifest(e){if(e.entries.length===0)return;let t=`${e.compileDirectoryPath}/sandbox-prepared-artifacts.json`,n=null;try{n=sandboxPreparedArtifactsManifestSchema.parse(JSON.parse(await readFile(t,`utf8`)))}catch(e){if(!(e instanceof Error&&`code`in e&&e.code===`ENOENT`))throw e}let r=new Map(n?.entries.map(e=>[e.nodeId,e]));for(let t of e.entries)r.set(t.nodeId,t);await writeFile(t,`${JSON.stringify(createSandboxPreparedArtifactsManifest([...r.values()]),null,2)}\n`)}async function loadSandboxPreparedArtifact(e){let t=(await loadSandboxPreparedArtifactsManifest(e.compiledArtifactsSource))?.entries.find(t=>t.nodeId===e.nodeId);if(t!==void 0&&t.providerName!==e.providerName)throw Error(`Prepared sandbox artifact for node "${e.nodeId}" belongs to provider "${t.providerName}", not "${e.providerName}".`);return t?.artifact}async function loadSandboxPreparedArtifactsManifest(e){if(e.kind===`bundled`)return readBundledCompiledArtifacts()?.sandboxPreparedArtifacts??null;let t=resolveRuntimeCompilerArtifactPaths(e.appRoot).sandboxPreparedArtifactsPath;try{return sandboxPreparedArtifactsManifestSchema.parse(JSON.parse(await readFile(t,`utf8`)))}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return null;throw e}}export{loadSandboxPreparedArtifact,loadSandboxPreparedArtifactsManifest,writeSandboxPreparedArtifactsManifest};
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import type { CompiledWorkspaceResourceRoot } from "#compiler/manifest.js";
|
|
2
2
|
import type { ResolvedSandboxDefinition } from "#runtime/types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Stable internal source id for the framework-owned default sandbox.
|
|
5
|
-
*
|
|
6
|
-
* Used by the runtime template/session key derivation and by prewarm
|
|
7
|
-
* to distinguish the shared framework sandbox from per-node authored
|
|
8
|
-
* overrides.
|
|
9
|
-
*/
|
|
10
3
|
/**
|
|
11
4
|
* Resolved sandbox tracked by the runtime-owned registry.
|
|
12
5
|
*
|
|
@@ -17,8 +10,8 @@ import type { ResolvedSandboxDefinition } from "#runtime/types.js";
|
|
|
17
10
|
* compiled workspace resource tree owned by this graph node. The
|
|
18
11
|
* prewarm orchestrator resolves the descriptor's logical path against
|
|
19
12
|
* the active compiled artifacts source and writes the contents into
|
|
20
|
-
* the sandbox template
|
|
21
|
-
*
|
|
13
|
+
* the sandbox template artifact. Runtime provider `open(...)` never reads these
|
|
14
|
+
* files.
|
|
22
15
|
*/
|
|
23
16
|
export interface RuntimeRegisteredSandbox {
|
|
24
17
|
readonly definition: ResolvedSandboxDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function createRuntimeSandboxRegistry(e){let t=e.sandbox;if(t.
|
|
1
|
+
function createRuntimeSandboxRegistry(e){let t=e.sandbox;if(t.kind===`parent`&&(e.workspaceResourceRoot.contentHash!==void 0||e.workspaceResourceRoot.rootEntries.length>0))throw Error(`Sandbox "${t.logicalPath}" selects parent.sandbox but has managed workspace resources. Remove the child workspace or give the child its own sandbox.`);return{sandbox:{definition:t,workspaceResourceRoot:e.workspaceResourceRoot}}}export{createRuntimeSandboxRegistry};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AsyncLocalStorage}from"node:async_hooks";function createRuntimeSession(e=`test-session`){return{bundleCache:new Map,bundleCacheKeyBySourceKey:new Map,compiledArtifacts:null,id:e}}function setRuntimeSessionCompiledArtifacts(e,t){let n=e.compiledArtifacts;(n===null||!isSameCompiledArtifactSnapshot(n,t))&&(e.bundleCache.clear(),e.bundleCacheKeyBySourceKey.clear()),e.compiledArtifacts=t}function isSameCompiledArtifactSnapshot(e,t){let n=e.metadata?.discovery.sourceGraphHash,r=t.metadata?.discovery.sourceGraphHash;return n&&r?n===r:e.manifest===t.manifest&&e.moduleMap===t.moduleMap&&e.metadata===t.metadata}const RUNTIME_SESSION_STORAGE_GLOBAL_KEY=Symbol.for(`eve.runtime-session-storage`),RUNTIME_SESSION_DEFAULT_GLOBAL_KEY=Symbol.for(`eve.runtime-session-default`),globalContainer=globalThis;globalContainer[RUNTIME_SESSION_STORAGE_GLOBAL_KEY]===void 0&&(globalContainer[RUNTIME_SESSION_STORAGE_GLOBAL_KEY]=new AsyncLocalStorage);const runtimeSessionStorage=globalContainer[RUNTIME_SESSION_STORAGE_GLOBAL_KEY];function resolveProcessDefaultSession(){return globalContainer[RUNTIME_SESSION_DEFAULT_GLOBAL_KEY]===void 0&&(globalContainer[RUNTIME_SESSION_DEFAULT_GLOBAL_KEY]=createRuntimeSession(`process-default`)),globalContainer[RUNTIME_SESSION_DEFAULT_GLOBAL_KEY]}function getActiveRuntimeSession(){return runtimeSessionStorage.getStore()??resolveProcessDefaultSession()}async function withRuntimeSession(e,t){return await runtimeSessionStorage.run(e,async()=>await t())}export{createRuntimeSession,getActiveRuntimeSession,setRuntimeSessionCompiledArtifacts,withRuntimeSession};
|
|
1
|
+
import{AsyncLocalStorage}from"node:async_hooks";function createRuntimeSession(e=`test-session`){return{bundleCache:new Map,bundleCacheKeyBySourceKey:new Map,compiledArtifacts:null,id:e}}function setRuntimeSessionCompiledArtifacts(e,t){let n=e.compiledArtifacts;(n===null||!isSameCompiledArtifactSnapshot(n,t))&&(e.bundleCache.clear(),e.bundleCacheKeyBySourceKey.clear()),e.compiledArtifacts=t}function isSameCompiledArtifactSnapshot(e,t){let n=e.metadata?.discovery.sourceGraphHash,r=t.metadata?.discovery.sourceGraphHash;return n&&r?n===r&&JSON.stringify(e.sandboxPreparedArtifacts)===JSON.stringify(t.sandboxPreparedArtifacts):e.manifest===t.manifest&&e.moduleMap===t.moduleMap&&e.metadata===t.metadata}const RUNTIME_SESSION_STORAGE_GLOBAL_KEY=Symbol.for(`eve.runtime-session-storage`),RUNTIME_SESSION_DEFAULT_GLOBAL_KEY=Symbol.for(`eve.runtime-session-default`),globalContainer=globalThis;globalContainer[RUNTIME_SESSION_STORAGE_GLOBAL_KEY]===void 0&&(globalContainer[RUNTIME_SESSION_STORAGE_GLOBAL_KEY]=new AsyncLocalStorage);const runtimeSessionStorage=globalContainer[RUNTIME_SESSION_STORAGE_GLOBAL_KEY];function resolveProcessDefaultSession(){return globalContainer[RUNTIME_SESSION_DEFAULT_GLOBAL_KEY]===void 0&&(globalContainer[RUNTIME_SESSION_DEFAULT_GLOBAL_KEY]=createRuntimeSession(`process-default`)),globalContainer[RUNTIME_SESSION_DEFAULT_GLOBAL_KEY]}function getActiveRuntimeSession(){return runtimeSessionStorage.getStore()??resolveProcessDefaultSession()}async function withRuntimeSession(e,t){return await runtimeSessionStorage.run(e,async()=>await t())}export{createRuntimeSession,getActiveRuntimeSession,setRuntimeSessionCompiledArtifacts,withRuntimeSession};
|
|
@@ -24,8 +24,7 @@ import type { InternalAgentDefinition } from "#shared/agent-definition.js";
|
|
|
24
24
|
import type { RuntimeDynamicModelReference } from "#runtime/agent/bootstrap.js";
|
|
25
25
|
import type { InternalToolDefinitionWithExecuteFn } from "#tools/definition.js";
|
|
26
26
|
import type { CompiledToolBehavior } from "#tools/behavior.js";
|
|
27
|
-
import type {
|
|
28
|
-
import type { SandboxBootstrapContext, SandboxSessionContext } from "#shared/sandbox-definition.js";
|
|
27
|
+
import type { SandboxEnvironmentIdentity, SandboxSelector } from "#shared/sandbox-environment.js";
|
|
29
28
|
import type { ToolSchema } from "#tools/schema.js";
|
|
30
29
|
import type { AgentSourceOwner } from "#compiler/source-graph.js";
|
|
31
30
|
import type { MemoryDefinition } from "#public/memory/index.js";
|
|
@@ -104,32 +103,20 @@ export interface ResolvedConnectionDefinition extends ResolvedModuleSourceRef {
|
|
|
104
103
|
readonly url: string;
|
|
105
104
|
}
|
|
106
105
|
/**
|
|
107
|
-
* Runtime-owned
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* The resolved `backend` is non-optional: every sandbox in the runtime
|
|
111
|
-
* graph carries a concrete SandboxBackend value, even when the
|
|
112
|
-
* authored definition omits `backend`. The omitted field is filled
|
|
113
|
-
* in by `defaultSandbox()` (which itself selects between
|
|
114
|
-
* `vercel()`, `docker()`, `microsandbox()`, and `justbash()` based on the current
|
|
115
|
-
* environment).
|
|
106
|
+
* Runtime-owned sandbox definition resolved from a compiled module map.
|
|
107
|
+
* Independent definitions carry their exported environment; parent definitions
|
|
108
|
+
* explicitly inherit the dispatching agent's sandbox.
|
|
116
109
|
*/
|
|
117
|
-
|
|
118
|
-
readonly
|
|
119
|
-
readonly
|
|
120
|
-
readonly sourceHash?: string;
|
|
121
|
-
/**
|
|
122
|
-
* Resolved backend value. The authored `SandboxDefinition.backend`
|
|
123
|
-
* accepts either a `SandboxBackend` or a `() => SandboxBackend`; by
|
|
124
|
-
* the time it reaches the runtime the function form has been
|
|
125
|
-
* unwrapped via `lazyBackend(...)` so consumers always see a plain
|
|
126
|
-
* value.
|
|
127
|
-
*/
|
|
128
|
-
readonly backend: SandboxBackend;
|
|
129
|
-
readonly description?: string;
|
|
130
|
-
readonly inheritsParent?: boolean;
|
|
131
|
-
readonly onSession?: (input: SandboxSessionContext) => Promise<void> | void;
|
|
110
|
+
type ResolvedSandboxDefinitionBase = ResolvedModuleSourceRef & {
|
|
111
|
+
readonly revisionHash: string;
|
|
112
|
+
readonly selector: SandboxSelector;
|
|
132
113
|
};
|
|
114
|
+
export type ResolvedSandboxDefinition = ResolvedSandboxDefinitionBase & ({
|
|
115
|
+
readonly environment: SandboxEnvironmentIdentity;
|
|
116
|
+
readonly kind: "independent";
|
|
117
|
+
} | {
|
|
118
|
+
readonly kind: "parent";
|
|
119
|
+
});
|
|
133
120
|
/**
|
|
134
121
|
* Runtime-owned tool definition resolved from the selected compiled source graph.
|
|
135
122
|
* A tool without `execute` is surfaced to the client and never executed by eve.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { DockerSandboxEnvironmentOptions } from "#public/sandbox/docker-sandbox.js";
|
|
2
|
+
import type { JustBashSandboxCreateOptions } from "#public/sandbox/just-bash-sandbox.js";
|
|
3
|
+
import type { MicrosandboxSandboxCreateOptions } from "#public/sandbox/microsandbox-sandbox.js";
|
|
4
|
+
import type { VercelSandboxCreateOptions } from "#public/sandbox/vercel-sandbox.js";
|
|
5
|
+
import type { SandboxEnvironment } from "#shared/sandbox-environment.js";
|
|
6
|
+
import type { SandboxSession } from "#shared/sandbox-session.js";
|
|
7
|
+
export interface DefaultSandboxEnvironmentOptions {
|
|
8
|
+
readonly docker?: DockerSandboxEnvironmentOptions;
|
|
9
|
+
readonly justBash?: JustBashSandboxCreateOptions;
|
|
10
|
+
readonly microsandbox?: MicrosandboxSandboxCreateOptions;
|
|
11
|
+
readonly prepare?: (sandbox: SandboxSession) => Promise<void> | void;
|
|
12
|
+
readonly vercel?: VercelSandboxCreateOptions;
|
|
13
|
+
}
|
|
14
|
+
export interface DefaultSandboxProbes {
|
|
15
|
+
readonly isDeployedOnVercel: () => boolean;
|
|
16
|
+
readonly isDockerAvailable: () => boolean;
|
|
17
|
+
readonly isMicrosandboxSupported: () => boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const SANDBOX_PROVIDER_PROBES: DefaultSandboxProbes;
|
|
20
|
+
export declare const DefaultSandbox: {
|
|
21
|
+
name: string;
|
|
22
|
+
environment(options?: DefaultSandboxEnvironmentOptions): SandboxEnvironment<undefined>;
|
|
23
|
+
};
|
|
24
|
+
export declare function defineDefaultSandboxProvider(probes: DefaultSandboxProbes): {
|
|
25
|
+
name: string;
|
|
26
|
+
environment(options?: DefaultSandboxEnvironmentOptions): SandboxEnvironment<undefined>;
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isLinuxDockerDaemonAvailableSync,isMicrosandboxPlatformSupported}from"#execution/sandbox/bindings/local.js";import{DockerSandbox}from"#sandbox/providers/docker.js";import{JustBashSandbox}from"#sandbox/providers/just-bash.js";import{MicrosandboxSandbox}from"#sandbox/providers/microsandbox.js";import{createDefaultVercelEnvironment}from"#sandbox/providers/vercel.js";const SANDBOX_PROVIDER_PROBES={isDeployedOnVercel:()=>!!process.env.VERCEL,isDockerAvailable:()=>isLinuxDockerDaemonAvailableSync(),isMicrosandboxSupported:()=>isMicrosandboxPlatformSupported()},DefaultSandbox=defineDefaultSandboxProvider(SANDBOX_PROVIDER_PROBES);function defineDefaultSandboxProvider(e){return{name:`default`,environment(t={}){return e.isDeployedOnVercel()?withoutOpenOptions(createDefaultVercelEnvironment(withPreparation(t.vercel,t.prepare))):e.isDockerAvailable()?withoutOpenOptions(DockerSandbox.environment(withPreparation(t.docker,t.prepare))):e.isMicrosandboxSupported()?withoutOpenOptions(MicrosandboxSandbox.environment(withPreparation(t.microsandbox,t.prepare))):JustBashSandbox.environment(withPreparation(t.justBash,t.prepare))}}}function withPreparation(e,t){return Object.assign({},e,t===void 0?{}:{prepare:t})}function withoutOpenOptions(e){return e}export{DefaultSandbox,SANDBOX_PROVIDER_PROBES,defineDefaultSandboxProvider};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DockerSandboxEnvironmentOptions, DockerSandboxRuntimeOptions } from "#public/sandbox/docker-sandbox.js";
|
|
2
|
+
import type { SandboxEnvironment } from "#shared/sandbox-environment.js";
|
|
3
|
+
import type { MutableNetworkSandboxSession } from "#shared/sandbox-session.js";
|
|
4
|
+
export type { DockerSandboxEnvironmentOptions, DockerSandboxRuntimeOptions, } from "#public/sandbox/docker-sandbox.js";
|
|
5
|
+
type DockerfileEnvironmentInput = Omit<DockerSandboxEnvironmentOptions, "image">;
|
|
6
|
+
export declare const DockerSandbox: {
|
|
7
|
+
name: string;
|
|
8
|
+
environment(options?: Readonly<DockerSandboxEnvironmentOptions> | undefined): SandboxEnvironment<DockerSandboxRuntimeOptions, MutableNetworkSandboxSession>;
|
|
9
|
+
dockerfile(options?: DockerfileEnvironmentInput): SandboxEnvironment<DockerSandboxRuntimeOptions, MutableNetworkSandboxSession>;
|
|
10
|
+
image(reference: string, options?: DockerfileEnvironmentInput): SandboxEnvironment<DockerSandboxRuntimeOptions, MutableNetworkSandboxSession>;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createDockerSandboxProvider}from"#execution/sandbox/bindings/local.js";import{defineSandboxProvider}from"#shared/sandbox-provider.js";const provider=defineSandboxProvider({name:`docker`,environment(e){return createDockerSandboxProvider(e)}}),DockerSandbox={...provider,dockerfile(e={}){return provider.environment(e)},image(e,t={}){return provider.environment({...t,image:e})}};export{DockerSandbox};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { JustBashSandboxCreateOptions } from "#public/sandbox/just-bash-sandbox.js";
|
|
2
|
+
import type { FixedNetworkSandboxSession } from "#shared/sandbox-session.js";
|
|
3
|
+
export type JustBashEnvironmentOptions = JustBashSandboxCreateOptions;
|
|
4
|
+
export declare const JustBashSandbox: import("#shared/sandbox-provider.js").SandboxProvider<JustBashSandboxCreateOptions, undefined, FixedNetworkSandboxSession>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createJustBashSandboxProvider}from"#execution/sandbox/bindings/local.js";import{defineSandboxProvider}from"#shared/sandbox-provider.js";const JustBashSandbox=defineSandboxProvider({name:`just-bash`,environment:e=>createJustBashSandboxProvider(e)});export{JustBashSandbox};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MicrosandboxSandboxCreateOptions, MicrosandboxSandboxRuntimeOptions } from "#public/sandbox/microsandbox-sandbox.js";
|
|
2
|
+
import type { SandboxEnvironment } from "#shared/sandbox-environment.js";
|
|
3
|
+
import type { MutableNetworkSandboxSession } from "#shared/sandbox-session.js";
|
|
4
|
+
export type MicrosandboxEnvironmentOptions = MicrosandboxSandboxCreateOptions;
|
|
5
|
+
type DockerfileEnvironmentInput = Omit<MicrosandboxEnvironmentOptions, "image">;
|
|
6
|
+
export declare const MicrosandboxSandbox: {
|
|
7
|
+
name: string;
|
|
8
|
+
environment(options?: Readonly<MicrosandboxSandboxCreateOptions> | undefined): SandboxEnvironment<MicrosandboxSandboxRuntimeOptions, MutableNetworkSandboxSession>;
|
|
9
|
+
dockerfile(options?: DockerfileEnvironmentInput): SandboxEnvironment<MicrosandboxSandboxRuntimeOptions, MutableNetworkSandboxSession>;
|
|
10
|
+
image(reference: string, options?: DockerfileEnvironmentInput): SandboxEnvironment<MicrosandboxSandboxRuntimeOptions, MutableNetworkSandboxSession>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineSandboxProvider}from"#shared/sandbox-provider.js";import{createMicrosandboxSandboxProvider}from"#execution/sandbox/bindings/microsandbox.js";const provider=defineSandboxProvider({name:`microsandbox`,stateProtocolVersion:3,environment:e=>createMicrosandboxSandboxProvider(e)}),MicrosandboxSandbox={...provider,dockerfile(e={}){return provider.environment(e)},image(e,t={}){return provider.environment({...t,image:e})}};export{MicrosandboxSandbox};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { VercelSandboxCreateOptions, VercelSandboxRuntimeOptions } from "#public/sandbox/vercel-sandbox.js";
|
|
2
|
+
import type { SandboxEnvironment } from "#shared/sandbox-environment.js";
|
|
3
|
+
import type { MutableNetworkSandboxSession, SandboxSession } from "#shared/sandbox-session.js";
|
|
4
|
+
export type VercelSandboxEnvironmentOptions = VercelSandboxCreateOptions & {
|
|
5
|
+
readonly prepare?: (sandbox: SandboxSession) => Promise<void> | void;
|
|
6
|
+
};
|
|
7
|
+
export type { VercelSandboxRuntimeOptions } from "#public/sandbox/vercel-sandbox.js";
|
|
8
|
+
export declare function createDefaultVercelEnvironment(options?: VercelSandboxEnvironmentOptions): SandboxEnvironment<VercelSandboxRuntimeOptions, MutableNetworkSandboxSession>;
|
|
9
|
+
export declare const VercelSandbox: {
|
|
10
|
+
name: string;
|
|
11
|
+
environment(options?: VercelSandboxEnvironmentOptions): SandboxEnvironment<VercelSandboxRuntimeOptions, MutableNetworkSandboxSession>;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineSandboxProvider}from"#shared/sandbox-provider.js";import{createVercelSandbox,createVercelSandboxProvider}from"#execution/sandbox/bindings/vercel.js";const defaultProvider=defineSandboxProvider({name:`vercel`,environment:e=>{let{prepare:t,...n}=e??{};return createVercelSandbox({createOptions:n,prepare:t,skipEmptyPreparation:!0})}}),provider=defineSandboxProvider({name:`vercel`,environment:e=>createVercelSandboxProvider(e)});function createDefaultVercelEnvironment(e){return defaultProvider.environment(e)}const VercelSandbox={name:`vercel`,environment(e){return provider.environment(e)}};export{VercelSandbox,createDefaultVercelEnvironment};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DefaultSandbox } from "#sandbox/providers/default.js";
|
|
2
|
+
export { DockerSandbox } from "#sandbox/providers/docker.js";
|
|
3
|
+
export { JustBashSandbox } from "#sandbox/providers/just-bash.js";
|
|
4
|
+
export { MicrosandboxSandbox } from "#sandbox/providers/microsandbox.js";
|
|
5
|
+
export { VercelSandbox } from "#sandbox/providers/vercel.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DockerSandbox}from"#sandbox/providers/docker.js";import{DefaultSandbox}from"#sandbox/providers/default.js";import{JustBashSandbox}from"#sandbox/providers/just-bash.js";import{MicrosandboxSandbox}from"#sandbox/providers/microsandbox.js";import{VercelSandbox}from"#sandbox/providers/vercel.js";export{DefaultSandbox,DockerSandbox,JustBashSandbox,MicrosandboxSandbox,VercelSandbox};
|
|
@@ -1,32 +1,13 @@
|
|
|
1
1
|
import type { SandboxSession } from "#public/definitions/sandbox.js";
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* backend's public-API spelling into harness code.
|
|
9
|
-
*/
|
|
10
|
-
export type SandboxSessionState = SandboxBackendSessionState;
|
|
11
|
-
/**
|
|
12
|
-
* Serializable sandbox state carried on the harness session across
|
|
13
|
-
* step boundaries.
|
|
14
|
-
*
|
|
15
|
-
* Contains only stable identifiers — live handles stay in a
|
|
16
|
-
* process-level cache and are rehydrated per step via the backend.
|
|
17
|
-
* Every agent owns exactly one sandbox, so the state is just a single
|
|
18
|
-
* `initialized` flag and an optional persisted session record.
|
|
19
|
-
*/
|
|
2
|
+
import type { SandboxDeleteOptions, SandboxPreparedArtifact } from "#shared/sandbox-provider.js";
|
|
3
|
+
export interface SandboxSessionState {
|
|
4
|
+
readonly providerName: string;
|
|
5
|
+
readonly state: SandboxPreparedArtifact;
|
|
6
|
+
readonly stateProtocolVersion: number;
|
|
7
|
+
}
|
|
20
8
|
export interface SandboxState {
|
|
21
|
-
readonly initialized: boolean;
|
|
22
9
|
readonly session: SandboxSessionState | null;
|
|
23
10
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Lazy sandbox accessor bound to one step execution.
|
|
26
|
-
*
|
|
27
|
-
* Returned by `ensureSandboxAccess` and placed on the `AlsContext` (via
|
|
28
|
-
* `SandboxKey`) so tools can call `ctx.getSandbox()`.
|
|
29
|
-
*/
|
|
30
11
|
export interface SandboxAccess {
|
|
31
12
|
captureState(): Promise<SandboxState>;
|
|
32
13
|
delete?(options?: SandboxDeleteOptions): Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AgentReasoningDefinition, type AgentStaticModelDefinition, type DynamicSentinel, type DynamicSubagentDefinition } from "eve";
|
|
2
2
|
import { type SelfModificationConfig } from "../../../config.js";
|
|
3
3
|
/** Fallback model when neither the self-modification agent nor its parent configures one. */
|
|
4
|
-
export declare const FALLBACK_SELF_MODIFICATION_MODEL = "
|
|
4
|
+
export declare const FALLBACK_SELF_MODIFICATION_MODEL = "spacexai/grok-4.7";
|
|
5
5
|
/** Configuration for the self-modification subagent. */
|
|
6
6
|
export interface SelfModificationAgentOptions {
|
|
7
7
|
/** Policy shared with the sandbox and extension mount. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveSelfModificationConfig}from"../../../config.js";import{hasGitHubCredential}from"../../../credentials.js";import extension_default from"../../extension.js";import{resolveSelfModificationMode}from"../../../mode.js";import{DEFAULT_AGENT_MODEL_ID}from"#shared/default-agent-model.js";import{defineAgent,defineDynamic}from"eve";const FALLBACK_SELF_MODIFICATION_MODEL=DEFAULT_AGENT_MODEL_ID;function renderDescription(e){return e.filter(e=>e.length>0).join(` `)}function defineSelfModificationAgent(e={}){let resolve=async(t,n)=>{let r=extension_default.config,i=e.reasoning??r.reasoning,a=resolveSelfModificationConfig(e.config??r),o=resolveSelfModificationMode(a),s=e.model??r.model??n.model?.id??FALLBACK_SELF_MODIFICATION_MODEL,c=renderDescription([`Delegate here when the user asks to change this eve agent or its authored source.`,`If the requested change references a tool or skill, include the exact identifier. Do not infer source paths; let the child resolve the appropriate file under /source. Delegate the requested change and existing constraints without adding unrequested features, implementation steps, or reporting requirements.`,`Treat requests for persistent changes to future behavior or capabilities as source-modification requests, even when the requester does not mention files or source code. Infer persistence from the request and conversation rather than waiting for phrases such as “modify your source.” For example, asking the agent to stop always doing something, add a capability, or change future responses calls for inspecting and editing the authored source instead of providing a one-turn workaround.`,`Treat questions phrased as whether you can install, add, enable, or connect to a named product or service as requests to extend this eve agent and delegate immediately. Do not assume they refer to device software, ask what kind of installation they mean, or deny them because you lack access to the user's device. The subagent determines whether the request maps to an integration, channel, connection, or other capability, then checks registry availability and any required setup.`,o===`local`?`Delegate questions about which integrations, channels, connections, or capabilities are available to add: the subagent searches the eve registry and reports exact item addresses instead of guessing them.`:`Delegate requests to add integrations, channels, connections, or capabilities: the subagent searches the official eve registry and can install source changes into the draft proposal. Setup may require non-secret answers or an external action, and secret binding remains separate.`,o===`local`?`Delegate requests to investigate, diagnose, or optimize the agent's behavior from local traces to this subagent: it can inspect the invoking session's trace and make persistent source changes when warranted.`:``,`Resolve short follow-ups such as “yes” or “do it” against the preceding conversation. If whether the requested change should persist is genuinely ambiguous, ask one concise clarifying question.`,`If a tool or capability created or changed by this subagent later fails or behaves incorrectly, explain the observed problem and offer to delegate a repair. Do not start the repair until the user confirms. Treat that confirmation as a source-modification request and delegate it immediately, including the exact identifier, failing behavior, expected behavior, and existing constraints.`,o===`local`?`Source edits do not affect the caller’s current turn. After this subagent reports changes, do not invoke edited tools or attempt runtime verification until a new user turn.`:`Source edits do not affect the caller’s current turn. The subagent can publish only a draft pull request, and changes become effective only after review, merge, and redeployment.`]);if(o===`local`)return defineAgent({description:c,model:s,reasoning:i});if(o!==`deployed`||a.deployed===void 0||a.deployed.credentials.kind===`pat`&&!hasGitHubCredential())return null;try{if(!await a.deployed.authorize({channel:n.channel,principal:n.session.auth.current}))return null}catch{return null}return defineAgent({description:c,model:s,reasoning:i})};return defineDynamic({events:{"session.started":resolve,"turn.started":resolve}})}var agent_default=defineSelfModificationAgent();export{FALLBACK_SELF_MODIFICATION_MODEL,agent_default as default,defineSelfModificationAgent};
|
|
1
|
+
import{resolveSelfModificationConfig}from"../../../config.js";import{hasGitHubCredential}from"../../../credentials.js";import extension_default from"../../extension.js";import{resolveSelfModificationMode}from"../../../mode.js";import{DEFAULT_AGENT_MODEL_ID}from"#shared/default-agent-model.js";import{defineAgent,defineDynamic}from"eve";import{getLocalDevCapability}from"eve/local-dev";const FALLBACK_SELF_MODIFICATION_MODEL=DEFAULT_AGENT_MODEL_ID;function renderDescription(e){return e.filter(e=>e.length>0).join(` `)}function defineSelfModificationAgent(e={}){let resolve=async(t,n)=>{let r=extension_default.config,i=e.reasoning??r.reasoning,a=resolveSelfModificationConfig(e.config??r),o=resolveSelfModificationMode(a),s=e.model??r.model??n.model?.id??FALLBACK_SELF_MODIFICATION_MODEL,c=renderDescription([`Delegate here when the user asks to change this eve agent or its authored source.`,`If the requested change references a tool or skill, include the exact identifier. Do not infer source paths; let the child resolve the appropriate file under /source. Delegate the requested change and existing constraints without adding unrequested features, implementation steps, or reporting requirements.`,`Treat requests for persistent changes to future behavior or capabilities as source-modification requests, even when the requester does not mention files or source code. Infer persistence from the request and conversation rather than waiting for phrases such as “modify your source.” For example, asking the agent to stop always doing something, add a capability, or change future responses calls for inspecting and editing the authored source instead of providing a one-turn workaround.`,`Treat questions phrased as whether you can install, add, enable, or connect to a named product or service as requests to extend this eve agent and delegate immediately. Do not assume they refer to device software, ask what kind of installation they mean, or deny them because you lack access to the user's device. The subagent determines whether the request maps to an integration, channel, connection, or other capability, then checks registry availability and any required setup.`,o===`local`?`Delegate questions about which integrations, channels, connections, or capabilities are available to add: the subagent searches the eve registry and reports exact item addresses instead of guessing them.`:`Delegate requests to add integrations, channels, connections, or capabilities: the subagent searches the official eve registry and can install source changes into the draft proposal. Setup may require non-secret answers or an external action, and secret binding remains separate.`,o===`local`?`Delegate requests to investigate, diagnose, or optimize the agent's behavior from local traces to this subagent: it can inspect the invoking session's trace and make persistent source changes when warranted.`:``,`Resolve short follow-ups such as “yes” or “do it” against the preceding conversation. If whether the requested change should persist is genuinely ambiguous, ask one concise clarifying question.`,`If a tool or capability created or changed by this subagent later fails or behaves incorrectly, explain the observed problem and offer to delegate a repair. Do not start the repair until the user confirms. Treat that confirmation as a source-modification request and delegate it immediately, including the exact identifier, failing behavior, expected behavior, and existing constraints.`,o===`local`?`Source edits do not affect the caller’s current turn. After this subagent reports changes, do not invoke edited tools or attempt runtime verification until a new user turn.`:`Source edits do not affect the caller’s current turn. The subagent can publish only a draft pull request, and changes become effective only after review, merge, and redeployment.`]);if(o===`local`)return getLocalDevCapability()===void 0?null:defineAgent({description:c,model:s,reasoning:i});if(o!==`deployed`||a.deployed===void 0||a.deployed.credentials.kind===`pat`&&!hasGitHubCredential())return null;try{if(!await a.deployed.authorize({channel:n.channel,principal:n.session.auth.current}))return null}catch{return null}return defineAgent({description:c,model:s,reasoning:i})};return defineDynamic({events:{"session.started":resolve,"turn.started":resolve}})}var agent_default=defineSelfModificationAgent();export{FALLBACK_SELF_MODIFICATION_MODEL,agent_default as default,defineSelfModificationAgent};
|