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 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{WizardCancelledError}from"./step.js";import{initialQuitGuardState,quitHintNote,reduceQuitGuard}from"./quit-guard.js";import pc from"#compiled/picocolors/index.js";import{cornerFor,createRailLog,formatPromptCancellation,formatPromptHeader,formatPromptOpener,formatPromptOutro,formatPromptSubmission,formatRailLine,railFor,runSelectComponent}from"#setup/cli/index.js";import{TextPrompt,isCancel,settings}from"#compiled/@clack/core/index.js";var PlannerNavigationError=class extends Error{direction;values;constructor(e,t){super(`Planner requested ${e} navigation.`),this.name=`PlannerNavigationError`,this.direction=e,this.values=t}};function guardCancel(t){if(isCancel(t))throw process.stdout.write(formatPromptCancellation(`Setup cancelled.`,pc)),new WizardCancelledError;return t}let escapeCancelDisabled=!1;function disableEscapeCancel(){escapeCancelDisabled||=(settings.aliases.delete(`escape`),!0)}function attachQuitGuard(e){let a=initialQuitGuardState;return e.on(`key`,(t,n)=>{let{state:i,action:o}=reduceQuitGuard(a,n?.name===`escape`?{type:`escape`}:{type:`other-key`});a=i,o===`quit`&&(e.state=`cancel`)}),{note:()=>quitHintNote(a,pc)}}function toPromptState(e){return e}function railForState(e){return railFor(toPromptState(e),pc)}function cornerForState(e){return cornerFor(toPromptState(e),pc)}function header(e,t,n){return formatPromptHeader(toPromptState(e),t,{colors:pc,leadingRail:n===0?`white`:`green`})}const REDACTED_DISPLAY=`••••••••`;function textPrompt(e,t){let n,r=new TextPrompt({validate:t.validate?e=>t.validate?.(e??``):void 0,placeholder:t.placeholder,defaultValue:t.defaultValue,initialValue:t.defaultValue,render(){let r=header(this.state,t.message,e),a=t.placeholder?pc.inverse(t.placeholder[0])+pc.dim(t.placeholder.slice(1)):pc.inverse(pc.hidden(`_`)),o=this.value?`•`.repeat(this.value.length):a,s=a;switch(t.mask?s=o:this.value&&(s=this.userInputWithCursor),this.state){case`error`:return`${r.trim()}\n${railForState(this.state)} ${s}\n${cornerForState(this.state)} ${pc.red(this.error)}\n`;case`submit`:{let n=this.value||t.placeholder||``;return t.mask&&(n=this.value?REDACTED_DISPLAY:t.placeholder??``),formatPromptSubmission(this.state,t.message,n,{colors:pc,leadingRail:e===0?`white`:`green`})}case`cancel`:return`${r}${railForState(this.state)} ${pc.strikethrough(pc.dim(t.mask&&this.value?REDACTED_DISPLAY:this.value??``))}${this.value?.trim()?`\n${railForState(this.state)}`:``}`;default:return`${r}${railForState(this.state)} ${s}\n${cornerForState(this.state)}${cornerNote(n?.note())}\n`}}});return n=attachQuitGuard(r),r.prompt()}function cornerNote(e){return e?` ${e}`:``}function createPrompter(){disableEscapeCancel();let e=0,t=createRailLog({colors:pc,output:process.stdout});function printNotices(e){for(let n of e??[])n.tone===`success`?t.success(n.text):n.tone===`warning`?t.warning(n.text):n.tone===`error`?t.error(n.text):t.message(n.text)}return{async text(n){t.settle(),printNotices(n.notices);let r=guardCancel(await textPrompt(e,n));return e+=1,r??``},async password(n){t.settle();let r=guardCancel(await textPrompt(e,{message:n.message,mask:!0,validate:n.validate}));return e+=1,r??``},async select(n){t.settle(),printNotices(n.notices),n.description!==void 0&&process.stdout.write(formatRailLine(pc.dim(n.description),pc,process.stdout));for(let{label:e,value:t}of n.metadata??[])process.stdout.write(formatRailLine(`${pc.dim(`${e}:`)} ${t}`,pc,process.stdout));let r=guardCancel(await runSelectComponent({message:n.message,options:n.options,multiple:n.multiple===!0,search:n.search??!1,searchAction:n.multiple===!0?void 0:n.searchAction,required:n.required??!1,placeholder:n.placeholder,defaultValue:n.multiple===!0?void 0:n.initialValue,initialValues:n.multiple===!0?n.initialValues:void 0,leadingRail:e===0?`white`:`green`,attachGuard:e=>attachQuitGuard(e)}));return e+=1,r},async acknowledge(e){t.settle(),process.stdout.write(formatRailLine(pc.bold(e.message),pc,process.stdout));for(let t of e.lines??[])process.stdout.write(formatRailLine(pc.dim(t),pc,process.stdout))},note(e,n,r){t.settle();let a=r?.tone===`success`?pc.green:pc.red;n&&process.stdout.write(formatRailLine(a(pc.bold(n)),pc,process.stdout)),process.stdout.write(formatRailLine(a(e),pc,process.stdout))},intro(e,n=`Production-grade agent framework.`){t.settle(),process.stdout.write(formatPromptOpener(e,n,pc))},outro(e){t.settle(),process.stdout.write(formatPromptOutro(e,pc))},log:t}}export{PlannerNavigationError,createPrompter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{pinnedNodeEngineMajor}from"../../node-engine.js";import{parseChatGptModelSelection}from"../../../shared/chatgpt-model.js";import{SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS}from"../update/module-files.js";import{pathExists,writeTextFile}from"../files.js";import{blockingCreateInPlaceEntries}from"../create-in-place.js";import{resolveVersionToken}from"../version-tokens.js";import{applyPackageManagerWorkspaceConfiguration,isPackageManagerWorkspaceMember,patchWorkspaceRootPackageJson}from"../workspace-root.js";import{WEB_APP_TEMPLATE_FILES}from"./web-template.js";import{mkdir,readdir,stat}from"node:fs/promises";import{basename,join,resolve}from"node:path";const CURRENT_DIRECTORY_PROJECT_NAME=`.`,DEFAULT_AI_PACKAGE_VERSION=`^7.0.82`,DEFAULT_CONNECT_PACKAGE_VERSION=`1.0.0`,DEFAULT_ZOD_PACKAGE_VERSION=`4.5.4`,DEFAULT_EVE_PACKAGE_CONTRACT={version:`0.
|
|
1
|
+
import{pinnedNodeEngineMajor}from"../../node-engine.js";import{parseChatGptModelSelection}from"../../../shared/chatgpt-model.js";import{SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS}from"../update/module-files.js";import{pathExists,writeTextFile}from"../files.js";import{blockingCreateInPlaceEntries}from"../create-in-place.js";import{resolveVersionToken}from"../version-tokens.js";import{applyPackageManagerWorkspaceConfiguration,isPackageManagerWorkspaceMember,patchWorkspaceRootPackageJson}from"../workspace-root.js";import{WEB_APP_TEMPLATE_FILES}from"./web-template.js";import{mkdir,readdir,stat}from"node:fs/promises";import{basename,join,resolve}from"node:path";const CURRENT_DIRECTORY_PROJECT_NAME=`.`,DEFAULT_AI_PACKAGE_VERSION=`^7.0.82`,DEFAULT_CONNECT_PACKAGE_VERSION=`1.0.0`,DEFAULT_ZOD_PACKAGE_VERSION=`4.5.4`,DEFAULT_EVE_PACKAGE_CONTRACT={version:`0.51.1`,nodeEngine:`>=24`};function resolveEvePackageContract(e=DEFAULT_EVE_PACKAGE_CONTRACT){return{version:resolveVersionToken(`evePackage.version`,e.version),nodeEngine:resolveVersionToken(`evePackage.nodeEngine`,e.nodeEngine)}}function modelProviderSlug(e){let t=(e.split(`/`)[0]??``).replaceAll(/[^A-Za-z0-9._-]/gu,``);return t.length>0?t:`anthropic`}function byokProviderEnvVar(e){let t=modelProviderSlug(e).toUpperCase().replaceAll(/[^A-Z0-9]/gu,`_`);return`${/^[0-9]/.test(t)?`_`:``}${t}_API_KEY`}function agentTemplateFiles(e,t){return{"agent/agent.ts":renderAgentTemplate(e,t),"agent/channels/eve.ts":WEB_APP_TEMPLATE_FILES[`agent/channels/eve.ts`],"agent/instructions.md":AGENT_INSTRUCTIONS_TEMPLATE}}function renderAgentTemplate(e,n){let r=parseChatGptModelSelection(e);return r===void 0?BASE_AGENT_TEMPLATE.replaceAll(`__EVE_INIT_MODEL__`,e).replaceAll(`__EVE_INIT_REASONING__`,reasoningTemplateLine(n)):`import { defineAgent } from "eve";\nimport { chatgpt } from "eve/models/openai";\n\nexport default defineAgent({\n model: chatgpt(${JSON.stringify(r)}),\n${reasoningTemplateLine(n)}});\n`}function reasoningTemplateLine(e){return e===void 0||e===`provider-default`?``:` reasoning: "${e}",\n`}function renderTemplate(e,n){return e===BASE_AGENT_TEMPLATE&&parseChatGptModelSelection(n.model)!==void 0?renderAgentTemplate(n.model,n.reasoning):e.replaceAll(`__EVE_INIT_APP_NAME__`,n.appName).replaceAll(`__EVE_INIT_MODEL__`,n.model).replaceAll(`__EVE_INIT_REASONING__`,reasoningTemplateLine(n.reasoning)).replaceAll(`__EVE_INIT_BYOK_PROVIDER__`,modelProviderSlug(n.model)).replaceAll(`__EVE_INIT_BYOK_ENV_VAR__`,byokProviderEnvVar(n.model)).replaceAll(`__EVE_INIT_PACKAGE_VERSION__`,formatEveDependencySpecifier(n.eveVersion)).replaceAll(`__EVE_INIT_AI_SDK_VERSION__`,n.aiPackageVersion).replaceAll(`__EVE_INIT_CONNECT_VERSION__`,n.connectPackageVersion).replaceAll(`__EVE_INIT_ZOD_VERSION__`,n.zodPackageVersion).replaceAll(`__EVE_INIT_TYPESCRIPT_VERSION__`,n.typescriptPackageVersion).replaceAll(`__EVE_INIT_TYPES_NODE_VERSION__`,n.nodeTypesVersion).replaceAll(`__EVE_INIT_NODE_ENGINE__`,n.nodeEngine)}function formatEveDependencySpecifier(e){return/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z-.]+)?$/.test(e)?`^${e}`:e}const BASE_AGENT_TEMPLATE=`import { defineAgent } from "eve";
|
|
2
2
|
|
|
3
3
|
export default defineAgent({
|
|
4
4
|
model: "__EVE_INIT_MODEL__",
|
|
@@ -56,6 +56,10 @@ interface WebChannelSkippedResult {
|
|
|
56
56
|
packageJsonUpdated: [];
|
|
57
57
|
}
|
|
58
58
|
type WebChannelMutationResult = WebChannelWrittenResult | WebChannelSkippedResult;
|
|
59
|
+
/** The Vercel Framework Preset slug for the host framework a project declares. */
|
|
60
|
+
export declare function resolveVercelHostFrameworkPreset(projectRoot: string): Promise<string | undefined>;
|
|
61
|
+
/** Whether the root app declares a Vercel framework that owns its top-level deployment. */
|
|
62
|
+
export declare function hasVercelHostFramework(projectRoot: string): Promise<boolean>;
|
|
59
63
|
/**
|
|
60
64
|
* Whether the project already carries a Next.js app: `package.json` declares a
|
|
61
65
|
* `next` dependency in the same dependency fields Vercel framework detection
|
|
@@ -65,18 +69,6 @@ type WebChannelMutationResult = WebChannelWrittenResult | WebChannelSkippedResul
|
|
|
65
69
|
* A missing `package.json` reads as "no app".
|
|
66
70
|
*/
|
|
67
71
|
export declare function isNextJsProject(projectRoot: string): Promise<boolean>;
|
|
68
|
-
/**
|
|
69
|
-
* The Vercel Framework Preset slug for the host framework a project declares, or
|
|
70
|
-
* `undefined` when it declares none (a missing `package.json` reads as none).
|
|
71
|
-
*/
|
|
72
|
-
export declare function resolveVercelHostFrameworkPreset(projectRoot: string): Promise<string | undefined>;
|
|
73
|
-
/**
|
|
74
|
-
* Whether the root app declares a Vercel framework that should own the
|
|
75
|
-
* top-level deployment while eve runs as a sibling service. These match Eve's
|
|
76
|
-
* current framework integrations: Next.js, Nuxt, and SvelteKit. Derived from
|
|
77
|
-
* {@link resolveVercelHostFrameworkPreset} so the two share one dependency list.
|
|
78
|
-
*/
|
|
79
|
-
export declare function hasVercelHostFramework(projectRoot: string): Promise<boolean>;
|
|
80
72
|
export declare function normalizeSlackConnectorSlug(input: string): SlackConnectorSlug;
|
|
81
73
|
export declare function deriveSlackConnectorSlug(projectRoot: string, projectNameHint?: string): Promise<SlackConnectorSlug>;
|
|
82
74
|
export interface EnsureChannelOptions {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{appendEnv}from"../../append-env.js";import{pinnedNodeEngineMajor}from"../../node-engine.js";import{getSupportedModuleBaseName,matchesSupportedModuleBaseName}from"./module-files.js";import{pathExists,writeTextFile}from"../files.js";import{resolveVersionToken}from"../version-tokens.js";import{patchPackageJson}from"./package-json.js";import{applyPackageManagerWorkspaceConfiguration,isPackageManagerWorkspaceMember,patchWorkspaceRootPackageJson}from"../workspace-root.js";import{WEB_APP_SIGN_IN_WITH_VERCEL_TEMPLATE_FILES,WEB_APP_TEMPLATE_FILES,WEB_APP_TEMPLATE_PACKAGE_JSON}from"../create/web-template.js";import{resolveEvePackageContract}from"../create/project.js";import{resolveWebPackageVersions}from"./web-options.js";import{readFile,readdir,unlink,writeFile}from"node:fs/promises";import{basename,join,resolve}from"node:path";const SLACK_CHANNEL_DEFAULT_ROUTE=`/eve/v1/slack`,DEFAULT_SLACK_CONNECTOR_SLUG=`my-agent`,NEXT_PACKAGE_NAME=`next`,PACKAGE_DEPENDENCY_FIELDS=[`dependencies`,`devDependencies`],WEB_NEXT_CONFIG_PATH=`next.config.ts`,WEB_COMPETING_NEXT_CONFIG_PATHS=[`next.config.js`,`next.config.mjs`,WEB_NEXT_CONFIG_PATH,`next.config.mts`].filter(e=>e!==WEB_NEXT_CONFIG_PATH);function toSlackConnectorSlug(e){return e}function isJsonObject(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function readPackageJsonObject(e){if(!await pathExists(e))return;let t=JSON.parse(await readFile(e,`utf8`));return isJsonObject(t)?t:void 0}async function readDependencyVersion(e,t){let n=await readPackageJsonObject(e);if(n===void 0||!isJsonObject(n.dependencies))return;let r=n.dependencies[t];return typeof r==`string`?r:void 0}function packageJsonHasDependency(e,t){for(let n of PACKAGE_DEPENDENCY_FIELDS){let r=e[n];if(isJsonObject(r)&&typeof r[t]==`string`)return!0}return!1}async function hasPackageDependency(e,t){let n=await readPackageJsonObject(e);return n!==void 0&&packageJsonHasDependency(n,t)}
|
|
1
|
+
import{appendEnv}from"../../append-env.js";import{pinnedNodeEngineMajor}from"../../node-engine.js";import{getSupportedModuleBaseName,matchesSupportedModuleBaseName}from"./module-files.js";import{pathExists,writeTextFile}from"../files.js";import{resolveVersionToken}from"../version-tokens.js";import{patchPackageJson}from"./package-json.js";import{applyPackageManagerWorkspaceConfiguration,isPackageManagerWorkspaceMember,patchWorkspaceRootPackageJson}from"../workspace-root.js";import{WEB_APP_SIGN_IN_WITH_VERCEL_TEMPLATE_FILES,WEB_APP_TEMPLATE_FILES,WEB_APP_TEMPLATE_PACKAGE_JSON}from"../create/web-template.js";import{resolveEvePackageContract}from"../create/project.js";import{resolveWebPackageVersions}from"./web-options.js";import{readFile,readdir,unlink,writeFile}from"node:fs/promises";import{basename,join,resolve}from"node:path";const SLACK_CHANNEL_DEFAULT_ROUTE=`/eve/v1/slack`,DEFAULT_SLACK_CONNECTOR_SLUG=`my-agent`,NEXT_PACKAGE_NAME=`next`,PACKAGE_DEPENDENCY_FIELDS=[`dependencies`,`devDependencies`],WEB_NEXT_CONFIG_PATH=`next.config.ts`,WEB_COMPETING_NEXT_CONFIG_PATHS=[`next.config.js`,`next.config.mjs`,WEB_NEXT_CONFIG_PATH,`next.config.mts`].filter(e=>e!==WEB_NEXT_CONFIG_PATH);function toSlackConnectorSlug(e){return e}function isJsonObject(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function readPackageJsonObject(e){if(!await pathExists(e))return;let t=JSON.parse(await readFile(e,`utf8`));return isJsonObject(t)?t:void 0}async function readDependencyVersion(e,t){let n=await readPackageJsonObject(e);if(n===void 0||!isJsonObject(n.dependencies))return;let r=n.dependencies[t];return typeof r==`string`?r:void 0}function packageJsonHasDependency(e,t){for(let n of PACKAGE_DEPENDENCY_FIELDS){let r=e[n];if(isJsonObject(r)&&typeof r[t]==`string`)return!0}return!1}async function hasPackageDependency(e,t){let n=await readPackageJsonObject(e);return n!==void 0&&packageJsonHasDependency(n,t)}const VERCEL_HOST_FRAMEWORK_PRESETS={"@sveltejs/kit":`sveltekit`,[NEXT_PACKAGE_NAME]:`nextjs`,nuxt:`nuxtjs`,nuxt3:`nuxtjs`,"nuxt-edge":`nuxtjs`,"nuxt-nightly":`nuxtjs`};async function resolveVercelHostFrameworkPreset(e){let t=await readPackageJsonObject(join(e,`package.json`));if(t!==void 0){for(let[e,n]of Object.entries(VERCEL_HOST_FRAMEWORK_PRESETS))if(packageJsonHasDependency(t,e))return n}}async function hasVercelHostFramework(e){return await resolveVercelHostFrameworkPreset(e)!==void 0}async function isNextJsProject(e){return hasPackageDependency(join(e,`package.json`),NEXT_PACKAGE_NAME)}async function ensurePackageDependency(e,t,n){return!await pathExists(e)||await readDependencyVersion(e,t)===n?[]:(await patchPackageJson(e,{dependencies:{[t]:n}}),[{path:e,dependencies:[t],devDependencies:[],scripts:[]}])}function formatEveDependencySpecifier(e){return/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z-.]+)?$/.test(e)?`^${e}`:e}async function patchWebPackageJson(e,n,r,a,c,d=!0,f){let h=join(e,`package.json`);if(!await pathExists(h))return{mutations:[]};let g=resolveEvePackageContract(a.evePackage),_=pinnedNodeEngineMajor(g.nodeEngine),v={...WEB_APP_TEMPLATE_PACKAGE_JSON.dependencies,ai:resolveVersionToken(`aiPackageVersion`,a.aiPackageVersion),eve:formatEveDependencySpecifier(g.version),next:resolveVersionToken(`nextPackageVersion`,a.nextPackageVersion),react:resolveVersionToken(`reactPackageVersion`,a.reactPackageVersion),"react-dom":resolveVersionToken(`reactDomPackageVersion`,a.reactDomPackageVersion),streamdown:resolveVersionToken(`streamdownPackageVersion`,a.streamdownPackageVersion),zod:resolveVersionToken(`zodPackageVersion`,a.zodPackageVersion),...f===`sign-in-with-vercel`?{"better-auth":resolveVersionToken(`betterAuthPackageVersion`,a.betterAuthPackageVersion)}:{}},y={...WEB_APP_TEMPLATE_PACKAGE_JSON.devDependencies,"@types/node":_,"@types/react":resolveVersionToken(`typesReactPackageVersion`,a.typesReactPackageVersion),"@types/react-dom":resolveVersionToken(`typesReactDomPackageVersion`,a.typesReactDomPackageVersion),typescript:`6.0.3`},b=WEB_APP_TEMPLATE_PACKAGE_JSON.scripts,x=isPackageManagerWorkspaceMember(n,r),S={scripts:b};d&&(S.dependencies=v,S.devDependencies=y),x||(S.nodeEngineRequirement=g.nodeEngine);let C=await patchPackageJson(h,S),w=(await patchWorkspaceRootPackageJson(n,r,{nodeEngineRequirement:g.nodeEngine,onWorkspaceRootMutation:c})).nodeEngineOverride??C.nodeEngineOverride;return{mutations:[{path:h,dependencies:d?Object.keys(v):[],devDependencies:d?Object.keys(y):[],scripts:Object.keys(b)}],nodeEngineOverride:w}}function normalizeSlackConnectorSlug(e){return toSlackConnectorSlug((e.trim().replace(/^@/,``).split(`/`).at(-1)??``).toLowerCase().replace(/[^a-z0-9_-]+/g,`-`).replace(/^[^a-z0-9]+/,``).replace(/[^a-z0-9]+$/,``).slice(0,100).replace(/[^a-z0-9]+$/,``)||`my-agent`)}async function deriveSlackConnectorSlug(e,t){if(t!==void 0&&t.length>0&&t!==`.`)return normalizeSlackConnectorSlug(t);try{let t=await readFile(join(e,`package.json`),`utf8`),n=JSON.parse(t);if(typeof n.name==`string`&&n.name.length>0)return normalizeSlackConnectorSlug(n.name)}catch{}return normalizeSlackConnectorSlug(basename(resolve(e))||`my-agent`)}function buildSlackConnectTemplate(e){if(!e.startsWith(`slack/`)||e.length===6)throw Error(`Invalid Slack connector UID "${e}".`);return`import { connectSlackCredentials } from "@vercel/connect/eve";
|
|
2
2
|
import { slackChannel } from "eve/channels/slack";
|
|
3
3
|
|
|
4
4
|
export default slackChannel({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_EVE_PACKAGE_CONTRACT}from"../create/project.js";function resolveWebPackageVersions(e,t){return{evePackage:e?.evePackage??DEFAULT_EVE_PACKAGE_CONTRACT,aiPackageVersion:e?.aiPackageVersion??`^7.0.82`,betterAuthPackageVersion:e?.betterAuthPackageVersion??`1.6.26`,nextPackageVersion:e?.nextPackageVersion??(t===`sign-in-with-vercel`?`16.3.0`:`16.3.
|
|
1
|
+
import{DEFAULT_EVE_PACKAGE_CONTRACT}from"../create/project.js";function resolveWebPackageVersions(e,t){return{evePackage:e?.evePackage??DEFAULT_EVE_PACKAGE_CONTRACT,aiPackageVersion:e?.aiPackageVersion??`^7.0.82`,betterAuthPackageVersion:e?.betterAuthPackageVersion??`1.6.26`,nextPackageVersion:e?.nextPackageVersion??(t===`sign-in-with-vercel`?`16.3.0`:`16.3.4`),reactPackageVersion:e?.reactPackageVersion??`19.2.6`,reactDomPackageVersion:e?.reactDomPackageVersion??`19.2.6`,streamdownPackageVersion:e?.streamdownPackageVersion??`2.5.0`,zodPackageVersion:e?.zodPackageVersion??`4.5.4`,typesReactPackageVersion:e?.typesReactPackageVersion??`19.2.15`,typesReactDomPackageVersion:e?.typesReactDomPackageVersion??`19.2.3`}}export{resolveWebPackageVersions};
|
|
@@ -11,44 +11,95 @@ export type RuntimeToolCallActionRequest = z.infer<typeof runtimeToolCallActionR
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const runtimeToolCallActionRequestSchema: z.ZodObject<{
|
|
13
13
|
callId: z.ZodString;
|
|
14
|
-
input: z.ZodType<import("
|
|
14
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
15
15
|
kind: z.ZodLiteral<"tool-call">;
|
|
16
16
|
toolName: z.ZodString;
|
|
17
17
|
}, z.core.$strict>;
|
|
18
|
+
export type RuntimeSubagentCallActionRequest = z.infer<typeof runtimeSubagentCallActionRequestSchema>;
|
|
19
|
+
declare const runtimeSubagentCallActionRequestSchema: z.ZodObject<{
|
|
20
|
+
callId: z.ZodString;
|
|
21
|
+
description: z.ZodString;
|
|
22
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
23
|
+
kind: z.ZodLiteral<"subagent-call">;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
nodeId: z.ZodString;
|
|
26
|
+
subagentName: z.ZodString;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
export type RuntimeRemoteAgentCallActionRequest = z.infer<typeof runtimeRemoteAgentCallActionRequestSchema>;
|
|
29
|
+
export declare const runtimeRemoteAgentCallActionRequestSchema: z.ZodObject<{
|
|
30
|
+
callId: z.ZodString;
|
|
31
|
+
description: z.ZodString;
|
|
32
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
33
|
+
kind: z.ZodLiteral<"remote-agent-call">;
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
nodeId: z.ZodString;
|
|
36
|
+
remoteAgentName: z.ZodString;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export type RuntimeWorkflowToolCallActionRequest = z.infer<typeof runtimeWorkflowToolCallActionRequestSchema>;
|
|
39
|
+
declare const runtimeWorkflowToolCallActionRequestSchema: z.ZodObject<{
|
|
40
|
+
callId: z.ZodString;
|
|
41
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
42
|
+
kind: z.ZodLiteral<"workflow-tool-call">;
|
|
43
|
+
toolName: z.ZodString;
|
|
44
|
+
workflowId: z.ZodString;
|
|
45
|
+
}, z.core.$strict>;
|
|
18
46
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
47
|
+
* Internal subagent dispatch request issued by the agent workflow task.
|
|
48
|
+
*
|
|
49
|
+
* This is deliberately not a {@link RuntimeActionRequest}: subagent tools are
|
|
50
|
+
* workflow tasks, while runtime actions are reserved for framework controls.
|
|
21
51
|
*/
|
|
22
|
-
export type
|
|
52
|
+
export type RuntimeSubagentDispatchRequest = z.infer<typeof runtimeSubagentDispatchRequestSchema>;
|
|
23
53
|
/**
|
|
24
|
-
* Zod schema for one
|
|
54
|
+
* Zod schema for one internal local-subagent dispatch request.
|
|
25
55
|
*/
|
|
26
|
-
declare const
|
|
56
|
+
declare const runtimeSubagentDispatchRequestSchema: z.ZodObject<{
|
|
27
57
|
callId: z.ZodString;
|
|
28
58
|
description: z.ZodString;
|
|
29
|
-
input: z.ZodType<import("
|
|
59
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
30
60
|
kind: z.ZodLiteral<"subagent-call">;
|
|
31
61
|
name: z.ZodString;
|
|
32
62
|
nodeId: z.ZodString;
|
|
33
63
|
subagentName: z.ZodString;
|
|
34
64
|
}, z.core.$strict>;
|
|
35
65
|
/**
|
|
36
|
-
*
|
|
37
|
-
* later by workflow-backed runtime code.
|
|
66
|
+
* Internal remote-agent dispatch request issued by the agent workflow task.
|
|
38
67
|
*/
|
|
39
|
-
export type
|
|
68
|
+
export type RuntimeRemoteAgentDispatchRequest = z.infer<typeof runtimeRemoteAgentDispatchRequestSchema>;
|
|
40
69
|
/**
|
|
41
|
-
* Zod schema for one
|
|
70
|
+
* Zod schema for one internal remote-agent dispatch request.
|
|
42
71
|
*/
|
|
43
|
-
export declare const
|
|
72
|
+
export declare const runtimeRemoteAgentDispatchRequestSchema: z.ZodObject<{
|
|
44
73
|
callId: z.ZodString;
|
|
45
74
|
description: z.ZodString;
|
|
46
|
-
input: z.ZodType<import("
|
|
75
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
47
76
|
kind: z.ZodLiteral<"remote-agent-call">;
|
|
48
77
|
name: z.ZodString;
|
|
49
78
|
nodeId: z.ZodString;
|
|
50
79
|
remoteAgentName: z.ZodString;
|
|
51
80
|
}, z.core.$strict>;
|
|
81
|
+
/**
|
|
82
|
+
* One workflow task requested by the harness. The turn owner starts the
|
|
83
|
+
* durable run named by `workflowId`; blocking tools wait for its result,
|
|
84
|
+
* while background tools settle after task admission.
|
|
85
|
+
*
|
|
86
|
+
* Tasks are the coordination contract for authored workflow tools and
|
|
87
|
+
* subagents. They are intentionally separate from `RuntimeActionRequest`.
|
|
88
|
+
*/
|
|
89
|
+
export type RuntimeWorkflowTaskRequest = z.infer<typeof runtimeWorkflowTaskRequestSchema>;
|
|
90
|
+
export declare const runtimeWorkflowTaskRequestSchema: z.ZodObject<{
|
|
91
|
+
callId: z.ZodString;
|
|
92
|
+
executeInput: z.ZodOptional<z.ZodType<import("#shared/json.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonValue, unknown>>>;
|
|
93
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
94
|
+
kind: z.ZodLiteral<"workflow-task">;
|
|
95
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
96
|
+
resultKind: z.ZodOptional<z.ZodEnum<{
|
|
97
|
+
subagent: "subagent";
|
|
98
|
+
tool: "tool";
|
|
99
|
+
}>>;
|
|
100
|
+
toolName: z.ZodString;
|
|
101
|
+
workflowId: z.ZodString;
|
|
102
|
+
}, z.core.$strict>;
|
|
52
103
|
/**
|
|
53
104
|
* Eve-owned `load-skill` action requested by the model.
|
|
54
105
|
*/
|
|
@@ -58,27 +109,30 @@ type RuntimeLoadSkillActionRequest = z.infer<typeof runtimeLoadSkillActionReques
|
|
|
58
109
|
*/
|
|
59
110
|
declare const runtimeLoadSkillActionRequestSchema: z.ZodObject<{
|
|
60
111
|
callId: z.ZodString;
|
|
61
|
-
input: z.ZodType<import("
|
|
112
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
62
113
|
kind: z.ZodLiteral<"load-skill">;
|
|
63
114
|
}, z.core.$strict>;
|
|
64
115
|
/**
|
|
65
116
|
* Eve-owned action request surfaced by the harness.
|
|
66
117
|
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
118
|
+
* `tool-call` covers ordinary model-visible calls, including framework task
|
|
119
|
+
* controls. Deferred workflow and subagent execution uses
|
|
120
|
+
* {@link RuntimeWorkflowTaskRequest} instead.
|
|
69
121
|
*/
|
|
70
|
-
export type RuntimeActionRequest = RuntimeLoadSkillActionRequest | RuntimeRemoteAgentCallActionRequest | RuntimeSubagentCallActionRequest | RuntimeToolCallActionRequest;
|
|
122
|
+
export type RuntimeActionRequest = RuntimeLoadSkillActionRequest | RuntimeRemoteAgentCallActionRequest | RuntimeSubagentCallActionRequest | RuntimeToolCallActionRequest | RuntimeWorkflowToolCallActionRequest;
|
|
123
|
+
/** Internal agent dispatch request owned by a workflow task. */
|
|
124
|
+
export type RuntimeAgentDispatchRequest = RuntimeRemoteAgentDispatchRequest | RuntimeSubagentDispatchRequest;
|
|
71
125
|
/**
|
|
72
126
|
* Zod schema for one runtime action request.
|
|
73
127
|
*/
|
|
74
128
|
export declare const runtimeActionRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
75
129
|
callId: z.ZodString;
|
|
76
|
-
input: z.ZodType<import("
|
|
130
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
77
131
|
kind: z.ZodLiteral<"load-skill">;
|
|
78
132
|
}, z.core.$strict>, z.ZodObject<{
|
|
79
133
|
callId: z.ZodString;
|
|
80
134
|
description: z.ZodString;
|
|
81
|
-
input: z.ZodType<import("
|
|
135
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
82
136
|
kind: z.ZodLiteral<"remote-agent-call">;
|
|
83
137
|
name: z.ZodString;
|
|
84
138
|
nodeId: z.ZodString;
|
|
@@ -86,16 +140,22 @@ export declare const runtimeActionRequestSchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
86
140
|
}, z.core.$strict>, z.ZodObject<{
|
|
87
141
|
callId: z.ZodString;
|
|
88
142
|
description: z.ZodString;
|
|
89
|
-
input: z.ZodType<import("
|
|
143
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
90
144
|
kind: z.ZodLiteral<"subagent-call">;
|
|
91
145
|
name: z.ZodString;
|
|
92
146
|
nodeId: z.ZodString;
|
|
93
147
|
subagentName: z.ZodString;
|
|
94
148
|
}, z.core.$strict>, z.ZodObject<{
|
|
95
149
|
callId: z.ZodString;
|
|
96
|
-
input: z.ZodType<import("
|
|
150
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
97
151
|
kind: z.ZodLiteral<"tool-call">;
|
|
98
152
|
toolName: z.ZodString;
|
|
153
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
154
|
+
callId: z.ZodString;
|
|
155
|
+
input: z.ZodType<import("#shared/json.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonObject, unknown>>;
|
|
156
|
+
kind: z.ZodLiteral<"workflow-tool-call">;
|
|
157
|
+
toolName: z.ZodString;
|
|
158
|
+
workflowId: z.ZodString;
|
|
99
159
|
}, z.core.$strict>], "kind">;
|
|
100
160
|
/**
|
|
101
161
|
* Runtime-owned authored tool-result projected back into a harness resume call.
|
|
@@ -108,7 +168,7 @@ declare const runtimeToolResultActionResultSchema: z.ZodObject<{
|
|
|
108
168
|
callId: z.ZodString;
|
|
109
169
|
isError: z.ZodOptional<z.ZodBoolean>;
|
|
110
170
|
kind: z.ZodLiteral<"tool-result">;
|
|
111
|
-
output: z.ZodType<import("
|
|
171
|
+
output: z.ZodType<import("#shared/json.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonValue, unknown>>;
|
|
112
172
|
toolName: z.ZodString;
|
|
113
173
|
}, z.core.$strict>;
|
|
114
174
|
/**
|
|
@@ -137,11 +197,22 @@ declare const runtimeToolResultActionResultSchema: z.ZodObject<{
|
|
|
137
197
|
* the child settles. Stream consumers use the marker to keep child lifecycle
|
|
138
198
|
* open while still recording the receipt as the tool result.
|
|
139
199
|
*/
|
|
140
|
-
export
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
200
|
+
export interface RuntimeSubagentChildResult {
|
|
201
|
+
readonly backgroundTask?: {
|
|
202
|
+
readonly status: "working";
|
|
203
|
+
readonly taskId: string;
|
|
204
|
+
};
|
|
205
|
+
readonly callId: string;
|
|
206
|
+
readonly isError?: boolean;
|
|
207
|
+
readonly kind: "subagent-result";
|
|
208
|
+
readonly origin: "child";
|
|
209
|
+
readonly outcome: import("#shared/agent-turn-outcome.js").AgentTurnOutcome;
|
|
210
|
+
readonly output: import("#shared/json.js").JsonValue;
|
|
211
|
+
readonly subagentName: string;
|
|
212
|
+
readonly usage?: import("#shared/token-usage.js").TokenUsage;
|
|
213
|
+
}
|
|
214
|
+
/** Token-only subagent result schema retained for historical wire formats. */
|
|
215
|
+
export declare const runtimeSubagentChildResultSchema: z.ZodObject<{
|
|
145
216
|
backgroundTask: z.ZodOptional<z.ZodObject<{
|
|
146
217
|
status: z.ZodLiteral<"working">;
|
|
147
218
|
taskId: z.ZodString;
|
|
@@ -151,7 +222,7 @@ declare const runtimeSubagentChildResultSchema: z.ZodObject<{
|
|
|
151
222
|
kind: z.ZodLiteral<"subagent-result">;
|
|
152
223
|
origin: z.ZodLiteral<"child">;
|
|
153
224
|
outcome: z.ZodType<import("#shared/agent-turn-outcome.js").AgentTurnOutcome, unknown, z.core.$ZodTypeInternals<import("#shared/agent-turn-outcome.js").AgentTurnOutcome, unknown>>;
|
|
154
|
-
output: z.ZodType<import("
|
|
225
|
+
output: z.ZodType<import("#shared/json.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonValue, unknown>>;
|
|
155
226
|
subagentName: z.ZodString;
|
|
156
227
|
usage: z.ZodOptional<z.ZodObject<{
|
|
157
228
|
cacheReadTokens: z.ZodNumber;
|
|
@@ -160,6 +231,8 @@ declare const runtimeSubagentChildResultSchema: z.ZodObject<{
|
|
|
160
231
|
outputTokens: z.ZodNumber;
|
|
161
232
|
}, z.core.$strip>>;
|
|
162
233
|
}, z.core.$strict>;
|
|
234
|
+
/** Current subagent result schema, including optional model token cost. */
|
|
235
|
+
export declare const runtimeSubagentChildResultWithCostSchema: z.ZodType<RuntimeSubagentChildResult>;
|
|
163
236
|
/**
|
|
164
237
|
* Subagent failure synthesized on the parent side when no child produced a
|
|
165
238
|
* result: dispatch rejections, start failures, and agentId-continuation
|
|
@@ -175,7 +248,7 @@ declare const runtimeSubagentDispatchFailureSchema: z.ZodObject<{
|
|
|
175
248
|
isError: z.ZodLiteral<true>;
|
|
176
249
|
kind: z.ZodLiteral<"subagent-result">;
|
|
177
250
|
origin: z.ZodLiteral<"dispatch">;
|
|
178
|
-
output: z.ZodType<import("
|
|
251
|
+
output: z.ZodType<import("#shared/json.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonValue, unknown>>;
|
|
179
252
|
subagentName: z.ZodString;
|
|
180
253
|
}, z.core.$strict>;
|
|
181
254
|
/**
|
|
@@ -199,7 +272,7 @@ declare const runtimeLoadSkillActionResultSchema: z.ZodObject<{
|
|
|
199
272
|
callId: z.ZodString;
|
|
200
273
|
isError: z.ZodOptional<z.ZodBoolean>;
|
|
201
274
|
kind: z.ZodLiteral<"load-skill-result">;
|
|
202
|
-
output: z.ZodType<import("
|
|
275
|
+
output: z.ZodType<import("#shared/json.js").JsonValue, unknown, z.core.$ZodTypeInternals<import("#shared/json.js").JsonValue, unknown>>;
|
|
203
276
|
name: z.ZodOptional<z.ZodString>;
|
|
204
277
|
}, z.core.$strict>;
|
|
205
278
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{jsonObjectSchema,jsonValueSchema}from"#shared/json-schemas.js";import{
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{jsonObjectSchema,jsonValueSchema}from"#shared/json-schemas.js";import{tokenUsageSchema,tokenUsageWithCostSchema}from"#shared/token-usage.js";import{agentTurnOutcomeSchema,agentTurnOutcomeWithCostSchema}from"#shared/agent-turn-outcome.js";const runtimeToolCallActionRequestSchema=z.object({callId:z.string(),input:jsonObjectSchema,kind:z.literal(`tool-call`),toolName:z.string()}).strict(),runtimeSubagentCallActionRequestSchema=z.object({callId:z.string(),description:z.string(),input:jsonObjectSchema,kind:z.literal(`subagent-call`),name:z.string(),nodeId:z.string(),subagentName:z.string()}).strict(),runtimeRemoteAgentCallActionRequestSchema=z.object({callId:z.string(),description:z.string(),input:jsonObjectSchema,kind:z.literal(`remote-agent-call`),name:z.string(),nodeId:z.string(),remoteAgentName:z.string()}).strict(),runtimeWorkflowToolCallActionRequestSchema=z.object({callId:z.string(),input:jsonObjectSchema,kind:z.literal(`workflow-tool-call`),toolName:z.string(),workflowId:z.string()}).strict();z.object({callId:z.string(),description:z.string(),input:jsonObjectSchema,kind:z.literal(`subagent-call`),name:z.string(),nodeId:z.string(),subagentName:z.string()}).strict();const runtimeRemoteAgentDispatchRequestSchema=z.object({callId:z.string(),description:z.string(),input:jsonObjectSchema,kind:z.literal(`remote-agent-call`),name:z.string(),nodeId:z.string(),remoteAgentName:z.string()}).strict(),runtimeWorkflowTaskRequestSchema=z.object({callId:z.string(),executeInput:jsonValueSchema.optional(),input:jsonObjectSchema,kind:z.literal(`workflow-task`),nodeId:z.string().optional(),resultKind:z.enum([`subagent`,`tool`]).optional(),toolName:z.string(),workflowId:z.string()}).strict(),runtimeLoadSkillActionRequestSchema=z.object({callId:z.string(),input:jsonObjectSchema,kind:z.literal(`load-skill`)}).strict(),runtimeActionRequestSchema=z.discriminatedUnion(`kind`,[runtimeLoadSkillActionRequestSchema,runtimeRemoteAgentCallActionRequestSchema,runtimeSubagentCallActionRequestSchema,runtimeToolCallActionRequestSchema,runtimeWorkflowToolCallActionRequestSchema]);z.object({callId:z.string(),isError:z.boolean().optional(),kind:z.literal(`tool-result`),output:jsonValueSchema,toolName:z.string()}).strict();const runtimeSubagentChildResultFields={backgroundTask:z.strictObject({status:z.literal(`working`),taskId:z.string()}).optional(),callId:z.string(),isError:z.boolean().optional(),kind:z.literal(`subagent-result`),origin:z.literal(`child`),output:jsonValueSchema,subagentName:z.string()},runtimeSubagentChildResultSchema=z.object({backgroundTask:z.strictObject({status:z.literal(`working`),taskId:z.string()}).optional(),callId:z.string(),isError:z.boolean().optional(),kind:z.literal(`subagent-result`),origin:z.literal(`child`),outcome:agentTurnOutcomeSchema,output:jsonValueSchema,subagentName:z.string(),usage:tokenUsageSchema.optional()}).strict(),runtimeSubagentChildResultWithCostSchema=z.object({...runtimeSubagentChildResultFields,outcome:agentTurnOutcomeWithCostSchema,usage:tokenUsageWithCostSchema.optional()}).strict();z.object({callId:z.string(),isError:z.literal(!0),kind:z.literal(`subagent-result`),origin:z.literal(`dispatch`),output:jsonValueSchema,subagentName:z.string()}).strict(),z.object({callId:z.string(),isError:z.boolean().optional(),kind:z.literal(`load-skill-result`),output:jsonValueSchema,name:z.string().optional()}).strict();export{runtimeActionRequestSchema,runtimeRemoteAgentCallActionRequestSchema,runtimeRemoteAgentDispatchRequestSchema,runtimeSubagentChildResultSchema,runtimeSubagentChildResultWithCostSchema,runtimeToolCallActionRequestSchema,runtimeWorkflowTaskRequestSchema};
|
|
@@ -157,6 +157,19 @@ export interface AgentLimitsDefinition {
|
|
|
157
157
|
* inherit the parent's remaining output quota when the parent has one.
|
|
158
158
|
*/
|
|
159
159
|
readonly maxOutputTokensPerSession?: number | false;
|
|
160
|
+
/**
|
|
161
|
+
* Maximum provider-reported model token cost accumulated by one durable
|
|
162
|
+
* session, in US dollars.
|
|
163
|
+
*
|
|
164
|
+
* eve checks this before starting each model call. The model call that
|
|
165
|
+
* crosses the limit is allowed to finish because providers report cost only
|
|
166
|
+
* after the call completes; later model calls in the same session are
|
|
167
|
+
* blocked.
|
|
168
|
+
*
|
|
169
|
+
* `false` disables the limit. Unset by default; delegated subagent sessions
|
|
170
|
+
* inherit the parent's remaining token-cost quota when the parent has one.
|
|
171
|
+
*/
|
|
172
|
+
readonly maxTokenCostUsdPerSession?: number | false;
|
|
160
173
|
}
|
|
161
174
|
/**
|
|
162
175
|
* Experimental, opt-in agent capabilities authored in `agent.ts`.
|
|
@@ -45,3 +45,5 @@ export type AgentTurnOutcome = {
|
|
|
45
45
|
* callbacks). Local notification paths construct the type directly.
|
|
46
46
|
*/
|
|
47
47
|
export declare const agentTurnOutcomeSchema: z.ZodType<AgentTurnOutcome>;
|
|
48
|
+
/** Current outcome schema, including optional model token cost. */
|
|
49
|
+
export declare const agentTurnOutcomeWithCostSchema: z.ZodType<AgentTurnOutcome>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{tokenUsageSchema}from"#shared/token-usage.js";const jsonValueSchema=z.lazy(()=>z.union([z.null(),z.boolean(),z.number(),z.string(),z.array(jsonValueSchema),z.record(z.string(),jsonValueSchema)])),agentTurnResultSchema=z.discriminatedUnion(`kind`,[z.strictObject({kind:z.literal(`succeeded`),output:jsonValueSchema}),z.strictObject({error:jsonValueSchema,kind:z.literal(`failed`)}),z.strictObject({kind:z.literal(`cancelled`)})]),agentTurnOutcomeSchema=z.discriminatedUnion(`kind`,[z.strictObject({kind:z.literal(`parked`),result:agentTurnResultSchema,usageDelta:tokenUsageSchema}),z.strictObject({kind:z.literal(`terminal`),result:agentTurnResultSchema,usageDelta:tokenUsageSchema})]);export{agentTurnOutcomeSchema};
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{tokenUsageSchema,tokenUsageWithCostSchema}from"#shared/token-usage.js";const jsonValueSchema=z.lazy(()=>z.union([z.null(),z.boolean(),z.number(),z.string(),z.array(jsonValueSchema),z.record(z.string(),jsonValueSchema)])),agentTurnResultSchema=z.discriminatedUnion(`kind`,[z.strictObject({kind:z.literal(`succeeded`),output:jsonValueSchema}),z.strictObject({error:jsonValueSchema,kind:z.literal(`failed`)}),z.strictObject({kind:z.literal(`cancelled`)})]),agentTurnOutcomeSchema=z.discriminatedUnion(`kind`,[z.strictObject({kind:z.literal(`parked`),result:agentTurnResultSchema,usageDelta:tokenUsageSchema}),z.strictObject({kind:z.literal(`terminal`),result:agentTurnResultSchema,usageDelta:tokenUsageSchema})]),agentTurnOutcomeWithCostSchema=z.discriminatedUnion(`kind`,[z.strictObject({kind:z.literal(`parked`),result:agentTurnResultSchema,usageDelta:tokenUsageWithCostSchema}),z.strictObject({kind:z.literal(`terminal`),result:agentTurnResultSchema,usageDelta:tokenUsageWithCostSchema})]);export{agentTurnOutcomeSchema,agentTurnOutcomeWithCostSchema};
|
|
@@ -11,3 +11,5 @@ export interface ExtensionPackageRoots {
|
|
|
11
11
|
}
|
|
12
12
|
/** Parses the strict `package.json#eve.extension` object contract. */
|
|
13
13
|
export declare function parseExtensionPackageRoots(value: unknown): ExtensionPackageRoots | null;
|
|
14
|
+
/** Parses package-local extension distributions keyed by their export subpath. */
|
|
15
|
+
export declare function parseBuiltInExtensionPackageRoots(value: unknown, subpath: string): ExtensionPackageRoots | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function parseExtensionPackageRoots(e){if(typeof e!=`object`||!e||Array.isArray(e))return null;let t=e;if(typeof t.dist!=`string`||t.dist.length===0)return null;let n=parseExternalDependencies(t.externalDependencies);if(n===null)return null;let r={dist:t.dist};return n!==void 0&&(r.externalDependencies=n),t.source===void 0?r:typeof t.source==`string`&&t.source.length>0?{...r,source:t.source}:null}function parseExternalDependencies(e){if(e===void 0)return;if(!Array.isArray(e))return null;let t=new Set;for(let n of e){if(typeof n!=`string`||n.length===0)return null;t.add(n)}return[...t]}export{parseExtensionPackageRoots};
|
|
1
|
+
function parseExtensionPackageRoots(e){if(typeof e!=`object`||!e||Array.isArray(e))return null;let t=e;if(typeof t.dist!=`string`||t.dist.length===0)return null;let n=parseExternalDependencies(t.externalDependencies);if(n===null)return null;let r={dist:t.dist};return n!==void 0&&(r.externalDependencies=n),t.source===void 0?r:typeof t.source==`string`&&t.source.length>0?{...r,source:t.source}:null}function parseBuiltInExtensionPackageRoots(e,t){return typeof e!=`object`||!e||Array.isArray(e)?null:parseExtensionPackageRoots(e[t])}function parseExternalDependencies(e){if(e===void 0)return;if(!Array.isArray(e))return null;let t=new Set;for(let n of e){if(typeof n!=`string`||n.length===0)return null;t.add(n)}return[...t]}export{parseBuiltInExtensionPackageRoots,parseExtensionPackageRoots};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "#compiled/zod/index.js";
|
|
2
|
+
declare const gatewayCatalogModelSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
type: z.ZodString;
|
|
6
|
+
owned_by: z.ZodString;
|
|
7
|
+
released: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
8
|
+
tags: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
9
|
+
pricing: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
10
|
+
service_tiers: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
11
|
+
}, z.core.$strip>>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
/** One model entry from the AI Gateway catalog response. */
|
|
14
|
+
export type GatewayCatalogModel = z.infer<typeof gatewayCatalogModelSchema>;
|
|
15
|
+
/**
|
|
16
|
+
* Validates a Gateway catalog response. A malformed payload throws, but a
|
|
17
|
+
* malformed entry is skipped so one experimental entry shape cannot discard
|
|
18
|
+
* the rest of the catalog.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseGatewayModelCatalog(input: unknown): GatewayCatalogModel[];
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z}from"#compiled/zod/index.js";const gatewayCatalogModelSchema=z.object({id:z.string(),name:z.string(),type:z.string(),owned_by:z.string(),released:z.number().finite().optional().catch(void 0),tags:z.array(z.string()).optional().catch(void 0),pricing:z.object({service_tiers:z.record(z.string(),z.unknown()).optional().catch(void 0)}).optional().catch(void 0)}),gatewayCatalogSchema=z.object({data:z.array(z.unknown())}).transform(({data:e})=>e.flatMap(e=>{let n=gatewayCatalogModelSchema.safeParse(e);return n.success?[n.data]:[]}));function parseGatewayModelCatalog(e){let t=gatewayCatalogSchema.safeParse(e);if(!t.success)throw Error(`AI Gateway returned an invalid model catalog.`);return t.data}export{parseGatewayModelCatalog};
|
package/dist/src/shared/json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function jsonValuesEqual(e,t){if(e===t)return!0;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>jsonValuesEqual(e,t[n]));if(e===null||t===null||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.entries(e),r=t;return n.length===Object.keys(r).length&&n.every(([e,t])=>Object.hasOwn(r,e)&&jsonValuesEqual(t,r[e]))}const INVALID_JSON_VALUE_CANDIDATE=Symbol(`invalid-json-value-candidate`);function parseJsonValue(t){let n=normalizeJsonValueCandidate(t);if(n===INVALID_JSON_VALUE_CANDIDATE)throw TypeError(`Expected a JSON-serializable value.`);return n}function parseJsonObject(e){let t=parseJsonValue(e);if(!isJsonObjectValue(t))throw TypeError(`Expected a JSON-serializable object.`);return t}function normalizeJsonValueCandidate(t,n=new WeakSet){if(t===null||typeof t==`boolean`||typeof t==`string`)return t;if(typeof t==`number`)return Number.isFinite(t)?t:INVALID_JSON_VALUE_CANDIDATE;if(Array.isArray(t)){let r=[];for(let i of t){let t=normalizeJsonValueCandidate(i,n);if(t===INVALID_JSON_VALUE_CANDIDATE)return INVALID_JSON_VALUE_CANDIDATE;r.push(t)}return r}if(typeof t!=`object`||t===void 0||!isPlainObject(t)||n.has(t))return INVALID_JSON_VALUE_CANDIDATE;n.add(t);let r={};for(let[i,a]of Object.entries(t)){if(a===void 0)continue;let t=normalizeJsonValueCandidate(a,n);if(t===INVALID_JSON_VALUE_CANDIDATE)return INVALID_JSON_VALUE_CANDIDATE;r[i]=t}return n.delete(t),r}function isJsonObjectValue(e){return e!==null&&!Array.isArray(e)&&typeof e==`object`}function isPlainObject(e){let t=Object.getPrototypeOf(e);return t===null||t===
|
|
1
|
+
function jsonValuesEqual(e,t){if(e===t)return!0;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>jsonValuesEqual(e,t[n]));if(e===null||t===null||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.entries(e),r=t;return n.length===Object.keys(r).length&&n.every(([e,t])=>Object.hasOwn(r,e)&&jsonValuesEqual(t,r[e]))}const INVALID_JSON_VALUE_CANDIDATE=Symbol(`invalid-json-value-candidate`);function parseJsonValue(t){let n=normalizeJsonValueCandidate(t);if(n===INVALID_JSON_VALUE_CANDIDATE)throw TypeError(`Expected a JSON-serializable value.`);return n}function parseJsonObject(e){let t=parseJsonValue(e);if(!isJsonObjectValue(t))throw TypeError(`Expected a JSON-serializable object.`);return t}function normalizeJsonValueCandidate(t,n=new WeakSet){if(t===null||typeof t==`boolean`||typeof t==`string`)return t;if(typeof t==`number`)return Number.isFinite(t)?t:INVALID_JSON_VALUE_CANDIDATE;if(Array.isArray(t)){let r=[];for(let i of t){let t=normalizeJsonValueCandidate(i,n);if(t===INVALID_JSON_VALUE_CANDIDATE)return INVALID_JSON_VALUE_CANDIDATE;r.push(t)}return r}if(typeof t!=`object`||t===void 0||!isPlainObject(t)||n.has(t))return INVALID_JSON_VALUE_CANDIDATE;n.add(t);let r={};for(let[i,a]of Object.entries(t)){if(a===void 0)continue;let t=normalizeJsonValueCandidate(a,n);if(t===INVALID_JSON_VALUE_CANDIDATE)return INVALID_JSON_VALUE_CANDIDATE;r[i]=t}return n.delete(t),r}function isJsonObjectValue(e){return e!==null&&!Array.isArray(e)&&typeof e==`object`}function isPlainObject(e){let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}export{isJsonObjectValue,jsonValuesEqual,parseJsonObject,parseJsonValue};
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import { z } from "#compiled/zod/index.js";
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* The single usage shape across eve: harness accumulation
|
|
6
|
-
* (`turn-tag-state`), delegated subagent results, remote session
|
|
7
|
-
* callbacks, and usage spans all carry this type.
|
|
8
|
-
*/
|
|
9
|
-
export type TokenUsage = z.infer<typeof tokenUsageSchema>;
|
|
10
|
-
/**
|
|
11
|
-
* Zod schema for {@link TokenUsage}.
|
|
12
|
-
*
|
|
13
|
-
* Validates the `usage` field of remote session callbacks, which may come
|
|
14
|
-
* from a callee on a different eve version — unknown keys are stripped
|
|
15
|
-
* rather than rejected so a newer sender never voids the whole payload.
|
|
16
|
-
*/
|
|
2
|
+
/** Provider-reported token usage and optional model token cost totals. */
|
|
3
|
+
export type TokenUsage = z.infer<typeof tokenUsageWithCostSchema>;
|
|
4
|
+
/** Token-only schema retained for historical wire formats. */
|
|
17
5
|
export declare const tokenUsageSchema: z.ZodObject<{
|
|
18
6
|
cacheReadTokens: z.ZodNumber;
|
|
19
7
|
cacheWriteTokens: z.ZodNumber;
|
|
20
8
|
inputTokens: z.ZodNumber;
|
|
21
9
|
outputTokens: z.ZodNumber;
|
|
22
10
|
}, z.core.$strip>;
|
|
11
|
+
/** Current schema for provider-reported token usage and model token cost. */
|
|
12
|
+
export declare const tokenUsageWithCostSchema: z.ZodObject<{
|
|
13
|
+
cacheReadTokens: z.ZodNumber;
|
|
14
|
+
cacheWriteTokens: z.ZodNumber;
|
|
15
|
+
inputTokens: z.ZodNumber;
|
|
16
|
+
outputTokens: z.ZodNumber;
|
|
17
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";const tokenUsageSchema=z.object({cacheReadTokens:z.number().int().nonnegative(),cacheWriteTokens:z.number().int().nonnegative(),inputTokens:z.number().int().nonnegative(),outputTokens:z.number().int().nonnegative()});export{tokenUsageSchema};
|
|
1
|
+
import{z}from"#compiled/zod/index.js";const tokenUsageSchema=z.object({cacheReadTokens:z.number().int().nonnegative(),cacheWriteTokens:z.number().int().nonnegative(),inputTokens:z.number().int().nonnegative(),outputTokens:z.number().int().nonnegative()}),tokenUsageWithCostSchema=tokenUsageSchema.extend({costUsd:z.number().finite().nonnegative().optional()});export{tokenUsageSchema,tokenUsageWithCostSchema};
|
|
@@ -18,8 +18,8 @@ export declare function createWorkflowSandboxTool(input: {
|
|
|
18
18
|
readonly hostTools: ToolSet;
|
|
19
19
|
}): Promise<ToolSet[string]>;
|
|
20
20
|
export declare function requestWorkflowSandboxInterrupt(input: {
|
|
21
|
-
readonly dispatchTarget: unknown;
|
|
22
21
|
readonly kind: string;
|
|
22
|
+
readonly task: unknown;
|
|
23
23
|
readonly toolInput: unknown;
|
|
24
24
|
readonly toolName: string;
|
|
25
25
|
}): Promise<unknown>;
|
|
@@ -28,6 +28,8 @@ export interface SubagentAdapterState extends Record<string, unknown> {
|
|
|
28
28
|
readonly parentContinuationToken: string;
|
|
29
29
|
readonly parentSessionId: string;
|
|
30
30
|
readonly subagentName: string;
|
|
31
|
+
/** Owning task when this child was started by a background workflow tool. */
|
|
32
|
+
readonly taskId?: string;
|
|
31
33
|
}
|
|
32
34
|
/**
|
|
33
35
|
* Narrow runtime guard for {@link SubagentAdapterState}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const SUBAGENT_ADAPTER_KIND=`subagent`;function isSubagentAdapterState(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.callId==`string`&&t.callId.length>0&&typeof t.parentContinuationToken==`string`&&t.parentContinuationToken.length>0&&typeof t.parentSessionId==`string`&&typeof t.subagentName==`string`&&t.subagentName.length>0}export{SUBAGENT_ADAPTER_KIND,isSubagentAdapterState};
|
|
1
|
+
const SUBAGENT_ADAPTER_KIND=`subagent`;function isSubagentAdapterState(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.callId==`string`&&t.callId.length>0&&typeof t.parentContinuationToken==`string`&&t.parentContinuationToken.length>0&&typeof t.parentSessionId==`string`&&typeof t.subagentName==`string`&&t.subagentName.length>0&&(t.taskId===void 0||typeof t.taskId==`string`&&t.taskId.length>0)}export{SUBAGENT_ADAPTER_KIND,isSubagentAdapterState};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createErrorId,createLogger}from"#internal/logging.js";import{ContinuationTokenKey,SessionIdKey}from"#context/keys.js";import{resumeHook}from"#internal/workflow/runtime.js";import{SUBAGENT_ADAPTER_KIND,isSubagentAdapterState}from"#subagents/adapter-state.js";const log=createLogger(`execution.subagent-adapter`),SUBAGENT_ADAPTER={kind:SUBAGENT_ADAPTER_KIND,async"approval.candidate"(e,t){await forwardSubagentAuthorizationEvent({data:e,type:`approval.candidate`},t)},async"approval.settled"(e,t){await forwardSubagentAuthorizationEvent({data:e,type:`approval.settled`},t)},async"authorization.required"(e,t){await forwardSubagentAuthorizationEvent({data:e,type:`authorization.required`},t)},async"authorization.completed"(e,t){await forwardSubagentAuthorizationEvent({data:e,type:`authorization.completed`},t)},async"input.requested"(e,t){let i=t.state;isSubagentAdapterState(i)&&await forwardSubagentInputRequestStep({hookPayload:{callId:i.callId,childContinuationToken:t.ctx.require(ContinuationTokenKey),childSessionId:t.ctx.require(SessionIdKey),event:{requests:e.requests,sequence:e.sequence,stepIndex:e.stepIndex,turnId:e.turnId},kind:`subagent-input-request`,subagentName:i.subagentName},parentContinuationToken:i.parentContinuationToken})}};async function forwardSubagentAuthorizationEvent(e,t){let n=t.state;isSubagentAdapterState(n)&&await forwardSubagentAuthorizationEventStep({hookPayload:{callId:n.callId,childSessionId:t.ctx.require(SessionIdKey),event:e,kind:`subagent-authorization-event`,subagentName:n.subagentName},parentContinuationToken:n.parentContinuationToken})}async function forwardSubagentAuthorizationEventStep(t){"use step";try{await resumeHook(t.parentContinuationToken,t.hookPayload)}catch(n){let r=createErrorId();throw log.warn(`failed to forward subagent authorization event to parent`,{callId:t.hookPayload.callId,childSessionId:t.hookPayload.childSessionId,errorId:r,eventType:t.hookPayload.event.type,parentContinuationToken:t.parentContinuationToken,subagentName:t.hookPayload.subagentName,error:n}),n}}async function forwardSubagentInputRequestStep(t){"use step";try{await resumeHook(t.parentContinuationToken,t.hookPayload)}catch(n){let r=createErrorId();throw log.warn(`failed to forward proxied HITL batch to parent`,{callId:t.hookPayload.callId,childContinuationToken:t.hookPayload.childContinuationToken,childSessionId:t.hookPayload.childSessionId,errorId:r,parentContinuationToken:t.parentContinuationToken,subagentName:t.hookPayload.subagentName,error:n}),n}}export{SUBAGENT_ADAPTER};
|
|
@@ -11,6 +11,12 @@ export declare const AGENT_MISMATCH = "AGENT_MISMATCH";
|
|
|
11
11
|
export declare const AGENT_UNREACHABLE = "AGENT_UNREACHABLE";
|
|
12
12
|
/** Error code for an agent that is starting or already running a turn. */
|
|
13
13
|
export declare const AGENT_BUSY = "AGENT_BUSY";
|
|
14
|
+
/** Describes the owner blocking a continuation without exposing workflow run ids. */
|
|
15
|
+
export declare function formatAgentBusyMessage(input: {
|
|
16
|
+
readonly agentId: string;
|
|
17
|
+
readonly agentName: string;
|
|
18
|
+
readonly ownerId?: string;
|
|
19
|
+
}): string;
|
|
14
20
|
/** Error code for a local subagent that failed to start. */
|
|
15
21
|
export declare const SUBAGENT_START_FAILED = "SUBAGENT_START_FAILED";
|
|
16
22
|
/** Error code for a delegated subagent whose execution threw. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const AGENT_MISMATCH=`AGENT_MISMATCH`,AGENT_UNREACHABLE=`AGENT_UNREACHABLE`,AGENT_BUSY=`AGENT_BUSY`;function formatAgentBusyMessage(e){let t=`Agent "${e.agentName}" with id "${e.agentId}" is still working on`;return e.ownerId?.startsWith(`task_`)?`${t} task "${e.ownerId}".`:`${t} ${e.ownerId===void 0?`another task`:`another invocation`}.`}const SUBAGENT_START_FAILED=`SUBAGENT_START_FAILED`,SUBAGENT_EXECUTION_FAILED=`SUBAGENT_EXECUTION_FAILED`,REMOTE_AGENT_START_FAILED=`REMOTE_AGENT_START_FAILED`,REMOTE_AGENT_FAILED=`REMOTE_AGENT_FAILED`,SESSION_FAILED=`SESSION_FAILED`;export{AGENT_BUSY,AGENT_MISMATCH,AGENT_UNREACHABLE,REMOTE_AGENT_FAILED,REMOTE_AGENT_START_FAILED,SESSION_FAILED,SUBAGENT_EXECUTION_FAILED,SUBAGENT_START_FAILED,formatAgentBusyMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{isInputRequest}from"#shared/input.js";import{jsonValueSchema}from"#shared/json-schemas.js";import{resumeHook}from"#internal/workflow/runtime.js";import{REMOTE_AGENT_FAILED}from"#subagents/agent-handle-errors.js";import{tokenUsageWithCostSchema}from"#shared/token-usage.js";import{agentTurnOutcomeWithCostSchema}from"#shared/agent-turn-outcome.js";import{readTaskIdFromInboxToken}from"#tasks/task-inbox-token.js";const ZERO_TOKEN_USAGE={cacheReadTokens:0,cacheWriteTokens:0,inputTokens:0,outputTokens:0},eventCoordinateSchema=z.number().int().nonnegative(),authorizationChallengeSchema=z.looseObject({displayName:z.string().optional(),expiresAt:z.string().optional(),instructions:z.string().optional(),url:z.string().optional(),userCode:z.string().optional()}),taskInputEventSchema=z.looseObject({requests:z.array(jsonValueSchema.refine(isInputRequest)).min(1),sequence:eventCoordinateSchema,stepIndex:eventCoordinateSchema,turnId:z.string()}),taskAuthorizationEventSchema=z.discriminatedUnion(`type`,[z.looseObject({data:z.looseObject({attemptId:z.string().optional(),authorization:authorizationChallengeSchema.optional(),description:z.string(),name:z.string(),sequence:eventCoordinateSchema,stepIndex:eventCoordinateSchema,turnId:z.string(),webhookUrl:z.string().optional()}),type:z.literal(`authorization.required`)}),z.looseObject({data:z.looseObject({attemptId:z.string().optional(),authorization:authorizationChallengeSchema.optional(),name:z.string(),outcome:z.enum([`authorized`,`declined`,`failed`,`timed-out`]),reason:z.string().optional(),sequence:eventCoordinateSchema,stepIndex:eventCoordinateSchema,turnId:z.string()}),type:z.literal(`authorization.completed`)})]),taskEventCallbackSchema=z.discriminatedUnion(`kind`,[z.object({callId:z.string(),childContinuationToken:z.string(),childSessionId:z.string(),event:taskInputEventSchema,kind:z.literal(`task.input-requested`),subagentName:z.string(),taskId:z.string()}),z.object({callId:z.string(),childContinuationToken:z.string(),childSessionId:z.string(),event:taskAuthorizationEventSchema,kind:z.literal(`task.authorization`),subagentName:z.string(),taskId:z.string()})]),taskTurnStartedCallbackSchema=z.object({kind:z.literal(`turn.started`),sessionId:z.string().min(1),taskId:z.string().min(1),turnId:z.string().min(1)}),taskUpdateCallbackSchema=z.object({callId:z.string().min(1),kind:z.literal(`task.update`),message:z.string().min(1),taskId:z.string().min(1),updateEpoch:z.string().min(1),updateIndex:eventCoordinateSchema}),sessionResultCallbackSchema=z.discriminatedUnion(`kind`,[z.object({callId:z.string().min(1),kind:z.literal(`session.completed`),output:jsonValueSchema.optional(),subagentName:z.string().min(1),usage:z.unknown().optional()}),z.object({callId:z.string().min(1),error:jsonValueSchema.optional(),kind:z.literal(`session.failed`),subagentName:z.string().min(1),usage:z.unknown().optional()}),z.object({callId:z.string().min(1),kind:z.literal(`turn.completed`),outcome:agentTurnOutcomeWithCostSchema,output:jsonValueSchema.optional(),subagentName:z.string().min(1)}),z.object({callId:z.string().min(1),error:jsonValueSchema,kind:z.literal(`turn.failed`),outcome:agentTurnOutcomeWithCostSchema,subagentName:z.string().min(1)})]);async function handleSessionCallbackRequest(e,t){let n=t.params.token;if(typeof n!=`string`||n.length===0)return Response.json({error:`Missing callback token.`,ok:!1},{status:400});let i;try{i=await e.json()}catch{return Response.json({error:`Invalid JSON body.`,ok:!1},{status:400})}let a=projectTaskEvent(i,n);if(a instanceof Response)return a;if(a!==void 0){try{await resumeHook(n,a)}catch{return Response.json({error:`Session callback not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}let o=projectTaskUpdate(i,n);if(o instanceof Response)return o;if(o!==void 0){try{await resumeHook(n,o)}catch{return Response.json({error:`Session callback not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}let s=rejectDirectTaskTurnStarted(i,n);if(s instanceof Response)return s;if(s!==void 0){try{await resumeHook(n,s)}catch{return Response.json({error:`Session callback not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}let c=projectSessionCallbackResult(i);if(c instanceof Response)return c;try{await resumeHook(n,{kind:`runtime-action-result`,results:[c]})}catch{return Response.json({error:`Session callback not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}function callbackKind(e){if(!(typeof e!=`object`||!e))return Reflect.get(e,`kind`)}function projectTaskEvent(e,t){let n=callbackKind(e);if(n!==`task.input-requested`&&n!==`task.authorization`)return;let r=taskEventCallbackSchema.safeParse(e);if(!r.success)return Response.json({error:`Invalid task event callback.`,ok:!1},{status:400});let i=r.data;if(readTaskIdFromInboxToken(t)!==void 0){let e=rejectMismatchedTaskToken(t,i.taskId);return e===void 0?Response.json({error:`Direct subagent task events are no longer accepted.`,ok:!1},{status:410}):e}return i.kind===`task.input-requested`?{callId:i.callId,childContinuationToken:i.childContinuationToken,childSessionId:i.childSessionId,event:i.event,kind:`subagent-input-request`,subagentName:i.subagentName}:{callId:i.callId,childSessionId:i.childSessionId,event:i.event,kind:`subagent-authorization-event`,subagentName:i.subagentName}}function rejectDirectTaskTurnStarted(e,t){if(callbackKind(e)!==`turn.started`)return;let n=taskTurnStartedCallbackSchema.safeParse(e);if(!n.success)return Response.json({error:`Invalid task turn-start callback.`,ok:!1},{status:400});let r=rejectMismatchedTaskToken(t,n.data.taskId);return r===void 0?Response.json({error:`Direct subagent task turn callbacks are no longer accepted.`,ok:!1},{status:410}):r}function projectTaskUpdate(e,t){if(callbackKind(e)!==`task.update`)return;let n=taskUpdateCallbackSchema.safeParse(e);if(!n.success)return Response.json({error:`Invalid task update callback.`,ok:!1},{status:400});if(readTaskIdFromInboxToken(t)!==void 0){let e=rejectMismatchedTaskToken(t,n.data.taskId);if(e!==void 0)return e}return{callId:n.data.callId,kind:`task-update`,message:n.data.message,updateEpoch:n.data.updateEpoch,updateIndex:n.data.updateIndex}}function rejectMismatchedTaskToken(e,t){return readTaskIdFromInboxToken(e)===t?void 0:Response.json({error:`Task callback token mismatch.`,ok:!1},{status:403})}function projectSessionCallbackResult(e){if(typeof e!=`object`||!e)return Response.json({error:`Expected a JSON object.`,ok:!1},{status:400});let t=callbackKind(e);if(t!==`session.completed`&&t!==`session.failed`&&t!==`turn.completed`&&t!==`turn.failed`)return Response.json({error:`Unsupported callback kind.`,ok:!1},{status:400});let n=sessionResultCallbackSchema.safeParse(e);if(!n.success)return Response.json({error:`Invalid session result callback.`,ok:!1},{status:400});let r=n.data;if(r.kind===`session.completed`){let e=r.output??``,t=parseCallbackUsage(r.usage),n={callId:r.callId,kind:`subagent-result`,origin:`child`,outcome:{kind:`terminal`,result:{kind:`succeeded`,output:e},usageDelta:t??ZERO_TOKEN_USAGE},output:e,subagentName:r.subagentName};return t===void 0?n:{...n,usage:t}}if(r.kind===`session.failed`){let e=r.error===void 0?{code:REMOTE_AGENT_FAILED,message:`Remote agent failed.`}:r.error,t=parseCallbackUsage(r.usage);return{callId:r.callId,isError:!0,kind:`subagent-result`,origin:`child`,outcome:{kind:`terminal`,result:{error:e,kind:`failed`},usageDelta:t??ZERO_TOKEN_USAGE},output:e,subagentName:r.subagentName}}return r.kind===`turn.completed`?{callId:r.callId,kind:`subagent-result`,origin:`child`,outcome:r.outcome,output:r.output??``,subagentName:r.subagentName,usage:r.outcome.usageDelta}:{callId:r.callId,isError:!0,kind:`subagent-result`,origin:`child`,outcome:r.outcome,output:r.error,subagentName:r.subagentName}}function parseCallbackUsage(e){if(e===void 0)return;let t=tokenUsageWithCostSchema.safeParse(e);return t.success?t.data:void 0}export{handleSessionCallbackRequest};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createLogger}from"#internal/logging.js";import{SessionCallbackKey}from"#context/keys.js";import{toErrorMessage}from"#shared/errors.js";import{parseSessionCallback}from"#channel/session-callback.js";import{SESSION_FAILED}from"#subagents/agent-handle-errors.js";import{postSessionCallbackRequest}from"#execution/session-callback-request.js";const log=createLogger(`execution.session-callback`);async function fireTaskEventCallbackStep(e){"use step";let t=parseSerializedSessionCallback(e.callback);if(t.taskId===void 0)return;let n=e.event.type===`input.requested`,r=n?`task.input-requested`:`task.authorization`,i=await postSessionCallbackRequest({body:{callId:t.callId,childContinuationToken:e.childContinuationToken,childSessionId:e.childSessionId,event:n?e.event.data:e.event,kind:r,subagentName:t.subagentName,taskId:t.taskId},url:t.url});if(!i.ok)throw Error(`Task event callback failed with HTTP ${i.status}.`)}async function fireTaskUpdateCallbackStep(e){"use step";let t=parseSerializedSessionCallback(e.callback);if(t.taskId===void 0)return;let n=await postSessionCallbackRequest({body:{callId:e.callId,updateIndex:e.updateIndex,updateEpoch:e.updateEpoch,kind:`task.update`,message:e.message,taskId:t.taskId},url:t.url});if(!n.ok)throw Error(`Task update callback failed with HTTP ${n.status}.`);return t.taskId}async function fireSessionCallbackStep(e){"use step";let r=e.serializedContext[`eve.sessionId`]??``,o=e.serializedContext[SessionCallbackKey.name];if(o!==void 0)try{let t=parseSerializedSessionCallback(o),a=await postSessionCallbackRequest({body:e.status===`completed`?buildCompletedCallbackBody({callback:t,output:e.output,sessionId:r,usage:e.usage}):{callId:t.callId,error:{code:SESSION_FAILED,message:toErrorMessage(e.error)},kind:`session.failed`,sessionId:r,subagentName:t.subagentName,usage:e.usage},url:t.url});if(!a.ok)throw Error(`Session callback failed with HTTP ${a.status}.`)}catch(e){throw log.error(`failed to post session callback`,{error:e,sessionId:r}),e}}function buildCompletedCallbackBody(e){let t={callId:e.callback.callId,kind:`session.completed`,output:e.output??``,sessionId:e.sessionId,subagentName:e.callback.subagentName};return e.usage===void 0?t:{...t,usage:e.usage}}function parseSerializedSessionCallback(e){let t=parseSessionCallback(e);if(!t.ok)throw Error(`Serialized session callback is invalid.`,{cause:t.cause});return t.callback}export{fireSessionCallbackStep,fireTaskEventCallbackStep,fireTaskUpdateCallbackStep};
|
package/dist/src/{execution/agent-continuation-bundle.d.ts → subagents/continuation-bundle.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RuntimeAgentHandleAction } from "#
|
|
1
|
+
import type { RuntimeAgentHandleAction } from "#subagents/handle-dispatch.js";
|
|
2
2
|
import type { CompiledBundle } from "#runtime/sessions/runtime-context-keys.js";
|
|
3
3
|
import type { getDynamicSubagentSelection } from "#context/dynamic-subagent-lifecycle.js";
|
|
4
4
|
type DynamicRemoteAgentConfig = NonNullable<Extract<ReturnType<typeof getDynamicSubagentSelection>, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolveRemoteAgentForAction}from"#subagents/remote-dispatch.js";function createAgentContinuationBundle(e){let{action:t,dynamicRemoteAgent:n}=e;if(t.kind!==`remote-agent-call`||n===void 0)return e.bundle;let r=e.bundle.subagentRegistry.subagentsByNodeId,i=Object.assign(new Map(r),{get:e=>e===t.nodeId?{definition:resolveRemoteAgentForAction({dynamicRemoteAgent:n,nodeId:e,registry:r,remoteAgentName:t.remoteAgentName})}:r.get(e)});return{...e.bundle,subagentRegistry:{...e.bundle.subagentRegistry,subagentsByNodeId:i}}}export{createAgentContinuationBundle};
|