eve 0.62.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 +49 -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 +50 -0
- package/dist/src/cli/dev/tui/model-picker.js +1 -0
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/runner.js +2 -2
- package/dist/src/cli/dev/tui/setup-commands.d.ts +1 -1
- package/dist/src/cli/dev/tui/setup-commands.js +1 -1
- package/dist/src/cli/dev/tui/setup-flow.d.ts +2 -2
- package/dist/src/cli/dev/tui/setup-panel.d.ts +1 -26
- package/dist/src/cli/dev/tui/setup-panel.js +3 -3
- package/dist/src/cli/dev/tui/setup-selection-input.js +1 -1
- package/dist/src/cli/dev/tui/stream-format.d.ts +6 -7
- package/dist/src/cli/dev/tui/stream-format.js +2 -2
- package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
- package/dist/src/cli/dev/tui/test/fake-setup-flow-renderer.js +1 -1
- package/dist/src/cli/dev/tui/test/mock-terminal.js +1 -1
- package/dist/src/cli/dev/tui/theme.d.ts +0 -8
- package/dist/src/cli/dev/tui/theme.js +1 -1
- 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 +42 -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-agent-config.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/normalize-tool.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/build-dynamic-tools.js +1 -1
- package/dist/src/context/container.d.ts +1 -1
- package/dist/src/context/container.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.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/derive-run-facts.js +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 +26 -9
- 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/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/cancel-indexed-session-tasks-step.d.ts +2 -1
- package/dist/src/execution/cancel-indexed-session-tasks-step.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +3 -7
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/coordination-dispatch-step.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/route-child-delivery.js +3 -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/admission.js +1 -1
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +2 -1
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +4 -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/turn.js +1 -1
- package/dist/src/execution/session-inbox/protocol.js +1 -1
- package/dist/src/execution/session-workflow-tool-run.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +0 -1
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/tasks/child/notify.d.ts +44 -0
- package/dist/src/execution/tasks/child/notify.js +1 -0
- package/dist/src/execution/tasks/parent/control-shared.d.ts +2 -5
- package/dist/src/execution/tasks/parent/control-shared.js +1 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +8 -36
- package/dist/src/execution/tasks/parent/delegate.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.d.ts +3 -5
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +4 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tasks/parent/run-parent.d.ts +5 -19
- package/dist/src/execution/tasks/parent/run-parent.js +1 -1
- package/dist/src/execution/tasks/parent/task-cancel.d.ts +6 -5
- package/dist/src/execution/tasks/parent/task-cancel.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/tool-auth.d.ts +3 -9
- package/dist/src/execution/tool-auth.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/accept-event-step.js +1 -1
- package/dist/src/execution/tools/subagent/emit-event-step.d.ts +11 -0
- package/dist/src/execution/tools/subagent/emit-event-step.js +1 -0
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +5 -7
- package/dist/src/execution/tools/subagent/invoke-agent.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-step.d.ts +3 -2
- package/dist/src/execution/tools/subagent/invoke-step.js +1 -1
- package/dist/src/execution/tools/subagent/start.d.ts +1 -0
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +0 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.js +1 -1
- package/dist/src/execution/tools/subagent/task-cancel.d.ts +1 -1
- package/dist/src/execution/tools/subagent/task-cancel.js +1 -1
- package/dist/src/execution/tools/workflow/background.d.ts +1 -1
- package/dist/src/execution/tools/workflow/background.js +1 -1
- package/dist/src/execution/tools/workflow/body.d.ts +0 -2
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/cancel.d.ts +4 -3
- package/dist/src/execution/tools/workflow/cancel.js +1 -1
- package/dist/src/execution/tools/workflow/cancellation-policy.d.ts +2 -0
- package/dist/src/execution/tools/workflow/cancellation-policy.js +1 -0
- package/dist/src/execution/tools/workflow/messages.d.ts +0 -1
- package/dist/src/execution/tools/workflow/owner-channels.d.ts +6 -6
- package/dist/src/execution/tools/workflow/owner-inbox.d.ts +5 -9
- package/dist/src/execution/tools/workflow/owner-inbox.js +1 -1
- package/dist/src/execution/tools/workflow/owner.d.ts +6 -2
- package/dist/src/execution/tools/workflow/owner.js +1 -1
- package/dist/src/execution/tools/workflow/start.js +1 -1
- package/dist/src/execution/tools/workflow/types.d.ts +11 -19
- package/dist/src/execution/tools/workflow/types.js +1 -1
- package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +13 -0
- package/dist/src/execution/tools/workflow/workflow-owner-background.js +1 -0
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.d.ts +12 -0
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.js +1 -0
- package/dist/src/execution/tools/workflow/workflow.d.ts +3 -3
- package/dist/src/execution/tools/workflow/workflow.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +0 -4
- package/dist/src/execution/workflow-runtime.js +1 -1
- 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/background-tools.d.ts +3 -5
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +2 -29
- 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/harness/tool-model-output.js +1 -1
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/workflow-tool-runs.d.ts +53 -18
- package/dist/src/harness/workflow-tool-runs.js +1 -1
- 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/dev-runtime-artifacts.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/protocol/message.d.ts +4 -4
- 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/public/tools/index.d.ts +2 -2
- package/dist/src/runtime/agent/resolve-model.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/connections/scoped-authorization.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/sessions/turn.d.ts +10 -8
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/runtime/tools/registry.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/flows/model.d.ts +5 -5
- package/dist/src/setup/primitives/pm/pnpm.js +3 -2
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/shared/action-types.d.ts +0 -4
- package/dist/src/shared/action-types.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 +2 -2
- package/dist/src/tasks/delivery-policy.d.ts +2 -0
- package/dist/src/tasks/delivery-policy.js +1 -1
- package/dist/src/tasks/notification.d.ts +4 -0
- package/dist/src/tasks/notification.js +1 -0
- package/dist/src/tasks/session-task-cohorts.d.ts +1 -12
- package/dist/src/tasks/session-task-cohorts.js +1 -1
- package/dist/src/tasks/transitions.d.ts +5 -2
- package/dist/src/tasks/transitions.js +1 -1
- package/dist/src/tasks/types.d.ts +2 -52
- package/dist/src/tasks/types.js +1 -1
- package/dist/src/tools/definition.d.ts +1 -25
- package/dist/src/tools/definition.js +1 -1
- package/dist/src/tools/dynamic.d.ts +1 -3
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/tools/framework/agent.d.ts +16 -22
- package/dist/src/tools/framework/agent.js +1 -1
- package/dist/src/tools/workflow-definition.d.ts +16 -5
- package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.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 +5 -6
- package/docs/concepts/sessions-runs-and-streaming.md +5 -5
- package/docs/dynamic-configuration/meta.json +5 -0
- package/docs/evals/assertions.mdx +5 -1
- 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 +22 -10
- package/docs/guides/frontend/overview.mdx +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 +27 -6
- package/docs/subagents/meta.json +1 -1
- package/docs/tools/overview.mdx +37 -37
- package/docs/tools/workflows.mdx +31 -24
- package/docs/tutorial/run-analysis.mdx +6 -5
- package/package.json +20 -11
- package/dist/src/cli/dev/tui/model-editor.d.ts +0 -103
- package/dist/src/cli/dev/tui/model-editor.js +0 -1
- 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/execution/tasks/child/steps.d.ts +0 -81
- package/dist/src/execution/tasks/child/steps.js +0 -1
- package/dist/src/execution/tasks/child/workflow.d.ts +0 -28
- package/dist/src/execution/tasks/child/workflow.js +0 -1
- package/dist/src/execution/tools/subagent/emit-called-step.d.ts +0 -9
- package/dist/src/execution/tools/subagent/emit-called-step.js +0 -1
- package/dist/src/execution/tools/workflow/run-control.d.ts +0 -14
- package/dist/src/execution/tools/workflow/run-control.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/dist/src/tasks/session-index.d.ts +0 -65
- package/dist/src/tasks/session-index.js +0 -1
- package/dist/src/tools/task.d.ts +0 -55
- package/dist/src/tools/task.js +0 -1
- package/docs/sandbox.mdx +0 -342
|
@@ -1,46 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* - `"if-not-present"` (default): pull the base image only when it is
|
|
5
|
-
* missing from the local image store.
|
|
6
|
-
* - `"always"`: pull before every template build so the image floats to
|
|
7
|
-
* the registry's latest digest.
|
|
8
|
-
* - `"never"`: never pull; fail when the image is missing locally.
|
|
9
|
-
*/
|
|
1
|
+
import type { SandboxSession } from "#shared/sandbox-session.js";
|
|
2
|
+
import type { SandboxNetworkOptions, SandboxNetworkPolicy } from "#shared/sandbox-network-policy.js";
|
|
3
|
+
/** Image pull behavior for Docker sandbox environments. */
|
|
10
4
|
export type DockerSandboxPullPolicy = "if-not-present" | "always" | "never";
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* credential brokering require `vercel()`.
|
|
17
|
-
*/
|
|
18
|
-
export type DockerSandboxNetworkPolicy = "allow-all" | "deny-all";
|
|
19
|
-
/**
|
|
20
|
-
* Options accepted by `docker(opts)`.
|
|
21
|
-
*/
|
|
22
|
-
export interface DockerSandboxCreateOptions {
|
|
23
|
-
/**
|
|
24
|
-
* Base container image for templates and sessions. Defaults to eve's
|
|
25
|
-
* published `ghcr.io/vercel/eve` image, tagged with the installed eve
|
|
26
|
-
* version without build metadata or `EVE_SANDBOX_IMAGE_TAG` when set. Framework setup creates
|
|
27
|
-
* `/workspace` and verifies Bash. Install
|
|
28
|
-
* any authored runtime tools in sandbox bootstrap or provide them through a
|
|
29
|
-
* custom image.
|
|
30
|
-
*/
|
|
5
|
+
/** Coarse-grained egress policy for one live Docker sandbox. */
|
|
6
|
+
export type DockerSandboxNetworkPolicy = Extract<SandboxNetworkPolicy, "allow-all" | "deny-all">;
|
|
7
|
+
/** Options shared by every sandbox created from one Docker environment. */
|
|
8
|
+
export interface DockerSandboxEnvironmentOptions {
|
|
9
|
+
/** Base container image. Defaults to eve's published sandbox image. */
|
|
31
10
|
readonly image?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Environment variables baked into every container the backend
|
|
34
|
-
* creates (template builds and sessions).
|
|
35
|
-
*/
|
|
11
|
+
/** Environment variables baked into template builds and live containers. */
|
|
36
12
|
readonly env?: Readonly<Record<string, string>>;
|
|
37
|
-
/**
|
|
38
|
-
* Base image pull behavior. Defaults to `"if-not-present"`.
|
|
39
|
-
*/
|
|
13
|
+
/** Base image pull behavior. @default "if-not-present" */
|
|
40
14
|
readonly pullPolicy?: DockerSandboxPullPolicy;
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
15
|
+
/** Idempotent setup captured in the prepared image. */
|
|
16
|
+
readonly prepare?: (sandbox: SandboxSession) => Promise<void> | void;
|
|
17
|
+
}
|
|
18
|
+
/** Options applied when eve creates one live Docker sandbox. */
|
|
19
|
+
export interface DockerSandboxRuntimeOptions extends SandboxNetworkOptions {
|
|
20
|
+
/** Initial network policy for this container. @default "allow-all" */
|
|
45
21
|
readonly networkPolicy?: DockerSandboxNetworkPolicy;
|
|
46
22
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
1
|
+
export { DockerSandbox, type DockerSandboxEnvironmentOptions, type DockerSandboxRuntimeOptions, } from "#sandbox/providers/docker.js";
|
|
2
|
+
export type { DockerSandboxNetworkPolicy, DockerSandboxPullPolicy, } from "#public/sandbox/docker-sandbox.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{DockerSandbox}from"#sandbox/providers/docker.js";export{DockerSandbox};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { defineSandbox, type SandboxAncestorReference, type SandboxBootstrapContext, type SandboxBootstrapUseFn, type SandboxCommandResult, type SandboxDefinition, type SandboxParentDefinition, type SandboxParentDefinitionContext, type SandboxParentValue, type SandboxProcess, type SandboxReadBinaryFileOptions, type SandboxReadFileOptions, type SandboxReadTextFileOptions, type SandboxRevalidationKeyFn, type SandboxRunOptions, type SandboxSession, type RuntimeSandboxSession, type SandboxSpawnOptions, type SandboxSessionContext, type SandboxSessionUseFn, type SandboxWriteBinaryFileOptions, type SandboxWriteFileOptions, type SandboxWriteTextFileOptions, } from "#public/definitions/sandbox.js";
|
|
6
|
-
export type { SandboxBackend, SandboxBackendCreateInput, SandboxBackendHandle, SandboxBackendPrewarmInput, SandboxBackendRuntimeContext, SandboxBackendSessionState, SandboxDeleteOptions, SandboxSeedFile, } from "#public/definitions/sandbox-backend.js";
|
|
7
|
-
export type { SandboxNetworkPolicy } from "#shared/sandbox-network-policy.js";
|
|
8
|
-
export { SandboxTemplateNotProvisionedError } from "#public/definitions/sandbox-backend.js";
|
|
9
|
-
export { defaultSandbox as defaultBackend, type DefaultSandboxOptions as DefaultBackendOptions, } from "#public/sandbox/backends/default.js";
|
|
1
|
+
export { defineParentSandbox, defineSandbox, type SandboxOpenArguments, type SandboxEnvironment, type SandboxSelector, type SandboxSelectorContext, type SandboxCommandResult, type FixedNetworkSandboxSession, type MutableNetworkSandboxSession, type SandboxProcess, type SandboxReadBinaryFileOptions, type SandboxReadFileOptions, type SandboxReadTextFileOptions, type SandboxRunOptions, type SandboxSession, type RuntimeSandboxSession, type RuntimeSandboxSessionFor, type SandboxSpawnOptions, type SandboxWriteBinaryFileOptions, type SandboxWriteFileOptions, type SandboxWriteTextFileOptions, } from "#public/definitions/sandbox.js";
|
|
2
|
+
export { DefaultSandbox } from "#sandbox/providers/default.js";
|
|
3
|
+
export type { DefaultSandboxEnvironmentOptions } from "#sandbox/providers/default.js";
|
|
4
|
+
export type { SandboxNetworkOptions, SandboxNetworkPolicy, } from "#shared/sandbox-network-policy.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{defineParentSandbox,defineSandbox}from"#public/definitions/sandbox.js";import{DefaultSandbox}from"#sandbox/providers/default.js";export{DefaultSandbox,defineParentSandbox,defineSandbox};
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import type { CustomCommand, IFileSystem } from "just-bash";
|
|
2
|
+
import type { SandboxSession } from "#shared/sandbox-session.js";
|
|
2
3
|
/**
|
|
3
4
|
* Context passed to a custom just-bash filesystem factory for each live handle.
|
|
4
5
|
*/
|
|
5
6
|
export interface JustBashFilesystemContext {
|
|
6
|
-
/**
|
|
7
|
-
|
|
7
|
+
/** Resolves an application-relative path without exposing project layout. */
|
|
8
|
+
resolveProjectPath(path: string): string;
|
|
9
|
+
/** Stable provider-private storage directory for this sandbox. */
|
|
10
|
+
readonly storagePath: string;
|
|
8
11
|
/** eve's durable, session-owned filesystem, including `/workspace`. */
|
|
9
12
|
readonly defaultFilesystem: IFileSystem;
|
|
10
13
|
/** The just-bash engine resolved by eve after its optional installation check. */
|
|
11
14
|
readonly justBash: typeof import("just-bash");
|
|
12
15
|
}
|
|
13
16
|
/**
|
|
14
|
-
* Options accepted by
|
|
17
|
+
* Options accepted by just-bash environment constructors.
|
|
15
18
|
*
|
|
16
|
-
* The just-bash
|
|
19
|
+
* The just-bash provider runs the workspace under the pure-JS `just-bash`
|
|
17
20
|
* interpreter with a virtual filesystem — no daemon or VM required, but
|
|
18
21
|
* no real binaries either. The `just-bash` package is not bundled with
|
|
19
22
|
* eve; it is loaded lazily from the application install.
|
|
@@ -31,7 +34,7 @@ export interface JustBashSandboxCreateOptions {
|
|
|
31
34
|
* just-bash interpreter. Custom commands can participate in normal shell
|
|
32
35
|
* composition, including pipelines and redirections.
|
|
33
36
|
*
|
|
34
|
-
* Custom commands are not available during
|
|
37
|
+
* Custom commands are not available during environment preparation. They run in
|
|
35
38
|
* eve's host process, outside the virtual filesystem security boundary, and
|
|
36
39
|
* are responsible for validating their own inputs and cleaning up host
|
|
37
40
|
* resources.
|
|
@@ -45,7 +48,9 @@ export interface JustBashSandboxCreateOptions {
|
|
|
45
48
|
*
|
|
46
49
|
* This just-bash-specific escape hatch requires the application to install
|
|
47
50
|
* a compatible `just-bash` version. It is not invoked during template
|
|
48
|
-
*
|
|
51
|
+
* preparation.
|
|
49
52
|
*/
|
|
50
53
|
readonly filesystem?: (context: JustBashFilesystemContext) => IFileSystem | Promise<IFileSystem>;
|
|
54
|
+
/** Idempotent setup captured in the prepared virtual filesystem. */
|
|
55
|
+
readonly prepare?: (sandbox: SandboxSession) => Promise<void> | void;
|
|
51
56
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type { JustBashFilesystemContext
|
|
1
|
+
export { JustBashSandbox, type JustBashEnvironmentOptions } from "#sandbox/providers/just-bash.js";
|
|
2
|
+
export type { JustBashFilesystemContext } from "#public/sandbox/just-bash-sandbox.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{JustBashSandbox}from"#sandbox/providers/just-bash.js";export{JustBashSandbox};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SandboxSession } from "#shared/sandbox-session.js";
|
|
2
|
+
import type { SandboxNetworkOptions, SandboxNetworkPolicy } from "#shared/sandbox-network-policy.js";
|
|
2
3
|
/**
|
|
3
|
-
* Options accepted by
|
|
4
|
+
* Options accepted by microsandbox environment constructors.
|
|
4
5
|
*
|
|
5
|
-
* The microsandbox
|
|
6
|
+
* The microsandbox provider runs sandboxes in lightweight local VMs via
|
|
6
7
|
* [microsandbox](https://www.npmjs.com/package/microsandbox). Options
|
|
7
8
|
* are eve-owned rather than a raw passthrough so the public surface can
|
|
8
9
|
* stay stable while the underlying runtime evolves. Supported hosts:
|
|
@@ -12,8 +13,8 @@ export interface MicrosandboxSandboxCreateOptions {
|
|
|
12
13
|
/**
|
|
13
14
|
* OCI image used as the base runtime. eve prepares this image with
|
|
14
15
|
* Bash, the framework workspace, and the sandbox user before authored
|
|
15
|
-
*
|
|
16
|
-
* Python, or ripgrep
|
|
16
|
+
* environment preparation runs. Install authored runtime tools such as Node,
|
|
17
|
+
* Python, or ripgrep during preparation or provide them through a
|
|
17
18
|
* custom image.
|
|
18
19
|
*
|
|
19
20
|
* @default The `ghcr.io/vercel/eve` tag matching the installed eve version without build metadata, or `EVE_SANDBOX_IMAGE_TAG` when set.
|
|
@@ -27,6 +28,8 @@ export interface MicrosandboxSandboxCreateOptions {
|
|
|
27
28
|
readonly env?: Readonly<Record<string, string>>;
|
|
28
29
|
/** OCI image pull policy. @default "if-missing" */
|
|
29
30
|
readonly pullPolicy?: "always" | "if-missing" | "never";
|
|
31
|
+
/** Idempotent setup captured in the prepared VM snapshot. */
|
|
32
|
+
readonly prepare?: (sandbox: SandboxSession) => Promise<void> | void;
|
|
30
33
|
/**
|
|
31
34
|
* Installation behavior for the microsandbox npm package and its VM
|
|
32
35
|
* runtime. By default eve installs both automatically when missing —
|
|
@@ -37,18 +40,9 @@ export interface MicrosandboxSandboxCreateOptions {
|
|
|
37
40
|
readonly autoInstall?: boolean;
|
|
38
41
|
readonly skipVerify?: boolean;
|
|
39
42
|
};
|
|
40
|
-
/** Initial network policy applied to sandboxes after framework setup. */
|
|
41
|
-
readonly networkPolicy?: SandboxNetworkPolicy;
|
|
42
43
|
}
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
*/
|
|
46
|
-
export interface MicrosandboxBootstrapUseOptions {
|
|
47
|
-
readonly networkPolicy?: SandboxNetworkPolicy;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Options accepted by the microsandbox backend's `onSession({ use })` hook.
|
|
51
|
-
*/
|
|
52
|
-
export interface MicrosandboxSessionUseOptions {
|
|
44
|
+
/** Options applied when eve creates one live microsandbox VM. */
|
|
45
|
+
export interface MicrosandboxSandboxRuntimeOptions extends SandboxNetworkOptions {
|
|
46
|
+
/** Initial network policy for this VM. @default "allow-all" */
|
|
53
47
|
readonly networkPolicy?: SandboxNetworkPolicy;
|
|
54
48
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
1
|
+
export { MicrosandboxSandbox, type MicrosandboxEnvironmentOptions, } from "#sandbox/providers/microsandbox.js";
|
|
2
|
+
export type { MicrosandboxSandboxRuntimeOptions } from "#public/sandbox/microsandbox-sandbox.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{MicrosandboxSandbox}from"#sandbox/providers/microsandbox.js";export{MicrosandboxSandbox};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { defineSandboxProvider, type SandboxDeleteOptions, type SandboxPreparedArtifact, type SandboxProvider, type SandboxProviderDefinition, type SandboxProviderFiles, type SandboxProviderHandle, type SandboxProviderImplementation, type SandboxProviderPrepareContext, type SandboxProviderResourceFile, type SandboxProviderResources, type SandboxProviderResourceSource, type SandboxProviderResourceTree, type SandboxProviderSessionContext, type SandboxProviderTargetFile, } from "#shared/sandbox-provider.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineSandboxProvider}from"#shared/sandbox-provider.js";export{defineSandboxProvider};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type * as Vercel from "#compiled/@vercel/sandbox/index.js";
|
|
2
|
+
import type { SandboxNetworkOptions } from "#shared/sandbox-network-policy.js";
|
|
2
3
|
type VercelCreateOptions = NonNullable<Parameters<typeof Vercel.Sandbox.create>[0]>;
|
|
3
|
-
type VercelUpdateOptions = Parameters<Vercel.Sandbox["update"]>[0];
|
|
4
4
|
type VercelSandboxInternalCreateOptions = {
|
|
5
5
|
readonly [key: `__${string}`]: unknown;
|
|
6
6
|
};
|
|
7
7
|
type VercelSandboxAuthorCreateOptions<T> = T extends unknown ? Omit<T, "mounts" | "name" | "onResume" | "persistent" | "runtime" | "signal"> & VercelSandboxInternalCreateOptions : never;
|
|
8
8
|
/**
|
|
9
|
-
* Options accepted by
|
|
9
|
+
* Options accepted by Vercel sandbox environment constructors. Forwarded to Vercel
|
|
10
10
|
* Sandbox creation for every fresh sandbox the framework creates
|
|
11
|
-
* (template
|
|
11
|
+
* (template during preparation, session at first creation).
|
|
12
12
|
* Skipped on resume (`Sandbox.get`) since no create happens there.
|
|
13
13
|
*
|
|
14
14
|
* `networkPolicy` is deferred until after framework-owned base setup
|
|
15
15
|
* for fresh templates and template-less sessions, so eve can install
|
|
16
|
-
* required packages before authored
|
|
16
|
+
* required packages before authored environment preparation runs. Template-backed
|
|
17
17
|
* session creates receive it at creation time because the template
|
|
18
18
|
* already contains the prepared base runtime.
|
|
19
19
|
*
|
|
@@ -22,7 +22,7 @@ type VercelSandboxAuthorCreateOptions<T> = T extends unknown ? Omit<T, "mounts"
|
|
|
22
22
|
* author-supplied values.
|
|
23
23
|
*
|
|
24
24
|
* `runtime` is excluded: eve defaults to its published
|
|
25
|
-
* `vcr.vercel.com/vercel/eve/base` image tagged with the installed eve version
|
|
25
|
+
* `vcr.vercel.com/vercel/eve/base` image tagged with the installed eve version
|
|
26
26
|
* or `EVE_SANDBOX_IMAGE_TAG` when `image` is not supplied. Both are mutually
|
|
27
27
|
* exclusive with a stock runtime.
|
|
28
28
|
*
|
|
@@ -30,9 +30,9 @@ type VercelSandboxAuthorCreateOptions<T> = T extends unknown ? Omit<T, "mounts"
|
|
|
30
30
|
* snapshot `source` takes precedence because the Vercel SDK makes it mutually
|
|
31
31
|
* exclusive with `image`.
|
|
32
32
|
*
|
|
33
|
-
* `source` is honored only on the template
|
|
33
|
+
* `source` is honored only on the template creation during preparation, so
|
|
34
34
|
* an author-supplied snapshot, git revision, or tarball becomes the
|
|
35
|
-
* base layer for the template. Framework setup,
|
|
35
|
+
* base layer for the template. Framework setup, preparation, and seed
|
|
36
36
|
* files all run on top, and the resulting
|
|
37
37
|
* framework-owned snapshot is what every later session derives from,
|
|
38
38
|
* so `source` is stripped from the session-create path. eve does not
|
|
@@ -48,40 +48,9 @@ export type VercelSandboxMount = Vercel.SandboxMounts[string];
|
|
|
48
48
|
/** Drive mounts keyed by absolute sandbox path. */
|
|
49
49
|
export type VercelSandboxMounts = Vercel.SandboxMounts;
|
|
50
50
|
/** Options resolved when eve creates a fresh live session sandbox. */
|
|
51
|
-
export interface
|
|
51
|
+
export interface VercelSandboxMountOptions {
|
|
52
52
|
readonly mounts?: VercelSandboxMounts;
|
|
53
53
|
}
|
|
54
|
-
/**
|
|
55
|
-
export
|
|
56
|
-
readonly session: {
|
|
57
|
-
readonly id: string;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
/** Options accepted by `vercel(opts)`. */
|
|
61
|
-
export type VercelSandboxOptions = VercelSandboxCreateOptions & {
|
|
62
|
-
/**
|
|
63
|
-
* Resolves options that apply only to fresh live sessions. It is not called
|
|
64
|
-
* while prewarming templates or resuming an existing sandbox.
|
|
65
|
-
*/
|
|
66
|
-
readonly sessionCreateOptions?: (context: VercelSandboxSessionCreateContext) => Promise<VercelSandboxSessionCreateOptions> | VercelSandboxSessionCreateOptions;
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Options accepted by the Vercel backend's `bootstrap({ use })` hook.
|
|
70
|
-
* Tracks the Vercel SDK's `Sandbox.update(...)` parameter because bootstrap
|
|
71
|
-
* applies its options to the template via `sandbox.update(...)` after
|
|
72
|
-
* `Sandbox.create()` and before the snapshot is captured. The Vercel
|
|
73
|
-
* SDK persists `update`-d settings on the sandbox so they survive into
|
|
74
|
-
* the snapshot, which becomes the seed for every later session.
|
|
75
|
-
*
|
|
76
|
-
* Today this is the same shape as
|
|
77
|
-
* {@link VercelSandboxSessionUseOptions}; both are exposed as separate
|
|
78
|
-
* named aliases so future divergence is non-breaking.
|
|
79
|
-
*/
|
|
80
|
-
export type VercelSandboxBootstrapUseOptions = VercelUpdateOptions;
|
|
81
|
-
/**
|
|
82
|
-
* Options accepted by the Vercel backend's `onSession({ use })` hook.
|
|
83
|
-
* Tracks the Vercel SDK's `Sandbox.update(...)` parameter; passed values are
|
|
84
|
-
* applied to the live session via the SDK's `update`.
|
|
85
|
-
*/
|
|
86
|
-
export type VercelSandboxSessionUseOptions = VercelUpdateOptions;
|
|
54
|
+
/** Options accepted when creating one live Vercel sandbox from an environment. */
|
|
55
|
+
export type VercelSandboxRuntimeOptions = Omit<VercelSandboxCreateOptions, "fetch" | "image" | "projectId" | "source" | "tags" | "teamId" | "token"> & SandboxNetworkOptions & VercelSandboxMountOptions;
|
|
87
56
|
export {};
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tool authoring helpers for `agent/tools/*.ts` files.
|
|
3
3
|
*/
|
|
4
|
-
export { type
|
|
4
|
+
export { type DisabledToolSentinel, defineTool, disableTool, isDisabledToolSentinel, type ToolLabelDefinition, type ToolAuthOptions, type ToolAuthProvider, type ToolDefinition, type ToolContext, type ToolModelOutput, type ToolModelOutputPart, } from "#tools/definition.js";
|
|
5
5
|
export { defineDynamic } from "#dynamic/definition.js";
|
|
6
6
|
export { defineDurableSchema } from "#tools/durable-schema.js";
|
|
7
7
|
export { defineDurableCallback } from "#tools/durable-callbacks.js";
|
|
@@ -10,5 +10,5 @@ export type { DynamicEvents, DynamicResolveContext, DynamicSentinel } from "#dyn
|
|
|
10
10
|
export type { DynamicToolEntry, DynamicToolEvents, DynamicToolSet, DynamicToolResult, } from "#tools/dynamic.js";
|
|
11
11
|
export { type SessionContext } from "#public/definitions/callback-context.js";
|
|
12
12
|
export { toolResultFrom, type MatchedConnectionResult, type MatchedToolResult, type ToolResultFromFn, } from "#public/tools/result.js";
|
|
13
|
-
export { defineWorkflowTool, type WorkflowStepToolContext, type WorkflowToolContext, type WorkflowToolDefinition, type AgentInput, type WorkflowAgentMetadata, } from "#tools/workflow-definition.js";
|
|
13
|
+
export { defineWorkflowTool, type WorkflowStepToolContext, type TaskReceipt, type WorkflowToolContext, type WorkflowToolDefinition, type AgentInput, type WorkflowAgentMetadata, } from "#tools/workflow-definition.js";
|
|
14
14
|
export type { ToolInputRequest, ToolInputResponse } from "#tools/definition.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{localGatewayModel}from"#internal/model-auth/transport.js";import{RuntimeModelMetadataCacheKey}from"#context/keys.js";import{isDynamicModelDefinition}from"#shared/agent-definition.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{formatLanguageModelGatewayId,isAgentReasoningDefinition,isRuntimeLanguageModel}from"#internal/runtime-model.js";import{
|
|
1
|
+
import{localGatewayModel}from"#internal/model-auth/transport.js";import{RuntimeModelMetadataCacheKey}from"#context/keys.js";import{parseJsonObject}from"#shared/json.js";import{isDynamicModelDefinition}from"#shared/agent-definition.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{formatLanguageModelGatewayId,isAgentReasoningDefinition,isRuntimeLanguageModel}from"#internal/runtime-model.js";import{loadResolvedModuleExport}from"#runtime/resolve-helpers.js";import{resolveBootstrapRuntimeModel}from"#runtime/agent/bootstrap-model.js";import{resolveMockAuthoredRuntimeModel,shouldMockAuthoredRuntimeModels}from"#runtime/agent/mock-model-adapter.js";import{createRuntimeModelCatalog}from"#runtime/agent/model-catalog.js";async function resolveRuntimeModelReference(e,t){let n=resolveBootstrapRuntimeModel(e);if(n!==null)return n;let r=resolveMockAuthoredRuntimeModel(e);return r===null?isSourceBackedRuntimeModelReference(e)?await loadSourceBackedRuntimeModelReference(e,t):localGatewayModel(e.id)??e.id:r}async function loadSourceBackedRuntimeModelReference(e,t){if(t===void 0)throw Error(`Expected a compiled module-map scope to resolve the authored runtime model "${e.id}".`);let n=await loadResolvedModuleExport({definition:e.source,kindLabel:`runtime model "${e.id}"`,moduleMap:t.moduleMap,nodeId:t.nodeId}),r=normalizeAgentDefinition(n,`Expected the authored agent config export "${e.source.exportName??`default`}" from "${e.source.logicalPath}" to match the public eve shape.`).model;if(r===void 0)throw Error(`Expected the authored agent config export "${e.source.exportName??`default`}" from "${e.source.logicalPath}" to provide a runtime model.`);if(isDynamicModelDefinition(r))throw Error(`Expected the authored agent config export "${e.source.exportName??`default`}" from "${e.source.logicalPath}" to provide a static runtime model.`);return r}function isSourceBackedRuntimeModelReference(e){return e.source!==void 0}async function loadDynamicRuntimeModelDefinition(e){let t=await loadResolvedModuleExport({definition:e.dynamicModel,kindLabel:`dynamic runtime model`,moduleMap:e.scope.moduleMap,nodeId:e.scope.nodeId}),n=normalizeAgentDefinition(t,`Expected the authored agent config export "${e.dynamicModel.exportName??`default`}" from "${e.dynamicModel.logicalPath}" to match the public eve shape.`).model;if(!isDynamicModelDefinition(n))throw Error(`Expected the authored agent config export "${e.dynamicModel.exportName??`default`}" from "${e.dynamicModel.logicalPath}" to provide a dynamic model definition.`);return n}async function resolveRuntimeModelSelection(e){if(e.selection===null||e.selection===void 0)throw Error(`Dynamic model resolver returned no model. Every matching dynamic model handler must return a concrete model selection.`);let t=normalizeDynamicModelSelection(e.selection);validateDynamicModelSelection(t);let n=t.modelOptions?.providerOptions===void 0?void 0:parseProviderOptionsRecord(t.modelOptions.providerOptions),r=t.model,i=e.catalog??runtimeModelCatalogForState(e.state);if(typeof r==`string`){let a=formatLanguageModelGatewayId(r),o=await resolveSelectionMetadata({cacheKey:`gateway:${a}`,catalog:i,contextWindowTokens:t.modelContextWindowTokens,load:e=>e.getByGatewayId(a),modelLabel:a,state:e.state});return{reference:{id:o.resolvedModelId,contextWindowTokens:o.contextWindowTokens,maxOutputTokens:o.maxOutputTokens,providerOptions:n,reasoning:t.reasoning}}}if(validateRuntimeLanguageModel(r),e.durability===`durable`)throw Error(`Dynamic model selection returned a provider object, but durable model selections must be serializable. Return a model id string, or use a "step.started" model resolver.`);let a=formatLanguageModelGatewayId(r),o=r.provider.split(`.`)[0],s=await resolveSelectionMetadata({cacheKey:o===`gateway`?`gateway:${r.modelId}`:`provider:${r.provider}:${r.modelId}`,catalog:i,contextWindowTokens:t.modelContextWindowTokens,load:e=>o===`gateway`?e.getByGatewayId(r.modelId):e.getByProviderModelId(r.provider,r.modelId),modelLabel:a,state:e.state});return{model:r,reference:{id:s.resolvedModelId,contextWindowTokens:s.contextWindowTokens,maxOutputTokens:s.maxOutputTokens,providerOptions:n,reasoning:t.reasoning}}}const runtimeModelCatalogsByState=new WeakMap;function runtimeModelCatalogForState(e){let t=runtimeModelCatalogsByState.get(e);if(t!==void 0)return t;let n=createRuntimeModelCatalog();return runtimeModelCatalogsByState.set(e,n),n}async function resolveSelectionMetadata(e){if(e.contextWindowTokens!==void 0)return{contextWindowTokens:e.contextWindowTokens,resolvedModelId:e.modelLabel};let t=Date.now(),n=e.state.get(RuntimeModelMetadataCacheKey)?.[e.cacheKey];if(n!==void 0&&n.expiresAt>t)return n;let r=await e.load(e.catalog);if(r===null)throw Error(`Cannot select model "${e.modelLabel}" because AI Gateway did not provide context window metadata. Return modelContextWindowTokens with this selection for an unlisted or custom model.`);let i={...r,expiresAt:t+864e5};return e.state.set(RuntimeModelMetadataCacheKey,n=>({...Object.fromEntries(Object.entries(n??{}).filter(([,e])=>e.expiresAt>t)),[e.cacheKey]:i})),i}const DYNAMIC_MODEL_SELECTION_KEYS=new Set([`model`,`modelContextWindowTokens`,`modelOptions`,`reasoning`]);function validateDynamicModelSelection(e){let t=Object.keys(e).filter(e=>!DYNAMIC_MODEL_SELECTION_KEYS.has(e));if(t.length>0)throw Error(`Dynamic model resolver returned a selection with unknown key(s): ${t.join(`, `)}. Expected { model, reasoning?, modelContextWindowTokens?, modelOptions? }.`);if(e.reasoning!==void 0&&!isAgentReasoningDefinition(e.reasoning))throw Error(`Dynamic model resolver returned an invalid reasoning effort. Expected provider-default, none, minimal, low, medium, high, or xhigh.`);let n=e.modelContextWindowTokens;if(n!==void 0&&(!Number.isInteger(n)||n<=0))throw Error(`Dynamic model resolver returned an invalid modelContextWindowTokens value. Expected a positive integer.`);if(typeof e.model==`string`&&e.model.trim()===``)throw Error(`Dynamic model resolver returned an empty model id.`)}function normalizeDynamicModelSelection(e){return isModelSelectionDefinition(e)?e:{model:e}}function isModelSelectionDefinition(e){return typeof e==`object`&&!!e&&`model`in e&&!isRuntimeLanguageModel(e)}function validateRuntimeLanguageModel(e){if(!isRuntimeLanguageModel(e))throw Error(`Dynamic model resolver returned an invalid model. Return an AI Gateway model id string, an AI SDK language model, or { model, modelContextWindowTokens?, modelOptions? }.`)}function parseProviderOptionsRecord(e){if(e===void 0)return;let t={};for(let[n,r]of Object.entries(e))t[n]=parseJsonObject(r);return t}export{loadDynamicRuntimeModelDefinition,resolveRuntimeModelReference,resolveRuntimeModelSelection,shouldMockAuthoredRuntimeModels};
|
|
@@ -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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{contextStorage,loadContext}from"#context/container.js";import{consumeAuthorizationResult,createAuthorizationAttempt,requestAuthorization}from"#harness/authorization.js";import{
|
|
1
|
+
import{contextStorage,loadContext}from"#context/container.js";import{consumeAuthorizationResult,createAuthorizationAttempt,requestAuthorization}from"#harness/authorization.js";import{ConnectionAuthorizationFailedError,ConnectionAuthorizationRequiredError,isConnectionAuthorizationRequiredError}from"#connections/errors.js";import{supportsInteractiveAuthorization}from"#shared/connection-types.js";import{isAsyncIterable}from"#shared/async-iterable.js";import{evictCachedToken,readCachedToken,writeCachedToken}from"#runtime/connections/authorization-tokens.js";import{principalKey,resolveConnectionPrincipal,resolveConnectionPrincipalFromAuth}from"#runtime/connections/principal.js";const LOCAL_HTTP_VERCEL_CONNECT_HOSTNAMES=new Set([`127.0.0.1`,`[::1]`]);function createAuthorizationExecution(e={}){let t=new Set;async function complete(n){let r=n.instanceId??n.scope;!t.has(r)&&await(e.completeAuthorization??completeScopedAuthorization)(n)&&t.add(r)}function requireAuth(e,n){throw new ScopedAuthorizationRequiredError(e,t.has(e.instanceId??e.scope),n)}return{complete,async getToken(e){await complete(e);try{return await resolveScopedToken(e)}catch(t){if(!isConnectionAuthorizationRequiredError(t))throw t;return requireAuth(e,t)}},requireAuth,async handleError(e,n){return n!==void 0&&isConnectionAuthorizationRequiredError(e)?await handleAuthorizationError(new ScopedAuthorizationRequiredError(n,t.has(n.instanceId??n.scope),e),{evictToken:!1}):await handleAuthorizationError(e)},run:executeWithAuthorization}}var ScopedAuthorizationRequiredError=class extends Error{scoped;justAuthorized;constructor(e,t,n){super(`Authorization required.`,{cause:n}),this.name=`ScopedAuthorizationRequiredError`,this.scoped=e,this.justAuthorized=t}};function isScopedAuthorizationRequiredError(e){return e instanceof Error&&e.name===`ScopedAuthorizationRequiredError`}async function handleAuthorizationError(e,t={evictToken:!0}){if(!isScopedAuthorizationRequiredError(e))throw e;let{scoped:n}=e;if(e.justAuthorized)throw new ConnectionAuthorizationFailedError(n.scope,{message:`Authorization for "${n.scope}" failed: the service rejected the token immediately after authorization.`,reason:`token_rejected_after_authorization`,retryable:!1});t.evictToken&&await evictScopedToken(n);let r=await startScopedAuthorization(n);if(r!==void 0)return r;throw supportsInteractiveAuthorization(n.authorization)?new ConnectionAuthorizationFailedError(n.scope,{message:`Authorization for "${n.scope}" requires sign-in, but no authorization callback URL could be minted for this run (missing session context).`,reason:`authorization_callback_unavailable`,retryable:!1}):e.cause??new ConnectionAuthorizationRequiredError(n.scope)}function executeWithAuthorization(e){try{let t=e();return isAsyncIterable(t)?handleIterable(t):Promise.resolve(t).catch(handleAuthorizationError)}catch(e){return handleAuthorizationError(e)}}async function*handleIterable(e){try{for await(let t of e)yield t}catch(e){yield await handleAuthorizationError(e)}}async function resolveScopedToken(e){let{scope:t,authorization:n,connection:r}=e,i=e.instanceId??t,a=contextStorage.getStore(),o=resolveScopedPrincipal(e,a);if(a===void 0)return await n.getToken({connection:r,principal:o});let s=principalKey(o),c=readCachedToken(a,i,s);if(c!==void 0)return c;let l=await n.getToken({connection:r,principal:o});return writeCachedToken(a,i,s,l),l}async function evictScopedToken(e){let{scope:t,authorization:n,connection:r}=e,i=e.instanceId??t,a=contextStorage.getStore();if(a===void 0)return;let o;try{o=resolveScopedPrincipal(e,a),evictCachedToken(a,i,principalKey(o))}catch{return}try{await n.evict?.({connection:r,principal:o})}catch{}}async function completeScopedAuthorization(e){let{scope:t,authorization:n,connection:r}=e;if(!supportsInteractiveAuthorization(n))return!1;let i=consumeAuthorizationResult(t,e.instanceId);if(i===void 0)return!1;let a=n,o=loadContext(),s=i.principal??resolveScopedPrincipal(e,o),c=await a.completeAuthorization({callbackUrl:i.hookUrl,connection:r,principal:s,resume:i.resume,callback:i.callback});return writeCachedToken(o,e.instanceId??t,principalKey(s),c),!0}async function startScopedAuthorization(e){let{scope:t,authorization:n,connection:r}=e;if(!supportsInteractiveAuthorization(n))return;let i=createAuthorizationAttempt(t);if(i===void 0)return;let a=n,o=resolveScopedPrincipal(e),s=resolveAuthorizationCallbackUrl({authorization:n,callbackUrl:i.hookUrl}),{challenge:c,resume:l}=await a.startAuthorization({callbackUrl:s,connection:r,principal:o});return requestAuthorization([{attemptId:i.attemptId,challenge:stampChallengeDisplayName(c,n),hookUrl:s,instanceId:e.instanceId,name:t,principal:o,resume:l}])}function resolveScopedPrincipal(e,t){return e.boundResponder===void 0?resolveConnectionPrincipal(e.scope,e.authorization,t):resolveConnectionPrincipalFromAuth(e.scope,e.authorization,e.boundResponder,t)}function resolveAuthorizationCallbackUrl(e){if(e.authorization.vercelConnect===void 0)return e.callbackUrl;let t;try{t=new URL(e.callbackUrl)}catch{return e.callbackUrl}return t.protocol!==`http:`||!LOCAL_HTTP_VERCEL_CONNECT_HOSTNAMES.has(t.hostname)?e.callbackUrl:(t.hostname=`localhost`,t.toString())}function stampChallengeDisplayName(e,t){let n=t.displayName??e.displayName;return n===e.displayName?e:{...e,displayName:n}}export{completeScopedAuthorization,createAuthorizationExecution,evictScopedToken,handleAuthorizationError,resolveAuthorizationCallbackUrl,resolveScopedToken,stampChallengeDisplayName,startScopedAuthorization};
|
|
@@ -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
|