eve 0.63.0 → 0.64.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/dist/src/ai/evaluate.js +1 -1
- package/dist/src/channel/channel-address.d.ts +4 -1
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/channel-operations.d.ts +4 -1
- package/dist/src/channel/cross-channel-receive.d.ts +4 -1
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/session.d.ts +3 -1
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +7 -0
- package/dist/src/chunks/{use-eve-agent-C5-yqRuq.js → use-eve-agent-BdKlQF32.js} +8 -8
- package/dist/src/chunks/{use-eve-agent-CVWk5KKy.js → use-eve-agent-IIuxkn6y.js} +8 -8
- package/dist/src/cli/commands/build.js +1 -1
- package/dist/src/cli/commands/init-agent-workspace.d.ts +2 -0
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.js +1 -1
- package/dist/src/cli/dev/tui/line-editor.d.ts +11 -1
- package/dist/src/cli/dev/tui/line-editor.js +3 -3
- package/dist/src/cli/dev/tui/model-picker.d.ts +2 -0
- package/dist/src/cli/dev/tui/model-picker.js +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +0 -1
- package/dist/src/cli/dev/tui/runner.js +2 -2
- package/dist/src/cli/dev/tui/setup-panel.js +1 -1
- package/dist/src/cli/dev/tui/setup-selection-input.js +1 -1
- package/dist/src/cli/dev/tui/stream-format.d.ts +6 -0
- package/dist/src/cli/dev/tui/stream-format.js +2 -2
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +0 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
- package/dist/src/cli/run.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +8 -14
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/types.d.ts +4 -2
- package/dist/src/compiled/.vendor-stamp.json +11 -11
- package/dist/src/compiled/@chat-adapter/slack/_chat-adapter-shared.d.ts +1 -0
- package/dist/src/compiled/@chat-adapter/slack/api.d.ts +3 -2
- package/dist/src/compiled/@chat-adapter/slack/api.js +1 -1
- package/dist/src/compiled/@chat-adapter/slack/blocks.js +1 -1
- package/dist/src/compiled/@chat-adapter/slack/format.js +1 -1
- package/dist/src/compiled/@chat-adapter/slack/index.d.ts +410 -63
- package/dist/src/compiled/@chat-adapter/slack/index.js +47 -25
- package/dist/src/compiled/@chat-adapter/twilio/api.d.ts +5 -1
- package/dist/src/compiled/@chat-adapter/twilio/api.js +1 -1
- package/dist/src/compiled/@chat-adapter/twilio/index.d.ts +37 -3
- package/dist/src/compiled/@chat-adapter/twilio/index.js +5 -1
- package/dist/src/compiled/@chat-adapter/twilio/webhook.d.ts +2 -2
- package/dist/src/compiled/@chat-adapter/twilio/webhook.js +1 -1
- package/dist/src/compiled/@linqapp/chat-sdk-adapter/index.js +6 -6
- package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +50 -50
- package/dist/src/compiled/@vercel/sandbox/index.js +4 -4
- package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +2 -1
- package/dist/src/compiled/@workflow/core/events-consumer.d.ts +6 -3
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/private.d.ts +37 -5
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/deployment-guard.d.ts +2 -1
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/invocations.d.ts +35 -0
- package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +90 -0
- package/dist/src/compiled/@workflow/core/runtime/quickjs-runtime.d.ts +2 -1
- package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +8 -6
- package/dist/src/compiled/@workflow/core/runtime/step-single-flight.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime.js +4 -4
- package/dist/src/compiled/@workflow/core/serialization.d.ts +5 -1
- package/dist/src/compiled/@workflow/core/serialization.js +1 -1
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +4 -0
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/world/analytics.d.ts +1 -1
- package/dist/src/compiled/@workflow/world/attributes-validation.d.ts +5 -0
- package/dist/src/compiled/@workflow/world/events.d.ts +2 -2
- package/dist/src/compiled/@workflow/world/index.d.ts +2 -1
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +12 -1
- package/dist/src/compiled/@workflow/world/invocation.d.ts +19 -0
- package/dist/src/compiled/@workflow/world/queue.d.ts +24 -3
- package/dist/src/compiled/@workflow/world-local/index.js +3 -3
- package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
- package/dist/src/compiled/_chunks/node/chunk-6QHBXN7B-gl4n6nmi.js +12 -0
- package/dist/src/compiled/_chunks/node/chunk-7WDLOIRP-B_IWkVtZ.js +1 -0
- package/dist/src/compiled/_chunks/node/chunk-KBOOTKHF-DJqFk2r1.js +1 -0
- package/dist/src/compiled/_chunks/node/chunk-TREVQR3E-CLsTAn-O.js +1 -0
- package/dist/src/compiled/_chunks/node/dist-DYDVZ-FS.js +98 -0
- package/dist/src/compiled/_chunks/node/dist-iEFkK9qw.js +6 -0
- package/dist/src/compiled/_chunks/workflow/attribute-changes-DFx4eluc.js +6 -0
- package/dist/src/compiled/_chunks/workflow/{dist-D38gP7YF.js → dist-DjECvUyK.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{frames-QcJfYHmh.js → frames-D_Q-7A1N.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/{helpers-6kObVbfS.js → helpers-Bw52uyzw.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{logger-NN5YHpYy.js → logger-DFNCa8Nl.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-BhA_nDEV.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{run-DJevv8zz.js → run-BT6SQv5f.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{serialization-C5KgPESk.js → serialization-Cl0SYU0I.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/sleep-DB4AH9-A.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{wait-until-BMY_tOr-.js → wait-until-Dzhr6tzf.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{ws-transport-DSDcKH08.js → ws-transport-BpTMh40s.js} +1 -1
- package/dist/src/compiled/chat/index.d.ts +1 -725
- package/dist/src/compiled/chat/index.js +1 -1
- package/dist/src/compiler/artifacts.d.ts +1 -0
- package/dist/src/compiler/artifacts.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +23 -15
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +14 -18
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-helpers.js +1 -1
- package/dist/src/compiler/normalize-sandbox.d.ts +2 -7
- package/dist/src/compiler/normalize-sandbox.js +1 -1
- package/dist/src/compiler/workspace-resources.js +1 -1
- package/dist/src/context/build-callback-context.d.ts +2 -0
- package/dist/src/context/build-callback-context.js +1 -1
- package/dist/src/context/container.d.ts +1 -1
- package/dist/src/context/container.js +1 -1
- package/dist/src/context/key-names.d.ts +1 -0
- package/dist/src/context/key-names.js +1 -1
- package/dist/src/context/keys.d.ts +7 -2
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/providers/sandbox.js +1 -1
- package/dist/src/context/providers/session.d.ts +19 -2
- package/dist/src/context/session-context.d.ts +1 -1
- package/dist/src/discover/sandbox.js +1 -1
- package/dist/src/evals/cli/eval.js +1 -1
- package/dist/src/evals/context.d.ts +1 -0
- package/dist/src/evals/context.js +1 -1
- package/dist/src/evals/define-eval-config.d.ts +7 -7
- package/dist/src/evals/define-eval-config.js +1 -1
- package/dist/src/evals/define-eval.d.ts +5 -2
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/runner/execute-eval.d.ts +2 -0
- package/dist/src/evals/runner/execute-eval.js +1 -1
- package/dist/src/evals/runner/execute-task.d.ts +2 -0
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/runner/run-evals.d.ts +2 -0
- package/dist/src/evals/runner/run-evals.js +1 -1
- package/dist/src/evals/target.js +1 -1
- package/dist/src/evals/types.d.ts +22 -6
- package/dist/src/eve-channel/create-request.d.ts +2 -1
- package/dist/src/eve-channel/delivery-policy-request.d.ts +4 -0
- package/dist/src/eve-channel/delivery-policy-request.js +1 -0
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.d.ts +2 -1
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +2 -1
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/active-handles.d.ts +7 -8
- package/dist/src/execution/sandbox/active-handles.js +1 -1
- package/dist/src/execution/sandbox/bash.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-cli.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/docker-cli.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-container.d.ts +2 -2
- package/dist/src/execution/sandbox/bindings/docker-container.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-network.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/docker-network.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-options.d.ts +4 -5
- package/dist/src/execution/sandbox/bindings/docker-options.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-session.d.ts +0 -1
- package/dist/src/execution/sandbox/bindings/docker-session.js +2 -2
- package/dist/src/execution/sandbox/bindings/docker.d.ts +16 -18
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +21 -0
- package/dist/src/execution/sandbox/bindings/immutable-resources.js +2 -0
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +9 -5
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash.d.ts +13 -26
- package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
- package/dist/src/execution/sandbox/bindings/{local-backend-utils.d.ts → local-provider-utils.d.ts} +7 -5
- package/dist/src/execution/sandbox/bindings/local-provider-utils.js +1 -0
- package/dist/src/execution/sandbox/bindings/local.d.ts +3 -3
- package/dist/src/execution/sandbox/bindings/local.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-create.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +30 -8
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-metadata.d.ts +9 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-metadata.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-network.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +10 -4
- package/dist/src/execution/sandbox/bindings/microsandbox-options.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-platform.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +7 -5
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox.d.ts +11 -21
- package/dist/src/execution/sandbox/bindings/microsandbox.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-base-runtime.js +2 -2
- package/dist/src/execution/sandbox/bindings/vercel-credentials.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-errors.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-lifecycle.d.ts +2 -2
- package/dist/src/execution/sandbox/bindings/vercel-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-lookup.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-options.d.ts +1 -2
- package/dist/src/execution/sandbox/bindings/vercel-options.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +20 -12
- package/dist/src/execution/sandbox/bindings/vercel.js +2 -2
- package/dist/src/execution/sandbox/development-cleanup.js +1 -1
- package/dist/src/execution/sandbox/development-lazy-prewarm.d.ts +7 -0
- package/dist/src/execution/sandbox/development-lazy-prewarm.js +1 -0
- package/dist/src/execution/sandbox/development-run.d.ts +2 -3
- package/dist/src/execution/sandbox/dockerfile.d.ts +25 -0
- package/dist/src/execution/sandbox/dockerfile.js +1 -0
- package/dist/src/execution/sandbox/ensure.d.ts +0 -17
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/logging-session.js +1 -1
- package/dist/src/execution/sandbox/prewarm.d.ts +23 -27
- package/dist/src/execution/sandbox/prewarm.js +1 -2
- package/dist/src/execution/sandbox/provider-files.d.ts +2 -0
- package/dist/src/execution/sandbox/provider-files.js +1 -0
- package/dist/src/execution/sandbox/provider-host-development.d.ts +2 -0
- package/dist/src/execution/sandbox/provider-host-development.js +1 -0
- package/dist/src/execution/sandbox/provider-host.d.ts +2 -0
- package/dist/src/execution/sandbox/provider-host.js +1 -0
- package/dist/src/execution/sandbox/provider-identity.d.ts +1 -0
- package/dist/src/execution/sandbox/provider-identity.js +1 -0
- package/dist/src/execution/sandbox/ripgrep-probe.d.ts +0 -7
- package/dist/src/execution/sandbox/ripgrep-probe.js +1 -1
- package/dist/src/execution/sandbox/session.d.ts +8 -8
- package/dist/src/execution/sandbox/session.js +1 -1
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +1 -1
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +2 -1
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session-inbox/protocol.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/subagent/emit-event-step.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -1
- package/dist/src/execution/tools/subagent/start.d.ts +1 -0
- package/dist/src/framework/sources/modules/sandbox.d.ts +2 -1
- package/dist/src/framework/sources/modules/sandbox.js +1 -1
- package/dist/src/harness/approval-delivery-coordinator.js +1 -1
- package/dist/src/harness/hitl/approval-input-requests.d.ts +1 -1
- package/dist/src/harness/hitl/approval-input-requests.js +1 -1
- package/dist/src/harness/input-requests.d.ts +6 -0
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/messages.d.ts +2 -1
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/pending-input-batches.d.ts +1 -0
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/instrumentation/ai-sdk-warnings.d.ts +6 -0
- package/dist/src/instrumentation/ai-sdk-warnings.js +1 -0
- package/dist/src/instrumentation/runtime.d.ts +1 -0
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.d.ts +2 -0
- package/dist/src/internal/application/compiled-artifacts.js +2 -2
- package/dist/src/internal/application/optional-package-install.d.ts +3 -0
- package/dist/src/internal/application/optional-package-install.js +2 -2
- package/dist/src/internal/application/output-publication-lock.d.ts +6 -0
- package/dist/src/internal/application/output-publication-lock.js +1 -1
- package/dist/src/internal/application/output-publication.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +1 -0
- package/dist/src/internal/authored-module-loader.js +1 -1
- package/dist/src/internal/authored-runtime-modules.d.ts +1 -0
- package/dist/src/internal/nitro/development-generation.js +1 -1
- package/dist/src/internal/nitro/host/artifacts-config.d.ts +6 -1
- package/dist/src/internal/nitro/host/artifacts-config.js +1 -1
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.d.ts +16 -0
- package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.js +5 -0
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +2 -2
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts +3 -3
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/development-runtime-prune-plugin.d.ts +9 -0
- package/dist/src/internal/nitro/host/development-runtime-prune-plugin.js +2 -0
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts +1 -0
- package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
- package/dist/src/internal/nitro/host/sandbox-shutdown-plugin.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/nitro/host/start-production-server.js +2 -2
- package/dist/src/internal/nitro/host/types.d.ts +1 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts +1 -0
- package/dist/src/internal/nitro/routes/runtime-artifacts.js +1 -1
- package/dist/src/internal/runtime-registry.d.ts +2 -2
- package/dist/src/internal/vercel/build-agent-workspace.d.ts +3 -1
- package/dist/src/internal/vercel/build-agent-workspace.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +4 -5
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
- package/dist/src/public/channels/github/checkout.js +1 -1
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +3 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +1 -1
- package/dist/src/public/definitions/sandbox.d.ts +5 -43
- package/dist/src/public/definitions/sandbox.js +1 -1
- package/dist/src/public/local-dev.d.ts +4 -5
- package/dist/src/public/next/vercel-output-config.js +1 -1
- package/dist/src/public/sandbox/docker-sandbox.d.ts +16 -40
- package/dist/src/public/sandbox/docker.d.ts +2 -2
- package/dist/src/public/sandbox/docker.js +1 -1
- package/dist/src/public/sandbox/index.d.ts +4 -9
- package/dist/src/public/sandbox/index.js +1 -1
- package/dist/src/public/sandbox/just-bash-sandbox.d.ts +11 -6
- package/dist/src/public/sandbox/just-bash.d.ts +2 -2
- package/dist/src/public/sandbox/just-bash.js +1 -1
- package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +11 -17
- package/dist/src/public/sandbox/microsandbox.d.ts +2 -2
- package/dist/src/public/sandbox/microsandbox.js +1 -1
- package/dist/src/public/sandbox/provider.d.ts +1 -0
- package/dist/src/public/sandbox/provider.js +1 -0
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +10 -41
- package/dist/src/public/sandbox/vercel.d.ts +2 -2
- package/dist/src/public/sandbox/vercel.js +1 -1
- package/dist/src/runtime/cache-key.js +1 -1
- package/dist/src/runtime/compiled-artifacts-source.d.ts +6 -1
- package/dist/src/runtime/compiled-artifacts-source.js +1 -1
- package/dist/src/runtime/loaders/artifact-paths.d.ts +1 -0
- package/dist/src/runtime/loaders/artifact-paths.js +1 -1
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +3 -0
- package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
- package/dist/src/runtime/loaders/compile-metadata.js +1 -1
- package/dist/src/runtime/loaders/manifest.js +1 -1
- package/dist/src/runtime/loaders/module-map.js +1 -1
- package/dist/src/runtime/local-dev-capability.d.ts +14 -12
- package/dist/src/runtime/local-dev-capability.js +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-sandbox.d.ts +1 -10
- package/dist/src/runtime/resolve-sandbox.js +1 -1
- package/dist/src/runtime/sandbox/prepared-artifacts.d.ts +13 -0
- package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -0
- package/dist/src/runtime/sandbox/registry.d.ts +2 -9
- package/dist/src/runtime/sandbox/registry.js +1 -1
- package/dist/src/runtime/sessions/runtime-session.js +1 -1
- package/dist/src/runtime/types.d.ts +13 -26
- package/dist/src/runtime/workspace/types.d.ts +1 -1
- package/dist/src/sandbox/providers/default.d.ts +27 -0
- package/dist/src/sandbox/providers/default.js +1 -0
- package/dist/src/sandbox/providers/docker.d.ts +11 -0
- package/dist/src/sandbox/providers/docker.js +1 -0
- package/dist/src/sandbox/providers/just-bash.d.ts +4 -0
- package/dist/src/sandbox/providers/just-bash.js +1 -0
- package/dist/src/sandbox/providers/microsandbox.d.ts +12 -0
- package/dist/src/sandbox/providers/microsandbox.js +1 -0
- package/dist/src/sandbox/providers/vercel.d.ts +12 -0
- package/dist/src/sandbox/providers/vercel.js +1 -0
- package/dist/src/sandbox/providers.d.ts +5 -0
- package/dist/src/sandbox/providers.js +1 -0
- package/dist/src/sandbox/state.d.ts +6 -25
- package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/sandbox.d.ts +2 -25
- package/dist/src/self-modification/extension/subagents/agent/sandbox.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/publish.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
- package/dist/src/self-modification/filesystem.d.ts +3 -1
- package/dist/src/self-modification/filesystem.js +1 -1
- package/dist/src/self-modification/git-workspace.d.ts +1 -1
- package/dist/src/self-modification/git.d.ts +1 -1
- package/dist/src/self-modification/sandbox.d.ts +14 -9
- package/dist/src/self-modification/sandbox.js +1 -1
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/cli/select-state.d.ts +4 -2
- package/dist/src/setup/cli/select-state.js +1 -1
- package/dist/src/setup/flows/model-login.js +1 -1
- package/dist/src/{cli/commands/registry-pnpm-build-policy.d.ts → setup/primitives/pm/pnpm-build-policy.d.ts} +4 -0
- package/dist/src/setup/primitives/pm/pnpm-build-policy.js +8 -0
- package/dist/src/setup/primitives/pm/pnpm.js +3 -2
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/shared/default-agent-model.d.ts +1 -1
- package/dist/src/shared/default-agent-model.js +1 -1
- package/dist/src/shared/sandbox-environment.d.ts +45 -0
- package/dist/src/shared/sandbox-environment.js +1 -0
- package/dist/src/shared/sandbox-network-policy.d.ts +8 -3
- package/dist/src/shared/sandbox-network-policy.js +1 -1
- package/dist/src/shared/sandbox-prepared-artifacts.d.ts +16 -0
- package/dist/src/shared/sandbox-prepared-artifacts.js +1 -0
- package/dist/src/shared/sandbox-provider.d.ts +112 -0
- package/dist/src/shared/sandbox-provider.js +1 -0
- package/dist/src/shared/sandbox-session.d.ts +18 -41
- package/dist/src/shared/sandbox-template-error.d.ts +9 -0
- package/dist/src/shared/sandbox-template-error.js +1 -0
- package/dist/src/subagents/tool.d.ts +1 -1
- package/dist/src/subagents/tool.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tasks/delivery-context.d.ts +6 -4
- package/dist/src/tasks/delivery-context.js +1 -1
- package/dist/src/tasks/delivery-policy.d.ts +2 -0
- package/dist/src/tasks/delivery-policy.js +1 -1
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/README.md +40 -45
- package/docs/agent-config.md +2 -2
- package/docs/channels/eve.mdx +1 -1
- package/docs/channels/overview.mdx +48 -0
- package/docs/channels/slack.mdx +1 -1
- package/docs/concepts/execution-model-and-durability.mdx +1 -1
- package/docs/concepts/sessions-runs-and-streaming.md +3 -3
- package/docs/dynamic-configuration/meta.json +5 -0
- package/docs/evals/overview.mdx +43 -0
- package/docs/getting-started.mdx +1 -1
- package/docs/guides/client/overview.mdx +1 -1
- package/docs/guides/deployment/overview.md +1 -1
- package/docs/guides/deployment/self-hosting.md +5 -5
- package/docs/guides/deployment/vercel.mdx +10 -18
- package/docs/guides/dev-tui.md +1 -1
- package/docs/guides/hooks.md +4 -0
- package/docs/guides/instrumentation/instrumentation.mdx +1 -1
- package/docs/guides/instrumentation/migration.md +1 -6
- package/docs/guides/instrumentation/otel.mdx +15 -47
- package/docs/memory/meta.json +1 -1
- package/docs/memory/overview.mdx +4 -0
- package/docs/meta.json +13 -16
- package/docs/patterns/meta.json +2 -2
- package/docs/protocols/acp.md +1 -1
- package/docs/protocols/ucp.mdx +1 -1
- package/docs/reference/cli.md +10 -9
- package/docs/reference/meta.json +4 -1
- package/docs/reference/typescript-api.md +2 -25
- package/docs/sandbox/default.mdx +17 -0
- package/docs/sandbox/docker.mdx +29 -0
- package/docs/sandbox/index.mdx +218 -0
- package/docs/sandbox/just-bash.mdx +24 -0
- package/docs/sandbox/meta.json +5 -0
- package/docs/sandbox/microsandbox.mdx +31 -0
- package/docs/sandbox/vercel.mdx +106 -0
- package/docs/schedules.mdx +35 -1
- package/docs/subagents/index.mdx +31 -13
- package/docs/subagents/meta.json +1 -1
- package/docs/tools/overview.mdx +14 -6
- package/docs/tutorial/run-analysis.mdx +6 -5
- package/package.json +20 -11
- package/dist/src/cli/commands/registry-pnpm-build-policy.js +0 -6
- package/dist/src/compiled/_chunks/node/chunk-5OX2R7AJ-CxVV-owP.js +0 -1
- package/dist/src/compiled/_chunks/node/chunk-AYN7QRWH-B__hKQV7.js +0 -1
- package/dist/src/compiled/_chunks/node/chunk-QZV7YRVM-Dzw4WEBv.js +0 -1
- package/dist/src/compiled/_chunks/node/dist-CweJdVFE.js +0 -6
- package/dist/src/compiled/_chunks/node/dist-Da54NuK8.js +0 -96
- package/dist/src/compiled/_chunks/workflow/attribute-changes-A6HfMNG3.js +0 -6
- package/dist/src/compiled/_chunks/workflow/resume-hook-CAqlhwic.js +0 -1
- package/dist/src/compiled/_chunks/workflow/sleep-CbUwdv6O.js +0 -1
- package/dist/src/compiled/chat/_mdast.d.ts +0 -24
- package/dist/src/compiled/chat/_workflow-serde.d.ts +0 -3
- package/dist/src/compiled/chat/jsx-runtime-_JEEAotp.d.ts +0 -907
- package/dist/src/execution/sandbox/bindings/local-backend-utils.js +0 -1
- package/dist/src/execution/sandbox/development-prewarm.d.ts +0 -15
- package/dist/src/execution/sandbox/development-prewarm.js +0 -1
- package/dist/src/execution/sandbox/lazy-backend.d.ts +0 -15
- package/dist/src/execution/sandbox/lazy-backend.js +0 -1
- package/dist/src/execution/sandbox/template-prewarm-lock.d.ts +0 -8
- package/dist/src/execution/sandbox/template-prewarm-lock.js +0 -1
- package/dist/src/internal/authored-definition/sandbox.d.ts +0 -17
- package/dist/src/internal/authored-definition/sandbox.js +0 -1
- package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.d.ts +0 -16
- package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.js +0 -2
- package/dist/src/public/definitions/sandbox-backend.d.ts +0 -17
- package/dist/src/public/definitions/sandbox-backend.js +0 -1
- package/dist/src/public/sandbox/backends/default.d.ts +0 -1
- package/dist/src/public/sandbox/backends/default.js +0 -1
- package/dist/src/public/sandbox/backends/docker.d.ts +0 -1
- package/dist/src/public/sandbox/backends/docker.js +0 -1
- package/dist/src/public/sandbox/backends/just-bash.d.ts +0 -1
- package/dist/src/public/sandbox/backends/just-bash.js +0 -1
- package/dist/src/public/sandbox/backends/microsandbox.d.ts +0 -1
- package/dist/src/public/sandbox/backends/microsandbox.js +0 -1
- package/dist/src/public/sandbox/backends/vercel.d.ts +0 -1
- package/dist/src/public/sandbox/backends/vercel.js +0 -1
- package/dist/src/runtime/sandbox/keys.d.ts +0 -42
- package/dist/src/runtime/sandbox/keys.js +0 -1
- package/dist/src/runtime/sandbox/template-plan.d.ts +0 -24
- package/dist/src/runtime/sandbox/template-plan.js +0 -1
- package/dist/src/sandbox/backends/default.d.ts +0 -42
- package/dist/src/sandbox/backends/default.js +0 -1
- package/dist/src/sandbox/backends/docker.d.ts +0 -14
- package/dist/src/sandbox/backends/docker.js +0 -1
- package/dist/src/sandbox/backends/just-bash.d.ts +0 -17
- package/dist/src/sandbox/backends/just-bash.js +0 -1
- package/dist/src/sandbox/backends/microsandbox.d.ts +0 -17
- package/dist/src/sandbox/backends/microsandbox.js +0 -1
- package/dist/src/sandbox/backends/vercel.d.ts +0 -30
- package/dist/src/sandbox/backends/vercel.js +0 -1
- package/dist/src/shared/sandbox-backend.d.ts +0 -176
- package/dist/src/shared/sandbox-backend.js +0 -1
- package/dist/src/shared/sandbox-definition.d.ts +0 -112
- package/dist/src/shared/sandbox-definition.js +0 -1
- package/docs/sandbox.mdx +0 -342
|
@@ -1 +1 @@
|
|
|
1
|
-
const DEFAULT_AGENT_MODEL_ID=`
|
|
1
|
+
const DEFAULT_AGENT_MODEL_ID=`spacexai/grok-4.7`;export{DEFAULT_AGENT_MODEL_ID};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { SessionAuth, SessionParent, SessionTurn } from "#context/keys.js";
|
|
2
|
+
import type { SandboxProviderRuntime } from "#shared/sandbox-provider.js";
|
|
3
|
+
import type { RuntimeSandboxSession, RuntimeSandboxSessionFor, SandboxSession } from "#shared/sandbox-session.js";
|
|
4
|
+
declare const ENVIRONMENT: unique symbol;
|
|
5
|
+
declare const PROVIDER_RUNTIME: unique symbol;
|
|
6
|
+
declare const CONFIGURATION_HASH: unique symbol;
|
|
7
|
+
export interface SandboxSelectorContext {
|
|
8
|
+
readonly session: {
|
|
9
|
+
readonly auth: SessionAuth;
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly parent?: SessionParent;
|
|
12
|
+
readonly turn: SessionTurn;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export type SandboxSelector = (context: SandboxSelectorContext) => Promise<RuntimeSandboxSession> | RuntimeSandboxSession;
|
|
16
|
+
export type SandboxOpenArguments<Options> = Options extends undefined ? [] : Record<never, never> extends Options ? [options?: Options] : [options: Options];
|
|
17
|
+
export interface SandboxEnvironmentIdentity {
|
|
18
|
+
readonly [CONFIGURATION_HASH]: string;
|
|
19
|
+
readonly [ENVIRONMENT]: true;
|
|
20
|
+
readonly [PROVIDER_RUNTIME]: SandboxProviderRuntime;
|
|
21
|
+
readonly provider: string;
|
|
22
|
+
}
|
|
23
|
+
export interface SandboxEnvironment<Options extends object | undefined = object, Session extends SandboxSession = SandboxSession> extends SandboxEnvironmentIdentity {
|
|
24
|
+
open(...args: SandboxOpenArguments<Options>): Promise<RuntimeSandboxSessionFor<Session>>;
|
|
25
|
+
}
|
|
26
|
+
interface ConstructorRuntime {
|
|
27
|
+
open(input: {
|
|
28
|
+
readonly configurationHash: string;
|
|
29
|
+
readonly environment: object;
|
|
30
|
+
readonly environmentConfigurationHash: string;
|
|
31
|
+
readonly options: object | undefined;
|
|
32
|
+
readonly provider: SandboxProviderRuntime;
|
|
33
|
+
}): Promise<RuntimeSandboxSession>;
|
|
34
|
+
}
|
|
35
|
+
export declare function createSandboxEnvironment<Options extends object | undefined = object, Session extends SandboxSession = SandboxSession>(input: {
|
|
36
|
+
readonly configuration?: unknown;
|
|
37
|
+
readonly runtime: SandboxProviderRuntime;
|
|
38
|
+
}): SandboxEnvironment<Options, Session>;
|
|
39
|
+
export declare function getSandboxEnvironmentConfigurationHash(environment: SandboxEnvironmentIdentity): string;
|
|
40
|
+
export declare function getSandboxEnvironmentRuntime(environment: SandboxEnvironmentIdentity): SandboxProviderRuntime;
|
|
41
|
+
export declare function bindSandboxEnvironment(selector: SandboxSelector, environment: SandboxEnvironmentIdentity): SandboxSelector;
|
|
42
|
+
export declare function getBoundSandboxEnvironment(value: unknown): SandboxEnvironmentIdentity | undefined;
|
|
43
|
+
export declare function isSandboxEnvironment(value: unknown): value is SandboxEnvironmentIdentity;
|
|
44
|
+
export declare function runWithSandboxConstructorRuntime<T>(runtime: ConstructorRuntime, callback: () => Promise<T> | T): Promise<T>;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createHash}from"node:crypto";import{ContextContainer,contextStorage}from"#context/container.js";const ENVIRONMENT=Symbol.for(`eve.sandbox-environment`),PROVIDER_RUNTIME=Symbol.for(`eve.sandbox-provider-runtime`),CONFIGURATION_HASH=Symbol.for(`eve.sandbox-environment-configuration-hash`),SELECTOR_ENVIRONMENT=Symbol.for(`eve.sandbox-selector-environment`),RUNTIMES=Symbol.for(`eve.sandbox-constructor-runtimes`),globals=globalThis,runtimes=globals[RUNTIMES]??=new WeakMap;function createSandboxEnvironment(e){let t;return t={[CONFIGURATION_HASH]:hashConstructorOptions({environment:e.configuration,sandbox:{}}),[ENVIRONMENT]:!0,[PROVIDER_RUNTIME]:e.runtime,provider:e.runtime.providerName,async open(...n){let r=n[0],i=contextStorage.getStore(),a=i===void 0?void 0:runtimes.get(i);if(a===void 0)throw Error(`Sandbox environments can only open sandboxes inside defineSandbox().`);return await a.open({configurationHash:hashConstructorOptions({environment:e.configuration,sandbox:r}),environment:t,environmentConfigurationHash:t[CONFIGURATION_HASH],options:r,provider:e.runtime})}},t}function hashConstructorOptions(e){return createHash(`sha256`).update(stableSerialize(e)).digest(`hex`)}function stableSerialize(e,t=new WeakSet){if(e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`)return JSON.stringify(e);if(typeof e==`function`)return`function:${e.toString()}`;if(Array.isArray(e))return`[${e.map(e=>stableSerialize(e,t)).join(`,`)}]`;if(typeof e==`object`){if(t.has(e))return`[circular]`;t.add(e);let n=e.constructor?.name??`Object`,r=`{${Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,n])=>`${JSON.stringify(e)}:${stableSerialize(n,t)}`).join(`,`)}}`;return t.delete(e),`${n}:${r}`}return typeof e}function getSandboxEnvironmentConfigurationHash(e){return e[CONFIGURATION_HASH]}function getSandboxEnvironmentRuntime(e){return e[PROVIDER_RUNTIME]}function bindSandboxEnvironment(e,t){return Object.defineProperty(e,SELECTOR_ENVIRONMENT,{value:t}),e}function getBoundSandboxEnvironment(e){let t=typeof e==`function`?Reflect.get(e,SELECTOR_ENVIRONMENT):void 0;return isSandboxEnvironment(t)?t:void 0}function isSandboxEnvironment(e){return typeof e==`object`&&!!e&&Reflect.get(e,ENVIRONMENT)===!0&&typeof Reflect.get(e,`provider`)==`string`&&typeof Reflect.get(e,`open`)==`function`}async function runWithSandboxConstructorRuntime(e,t){let n=contextStorage.getStore(),r=n??new ContextContainer,i=runtimes.get(r);runtimes.set(r,e);try{return n===void 0?await contextStorage.run(r,t):await t()}finally{i===void 0?runtimes.delete(r):runtimes.set(r,i)}}export{bindSandboxEnvironment,createSandboxEnvironment,getBoundSandboxEnvironment,getSandboxEnvironmentConfigurationHash,getSandboxEnvironmentRuntime,isSandboxEnvironment,runWithSandboxConstructorRuntime};
|
|
@@ -2,7 +2,7 @@ import type * as Vercel from "#compiled/@vercel/sandbox/index.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Firewall network policy applied to a live sandbox session.
|
|
4
4
|
*
|
|
5
|
-
* eve-owned alias of the
|
|
5
|
+
* eve-owned alias of the provider network-policy shape. Use it to restrict
|
|
6
6
|
* egress (`"deny-all"`, an allow-list) or to broker credentials onto
|
|
7
7
|
* outgoing requests. A per-domain `transform` injects headers at the
|
|
8
8
|
* firewall so secrets never enter the sandbox process:
|
|
@@ -17,9 +17,14 @@ import type * as Vercel from "#compiled/@vercel/sandbox/index.js";
|
|
|
17
17
|
* });
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
|
-
* The Docker
|
|
21
|
-
* `"deny-all"` policies; the just-bash
|
|
20
|
+
* The Docker provider honors only the coarse `"allow-all"` and
|
|
21
|
+
* `"deny-all"` policies; the just-bash provider rejects `setNetworkPolicy`
|
|
22
22
|
* entirely (its network policy is fixed at sandbox creation and it runs
|
|
23
23
|
* no binaries to govern).
|
|
24
24
|
*/
|
|
25
25
|
export type SandboxNetworkPolicy = Vercel.NetworkPolicy;
|
|
26
|
+
/** Initial network configuration shared by network-capable sandbox providers. */
|
|
27
|
+
export interface SandboxNetworkOptions {
|
|
28
|
+
readonly networkPolicy?: SandboxNetworkPolicy;
|
|
29
|
+
}
|
|
30
|
+
export declare function isSandboxNetworkPolicy(value: unknown): value is SandboxNetworkPolicy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{};
|
|
1
|
+
function isSandboxNetworkPolicy(e){return e===`allow-all`||e===`deny-all`?!0:!isRecord(e)||!hasOnlyKeys(e,[`allow`,`subnets`])||e.allow!==void 0&&!isNetworkAllowList(e.allow)?!1:e.subnets===void 0||isSubnetPolicy(e.subnets)}function isNetworkAllowList(e){return isStringArray(e)?!0:isRecord(e)?Object.values(e).every(e=>Array.isArray(e)&&e.every(isNetworkPolicyRule)):!1}function isNetworkPolicyRule(e){if(!isRecord(e)||!hasOnlyKeys(e,[`forwardURL`,`match`,`transform`])||e.match!==void 0&&!isNetworkPolicyMatch(e.match))return!1;let t=e.transform!==void 0,n=e.forwardURL!==void 0;return t===n?!1:n?typeof e.forwardURL==`string`:Array.isArray(e.transform)&&e.transform.every(e=>isRecord(e)&&hasOnlyKeys(e,[`headers`])&&(e.headers===void 0||isStringRecord(e.headers)))}function isNetworkPolicyMatch(e){return!isRecord(e)||!hasOnlyKeys(e,[`headers`,`method`,`path`,`queryString`])?!1:(e.path===void 0||isNetworkPolicyMatcher(e.path))&&(e.method===void 0||isStringArray(e.method))&&(e.queryString===void 0||isKeyValueMatcherArray(e.queryString))&&(e.headers===void 0||isKeyValueMatcherArray(e.headers))}function isKeyValueMatcherArray(e){return Array.isArray(e)&&e.every(e=>isRecord(e)&&hasOnlyKeys(e,[`key`,`value`])&&(e.key===void 0||isNetworkPolicyMatcher(e.key))&&(e.value===void 0||isNetworkPolicyMatcher(e.value)))}function isNetworkPolicyMatcher(e){if(!isRecord(e)||!hasOnlyKeys(e,[`exact`,`regex`,`startsWith`]))return!1;let t=[e.exact,e.startsWith,e.regex];return t.filter(e=>e!==void 0).length===1&&t.every(e=>e===void 0||typeof e==`string`)}function isSubnetPolicy(e){return isRecord(e)&&hasOnlyKeys(e,[`allow`,`deny`])&&(e.allow===void 0||isStringArray(e.allow))&&(e.deny===void 0||isStringArray(e.deny))}function isStringArray(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function isStringRecord(e){return isRecord(e)&&Object.values(e).every(e=>typeof e==`string`)}function hasOnlyKeys(e,t){return Object.keys(e).every(e=>t.includes(e))}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{isSandboxNetworkPolicy};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "#compiled/zod/index.js";
|
|
2
|
+
import type { SandboxPreparedArtifact } from "#shared/sandbox-provider.js";
|
|
3
|
+
export declare const SANDBOX_PREPARED_ARTIFACTS_KIND = "eve-sandbox-prepared-artifacts";
|
|
4
|
+
export declare const SANDBOX_PREPARED_ARTIFACTS_VERSION = 2;
|
|
5
|
+
export interface SandboxPreparedArtifactEntry {
|
|
6
|
+
readonly artifact: SandboxPreparedArtifact;
|
|
7
|
+
readonly nodeId: string;
|
|
8
|
+
readonly providerName: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SandboxPreparedArtifactsManifest {
|
|
11
|
+
readonly entries: readonly SandboxPreparedArtifactEntry[];
|
|
12
|
+
readonly kind: typeof SANDBOX_PREPARED_ARTIFACTS_KIND;
|
|
13
|
+
readonly version: typeof SANDBOX_PREPARED_ARTIFACTS_VERSION;
|
|
14
|
+
}
|
|
15
|
+
export declare const sandboxPreparedArtifactsManifestSchema: z.ZodType<SandboxPreparedArtifactsManifest>;
|
|
16
|
+
export declare function createSandboxPreparedArtifactsManifest(entries: readonly SandboxPreparedArtifactEntry[]): SandboxPreparedArtifactsManifest;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z}from"#compiled/zod/index.js";const SANDBOX_PREPARED_ARTIFACTS_KIND=`eve-sandbox-prepared-artifacts`,SANDBOX_PREPARED_ARTIFACTS_VERSION=2,sandboxPreparedArtifactSchema=z.lazy(()=>z.union([z.null(),z.boolean(),z.number(),z.string(),z.array(sandboxPreparedArtifactSchema),z.record(z.string(),sandboxPreparedArtifactSchema)])),sandboxPreparedArtifactsManifestSchema=z.object({entries:z.array(z.object({artifact:sandboxPreparedArtifactSchema,nodeId:z.string().min(1),providerName:z.string().min(1)}).strict()),kind:z.literal(SANDBOX_PREPARED_ARTIFACTS_KIND),version:z.literal(2)}).strict();function createSandboxPreparedArtifactsManifest(e){return{entries:[...e].sort((e,t)=>e.nodeId.localeCompare(t.nodeId)),kind:SANDBOX_PREPARED_ARTIFACTS_KIND,version:2}}export{SANDBOX_PREPARED_ARTIFACTS_KIND,SANDBOX_PREPARED_ARTIFACTS_VERSION,createSandboxPreparedArtifactsManifest,sandboxPreparedArtifactsManifestSchema};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { type SandboxEnvironment, type SandboxSelectorContext } from "#shared/sandbox-environment.js";
|
|
2
|
+
import type { SandboxSession } from "#shared/sandbox-session.js";
|
|
3
|
+
export interface SandboxDeleteOptions {
|
|
4
|
+
readonly abortSignal?: AbortSignal;
|
|
5
|
+
}
|
|
6
|
+
export interface SandboxProviderResourceFile {
|
|
7
|
+
readonly content: string | Uint8Array;
|
|
8
|
+
readonly relativePath: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SandboxProviderResourceTree {
|
|
11
|
+
readonly files: readonly SandboxProviderResourceFile[];
|
|
12
|
+
readonly key: string;
|
|
13
|
+
readonly mountPath: string;
|
|
14
|
+
readonly targetPath: string;
|
|
15
|
+
}
|
|
16
|
+
export type SandboxProviderResourceSource = {
|
|
17
|
+
readonly kind: "none";
|
|
18
|
+
} | {
|
|
19
|
+
readonly key: string;
|
|
20
|
+
readonly kind: "inline";
|
|
21
|
+
} | {
|
|
22
|
+
readonly key: string;
|
|
23
|
+
readonly kind: "materialized";
|
|
24
|
+
readonly path: string;
|
|
25
|
+
};
|
|
26
|
+
export interface SandboxProviderResources {
|
|
27
|
+
readonly skills?: SandboxProviderResourceTree;
|
|
28
|
+
readonly source: SandboxProviderResourceSource;
|
|
29
|
+
readonly workspace?: SandboxProviderResourceTree;
|
|
30
|
+
}
|
|
31
|
+
export declare function sandboxProviderResourceIdentity(resources: SandboxProviderResources): object;
|
|
32
|
+
export interface SandboxProviderTargetFile {
|
|
33
|
+
readonly content: string | Uint8Array;
|
|
34
|
+
readonly path: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function providerResourceTargetFiles(resources: SandboxProviderResources): SandboxProviderTargetFile[];
|
|
37
|
+
export type SandboxPreparedArtifact = null | boolean | number | string | readonly SandboxPreparedArtifact[] | {
|
|
38
|
+
readonly [key: string]: SandboxPreparedArtifact;
|
|
39
|
+
};
|
|
40
|
+
export declare function isSandboxPreparedArtifact(value: unknown): value is SandboxPreparedArtifact;
|
|
41
|
+
export declare function isSandboxPreparedArtifactRecord(artifact: unknown): artifact is {
|
|
42
|
+
readonly [key: string]: SandboxPreparedArtifact;
|
|
43
|
+
};
|
|
44
|
+
export interface SandboxProviderFiles {
|
|
45
|
+
list(): Promise<readonly string[]>;
|
|
46
|
+
read(path: string): Promise<Uint8Array>;
|
|
47
|
+
readText(path: string): Promise<string>;
|
|
48
|
+
}
|
|
49
|
+
export interface SandboxProviderHost {
|
|
50
|
+
loadOptionalPackage<T>(input: {
|
|
51
|
+
readonly autoInstall: boolean;
|
|
52
|
+
readonly importModule: () => Promise<T>;
|
|
53
|
+
readonly installPackageName?: string;
|
|
54
|
+
readonly ignoredOptionalDependencies?: readonly string[];
|
|
55
|
+
readonly missingMessage: string;
|
|
56
|
+
readonly packageName: string;
|
|
57
|
+
}): Promise<T>;
|
|
58
|
+
resolveProjectPath(path: string): string;
|
|
59
|
+
}
|
|
60
|
+
export interface SandboxProviderPrepareContext {
|
|
61
|
+
readonly files: SandboxProviderFiles;
|
|
62
|
+
readonly host: SandboxProviderHost;
|
|
63
|
+
readonly log?: (message: string) => void;
|
|
64
|
+
readonly resources: SandboxProviderResources;
|
|
65
|
+
readonly sourceRevision: string;
|
|
66
|
+
readonly storagePath: string;
|
|
67
|
+
}
|
|
68
|
+
export interface SandboxProviderSessionContext {
|
|
69
|
+
readonly host: SandboxProviderHost;
|
|
70
|
+
readonly session: SandboxSelectorContext["session"];
|
|
71
|
+
readonly storagePath: string;
|
|
72
|
+
}
|
|
73
|
+
export interface SandboxProviderHandle<Session extends SandboxSession = SandboxSession> {
|
|
74
|
+
readonly sandbox: Session;
|
|
75
|
+
onRuntimeShutdown(): Promise<void>;
|
|
76
|
+
onSessionDelete(options?: SandboxDeleteOptions): Promise<void>;
|
|
77
|
+
onSessionStop(): Promise<void>;
|
|
78
|
+
}
|
|
79
|
+
export interface SandboxProviderImplementation<OpenOptions extends object | undefined, PreparedArtifact extends SandboxPreparedArtifact, SessionState, Session extends SandboxSession = SandboxSession> {
|
|
80
|
+
prepare(context: SandboxProviderPrepareContext): Promise<PreparedArtifact>;
|
|
81
|
+
resume(context: SandboxProviderSessionContext, artifact: Readonly<PreparedArtifact>, state: Readonly<SessionState>): Promise<SandboxProviderHandle<Session>>;
|
|
82
|
+
start(context: SandboxProviderSessionContext, options: Readonly<OpenOptions> | undefined, artifact: Readonly<PreparedArtifact>): Promise<{
|
|
83
|
+
readonly handle: SandboxProviderHandle<Session>;
|
|
84
|
+
readonly state: SessionState;
|
|
85
|
+
}>;
|
|
86
|
+
}
|
|
87
|
+
type SandboxOptionArguments<Options extends object | undefined> = Options extends undefined ? [options?: undefined] : Record<never, never> extends Options ? [options?: Readonly<Options>] : [options: Readonly<Options>];
|
|
88
|
+
export type SandboxProviderDefinition<EnvironmentOptions extends object | undefined, OpenOptions extends object | undefined, PreparedArtifact extends SandboxPreparedArtifact, SessionState, Session extends SandboxSession> = {
|
|
89
|
+
readonly name: string;
|
|
90
|
+
readonly stateProtocolVersion?: number;
|
|
91
|
+
environment(...args: SandboxOptionArguments<EnvironmentOptions>): SandboxProviderImplementation<OpenOptions, PreparedArtifact, SessionState, Session>;
|
|
92
|
+
};
|
|
93
|
+
export interface SandboxProvider<EnvironmentOptions extends object | undefined, OpenOptions extends object | undefined, Session extends SandboxSession> {
|
|
94
|
+
readonly name: string;
|
|
95
|
+
environment(...args: SandboxOptionArguments<EnvironmentOptions>): SandboxEnvironment<OpenOptions, Session>;
|
|
96
|
+
}
|
|
97
|
+
type ErasedSandboxProviderImplementation = SandboxProviderImplementation<object | undefined, SandboxPreparedArtifact, SandboxPreparedArtifact, SandboxSession>;
|
|
98
|
+
export interface SandboxProviderRuntime {
|
|
99
|
+
readonly implementation: ErasedSandboxProviderImplementation;
|
|
100
|
+
readonly providerName: string;
|
|
101
|
+
readonly stateProtocolVersion: number;
|
|
102
|
+
}
|
|
103
|
+
export declare function defineSandboxProvider<EnvironmentOptions extends object | undefined = undefined, OpenOptions extends object | undefined = undefined, PreparedArtifact extends SandboxPreparedArtifact = SandboxPreparedArtifact, SessionState = SandboxPreparedArtifact, Session extends SandboxSession = SandboxSession>(definition: SandboxProviderDefinition<EnvironmentOptions, OpenOptions, PreparedArtifact, SessionState, Session>): SandboxProvider<EnvironmentOptions, OpenOptions, Session>;
|
|
104
|
+
export declare function createSandboxProviderResources(input: {
|
|
105
|
+
readonly resourcesKey?: string;
|
|
106
|
+
readonly resourcesPath?: string;
|
|
107
|
+
readonly seedFiles?: readonly {
|
|
108
|
+
readonly content: string | Uint8Array;
|
|
109
|
+
readonly path: string;
|
|
110
|
+
}[];
|
|
111
|
+
}): SandboxProviderResources;
|
|
112
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createSandboxEnvironment}from"#shared/sandbox-environment.js";function sandboxProviderResourceIdentity(e){return{skills:e.skills?.key,workspace:e.workspace?.key}}function providerResourceTargetFiles(e){return[e.workspace,e.skills].flatMap(e=>e===void 0?[]:e.files.map(t=>({content:t.content,path:`${e.targetPath}/${t.relativePath}`})))}function isSandboxPreparedArtifact(e){return e===null||typeof e==`boolean`||typeof e==`number`||typeof e==`string`?!0:Array.isArray(e)?e.every(isSandboxPreparedArtifact):typeof e==`object`&&!!e&&Object.values(e).every(isSandboxPreparedArtifact)}function isSandboxPreparedArtifactRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function defineSandboxProvider(e){let t=e.stateProtocolVersion??1;return{name:e.name,environment(...n){return createSandboxEnvironment({configuration:n[0],runtime:{implementation:eraseSandboxProviderImplementation(e.environment(...n)),providerName:e.name,stateProtocolVersion:t}})}}}function eraseSandboxProviderImplementation(e){return e}function createSandboxProviderResources(e){if(e.resourcesKey===void 0)return{source:{kind:`none`}};let t=e.seedFiles??[],n=e.resourcesPath===void 0?{key:e.resourcesKey,kind:`inline`}:{key:e.resourcesKey,kind:`materialized`,path:e.resourcesPath};return{skills:createResourceTree({files:t.filter(e=>e.path.startsWith(`$HOME/.agents/skills/`)),key:`${e.resourcesKey}:skills`,mountPath:`/eve/resources/skills`,prefix:`$HOME/.agents/skills/`,targetPath:`$HOME/.agents/skills`}),source:n,workspace:createResourceTree({files:t.filter(e=>!e.path.startsWith(`$HOME/.agents/skills/`)),key:`${e.resourcesKey}:workspace`,mountPath:`/eve/resources/workspace`,prefix:`/workspace/`,targetPath:`/workspace`})}}function createResourceTree(e){return{files:e.files.map(t=>({content:t.content,relativePath:t.path.startsWith(e.prefix)?t.path.slice(e.prefix.length):t.path})),key:e.key,mountPath:e.mountPath,targetPath:e.targetPath}}export{createSandboxProviderResources,defineSandboxProvider,isSandboxPreparedArtifact,isSandboxPreparedArtifactRecord,providerResourceTargetFiles,sandboxProviderResourceIdentity};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Experimental_SandboxSession as AiSdkSandbox } from "ai";
|
|
2
|
-
import type { SandboxDeleteOptions } from "#shared/sandbox-
|
|
2
|
+
import type { SandboxDeleteOptions } from "#shared/sandbox-provider.js";
|
|
3
3
|
import type { SandboxNetworkPolicy } from "#shared/sandbox-network-policy.js";
|
|
4
4
|
/**
|
|
5
5
|
* Options for running one command in a sandbox. Shape mirrors the AI
|
|
@@ -70,26 +70,14 @@ export interface SandboxRemovePathOptions {
|
|
|
70
70
|
* The eight I/O methods (`run`, `spawn`, `readFile`, `readBinaryFile`,
|
|
71
71
|
* `readTextFile`, `writeFile`, `writeBinaryFile`, `writeTextFile`) are
|
|
72
72
|
* pulled directly from the AI SDK {@link AiSdkSandbox} type, so authored
|
|
73
|
-
* code that targets either surface uses identical signatures. `
|
|
74
|
-
*
|
|
75
|
-
* for caching and `/workspace` path anchoring.
|
|
73
|
+
* code that targets either surface uses identical signatures. `resolvePath`
|
|
74
|
+
* is an eve-specific extension for `/workspace` path anchoring.
|
|
76
75
|
*
|
|
77
76
|
* Relative paths resolve from `/workspace`, the live working directory
|
|
78
|
-
* for every
|
|
77
|
+
* for every provider. Absolute paths pass through unchanged.
|
|
79
78
|
*
|
|
80
79
|
*/
|
|
81
80
|
export interface SandboxSession extends Pick<AiSdkSandbox, "run" | "spawn" | "readFile" | "readBinaryFile" | "readTextFile" | "writeFile" | "writeBinaryFile" | "writeTextFile"> {
|
|
82
|
-
/**
|
|
83
|
-
* Stable identifier for the backend session this handle wraps.
|
|
84
|
-
*
|
|
85
|
-
* Persists across reconnects to the same logical session: two calls
|
|
86
|
-
* that resume the same underlying backend sandbox observe the same
|
|
87
|
-
* `id`. Template sessions constructed during bootstrap expose the
|
|
88
|
-
* template key; live sessions expose the session key assigned by the
|
|
89
|
-
* runtime. Useful as a cache key for per-session state that must
|
|
90
|
-
* outlive individual step executions.
|
|
91
|
-
*/
|
|
92
|
-
readonly id: string;
|
|
93
81
|
/**
|
|
94
82
|
* Anchors a sandbox-relative path to `/workspace` and returns the
|
|
95
83
|
* resulting absolute path.
|
|
@@ -98,21 +86,8 @@ export interface SandboxSession extends Pick<AiSdkSandbox, "run" | "spawn" | "re
|
|
|
98
86
|
* The read and write methods already apply this internally.
|
|
99
87
|
*/
|
|
100
88
|
resolvePath(path: string): string;
|
|
101
|
-
/**
|
|
102
|
-
|
|
103
|
-
* for changing the policy *during* a turn (e.g. brokering a credential
|
|
104
|
-
* resolved mid-turn, or tightening egress after fetching data). A
|
|
105
|
-
* per-domain `transform` injects headers at the firewall so secrets
|
|
106
|
-
* never enter the sandbox process. The policy takes effect from the time
|
|
107
|
-
* the call resolves, so await it before the egress you want governed.
|
|
108
|
-
*
|
|
109
|
-
* When the policy is known at session start, prefer configuring it up
|
|
110
|
-
* front in the sandbox backend factory or `onSession`'s `use()`. The
|
|
111
|
-
* Docker backend honors only `"allow-all"` and `"deny-all"`;
|
|
112
|
-
* the just-bash backend rejects this call entirely (its network policy
|
|
113
|
-
* is fixed at sandbox creation and it runs no binaries to govern).
|
|
114
|
-
*/
|
|
115
|
-
setNetworkPolicy(policy: SandboxNetworkPolicy): Promise<void>;
|
|
89
|
+
/** Applies a firewall policy when the selected provider supports mutable networking. */
|
|
90
|
+
setNetworkPolicy?(policy: SandboxNetworkPolicy): Promise<void>;
|
|
116
91
|
/**
|
|
117
92
|
* Removes one file or directory from the sandbox filesystem.
|
|
118
93
|
*
|
|
@@ -127,37 +102,39 @@ export interface SandboxSession extends Pick<AiSdkSandbox, "run" | "spawn" | "re
|
|
|
127
102
|
* Unlike the I/O-only session used during sandbox initialization, this handle
|
|
128
103
|
* exposes provider-backed lifecycle operations.
|
|
129
104
|
*/
|
|
105
|
+
export interface MutableNetworkSandboxSession extends SandboxSession {
|
|
106
|
+
/** Applies a firewall policy to the live sandbox. */
|
|
107
|
+
setNetworkPolicy(policy: SandboxNetworkPolicy): Promise<void>;
|
|
108
|
+
}
|
|
109
|
+
export type FixedNetworkSandboxSession = Omit<SandboxSession, "setNetworkPolicy">;
|
|
130
110
|
export interface RuntimeSandboxSession extends SandboxSession {
|
|
131
|
-
/** Permanently deletes this sandbox and its disposable
|
|
111
|
+
/** Permanently deletes this sandbox and its disposable provider state. */
|
|
132
112
|
delete(options?: SandboxDeleteOptions): Promise<void>;
|
|
133
113
|
/**
|
|
134
114
|
* Stops the backing sandbox compute while preserving the durable session.
|
|
135
115
|
* A later runtime callback reopens the session through its configured
|
|
136
|
-
*
|
|
116
|
+
* provider. Providers may also support resuming the same handle.
|
|
137
117
|
*/
|
|
138
118
|
stop(): Promise<void>;
|
|
139
119
|
}
|
|
120
|
+
export type RuntimeSandboxSessionFor<Session extends SandboxSession> = Session & Pick<RuntimeSandboxSession, "delete" | "stop">;
|
|
140
121
|
/**
|
|
141
122
|
* Internal sandbox session, used to construct the public {@link SandboxSession}.
|
|
142
123
|
*
|
|
143
|
-
*
|
|
124
|
+
* Provider implementations only need to provide byte-oriented file I/O and
|
|
144
125
|
* a `spawn` primitive; the public surface (binary and text variants,
|
|
145
126
|
* line-range slicing, encoding handling, the `run` wrapper) is built on
|
|
146
127
|
* top of these primitives by `buildSandboxSession`.
|
|
147
128
|
*
|
|
148
129
|
* Each method's signature mirrors its public counterpart (and the AI
|
|
149
|
-
* SDK {@link AiSdkSandbox} surface) so
|
|
130
|
+
* SDK {@link AiSdkSandbox} surface) so providers look symmetric with
|
|
150
131
|
* what authored code sees. The `path` field on `readFile`/`writeFile`
|
|
151
132
|
* here is the **already-resolved** path: the public-surface builder
|
|
152
133
|
* calls `resolvePath` before delegating.
|
|
153
134
|
*/
|
|
154
135
|
export interface InternalSandboxSession extends Pick<AiSdkSandbox, "spawn" | "readFile" | "writeFile"> {
|
|
155
|
-
/**
|
|
156
|
-
* Stable identifier surfaced on the public {@link SandboxSession}.
|
|
157
|
-
*/
|
|
158
|
-
readonly id: string;
|
|
159
|
-
/** Removes an already-resolved path from the backend filesystem. */
|
|
136
|
+
/** Removes an already-resolved path from the provider filesystem. */
|
|
160
137
|
removePath(options: SandboxRemovePathOptions): Promise<void>;
|
|
161
|
-
/** Translates a user-facing path to the
|
|
138
|
+
/** Translates a user-facing path to the provider's native path. */
|
|
162
139
|
resolvePath(path: string): string;
|
|
163
140
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class SandboxTemplateNotProvisionedError extends Error {
|
|
2
|
+
readonly providerName: string;
|
|
3
|
+
readonly templateKey: string;
|
|
4
|
+
constructor(input: {
|
|
5
|
+
readonly providerName: string;
|
|
6
|
+
readonly templateKey: string;
|
|
7
|
+
});
|
|
8
|
+
static is(error: unknown): error is SandboxTemplateNotProvisionedError;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var SandboxTemplateNotProvisionedError=class SandboxTemplateNotProvisionedError extends Error{providerName;templateKey;constructor(e){super(`Sandbox template "${e.templateKey}" is not provisioned for provider "${e.providerName}". Run \`eve build\` before serving traffic.`),this.name=`SandboxTemplateNotProvisionedError`,this.providerName=e.providerName,this.templateKey=e.templateKey}static is(e){return e instanceof SandboxTemplateNotProvisionedError||typeof e==`object`&&!!e&&Reflect.get(e,`name`)===`SandboxTemplateNotProvisionedError`&&typeof Reflect.get(e,`providerName`)==`string`&&typeof Reflect.get(e,`templateKey`)==`string`}};export{SandboxTemplateNotProvisionedError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mintSubagentContinuationToken}from"#execution/session.js";import{formatSubagentInput,normalizeRequestedOutputSchema}from"#subagents/invocation.js";import{SUBAGENT_ADAPTER_KIND}from"#subagents/adapter-state.js";import{resolveRemainingSessionTokenLimits}from"#subagents/token-budget.js";function buildSubagentRunInput(e){let{action:t,auth:n,capabilities:r,channelMetadata:i,inheritedConversation:a,initiatorAuth:o,session:s,source:c}=e,l=mintSubagentContinuationToken(`${s.sessionId}:${t.callId}`),u=resolveRemainingSessionTokenLimits(s,e.fanoutSize),d=normalizeRequestedOutputSchema(t.input.outputSchema),f={callId:t.callId,parentContinuationToken:e.parent.continuationToken??s.continuationToken,parentSessionId:s.sessionId,subagentName:t.subagentName};e.taskId!==void 0&&(f.taskId=e.taskId),(e.graph?.nodesByNodeId.get(t.nodeId)?.sandboxRegistry.sandbox?.definition.
|
|
1
|
+
import{mintSubagentContinuationToken}from"#execution/session.js";import{formatSubagentInput,normalizeRequestedOutputSchema}from"#subagents/invocation.js";import{SUBAGENT_ADAPTER_KIND}from"#subagents/adapter-state.js";import{resolveRemainingSessionTokenLimits}from"#subagents/token-budget.js";function buildSubagentRunInput(e){let{action:t,auth:n,capabilities:r,channelMetadata:i,inheritedConversation:a,initiatorAuth:o,session:s,source:c}=e,l=mintSubagentContinuationToken(`${s.sessionId}:${t.callId}`),u=resolveRemainingSessionTokenLimits(s,e.fanoutSize),d=normalizeRequestedOutputSchema(t.input.outputSchema),f={callId:t.callId,parentContinuationToken:e.parent.continuationToken??s.continuationToken,parentSessionId:s.sessionId,subagentName:t.subagentName};e.taskId!==void 0&&(f.taskId=e.taskId),(e.graph?.nodesByNodeId.get(t.nodeId)?.sandboxRegistry.sandbox?.definition.kind===`parent`||e.selfAgent)&&(s.sandboxState!==void 0&&(f.parentSandboxState=s.sandboxState),f.sandboxSessionId=e.sandboxSessionId??s.sessionId);let p={adapter:{kind:SUBAGENT_ADAPTER_KIND,state:f},auth:n,capabilities:r,channelMetadata:i,inheritedConversation:a,continuationToken:l,initiatorAuth:o,input:{message:formatSubagentCallInputMessage({action:t,source:c}),outputSchema:d??c.outputSchema},limits:u,mode:`conversation`,conversationId:e.parent.conversationId,parent:e.parent.lineage,parentTraceContext:e.parent.traceContext,activityObserver:e.activityObserver};return e.taskId!==void 0&&(p.taskId=e.taskId),{childContinuationToken:l,runInput:p}}function formatSubagentCallInputMessage(e){let{message:t}=e.action.input;switch(e.source.type){case`local`:return formatSubagentInput({description:e.source.description,message:t,name:e.action.subagentName,type:`local`}).message;case`runtime`:return formatSubagentInput({message:t,name:e.action.subagentName,type:`runtime`}).message;default:return e.source}}export{buildSubagentRunInput};
|
package/dist/src/svelte/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { DeliverHookPayload } from "#channel/types.js";
|
|
1
|
+
import type { TaskDeliveryPolicy, DeliverHookPayload } from "#channel/types.js";
|
|
2
2
|
import type { SessionStateMap, StepInput } from "#harness/types.js";
|
|
3
3
|
export declare const TASK_DELIVERY_CONTEXT_LABEL = "[Task state]";
|
|
4
4
|
export declare const TASK_DELIVERY_INITIATING_INSTRUCTION = "Background task reporting: launch acknowledgement\nThe latest [Task state] message is runtime-authored and lists background tasks accepted so far from the current turn. They continue independently after this turn.\n\nContinue carrying out the user's request, including starting any remaining background work. When no further tool calls are needed in this turn, send one brief user-facing acknowledgement that the background work has started. Do not wait for results or report results that are not available yet. End the turn after the acknowledgement.";
|
|
5
|
-
export declare const TASK_DELIVERY_SETTLED_INSTRUCTION = "Background task reporting\
|
|
5
|
+
export declare const TASK_DELIVERY_SETTLED_INSTRUCTION = "Background task reporting\nFor this background-task update, the accompanying [Task state] message is runtime-authored and lists the settled tasks in this cohort and their available terminal outputs. Report their useful results together in one user-facing response without repeating results already reported. Do not reply with <eve-empty-delivery/>.";
|
|
6
|
+
export declare const TASK_DELIVERY_AUTO_INSTRUCTION = "Background task reporting\nFor this background-task update, the accompanying [Task state] message is runtime-authored and lists the whole cohort, including pending tasks and every available terminal output. A received result has not necessarily been reported to the user. Report new results only when they are useful independently of unfinished work. When that work settles, combine its results with any previously withheld results. If there is nothing new and useful to report, reply with exactly <eve-empty-delivery/>. Do not repeat results already reported or send an acknowledgement just to say you are waiting.";
|
|
6
7
|
type BackgroundTaskDelivery = DeliverHookPayload & {
|
|
7
8
|
readonly taskDeliveryId: string;
|
|
8
9
|
};
|
|
@@ -10,10 +11,11 @@ type BackgroundTaskDelivery = DeliverHookPayload & {
|
|
|
10
11
|
export declare function getBackgroundTaskDelivery(input: unknown): BackgroundTaskDelivery | undefined;
|
|
11
12
|
/** Marks a task-produced user message before the harness coalesces delivery results. */
|
|
12
13
|
export declare function markBackgroundTaskStepInput(input: StepInput): StepInput;
|
|
13
|
-
/**
|
|
14
|
+
/** Projects the report group without changing the delivered task's activity root. */
|
|
14
15
|
export declare function resolveTaskDeliveryContext(input: {
|
|
15
16
|
readonly state: SessionStateMap | undefined;
|
|
16
|
-
readonly
|
|
17
|
+
readonly taskDeliveryIds: readonly string[];
|
|
18
|
+
readonly taskDeliveryPolicy: TaskDeliveryPolicy;
|
|
17
19
|
}): {
|
|
18
20
|
readonly context: string;
|
|
19
21
|
readonly phase: "pending" | "settled";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{markFrameworkStepInput}from"#harness/messages.js";import{getBackgroundWorkflowToolRuns,readWorkflowTaskView}from"#harness/workflow-tool-runs.js";import{getTaskCohortId}from"#tasks/session-task-cohorts.js";import{EMPTY_DELIVERY_SENTINEL}from"#shared/empty-delivery.js";const TASK_DELIVERY_CONTEXT_LABEL=`[Task state]`,TASK_DELIVERY_INITIATING_INSTRUCTION=`Background task reporting: launch acknowledgement
|
|
2
2
|
The latest ${TASK_DELIVERY_CONTEXT_LABEL} message is runtime-authored and lists background tasks accepted so far from the current turn. They continue independently after this turn.
|
|
3
3
|
|
|
4
|
-
Continue carrying out the user's request, including starting any remaining background work. When no further tool calls are needed in this turn, send one brief user-facing acknowledgement that the background work has started. Do not wait for results or report results that are not available yet. End the turn after the acknowledgement.`,TASK_DELIVERY_SETTLED_INSTRUCTION=`Background task reporting\
|
|
4
|
+
Continue carrying out the user's request, including starting any remaining background work. When no further tool calls are needed in this turn, send one brief user-facing acknowledgement that the background work has started. Do not wait for results or report results that are not available yet. End the turn after the acknowledgement.`,TASK_DELIVERY_SETTLED_INSTRUCTION=`Background task reporting\nFor this background-task update, the accompanying ${TASK_DELIVERY_CONTEXT_LABEL} message is runtime-authored and lists the settled tasks in this cohort and their available terminal outputs. Report their useful results together in one user-facing response without repeating results already reported. Do not reply with ${EMPTY_DELIVERY_SENTINEL}.`,TASK_DELIVERY_AUTO_INSTRUCTION=`Background task reporting\nFor this background-task update, the accompanying ${TASK_DELIVERY_CONTEXT_LABEL} message is runtime-authored and lists the whole cohort, including pending tasks and every available terminal output. A received result has not necessarily been reported to the user. Report new results only when they are useful independently of unfinished work. When that work settles, combine its results with any previously withheld results. If there is nothing new and useful to report, reply with exactly ${EMPTY_DELIVERY_SENTINEL}. Do not repeat results already reported or send an acknowledgement just to say you are waiting.`;function getBackgroundTaskDelivery(e){if(typeof e!=`object`||!e)return;let t=e;return t.kind===`deliver`&&typeof t.taskDeliveryId==`string`?e:void 0}function markBackgroundTaskStepInput(e){return e.message===void 0?e:markFrameworkStepInput(e,`execution.background_task`)}function resolveTaskDeliveryContext(e){let t=e.taskDeliveryIds[0];if(t===void 0)return;let n=getBackgroundWorkflowToolRuns(e.state),r=n.find(e=>t.startsWith(`${e.task.taskId}:`));return r===void 0?void 0:{...projectTaskCohort(n.filter(e=>getTaskCohortId(e.task)===getTaskCohortId(r.task)),e.taskDeliveryPolicy===`auto`),rootTurnId:r.origin.turnId}}function resolveInitiatingTaskContext(e){let t=getBackgroundWorkflowToolRuns(e.state).filter(t=>t.origin.turnId===e.turnId);if(t.some(e=>e.task.outcome===void 0))return{...projectTaskCohort(t,!1),phase:`initiating`}}function projectTaskCohort(e,t){let n=e.every(e=>e.task.outcome!==void 0),r=e.map(e=>{let r=readWorkflowTaskView(e.task);return{name:e.task.metadata.name,output:n||t?r?.lastOutput:void 0,status:r?.status??`pending`,taskId:e.task.taskId}});return{context:`${TASK_DELIVERY_CONTEXT_LABEL}\n${JSON.stringify({tasks:r})}`,phase:n?`settled`:`pending`}}export{TASK_DELIVERY_AUTO_INSTRUCTION,TASK_DELIVERY_CONTEXT_LABEL,TASK_DELIVERY_INITIATING_INSTRUCTION,TASK_DELIVERY_SETTLED_INSTRUCTION,getBackgroundTaskDelivery,markBackgroundTaskStepInput,resolveInitiatingTaskContext,resolveTaskDeliveryContext};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TaskDeliveryPolicy } from "#channel/types.js";
|
|
1
2
|
export interface DeliveryPolicy {
|
|
2
3
|
readonly allowsEmptyDelivery: boolean;
|
|
3
4
|
readonly instruction?: string;
|
|
@@ -8,5 +9,6 @@ export declare function resolveDeliveryPolicy(input: {
|
|
|
8
9
|
readonly isChild: boolean;
|
|
9
10
|
readonly isFirstTurn: boolean;
|
|
10
11
|
readonly hasScheduleProvenance: boolean;
|
|
12
|
+
readonly taskDeliveryPolicy: TaskDeliveryPolicy | undefined;
|
|
11
13
|
readonly taskDeliveryPhase: "none" | "initiating" | "pending" | "settled" | undefined;
|
|
12
14
|
}): DeliveryPolicy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{TASK_DELIVERY_INITIATING_INSTRUCTION,TASK_DELIVERY_SETTLED_INSTRUCTION}from"#tasks/delivery-context.js";import{CONDITIONAL_DELIVERY_INSTRUCTION}from"#shared/empty-delivery.js";const POLICIES={conditional:{allowsEmptyDelivery:!0,instruction:CONDITIONAL_DELIVERY_INSTRUCTION},initiating:{allowsEmptyDelivery:!1,instruction:TASK_DELIVERY_INITIATING_INSTRUCTION},normal:{allowsEmptyDelivery:!1},pending:{allowsEmptyDelivery:!0},settled:{allowsEmptyDelivery:!1,instruction:TASK_DELIVERY_SETTLED_INSTRUCTION}};function resolveDeliveryPolicy(e){return e.hasOutputSchema||e.isChild?POLICIES.normal:e.taskDeliveryPhase===`pending`?POLICIES.pending:e.taskDeliveryPhase===`settled`?POLICIES.settled:e.isFirstTurn&&e.hasScheduleProvenance?POLICIES.conditional:e.taskDeliveryPhase===`initiating`?POLICIES.initiating:POLICIES.normal}export{resolveDeliveryPolicy};
|
|
1
|
+
import{TASK_DELIVERY_AUTO_INSTRUCTION,TASK_DELIVERY_INITIATING_INSTRUCTION,TASK_DELIVERY_SETTLED_INSTRUCTION}from"#tasks/delivery-context.js";import{CONDITIONAL_DELIVERY_INSTRUCTION}from"#shared/empty-delivery.js";const POLICIES={auto:{allowsEmptyDelivery:!0,instruction:TASK_DELIVERY_AUTO_INSTRUCTION},conditional:{allowsEmptyDelivery:!0,instruction:CONDITIONAL_DELIVERY_INSTRUCTION},initiating:{allowsEmptyDelivery:!1,instruction:TASK_DELIVERY_INITIATING_INSTRUCTION},normal:{allowsEmptyDelivery:!1},pending:{allowsEmptyDelivery:!0},settled:{allowsEmptyDelivery:!1,instruction:TASK_DELIVERY_SETTLED_INSTRUCTION}};function resolveDeliveryPolicy(e){return e.hasOutputSchema||e.isChild?POLICIES.normal:e.taskDeliveryPolicy===`auto`&&(e.taskDeliveryPhase===`pending`||e.taskDeliveryPhase===`settled`)?POLICIES.auto:e.taskDeliveryPhase===`pending`?POLICIES.pending:e.taskDeliveryPhase===`settled`?POLICIES.settled:e.isFirstTurn&&e.hasScheduleProvenance?POLICIES.conditional:e.taskDeliveryPhase===`initiating`?POLICIES.initiating:POLICIES.normal}export{resolveDeliveryPolicy};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";const AGENT_TOOL_NAME=`agent`,AGENT_TOOL_DESCRIPTION=["Delegate a focused subtask to a copy of yourself, or continue or steer a previous delegation with `agentId`.",`Use it to isolate complex work or split a large task into independent pieces.`,"Issue multiple `agent` calls in one response to run a small fixed set in parallel.","A new child has fresh history and state but
|
|
1
|
+
import{z}from"#compiled/zod/index.js";const AGENT_TOOL_NAME=`agent`,AGENT_TOOL_DESCRIPTION=["Delegate a focused subtask to a copy of yourself, or continue or steer a previous delegation with `agentId`.",`Use it to isolate complex work or split a large task into independent pieces.`,"Issue multiple `agent` calls in one response to run a small fixed set in parallel.","A new child has fresh history and state but reuses your tools and sandbox, so include essential context in `message` and give parallel writers non-overlapping scopes."].join(` `),SUBAGENT_TOOL_INPUT_SCHEMA=z.strictObject({agentId:z.string().nullable().describe(`The id of an existing agent from the <agents> list or a task receipt. A message to a busy agent steers it: its previous task is cancelled and the updated work runs in the same child session. Omit this field (or pass null or an empty string) to start a new agent.`).optional(),message:z.string().describe(`The message to send to the subagent. Provide all context the subagent needs to complete the task; the subagent does not see the parent's history.`),outputSchema:z.looseObject({}).describe(`Only provide a non-empty JSON Schema when the caller explicitly requests structured output; otherwise omit this field. The subagent must match a provided schema, and that structured output becomes the tool result.`).optional()});export{AGENT_TOOL_DESCRIPTION,AGENT_TOOL_NAME,SUBAGENT_TOOL_INPUT_SCHEMA};
|
package/dist/src/vue/index.js
CHANGED