eve 0.50.0 → 0.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/src/acp/adapter.js +1 -1
- package/dist/src/channel/session.d.ts +2 -1
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +16 -20
- package/dist/src/chunks/{use-eve-agent-B5I-k6Ek.js → use-eve-agent-3DZuvuWE.js} +21 -10
- package/dist/src/chunks/{use-eve-agent-DUMU6dap.js → use-eve-agent-D7apPojZ.js} +21 -10
- package/dist/src/cli/acp/command.d.ts +1 -1
- package/dist/src/cli/acp/command.js +2 -2
- package/dist/src/cli/agent-command.d.ts +5 -0
- package/dist/src/cli/agent-command.js +1 -0
- package/dist/src/cli/application-command.d.ts +2 -0
- 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.d.ts +1 -1
- package/dist/src/cli/commands/build.js +1 -1
- package/dist/src/cli/commands/deploy.d.ts +2 -0
- package/dist/src/cli/commands/deploy.js +1 -1
- package/dist/src/cli/commands/init-agent-workspace.d.ts +14 -0
- package/dist/src/cli/commands/init-agent-workspace.js +1 -0
- package/dist/src/cli/commands/init.d.ts +2 -13
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/link.d.ts +2 -0
- package/dist/src/cli/commands/link.js +1 -1
- package/dist/src/cli/commands/preconditions.d.ts +15 -0
- package/dist/src/cli/commands/preconditions.js +1 -1
- package/dist/src/cli/commands/register-integration-commands.d.ts +1 -1
- package/dist/src/cli/commands/register-integration-commands.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/register-registry-commands.js +2 -2
- package/dist/src/cli/dev/environment.d.ts +1 -1
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/local-server-process.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/runner.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/invoke/command.d.ts +1 -1
- package/dist/src/cli/invoke/command.js +1 -1
- package/dist/src/cli/option-parsers.d.ts +1 -0
- package/dist/src/cli/option-parsers.js +1 -1
- package/dist/src/cli/run.js +3 -3
- package/dist/src/client/agent-info-schema.d.ts +0 -1
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/message-action-parts.js +1 -1
- 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/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/@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 +20 -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-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-metadata.d.ts +1 -0
- package/dist/src/context/keys.d.ts +0 -3
- package/dist/src/context/keys.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/cli/eval.js +1 -1
- package/dist/src/evals/mock-model.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-id.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-descendant-turns-step.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/channel-context.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +103 -0
- package/dist/src/execution/coordination-dispatch-shared.js +1 -0
- package/dist/src/execution/coordination-dispatch-step.d.ts +7 -0
- package/dist/src/execution/coordination-dispatch-step.js +1 -0
- package/dist/src/execution/create-session-step.d.ts +1 -2
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/deliver-payloads.js +1 -1
- package/dist/src/execution/dispatch-action-failures.d.ts +5 -5
- package/dist/src/execution/dispatch-action-failures.js +1 -1
- package/dist/src/execution/dispatch-start-operation.d.ts +1 -1
- package/dist/src/execution/dispatch-start-operation.js +1 -1
- package/dist/src/execution/durable-session-store.d.ts +1 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +1 -1
- package/dist/src/execution/inline-turn.d.ts +2 -0
- package/dist/src/execution/inline-turn.js +1 -1
- package/dist/src/execution/next-driver-action.d.ts +7 -13
- package/dist/src/execution/node-step.d.ts +1 -2
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/parked-delivery-wait.js +1 -1
- package/dist/src/execution/pending-turn-state.d.ts +1 -2
- package/dist/src/execution/pending-turn-state.js +1 -1
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/route-child-delivery.js +1 -1
- package/dist/src/execution/run-session-limits.d.ts +5 -5
- package/dist/src/execution/runtime-context.js +1 -1
- 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-command-inbox.d.ts +2 -3
- package/dist/src/execution/session-timeout-workflow.js +1 -1
- package/dist/src/execution/session.d.ts +2 -1
- package/dist/src/execution/session.js +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.d.ts +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +1 -1
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/task-event-callback.js +1 -1
- package/dist/src/execution/tasks/child/steps.d.ts +19 -11
- package/dist/src/execution/tasks/child/steps.js +1 -1
- package/dist/src/execution/tasks/child/update-step.d.ts +6 -0
- package/dist/src/execution/tasks/child/update-step.js +1 -0
- package/dist/src/execution/tasks/child/update.d.ts +7 -10
- package/dist/src/execution/tasks/child/update.js +1 -1
- package/dist/src/execution/tasks/child/workflow.d.ts +21 -27
- package/dist/src/execution/tasks/child/workflow.js +1 -1
- package/dist/src/execution/tasks/parent/control-shared.d.ts +6 -17
- package/dist/src/execution/tasks/parent/control-shared.js +1 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +15 -48
- package/dist/src/execution/tasks/parent/delegate.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.d.ts +19 -34
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +5 -15
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tasks/parent/run-parent.d.ts +2 -2
- 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/task-cancel.d.ts +11 -0
- package/dist/src/execution/tasks/parent/task-cancel.js +1 -0
- package/dist/src/execution/tasks/parent/tool-execution.d.ts +2 -3
- 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.d.ts +7 -0
- package/dist/src/execution/tools/subagent/accept-event-step.js +1 -0
- package/dist/src/execution/tools/subagent/emit-called-step.d.ts +9 -0
- package/dist/src/execution/tools/subagent/emit-called-step.js +1 -0
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +51 -0
- package/dist/src/execution/tools/subagent/invoke-agent.js +1 -0
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +37 -0
- package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -0
- package/dist/src/execution/tools/subagent/invoke-step.d.ts +55 -0
- package/dist/src/execution/tools/subagent/invoke-step.js +1 -0
- package/dist/src/execution/tools/subagent/receipt-identity.d.ts +11 -0
- package/dist/src/execution/tools/subagent/receipt-identity.js +1 -0
- package/dist/src/execution/{dispatch-runtime-actions-start.d.ts → tools/subagent/start.d.ts} +17 -5
- package/dist/src/execution/tools/subagent/start.js +1 -0
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +24 -0
- package/dist/src/execution/tools/subagent/task-agent-requests.js +1 -0
- package/dist/src/execution/tools/subagent/task-cancel.d.ts +10 -0
- package/dist/src/execution/tools/subagent/task-cancel.js +1 -0
- package/dist/src/execution/tools/tasks.d.ts +10 -0
- package/dist/src/execution/tools/tasks.js +1 -0
- package/dist/src/execution/{tool-run → tools/workflow}/answer.d.ts +1 -1
- package/dist/src/execution/tools/workflow/answer.js +1 -0
- package/dist/src/execution/tools/workflow/ask.d.ts +22 -0
- package/dist/src/execution/tools/workflow/ask.js +1 -0
- package/dist/src/execution/tools/workflow/background.d.ts +18 -0
- package/dist/src/execution/tools/workflow/background.js +1 -0
- package/dist/src/execution/tools/workflow/body.d.ts +25 -0
- package/dist/src/execution/tools/workflow/body.js +1 -0
- package/dist/src/execution/tools/workflow/cancel.d.ts +11 -0
- package/dist/src/execution/tools/workflow/cancel.js +1 -0
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +7 -0
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +1 -0
- package/dist/src/execution/tools/workflow/messages.d.ts +88 -0
- package/dist/src/execution/tools/workflow/messages.js +1 -0
- package/dist/src/execution/tools/workflow/owner-inbox.d.ts +13 -0
- package/dist/src/execution/tools/workflow/owner-inbox.js +1 -0
- package/dist/src/execution/tools/workflow/owner.d.ts +13 -0
- package/dist/src/execution/tools/workflow/owner.js +1 -0
- package/dist/src/execution/tools/workflow/run-control.d.ts +18 -0
- package/dist/src/execution/tools/workflow/run-control.js +1 -0
- package/dist/src/execution/tools/workflow/start.d.ts +33 -0
- package/dist/src/execution/tools/workflow/start.js +1 -0
- package/dist/src/execution/tools/workflow/types.d.ts +26 -0
- package/dist/src/execution/tools/workflow/types.js +1 -0
- package/dist/src/execution/tools/workflow/workflow.d.ts +3 -0
- package/dist/src/execution/tools/workflow/workflow.js +1 -0
- 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 +16 -0
- package/dist/src/execution/turn-workflow-tool-run.js +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 +14 -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.d.ts +3 -3
- package/dist/src/execution/wire/session-inbox-wire.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v1.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v4.d.ts +267 -0
- package/dist/src/execution/wire/session-inbox-wire.v4.js +1 -0
- package/dist/src/execution/wire/session-inbox-wire.v4.migration.d.ts +3 -0
- package/dist/src/execution/wire/session-inbox-wire.v4.migration.js +1 -0
- 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-finalization.d.ts +6 -0
- package/dist/src/execution/workflow-entry-finalization.js +1 -1
- package/dist/src/execution/workflow-entry.d.ts +2 -1
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +1 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/advertised-tools.d.ts +1 -7
- package/dist/src/harness/advertised-tools.js +1 -1
- package/dist/src/harness/background-tools.d.ts +8 -2
- package/dist/src/harness/{runtime-actions.d.ts → coordination.d.ts} +40 -27
- package/dist/src/harness/coordination.js +1 -0
- package/dist/src/harness/emission.d.ts +9 -2
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +52 -0
- package/dist/src/harness/hitl/session-limit-input-requests.js +1 -1
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +6 -2
- 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/stale-input-responses.js +1 -1
- package/dist/src/harness/step-hooks.d.ts +1 -2
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-call-action.js +1 -1
- package/dist/src/harness/tool-call-input-errors.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/turn-tag-state.d.ts +20 -21
- package/dist/src/harness/turn-tag-state.js +1 -1
- package/dist/src/harness/types.d.ts +9 -7
- package/dist/src/harness/workflow-interrupt-state.js +1 -1
- package/dist/src/harness/workflow-lifecycle.d.ts +10 -0
- package/dist/src/harness/workflow-lifecycle.js +1 -1
- package/dist/src/harness/workflow-sandbox.d.ts +1 -1
- package/dist/src/harness/workflow-sandbox.js +2 -2
- package/dist/src/harness/workflow-subagent-limit.d.ts +7 -7
- package/dist/src/harness/workflow-subagent-limit.js +1 -1
- package/dist/src/harness/workflow-task-state.d.ts +9 -0
- package/dist/src/harness/workflow-task-state.js +1 -0
- package/dist/src/harness/workflow-tool-runs.d.ts +27 -0
- package/dist/src/harness/workflow-tool-runs.js +1 -0
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/parent-lineage.js +1 -1
- package/dist/src/internal/agent-name.d.ts +4 -0
- package/dist/src/internal/agent-name.js +1 -0
- 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/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/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/start-development-server.js +1 -1
- package/dist/src/internal/nitro/host/start-production-server.js +3 -3
- 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/nitro/routes/runtime-stack.js +1 -1
- package/dist/src/internal/project-context.d.ts +31 -0
- package/dist/src/internal/project-context.js +1 -0
- package/dist/src/internal/vercel/assemble-eve-services.d.ts +17 -0
- package/dist/src/internal/vercel/assemble-eve-services.js +1 -0
- package/dist/src/internal/vercel/build-agent-workspace.d.ts +3 -0
- package/dist/src/internal/vercel/build-agent-workspace.js +1 -0
- package/dist/src/internal/vercel/build-command.d.ts +4 -0
- package/dist/src/internal/vercel/build-command.js +1 -0
- package/dist/src/internal/vercel/eve-service-contribution.d.ts +28 -0
- package/dist/src/internal/vercel/eve-service-contribution.js +1 -0
- package/dist/src/internal/vercel/vercel-service-config-operations.d.ts +18 -0
- package/dist/src/internal/vercel/vercel-service-config-operations.js +1 -0
- package/dist/src/internal/vercel/vercel-service-name.d.ts +6 -0
- package/dist/src/internal/vercel/vercel-service-name.js +1 -0
- package/dist/src/internal/vercel/vercel-services-config.d.ts +53 -0
- package/dist/src/internal/vercel/vercel-services-config.js +1 -0
- package/dist/src/internal/workflow/reference.d.ts +2 -0
- package/dist/src/internal/workflow/reference.js +1 -0
- package/dist/src/internal/workflow-bundle/authored-workflow-modules.d.ts +0 -9
- 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/workflow-builders.d.ts +1 -1
- 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 +1 -1
- package/dist/src/protocol/message.d.ts +2 -0
- package/dist/src/protocol/message.js +1 -1
- package/dist/src/public/channels/slack/action-status.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/file/backends/vercel-blob.js +1 -1
- package/dist/src/public/memory/index.js +1 -1
- package/dist/src/public/next/index.js +1 -1
- package/dist/src/public/next/vercel-output-config.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/workflow/index.d.ts +3 -1
- package/dist/src/public/workflow/index.js +1 -1
- package/dist/src/runtime/actions/results.d.ts +3 -3
- package/dist/src/runtime/actions/results.js +1 -1
- package/dist/src/runtime/agent/bootstrap-model-utils.js +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +1 -0
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/channels/registry.js +1 -1
- package/dist/src/runtime/prompt/compose.d.ts +0 -1
- package/dist/src/runtime/prompt/compose.js +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/sessions/turn.d.ts +16 -1
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/subagents/workflow-reference.d.ts +5 -0
- package/dist/src/runtime/subagents/workflow-reference.js +1 -0
- package/dist/src/runtime/subagents/workflow.d.ts +8 -0
- package/dist/src/runtime/subagents/workflow.js +1 -0
- package/dist/src/runtime/tools/registry.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/integrations/discord/setup.js +1 -1
- package/dist/src/setup/integrations/file-memory/vercel.js +1 -1
- package/dist/src/setup/integrations/linear/setup.js +1 -1
- package/dist/src/setup/integrations/linq/setup.js +3 -3
- package/dist/src/setup/integrations/shopify/setup.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/channels.d.ts +4 -12
- package/dist/src/setup/scaffold/update/channels.js +1 -1
- package/dist/src/setup/scaffold/update/web-options.js +1 -1
- package/dist/src/shared/action-types.d.ts +103 -30
- 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/json.js +1 -1
- 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-sandbox.d.ts +1 -1
- package/dist/src/{execution/subagent-adapter-state.d.ts → subagents/adapter-state.d.ts} +2 -0
- package/dist/src/{execution/subagent-adapter-state.js → subagents/adapter-state.js} +1 -1
- package/dist/src/subagents/adapter.js +1 -0
- package/dist/src/{harness → subagents}/agent-handle-errors.d.ts +6 -0
- package/dist/src/subagents/agent-handle-errors.js +1 -0
- package/dist/src/subagents/callback-route.js +1 -0
- package/dist/src/subagents/callback-step.js +1 -0
- package/dist/src/{execution/agent-continuation-bundle.d.ts → subagents/continuation-bundle.d.ts} +1 -1
- package/dist/src/subagents/continuation-bundle.js +1 -0
- package/dist/src/{execution/subagent-event-proxy-step.d.ts → subagents/event-proxy-step.d.ts} +2 -8
- package/dist/src/subagents/event-proxy-step.js +1 -0
- package/dist/src/subagents/handle-dispatch.d.ts +54 -0
- package/dist/src/subagents/handle-dispatch.js +1 -0
- package/dist/src/{harness → subagents}/handles/prompt.d.ts +4 -4
- package/dist/src/{harness → subagents}/handles/prompt.js +1 -1
- package/dist/src/{harness → subagents}/handles/query.d.ts +8 -2
- package/dist/src/subagents/handles/query.js +1 -0
- package/dist/src/subagents/handles/rebase.d.ts +4 -0
- package/dist/src/subagents/handles/rebase.js +1 -0
- package/dist/src/{harness → subagents}/handles/store.d.ts +90 -15
- package/dist/src/subagents/handles/store.js +1 -0
- package/dist/src/subagents/handles/transitions.d.ts +103 -0
- package/dist/src/subagents/handles/transitions.js +1 -0
- package/dist/src/{execution/delegated-parent-notification.d.ts → subagents/parent-notification.d.ts} +1 -7
- package/dist/src/subagents/parent-notification.js +1 -0
- package/dist/src/subagents/parent-result.js +1 -0
- package/dist/src/{execution/remote-agent-dispatch.d.ts → subagents/remote-dispatch.d.ts} +3 -2
- package/dist/src/subagents/remote-dispatch.js +1 -0
- package/dist/src/{execution/subagent-start-local.d.ts → subagents/start-local.d.ts} +5 -6
- package/dist/src/subagents/start-local.js +1 -0
- package/dist/src/{execution/subagent-start-remote.d.ts → subagents/start-remote.d.ts} +5 -5
- package/dist/src/subagents/start-remote.js +1 -0
- package/dist/src/subagents/token-budget.js +1 -0
- package/dist/src/{execution/subagent-tool.d.ts → subagents/tool.d.ts} +5 -3
- package/dist/src/subagents/tool.js +1 -0
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tasks/json.js +1 -1
- package/dist/src/tasks/session-index.d.ts +2 -3
- package/dist/src/tasks/session-index.js +1 -1
- package/dist/src/tasks/task-id.d.ts +3 -4
- package/dist/src/tasks/task-id.js +1 -1
- package/dist/src/tasks/transitions.d.ts +3 -47
- package/dist/src/tasks/transitions.js +1 -1
- package/dist/src/tasks/types.d.ts +70 -247
- package/dist/src/tasks/types.js +1 -1
- package/dist/src/tools/dynamic.d.ts +3 -1
- package/dist/src/tools/framework/agent.d.ts +18 -2
- package/dist/src/tools/framework/agent.js +1 -1
- package/dist/src/tools/framework/task-cancel.d.ts +2 -6
- package/dist/src/tools/framework/task-contract.d.ts +44 -65
- package/dist/src/tools/framework/task-contract.js +1 -1
- package/dist/src/tools/framework/task-update.d.ts +1 -0
- package/dist/src/tools/framework/task-update.js +1 -1
- package/dist/src/tools/provided/sleep.d.ts +2 -2
- 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/concepts/built-in-tools.md +10 -91
- package/docs/concepts/context-control.md +2 -2
- package/docs/concepts/execution-model-and-durability.mdx +1 -1
- package/docs/concepts/sessions-runs-and-streaming.md +11 -3
- package/docs/guides/client/streaming.mdx +1 -1
- package/docs/guides/deployment/vercel.mdx +20 -2
- package/docs/guides/dynamic-capabilities.md +2 -2
- package/docs/guides/frontend/overview.mdx +1 -1
- package/docs/guides/instrumentation-providers.md +242 -0
- package/docs/guides/instrumentation.md +2 -0
- package/docs/guides/meta.json +1 -0
- package/docs/guides/remote-agents.md +8 -9
- package/docs/memory/overview.mdx +1 -1
- package/docs/reference/cli.md +5 -2
- package/docs/sandbox.mdx +3 -1
- package/docs/subagents/index.mdx +9 -8
- package/docs/tools/overview.mdx +11 -10
- package/docs/tools/workflows.mdx +52 -18
- package/package.json +38 -13
- 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/execution/agent-continuation-bundle.js +0 -1
- package/dist/src/execution/agent-handle-dispatch.d.ts +0 -79
- package/dist/src/execution/agent-handle-dispatch.js +0 -1
- package/dist/src/execution/delegated-parent-notification.js +0 -1
- package/dist/src/execution/delegated-parent-result.js +0 -1
- package/dist/src/execution/delegation-tool.d.ts +0 -10
- package/dist/src/execution/delegation-tool.js +0 -1
- package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +0 -165
- package/dist/src/execution/dispatch-runtime-actions-shared.js +0 -1
- package/dist/src/execution/dispatch-runtime-actions-start.js +0 -1
- package/dist/src/execution/dispatch-runtime-actions-step.d.ts +0 -18
- package/dist/src/execution/dispatch-runtime-actions-step.js +0 -1
- package/dist/src/execution/dispatch-workflow-runtime-actions-step.d.ts +0 -18
- package/dist/src/execution/dispatch-workflow-runtime-actions-step.js +0 -1
- package/dist/src/execution/finalize-terminal-session.d.ts +0 -17
- package/dist/src/execution/finalize-terminal-session.js +0 -1
- package/dist/src/execution/prepared-agent-action.d.ts +0 -7
- package/dist/src/execution/prepared-agent-action.js +0 -1
- package/dist/src/execution/remote-agent-dispatch.js +0 -1
- package/dist/src/execution/session-callback-route.js +0 -1
- package/dist/src/execution/session-callback-step.js +0 -1
- package/dist/src/execution/subagent-adapter.js +0 -1
- package/dist/src/execution/subagent-event-proxy-step.js +0 -1
- package/dist/src/execution/subagent-start-local.js +0 -1
- package/dist/src/execution/subagent-start-remote.js +0 -1
- package/dist/src/execution/subagent-tool.js +0 -1
- package/dist/src/execution/tasks/child/instructions.d.ts +0 -3
- package/dist/src/execution/tasks/child/instructions.js +0 -1
- package/dist/src/execution/tasks/parent/agent-identity.d.ts +0 -13
- package/dist/src/execution/tasks/parent/agent-identity.js +0 -1
- package/dist/src/execution/tasks/parent/agent-views.d.ts +0 -7
- package/dist/src/execution/tasks/parent/agent-views.js +0 -1
- package/dist/src/execution/tasks/parent/continuation-dispatch.d.ts +0 -43
- package/dist/src/execution/tasks/parent/continuation-dispatch.js +0 -1
- package/dist/src/execution/tasks/parent/dispatch-task-step.d.ts +0 -19
- package/dist/src/execution/tasks/parent/dispatch-task-step.js +0 -1
- package/dist/src/execution/tool-run/answer.js +0 -1
- package/dist/src/execution/tool-run/background.d.ts +0 -14
- package/dist/src/execution/tool-run/background.js +0 -1
- package/dist/src/execution/tool-run/cancel.d.ts +0 -7
- package/dist/src/execution/tool-run/cancel.js +0 -1
- package/dist/src/execution/tool-run/dispatch.d.ts +0 -24
- package/dist/src/execution/tool-run/dispatch.js +0 -1
- package/dist/src/execution/tool-run/emit-run-report-step.d.ts +0 -7
- package/dist/src/execution/tool-run/emit-run-report-step.js +0 -1
- package/dist/src/execution/tool-run/messages.d.ts +0 -70
- package/dist/src/execution/tool-run/messages.js +0 -1
- package/dist/src/execution/tool-run/owner-inbox.d.ts +0 -11
- package/dist/src/execution/tool-run/owner-inbox.js +0 -1
- package/dist/src/execution/tool-run/owner.d.ts +0 -13
- package/dist/src/execution/tool-run/owner.js +0 -1
- package/dist/src/execution/tool-run/run-control.d.ts +0 -18
- package/dist/src/execution/tool-run/run-control.js +0 -1
- package/dist/src/execution/tool-run/start.d.ts +0 -11
- package/dist/src/execution/tool-run/start.js +0 -1
- package/dist/src/execution/tool-run/types.d.ts +0 -21
- package/dist/src/execution/tool-run/types.js +0 -1
- package/dist/src/execution/tool-run/workflow.d.ts +0 -9
- package/dist/src/execution/tool-run/workflow.js +0 -1
- package/dist/src/execution/tools/subagent/local.d.ts +0 -40
- package/dist/src/execution/tools/subagent/local.js +0 -1
- package/dist/src/execution/tools/subagent/remote.d.ts +0 -26
- package/dist/src/execution/tools/subagent/remote.js +0 -1
- package/dist/src/harness/agent-handle-errors.js +0 -1
- package/dist/src/harness/handles/query.js +0 -1
- package/dist/src/harness/handles/store.js +0 -1
- package/dist/src/harness/handles/transitions.d.ts +0 -167
- package/dist/src/harness/handles/transitions.js +0 -1
- package/dist/src/harness/runtime-actions.js +0 -1
- 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/subagent-depth.d.ts +0 -10
- package/dist/src/harness/subagent-depth.js +0 -1
- package/dist/src/harness/subagent-token-budget.js +0 -1
- package/dist/src/harness/tool-runs.d.ts +0 -21
- package/dist/src/harness/tool-runs.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/harness/workflow-runtime-action-state.d.ts +0 -9
- package/dist/src/harness/workflow-runtime-action-state.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/runtime/actions/keys.d.ts +0 -14
- package/dist/src/runtime/actions/keys.js +0 -1
- package/dist/src/tasks/wire.d.ts +0 -25
- package/dist/src/tasks/wire.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
- /package/dist/src/execution/{tool-run → tools/workflow}/owner-channels.d.ts +0 -0
- /package/dist/src/execution/{tool-run → tools/workflow}/owner-channels.js +0 -0
- /package/dist/src/execution/{tool-run → tools/workflow}/resume-hook-step.d.ts +0 -0
- /package/dist/src/execution/{tool-run → tools/workflow}/resume-hook-step.js +0 -0
- /package/dist/src/{execution/subagent-adapter.d.ts → subagents/adapter.d.ts} +0 -0
- /package/dist/src/{execution/session-callback-route.d.ts → subagents/callback-route.d.ts} +0 -0
- /package/dist/src/{execution/session-callback-step.d.ts → subagents/callback-step.d.ts} +0 -0
- /package/dist/src/{harness → subagents}/handles/operation-id.d.ts +0 -0
- /package/dist/src/{harness → subagents}/handles/operation-id.js +0 -0
- /package/dist/src/{harness → subagents}/handles/state-key.d.ts +0 -0
- /package/dist/src/{harness → subagents}/handles/state-key.js +0 -0
- /package/dist/src/{execution/subagent-hitl-proxy.d.ts → subagents/hitl-proxy.d.ts} +0 -0
- /package/dist/src/{execution/subagent-hitl-proxy.js → subagents/hitl-proxy.js} +0 -0
- /package/dist/src/{execution/subagent-invocation.d.ts → subagents/invocation.d.ts} +0 -0
- /package/dist/src/{execution/subagent-invocation.js → subagents/invocation.js} +0 -0
- /package/dist/src/{execution/delegated-parent-result.d.ts → subagents/parent-result.d.ts} +0 -0
- /package/dist/src/{execution/remote-agent-route-url.d.ts → subagents/remote-route-url.d.ts} +0 -0
- /package/dist/src/{execution/remote-agent-route-url.js → subagents/remote-route-url.js} +0 -0
- /package/dist/src/{harness/subagent-token-budget.d.ts → subagents/token-budget.d.ts} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ActivityObserverConfig, ChannelInstrumentationProjection, RunInput, SessionAuthContext, SessionCapabilities, SessionTraceContext } from "#channel/types.js";
|
|
2
2
|
import type { HarnessSession } from "#harness/types.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { RuntimeSubagentDispatchRequest } from "#shared/action-types.js";
|
|
4
4
|
import type { JsonObject } from "#shared/json.js";
|
|
5
5
|
/**
|
|
6
|
-
* Pending
|
|
6
|
+
* Pending task batch event metadata needed for child run lineage.
|
|
7
7
|
*/
|
|
8
8
|
interface BatchEventMetadata {
|
|
9
9
|
readonly sequence: number;
|
|
@@ -47,7 +47,7 @@ export interface SubagentSandboxGraph {
|
|
|
47
47
|
* Builds the {@link RunInput} for one delegated subagent child run.
|
|
48
48
|
*/
|
|
49
49
|
export declare function buildSubagentRunInput(input: {
|
|
50
|
-
readonly action:
|
|
50
|
+
readonly action: RuntimeSubagentDispatchRequest;
|
|
51
51
|
readonly auth: SessionAuthContext | null;
|
|
52
52
|
readonly batchEvent: BatchEventMetadata;
|
|
53
53
|
/**
|
|
@@ -79,5 +79,7 @@ export declare function buildSubagentRunInput(input: {
|
|
|
79
79
|
readonly activityObserver?: ActivityObserverConfig;
|
|
80
80
|
readonly session: HarnessSession;
|
|
81
81
|
readonly source: SubagentInputSource;
|
|
82
|
+
/** Owning task when this child starts from a background workflow tool. */
|
|
83
|
+
readonly taskId?: string;
|
|
82
84
|
}): SubagentRunInputBuild;
|
|
83
85
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mintSubagentContinuationToken}from"#execution/session.js";import{SUBAGENT_ADAPTER_KIND}from"#subagents/adapter-state.js";import{formatSubagentInput,normalizeRequestedOutputSchema}from"#subagents/invocation.js";import{resolveRemainingSessionTokenLimits}from"#subagents/token-budget.js";function buildSubagentRunInput(n){let{action:r,auth:i,batchEvent:a,capabilities:o,channelMetadata:s,initiatorAuth:c,session:l,source:u}=n,d=mintSubagentContinuationToken(`${l.sessionId}:${r.callId}`),f=l.rootSessionId??l.sessionId,p=resolveRemainingSessionTokenLimits(l,n.fanoutSize),m=normalizeRequestedOutputSchema(r.input.outputSchema),h={callId:r.callId,parentContinuationToken:n.parentContinuationToken??l.continuationToken,parentSessionId:l.sessionId,subagentName:r.subagentName};n.taskId!==void 0&&(h.taskId=n.taskId),(n.graph?.nodesByNodeId.get(r.nodeId)?.sandboxRegistry.sandbox?.definition.inheritsParent===!0||n.selfAgent)&&(l.sandboxState!==void 0&&(h.parentSandboxState=l.sandboxState),h.sandboxSessionId=n.sandboxSessionId??l.sessionId);let g={adapter:{kind:SUBAGENT_ADAPTER_KIND,state:h},auth:i,capabilities:o,channelMetadata:s,continuationToken:d,initiatorAuth:c,input:{message:formatSubagentCallInputMessage({action:r,source:u}),outputSchema:m??u.outputSchema},limits:p,mode:`conversation`,parent:{callId:r.callId,rootSessionId:f,sessionId:l.sessionId,turn:{id:a.turnId,sequence:a.sequence}},parentTraceContext:n.parentTraceContext,activityObserver:n.activityObserver};return n.taskId!==void 0&&(g.taskId=n.taskId),{childContinuationToken:d,runInput:g}}function formatSubagentCallInputMessage(e){let{message:t}=e.action.input;switch(e.source.type){case`local`:return formatSubagentInput({description:e.source.description,message:t,name:e.action.subagentName,type:`local`}).message;case`runtime`:return formatSubagentInput({message:t,name:e.action.subagentName,type:`runtime`}).message;default:return e.source}}export{buildSubagentRunInput};
|
package/dist/src/svelte/index.js
CHANGED
package/dist/src/tasks/json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{TASK_VIEW_JSON_SCHEMA}from"#tools/framework/task-contract.js";function taskViewToJson(t){return TASK_VIEW_JSON_SCHEMA.parse(t)}function taskViewsToJson(e){return{tasks:e.map(e=>taskViewToJson(e))}}export{taskViewToJson,taskViewsToJson};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HarnessSession, SessionStateMap } from "#harness/types.js";
|
|
2
2
|
import type { TaskExecutorBinding } from "#tools/task.js";
|
|
3
|
-
import { type
|
|
3
|
+
import { type TaskMetadata, type TaskView } from "#tasks/types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Session-state key for the parent's live-task index.
|
|
6
6
|
*
|
|
@@ -29,8 +29,7 @@ export interface SessionTaskIndexEntry {
|
|
|
29
29
|
readonly createdByStepIndex?: number;
|
|
30
30
|
readonly createdByTurnId: string;
|
|
31
31
|
readonly executor?: TaskExecutorBinding;
|
|
32
|
-
readonly metadata:
|
|
33
|
-
readonly operationId?: string;
|
|
32
|
+
readonly metadata: TaskMetadata;
|
|
34
33
|
}
|
|
35
34
|
/**
|
|
36
35
|
* Reads and validates the task index from session state.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{sameTaskMetadata}from"#tasks/types.js";const SESSION_TASKS_STATE_KEY=`eve.tasks`,taskMetadataSchema=z.
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{sameTaskMetadata}from"#tasks/types.js";const SESSION_TASKS_STATE_KEY=`eve.tasks`,taskMetadataSchema=z.looseObject({kind:z.string().min(1),name:z.string().min(1)}),taskViewBaseShape={executor:z.strictObject({binding:z.strictObject({data:z.record(z.string(),z.custom()),kind:z.string().min(1)}).optional()}).optional(),metadata:taskMetadataSchema,taskId:z.string().min(1),usage:z.strictObject({cacheReadTokens:z.number().nonnegative(),cacheWriteTokens:z.number().nonnegative(),inputTokens:z.number().nonnegative(),outputTokens:z.number().nonnegative()}).optional()},taskViewSchema=z.discriminatedUnion(`status`,[z.strictObject({...taskViewBaseShape,lastOutput:z.strictObject({data:z.custom(),type:z.literal(`result`)}),status:z.literal(`completed`)}),z.strictObject({...taskViewBaseShape,lastOutput:z.strictObject({data:z.custom(),type:z.literal(`error`)}),status:z.literal(`failed`)}),z.strictObject({...taskViewBaseShape,status:z.literal(`cancelled`)})]),sessionTaskIndexEntrySchema=z.strictObject({taskInboxToken:z.string().min(1),createdByStepIndex:z.number().int().nonnegative().optional(),createdByTurnId:z.string().min(1),executor:z.strictObject({data:z.record(z.string(),z.custom()),kind:z.string().min(1)}).optional(),metadata:taskMetadataSchema,taskId:z.string().min(1),taskRunId:z.string().min(1),terminalView:taskViewSchema.optional()}),sessionTaskIndexSchema=z.strictObject({tasks:z.array(sessionTaskIndexEntrySchema),version:z.literal(2)}).refine(e=>new Set(e.tasks.map(e=>e.taskId)).size===e.tasks.length,{message:`Task ids must be unique.`}).refine(e=>e.tasks.every(e=>e.terminalView===void 0||e.terminalView.taskId===e.taskId&&sameTaskMetadata(e.terminalView.metadata,e.metadata)),{message:`Cached terminal views must match their task index entry.`});function getSessionTaskIndex(e){let t=e?.[SESSION_TASKS_STATE_KEY];if(t===void 0)return[];let n=typeof t==`object`&&t?Reflect.get(t,`version`):void 0;if(n!==2)throw Error(`Unsupported task index version ${JSON.stringify(n)} under session state key "${SESSION_TASKS_STATE_KEY}"; expected version 2.`);let r=sessionTaskIndexSchema.safeParse(t);if(!r.success)throw Error(`Corrupt task index under session state key "${SESSION_TASKS_STATE_KEY}": ${r.error.message}`);return r.data.tasks}function cacheTerminalTaskView(e,n){if(!isValidTerminalView(n))throw Error(`Cannot cache invalid terminal task "${n.taskId}".`);let r=getSessionTaskIndex(e),i=r.findIndex(e=>e.taskId===n.taskId);if(i<0)return e;if(!sameTaskMetadata(r[i].metadata,n.metadata))throw Error(`Task view metadata does not match index entry "${n.taskId}".`);let a=[...r];return a[i]={...a[i],terminalView:n},{...e,[SESSION_TASKS_STATE_KEY]:{tasks:a,version:2}}}function isValidTerminalView(e){if(e.inputRequests!==void 0)return!1;switch(e.status){case`completed`:return e.lastOutput?.type===`result`;case`failed`:return e.lastOutput?.type===`error`;case`cancelled`:return e.lastOutput===void 0;case`working`:return!1}}function findSessionTaskEntry(e,t){return getSessionTaskIndex(e).find(e=>e.taskId===t)}function recordSessionTask(e,t){let n=[...getSessionTaskIndex(e.state).filter(e=>e.taskId!==t.taskId),t];return{...e,state:{...e.state,[SESSION_TASKS_STATE_KEY]:{tasks:n,version:2}}}}export{SESSION_TASKS_STATE_KEY,cacheTerminalTaskView,findSessionTaskEntry,getSessionTaskIndex,recordSessionTask};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Derives the stable task id for one originating
|
|
2
|
+
* Derives the stable task id for one originating background call.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* for the same call yields the same task without new machinery, and a
|
|
4
|
+
* Uses `hash(parentSessionId, parentTurnId, callId)` so replayed creation
|
|
5
|
+
* for the same call yields the same task, and a
|
|
7
6
|
* task can never be confused with a child session id or continuation
|
|
8
7
|
* token.
|
|
9
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createHash}from"node:crypto";
|
|
1
|
+
import{createHash}from"node:crypto";function deriveTaskId(e){return`task_${createHash(`sha256`).update(`${e.parentSessionId}\0${e.parentTurnId}\0${e.callId}`).digest(`hex`).slice(0,24)}`}function deriveTaskInboxToken(e){return`task:${e.taskId}:${createHash(`sha256`).update(`${e.taskId}\0${e.parentContinuationToken}`).digest(`hex`).slice(0,32)}`}export{deriveTaskId,deriveTaskInboxToken};
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
* Action taken on one command applied to a task view.
|
|
4
|
-
*
|
|
5
|
-
* - `accepted`: the view changed; the new view must be appended.
|
|
6
|
-
* - `noop`: the command is recognized and benign (idempotent cancel,
|
|
7
|
-
* stale answer); nothing changed and nothing is appended.
|
|
8
|
-
* - `rejected`: the command is invalid for the current status; the
|
|
9
|
-
* reason is diagnostic only.
|
|
10
|
-
*/
|
|
11
|
-
type TaskTransitionResult = {
|
|
1
|
+
import { type TaskCommand, type TaskView } from "#tasks/types.js";
|
|
2
|
+
export type TaskTransitionResult = {
|
|
12
3
|
readonly action: "accepted";
|
|
13
4
|
readonly view: TaskView;
|
|
14
5
|
} | {
|
|
@@ -19,40 +10,5 @@ type TaskTransitionResult = {
|
|
|
19
10
|
readonly view: TaskView;
|
|
20
11
|
readonly reason: string;
|
|
21
12
|
};
|
|
22
|
-
/**
|
|
23
|
-
* Pure transition function for the task lifecycle:
|
|
24
|
-
*
|
|
25
|
-
* ```text
|
|
26
|
-
* working <-> input_required
|
|
27
|
-
* | |
|
|
28
|
-
* +-----> completed
|
|
29
|
-
* +-----> failed
|
|
30
|
-
* +-----> cancelled
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* Terminal states are final: a late child result can never revive a
|
|
34
|
-
* cancelled task, and repeated cancellation is idempotent. The durable
|
|
35
|
-
* task run is the only caller that persists accepted views, which is
|
|
36
|
-
* what serializes competing completion, cancellation, and input
|
|
37
|
-
* transitions.
|
|
38
|
-
*
|
|
39
|
-
* Orthogonal to the status, the view carries private executor state
|
|
40
|
-
* (`TaskExecutorState`) with its own lifecycle. These commands move
|
|
41
|
-
* executor fields, never the status above:
|
|
42
|
-
*
|
|
43
|
-
* ```text
|
|
44
|
-
* binding: unset --bind-------> bound (replay noop, conflict rejected)
|
|
45
|
-
* address: unset --start-turn-> session pinned (turn id updated per delivery)
|
|
46
|
-
* verdict: unset --complete/fail/cancel/settle-executor-> parked | terminal
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* - `bind` writes the executor binding exactly once: replaying the
|
|
50
|
-
* same binding is a noop, a different one is rejected.
|
|
51
|
-
* - `start-turn` records the child session/turn ids used to address
|
|
52
|
-
* the executor, rejecting a child-session mismatch.
|
|
53
|
-
* - Terminal commands and a late `settle-executor` record the child's
|
|
54
|
-
* lifecycle verdict: `parked` means the child session survived and
|
|
55
|
-
* can take another delivery, `terminal` means it ended with the turn.
|
|
56
|
-
*/
|
|
13
|
+
/** Pure, executor-neutral transition function for one durable task. */
|
|
57
14
|
export declare function applyTaskTransition(view: TaskView, command: TaskCommand): TaskTransitionResult;
|
|
58
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsonValuesEqual}from"#shared/json.js";import{isTerminalTaskStatus,readTaskInputRequestId}from"#tasks/types.js";function terminalView(e,t,n){let r
|
|
1
|
+
import{jsonValuesEqual}from"#shared/json.js";import{isTerminalTaskStatus,readTaskInputRequestId}from"#tasks/types.js";function terminalView(e,t,n){let r=`usage`in t?t.usage:void 0,i={executor:e.executor,metadata:e.metadata,taskId:e.taskId};switch(r!==void 0&&(i.usage=r),n.status){case`completed`:return{...i,lastOutput:n.lastOutput,status:`completed`};case`failed`:return{...i,lastOutput:n.lastOutput,status:`failed`};case`cancelled`:return{...i,status:`cancelled`}}}function applyTaskTransition(r,i){if(i.kind===`bind`){let t=r.executor?.binding;return t!==void 0&&t.kind===i.executor.kind&&jsonValuesEqual(t.data,i.executor.data)?{action:`noop`,view:r}:t===void 0?{action:`accepted`,view:{...r,executor:{...r.executor,binding:i.executor}}}:{action:`rejected`,reason:`Task "${r.taskId}" already has an executor binding.`,view:r}}if(isTerminalTaskStatus(r.status))return i.kind===`cancel`&&r.status===`cancelled`?{action:`noop`,view:r}:{action:`rejected`,reason:`Task "${r.taskId}" is already ${r.status}; "${i.kind}" cannot change a terminal task.`,view:r};switch(i.kind){case`complete`:return{action:`accepted`,view:terminalView(r,i,{lastOutput:{data:i.data,type:`result`},status:`completed`})};case`fail`:case`reject-dispatch`:return{action:`accepted`,view:terminalView(r,i,{lastOutput:{data:i.data,type:`error`},status:`failed`})};case`cancel`:return{action:`accepted`,view:terminalView(r,i,{status:`cancelled`})};case`require-input`:return isValidInputRequestBatch(i.inputRequests)?{action:`accepted`,view:{inputRequests:i.inputRequests,executor:r.executor,metadata:r.metadata,status:`input_required`,taskId:r.taskId}}:{action:`rejected`,reason:`Task "${r.taskId}" received an invalid input request batch.`,view:r};case`ready`:return{action:`accepted`,view:r};case`answered`:{if(r.status!==`input_required`)return{action:`noop`,view:r};let e=new Set(i.requestIds),t=r.inputRequests.filter(t=>{let r=readTaskInputRequestId(t);return r===void 0||!e.has(r)});return t.length===r.inputRequests.length?{action:`noop`,view:r}:t.length>0?{action:`accepted`,view:{...r,inputRequests:t}}:{action:`accepted`,view:{executor:r.executor,metadata:r.metadata,status:`working`,taskId:r.taskId}}}}}function isValidInputRequestBatch(e){if(e.length===0)return!1;let t=e.map(readTaskInputRequestId);return t.every(e=>e!==void 0&&e.length>0)&&new Set(t).size===t.length}export{applyTaskTransition};
|
|
@@ -1,87 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SubagentAuthorizationEvent, SubagentAuthorizationEventHookPayload } from "#channel/types.js";
|
|
2
|
+
import type { WorkflowToolAgentRequest } from "#execution/tools/workflow/messages.js";
|
|
2
3
|
import { type JsonValue } from "#shared/json.js";
|
|
3
4
|
import type { TaskExecutorBinding } from "#tools/task.js";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Task lifecycle contract for `experimental.tasks`.
|
|
7
|
-
*
|
|
8
|
-
* A task is one durable unit of delegated work owned by a parent session.
|
|
9
|
-
* The durable task run is the single writer for lifecycle transitions
|
|
10
|
-
* (see `#execution/tasks/child/workflow.js`); every other path submits
|
|
11
|
-
* commands and reads views. This module is dependency-free on
|
|
12
|
-
* purpose: it is bundled into workflow bodies, which reject Node.js
|
|
13
|
-
* builtins and heavyweight validators.
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* Task lifecycle status.
|
|
17
|
-
*
|
|
18
|
-
* `completed`, `failed`, and `cancelled` are terminal and final.
|
|
19
|
-
* `input_required` is not terminal but is ready for parent action; the
|
|
20
|
-
* child must wake its parent rather than deadlock while waiting for input.
|
|
21
|
-
*/
|
|
5
|
+
/** Durable lifecycle status for one unit of background work. */
|
|
22
6
|
export type TaskStatus = "working" | "input_required" | "completed" | "failed" | "cancelled";
|
|
23
|
-
/**
|
|
24
|
-
* Immutable identity of the delegated work behind a task.
|
|
25
|
-
*
|
|
26
|
-
* `agentId` is parent-controlled and exists before the child acknowledges its
|
|
27
|
-
* private address, so the durable task can bind to persistent identity before
|
|
28
|
-
* the dispatch side effect runs.
|
|
29
|
-
*/
|
|
7
|
+
/** Executor-neutral identity shown for one task. */
|
|
30
8
|
export interface TaskMetadata {
|
|
31
|
-
/** Stable model-visible identity of the persistent child session. */
|
|
32
|
-
readonly agentId: string;
|
|
33
|
-
readonly kind: "subagent";
|
|
34
|
-
readonly mode: "local" | "remote";
|
|
35
|
-
/** Authored subagent name the parent dispatched. */
|
|
36
|
-
readonly name: string;
|
|
37
|
-
}
|
|
38
|
-
export type SubagentTaskMetadata = TaskMetadata;
|
|
39
|
-
/** Executor-neutral metadata retained by a non-subagent durable task. */
|
|
40
|
-
export interface BackgroundTaskMetadata {
|
|
41
9
|
readonly kind: string;
|
|
42
10
|
readonly name: string;
|
|
11
|
+
readonly [key: string]: JsonValue | undefined;
|
|
43
12
|
}
|
|
44
|
-
export
|
|
45
|
-
export declare function createSubagentTaskMetadata(metadata: Omit<SubagentTaskMetadata, "kind" | "name"> & {
|
|
46
|
-
readonly name: string;
|
|
47
|
-
}): SubagentTaskMetadata;
|
|
48
|
-
export declare function readSubagentTaskMetadata(task: {
|
|
49
|
-
readonly executor?: TaskExecutorBinding | TaskExecutorState;
|
|
50
|
-
readonly metadata: DurableTaskMetadata;
|
|
51
|
-
}): SubagentTaskMetadata | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* Durable subagent executor binding payload: the child's stable identity and
|
|
54
|
-
* private delivery address, copied from the parent's agent handle store at
|
|
55
|
-
* delegation time. Every field derives deterministically from the
|
|
56
|
-
* originating call (operation-hashed id, dispatch-chosen continuation
|
|
57
|
-
* token), so a replayed delegation produces a deep-equal binding — the
|
|
58
|
-
* equality the task run's `bind` replay check compares.
|
|
59
|
-
*/
|
|
60
|
-
export interface SubagentExecutorData {
|
|
61
|
-
readonly address: AgentAddress;
|
|
62
|
-
readonly identity: AgentIdentity;
|
|
63
|
-
}
|
|
64
|
-
export declare function createSubagentExecutorBinding(executor: SubagentExecutorData): TaskExecutorBinding;
|
|
65
|
-
export declare function readSubagentExecutor(executor: TaskExecutorBinding | TaskExecutorState | undefined): SubagentExecutorData | undefined;
|
|
66
|
-
export declare function sameTaskMetadata(left: DurableTaskMetadata, right: DurableTaskMetadata): boolean;
|
|
67
|
-
/** Private executor state retained for cancellation and address reconciliation. */
|
|
68
|
-
export interface TaskExecutorState {
|
|
69
|
-
/** Write-once executor address recorded by the `bind` command. */
|
|
70
|
-
readonly binding?: TaskExecutorBinding;
|
|
71
|
-
readonly childSessionId?: string;
|
|
72
|
-
readonly childTurnId?: string;
|
|
73
|
-
/**
|
|
74
|
-
* Child-session verdict from the last settled turn: `parked` survived
|
|
75
|
-
* and can take another delivery, `terminal` ended with the turn.
|
|
76
|
-
*/
|
|
77
|
-
readonly lifecycle?: "parked" | "terminal";
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Terminal task output. Failure is the state (`failed`); the `error`
|
|
81
|
-
* output is its consequence — a `failed` task always carries one.
|
|
82
|
-
* This intentionally diverges from MCP, which reserves `failed` for
|
|
83
|
-
* protocol-level errors.
|
|
84
|
-
*/
|
|
13
|
+
export declare function sameTaskMetadata(left: TaskMetadata, right: TaskMetadata): boolean;
|
|
85
14
|
export type TaskOutput = {
|
|
86
15
|
readonly type: "result";
|
|
87
16
|
readonly data: JsonValue;
|
|
@@ -89,67 +18,29 @@ export type TaskOutput = {
|
|
|
89
18
|
readonly type: "error";
|
|
90
19
|
readonly data: JsonValue;
|
|
91
20
|
};
|
|
92
|
-
/**
|
|
93
|
-
* One outstanding request forwarded from a blocked child. Carried
|
|
94
|
-
* opaquely: the task layer routes the batch, the input contract owns
|
|
95
|
-
* its shape.
|
|
96
|
-
*/
|
|
21
|
+
/** An outstanding request carried opaquely by the task lifecycle. */
|
|
97
22
|
export type TaskInputRequest = JsonValue;
|
|
98
|
-
/**
|
|
99
|
-
* Provider token usage a child turn reported. Structural on purpose: it
|
|
100
|
-
* mirrors `TokenUsage` (#shared/token-usage.js) without importing its
|
|
101
|
-
* zod-backed module into a workflow-bundled file.
|
|
102
|
-
*/
|
|
103
23
|
export interface TaskUsage {
|
|
104
24
|
readonly cacheReadTokens: number;
|
|
105
25
|
readonly cacheWriteTokens: number;
|
|
26
|
+
readonly costUsd?: number;
|
|
106
27
|
readonly inputTokens: number;
|
|
107
28
|
readonly outputTokens: number;
|
|
108
29
|
}
|
|
109
|
-
/**
|
|
110
|
-
* Validates one wire-carried usage value into {@link TaskUsage}.
|
|
111
|
-
* Anything malformed is dropped rather than rejected: retention is
|
|
112
|
-
* best-effort and must never fail a lifecycle transition.
|
|
113
|
-
*/
|
|
30
|
+
/** Reads valid provider usage without making task settlement depend on it. */
|
|
114
31
|
export declare function readTaskUsage(value: unknown): TaskUsage | undefined;
|
|
115
|
-
/**
|
|
116
|
-
* One human answer to an outstanding request. Structural on purpose: it
|
|
117
|
-
* mirrors the input contract's `InputResponse` without importing its
|
|
118
|
-
* zod-backed module into a workflow-bundled file.
|
|
119
|
-
*/
|
|
120
|
-
export interface TaskInputResponse {
|
|
121
|
-
readonly optionId?: string;
|
|
122
|
-
readonly requestId: string;
|
|
123
|
-
readonly text?: string;
|
|
124
|
-
}
|
|
125
|
-
/** Stable task blocker id shared by one authorization attempt's events. */
|
|
126
|
-
export declare function taskAuthorizationRequestId(event: SubagentAuthorizationEvent): string;
|
|
127
|
-
/** Reads the `requestId` of one opaque outstanding request. */
|
|
32
|
+
/** Reads the request identity from one opaque request. */
|
|
128
33
|
export declare function readTaskInputRequestId(request: TaskInputRequest): string | undefined;
|
|
129
|
-
/** Fields shared by every durable task view. */
|
|
130
34
|
interface TaskViewBase {
|
|
131
35
|
readonly taskId: string;
|
|
132
|
-
readonly metadata:
|
|
133
|
-
/** Private executor state
|
|
134
|
-
readonly executor?:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
* budgets stay best-effort until a reservation model lands — and
|
|
139
|
-
* deliberately excluded from model-visible task views (tasks/json.ts).
|
|
140
|
-
*/
|
|
36
|
+
readonly metadata: TaskMetadata;
|
|
37
|
+
/** Private executor state, excluded from model-visible JSON. */
|
|
38
|
+
readonly executor?: {
|
|
39
|
+
readonly binding?: TaskExecutorBinding;
|
|
40
|
+
};
|
|
41
|
+
/** Retained for accounting, excluded from model-visible JSON. */
|
|
141
42
|
readonly usage?: TaskUsage;
|
|
142
43
|
}
|
|
143
|
-
/**
|
|
144
|
-
* Full durable task view discriminated by lifecycle status.
|
|
145
|
-
*
|
|
146
|
-
* The task run appends one per accepted command; readers always observe a
|
|
147
|
-
* complete view, never a delta. A view never contains routing credentials,
|
|
148
|
-
* continuation tokens, or authorization capabilities.
|
|
149
|
-
*
|
|
150
|
-
* Completed and failed tasks carry their corresponding output, cancelled
|
|
151
|
-
* tasks carry no output, and only input-required tasks carry requests.
|
|
152
|
-
*/
|
|
153
44
|
export type TaskView = TaskViewBase & ({
|
|
154
45
|
readonly status: "working";
|
|
155
46
|
readonly inputRequests?: never;
|
|
@@ -175,171 +66,103 @@ export type TaskView = TaskViewBase & ({
|
|
|
175
66
|
readonly inputRequests?: never;
|
|
176
67
|
readonly lastOutput?: never;
|
|
177
68
|
});
|
|
178
|
-
/**
|
|
69
|
+
/** Executor-neutral commands accepted by the durable task run. */
|
|
179
70
|
export type TaskCommand = {
|
|
180
71
|
readonly executor: TaskExecutorBinding;
|
|
181
72
|
readonly kind: "bind";
|
|
182
73
|
} | {
|
|
183
74
|
readonly kind: "complete";
|
|
184
75
|
readonly data: JsonValue;
|
|
185
|
-
readonly lifecycle?: "parked" | "terminal";
|
|
186
76
|
readonly usage?: TaskUsage;
|
|
187
77
|
} | {
|
|
188
78
|
readonly kind: "fail";
|
|
189
79
|
readonly data: JsonValue;
|
|
190
|
-
readonly lifecycle?: "parked" | "terminal";
|
|
191
80
|
readonly usage?: TaskUsage;
|
|
192
|
-
}
|
|
193
|
-
/** Terminal dispatch rejection for a task that was never indexed by its parent. */
|
|
194
|
-
| {
|
|
81
|
+
} | {
|
|
195
82
|
readonly kind: "reject-dispatch";
|
|
196
83
|
readonly data: JsonValue;
|
|
197
|
-
readonly lifecycle?: never;
|
|
198
|
-
readonly usage?: never;
|
|
199
84
|
} | {
|
|
200
85
|
readonly kind: "cancel";
|
|
201
|
-
readonly lifecycle?: "parked" | "terminal";
|
|
202
|
-
readonly usage?: TaskUsage;
|
|
203
|
-
}
|
|
204
|
-
/** Retains a late executor settlement without changing task terminal status. */
|
|
205
|
-
| {
|
|
206
|
-
readonly kind: "settle-executor";
|
|
207
86
|
readonly usage?: TaskUsage;
|
|
208
|
-
} | {
|
|
209
|
-
readonly kind: "require-authorization";
|
|
210
|
-
readonly requestId: string;
|
|
211
87
|
} | {
|
|
212
88
|
readonly kind: "require-input";
|
|
213
89
|
readonly inputRequests: readonly TaskInputRequest[];
|
|
214
90
|
} | {
|
|
215
91
|
readonly kind: "ready";
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Clears the listed requests from the outstanding batch. Bound to
|
|
219
|
-
* ids rather than unbound like the former `resume`, so an answer can
|
|
220
|
-
* only ever release the batch it was written against.
|
|
221
|
-
*/
|
|
222
|
-
| {
|
|
92
|
+
} | {
|
|
223
93
|
readonly kind: "answered";
|
|
224
94
|
readonly requestIds: readonly string[];
|
|
225
|
-
} | {
|
|
226
|
-
readonly kind: "start-turn";
|
|
227
|
-
readonly childSessionId: string;
|
|
228
|
-
readonly childTurnId: string;
|
|
229
|
-
readonly taskId: string;
|
|
230
95
|
};
|
|
231
|
-
/** Hook payload envelope commanding a durable task run. */
|
|
232
96
|
export interface TaskCommandHookPayload {
|
|
233
97
|
readonly kind: "task-command";
|
|
234
98
|
readonly command: TaskCommand;
|
|
235
99
|
}
|
|
236
|
-
/**
|
|
237
|
-
* Structural shapes of the child wire payloads a task run consumes.
|
|
238
|
-
*
|
|
239
|
-
* These mirror the existing parent-notification contracts (the local
|
|
240
|
-
* `notifyDelegatedParentStep`, the subagent adapter's HITL forwarding,
|
|
241
|
-
* and the remote callback route) without importing their zod-backed
|
|
242
|
-
* modules: this file is bundled into workflow bodies. The wire itself
|
|
243
|
-
* is unchanged — delegated dispatch only points it at the task run's
|
|
244
|
-
* hook instead of the parent turn's inbox.
|
|
245
|
-
*/
|
|
246
|
-
export interface TaskInboundChildResult {
|
|
247
|
-
readonly kind: "runtime-action-result";
|
|
248
|
-
readonly results: readonly {
|
|
249
|
-
readonly isError?: boolean;
|
|
250
|
-
readonly outcome?: {
|
|
251
|
-
readonly kind: "parked" | "terminal";
|
|
252
|
-
readonly result: {
|
|
253
|
-
readonly kind: "succeeded";
|
|
254
|
-
readonly output: JsonValue;
|
|
255
|
-
} | {
|
|
256
|
-
readonly error: JsonValue;
|
|
257
|
-
readonly kind: "failed";
|
|
258
|
-
} | {
|
|
259
|
-
readonly kind: "cancelled";
|
|
260
|
-
};
|
|
261
|
-
/**
|
|
262
|
-
* Provider usage this turn added. Retained on the terminal task
|
|
263
|
-
* view ({@link TaskView.usage}); folding it into parent
|
|
264
|
-
* budgets is deferred until a reservation model lands.
|
|
265
|
-
*/
|
|
266
|
-
readonly usageDelta?: unknown;
|
|
267
|
-
};
|
|
268
|
-
readonly output: JsonValue;
|
|
269
|
-
}[];
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* Arrives when the delegated child emits `input.requested`. After dispatch is
|
|
273
|
-
* acknowledged, the task run exposes the batch in an `input_required`
|
|
274
|
-
* view and forwards the request to the parent session.
|
|
275
|
-
*/
|
|
276
|
-
export interface TaskInboundInputRequest {
|
|
277
|
-
readonly callId: string;
|
|
278
|
-
readonly childContinuationToken: string;
|
|
279
|
-
readonly childSessionId: string;
|
|
280
|
-
readonly kind: "subagent-input-request";
|
|
281
|
-
readonly event: {
|
|
282
|
-
readonly requests: readonly TaskInputRequest[];
|
|
283
|
-
readonly sequence: number;
|
|
284
|
-
readonly stepIndex: number;
|
|
285
|
-
readonly turnId: string;
|
|
286
|
-
};
|
|
287
|
-
readonly subagentName: string;
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* Arrives when a delegated child turn starts and its session and turn ids are
|
|
291
|
-
* known. The task run records those ids for executor addressing; this payload
|
|
292
|
-
* does not itself make the task ready or wake the parent.
|
|
293
|
-
*/
|
|
294
|
-
export interface TaskInboundTurnStarted {
|
|
295
|
-
readonly childSessionId: string;
|
|
296
|
-
readonly childTurnId: string;
|
|
297
|
-
readonly kind: "turn-started";
|
|
298
|
-
readonly taskId: string;
|
|
299
|
-
}
|
|
300
|
-
/** Intermediate progress sent by a running child to its parent agent. */
|
|
100
|
+
/** Intermediate progress reported by an executor. */
|
|
301
101
|
export interface TaskInboundUpdate {
|
|
302
102
|
readonly callId: string;
|
|
303
|
-
/** Executor-neutral monotonic index within {@link updateEpoch}. */
|
|
304
103
|
readonly updateIndex: number;
|
|
305
|
-
/** Executor-neutral epoch id used with {@link updateIndex} for update dedupe. */
|
|
306
104
|
readonly updateEpoch: string;
|
|
307
105
|
readonly kind: "task-update";
|
|
308
106
|
readonly message: string;
|
|
309
107
|
}
|
|
310
|
-
/**
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
readonly
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
readonly event: SubagentAuthorizationEvent;
|
|
321
|
-
readonly subagentName: string;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Human answers routed to the task run rather than straight to the
|
|
325
|
-
* child. The run owns both the delivery and the state change, so the
|
|
326
|
-
* batch it clears is exactly the batch it forwarded — the parent can no
|
|
327
|
-
* longer unblock the child while the run still believes it is blocked.
|
|
328
|
-
*/
|
|
108
|
+
/** One workflow-executor request bound to its private answer hook. */
|
|
109
|
+
export interface TaskInboundInputRequest {
|
|
110
|
+
readonly kind: "task-input-request";
|
|
111
|
+
readonly replyTo: string;
|
|
112
|
+
readonly requests: readonly TaskInputRequest[];
|
|
113
|
+
readonly sequence: number;
|
|
114
|
+
readonly stepIndex: number;
|
|
115
|
+
readonly turnId: string;
|
|
116
|
+
}
|
|
117
|
+
/** One human answer routed through the task that owns the blocked executor. */
|
|
329
118
|
export interface TaskInboundAnswerInput {
|
|
330
119
|
readonly auth?: unknown;
|
|
331
120
|
readonly childContinuationToken: string;
|
|
332
121
|
readonly childResponseUrl?: string;
|
|
333
|
-
readonly inputResponses: readonly
|
|
122
|
+
readonly inputResponses: readonly {
|
|
123
|
+
readonly optionId?: string;
|
|
124
|
+
readonly requestId: string;
|
|
125
|
+
readonly text?: string;
|
|
126
|
+
}[];
|
|
334
127
|
readonly kind: "input-response";
|
|
335
128
|
readonly taskId: string;
|
|
336
129
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
130
|
+
export type TaskRunInboundPayload = TaskCommandHookPayload | TaskInboundAnswerInput | TaskInboundUpdate;
|
|
131
|
+
/** Generic task-owned request sent through the parent session payload. */
|
|
132
|
+
interface TaskInputRequestDeliveryBase {
|
|
133
|
+
readonly replyTo: string;
|
|
134
|
+
readonly sequence: number;
|
|
135
|
+
readonly stepIndex: number;
|
|
136
|
+
readonly taskId: string;
|
|
137
|
+
readonly turnId: string;
|
|
138
|
+
}
|
|
139
|
+
export type TaskInputRequestDelivery = TaskInputRequestDeliveryBase & ({
|
|
140
|
+
readonly request: TaskInputRequest;
|
|
141
|
+
readonly requests?: never;
|
|
142
|
+
} | {
|
|
143
|
+
readonly request?: never;
|
|
144
|
+
readonly requests: readonly TaskInputRequest[];
|
|
145
|
+
});
|
|
146
|
+
/**
|
|
147
|
+
* Child authorization event projected through the parent channel. Display
|
|
148
|
+
* only: the authorization callback completes against the child directly.
|
|
149
|
+
*/
|
|
150
|
+
export interface TaskAuthorizationEventDelivery {
|
|
151
|
+
readonly hookPayload: SubagentAuthorizationEventHookPayload;
|
|
152
|
+
readonly taskId: string;
|
|
153
|
+
}
|
|
154
|
+
/** Stable id shared by one authorization attempt's events, used to dedupe deliveries. */
|
|
155
|
+
export declare function taskAuthorizationRequestId(event: SubagentAuthorizationEvent): string;
|
|
156
|
+
/**
|
|
157
|
+
* Agent spawn or settlement a task-owned workflow tool run asks its parent to
|
|
158
|
+
* apply, forwarded after task admission. `replyTo` is the run's reply hook.
|
|
159
|
+
*/
|
|
160
|
+
export interface TaskAgentRequestDelivery {
|
|
161
|
+
readonly replyTo: string;
|
|
162
|
+
readonly request: WorkflowToolAgentRequest;
|
|
163
|
+
readonly taskId: string;
|
|
164
|
+
}
|
|
340
165
|
export declare const TASK_VIEW_STREAM_NAMESPACE = "eve.task";
|
|
341
|
-
/** True when the status can never change again. */
|
|
342
166
|
export declare function isTerminalTaskStatus(status: TaskStatus): boolean;
|
|
343
|
-
/** True when a transition into this status should wake the parent. */
|
|
344
167
|
export declare function isReadyTaskStatus(status: TaskStatus): boolean;
|
|
345
168
|
export {};
|
package/dist/src/tasks/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsonValuesEqual}from"#shared/json.js";function sameTaskMetadata(t,n){return jsonValuesEqual(t,n)}function readTaskUsage(e){if(typeof e!=`object`||!e||Array.isArray(e))return;let t=readUsageAxis(e,`cacheReadTokens`),n=readUsageAxis(e,`cacheWriteTokens`),r=readUsageAxis(e,`costUsd`),i=readUsageAxis(e,`inputTokens`),a=readUsageAxis(e,`outputTokens`);if(t===void 0||n===void 0||i===void 0||a===void 0)return;let o={cacheReadTokens:t,cacheWriteTokens:n,inputTokens:i,outputTokens:a};return r!==void 0&&(o.costUsd=r),o}function readUsageAxis(e,t){let n=Reflect.get(e,t);return typeof n==`number`&&Number.isFinite(n)&&n>=0?n:void 0}function readTaskInputRequestId(e){if(typeof e!=`object`||!e||Array.isArray(e))return;let t=Reflect.get(e,`requestId`);return typeof t==`string`?t:void 0}const TASK_AUTHORIZATION_REQUEST_ID_PREFIX=`task:authorization`;function taskAuthorizationRequestId(e){return e.type===`approval.candidate`||e.type===`approval.settled`?`${TASK_AUTHORIZATION_REQUEST_ID_PREFIX}:${e.data.requestId}`:`${TASK_AUTHORIZATION_REQUEST_ID_PREFIX}:${e.data.attemptId??e.data.name}`}const TASK_VIEW_STREAM_NAMESPACE=`eve.task`;function isTerminalTaskStatus(e){return e===`completed`||e===`failed`||e===`cancelled`}function isReadyTaskStatus(e){return e===`input_required`||isTerminalTaskStatus(e)}export{TASK_VIEW_STREAM_NAMESPACE,isReadyTaskStatus,isTerminalTaskStatus,readTaskInputRequestId,readTaskUsage,sameTaskMetadata,taskAuthorizationRequestId};
|
|
@@ -1,6 +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 { TaskDelegated, TaskExec } from "#tools/task.js";
|
|
4
5
|
import type { ToolModelOutput } from "#tools/model-output.js";
|
|
5
6
|
/**
|
|
6
7
|
* A single tool entry within a resolved dynamic tool set.
|
|
@@ -18,7 +19,8 @@ export interface DynamicToolEntry<TInput = Record<string, unknown>, TOutput = an
|
|
|
18
19
|
readonly description: string;
|
|
19
20
|
readonly inputSchema: PublicToolInputSchema<TInput>;
|
|
20
21
|
readonly outputSchema?: PublicToolOutputSchema<TOutput>;
|
|
21
|
-
|
|
22
|
+
readonly execution?: "background";
|
|
23
|
+
execute(input: TInput, ctx: ToolContext, task?: TaskExec): TOutput | TaskDelegated | Promise<TOutput | TaskDelegated>;
|
|
22
24
|
readonly toModelOutput?: (output: TOutput) => ToolModelOutput | Promise<ToolModelOutput>;
|
|
23
25
|
/**
|
|
24
26
|
* Optional per-call approval gate, mirroring the authored-tool
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
export declare const agent: import("#tools/
|
|
1
|
+
export declare const agent: import("#tools/definition.js").BackgroundToolDefinition<{
|
|
2
2
|
agentId?: string | null | undefined;
|
|
3
3
|
message: string;
|
|
4
4
|
outputSchema?: {
|
|
5
5
|
[x: string]: unknown;
|
|
6
6
|
} | undefined;
|
|
7
|
-
},
|
|
7
|
+
}, {
|
|
8
|
+
agentId: string;
|
|
9
|
+
status: "working";
|
|
10
|
+
taskId: string;
|
|
11
|
+
}> & {
|
|
12
|
+
execute(input: {
|
|
13
|
+
agentId?: string | null | undefined;
|
|
14
|
+
message: string;
|
|
15
|
+
outputSchema?: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
} | undefined;
|
|
18
|
+
}, ctx: import("#tools/definition.js").ToolContext, task: import("#tools/definition.js").TaskExec): {
|
|
19
|
+
agentId: string;
|
|
20
|
+
status: "working";
|
|
21
|
+
taskId: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
8
24
|
export default agent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AGENT_TOOL_DESCRIPTION,SUBAGENT_TOOL_INPUT_SCHEMA}from"#tools/framework/agent-contract.js";import{
|
|
1
|
+
import{defineTool}from"#tools/definition.js";import{SUBAGENT_TASK_RECEIPT_OUTPUT_SCHEMA}from"#tools/framework/task-contract.js";import{AGENT_TOOL_DESCRIPTION,SUBAGENT_TOOL_INPUT_SCHEMA}from"#tools/framework/agent-contract.js";import{attachToolBehavior}from"#tools/behavior.js";const agent=attachToolBehavior(defineTool({description:`${AGENT_TOOL_DESCRIPTION} This call starts a background task and returns a task receipt immediately.`,execution:`background`,inputSchema:SUBAGENT_TOOL_INPUT_SCHEMA,outputSchema:SUBAGENT_TASK_RECEIPT_OUTPUT_SCHEMA,execute(){"use workflow";throw Error(`The framework "agent" tool was executed directly. It must be resolved through the runtime tool registry, which dispatches it to the shared subagent workflow.`)}}),{availability:[`root-session`],handling:{action:`self-agent`,kind:`dispatch`}});export{agent,agent as default};
|