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
package/docs/schedules.mdx
CHANGED
|
@@ -44,7 +44,7 @@ export default defineSchedule({
|
|
|
44
44
|
});
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
You can write the same thing as a plain `.md` file: its frontmatter takes `cron
|
|
47
|
+
You can write the same thing as a plain `.md` file: its frontmatter takes `cron`, and the body is the prompt.
|
|
48
48
|
|
|
49
49
|
`agent/schedules/cleanup.md`:
|
|
50
50
|
|
|
@@ -88,6 +88,40 @@ The `auth` option controls which principal the session runs as. A handler may in
|
|
|
88
88
|
|
|
89
89
|
A handler-form session runs on the same durable runtime engine as any other session, so it can park (durably suspend), for instance when the channel handoff is waiting for a Slack reply. Only markdown task mode is barred from waiting.
|
|
90
90
|
|
|
91
|
+
## Background task results
|
|
92
|
+
|
|
93
|
+
New sessions started by schedules default to `"cohort"`: background
|
|
94
|
+
outcomes wait for overlapping tasks to settle before waking the parent. To report
|
|
95
|
+
independently useful results as they arrive, pass `taskDeliveryPolicy: "auto"` to
|
|
96
|
+
`send(...)` inside a schedule handler:
|
|
97
|
+
|
|
98
|
+
```ts title="agent/schedules/digest.ts"
|
|
99
|
+
import { defineSchedule } from "eve/schedules";
|
|
100
|
+
import slack from "../channels/slack";
|
|
101
|
+
|
|
102
|
+
export default defineSchedule({
|
|
103
|
+
cron: "0 9 * * *",
|
|
104
|
+
run({ to, waitUntil, appAuth }) {
|
|
105
|
+
waitUntil(
|
|
106
|
+
to(slack, { channelId: "C0123ABC" }).send("Prepare the daily reports.", {
|
|
107
|
+
auth: appAuth,
|
|
108
|
+
taskDeliveryPolicy: "auto",
|
|
109
|
+
}),
|
|
110
|
+
);
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The option belongs to `send(...)`. Markdown schedules use the `"cohort"` default;
|
|
116
|
+
use a handler when you need to override it. Sending to an existing session preserves
|
|
117
|
+
its policy unless the send supplies an explicit value.
|
|
118
|
+
|
|
119
|
+
Under `"auto"`, a model call may finish silently while related work is pending.
|
|
120
|
+
Available results remain in the next reporting context so the parent can combine
|
|
121
|
+
previously withheld outputs later. A scheduled task-mode session stays alive while
|
|
122
|
+
it owns pending background tasks. See
|
|
123
|
+
[Background task results](./channels/overview#background-task-results).
|
|
124
|
+
|
|
91
125
|
## Session continuity
|
|
92
126
|
|
|
93
127
|
Markdown schedules start a new session on every fire. Handler schedules do too, unless they send to an existing conversation, such as a Slack thread. Store data that must survive across fires outside session state.
|
package/docs/subagents/index.mdx
CHANGED
|
@@ -3,17 +3,36 @@ title: "Subagents"
|
|
|
3
3
|
description: "Delegate work to root-agent copies or declared specialists with their own tools and sandbox."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Use a subagent to run independent work in parallel, narrow the available tools, or give a task to a specialist.
|
|
7
|
+
|
|
8
|
+
- Use the root-only [built-in `agent` tool](#the-built-in-agent-tool) to start or continue a copy of the root agent that shares its sandbox.
|
|
9
|
+
- Use a [declared local subagent](#declared-subagents) for a specialist with its own directory and authored capabilities, rather than inheriting the root's.
|
|
10
|
+
- Use a [remote agent](./guides/remote-agents) to delegate to a separately deployed eve agent, with its own configuration and authentication.
|
|
7
11
|
|
|
8
12
|
## Completion batching
|
|
9
13
|
|
|
10
14
|
Overlapping background work owned by a session forms a cohort. Tasks launched in
|
|
11
15
|
later user turns join the open cohort while earlier work is still pending or its
|
|
12
|
-
|
|
16
|
+
terminal results await delivery. With `taskDeliveryPolicy: "cohort"`, eve holds
|
|
17
|
+
completion, failure, and cancellation notifications
|
|
13
18
|
until every task in that cohort has completed, failed, or been cancelled, then
|
|
14
|
-
delivers
|
|
19
|
+
delivers all outcomes together in one parent turn. Partial settlements
|
|
15
20
|
do not invoke the parent model. Work started after the cohort settles forms a new
|
|
16
|
-
cohort.
|
|
21
|
+
cohort.
|
|
22
|
+
|
|
23
|
+
New channel sessions default to `"auto"`; schedules default to `"cohort"`.
|
|
24
|
+
Pass `taskDeliveryPolicy` to `send(...)` to select or update the session policy. See
|
|
25
|
+
[Background task results](/docs/channels/overview#background-task-results).
|
|
26
|
+
|
|
27
|
+
With `"auto"`, a terminal outcome can start a parent turn while other tasks are
|
|
28
|
+
still running. The parent reports independently useful results and stays silent
|
|
29
|
+
when a useful answer depends on unfinished tasks. Ready results may share a turn.
|
|
30
|
+
The reporting context includes the whole cohort and every available output,
|
|
31
|
+
including previously withheld results, for a later combined report.
|
|
32
|
+
|
|
33
|
+
The setting applies to background tools and built-in, declared, and remote
|
|
34
|
+
subagents owned by the session. Internal subagent sessions use `"cohort"` for
|
|
35
|
+
background work they start.
|
|
17
36
|
|
|
18
37
|
User messages, input requests, authorization events, failures, and cancellation
|
|
19
38
|
are handled without waiting for the cohort. Child lifecycle events are processed
|
|
@@ -197,7 +216,7 @@ A declared subagent inherits nothing from the root's authored slots. Discovery t
|
|
|
197
216
|
| Tools | Inherited except root-only | Own `tools/` |
|
|
198
217
|
| Connections | Inherited | Own `connections/` |
|
|
199
218
|
| Skills | Inherited | Own `skills/` |
|
|
200
|
-
| Sandbox |
|
|
219
|
+
| Sandbox | Reuses the parent sandbox | Own `sandbox/`, else framework default |
|
|
201
220
|
| Hooks | Inherited | Own `hooks/` |
|
|
202
221
|
| Extensions | Inherited contributions | Own `extensions/` |
|
|
203
222
|
| State | Fresh | Fresh |
|
|
@@ -206,7 +225,7 @@ A declared subagent inherits nothing from the root's authored slots. Discovery t
|
|
|
206
225
|
|
|
207
226
|
For a declared subagent this means authoring or mounting anything the child needs. When two subagents need the same procedure, package the skill in a [workspace extension](./extensions#use-an-extension-in-a-workspace) and mount that extension in each subagent. Share typed helpers through `lib/`. The sandbox does not inherit from the parent; eve selects the default sandbox source unless the subagent authors `subagents/<id>/sandbox.ts` or seeds files via `subagents/<id>/sandbox/workspace/`.
|
|
208
227
|
|
|
209
|
-
The root built-in `agent` tool is the exception. Its children
|
|
228
|
+
The root built-in `agent` tool is the exception. Its children reuse the root's sandbox and tools because they are copies of the same agent working on the same files.
|
|
210
229
|
|
|
211
230
|
`defineState` is never shared, for either kind. Each child starts with fresh durable state.
|
|
212
231
|
|
|
@@ -234,6 +253,8 @@ Do not rely on subagent delegation by itself as an approval boundary. Put sensit
|
|
|
234
253
|
|
|
235
254
|
Each delegated subagent spins up its own child session and stream. The parent stream carries the control-plane events `subagent.called` and `subagent.completed`, plus interactive `input.requested`, `authorization.required`, and `authorization.completed` events proxied from descendants so the root channel can prompt the user. To follow the child's other progress, read `subagent.called.data.childSessionId` and subscribe at `GET /eve/v1/session/:childSessionId/stream`.
|
|
236
255
|
|
|
256
|
+
Both blocking and background invocations emit `subagent.called` after dispatch and `subagent.completed` after the parent records successful completion. Completion carries the actual output and identifies the same invocation by `callId`; the child session can remain available for reuse. A background working receipt is returned as an `action.result` tool output and does not emit completion. Background completion events do not wait for the cohort report. Failure and cancellation are not successful completion; task notifications retain those outcomes.
|
|
257
|
+
|
|
237
258
|
Channels with activity reporting attribute the backing agent's tool activity to its background task. Local and remote subagents share the task's progress item rather than adding a separate agent item. Continuing or steering a child with `agentId` attaches its new activity to the new task; the previous task keeps its completed or cancelled status. This applies to the built-in `agent` and declared subagent tools, not to child invocations inside custom workflow tools. Activity reporting is best-effort and does not change task execution or result delivery.
|
|
238
259
|
|
|
239
260
|
A background task that was already admitted survives cancellation of the turn that started it; background work that has not yet been admitted is rejected with the cancelled step. Use `task_cancel` to stop an admitted task. Cancellation delivers the task's final notification to an active parent even if the task must be stopped forcibly. Parent-session finalization cancels remaining live tasks.
|
package/docs/subagents/meta.json
CHANGED
package/docs/tools/overview.mdx
CHANGED
|
@@ -121,33 +121,25 @@ receive only the projected text.
|
|
|
121
121
|
|
|
122
122
|
### Background execution
|
|
123
123
|
|
|
124
|
-
Background execution controls how a tool delivers its result to the parent agent.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
`{ status: "working", taskId }`; its eventual output belongs to the task. Use a background
|
|
138
|
-
workflow tool when the conversation should continue while the body waits for a person,
|
|
139
|
-
webhook, or timer. Setting `execution: "background"` on an ordinary tool does not move its
|
|
140
|
-
executor into a separate workflow or make an ordinary Promise a durable wait.
|
|
124
|
+
Background execution controls how a workflow tool delivers its result to the parent agent.
|
|
125
|
+
Set `execution: "background"` on `defineWorkflowTool`; ordinary `defineTool` calls always finish
|
|
126
|
+
inside the initiating step.
|
|
127
|
+
|
|
128
|
+
| Definition | Durable waits inside `execute` | Result delivered to the model |
|
|
129
|
+
| ------------------------------------------------ | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
130
|
+
| `defineTool` | No; the executor runs inside the initiating step. | Executor output after it finishes. |
|
|
131
|
+
| `defineWorkflowTool` | Yes; the tool call waits while the workflow can suspend. | Workflow output after it finishes. |
|
|
132
|
+
| `defineWorkflowTool` + `execution: "background"` | Yes; the workflow body can outlive the initiating step. | Task receipt before the body finishes; one combined report after all tasks in its cohort are terminal. |
|
|
133
|
+
|
|
134
|
+
A background workflow tool's result is the receipt `{ status: "working", taskId }`; its eventual
|
|
135
|
+
output belongs to the task. Use this mode when the conversation should continue while the body
|
|
136
|
+
waits for a person, webhook, or timer.
|
|
141
137
|
|
|
142
138
|
For background tools, `outputSchema` and `toModelOutput` describe the fixed receipt. The body's
|
|
143
139
|
return value is available through the completed task's output.
|
|
144
140
|
|
|
145
|
-
`task.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
`yield task.postMessage(message)` is the only yield that requests a parent-agent turn. Calling
|
|
149
|
-
`task.postMessage` only constructs the message descriptor; you must yield it to send it.
|
|
150
|
-
In a workflow body, keep values needed after a wait in local variables; workflow replay
|
|
141
|
+
The `TaskExec` argument and `task.postMessage` have been removed. Return the terminal result;
|
|
142
|
+
background yields are consumed without publishing progress or retaining a task-progress stream. In a workflow body, keep values needed after a wait in local variables; workflow replay
|
|
151
143
|
reconstructs them across durable waits.
|
|
152
144
|
Use [`ctx.ask`](/docs/tools/workflows#ask-a-human-ctxask) when the body needs an answer from the human.
|
|
153
145
|
Background tools are a normal execution mode and need no root-agent flag. Built-in, declared local,
|
|
@@ -157,11 +149,20 @@ After the initiating turn accepts background tasks, eve supplies runtime-authore
|
|
|
157
149
|
cohort and instructs the model to acknowledge that the work started without waiting for results.
|
|
158
150
|
[Schedule](/docs/schedules)-initiated turns are the exception: no user prompted them, so their
|
|
159
151
|
launches keep conditional delivery and send no acknowledgement.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
152
|
+
Channel sessions default to `taskDeliveryPolicy: "auto"`: ready results can invoke
|
|
153
|
+
the parent while other tasks continue. The parent reports independently useful
|
|
154
|
+
results and can stay silent until related work settles. Each reporting context
|
|
155
|
+
includes the whole cohort and available outputs, including previously withheld
|
|
156
|
+
results. Ready results may share a turn.
|
|
157
|
+
Schedules default to `"cohort"`: terminal outcomes wait for overlapping tasks
|
|
158
|
+
to settle, then arrive together. Pass `taskDeliveryPolicy` to `send(...)` to select
|
|
159
|
+
or update the session policy. See
|
|
160
|
+
[Background task results](/docs/channels/overview#background-task-results) and
|
|
161
|
+
[Schedules](/docs/schedules#background-task-results).
|
|
162
|
+
User questions, input requests, and explicit task messages do not wait for the
|
|
163
|
+
cohort under either policy. Failure and cancellation update lifecycle state
|
|
164
|
+
immediately; their automatic reports follow the selected policy.
|
|
165
|
+
See [Completion batching](/docs/subagents#completion-batching).
|
|
165
166
|
|
|
166
167
|
### Yield and return
|
|
167
168
|
|
|
@@ -169,19 +170,18 @@ combines successful results already queued for the parent.
|
|
|
169
170
|
It does not by itself create a durable wait for a person, timer, or external event. The value's
|
|
170
171
|
meaning depends on the tool's execution mode:
|
|
171
172
|
|
|
172
|
-
| Executor
|
|
173
|
-
|
|
|
174
|
-
| `defineTool`, default execution
|
|
175
|
-
| `defineWorkflowTool`, default execution
|
|
176
|
-
|
|
|
173
|
+
| Executor | Ordinary `yield value` | Final output |
|
|
174
|
+
| --------------------------------------------------- | --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
175
|
+
| `defineTool`, default execution | Earlier values are `action.partial` snapshots; the final yield becomes the tool result. | Last yielded value; a generator `return` value is ignored. |
|
|
176
|
+
| `defineWorkflowTool`, default execution | Every yield is an `action.partial` snapshot. | Explicit return value; falls back to the last yield if the return is `null` or `undefined`, then to `null`. |
|
|
177
|
+
| `defineWorkflowTool` with `execution: "background"` | Consumed without publishing progress or requesting a parent-agent turn. | Explicit return value becomes the task output; no return completes with `null`. The last yield is not a fallback. |
|
|
177
178
|
|
|
178
|
-
For
|
|
179
|
-
|
|
180
|
-
notifications are separate from the original tool call's receipt.
|
|
179
|
+
For a background workflow tool, return completes the task and throw fails it. The automatic
|
|
180
|
+
cohort report is separate from the original tool call's receipt.
|
|
181
181
|
|
|
182
182
|
Progress snapshots do not enter model history as intermediate tool results. For a default
|
|
183
183
|
executor, the final output selected by the rules above becomes the tool result. For a background
|
|
184
|
-
executor,
|
|
184
|
+
executor, the terminal cohort report provides input to a later parent-agent turn.
|
|
185
185
|
|
|
186
186
|
### Workflows as tools
|
|
187
187
|
|
package/docs/tools/workflows.mdx
CHANGED
|
@@ -178,8 +178,7 @@ agent should receive a tool result:
|
|
|
178
178
|
|
|
179
179
|
Use default execution when the model needs the answer to continue. Use background execution when
|
|
180
180
|
the conversation should continue while the task is pending. Background tools need no root-agent
|
|
181
|
-
flag.
|
|
182
|
-
inside the initiating step and cannot suspend at workflow waits. See the
|
|
181
|
+
flag. `defineTool` does not accept background execution. See the
|
|
183
182
|
[tool execution comparison](/docs/tools#background-execution).
|
|
184
183
|
|
|
185
184
|
### How suspension works
|
|
@@ -429,23 +428,23 @@ This pattern controls specialist selection, not whether the parent model delegat
|
|
|
429
428
|
|
|
430
429
|
## Report progress: `yield`
|
|
431
430
|
|
|
432
|
-
A workflow body may be an async generator.
|
|
433
|
-
|
|
431
|
+
A workflow body may be an async generator. In default execution, yields report progress.
|
|
432
|
+
Background execution consumes yielded values without publishing them or retaining a task-progress
|
|
433
|
+
stream. After processing a yield, eve advances the generator; use an awaited workflow operation
|
|
434
434
|
when the body needs to suspend.
|
|
435
435
|
|
|
436
|
-
| Operation
|
|
437
|
-
|
|
|
438
|
-
| `yield value`
|
|
439
|
-
| `
|
|
440
|
-
|
|
|
441
|
-
| No return value | Uses the last yield as output, or `null` if there were no yields. | Completes with `null`; yielded progress is not the task output. |
|
|
436
|
+
| Operation | Default execution | `execution: "background"` |
|
|
437
|
+
| --------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
438
|
+
| `yield value` | Emits an `action.partial` snapshot for the pending tool call. | Consumes the value without publishing progress or requesting a parent-agent turn. |
|
|
439
|
+
| `return value` | Settles the tool call with its output. | Completes the task and contributes to its cohort's terminal report. |
|
|
440
|
+
| No return value | Uses the last yield as output, or `null` if there were no yields. | Completes with `null`; yielded progress is not the task output. |
|
|
442
441
|
|
|
443
442
|
For default execution, an explicit `return null` also falls back to the last yield. Prefer an
|
|
444
443
|
explicit object return when progress snapshots and the final result have different shapes.
|
|
445
444
|
Progress snapshots are last-write-wins by tool call id and do not enter model history as
|
|
446
445
|
intermediate tool results. A snapshot used as the final output does enter history as the tool result.
|
|
447
446
|
|
|
448
|
-
This background workflow
|
|
447
|
+
This background workflow consumes an intermediate yield, then suspends until its timer expires:
|
|
449
448
|
|
|
450
449
|
```ts title="agent/tools/remind_with_progress.ts"
|
|
451
450
|
import { defineWorkflowTool } from "eve/tools";
|
|
@@ -453,25 +452,22 @@ import { sleep } from "workflow";
|
|
|
453
452
|
import { z } from "zod";
|
|
454
453
|
|
|
455
454
|
export default defineWorkflowTool({
|
|
456
|
-
description: "Schedule a reminder
|
|
455
|
+
description: "Schedule a reminder.",
|
|
457
456
|
inputSchema: z.object({ note: z.string(), delay: z.string() }),
|
|
458
457
|
execution: "background",
|
|
459
|
-
async *execute({ note, delay }
|
|
458
|
+
async *execute({ note, delay }) {
|
|
460
459
|
"use workflow";
|
|
461
|
-
yield { status: "preparing reminder" }; //
|
|
462
|
-
yield task.postMessage(`Reminder scheduled for ${delay}.`); // Parent-agent message.
|
|
460
|
+
yield { status: "preparing reminder" }; // Consumed without publishing progress in background mode.
|
|
463
461
|
await sleep(delay); // Durable suspension while the timer is pending.
|
|
464
462
|
return { reminder: note }; // Task completion notification.
|
|
465
463
|
},
|
|
466
464
|
});
|
|
467
465
|
```
|
|
468
466
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
reminder as the tool result. See [yield and return](/docs/tools#yield-and-return) for the different
|
|
474
|
-
final-output rules of ordinary `defineTool` generators.
|
|
467
|
+
Use [`ctx.ask`](#ask-a-human-ctxask) when the workflow needs a human answer. Removing
|
|
468
|
+
`execution: "background"` makes the yield visible as progress and keeps the durable sleep; the model
|
|
469
|
+
waits for the final reminder as the tool result. See [yield and return](/docs/tools#yield-and-return) for the
|
|
470
|
+
final-output rules.
|
|
475
471
|
|
|
476
472
|
## Cancel and clean up: `ctx.abortSignal`
|
|
477
473
|
|
|
@@ -497,6 +493,11 @@ as cancelled whether or not it did. A body parked on a hook or a `sleep` does no
|
|
|
497
493
|
it is abandoned when the grace period ends. Steps that received the signal are how you clean up
|
|
498
494
|
first.
|
|
499
495
|
|
|
496
|
+
The caller waits up to 35 seconds for a cooperatively cancelled run to settle before forcing it
|
|
497
|
+
to stop. This includes time for the run to publish its outcome after body cleanup. A background
|
|
498
|
+
task records its cancelled status before cleanup finishes, so that status alone does not mean
|
|
499
|
+
its work has stopped.
|
|
500
|
+
|
|
500
501
|
## Workflow tool examples
|
|
501
502
|
|
|
502
503
|
### Approve with a deadline and an escalation
|
|
@@ -607,8 +608,10 @@ it.
|
|
|
607
608
|
## Semantics
|
|
608
609
|
|
|
609
610
|
One call, one result. A waiting tool's call resolves once, with the return value, the error, or a
|
|
610
|
-
cancellation. A background tool's call resolves once, with the receipt
|
|
611
|
-
|
|
611
|
+
cancellation. A background tool's call resolves once, with the receipt. Its terminal outcome arrives
|
|
612
|
+
in one automatic report after every task in its cohort is terminal. A cohort includes overlapping
|
|
613
|
+
background work in the same session, including tasks launched in later user turns while earlier
|
|
614
|
+
work remains open.
|
|
612
615
|
|
|
613
616
|
While a waiting tool runs, the turn is parked. A `queue` message waits for it. A `steer` message
|
|
614
617
|
cancels the turn, which cancels the run, which withdraws its requests. Input responses never steer.
|
|
@@ -616,8 +619,12 @@ cancels the turn, which cancels the run, which withdraws its requests. Input res
|
|
|
616
619
|
Background runs belong to the session. They survive turn completion and cancellation, appear in the
|
|
617
620
|
session's task index, can be cancelled with `task_cancel`, and are cancelled when the session ends.
|
|
618
621
|
|
|
622
|
+
The parent session records each background task's outcome when it processes the child's notification.
|
|
623
|
+
The first terminal outcome it records is final: a late child result cannot replace a recorded
|
|
624
|
+
cancellation. Task completion does not require the wrapper workflow to have exited.
|
|
625
|
+
|
|
619
626
|
Errors follow the SDK. A thrown error in a step retries per the step's policy; `FatalError` does
|
|
620
|
-
not. An error that escapes the body fails the
|
|
627
|
+
not. An error that escapes the body fails the tool invocation.
|
|
621
628
|
|
|
622
629
|
Starting a waiting workflow tool can also be retried. If dispatch is interrupted after starting a
|
|
623
630
|
run, its retry starts another run, and both may execute. The parent tracks the run returned by the
|
|
@@ -34,11 +34,10 @@ Python needs a sandbox that runs real binaries. For local development, start a D
|
|
|
34
34
|
The default eve images for Docker, microsandbox, and Vercel Sandbox include Python, but not matplotlib. Add this definition alongside `workspace/` to install matplotlib in a virtual environment. It uses the same environment for installation and chart execution, without changing the system Python:
|
|
35
35
|
|
|
36
36
|
```ts title="agent/sandbox/sandbox.ts"
|
|
37
|
-
import { defineSandbox } from "eve/sandbox";
|
|
37
|
+
import { DefaultSandbox, defineSandbox } from "eve/sandbox";
|
|
38
38
|
|
|
39
|
-
export
|
|
40
|
-
async
|
|
41
|
-
const sandbox = await use();
|
|
39
|
+
export const environment = DefaultSandbox.environment({
|
|
40
|
+
prepare: async (sandbox) => {
|
|
42
41
|
const commands = [
|
|
43
42
|
"sudo apt-get update && sudo apt-get install -y python3 python3-venv",
|
|
44
43
|
"python3 -m venv /workspace/.venv",
|
|
@@ -55,9 +54,11 @@ export default defineSandbox({
|
|
|
55
54
|
}
|
|
56
55
|
},
|
|
57
56
|
});
|
|
57
|
+
|
|
58
|
+
export default defineSandbox(() => environment.open());
|
|
58
59
|
```
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
Preparation runs when eve builds the sandbox template, and sessions inherit the installed environment. The first build needs network access to Ubuntu package repositories and PyPI. Keep the default network policy while following this example; a custom `deny-all` or allow-list policy must permit these downloads during preparation. The same definition uses Vercel Sandbox after deployment to Vercel.
|
|
61
62
|
|
|
62
63
|
Restart `npm run dev` after adding the definition. Before asking for a chart, send this message in the TUI:
|
|
63
64
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.64.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
|
|
6
6
|
"keywords": [
|
|
@@ -256,6 +256,11 @@
|
|
|
256
256
|
"import": "./dist/src/public/sandbox/index.js",
|
|
257
257
|
"default": "./dist/src/public/sandbox/index.js"
|
|
258
258
|
},
|
|
259
|
+
"./sandbox/provider": {
|
|
260
|
+
"types": "./dist/src/public/sandbox/provider.d.ts",
|
|
261
|
+
"import": "./dist/src/public/sandbox/provider.js",
|
|
262
|
+
"default": "./dist/src/public/sandbox/provider.js"
|
|
263
|
+
},
|
|
259
264
|
"./sandbox/docker": {
|
|
260
265
|
"types": "./dist/src/public/sandbox/docker.d.ts",
|
|
261
266
|
"import": "./dist/src/public/sandbox/docker.js",
|
|
@@ -471,9 +476,9 @@
|
|
|
471
476
|
"@ai-sdk/otel": "^1.0.93",
|
|
472
477
|
"@ai-sdk/provider": "^4.0.10",
|
|
473
478
|
"@ai-sdk/provider-utils": "^5.0.36",
|
|
474
|
-
"@chat-adapter/slack": "4.
|
|
475
|
-
"@chat-adapter/state-memory": "4.
|
|
476
|
-
"@chat-adapter/twilio": "4.
|
|
479
|
+
"@chat-adapter/slack": "4.41.0",
|
|
480
|
+
"@chat-adapter/state-memory": "4.41.0",
|
|
481
|
+
"@chat-adapter/twilio": "4.41.0",
|
|
477
482
|
"@clack/core": "1.3.1",
|
|
478
483
|
"@eve/catalog": "0.0.1",
|
|
479
484
|
"@linqapp/chat-sdk-adapter": "^0.5.1",
|
|
@@ -496,16 +501,16 @@
|
|
|
496
501
|
"@vercel/otel": "2.1.3",
|
|
497
502
|
"@vercel/sandbox": "3.3.0",
|
|
498
503
|
"@vercel/sdk": "1.28.8",
|
|
499
|
-
"@workflow/builders": "5.0.0-beta.
|
|
500
|
-
"@workflow/core": "5.0.0-beta.
|
|
501
|
-
"@workflow/errors": "5.0.0-beta.
|
|
504
|
+
"@workflow/builders": "5.0.0-beta.55",
|
|
505
|
+
"@workflow/core": "5.0.0-beta.55",
|
|
506
|
+
"@workflow/errors": "5.0.0-beta.22",
|
|
502
507
|
"@workflow/serde": "5.0.0-beta.2",
|
|
503
508
|
"@workflow/utils": "5.0.0-beta.10",
|
|
504
|
-
"@workflow/world": "5.0.0-beta.
|
|
505
|
-
"@workflow/world-local": "5.0.0-beta.
|
|
506
|
-
"@workflow/world-vercel": "5.0.0-beta.
|
|
509
|
+
"@workflow/world": "5.0.0-beta.37",
|
|
510
|
+
"@workflow/world-local": "5.0.0-beta.46",
|
|
511
|
+
"@workflow/world-vercel": "5.0.0-beta.50",
|
|
507
512
|
"ai": "^7.0.105",
|
|
508
|
-
"chat": "4.
|
|
513
|
+
"chat": "4.41.0",
|
|
509
514
|
"chokidar": "5.0.0",
|
|
510
515
|
"commander": "14.0.3",
|
|
511
516
|
"dd-trace": "6.13.0",
|
|
@@ -539,6 +544,7 @@
|
|
|
539
544
|
"@opentelemetry/api": "^1.0.0",
|
|
540
545
|
"ai": "^7.0.105",
|
|
541
546
|
"braintrust": "^3.0.0",
|
|
547
|
+
"chat": "^4.41.0",
|
|
542
548
|
"dd-trace": "^6.13.0",
|
|
543
549
|
"just-bash": "^3.1.0",
|
|
544
550
|
"microsandbox": "^0.5.0"
|
|
@@ -550,6 +556,9 @@
|
|
|
550
556
|
"braintrust": {
|
|
551
557
|
"optional": true
|
|
552
558
|
},
|
|
559
|
+
"chat": {
|
|
560
|
+
"optional": true
|
|
561
|
+
},
|
|
553
562
|
"dd-trace": {
|
|
554
563
|
"optional": true
|
|
555
564
|
},
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { type ReasoningLevel } from "#setup/boxes/model-capabilities.js";
|
|
2
|
-
import type { GatewayModelCapabilities } from "#setup/boxes/model-capabilities.js";
|
|
3
|
-
import { type SelectState } from "#setup/cli/select-state.js";
|
|
4
|
-
import type { ModelSettingsRequest, ModelSettingsResult } from "#setup/flows/model.js";
|
|
5
|
-
import type { SelectOption } from "#setup/prompter.js";
|
|
6
|
-
/** The Change-model menu's rows, in visual order. */
|
|
7
|
-
export type ModelEditorRowId = "model" | "reasoning" | "tier" | "done";
|
|
8
|
-
/**
|
|
9
|
-
* The screen stack, depth two: the value menu, or the model list it opens.
|
|
10
|
-
* Reasoning and tier adjust inline on their menu rows — only the catalog pick
|
|
11
|
-
* warrants its own screen. The list carries scratch select state seeded when
|
|
12
|
-
* opened; Esc drops it, so "returns unchanged" is structural.
|
|
13
|
-
*/
|
|
14
|
-
export type ModelEditorScreen = {
|
|
15
|
-
kind: "menu";
|
|
16
|
-
cursor: ModelEditorRowId;
|
|
17
|
-
} | {
|
|
18
|
-
kind: "model";
|
|
19
|
-
select: SelectState;
|
|
20
|
-
};
|
|
21
|
-
/** The in-progress values; a completed selection is applied immediately. */
|
|
22
|
-
export interface ModelEditorDraft {
|
|
23
|
-
modelId: string | null;
|
|
24
|
-
reasoning: "default" | ReasoningLevel;
|
|
25
|
-
tier: "standard" | "priority";
|
|
26
|
-
}
|
|
27
|
-
/** One Change-model interaction, advanced by {@link transitionModelEditor}. */
|
|
28
|
-
export interface ModelEditorState {
|
|
29
|
-
screen: ModelEditorScreen;
|
|
30
|
-
draft: ModelEditorDraft;
|
|
31
|
-
/** Catalog capabilities for `draft.modelId`; recomputed on every pick. */
|
|
32
|
-
capabilities: GatewayModelCapabilities | undefined;
|
|
33
|
-
}
|
|
34
|
-
/** Semantic input after terminal-key decoding. */
|
|
35
|
-
export type ModelEditorEvent = {
|
|
36
|
-
type: "move";
|
|
37
|
-
direction: "up" | "down";
|
|
38
|
-
} | {
|
|
39
|
-
type: "adjust";
|
|
40
|
-
direction: "left" | "right";
|
|
41
|
-
} | {
|
|
42
|
-
type: "char";
|
|
43
|
-
char: string;
|
|
44
|
-
} | {
|
|
45
|
-
type: "backspace";
|
|
46
|
-
} | {
|
|
47
|
-
type: "cancel";
|
|
48
|
-
} | {
|
|
49
|
-
type: "submit";
|
|
50
|
-
};
|
|
51
|
-
export type ModelEditorTransition = {
|
|
52
|
-
kind: "ignore";
|
|
53
|
-
state: ModelEditorState;
|
|
54
|
-
} | {
|
|
55
|
-
kind: "render";
|
|
56
|
-
state: ModelEditorState;
|
|
57
|
-
} | {
|
|
58
|
-
kind: "cancel";
|
|
59
|
-
} | {
|
|
60
|
-
kind: "settle";
|
|
61
|
-
result: ModelSettingsResult;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* How a value row presents: an adjustable control, a dim explanatory line the
|
|
65
|
-
* cursor skips, or nothing at all — a control that cannot apply to the
|
|
66
|
-
* drafted model (no priority tier) is noise, while an authored-but-unowned
|
|
67
|
-
* state (custom tier, external provider) still explains itself.
|
|
68
|
-
*/
|
|
69
|
-
export type ModelEditorSectionView = {
|
|
70
|
-
kind: "interactive";
|
|
71
|
-
} | {
|
|
72
|
-
kind: "static";
|
|
73
|
-
text: string;
|
|
74
|
-
} | {
|
|
75
|
-
kind: "hidden";
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* The reasoning row stays interactive while a level is drafted even when the
|
|
79
|
-
* catalog disowns reasoning, so the authored value at least stays visible.
|
|
80
|
-
*/
|
|
81
|
-
export declare function reasoningSectionView(request: ModelSettingsRequest, draft: ModelEditorDraft, capabilities: GatewayModelCapabilities | undefined): ModelEditorSectionView;
|
|
82
|
-
/** The tier row's presentation; static or hidden for every state it cannot own. */
|
|
83
|
-
export declare function tierSectionView(request: ModelSettingsRequest, capabilities: GatewayModelCapabilities | undefined): ModelEditorSectionView;
|
|
84
|
-
/**
|
|
85
|
-
* The track's notch positions: the levels the catalog supports (every level
|
|
86
|
-
* when capabilities are unknown). The provider default is not a notch — an
|
|
87
|
-
* unset draft renders an empty track and the first right-adjust enters the
|
|
88
|
-
* scale at the lowest level. A drafted level the catalog does not list is
|
|
89
|
-
* inserted in canonical level order, so the track never hides the value it
|
|
90
|
-
* is about to replace.
|
|
91
|
-
*/
|
|
92
|
-
export declare function reasoningPositions(capabilities: GatewayModelCapabilities | undefined, drafted: "default" | ReasoningLevel): readonly ReasoningLevel[];
|
|
93
|
-
/**
|
|
94
|
-
* The value menu's rows, derived fresh from the draft on every transition and
|
|
95
|
-
* paint: interactive sections are pickable rows, static sections are disabled
|
|
96
|
-
* rows carrying their explanation, and a hidden tier is omitted entirely.
|
|
97
|
-
* Value hints are the painter's job — it styles them with theme glyphs.
|
|
98
|
-
*/
|
|
99
|
-
export declare function modelEditorMenuRows(request: ModelSettingsRequest, draft: ModelEditorDraft, capabilities: GatewayModelCapabilities | undefined): SelectOption<ModelEditorRowId>[];
|
|
100
|
-
/** Creates the screen's state; the cursor opens on the first pickable row. */
|
|
101
|
-
export declare function initialModelEditorState(request: ModelSettingsRequest): ModelEditorState;
|
|
102
|
-
/** Applies one keypress worth of semantics; terminal resources stay in the renderer. */
|
|
103
|
-
export declare function transitionModelEditor(state: ModelEditorState, event: ModelEditorEvent, request: ModelSettingsRequest): ModelEditorTransition;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ALL_REASONING_LEVELS}from"#setup/boxes/model-capabilities.js";import{filterOptions,initialSelectState,reduceSelect,selectValueAtCursor}from"#setup/cli/select-state.js";const NOT_EDITABLE_TEXT=`No editable agent.ts config object is available`;function reasoningSectionView(e,t,n){return e.settingsEditable?n?.reasoning===!1&&t.reasoning==="default"?{kind:`static`,text:`Not supported by the selected model`}:{kind:`interactive`}:{kind:`static`,text:NOT_EDITABLE_TEXT}}function tierSectionView(e,t){return e.settingsEditable?e.externalRouting?{kind:`static`,text:`Disabled for a direct external provider`}:e.serviceTier.kind===`custom`?{kind:`static`,text:`Custom (${e.serviceTier.value}) — authored in agent.ts`}:t!==void 0&&!t.fastMode?{kind:`hidden`}:{kind:`interactive`}:{kind:`static`,text:NOT_EDITABLE_TEXT}}function reasoningPositions(e,t){let n=[...e===void 0?ALL_REASONING_LEVELS:e.reasoningLevels];if(t!=="default"&&!n.includes(t)){let e=ALL_REASONING_LEVELS.indexOf(t),r=n.findIndex(t=>ALL_REASONING_LEVELS.indexOf(t)>e);r===-1?n.push(t):n.splice(r,0,t)}return n}function snapReasoningToCapabilities(e,t){if(e==="default"||t===void 0)return e;let n=t.reasoningLevels;if(!t.reasoning||n.length===0)return`default`;if(n.includes(e))return e;let r=ALL_REASONING_LEVELS.indexOf(e),i=n[0];for(let e of n)Math.abs(ALL_REASONING_LEVELS.indexOf(e)-r)<Math.abs(ALL_REASONING_LEVELS.indexOf(i)-r)&&(i=e);return i}function modelEditorMenuRows(e,t,n){let r=[];e.model.kind===`pick`?r.push({value:`model`,label:`Model`}):r.push({value:`model`,label:`Model`,disabled:!0,description:e.model.reason});let i=reasoningSectionView(e,t,n);i.kind===`static`?r.push({value:`reasoning`,label:`Reasoning effort`,disabled:!0,description:i.text}):r.push({value:`reasoning`,label:`Reasoning effort`});let a=tierSectionView(e,n);return a.kind===`interactive`?r.push({value:`tier`,label:`Service tier`}):a.kind===`static`&&r.push({value:`tier`,label:`Service tier`,disabled:!0,description:a.text}),r}function initialModelEditorState(e){let t={modelId:e.model.current,reasoning:e.reasoning??`default`,tier:e.serviceTier.kind===`priority`?`priority`:`standard`},n=e.capabilitiesFor(t.modelId);return{screen:{kind:`menu`,cursor:modelEditorMenuRows(e,t,n).find(e=>e.disabled!==!0)?.value??`done`},draft:t,capabilities:n}}function expandedModelSelect(e,t){let n={options:e.model.kind===`pick`?e.model.options:[]};return t!==null&&(n.defaultValue=t),initialSelectState(n)}function ignore(e){return{kind:`ignore`,state:e}}function toMenu(e,t){return{kind:`render`,state:{...e,screen:{kind:`menu`,cursor:t}}}}function settleResult(e,t){let n={};if(e.model.kind===`pick`&&t.modelId!==null&&t.modelId!==e.model.current&&(n.model=t.modelId),!e.settingsEditable)return n;t.reasoning!==(e.reasoning??`default`)&&(n.reasoning=t.reasoning);let r=!e.externalRouting&&e.serviceTier.kind!==`custom`,i=e.serviceTier.kind===`priority`?`priority`:`standard`;return r&&t.tier!==i&&(n.serviceTier=t.tier),n}function adjustMenuValue(e,t,n,r){let i=r===`left`?-1:1;if(n===`reasoning`){if(reasoningSectionView(t,e.draft,e.capabilities).kind!==`interactive`)return ignore(e);let n=reasoningPositions(e.capabilities,e.draft.reasoning);if(n.length===0)return ignore(e);let r=e.draft.reasoning==="default"?-1:n.indexOf(e.draft.reasoning),a=r===-1?n[i===1?0:n.length-1]:n[(r+i+n.length)%n.length];return a===e.draft.reasoning?ignore(e):{kind:`render`,state:{...e,draft:{...e.draft,reasoning:a}}}}if(n===`tier`){if(tierSectionView(t,e.capabilities).kind!==`interactive`)return ignore(e);let n=e.draft.tier===`priority`?`standard`:`priority`;return{kind:`render`,state:{...e,draft:{...e.draft,tier:n}}}}return ignore(e)}function transitionMenu(e,t,n,r){let i=modelEditorMenuRows(n,e.draft,e.capabilities);switch(t.type){case`cancel`:return{kind:`cancel`};case`move`:{let n=Math.max(0,i.findIndex(e=>e.value===r)),a=i[reduceSelect({filter:``,cursor:n,selected:new Set},{type:t.direction},{options:i}).cursor]?.value;return a===void 0||a===r?ignore(e):toMenu(e,a)}case`adjust`:return adjustMenuValue(e,n,r,t.direction);case`submit`:{let t=i.find(e=>e.value===r);return t===void 0||t.disabled===!0?ignore(e):r===`model`?{kind:`render`,state:{...e,screen:{kind:`model`,select:expandedModelSelect(n,e.draft.modelId)}}}:{kind:`settle`,result:settleResult(n,e.draft)}}case`char`:case`backspace`:return ignore(e)}}function transitionModelScreen(e,t,n,r){let i=n.model.kind===`pick`?n.model.options:[],renderSelect=t=>t===r?ignore(e):{kind:`render`,state:{...e,screen:{kind:`model`,select:t}}};switch(t.type){case`cancel`:return r.filter.length>0?renderSelect(reduceSelect(r,{type:`clear`},{options:i})):toMenu(e,`model`);case`move`:return renderSelect(reduceSelect(r,{type:t.direction},{options:i}));case`char`:return renderSelect(reduceSelect(r,{type:`char`,char:t.char},{options:i}));case`backspace`:return renderSelect(reduceSelect(r,{type:`backspace`},{options:i}));case`submit`:{let t=filterOptions(i,r.filter),a=selectValueAtCursor(t,r.cursor);if(a===void 0)return ignore(e);let o=n.capabilitiesFor(a);return{kind:`settle`,result:settleResult(n,{...e.draft,modelId:a,reasoning:snapReasoningToCapabilities(e.draft.reasoning,o),tier:o!==void 0&&!o.fastMode?`standard`:e.draft.tier})}}case`adjust`:return ignore(e)}}function transitionModelEditor(e,t,n){switch(e.screen.kind){case`menu`:return transitionMenu(e,t,n,e.screen.cursor);case`model`:return transitionModelScreen(e,t,n,e.screen.select)}}export{initialModelEditorState,modelEditorMenuRows,reasoningPositions,reasoningSectionView,tierSectionView,transitionModelEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=class extends Error{body;status;constructor(e,t){super(e),this.name=`TwilioApiError`,this.body=t.body,this.status=t.status}},t=`https://api.twilio.com`;async function n(t,n){let r=t??process.env[n];if(!r)throw new e(`${n} is required`,{body:null,status:0});return typeof r==`function`?await r():r}async function r(r,i={}){let a=typeof r==`string`?{...i,path:r}:r,o=await n(a.credentials?.accountSid,`TWILIO_ACCOUNT_SID`),s=await n(a.credentials?.authToken,`TWILIO_AUTH_TOKEN`),c=new URL(a.path,a.apiUrl??a.apiBaseUrl??t);for(let[e,t]of d(a.search)??[])c.searchParams.append(e,t);let l=d(a.body),u=await(a.fetch??fetch)(c,{body:l,headers:{authorization:f(o,s),...l?{"content-type":`application/x-www-form-urlencoded;charset=UTF-8`}:{}},method:a.method??`POST`}),p=await m(u);if(!u.ok)throw new e(`Twilio API returned HTTP ${u.status}`,{body:p,status:u.status});return{body:p,ok:u.ok,status:u.status}}async function i(e){let t=await n(e.credentials?.accountSid,`TWILIO_ACCOUNT_SID`),i=p(e.mediaUrl);if(!e.body&&i.length===0)throw TypeError(`body or mediaUrl is required`);if(!(e.from||e.messagingServiceSid))throw TypeError(`from or messagingServiceSid is required`);let a=u({Body:e.body,From:e.from,MediaUrl:i,MessagingServiceSid:e.messagingServiceSid,StatusCallback:e.statusCallbackUrl,To:e.to});return(await r(`/2010-04-01/Accounts/${encodeURIComponent(t)}/Messages.json`,{...e,body:a})).body}async function a(e){let t=await n(e.credentials?.accountSid,`TWILIO_ACCOUNT_SID`);return(await r(`/2010-04-01/Accounts/${encodeURIComponent(t)}/Messages/${encodeURIComponent(e.messageSid)}.json`,{...e,method:`GET`})).body}async function o(e){let t=await n(e.credentials?.accountSid,`TWILIO_ACCOUNT_SID`);await r(`/2010-04-01/Accounts/${encodeURIComponent(t)}/Messages/${encodeURIComponent(e.messageSid)}.json`,{...e,method:`DELETE`})}async function s(e){let t=await n(e.credentials?.accountSid,`TWILIO_ACCOUNT_SID`);if(!(e.twiml||e.url||e.status))throw TypeError(`twiml, url, or status is required`);if(e.twiml&&e.url)throw TypeError(`twiml and url are mutually exclusive`);let i=u({Method:e.method,Status:e.status,Twiml:e.twiml,Url:e.url});return(await r(`/2010-04-01/Accounts/${encodeURIComponent(t)}/Calls/${encodeURIComponent(e.callSid)}.json`,{...e,body:i})).body}async function c(t){let r=await n(t.credentials?.accountSid,`TWILIO_ACCOUNT_SID`),i=await n(t.credentials?.authToken,`TWILIO_AUTH_TOKEN`),a=await(t.fetch??fetch)(t.url,{headers:{authorization:f(r,i)},method:`GET`});if(!a.ok)throw new e(`Twilio API returned HTTP ${a.status}`,{body:await m(a),status:a.status});return a.arrayBuffer()}async function l(e={}){let t=await n(e.credentials?.accountSid,`TWILIO_ACCOUNT_SID`),i=u({From:e.from,PageSize:e.pageSize,To:e.to});return((await r(`/2010-04-01/Accounts/${encodeURIComponent(t)}/Messages.json`,{...e,method:`GET`,search:i})).body.messages??[]).slice(0,e.limit)}function u(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(r!=null){if(Array.isArray(r)){for(let e of r)t.append(n,e);continue}t.set(n,String(r))}return t}function d(e){if(e!==void 0)return e instanceof URLSearchParams?e:u(e)}function f(e,t){return`Basic ${btoa(`${e}:${t}`)}`}function p(e){return e===void 0?[]:typeof e==`string`?[e]:[...e]}async function m(e){let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch{return t}}export{c as a,n as c,u as i,i as l,r as n,a as o,o as r,l as s,e as t,s as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=/[<>|]/,t=/[\^|>]/,n=/^[A-Z0-9_]+$/,r=/(?<![<\w])@([A-Z][A-Z0-9_]+)/g,i=3e3;function a(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function o(e){return e.replace(/</g,`<`).replace(/>/g,`>`).replace(/&/g,`&`)}function s(e,t={}){return v(e),{...t.emoji===void 0?{}:{emoji:t.emoji},text:e,type:`plain_text`}}function c(e,t={}){return v(e),{text:e,type:`mrkdwn`,...t.verbatim===void 0?{}:{verbatim:t.verbatim}}}function l(e){return y(e,`userId`),`<@${e}>`}function u(e){return y(e,`channelId`),`<#${e}>`}function d(e){return y(e,`userGroupId`),`<!subteam^${e}>`}function f(e){return`<!${e}>`}function p(e,t){return b(e,`url`),t?`<${e}|${a(t)}>`:`<${e}>`}function m(e,t,n,r={}){x(t,`token`);let i=e instanceof Date?Math.floor(e.getTime()/1e3):e;if(!Number.isInteger(i))throw TypeError(`timestamp must be an integer unix timestamp or Date`);return`<!date^${i}^${t}${r.link?`^${S(r.link)}`:``}|${a(n)}>`}function h(e){let t=e;return t=t.replace(/<@([A-Z0-9_]+)\|([^<>]+)>/g,`@$2`),t=t.replace(/<@([A-Z0-9_]+)>/g,`@$1`),t=t.replace(/<#[A-Z0-9_]+\|([^<>]+)>/g,`#$1`),t=t.replace(/<#([A-Z0-9_]+)>/g,`#$1`),t=t.replace(/<(https?:\/\/[^|<>]+)\|([^<>]+)>/g,`[$2]($1)`),t=t.replace(/<(https?:\/\/[^<>]+)>/g,`$1`),t=t.replace(/(?<![_*\\])\*([^*\n]+)\*(?![_*])/g,`**$1**`),t=t.replace(/(?<!~)~([^~\n]+)~(?!~)/g,`~~$1~~`),o(t)}function g(e){return e.replace(/\*\*(.+?)\*\*/g,`*$1*`)}function _(e){return e.replace(r,`<@$1>`)}function v(e){if(e.length<1||e.length>i)throw TypeError(`text must be between 1 and ${i} characters`)}function y(e,t){if(!n.test(e))throw TypeError(`${t} must be a Slack ID`)}function b(t,n){if(e.test(t))throw TypeError(`${n} cannot contain Slack control characters`)}function x(e,n){if(t.test(e))throw TypeError(`${n} cannot contain Slack date control characters`)}function S(e){return x(e,`link`),e}export{m as a,l as c,g as d,h as f,u as i,d as l,s as n,p as o,o as p,a as r,f as s,c as t,_ as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e}from"./chunk-5OX2R7AJ-CxVV-owP.js";function t(e){let t=r(e,`MessageStatus`)??r(e,`SmsStatus`),i=r(e,`Body`),a=r(e,`From`),o=r(e,`To`),s=r(e,`MessageSid`)??r(e,`SmsMessageSid`);return t&&!i?{accountSid:r(e,`AccountSid`),from:a,kind:`status`,messageSid:s,messageStatus:t,raw:e,to:o}:a&&o&&(i!==void 0||Number(r(e,`NumMedia`)??0)>0)?{accountSid:r(e,`AccountSid`),body:i??``,from:a,kind:`text`,media:n(e),messageSid:s,raw:e,to:o}:{kind:`unsupported`,raw:e}}function n(e){let t=Number(r(e,`NumMedia`)??0),n=[];for(let i=0;i<t;i++){let t=r(e,`MediaUrl${i}`);t&&n.push({contentType:r(e,`MediaContentType${i}`),url:t})}return n}function r(e,t){let n=e.get(t);return n===null||n.length===0?void 0:n}var i=class extends Error{constructor(e){super(e),this.name=`TwilioWebhookError`}},a=class extends i{constructor(e){super(e),this.name=`TwilioWebhookParseError`}},o=class extends i{constructor(e){super(e),this.name=`TwilioWebhookVerificationError`}};async function s(t,n={}){let r=await t.text();if(n.webhookVerifier){let e=await n.webhookVerifier(t,r);if(!e)throw new o(`Twilio webhook verifier rejected the request`);return{body:typeof e==`string`?e:r,params:d(t,typeof e==`string`?e:r)}}let i=t.headers.get(`x-twilio-signature`);if(!i)throw new o(`Twilio signature header is required`);let a=await e(n.authToken,`TWILIO_AUTH_TOKEN`),s=await u(t,n.webhookUrl),l=d(t,r);if(!p(await c({authToken:a,params:t.method.toUpperCase()===`GET`?null:l,url:s}),i))throw new o(`Twilio signature is invalid`);return{body:r,params:l}}async function c(e){let t=await crypto.subtle.importKey(`raw`,new TextEncoder().encode(e.authToken),{hash:`SHA-1`,name:`HMAC`},!1,[`sign`]);return f(await crypto.subtle.sign(`HMAC`,t,new TextEncoder().encode(l(e.url,e.params))))}function l(e,t){if(!t)return e;let n=e,r=new Map;for(let[e,n]of t){let t=r.get(e)??new Set;t.add(n),r.set(e,t)}for(let e of[...r.keys()].sort())for(let t of[...r.get(e)??[]].sort())n+=`${e}${t}`;return n}async function u(e,t){return typeof t==`function`?t(e):t??e.url}function d(e,t){return e.method.toUpperCase()===`GET`?new URL(e.url).searchParams:new URLSearchParams(t)}function f(e){let t=``,n=new Uint8Array(e);for(let e of n)t+=String.fromCharCode(e);return btoa(t)}function p(e,t){let n=Math.abs(e.length-t.length),r=Math.max(e.length,t.length);for(let i=0;i<r;i++){let r=e.charCodeAt(i)||0,a=t.charCodeAt(i)||0;n+=Number(r!==a)}return n===0}async function m(e,n={}){return t((await s(e,n)).params)}export{m as a,l as c,t as i,s as l,a as n,u as o,o as r,c as s,i as t};
|