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,176 +0,0 @@
|
|
|
1
|
-
import type { SandboxBootstrapContext, SandboxSessionUseFn } from "#shared/sandbox-definition.js";
|
|
2
|
-
import type { SandboxSession } from "#shared/sandbox-session.js";
|
|
3
|
-
/**
|
|
4
|
-
* Live sandbox handle returned by a {@link SandboxBackend}.
|
|
5
|
-
*
|
|
6
|
-
* Wraps the public {@link SandboxSession} with lifecycle methods so the
|
|
7
|
-
* runtime orchestrator can persist reconnect metadata and release
|
|
8
|
-
* resources.
|
|
9
|
-
*/
|
|
10
|
-
export interface SandboxBackendHandle<SO = Record<string, never>> {
|
|
11
|
-
readonly session: SandboxSession;
|
|
12
|
-
readonly useSessionFn: SandboxSessionUseFn<SO>;
|
|
13
|
-
captureState(): Promise<SandboxBackendSessionState>;
|
|
14
|
-
/**
|
|
15
|
-
* Permanently deletes this sandbox and its disposable backend state.
|
|
16
|
-
* Reusable or shared template state must not be deleted.
|
|
17
|
-
*/
|
|
18
|
-
delete(options?: SandboxDeleteOptions): Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* Stops the underlying compute at an authored runtime boundary while
|
|
21
|
-
* preserving any backend state needed to reopen the durable session.
|
|
22
|
-
* Provider errors must reject this call.
|
|
23
|
-
*/
|
|
24
|
-
stop(): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Stops the underlying compute because the eve server is shutting
|
|
27
|
-
* down; nothing may be left running afterwards. The session must
|
|
28
|
-
* remain reattachable from persisted state on the next server start
|
|
29
|
-
* when the backend supports durable sessions.
|
|
30
|
-
*/
|
|
31
|
-
shutdown(): Promise<void>;
|
|
32
|
-
}
|
|
33
|
-
/** Options for permanently deleting one sandbox. */
|
|
34
|
-
export interface SandboxDeleteOptions {
|
|
35
|
-
readonly abortSignal?: AbortSignal;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Serializable per-sandbox reconnect record stored on the harness session.
|
|
39
|
-
*
|
|
40
|
-
* `backendName` matches the {@link SandboxBackend.name} of the backend
|
|
41
|
-
* that produced this state. The runtime reads it to decide whether a
|
|
42
|
-
* previously persisted handle is still compatible with the current
|
|
43
|
-
* backend.
|
|
44
|
-
*/
|
|
45
|
-
export interface SandboxBackendSessionState {
|
|
46
|
-
readonly backendName: string;
|
|
47
|
-
readonly metadata: Record<string, unknown>;
|
|
48
|
-
readonly sessionKey: string;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* One file written into a sandbox template before template state capture.
|
|
52
|
-
*/
|
|
53
|
-
export interface SandboxSeedFile {
|
|
54
|
-
readonly path: string;
|
|
55
|
-
readonly content: string | Buffer;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Diagnostic tags attached to provider-owned sandbox resources.
|
|
59
|
-
*
|
|
60
|
-
* Built-in backends may forward these into their hosting platform's
|
|
61
|
-
* native tagging system. eve supplies stable tags such as the active
|
|
62
|
-
* agent, channel, and session id so sandboxes can be found and
|
|
63
|
-
* attributed in provider dashboards.
|
|
64
|
-
*/
|
|
65
|
-
export type SandboxBackendTags = Readonly<Record<string, string>>;
|
|
66
|
-
/**
|
|
67
|
-
* Framework-owned runtime context handed to a backend on every
|
|
68
|
-
* {@link SandboxBackend.create} call.
|
|
69
|
-
*
|
|
70
|
-
* Backends use this to derive any per-call state that depends on the
|
|
71
|
-
* surrounding application. For example, the local backend computes its
|
|
72
|
-
* cache directory from `appRoot`. Backends that don't need anything
|
|
73
|
-
* here may ignore the field entirely.
|
|
74
|
-
*/
|
|
75
|
-
export interface SandboxBackendRuntimeContext {
|
|
76
|
-
readonly appRoot: string;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Input passed to {@link SandboxBackend.create} when the runtime needs a
|
|
80
|
-
* live sandbox session.
|
|
81
|
-
*/
|
|
82
|
-
export interface SandboxBackendCreateInput {
|
|
83
|
-
/**
|
|
84
|
-
* Reusable template key to open this session from. `null` means eve
|
|
85
|
-
* intentionally skipped template prewarm because the sandbox has no
|
|
86
|
-
* `bootstrap()` and no seed files, so the backend should create a
|
|
87
|
-
* fresh session from its default base runtime.
|
|
88
|
-
*/
|
|
89
|
-
readonly templateKey: string | null;
|
|
90
|
-
readonly sessionKey: string;
|
|
91
|
-
readonly existingMetadata?: Record<string, unknown>;
|
|
92
|
-
/**
|
|
93
|
-
* Runtime tags the backend should attach to sandbox resources when
|
|
94
|
-
* the underlying provider supports tags.
|
|
95
|
-
*/
|
|
96
|
-
readonly tags?: SandboxBackendTags;
|
|
97
|
-
readonly runtimeContext: SandboxBackendRuntimeContext;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Input passed to {@link SandboxBackend.prewarm} when the build pipeline
|
|
101
|
-
* is preparing reusable templates.
|
|
102
|
-
*
|
|
103
|
-
* Every authored sandbox in the compiled graph receives exactly one
|
|
104
|
-
* `prewarm(...)` call before runtime opens its first session. The
|
|
105
|
-
* backend captures reusable template state from the supplied
|
|
106
|
-
* `bootstrap` hook and `seedFiles`, then `backend.create(...)` opens
|
|
107
|
-
* durable sessions from that state.
|
|
108
|
-
*/
|
|
109
|
-
export interface SandboxBackendPrewarmInput<BO = Record<string, never>> {
|
|
110
|
-
readonly templateKey: string;
|
|
111
|
-
readonly bootstrap?: (input: SandboxBootstrapContext<BO>) => void | Promise<void>;
|
|
112
|
-
/**
|
|
113
|
-
* Optional progress logger for backend-specific prewarm phases.
|
|
114
|
-
*/
|
|
115
|
-
readonly log?: (message: string) => void;
|
|
116
|
-
readonly runtimeContext: SandboxBackendRuntimeContext;
|
|
117
|
-
readonly seedFiles: ReadonlyArray<SandboxSeedFile>;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Outcome of one {@link SandboxBackend.prewarm} call.
|
|
121
|
-
*
|
|
122
|
-
* The build pipeline uses this to report in the build logs whether a
|
|
123
|
-
* template state was reused from a prior deploy or captured fresh, so
|
|
124
|
-
* a cache hit is distinguishable from an expensive rebuild.
|
|
125
|
-
*/
|
|
126
|
-
export interface SandboxBackendPrewarmResult {
|
|
127
|
-
/**
|
|
128
|
-
* `true` when existing template state was reused without rebuilding it;
|
|
129
|
-
* `false` when the backend captured fresh template state.
|
|
130
|
-
*/
|
|
131
|
-
readonly reused: boolean;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Pluggable sandbox backend.
|
|
135
|
-
*
|
|
136
|
-
* A `SandboxBackend` is a value an author attaches to a
|
|
137
|
-
* {@link SandboxDefinition} to choose which underlying runtime hosts the
|
|
138
|
-
* sandbox. eve ships built-in backends (`docker()`,
|
|
139
|
-
* `justbash()`, `microsandbox()`,
|
|
140
|
-
* `vercel()`, and the availability-aware
|
|
141
|
-
* `defaultSandbox()`), but the interface is public so authors can write
|
|
142
|
-
* their own.
|
|
143
|
-
*
|
|
144
|
-
* A backend implements the full two-phase lifecycle:
|
|
145
|
-
* {@link SandboxBackend.prewarm} captures reusable template state at
|
|
146
|
-
* build time, and {@link SandboxBackend.create} starts or reattaches a
|
|
147
|
-
* live session from that template at runtime.
|
|
148
|
-
*/
|
|
149
|
-
export interface SandboxBackend<BO = Record<string, never>, SO = Record<string, never>> {
|
|
150
|
-
/**
|
|
151
|
-
* Stable identifier for this backend implementation.
|
|
152
|
-
*
|
|
153
|
-
* Participates in cache-key derivation and the persisted reconnect
|
|
154
|
-
* state, so two backends that should not share template state
|
|
155
|
-
* must use distinct names. Built-in backends use `"vercel"` and
|
|
156
|
-
* `"local"`. Custom backends pick a unique string.
|
|
157
|
-
*/
|
|
158
|
-
readonly name: string;
|
|
159
|
-
/**
|
|
160
|
-
* Creates or reattaches one live sandbox session from a template
|
|
161
|
-
* previously captured by {@link SandboxBackend.prewarm}. Throws
|
|
162
|
-
* {@link SandboxTemplateNotProvisionedError} when the requested
|
|
163
|
-
* template is missing.
|
|
164
|
-
*/
|
|
165
|
-
create(input: SandboxBackendCreateInput): Promise<SandboxBackendHandle<SO>>;
|
|
166
|
-
/**
|
|
167
|
-
* Build-time prewarm hook. eve invokes this for every authored
|
|
168
|
-
* sandbox in the compiled graph before serving traffic so the backend
|
|
169
|
-
* can capture reusable template state. Idempotent against existing state
|
|
170
|
-
* keyed by `templateKey`.
|
|
171
|
-
*
|
|
172
|
-
* Returns whether the state was reused from a prior run or captured
|
|
173
|
-
* fresh so the build pipeline can surface that in its logs.
|
|
174
|
-
*/
|
|
175
|
-
prewarm(input: SandboxBackendPrewarmInput<BO>): Promise<SandboxBackendPrewarmResult>;
|
|
176
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import type { SandboxSession } from "#shared/sandbox-session.js";
|
|
2
|
-
import type { SandboxBackend } from "#shared/sandbox-backend.js";
|
|
3
|
-
import type { SessionContext } from "#context/session-context.js";
|
|
4
|
-
/**
|
|
5
|
-
* Opens the template session inside a `bootstrap` hook. Optional `options`
|
|
6
|
-
* (typed by the backend's bootstrap-use options `BO`) are applied to the
|
|
7
|
-
* template before the snapshot is captured. Resolves to the
|
|
8
|
-
* {@link SandboxSession} to operate on.
|
|
9
|
-
*/
|
|
10
|
-
export type SandboxBootstrapUseFn<O = Record<string, never>> = (options?: O) => Promise<SandboxSession>;
|
|
11
|
-
/**
|
|
12
|
-
* Opens the live sandbox session inside an `onSession` hook. Optional
|
|
13
|
-
* `options` (typed by the backend's session-use options `SO`) are applied
|
|
14
|
-
* to the live session. Resolves to the {@link SandboxSession} for the
|
|
15
|
-
* current turn.
|
|
16
|
-
*/
|
|
17
|
-
export type SandboxSessionUseFn<O = Record<string, never>> = (options?: O) => Promise<SandboxSession>;
|
|
18
|
-
/**
|
|
19
|
-
* Argument passed to a sandbox `bootstrap` hook. `use(options?)` opens the
|
|
20
|
-
* template session that the snapshot is captured from; backend-specific
|
|
21
|
-
* `options` (typed by the backend's bootstrap-use options `BO`) are applied
|
|
22
|
-
* to that template.
|
|
23
|
-
*/
|
|
24
|
-
export interface SandboxBootstrapContext<O = Record<string, never>> {
|
|
25
|
-
readonly use: SandboxBootstrapUseFn<O>;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Argument passed to a sandbox `onSession` hook, invoked once per live
|
|
29
|
-
* session. `ctx` contains the active session metadata; sandbox access during
|
|
30
|
-
* initialization goes through `use(options?)`, which opens the live session
|
|
31
|
-
* and applies backend-specific `options` (typed by the backend's session-use
|
|
32
|
-
* options `SO`).
|
|
33
|
-
*/
|
|
34
|
-
export interface SandboxSessionContext<O = Record<string, never>> {
|
|
35
|
-
readonly ctx: Pick<SessionContext, "session">;
|
|
36
|
-
readonly use: SandboxSessionUseFn<O>;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Resolves a build-time revalidation key for a bootstrap snapshot. eve
|
|
40
|
-
* evaluates it during compile/build and freezes the result into compiled
|
|
41
|
-
* artifacts. Supply one only for external inputs that affect bootstrap
|
|
42
|
-
* output; authored source and managed seeds are tracked automatically.
|
|
43
|
-
*/
|
|
44
|
-
export type SandboxRevalidationKeyFn = () => Promise<string> | string;
|
|
45
|
-
/**
|
|
46
|
-
* Public sandbox definition authored in `agent/sandbox.ts` (shorthand)
|
|
47
|
-
* or `agent/sandbox/sandbox.ts` (folder layout, when paired with an
|
|
48
|
-
* authored `sandbox/workspace/` subtree).
|
|
49
|
-
*
|
|
50
|
-
* Each agent (and each subagent) owns exactly one sandbox. When the
|
|
51
|
-
* module file is absent the framework auto-provides a default sandbox
|
|
52
|
-
* via `defaultSandbox()`. Authors override lifecycle and backend by
|
|
53
|
-
* creating `agent/sandbox.ts` (or `agent/sandbox/sandbox.ts` when they
|
|
54
|
-
* also want a workspace folder); subagents override independently via
|
|
55
|
-
* `subagents/<name>/sandbox.ts` (or the folder form) and do not inherit
|
|
56
|
-
* their parent's sandbox (skill seeds differ per agent).
|
|
57
|
-
*/
|
|
58
|
-
interface SandboxDefinitionBase<BO = Record<string, never>, SO = Record<string, never>> {
|
|
59
|
-
/**
|
|
60
|
-
* Backend that runs this sandbox.
|
|
61
|
-
*
|
|
62
|
-
* Accepts either a {@link SandboxBackend} value or a zero-arg factory
|
|
63
|
-
* function that returns one. The factory form is invoked lazily on
|
|
64
|
-
* first framework access and the result is memoized for the lifetime
|
|
65
|
-
* of the process, so backend-internal state (such as the Vercel
|
|
66
|
-
* backend's prewarmed-template cache) is preserved across every call.
|
|
67
|
-
* Use the factory form to defer evaluation, for example when create
|
|
68
|
-
* options depend on environment variables that aren't set at module
|
|
69
|
-
* load time:
|
|
70
|
-
*
|
|
71
|
-
* ```ts
|
|
72
|
-
* defineSandbox({
|
|
73
|
-
* backend: () => vercel({ env: { TOKEN: process.env.TOKEN ?? "" } }),
|
|
74
|
-
* });
|
|
75
|
-
* ```
|
|
76
|
-
*
|
|
77
|
-
* When this field is omitted, eve substitutes `defaultSandbox()` at
|
|
78
|
-
* runtime, which picks the best available backend: `vercel()`
|
|
79
|
-
* on hosted Vercel (where `process.env.VERCEL` is set), then Docker,
|
|
80
|
-
* microsandbox, or just-bash
|
|
81
|
-
* everywhere else. Set `backend` explicitly to pin the sandbox to a
|
|
82
|
-
* specific backend regardless of environment.
|
|
83
|
-
*/
|
|
84
|
-
readonly backend: SandboxBackend<BO, SO> | (() => SandboxBackend<BO, SO>);
|
|
85
|
-
/** Human-readable description of this sandbox, surfaced in tooling. */
|
|
86
|
-
readonly description?: string;
|
|
87
|
-
/**
|
|
88
|
-
* Runs once per live session before authored steps use the sandbox.
|
|
89
|
-
* Call `input.use(options?)` to open the session and apply per-session
|
|
90
|
-
* backend options (typed by `SO`).
|
|
91
|
-
*/
|
|
92
|
-
onSession?(input: SandboxSessionContext<SO>): Promise<void> | void;
|
|
93
|
-
}
|
|
94
|
-
export interface SandboxDefinitionWithBootstrap<BO = Record<string, never>, SO = Record<string, never>> extends SandboxDefinitionBase<BO, SO> {
|
|
95
|
-
bootstrap(input: SandboxBootstrapContext<BO>): Promise<void> | void;
|
|
96
|
-
/**
|
|
97
|
-
* Optional build-time revalidation key for the reusable sandbox
|
|
98
|
-
* snapshot produced by {@link bootstrap}. eve evaluates this
|
|
99
|
-
* function during compile/build, stores the resolved string in
|
|
100
|
-
* compiled artifacts, and uses that frozen value for both prewarm and
|
|
101
|
-
* runtime session create. Authored sandbox source and
|
|
102
|
-
* framework-managed seed contents are included automatically; provide
|
|
103
|
-
* this key only for external inputs that affect bootstrap output.
|
|
104
|
-
*/
|
|
105
|
-
readonly revalidationKey?: SandboxRevalidationKeyFn;
|
|
106
|
-
}
|
|
107
|
-
export interface SandboxDefinitionWithoutBootstrap<BO = Record<string, never>, SO = Record<string, never>> extends SandboxDefinitionBase<BO, SO> {
|
|
108
|
-
bootstrap?: undefined;
|
|
109
|
-
readonly revalidationKey?: never;
|
|
110
|
-
}
|
|
111
|
-
export type SandboxDefinition<BO = Record<string, never>, SO = Record<string, never>> = SandboxDefinitionWithBootstrap<BO, SO> | SandboxDefinitionWithoutBootstrap<BO, SO>;
|
|
112
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type { HarnessSession, SessionStateMap } from "#harness/types.js";
|
|
2
|
-
import { type ActivityWorkIdentityV1 } from "#protocol/activity.js";
|
|
3
|
-
import type { TaskExecutorBinding } from "#tools/task.js";
|
|
4
|
-
import { type TaskMetadata, type TaskView } from "#tasks/types.js";
|
|
5
|
-
import { type DurableDynamicSubagentSelection, type SessionAuth } from "#context/keys.js";
|
|
6
|
-
/**
|
|
7
|
-
* Session-state key for the parent's live-task index.
|
|
8
|
-
*
|
|
9
|
-
* The parent session stores only this index; the mutable task record
|
|
10
|
-
* lives in the dedicated durable task run. The PR #1190 spike found the
|
|
11
|
-
* session-state boundary unworkable for task state itself: session state
|
|
12
|
-
* threads through step results, while callback routes and child
|
|
13
|
-
* executors must update tasks without holding the current snapshot.
|
|
14
|
-
*/
|
|
15
|
-
export { SESSION_TASKS_STATE_KEY } from "#tasks/session-task-cohorts.js";
|
|
16
|
-
/**
|
|
17
|
-
* One task owned by this session. Immutable model-safe metadata keeps the
|
|
18
|
-
* task-to-agent join available before the task run publishes its first view.
|
|
19
|
-
*
|
|
20
|
-
* `taskInboxToken` is the private routing credential for the task run's
|
|
21
|
-
* inbound hook. It must never render into model context, history, task
|
|
22
|
-
* views, or compaction summaries — the model addresses tasks by
|
|
23
|
-
* `taskId` only, and lookup verifies ownership through this index.
|
|
24
|
-
*/
|
|
25
|
-
export interface SessionTaskIndexEntry {
|
|
26
|
-
readonly activityWorkIdentity?: ActivityWorkIdentityV1;
|
|
27
|
-
readonly dispatchContext: SessionTaskDispatchContext;
|
|
28
|
-
readonly taskId: string;
|
|
29
|
-
readonly taskRunId: string;
|
|
30
|
-
/** Immutable fallback once the owning workflow run expires. */
|
|
31
|
-
readonly terminalView?: TaskView;
|
|
32
|
-
readonly taskInboxToken: string;
|
|
33
|
-
readonly createdByStepIndex?: number;
|
|
34
|
-
readonly createdByTurnId: string;
|
|
35
|
-
/** Immutable join target; absent on the task that starts a cohort. */
|
|
36
|
-
readonly cohortId?: string;
|
|
37
|
-
readonly executor?: TaskExecutorBinding;
|
|
38
|
-
readonly metadata: TaskMetadata;
|
|
39
|
-
}
|
|
40
|
-
export interface TaskAgentDispatchContext {
|
|
41
|
-
readonly auth: SessionAuth;
|
|
42
|
-
readonly sessionDynamicSubagentSelections?: Readonly<Record<string, DurableDynamicSubagentSelection>>;
|
|
43
|
-
readonly turnDynamicSubagentSelections?: Readonly<Record<string, DurableDynamicSubagentSelection>>;
|
|
44
|
-
}
|
|
45
|
-
export declare const LEGACY_TASK_AGENT_DISPATCH_CONTEXT: {
|
|
46
|
-
readonly legacy: true;
|
|
47
|
-
};
|
|
48
|
-
export type SessionTaskDispatchContext = TaskAgentDispatchContext | typeof LEGACY_TASK_AGENT_DISPATCH_CONTEXT;
|
|
49
|
-
/**
|
|
50
|
-
* Reads and validates the task index from session state.
|
|
51
|
-
*
|
|
52
|
-
* A present but invalid index throws: treating corruption as absence
|
|
53
|
-
* would silently orphan every live task's routing credential.
|
|
54
|
-
*/
|
|
55
|
-
export declare function getSessionTaskIndex(state: SessionStateMap | undefined): readonly SessionTaskIndexEntry[];
|
|
56
|
-
/** Caches one terminal view beside its task-run address. */
|
|
57
|
-
export declare function cacheTerminalTaskView(state: SessionStateMap | undefined, view: TaskView): SessionStateMap | undefined;
|
|
58
|
-
/** Finds one owned task; `undefined` enforces parent-session ownership. */
|
|
59
|
-
export declare function findSessionTaskEntry(state: SessionStateMap | undefined, taskId: string): SessionTaskIndexEntry | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* Joins the indexed cohort that still has unreported/nonterminal work. Cached
|
|
62
|
-
* terminal siblings remain members until the whole cohort settles. Membership
|
|
63
|
-
* and creation provenance survive replay, even after that cohort has settled.
|
|
64
|
-
*/
|
|
65
|
-
export declare function recordSessionTask(session: HarnessSession, entry: Omit<SessionTaskIndexEntry, "cohortId">): HarnessSession;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import"#context/keys.js";import{parseActivityWorkIdentityV1}from"#protocol/activity.js";import{SESSION_TASKS_STATE_KEY,SESSION_TASKS_STATE_KEY as SESSION_TASKS_STATE_KEY$1,SESSION_TASKS_STATE_VERSION,getTaskCohortId}from"#tasks/session-task-cohorts.js";import{sameTaskMetadata}from"#tasks/types.js";const taskMetadataSchema=z.looseObject({kind:z.string().min(1),name:z.string().min(1)}),LEGACY_TASK_AGENT_DISPATCH_CONTEXT={legacy:!0},sessionAuthContextSchema=z.strictObject({attributes:z.record(z.string(),z.union([z.string(),z.array(z.string()).readonly()])),authenticator:z.string(),issuer:z.string().optional(),principalId:z.string(),principalType:z.string(),subject:z.string().optional()}),dynamicSubagentSelectionsSchema=z.record(z.string(),z.custom()),taskAgentDispatchContextSchema=z.strictObject({auth:z.strictObject({current:sessionAuthContextSchema.nullable(),initiator:sessionAuthContextSchema.nullable()}),sessionDynamicSubagentSelections:dynamicSubagentSelectionsSchema.optional(),turnDynamicSubagentSelections:dynamicSubagentSelectionsSchema.optional()}),sessionTaskDispatchContextSchema=z.union([taskAgentDispatchContextSchema,z.strictObject({legacy:z.literal(!0)})]),taskViewBaseShape={inputRequests:z.never().optional(),executor:z.looseObject({binding:z.looseObject({data:z.record(z.string(),z.custom()),kind:z.string().min(1)}).optional()}).optional(),metadata:taskMetadataSchema,taskId:z.string().min(1),usage:z.looseObject({cacheReadTokens:z.number().nonnegative(),cacheWriteTokens:z.number().nonnegative(),costUsd:z.number().finite().nonnegative().optional(),inputTokens:z.number().nonnegative(),outputTokens:z.number().nonnegative()}).optional()},taskViewSchema=z.discriminatedUnion(`status`,[z.looseObject({...taskViewBaseShape,lastOutput:z.looseObject({data:z.custom(),type:z.literal(`result`)}),status:z.literal(`completed`)}),z.looseObject({...taskViewBaseShape,lastOutput:z.looseObject({data:z.custom(),type:z.literal(`error`)}),status:z.literal(`failed`)}),z.looseObject({...taskViewBaseShape,lastOutput:z.never().optional(),status:z.literal(`cancelled`)})]),storedSessionTaskIndexEntrySchema=z.looseObject({activityWorkIdentity:z.custom(e=>parseActivityWorkIdentityV1(e)!==void 0).optional(),taskInboxToken:z.string().min(1),createdByStepIndex:z.number().int().nonnegative().optional(),createdByTurnId:z.string().min(1),cohortId:z.string().min(1).optional(),dispatchContext:sessionTaskDispatchContextSchema.optional(),executor:z.looseObject({data:z.record(z.string(),z.custom()),kind:z.string().min(1)}).optional(),metadata:taskMetadataSchema,taskId:z.string().min(1),taskRunId:z.string().min(1),terminalView:taskViewSchema.optional()}),sessionTaskIndexSchema=z.looseObject({tasks:z.array(storedSessionTaskIndexEntrySchema),version:z.literal(SESSION_TASKS_STATE_VERSION)}).refine(e=>new Set(e.tasks.map(e=>e.taskId)).size===e.tasks.length,{message:`Task ids must be unique.`}).refine(e=>e.tasks.every(e=>e.terminalView===void 0||e.terminalView.taskId===e.taskId&&sameTaskMetadata(e.terminalView.metadata,e.metadata)),{message:`Cached terminal views must match their task index entry.`});function getSessionTaskIndex(e){return readSessionTaskIndex(e).tasks}function readSessionTaskIndex(e){let t=e?.[SESSION_TASKS_STATE_KEY$1];if(t===void 0)return{tasks:[],version:SESSION_TASKS_STATE_VERSION};let n=typeof t==`object`&&t?Reflect.get(t,`version`):void 0;if(n!==SESSION_TASKS_STATE_VERSION)throw Error(`Unsupported task index version ${JSON.stringify(n)} under session state key "${SESSION_TASKS_STATE_KEY$1}"; expected version ${SESSION_TASKS_STATE_VERSION}.`);let r=sessionTaskIndexSchema.safeParse(t);if(!r.success)throw Error(`Corrupt task index under session state key "${SESSION_TASKS_STATE_KEY$1}": ${r.error.message}`);return{...r.data,tasks:r.data.tasks.map(e=>({...e,dispatchContext:e.dispatchContext??LEGACY_TASK_AGENT_DISPATCH_CONTEXT}))}}function cacheTerminalTaskView(e,t){if(!isValidTerminalView(t))throw Error(`Cannot cache invalid terminal task "${t.taskId}".`);let n=readSessionTaskIndex(e),r=n.tasks,i=r.findIndex(e=>e.taskId===t.taskId);if(i<0)return e;if(!sameTaskMetadata(r[i].metadata,t.metadata))throw Error(`Task view metadata does not match index entry "${t.taskId}".`);let a=[...r],o=a[i].terminalView;return a[i]={...a[i],terminalView:taskViewSchema.parse({...o,...t,metadata:{...o?.metadata,...t.metadata},lastOutput:t.lastOutput===void 0?void 0:{...o?.lastOutput,...t.lastOutput},usage:t.usage===void 0?void 0:{...o?.usage,...t.usage},executor:t.executor===void 0?void 0:{...o?.executor,...t.executor,binding:t.executor.binding===void 0?void 0:{...o?.executor?.binding,...t.executor.binding}}})},{...e,[SESSION_TASKS_STATE_KEY$1]:{...n,tasks:a}}}function isValidTerminalView(e){if(e.inputRequests!==void 0)return!1;switch(e.status){case`completed`:return e.lastOutput?.type===`result`;case`failed`:return e.lastOutput?.type===`error`;case`cancelled`:return e.lastOutput===void 0;case`working`:return!1}}function findSessionTaskEntry(e,t){return getSessionTaskIndex(e).find(e=>e.taskId===t)}function recordSessionTask(e,t){let n=readSessionTaskIndex(e.state),r=[...n.tasks],i=r.findIndex(e=>e.taskId===t.taskId),a=r[i];if(a!==void 0)r[i]={...a,...t,metadata:{...a.metadata,...t.metadata},activityWorkIdentity:t.activityWorkIdentity===void 0?a.activityWorkIdentity:{...a.activityWorkIdentity,...t.activityWorkIdentity},executor:t.executor===void 0?a.executor:{...a.executor,...t.executor},cohortId:a.cohortId,createdByStepIndex:a.createdByStepIndex,createdByTurnId:a.createdByTurnId,dispatchContext:a.dispatchContext,terminalView:a.terminalView??t.terminalView};else{let e=r.find(e=>e.terminalView===void 0);r.push({...t,cohortId:e===void 0?void 0:getTaskCohortId(e)})}return{...e,state:{...e.state,[SESSION_TASKS_STATE_KEY$1]:{...n,tasks:r,version:SESSION_TASKS_STATE_VERSION}}}}export{LEGACY_TASK_AGENT_DISPATCH_CONTEXT,SESSION_TASKS_STATE_KEY,cacheTerminalTaskView,findSessionTaskEntry,getSessionTaskIndex,recordSessionTask};
|
package/dist/src/tools/task.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { BackgroundTask } from "#execution/tasks/parent/delegate.js";
|
|
2
|
-
import type { HarnessSession } from "#harness/types.js";
|
|
3
|
-
import type { JsonObject, JsonValue } from "#shared/json.js";
|
|
4
|
-
declare const TASK_MESSAGE_KIND: "eve:task-message";
|
|
5
|
-
export type TaskMessage = JsonObject & {
|
|
6
|
-
readonly kind: typeof TASK_MESSAGE_KIND;
|
|
7
|
-
readonly message: string;
|
|
8
|
-
};
|
|
9
|
-
export declare function createTaskMessage(message: string): TaskMessage;
|
|
10
|
-
export declare function isTaskMessage(value: unknown): value is TaskMessage;
|
|
11
|
-
/** Opaque, framework-private address used to control a task executor. */
|
|
12
|
-
export interface TaskExecutorBinding {
|
|
13
|
-
readonly kind: string;
|
|
14
|
-
readonly data: JsonObject;
|
|
15
|
-
}
|
|
16
|
-
/** @deprecated Use workflow-backed background tools with yield descriptors. */
|
|
17
|
-
export interface TaskBinding {
|
|
18
|
-
readonly taskId: string;
|
|
19
|
-
readonly token: string;
|
|
20
|
-
readonly url?: string;
|
|
21
|
-
}
|
|
22
|
-
/** @deprecated Use workflow-backed background tools with yield descriptors. */
|
|
23
|
-
export type TaskSendCommand = {
|
|
24
|
-
readonly kind: "update";
|
|
25
|
-
readonly message: string;
|
|
26
|
-
} | {
|
|
27
|
-
readonly kind: "complete";
|
|
28
|
-
readonly data: JsonValue;
|
|
29
|
-
} | {
|
|
30
|
-
readonly kind: "fail";
|
|
31
|
-
readonly data: JsonValue;
|
|
32
|
-
} | {
|
|
33
|
-
readonly kind: "cancel";
|
|
34
|
-
};
|
|
35
|
-
/** Fixed acknowledgement returned when a background task is admitted. */
|
|
36
|
-
export interface TaskReceipt {
|
|
37
|
-
readonly status: "working";
|
|
38
|
-
readonly taskId: string;
|
|
39
|
-
}
|
|
40
|
-
/** Capability passed only to tools declared with `execution: "background"`. */
|
|
41
|
-
export interface TaskExec {
|
|
42
|
-
/** Model-facing durable task identity. */
|
|
43
|
-
readonly taskId: string;
|
|
44
|
-
/** Returns a descriptor which sends one message to the parent when yielded. */
|
|
45
|
-
postMessage(message: string): TaskMessage;
|
|
46
|
-
/** @deprecated Use yields from a workflow-backed background tool. */
|
|
47
|
-
readonly binding: TaskBinding;
|
|
48
|
-
/** @deprecated Use yields from a workflow-backed background tool. */
|
|
49
|
-
readonly send: (command: TaskSendCommand) => Promise<void>;
|
|
50
|
-
/** @deprecated Use ctx.session. */
|
|
51
|
-
readonly session: HarnessSession;
|
|
52
|
-
/** @deprecated Framework-owned task internals are not part of the authoring API. */
|
|
53
|
-
readonly task: BackgroundTask;
|
|
54
|
-
}
|
|
55
|
-
export {};
|
package/dist/src/tools/task.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const TASK_MESSAGE_KIND=`eve:task-message`;function createTaskMessage(e){if(e.trim()===``)throw TypeError(`Task messages must not be empty.`);return{kind:TASK_MESSAGE_KIND,message:e}}function isTaskMessage(e){return typeof e==`object`&&!!e&&Reflect.get(e,`kind`)===TASK_MESSAGE_KIND}export{createTaskMessage,isTaskMessage};
|