eve 0.51.0 → 0.52.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 +46 -0
- package/dist/src/channel/session.d.ts +2 -1
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +4 -1
- package/dist/src/chunks/{use-eve-agent-C3vUG5g2.js → use-eve-agent-3DZuvuWE.js} +17 -6
- package/dist/src/chunks/{use-eve-agent-B4xN7-fK.js → use-eve-agent-D7apPojZ.js} +17 -6
- package/dist/src/cli/agent-command.js +1 -1
- package/dist/src/cli/commands/agent-instructions.d.ts +3 -1
- package/dist/src/cli/commands/agent-instructions.js +1 -1
- package/dist/src/cli/commands/build.js +1 -1
- package/dist/src/cli/commands/deploy.js +1 -1
- package/dist/src/cli/commands/init-agent-workspace.js +1 -1
- package/dist/src/cli/commands/init-repl.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/integration-connect.js +1 -1
- package/dist/src/cli/commands/link.js +1 -1
- package/dist/src/cli/commands/preconditions.js +1 -1
- package/dist/src/cli/commands/register-project-commands.d.ts +1 -1
- package/dist/src/cli/commands/register-project-commands.js +1 -1
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/dev/boot-progress.d.ts +3 -0
- package/dist/src/cli/dev/boot-progress.js +1 -0
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/run-interactive-ui.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +3 -1
- package/dist/src/cli/dev/tui/setup-commands.js +1 -1
- package/dist/src/cli/run.d.ts +4 -0
- package/dist/src/cli/run.js +3 -3
- package/dist/src/cli/telemetry/command.d.ts +9 -0
- package/dist/src/cli/telemetry/command.js +1 -0
- package/dist/src/cli/telemetry/flush.d.ts +2 -0
- package/dist/src/cli/telemetry/flush.js +1 -0
- package/dist/src/cli/telemetry/identity.d.ts +13 -0
- package/dist/src/cli/telemetry/identity.js +1 -0
- package/dist/src/cli/telemetry/index.d.ts +25 -0
- package/dist/src/cli/telemetry/index.js +3 -0
- package/dist/src/cli/telemetry/preference.d.ts +9 -0
- package/dist/src/cli/telemetry/preference.js +1 -0
- package/dist/src/client/open-stream.js +1 -1
- package/dist/src/client/session-controls.d.ts +3 -0
- package/dist/src/client/session-controls.js +1 -1
- package/dist/src/client/session.d.ts +4 -1
- package/dist/src/client/types.d.ts +3 -2
- package/dist/src/compiled/.vendor-stamp.json +11 -11
- package/dist/src/compiled/@clack/core/LICENSE +9 -0
- package/dist/src/compiled/@clack/core/index.d.ts +363 -0
- package/dist/src/compiled/@clack/core/index.js +20 -0
- package/dist/src/compiled/@eve/catalog/index.js +1 -1
- package/dist/src/compiled/@modelcontextprotocol/server/index.d.ts +1 -0
- package/dist/src/compiled/@vercel/sandbox/api-client/api-client.d.ts +34 -92
- package/dist/src/compiled/@vercel/sandbox/api-client/base-client.d.ts +1 -1
- package/dist/src/compiled/@vercel/sandbox/api-client/index.d.ts +1 -1
- package/dist/src/compiled/@vercel/sandbox/api-client/validators.d.ts +13 -29
- package/dist/src/compiled/@vercel/sandbox/constants.d.ts +11 -1
- package/dist/src/compiled/@vercel/sandbox/index.d.ts +3 -3
- package/dist/src/compiled/@vercel/sandbox/index.js +9 -9
- package/dist/src/compiled/@vercel/sandbox/sandbox-user.d.ts +5 -6
- package/dist/src/compiled/@vercel/sandbox/sandbox.d.ts +79 -67
- package/dist/src/compiled/@vercel/sandbox/session.d.ts +5 -3
- package/dist/src/compiled/@vercel/sandbox/snapshot.d.ts +9 -0
- package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/api-client/api-client.d.ts +86 -1
- package/dist/src/compiled/@vercel/sandbox-drives/api-client/index.d.ts +2 -0
- package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/api-client/validators.d.ts +26 -1
- package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/constants.d.ts +2 -2
- package/dist/src/compiled/@vercel/{sandbox → sandbox-drives}/drive.d.ts +10 -0
- package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/index.d.ts +3 -2
- package/dist/src/compiled/@vercel/sandbox-drives/index.js +9 -0
- package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/sandbox.d.ts +35 -6
- package/dist/src/compiled/@workflow/core/index.js +1 -1
- package/dist/src/compiled/@workflow/core/private.d.ts +2 -4
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +9 -7
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +13 -0
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +54 -1
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiled/@workflow/core/serialization/types.d.ts +7 -0
- package/dist/src/compiled/@workflow/core/serialization.d.ts +24 -2
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/error-codes.d.ts +2 -0
- package/dist/src/compiled/@workflow/errors/index.d.ts +19 -0
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world/analytics.d.ts +46 -2
- package/dist/src/compiled/@workflow/world/events.d.ts +26 -1
- package/dist/src/compiled/@workflow/world/index.d.ts +1 -1
- package/dist/src/compiled/@workflow/world/runs.d.ts +2 -2
- package/dist/src/compiled/@workflow/world-local/index.js +3 -3
- package/dist/src/compiled/@workflow/world-vercel/index.js +12 -12
- package/dist/src/compiled/_chunks/node/{auth-BSKyPAEP.js → auth-Bx1Aoyfo.js} +1 -1
- package/dist/src/compiled/_chunks/node/{auth-YpKlwhP1.js → auth-CA8ZMfB8.js} +1 -1
- package/dist/src/compiled/_chunks/node/esm-CE0tAvRh.js +7 -0
- package/dist/src/compiled/_chunks/node/version-BC6t2Txc.js +1 -0
- package/dist/src/compiled/_chunks/node/version-DSQqVZ5T.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-BwAadFfB.js → attribute-changes-03lzo29R.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/dist-BIdMK5N8.js +40 -0
- package/dist/src/compiled/_chunks/workflow/dist-DMQ3CtWt.js +3 -0
- package/dist/src/compiled/_chunks/workflow/frames-Boesh7kU.js +3 -0
- package/dist/src/compiled/_chunks/workflow/{private-CZFMABEf.js → private-CKx3PkSS.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{resume-hook-BToMtPbH.js → resume-hook-C6eL-S_T.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/run-BV0S6Zc2.js +1 -0
- package/dist/src/compiled/_chunks/workflow/sleep-Bh3jP9ii.js +1 -0
- package/dist/src/compiled/_chunks/workflow/wait-until-l-cwfJvm.js +15 -0
- package/dist/src/compiled/_chunks/workflow/{ws-transport-PnVVxT0R.js → ws-transport-BagXNxCE.js} +1 -1
- package/dist/src/compiler/compile-from-memory.d.ts +1 -0
- package/dist/src/compiler/extension-compatibility.d.ts +38 -20
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +2 -2
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-channel.js +1 -1
- package/dist/src/compiler/normalize-schedule.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/discover/extensions.d.ts +2 -0
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/filesystem.d.ts +1 -0
- package/dist/src/discover/filesystem.js +1 -1
- package/dist/src/discover/project.js +1 -1
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/session-cleanup.d.ts +7 -0
- package/dist/src/evals/session-cleanup.js +1 -0
- package/dist/src/evals/session.d.ts +4 -0
- package/dist/src/evals/session.js +1 -1
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.d.ts +1 -0
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/execution/activity-collector.js +1 -1
- package/dist/src/execution/activity-work.d.ts +8 -0
- package/dist/src/execution/activity-work.js +1 -1
- package/dist/src/execution/cancel-indexed-session-tasks-step.d.ts +6 -0
- package/dist/src/execution/cancel-indexed-session-tasks-step.js +1 -0
- package/dist/src/execution/continuation-conflict-step.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +2 -2
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/coordination-dispatch-step.js +1 -1
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +1 -1
- package/dist/src/execution/inline-turn.d.ts +4 -2
- package/dist/src/execution/inline-turn.js +1 -1
- package/dist/src/execution/next-driver-action.d.ts +0 -3
- package/dist/src/execution/parked-delivery-wait.js +1 -1
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/run-session-limits.d.ts +5 -5
- package/dist/src/execution/sandbox/bindings/vercel-create-sdk.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-sdk-types.d.ts +4 -4
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/execution/session-activity-projection.js +1 -1
- package/dist/src/execution/session-activity.js +1 -1
- package/dist/src/execution/session-timeout-workflow.js +1 -1
- package/dist/src/execution/session.d.ts +1 -0
- package/dist/src/execution/session.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/tasks/child/steps.d.ts +19 -1
- package/dist/src/execution/tasks/child/steps.js +1 -1
- package/dist/src/execution/tasks/child/workflow.d.ts +2 -0
- package/dist/src/execution/tasks/child/workflow.js +1 -1
- package/dist/src/execution/tasks/parent/control-shared.js +1 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +2 -0
- package/dist/src/execution/tasks/parent/delegate.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tasks/parent/subagent-task-projection.d.ts +26 -0
- package/dist/src/execution/tasks/parent/subagent-task-projection.js +1 -0
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/terminate-child-sessions-step.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.d.ts +3 -0
- package/dist/src/execution/tools/sleep-workflow.js +1 -0
- package/dist/src/execution/tools/sleep.d.ts +1 -5
- package/dist/src/execution/tools/sleep.js +1 -1
- package/dist/src/execution/tools/subagent/accept-event-step.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +1 -7
- package/dist/src/execution/tools/subagent/invoke-agent.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-step.js +1 -1
- package/dist/src/execution/tools/workflow/ask.d.ts +1 -2
- package/dist/src/execution/tools/workflow/ask.js +1 -1
- package/dist/src/execution/tools/workflow/body.d.ts +6 -1
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/cancel.js +1 -1
- package/dist/src/execution/tools/workflow/messages.d.ts +9 -8
- package/dist/src/execution/tools/workflow/messages.js +1 -1
- package/dist/src/execution/tools/workflow/owner-inbox.d.ts +2 -2
- package/dist/src/execution/tools/workflow/owner-inbox.js +1 -1
- package/dist/src/execution/tools/workflow/owner.d.ts +5 -11
- package/dist/src/execution/tools/workflow/owner.js +1 -1
- package/dist/src/execution/tools/workflow/run-control.d.ts +0 -4
- package/dist/src/execution/tools/workflow/run-control.js +1 -1
- package/dist/src/execution/tools/workflow/start.d.ts +5 -14
- package/dist/src/execution/tools/workflow/start.js +1 -1
- package/dist/src/execution/tools/workflow/workflow.d.ts +1 -1
- package/dist/src/execution/tools/workflow/workflow.js +1 -1
- package/dist/src/execution/turn-cancellation-control.d.ts +1 -0
- package/dist/src/execution/turn-cancellation-control.js +1 -1
- package/dist/src/execution/turn-cancellation-token.d.ts +1 -0
- package/dist/src/execution/turn-control-receiver.d.ts +3 -0
- package/dist/src/execution/turn-control-receiver.js +1 -1
- package/dist/src/execution/turn-dispatch.d.ts +2 -0
- package/dist/src/execution/turn-dispatch.js +1 -1
- package/dist/src/execution/turn-workflow-tool-run.d.ts +2 -8
- package/dist/src/execution/turn-workflow-tool-run.js +1 -1
- package/dist/src/execution/turn-workflow.d.ts +1 -0
- package/dist/src/execution/turn-workflow.js +1 -1
- package/dist/src/execution/wire/session-inbox-contract.d.ts +2 -2
- package/dist/src/execution/wire/session-inbox-contract.js +1 -1
- package/dist/src/execution/wire/session-inbox-encoder.d.ts +10 -2
- package/dist/src/execution/wire/session-inbox-encoder.js +1 -1
- package/dist/src/execution/wire/session-inbox-resume.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v5.d.ts +341 -0
- package/dist/src/execution/wire/session-inbox-wire.v5.js +1 -0
- package/dist/src/execution/wire/session-inbox-wire.v5.migration.d.ts +3 -0
- package/dist/src/execution/wire/session-inbox-wire.v5.migration.js +1 -0
- package/dist/src/execution/wire/session-inbox-wire.v6.d.ts +341 -0
- package/dist/src/execution/wire/session-inbox-wire.v6.js +1 -0
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/harness/emission-state.js +1 -1
- package/dist/src/harness/session-limit-continuation.d.ts +5 -5
- package/dist/src/harness/session-limit-continuation.js +1 -1
- package/dist/src/harness/session-limit-enforcement.d.ts +4 -4
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/session-usage-limits.d.ts +48 -0
- package/dist/src/harness/session-usage-limits.js +1 -0
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/turn-client-context.d.ts +9 -0
- package/dist/src/harness/turn-client-context.js +1 -0
- package/dist/src/harness/turn-tag-state.d.ts +17 -20
- package/dist/src/harness/turn-tag-state.js +1 -1
- package/dist/src/harness/types.d.ts +5 -0
- package/dist/src/harness/workflow-tool-runs.d.ts +0 -1
- package/dist/src/harness/workflow-tool-runs.js +1 -1
- package/dist/src/internal/application/build-output-environment.d.ts +1 -0
- package/dist/src/internal/application/build-output-environment.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/application/paths.js +1 -1
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/eve-project-root.d.ts +8 -0
- package/dist/src/internal/eve-project-root.js +1 -0
- package/dist/src/internal/invocation/workflow-execution.js +1 -1
- package/dist/src/internal/mcp/streamable-http-server.d.ts +29 -1
- package/dist/src/internal/mcp/streamable-http-server.js +1 -1
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts +1 -0
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/types.d.ts +2 -0
- package/dist/src/internal/nitro/host/vercel-build-output-config.d.ts +1 -0
- package/dist/src/internal/nitro/host/vercel-build-output-config.js +1 -1
- package/dist/src/internal/project-context.d.ts +13 -8
- package/dist/src/internal/project-context.js +1 -1
- package/dist/src/internal/vercel/build-agent-workspace.d.ts +1 -1
- package/dist/src/internal/vercel/build-agent-workspace.js +1 -1
- package/dist/src/internal/vercel/eve-service-contribution.d.ts +1 -0
- package/dist/src/internal/vercel/eve-service-contribution.js +1 -1
- package/dist/src/internal/workflow/reference.d.ts +2 -0
- package/dist/src/internal/workflow/reference.js +1 -0
- package/dist/src/internal/workflow/runtime.d.ts +6 -0
- package/dist/src/internal/workflow/runtime.js +1 -1
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +1 -3
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -1
- package/dist/src/internal/workflow-bundle/authored-workflow-modules.d.ts +1 -11
- package/dist/src/internal/workflow-bundle/authored-workflow-modules.js +1 -1
- package/dist/src/internal/workflow-bundle/builder.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +1 -3
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-transformer.d.ts +1 -1
- package/dist/src/internal/workflow-bundle/workflow-transformer.js +2 -2
- package/dist/src/protocol/message.d.ts +3 -2
- package/dist/src/public/channels/mcp.js +1 -1
- package/dist/src/public/channels/slack/activity-plan.d.ts +4 -0
- package/dist/src/public/channels/slack/activity-plan.js +1 -0
- package/dist/src/public/channels/slack/activity.d.ts +45 -2
- package/dist/src/public/channels/slack/activity.js +2 -1
- package/dist/src/public/channels/slack/index.d.ts +1 -1
- package/dist/src/public/channels/slack/index.js +1 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/memory/index.js +1 -1
- package/dist/src/public/models/openai/chatgpt/model.js +2 -2
- package/dist/src/public/models/openai/chatgpt/transport.js +1 -1
- package/dist/src/public/nuxt/index.js +1 -1
- package/dist/src/public/nuxt/module.d.ts +3 -2
- package/dist/src/public/nuxt/module.js +1 -1
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +9 -5
- package/dist/src/public/sandbox/vercel.d.ts +1 -1
- package/dist/src/public/sandbox/vercel.js +1 -1
- package/dist/src/public/tools/index.d.ts +3 -1
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/self-modification/agent.d.ts +22 -0
- package/dist/src/self-modification/agent.js +1 -0
- package/dist/src/self-modification/extension/classify-registry-item.d.ts +19 -0
- package/dist/src/self-modification/extension/classify-registry-item.js +1 -0
- package/dist/src/self-modification/extension/eve-add.d.ts +56 -0
- package/dist/src/self-modification/extension/eve-add.js +2 -0
- package/dist/src/self-modification/extension/extension.d.ts +2 -0
- package/dist/src/self-modification/extension/extension.js +1 -0
- package/dist/src/self-modification/extension/instructions.d.ts +4 -0
- package/dist/src/self-modification/extension/instructions.js +23 -0
- package/dist/src/self-modification/extension/source-lock.d.ts +2 -0
- package/dist/src/self-modification/extension/source-lock.js +1 -0
- package/dist/src/self-modification/extension/tools/edit_file.d.ts +16 -0
- package/dist/src/self-modification/extension/tools/edit_file.js +1 -0
- package/dist/src/self-modification/extension/tools/registry_add.d.ts +52 -0
- package/dist/src/self-modification/extension/tools/registry_add.js +1 -0
- package/dist/src/self-modification/extension/tools/search_models.d.ts +22 -0
- package/dist/src/self-modification/extension/tools/search_models.js +1 -0
- package/dist/src/self-modification/extension/tools/search_registry.d.ts +103 -0
- package/dist/src/self-modification/extension/tools/search_registry.js +1 -0
- package/dist/src/self-modification/filesystem.d.ts +6 -0
- package/dist/src/self-modification/filesystem.js +1 -0
- package/dist/src/self-modification/sandbox.d.ts +2 -0
- package/dist/src/self-modification/sandbox.js +1 -0
- package/dist/src/services/dev-client/target.d.ts +3 -1
- package/dist/src/setup/boxes/select-model.d.ts +3 -21
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/cli/prompt-ui.js +4 -4
- package/dist/src/setup/cli/select-component.d.ts +1 -1
- package/dist/src/setup/cli/select-component.js +1 -1
- package/dist/src/setup/flows/model.d.ts +3 -0
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/prompter.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/update/web-options.js +1 -1
- package/dist/src/shared/action-types.d.ts +35 -22
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +13 -0
- package/dist/src/shared/agent-turn-outcome.d.ts +2 -0
- package/dist/src/shared/agent-turn-outcome.js +1 -1
- package/dist/src/shared/extension-package-contract.d.ts +2 -0
- package/dist/src/shared/extension-package-contract.js +1 -1
- package/dist/src/shared/gateway-model-catalog.d.ts +21 -0
- package/dist/src/shared/gateway-model-catalog.js +1 -0
- package/dist/src/shared/sandbox-network-policy.d.ts +1 -1
- package/dist/src/shared/token-usage.d.ts +11 -15
- package/dist/src/shared/token-usage.js +1 -1
- package/dist/src/shared/workflow-tool-context.d.ts +2 -0
- package/dist/src/shared/workflow-tool-context.js +1 -0
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/event-proxy-step.js +1 -1
- package/dist/src/subagents/start-remote.js +1 -1
- package/dist/src/subagents/token-budget.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/types.d.ts +18 -1
- package/dist/src/tasks/types.js +1 -1
- package/dist/src/tools/behavior.d.ts +5 -0
- package/dist/src/tools/definition.d.ts +16 -12
- package/dist/src/tools/definition.js +1 -1
- package/dist/src/tools/dynamic.d.ts +2 -2
- package/dist/src/tools/provided/sleep.d.ts +4 -4
- package/dist/src/tools/provided/sleep.js +1 -1
- package/dist/src/tools/task.d.ts +28 -80
- package/dist/src/tools/task.js +1 -1
- package/dist/src/tools/workflow-definition.d.ts +60 -0
- package/dist/src/tools/workflow-definition.js +1 -0
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +24 -19
- package/docs/channels/eve.mdx +1 -1
- package/docs/channels/mcp.mdx +25 -3
- package/docs/concepts/built-in-tools.md +1 -1
- package/docs/concepts/execution-model-and-durability.mdx +13 -2
- package/docs/concepts/sessions-runs-and-streaming.md +9 -1
- package/docs/guides/client/messages.mdx +1 -1
- package/docs/guides/client/streaming.mdx +1 -1
- package/docs/guides/deployment/vercel.mdx +3 -1
- package/docs/guides/frontend/overview.mdx +1 -1
- package/docs/memory/overview.mdx +41 -12
- package/docs/reference/cli.md +31 -33
- package/docs/reference/meta.json +1 -4
- package/docs/reference/telemetry.md +56 -0
- package/docs/reference/typescript-api.md +38 -35
- package/docs/sandbox.mdx +1 -1
- package/docs/tools/overview.mdx +59 -18
- package/docs/tools/workflows.mdx +146 -70
- package/package.json +38 -19
- package/dist/src/compiled/@vercel/sandbox-delete/api-client/index.d.ts +0 -2
- package/dist/src/compiled/@vercel/sandbox-delete/index.js +0 -9
- package/dist/src/compiled/@vercel/sandbox-stable/LICENSE +0 -201
- package/dist/src/compiled/@vercel/sandbox-stable/_async-retry.d.ts +0 -8
- package/dist/src/compiled/@vercel/sandbox-stable/_workflow-serde.d.ts +0 -5
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/api-client.d.ts +0 -1456
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/api-error.d.ts +0 -29
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/base-client.d.ts +0 -39
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/file-writer.d.ts +0 -66
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/index.d.ts +0 -2
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/validators.d.ts +0 -899
- package/dist/src/compiled/@vercel/sandbox-stable/api-client/with-retry.d.ts +0 -10
- package/dist/src/compiled/@vercel/sandbox-stable/auth/error.d.ts +0 -15
- package/dist/src/compiled/@vercel/sandbox-stable/auth/file.d.ts +0 -18
- package/dist/src/compiled/@vercel/sandbox-stable/auth/index.d.ts +0 -6
- package/dist/src/compiled/@vercel/sandbox-stable/auth/oauth.d.ts +0 -111
- package/dist/src/compiled/@vercel/sandbox-stable/auth/poll-for-token.d.ts +0 -28
- package/dist/src/compiled/@vercel/sandbox-stable/auth/project.d.ts +0 -40
- package/dist/src/compiled/@vercel/sandbox-stable/command.d.ts +0 -292
- package/dist/src/compiled/@vercel/sandbox-stable/constants.d.ts +0 -5
- package/dist/src/compiled/@vercel/sandbox-stable/execution-context.d.ts +0 -116
- package/dist/src/compiled/@vercel/sandbox-stable/filesystem.d.ts +0 -258
- package/dist/src/compiled/@vercel/sandbox-stable/index.d.ts +0 -12
- package/dist/src/compiled/@vercel/sandbox-stable/index.js +0 -1
- package/dist/src/compiled/@vercel/sandbox-stable/network-policy.d.ts +0 -169
- package/dist/src/compiled/@vercel/sandbox-stable/proxy.d.ts +0 -55
- package/dist/src/compiled/@vercel/sandbox-stable/sandbox-user.d.ts +0 -212
- package/dist/src/compiled/@vercel/sandbox-stable/sandbox.d.ts +0 -1216
- package/dist/src/compiled/@vercel/sandbox-stable/session.d.ts +0 -433
- package/dist/src/compiled/@vercel/sandbox-stable/snapshot.d.ts +0 -229
- package/dist/src/compiled/@vercel/sandbox-stable/utils/get-credentials.d.ts +0 -21
- package/dist/src/compiled/@vercel/sandbox-stable/utils/paginator.d.ts +0 -16
- package/dist/src/compiled/@vercel/sandbox-stable/utils/resolveSignal.d.ts +0 -15
- package/dist/src/compiled/@vercel/sandbox-stable/utils/sandbox-snapshot.d.ts +0 -11
- package/dist/src/compiled/@vercel/sandbox-stable/utils/types.d.ts +0 -11
- package/dist/src/compiled/_chunks/node/decode_jwt-Col8JOnf.js +0 -7
- package/dist/src/compiled/_chunks/node/version-BYHw-SDY.js +0 -1
- package/dist/src/compiled/_chunks/node/version-DH6yRy-M.js +0 -1
- package/dist/src/compiled/_chunks/workflow/dist-CgbVZs5l.js +0 -40
- package/dist/src/compiled/_chunks/workflow/dist-DjojkP5e.js +0 -3
- package/dist/src/compiled/_chunks/workflow/frames-CZ9eHShe.js +0 -3
- package/dist/src/compiled/_chunks/workflow/run-DzyAoGh4.js +0 -1
- package/dist/src/compiled/_chunks/workflow/sleep-3_A5uOp-.js +0 -1
- package/dist/src/compiled/_chunks/workflow/wait-until-BtySPYD0.js +0 -15
- package/dist/src/harness/session-token-limits.d.ts +0 -41
- package/dist/src/harness/session-token-limits.js +0 -1
- package/dist/src/harness/turn-sleep.d.ts +0 -12
- package/dist/src/harness/turn-sleep.js +0 -1
- package/dist/src/internal/agent-workspace.d.ts +0 -15
- package/dist/src/internal/agent-workspace.js +0 -1
- package/dist/src/node_modules/.pnpm/@clack_core@1.3.1/node_modules/@clack/core/dist/index.js +0 -16
- package/dist/src/node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js +0 -1
- package/dist/src/node_modules/.pnpm/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js +0 -5
- package/dist/src/node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js +0 -1
- package/dist/src/public/workflow/index.d.ts +0 -5
- package/dist/src/public/workflow/index.js +0 -1
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/LICENSE +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/_async-retry.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/_workflow-serde.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/api-client/api-error.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/api-client/base-client.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/api-client/file-writer.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/api-client/with-retry.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/auth/error.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/auth/file.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/auth/index.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/auth/oauth.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/auth/poll-for-token.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/auth/project.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/command.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/execution-context.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/filesystem.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/network-policy.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/proxy.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/sandbox-user.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/session.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/snapshot.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/utils/get-credentials.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/utils/paginator.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/utils/resolveSignal.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/utils/sandbox-snapshot.d.ts +0 -0
- /package/dist/src/compiled/@vercel/{sandbox-delete → sandbox-drives}/utils/types.d.ts +0 -0
|
@@ -7,11 +7,11 @@ import type { TokenResult } from "#shared/connection-types.js";
|
|
|
7
7
|
import type { ToolAuthOptions, ToolAuthProvider } from "#tools/auth.js";
|
|
8
8
|
import type { InputOption } from "#shared/input.js";
|
|
9
9
|
import type { ToolModelOutput } from "#tools/model-output.js";
|
|
10
|
-
import type {
|
|
10
|
+
import type { TaskExec, TaskReceipt } from "#tools/task.js";
|
|
11
11
|
type ApprovalContextInput<TInput> = unknown extends TInput ? Record<string, unknown> : TInput;
|
|
12
12
|
export type { ToolAuthDefinition, ToolAuthOptions, ToolAuthProvider } from "#tools/auth.js";
|
|
13
13
|
export type { ToolModelOutput, ToolModelOutputPart } from "#tools/model-output.js";
|
|
14
|
-
export type {
|
|
14
|
+
export type { TaskExec, TaskExecutorBinding, TaskReceipt } from "#tools/task.js";
|
|
15
15
|
export type ToolExecuteOptions = Omit<ToolExecutionOptions<unknown>, "context">;
|
|
16
16
|
export type ToolExecuteFn<TInput = unknown, TOutput = unknown> = (input: TInput, options: ToolExecuteOptions, task?: TaskExec) => Promise<TOutput> | TOutput | AsyncIterable<TOutput>;
|
|
17
17
|
export type ToolExecution = "background";
|
|
@@ -53,7 +53,7 @@ export interface PublicToolDefinitionWithExecuteFn<TInput = unknown, TOutput = u
|
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
55
|
* A question a workflow tool asks the human on the session's channel, sent
|
|
56
|
-
* with `ask` from `
|
|
56
|
+
* with `ctx.ask` from a `defineWorkflowTool` executor. Channels render it the way they render
|
|
57
57
|
* `ask_question` and tool approvals.
|
|
58
58
|
*/
|
|
59
59
|
export interface ToolInputRequest {
|
|
@@ -82,10 +82,8 @@ export interface ToolInputResponse {
|
|
|
82
82
|
* Extends {@link SessionContext} with token accessors. Passing a provider
|
|
83
83
|
* resolves that provider inline, which lets one tool use multiple credentials.
|
|
84
84
|
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* `getToken`, and `requireAuth` are unavailable there and throw when touched —
|
|
88
|
-
* read credentials inside a `"use step"` function instead.
|
|
85
|
+
* Workflow tools use the separate `WorkflowToolContext` provided by
|
|
86
|
+
* `defineWorkflowTool`.
|
|
89
87
|
*/
|
|
90
88
|
export type ToolContext = SessionContext & {
|
|
91
89
|
/**
|
|
@@ -152,14 +150,14 @@ export interface ToolDefinition<TInput = unknown, TOutput = unknown> extends Pub
|
|
|
152
150
|
toModelOutput?: (output: TOutput) => ToolModelOutput | Promise<ToolModelOutput>;
|
|
153
151
|
}
|
|
154
152
|
/** A tool whose executor can outlive the model tool-call phase as a durable task. */
|
|
155
|
-
export interface BackgroundToolDefinition<TInput = unknown, TOutput = unknown> extends PublicToolDefinition<TInput,
|
|
153
|
+
export interface BackgroundToolDefinition<TInput = unknown, TOutput = unknown> extends PublicToolDefinition<TInput, TaskReceipt> {
|
|
156
154
|
readonly execution: "background";
|
|
157
|
-
execute(input: TInput, ctx: ToolContext, task: TaskExec): Promise<
|
|
155
|
+
execute(input: TInput, ctx: ToolContext, task: TaskExec): Promise<TOutput> | TOutput | AsyncIterable<unknown>;
|
|
158
156
|
approval?: Approval<ApprovalContextInput<TInput>>;
|
|
159
|
-
toModelOutput?: (output:
|
|
157
|
+
toModelOutput?: (output: TaskReceipt) => ToolModelOutput | Promise<ToolModelOutput>;
|
|
160
158
|
}
|
|
161
159
|
type ToolOutputFromExecuteReturn<TReturn> = TReturn extends Promise<infer TOutput> ? TOutput : TReturn extends AsyncIterable<infer TOutput> ? TOutput : TReturn;
|
|
162
|
-
type BackgroundToolOutputFromExecuteReturn<TReturn> =
|
|
160
|
+
type BackgroundToolOutputFromExecuteReturn<TReturn> = TReturn extends AsyncGenerator<unknown, infer TOutput> ? TOutput : TReturn extends AsyncIterable<unknown> ? null : Awaited<TReturn>;
|
|
163
161
|
type ToolDefinitionWithExecuteReturn<TInput, TOutput, TReturn> = ToolDefinition<TInput, TOutput> & {
|
|
164
162
|
execute(input: TInput, ctx: ToolContext): TReturn;
|
|
165
163
|
};
|
|
@@ -178,7 +176,7 @@ export declare function defineTool<TSchema extends StandardSchemaV1<unknown, unk
|
|
|
178
176
|
description: BackgroundToolDefinition<unknown, unknown>["description"];
|
|
179
177
|
execution: "background";
|
|
180
178
|
inputSchema: TSchema;
|
|
181
|
-
outputSchema?: PublicToolDefinition<unknown,
|
|
179
|
+
outputSchema?: PublicToolDefinition<unknown, TaskReceipt>["outputSchema"];
|
|
182
180
|
execute(input: StandardSchemaV1.InferOutput<TSchema>, ctx: ToolContext, task: TaskExec): TReturn;
|
|
183
181
|
approval?: BackgroundToolDefinition<StandardSchemaV1.InferOutput<TSchema>, unknown>["approval"];
|
|
184
182
|
toModelOutput?: BackgroundToolDefinition<unknown, BackgroundToolOutputFromExecuteReturn<TReturn>>["toModelOutput"];
|
|
@@ -216,6 +214,12 @@ export declare function defineTool<TReturn>(definition: {
|
|
|
216
214
|
toModelOutput?: ToolDefinition<unknown, ToolOutputFromExecuteReturn<TReturn>>["toModelOutput"];
|
|
217
215
|
}): ToolDefinitionWithExecuteReturn<Record<string, unknown>, ToolOutputFromExecuteReturn<TReturn>, TReturn>;
|
|
218
216
|
export declare function defineTool<TInput = unknown, TOutput = unknown>(definition: ToolDefinition<TInput, TOutput>): ToolDefinition<TInput, TOutput>;
|
|
217
|
+
export declare function stampToolDefinition<T extends {
|
|
218
|
+
readonly description: string;
|
|
219
|
+
readonly execute: (...args: never[]) => unknown;
|
|
220
|
+
readonly approval?: Approval<never>;
|
|
221
|
+
readonly toModelOutput?: (...args: never[]) => unknown;
|
|
222
|
+
}>(definition: T, definer: "defineTool" | "defineWorkflowTool"): T;
|
|
219
223
|
/**
|
|
220
224
|
* Marker discriminator written into every {@link DisabledToolSentinel}.
|
|
221
225
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{collectDurableDynamicToolCallbacks,stampDurableDynamicToolCallbacks}from"#tools/durable-callbacks.js";import{TOOL_BRAND}from"#tools/dynamic.js";import{stampDefinitionKey}from"#internal/authored-definition/source-identity.js";function defineTool(t){if(t.auth!==void 0)throw Error(
|
|
1
|
+
import{collectDurableDynamicToolCallbacks,stampDurableDynamicToolCallbacks}from"#tools/durable-callbacks.js";import{TOOL_BRAND}from"#tools/dynamic.js";import{stampDefinitionKey}from"#internal/authored-definition/source-identity.js";function defineTool(e){return stampToolDefinition(e,`defineTool`)}function stampToolDefinition(t,n){if(t.auth!==void 0)throw Error(`${n}: The "auth" field is no longer supported. Pass auth providers inline to ctx.getToken(provider) or ctx.requireAuth(provider).`);return Object.assign(t,{[TOOL_BRAND]:!0}),stampDurableDynamicToolCallbacks(t,collectDurableDynamicToolCallbacks({approval:t.approval,execute:t.execute,toModelOutput:t.toModelOutput})),stampDefinitionKey(t,`tool:${t.description}`),t}const DISABLED_TOOL_SENTINEL_KIND=`eve:disabled-tool`;function disableTool(){return{kind:DISABLED_TOOL_SENTINEL_KIND}}function isDisabledToolSentinel(e){return typeof e==`object`&&!!e&&e.kind===DISABLED_TOOL_SENTINEL_KIND}export{defineTool,disableTool,isDisabledToolSentinel,stampToolDefinition};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Approval } from "#approval/definition.js";
|
|
2
2
|
import type { DynamicResolveContext, DynamicToolEventName } from "#dynamic/definition.js";
|
|
3
3
|
import type { PublicToolInputSchema, PublicToolOutputSchema, ToolContext } from "#tools/definition.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { TaskExec } from "#tools/task.js";
|
|
5
5
|
import type { ToolModelOutput } from "#tools/model-output.js";
|
|
6
6
|
/**
|
|
7
7
|
* A single tool entry within a resolved dynamic tool set.
|
|
@@ -20,7 +20,7 @@ export interface DynamicToolEntry<TInput = Record<string, unknown>, TOutput = an
|
|
|
20
20
|
readonly inputSchema: PublicToolInputSchema<TInput>;
|
|
21
21
|
readonly outputSchema?: PublicToolOutputSchema<TOutput>;
|
|
22
22
|
readonly execution?: "background";
|
|
23
|
-
execute(input: TInput, ctx: ToolContext, task?: TaskExec): TOutput |
|
|
23
|
+
execute(input: TInput, ctx: ToolContext, task?: TaskExec): TOutput | Promise<TOutput>;
|
|
24
24
|
readonly toModelOutput?: (output: TOutput) => ToolModelOutput | Promise<ToolModelOutput>;
|
|
25
25
|
/**
|
|
26
26
|
* Optional per-call approval gate, mirroring the authored-tool
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type BlockingWorkflowToolDefinition } from "#tools/workflow-definition.js";
|
|
2
2
|
import { type SleepToolInput, type SleepToolOutput } from "#execution/tools/sleep.js";
|
|
3
3
|
export type { SleepToolInput, SleepToolOutput };
|
|
4
4
|
/**
|
|
@@ -12,7 +12,7 @@ export type { SleepToolInput, SleepToolOutput };
|
|
|
12
12
|
* export default sleep();
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
* runtime open
|
|
15
|
+
* Each call runs as a durable workflow, so the wait does not hold an
|
|
16
|
+
* application runtime open.
|
|
17
17
|
*/
|
|
18
|
-
export declare function sleep():
|
|
18
|
+
export declare function sleep(): BlockingWorkflowToolDefinition<SleepToolInput, SleepToolOutput>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{defineWorkflowTool}from"#tools/workflow-definition.js";import{SLEEP_INPUT_SCHEMA,SLEEP_OUTPUT_SCHEMA,SLEEP_TOOL_DESCRIPTION,executeSleepTool}from"#execution/tools/sleep.js";function sleep(){return defineWorkflowTool({description:SLEEP_TOOL_DESCRIPTION,execute:executeSleepTool,inputSchema:SLEEP_INPUT_SCHEMA,outputSchema:SLEEP_OUTPUT_SCHEMA})}export{sleep};
|
package/dist/src/tools/task.d.ts
CHANGED
|
@@ -1,48 +1,25 @@
|
|
|
1
1
|
import type { BackgroundTask } from "#execution/tasks/parent/delegate.js";
|
|
2
|
-
import type { BackgroundToolCall } from "#harness/background-tools.js";
|
|
3
2
|
import type { HarnessSession } from "#harness/types.js";
|
|
4
3
|
import type { JsonObject, JsonValue } from "#shared/json.js";
|
|
5
|
-
declare const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
readonly
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Opaque, task-private address used to control an external executor. `data`
|
|
14
|
-
* means nothing to the task layer beyond deep equality (replay idempotency);
|
|
15
|
-
* only the executor `kind` that wrote it may parse it (e.g. cancel routing).
|
|
16
|
-
*/
|
|
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. */
|
|
17
12
|
export interface TaskExecutorBinding {
|
|
18
13
|
readonly kind: string;
|
|
19
14
|
readonly data: JsonObject;
|
|
20
15
|
}
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
* author-supplied data plus `status: "working"` and the `taskId` it can poll
|
|
24
|
-
* or cancel. It acknowledges delegation — it is not the task's result, which
|
|
25
|
-
* arrives later through task completion.
|
|
26
|
-
*/
|
|
27
|
-
export type TaskReceipt<TData extends JsonObject = JsonObject> = TData & {
|
|
28
|
-
readonly status: "working";
|
|
16
|
+
/** @deprecated Use workflow-backed background tools with yield descriptors. */
|
|
17
|
+
export interface TaskBinding {
|
|
29
18
|
readonly taskId: string;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
* Sentinel returned by a background tool after an external executor accepts
|
|
33
|
-
* responsibility for the task. Returning it ends `execute`; it does not
|
|
34
|
-
* complete the durable task.
|
|
35
|
-
*/
|
|
36
|
-
export interface TaskDelegated<TData extends JsonObject = JsonObject> {
|
|
37
|
-
readonly kind: typeof TASK_DELEGATED_KIND;
|
|
38
|
-
readonly executor: TaskExecutorBinding;
|
|
39
|
-
readonly receipt: TaskReceipt<TData>;
|
|
19
|
+
readonly token: string;
|
|
20
|
+
readonly url?: string;
|
|
40
21
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Commands an in-process executor may report to its task via
|
|
43
|
-
* {@link TaskExec.send}. Deliberately narrower than the task run's full
|
|
44
|
-
* command surface — bind, ready, and input routing stay runtime-owned.
|
|
45
|
-
*/
|
|
22
|
+
/** @deprecated Use workflow-backed background tools with yield descriptors. */
|
|
46
23
|
export type TaskSendCommand = {
|
|
47
24
|
readonly kind: "update";
|
|
48
25
|
readonly message: string;
|
|
@@ -55,53 +32,24 @@ export type TaskSendCommand = {
|
|
|
55
32
|
} | {
|
|
56
33
|
readonly kind: "cancel";
|
|
57
34
|
};
|
|
58
|
-
/**
|
|
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"`. */
|
|
59
41
|
export interface TaskExec {
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
readonly batch: readonly BackgroundToolCall[];
|
|
66
|
-
/**
|
|
67
|
-
* The task-private address for reporting lifecycle changes back to this
|
|
68
|
-
* task. Hand it to the external executor so completion routes to the task
|
|
69
|
-
* directly instead of through the (already finished) tool call.
|
|
70
|
-
*/
|
|
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. */
|
|
71
47
|
readonly binding: TaskBinding;
|
|
72
|
-
/**
|
|
73
|
-
* Snapshot of the harness session at step start, for reading context.
|
|
74
|
-
* Mutating it changes nothing durable: session writes belong to the
|
|
75
|
-
* runtime, keyed off the executor binding at step commit.
|
|
76
|
-
*/
|
|
77
|
-
readonly session: HarnessSession;
|
|
78
|
-
/**
|
|
79
|
-
* Delivers progress or a terminal command to this task's inbox from the same
|
|
80
|
-
* process, for executors that outlive `execute` in-memory (e.g. a callback firing
|
|
81
|
-
* after delegation). Call it only after `execute` returned `delegated(...)`
|
|
82
|
-
* — the runtime settles non-delegated returns itself, and a second terminal
|
|
83
|
-
* command is refused. Not restart-safe: an in-process callback dies with
|
|
84
|
-
* the process; the persisted executor binding remains the durable
|
|
85
|
-
* cancellation path. Throws when the task no longer accepts commands
|
|
86
|
-
* (already terminal).
|
|
87
|
-
*/
|
|
48
|
+
/** @deprecated Use yields from a workflow-backed background tool. */
|
|
88
49
|
readonly send: (command: TaskSendCommand) => Promise<void>;
|
|
89
|
-
/**
|
|
50
|
+
/** @deprecated Use ctx.session. */
|
|
51
|
+
readonly session: HarnessSession;
|
|
52
|
+
/** @deprecated Framework-owned task internals are not part of the authoring API. */
|
|
90
53
|
readonly task: BackgroundTask;
|
|
91
|
-
/**
|
|
92
|
-
* Builds the `TaskDelegated` sentinel to return from `execute`. Centralizes
|
|
93
|
-
* receipt stamping so every receipt carries this task's `taskId` and
|
|
94
|
-
* `status: "working"` — tools cannot mint receipts for tasks they don't own.
|
|
95
|
-
*/
|
|
96
|
-
delegated<TData extends JsonObject>(input: {
|
|
97
|
-
readonly executor: TaskExecutorBinding;
|
|
98
|
-
readonly receipt: TData;
|
|
99
|
-
}): TaskDelegated<TData>;
|
|
100
54
|
}
|
|
101
|
-
export declare function createTaskDelegated<TData extends JsonObject>(input: {
|
|
102
|
-
readonly binding: TaskBinding;
|
|
103
|
-
readonly executor: TaskExecutorBinding;
|
|
104
|
-
readonly receipt: TData;
|
|
105
|
-
}): TaskDelegated<TData>;
|
|
106
|
-
export declare function isTaskDelegated(value: unknown): value is TaskDelegated;
|
|
107
55
|
export {};
|
package/dist/src/tools/task.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
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};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { StandardJSONSchemaV1, StandardSchemaV1 } from "#compiled/@standard-schema/spec/index.js";
|
|
2
|
+
import type { Approval } from "#approval/definition.js";
|
|
3
|
+
import type { JsonObject, JsonValue } from "#shared/json.js";
|
|
4
|
+
import { type PublicToolDefinition, type BackgroundToolDefinition, type ToolContext, type ToolInputRequest, type ToolInputResponse } from "#tools/definition.js";
|
|
5
|
+
import type { TaskExec } from "#tools/task.js";
|
|
6
|
+
import type { ToolModelOutput } from "#tools/model-output.js";
|
|
7
|
+
export interface AgentInput {
|
|
8
|
+
readonly agentId?: string;
|
|
9
|
+
readonly key: string;
|
|
10
|
+
readonly message: string;
|
|
11
|
+
readonly outputSchema?: JsonObject;
|
|
12
|
+
readonly target: string;
|
|
13
|
+
}
|
|
14
|
+
/** Context supplied only to a defineWorkflowTool executor, inside its durable run. */
|
|
15
|
+
export type WorkflowToolContext = Pick<ToolContext, "abortSignal" | "callId" | "session" | "toolName"> & {
|
|
16
|
+
/** Invoke a visible subagent. The key must be unique within this workflow run. */
|
|
17
|
+
agent(input: AgentInput): Promise<JsonValue>;
|
|
18
|
+
/** Ask the human on the session's channel; awaiting the answer suspends the run. */
|
|
19
|
+
ask(request: ToolInputRequest): PromiseLike<ToolInputResponse>;
|
|
20
|
+
};
|
|
21
|
+
declare const WORKFLOW_TOOL_BRAND: unique symbol;
|
|
22
|
+
/** A static tool whose executor runs as a durable workflow. Its executor must start with "use workflow". */
|
|
23
|
+
export interface BlockingWorkflowToolDefinition<TInput = unknown, TOutput = unknown> extends PublicToolDefinition<TInput, TOutput> {
|
|
24
|
+
readonly [WORKFLOW_TOOL_BRAND]: true;
|
|
25
|
+
readonly execution?: never;
|
|
26
|
+
execute(input: TInput, ctx: WorkflowToolContext): Promise<TOutput> | AsyncIterable<TOutput>;
|
|
27
|
+
approval?: Approval<unknown extends TInput ? Record<string, unknown> : TInput>;
|
|
28
|
+
toModelOutput?: (output: TOutput) => ToolModelOutput | Promise<ToolModelOutput>;
|
|
29
|
+
}
|
|
30
|
+
type BackgroundWorkflowToolDefinition<TInput, TOutput> = Omit<BackgroundToolDefinition<TInput, TOutput>, "execute"> & {
|
|
31
|
+
readonly [WORKFLOW_TOOL_BRAND]: true;
|
|
32
|
+
execute(input: TInput, ctx: WorkflowToolContext, task: TaskExec): Promise<TOutput> | AsyncIterable<unknown>;
|
|
33
|
+
};
|
|
34
|
+
/** A static tool whose executor runs as a durable workflow. */
|
|
35
|
+
export type WorkflowToolDefinition<TInput = unknown, TOutput = unknown> = BlockingWorkflowToolDefinition<TInput, TOutput> | BackgroundWorkflowToolDefinition<TInput, TOutput>;
|
|
36
|
+
type Unbranded<T> = T extends unknown ? Omit<T, typeof WORKFLOW_TOOL_BRAND> : never;
|
|
37
|
+
type BackgroundReturn<T> = T extends AsyncGenerator<unknown, infer Output> ? Output : T extends AsyncIterable<unknown> ? null : Awaited<T>;
|
|
38
|
+
type BackgroundDefinition<TInput, TReturn> = Omit<BackgroundWorkflowToolDefinition<TInput, BackgroundReturn<TReturn>>, typeof WORKFLOW_TOOL_BRAND | "execute"> & {
|
|
39
|
+
execute(input: TInput, ctx: WorkflowToolContext, task: TaskExec): TReturn;
|
|
40
|
+
};
|
|
41
|
+
type WorkflowReturn<T> = T extends AsyncIterable<infer Output> ? Output : Awaited<T>;
|
|
42
|
+
type Schema = StandardSchemaV1<unknown, unknown> | StandardJSONSchemaV1<unknown, unknown>;
|
|
43
|
+
type Definition<TInput, TReturn> = Omit<BlockingWorkflowToolDefinition<TInput, WorkflowReturn<TReturn>>, typeof WORKFLOW_TOOL_BRAND | "execute"> & {
|
|
44
|
+
execute(input: TInput, ctx: WorkflowToolContext): TReturn;
|
|
45
|
+
};
|
|
46
|
+
export declare function defineWorkflowTool<TSchema extends Schema, TReturn extends Promise<unknown> | AsyncIterable<unknown>>(definition: Omit<BackgroundDefinition<StandardSchemaV1.InferOutput<TSchema>, TReturn>, "inputSchema"> & {
|
|
47
|
+
inputSchema: TSchema;
|
|
48
|
+
}): BackgroundWorkflowToolDefinition<StandardSchemaV1.InferOutput<TSchema>, BackgroundReturn<TReturn>>;
|
|
49
|
+
export declare function defineWorkflowTool<TReturn extends Promise<unknown> | AsyncIterable<unknown>>(definition: BackgroundDefinition<Record<string, unknown>, TReturn> & {
|
|
50
|
+
inputSchema: JsonObject;
|
|
51
|
+
}): BackgroundWorkflowToolDefinition<Record<string, unknown>, BackgroundReturn<TReturn>>;
|
|
52
|
+
export declare function defineWorkflowTool<TSchema extends Schema, TReturn extends Promise<unknown> | AsyncIterable<unknown>>(definition: Omit<Definition<StandardSchemaV1.InferOutput<TSchema>, TReturn>, "inputSchema"> & {
|
|
53
|
+
inputSchema: TSchema;
|
|
54
|
+
}): BlockingWorkflowToolDefinition<StandardSchemaV1.InferOutput<TSchema>, WorkflowReturn<TReturn>>;
|
|
55
|
+
export declare function defineWorkflowTool<TReturn extends Promise<unknown> | AsyncIterable<unknown>>(definition: Definition<Record<string, unknown>, TReturn> & {
|
|
56
|
+
inputSchema: JsonObject;
|
|
57
|
+
}): BlockingWorkflowToolDefinition<Record<string, unknown>, WorkflowReturn<TReturn>>;
|
|
58
|
+
export declare function defineWorkflowTool<TInput = unknown, TOutput = unknown>(definition: Unbranded<WorkflowToolDefinition<TInput, TOutput>>): WorkflowToolDefinition<TInput, TOutput>;
|
|
59
|
+
export declare function isWorkflowToolDefinition(value: unknown): boolean;
|
|
60
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{stampToolDefinition}from"#tools/definition.js";const WORKFLOW_TOOL_BRAND=Symbol.for(`eve:workflow-tool-brand`);function defineWorkflowTool(t){return stampToolDefinition(t,`defineWorkflowTool`),Object.assign(t,{[WORKFLOW_TOOL_BRAND]:!0})}function isWorkflowToolDefinition(e){return typeof e==`object`&&!!e&&Reflect.get(e,WORKFLOW_TOOL_BRAND)===!0}export{defineWorkflowTool,isWorkflowToolDefinition};
|
package/dist/src/vue/index.js
CHANGED
package/docs/agent-config.md
CHANGED
|
@@ -147,9 +147,9 @@ See [Default harness](./concepts/default-harness#compaction) for how the loop ap
|
|
|
147
147
|
|
|
148
148
|
## Runtime limits
|
|
149
149
|
|
|
150
|
-
Use `limits` for framework-owned runtime caps. Session
|
|
150
|
+
Use `limits` for framework-owned runtime caps. Session usage limits stop the
|
|
151
151
|
current durable session from starting another model call after accumulated
|
|
152
|
-
provider-reported
|
|
152
|
+
provider-reported tokens or model token cost reaches a configured limit:
|
|
153
153
|
|
|
154
154
|
```ts title="agent/agent.ts"
|
|
155
155
|
export default defineAgent({
|
|
@@ -157,6 +157,7 @@ export default defineAgent({
|
|
|
157
157
|
limits: {
|
|
158
158
|
maxInputTokensPerSession: 200_000,
|
|
159
159
|
maxOutputTokensPerSession: 20_000,
|
|
160
|
+
maxTokenCostUsdPerSession: 1.5,
|
|
160
161
|
sessionTimeoutMs: 7 * 24 * 60 * 60 * 1_000,
|
|
161
162
|
},
|
|
162
163
|
});
|
|
@@ -169,14 +170,13 @@ then emits `session.completed` and releases the continuation; the next
|
|
|
169
170
|
qualifying channel message starts fresh. Set it to `false` to disable the
|
|
170
171
|
timeout. Expiration does not delete stored session data.
|
|
171
172
|
|
|
172
|
-
Input
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
Input tokens, output tokens, and model token cost are checked independently.
|
|
174
|
+
The model call that crosses a limit is allowed to finish because exact usage
|
|
175
|
+
arrives after the call completes. Before the next model call, eve pauses the
|
|
175
176
|
session and sends a deterministic continuation prompt with two options:
|
|
176
|
-
**Approve** grants a fresh
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
— a user decision, not an error. The session stays resumable; because it is
|
|
177
|
+
**Approve** grants a fresh window of each configured size, and **Stop**
|
|
178
|
+
cancels the in-flight turn through the standard cancellation path
|
|
179
|
+
(`turn.cancelled` → `session.waiting`) — a user decision, not an error. The session stays resumable; because it is
|
|
180
180
|
still over budget, the next message re-raises the prompt. Declining a
|
|
181
181
|
delegated child's prompt cancels the root turn, which cascades to the whole
|
|
182
182
|
delegation tree — the delegating parent never receives an error result it
|
|
@@ -186,23 +186,28 @@ copy. The reply is processed once the budget is granted.
|
|
|
186
186
|
|
|
187
187
|
Sessions that cannot reach a human — task-mode runs such as schedules and
|
|
188
188
|
delegated runs without input proxying — skip the prompt and fail the next model
|
|
189
|
-
call with `SESSION_TOKEN_LIMIT_REACHED
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
call with `SESSION_TOKEN_LIMIT_REACHED` for token budgets or
|
|
190
|
+
`SESSION_TOKEN_COST_LIMIT_REACHED` for model token cost. A delegated task with
|
|
191
|
+
no inherited quota also fails instead of raising a continuation prompt that
|
|
192
|
+
could only grant another zero-value window.
|
|
192
193
|
|
|
193
194
|
When `maxInputTokensPerSession` is omitted, root sessions apply a default
|
|
194
195
|
input budget of `40_000_000` provider-reported input tokens.
|
|
195
|
-
`maxOutputTokensPerSession`
|
|
196
|
-
|
|
196
|
+
`maxOutputTokensPerSession` and `maxTokenCostUsdPerSession` are unset by
|
|
197
|
+
default. `maxTokenCostUsdPerSession` is a US-dollar limit on model token cost,
|
|
198
|
+
not tool or infrastructure spend. It uses the cost reported with each model
|
|
199
|
+
step; AI Gateway supplies this value, while model steps without reported cost
|
|
200
|
+
do not add to the limit. Set any usage limit to `false` to uncap that axis.
|
|
197
201
|
|
|
198
202
|
Delegated subagent sessions have no fixed default. Each child receives a
|
|
199
203
|
share of the delegating parent's remaining quota at dispatch time — the
|
|
200
204
|
remainder in the current budget window split evenly across the batch's local
|
|
201
205
|
subagent calls — and a completed child's usage counts against the parent's
|
|
202
|
-
quota
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
+
quota. Token-cost budgets follow the same rules, including splitting the
|
|
207
|
+
remaining US-dollar budget across a batch and adding completed child cost back
|
|
208
|
+
to the parent. Approving a continuation opens a fresh parent window for later
|
|
209
|
+
child grants without erasing lifetime usage. An authored child limit applies
|
|
210
|
+
only when it is tighter than the parent's grant; an uncapped parent delegates
|
|
206
211
|
uncapped children.
|
|
207
212
|
|
|
208
213
|
## Workflow world
|
|
@@ -250,7 +255,7 @@ installed package must stay external in hosted output, list it in
|
|
|
250
255
|
| -------------- | --------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
251
256
|
| `reasoning` | `AgentReasoningDefinition` | provider default | Provider-agnostic reasoning effort forwarded to the agent's turn model calls. |
|
|
252
257
|
| `modelOptions` | `AgentModelOptionsDefinition` | none | Provider option overrides forwarded to the model call. |
|
|
253
|
-
| `limits` | `AgentLimitsDefinition` | field-specific | Framework-owned runtime limits. Sessions complete after 30 days by default;
|
|
258
|
+
| `limits` | `AgentLimitsDefinition` | field-specific | Framework-owned runtime limits. Sessions complete after 30 days by default; usage-limit defaults and inheritance are described above. Set a limit to `false` to disable it. |
|
|
254
259
|
| `experimental` | `{ workflow?: { world?: string } }` | unset | Opt-in settings that can change or disappear in any release. Treat them as unstable. `workflow.world` selects the Workflow world package backing session state, queues, hooks, and streams on the root agent. |
|
|
255
260
|
| `outputSchema` | Standard Schema or a JSON Schema object | none | Structured return type for function-like invocations such as a subagent turn, schedule, or remote job. Ordinary interactive turns ignore it unless the client supplies a per-message schema. |
|
|
256
261
|
| `build` | `{ externalDependencies?: string[] }` | none | Hosted-build packaging controls. `externalDependencies` keeps listed packages external while eve compiles authored modules such as tools and channels, and traces those packages into the hosted output. |
|
package/docs/channels/eve.mdx
CHANGED
|
@@ -91,7 +91,7 @@ Stream a session as newline-delimited JSON from `GET /eve/v1/session/:sessionId/
|
|
|
91
91
|
|
|
92
92
|
### Cancel a turn
|
|
93
93
|
|
|
94
|
-
Post to `/eve/v1/session/:sessionId/cancel` to request cancellation of the active turn. You can include the observed `turnId` to keep a late request from cancelling a newer turn. Cancellation is asynchronous; confirm
|
|
94
|
+
Post to `/eve/v1/session/:sessionId/cancel` to request cancellation of the active turn. You can include the observed `turnId` to keep a late request from cancelling a newer turn. Include `tasks: true` to also cancel every background task owned by the session, including while the session is parked. Cancellation is asynchronous; confirm the turn boundary on the stream as `turn.cancelled` followed by `session.waiting`, and inspect task state in a later turn to confirm task cancellation.
|
|
95
95
|
|
|
96
96
|
See [Cancel the in-flight turn](../concepts/sessions-runs-and-streaming#cancel-the-in-flight-turn) for response statuses, HTTP status codes, subagent cancellation, and race behavior.
|
|
97
97
|
|
package/docs/channels/mcp.mdx
CHANGED
|
@@ -67,6 +67,8 @@ The authorization server identified by `issuer` must issue tokens accepted by th
|
|
|
67
67
|
|
|
68
68
|
`oauthResource()` does not issue tokens or run an authorization server. It decorates an ordinary inbound `AuthFn` with OAuth protected-resource metadata so `mcpChannel()` can publish discovery and add `resource_metadata` to Bearer challenges. Client registration, consent, token issuance, and authorization-server metadata remain the identity provider's responsibility.
|
|
69
69
|
|
|
70
|
+
Most hosted MCP clients (Claude, ChatGPT, Grok, and similar) register themselves with the authorization server through Dynamic Client Registration ([RFC 7591](https://www.rfc-editor.org/rfc/rfc7591)) the first time a user connects. Choose an issuer that supports it, or pre-register each client with the issuer before the demo. If registration fails, the client stops before it ever reaches eve.
|
|
71
|
+
|
|
70
72
|
### Verify the bearer token yourself
|
|
71
73
|
|
|
72
74
|
Use a custom `AuthFn` when token verification needs application-specific logic:
|
|
@@ -144,7 +146,7 @@ export default mcpChannel({
|
|
|
144
146
|
});
|
|
145
147
|
```
|
|
146
148
|
|
|
147
|
-
This allows anyone to invoke the agent. Every caller shares the anonymous principal, so invocation IDs become bearer capabilities until workflow retention expires. Use public access only when anonymous invocation is intentional.
|
|
149
|
+
This allows anyone to invoke the agent. Every caller shares the anonymous principal, so invocation IDs become bearer capabilities until workflow retention expires: anyone holding an ID can read, answer, or cancel that invocation. Use public access only when anonymous invocation is intentional. For a public demo, prefer [Interactive OAuth](#interactive-oauth) so each caller owns their own invocations.
|
|
148
150
|
|
|
149
151
|
## HTTP security
|
|
150
152
|
|
|
@@ -171,6 +173,10 @@ MCP clients receive four tools:
|
|
|
171
173
|
| `agent_update` | `{ invocationId, responses }` | Answer the complete pending human-input batch. |
|
|
172
174
|
| `agent_cancel` | `{ invocationId }` | Request cooperative cancellation of non-terminal work. |
|
|
173
175
|
|
|
176
|
+
The server also returns `instructions` from `initialize` and `server/discover` that summarize this
|
|
177
|
+
protocol for the connecting model, so a hosted client does not have to infer it from the tool
|
|
178
|
+
schemas alone.
|
|
179
|
+
|
|
174
180
|
`agent_start` creates one task-mode eve session and returns after durable acceptance without
|
|
175
181
|
waiting for the session continuation hook to become readable. Keep its `invocationId`, then call
|
|
176
182
|
`agent_get` until the invocation reaches a terminal state. While the status is `working`, wait at
|
|
@@ -179,15 +185,31 @@ least `pollAfterMs` before polling again.
|
|
|
179
185
|
The invocation response is discriminated by `status`:
|
|
180
186
|
|
|
181
187
|
- `working`: work is active; continue polling according to `pollAfterMs`.
|
|
182
|
-
- `input_required`: present `inputRequests`, then send the complete answer batch through `agent_update`. A successful update returns
|
|
188
|
+
- `input_required`: present `inputRequests`, then send the complete answer batch through `agent_update`. A successful update returns the current invocation state.
|
|
183
189
|
- `authorization_required`: present the returned sign-in URL, user code, or instructions. The connection callback resumes the invocation automatically; continue polling.
|
|
184
190
|
- `completed`: consume the optional `result`.
|
|
185
191
|
- `failed`: inspect the structured `error`.
|
|
186
192
|
- `cancelled`: cancellation reached a terminal state.
|
|
187
193
|
|
|
194
|
+
A tool result with `isError: true` means the call itself was rejected. A `failed` status means the call succeeded and the task itself failed. Handle them differently: correct the call in the first case, report the task failure in the second. Rejected calls carry `structuredContent.error` with a stable `code`, a short `message`, and `retryable`:
|
|
195
|
+
|
|
196
|
+
| `code` | Meaning | `retryable` |
|
|
197
|
+
| --------------- | ------------------------------------------------------------------------------ | ----------- |
|
|
198
|
+
| `invalid_input` | An argument was rejected, for example an oversized or external `outputSchema`. | `false` |
|
|
199
|
+
| `not_found` | The invocation does not exist, has expired, or belongs to another caller. | `false` |
|
|
200
|
+
| `conflict` | The invocation is not in the expected state; read it with `agent_get` first. | `true` |
|
|
201
|
+
| `internal` | eve failed; `errorId` correlates with server logs. No details are exposed. | `false` |
|
|
202
|
+
|
|
188
203
|
Cancellation is cooperative, so call `agent_get` after `agent_cancel` until the state becomes terminal.
|
|
189
204
|
|
|
190
|
-
Optional output schemas are limited to 64 KiB, 32 levels, and 2,048 nodes
|
|
205
|
+
Requests are bounded: the whole MCP request body is limited to 1 MiB, `message` to 64 KiB, each input-response `text` to 16 KiB (both measured as UTF-8 bytes, not characters), and one `agent_update` to 64 responses. Optional output schemas are limited to 64 KiB, 32 levels, and 2,048 nodes, and external `$ref` values are rejected. Oversized bodies receive a JSON-RPC `413`; oversized fields fail input validation before any work starts.
|
|
206
|
+
|
|
207
|
+
### Durability guarantees
|
|
208
|
+
|
|
209
|
+
- Once `agent_start` returns, the work is durable. A dropped HTTP connection, a client restart, or a closed MCP session does not cancel it. Only `agent_cancel` stops work.
|
|
210
|
+
- `agent_start` is not idempotent. If its response is lost, the client has no `invocationId` to check, and a second call starts a second task. Ask the user before starting again rather than retrying blindly.
|
|
211
|
+
- `agent_update` answers one pending batch. Re-sending the same answers after eve has accepted them returns the current invocation state; sending different answers for an already-answered batch is a conflict.
|
|
212
|
+
- `agent_cancel` is cooperative and can race with completion. Poll `agent_get` until the status is terminal (`cancelled`, `completed`, or `failed`), not specifically `cancelled`.
|
|
191
213
|
|
|
192
214
|
## Invocation ownership
|
|
193
215
|
|
|
@@ -134,7 +134,7 @@ import { sleep } from "eve/tools/sleep";
|
|
|
134
134
|
export default sleep();
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
The model calls it with `{ seconds }` when it is useful to wait before checking progress or status again.
|
|
137
|
+
The model calls it with `{ seconds }` when it is useful to wait before checking progress or status again. Each call runs as a durable tool workflow, so it does not hold an application runtime open, and the same turn continues automatically when the duration elapses. Concurrent `sleep` calls run in parallel, so the turn continues after the longest requested duration.
|
|
138
138
|
|
|
139
139
|
## What to read next
|
|
140
140
|
|
|
@@ -60,11 +60,22 @@ Crash the process, hit a timeout, or redeploy mid-turn, and the run picks up fro
|
|
|
60
60
|
|
|
61
61
|
There's nothing to configure. eve owns the workflow lifecycle, and sessions are durable by default.
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
For ordinary tools, eve manages the workflow around your executor. Use [`defineWorkflowTool`](../tools/workflows) when your own tool body needs durable waits, such as a timer, webhook, or human answer. Two surfaces give your own code session data: tools read the current session's metadata (id, turn, auth, parent lineage) via `ctx.session`, and [`defineState`](./state) reads or writes session-scoped durable state. See [State](./state) for the read/write model.
|
|
64
64
|
|
|
65
65
|
## Parked work
|
|
66
66
|
|
|
67
|
-
Some work has to wait, including a human approving a [tool](../tools) or an interactive OAuth sign-in for a [connection](../connections). At those points the turn parks durably. The workflow suspends and holds no compute until the input it's waiting on arrives, even if that's much later. When it does, the conversation picks up exactly where it left off.
|
|
67
|
+
Some work has to wait, including a human approving a [tool](../tools) or an interactive OAuth sign-in for a [connection](../connections). At those points the turn parks durably. The workflow suspends and holds no compute until the input it's waiting on arrives, even if that's much later. When it does, the conversation picks up exactly where it left off.
|
|
68
|
+
|
|
69
|
+
Background execution is a separate choice about result delivery. A background workflow tool
|
|
70
|
+
returns a task receipt so the parent turn can continue; the tool's workflow may then run or
|
|
71
|
+
suspend independently. A default workflow tool can suspend too, with its original tool call
|
|
72
|
+
still pending. Ordinary background tools run their executor inside the initiating step and do
|
|
73
|
+
not gain durable waits by setting `execution: "background"`.
|
|
74
|
+
|
|
75
|
+
A generator's `yield` reports progress; an awaited workflow operation provides the durable wait.
|
|
76
|
+
For background tools, ordinary yields are stream-only, while `yield task.postMessage(...)`
|
|
77
|
+
requests a parent-agent turn. See [background execution](../tools#background-execution) and
|
|
78
|
+
[workflow suspension](../tools/workflows#how-suspension-works) for the execution and result rules.
|
|
68
79
|
|
|
69
80
|
## Message delivery and steering
|
|
70
81
|
|
|
@@ -191,7 +191,15 @@ curl -X POST http://127.0.0.1:2000/eve/v1/session/<sessionId>/cancel
|
|
|
191
191
|
# {"ok":true,"sessionId":"<sessionId>","status":"accepted"}
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
By default, background tasks that were already admitted survive initiating-turn cancellation. Pass `tasks: true` to cancel every background task owned by the session as well. This works while the session is parked, so you can stop background work without resetting the session:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
curl -X POST http://127.0.0.1:2000/eve/v1/session/<sessionId>/cancel \
|
|
198
|
+
-H 'content-type: application/json' \
|
|
199
|
+
-d '{"tasks":true}'
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
`"accepted"` means the live session durably queued the request; cancellation completes asynchronously. Confirm turn cancellation on the stream as `turn.cancelled` followed by `session.waiting`. Inspect task state in a later turn to confirm task cancellation. The session then accepts the next message normally. Background work that has not yet been admitted is rejected with the cancelled step. Each cancelled child reports its own boundary on its child-session stream. A live but already-parked session returns `"accepted"`; plain cancellation is a no-op there, while `tasks: true` still cancels indexed tasks. `"no_active_turn"` means the session or channel address is unknown or terminal. Both statuses are success, so clients can fire and forget. See the [eve channel](../channels/eve) for the full route contract.
|
|
195
203
|
|
|
196
204
|
The HTTP route returns `202` for `"accepted"` and `200` for
|
|
197
205
|
`"no_active_turn"`. Only the accepted result includes `sessionId`.
|
|
@@ -59,7 +59,7 @@ const { session, response } = await client.sessions.create({
|
|
|
59
59
|
await response.result();
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
`clientContext` is
|
|
62
|
+
`clientContext` is ephemeral context for the current turn. Strings become user-role context messages, arrays of strings become multiple context messages, and objects are JSON-serialized into one context message. The context remains available to every model call in the turn, then disappears before the next turn. It isn't persisted to durable session history and doesn't dispatch a turn by itself.
|
|
63
63
|
|
|
64
64
|
## Send attachments
|
|
65
65
|
|
|
@@ -237,7 +237,7 @@ stream index after the captured prefix.
|
|
|
237
237
|
|
|
238
238
|
## Abort a request
|
|
239
239
|
|
|
240
|
-
Pass an `AbortSignal` to cancel the POST or stream. Aborting is local transport cancellation: turns are resumable across disconnects, so detaching never stops
|
|
240
|
+
Pass an `AbortSignal` to cancel the POST or stream. Aborting is local transport cancellation: turns are resumable across disconnects, so detaching never stops server-side work. Use `session.cancel()` to stop the active turn, or `session.cancel({ tasks: true })` to also stop background tasks owned by the session. Cancellation is asynchronous; watch the stream for `turn.cancelled` followed by `session.waiting`, and inspect task state in a later turn to confirm task cancellation.
|
|
241
241
|
|
|
242
242
|
Arm the timeout before awaiting `send()` so it covers the POST as well as the stream:
|
|
243
243
|
|
|
@@ -63,12 +63,14 @@ my-project/
|
|
|
63
63
|
└── agent/
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
In an eve workspace, eve discovers direct `agents/<name>/` children that contain nested or flat agent files and do not have their own `package.json`. Their directory names become their public identities, exposed at `/<name>/eve/v1/*`. A child with its own `package.json` is a separate package rather than a member of the parent eve workspace. Run an agent-specific command from a member directory or pass `--agent <name>` at the workspace root; interactive commands open a picker when the name is omitted. Run project-level build, link, and deploy commands from the workspace root. Workspace members share the root package, dependencies, and build scripts.
|
|
67
67
|
|
|
68
68
|
Create this layout with `eve init my-project --agents support,research`, or add one agent to an existing workspace with `eve init billing`.
|
|
69
69
|
|
|
70
70
|
With no authored `vercel.json#services`, `eve build` derives the complete Vercel Services graph on every build. If `vercel.json` declares `services`, that authored graph is authoritative instead; use `vercel build` to build and validate the complete project. This supports heterogeneous projects with frontends, private APIs, bindings, and other non-eve services without generated configuration files.
|
|
71
71
|
|
|
72
|
+
An authored eve service routed at `/eve/v1` already uses the protocol path; callbacks remain at `/eve/v1/callback/*`. A named mount such as `/support` adds that mount before the protocol path, giving `/support/eve/v1/callback/*`.
|
|
73
|
+
|
|
72
74
|
Deploy the linked project to production:
|
|
73
75
|
|
|
74
76
|
```bash
|