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
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { z } from "#compiled/zod/index.js";
|
|
2
|
+
import type { DeliverHookPayload, SessionCommand, SessionTimeoutHookPayload } from "#channel/types.js";
|
|
3
|
+
import type { TaskView } from "#tasks/types.js";
|
|
4
|
+
/** Version 4 replaces executor-specific task envelopes with typed workflow-run requests. */
|
|
5
|
+
export declare const sessionInboxWireV4Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
auth: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
7
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
8
|
+
authenticator: z.ZodString;
|
|
9
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
10
|
+
principalId: z.ZodString;
|
|
11
|
+
principalType: z.ZodString;
|
|
12
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strict>>>;
|
|
14
|
+
kind: z.ZodLiteral<"deliver">;
|
|
15
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
16
|
+
taskDeliveryId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
turnPolicy: z.ZodOptional<z.ZodEnum<{
|
|
18
|
+
queue: "queue";
|
|
19
|
+
steer: "steer";
|
|
20
|
+
}>>;
|
|
21
|
+
caller: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
callId: z.ZodString;
|
|
23
|
+
replyTo: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"hook">;
|
|
25
|
+
token: z.ZodString;
|
|
26
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"callback">;
|
|
28
|
+
token: z.ZodString;
|
|
29
|
+
url: z.ZodString;
|
|
30
|
+
}, z.core.$strict>], "kind">;
|
|
31
|
+
subagentName: z.ZodString;
|
|
32
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
33
|
+
activityObserver: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
sink: z.ZodObject<{
|
|
35
|
+
url: z.ZodString;
|
|
36
|
+
version: z.ZodLiteral<1>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
workIdentity: z.ZodOptional<z.ZodObject<{
|
|
39
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
kind: z.ZodEnum<{
|
|
42
|
+
"remote-agent": "remote-agent";
|
|
43
|
+
"root-turn": "root-turn";
|
|
44
|
+
subagent: "subagent";
|
|
45
|
+
task: "task";
|
|
46
|
+
}>;
|
|
47
|
+
name: z.ZodOptional<z.ZodString>;
|
|
48
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
49
|
+
rootSessionId: z.ZodString;
|
|
50
|
+
rootTurnId: z.ZodString;
|
|
51
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
52
|
+
turnId: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strict>>;
|
|
54
|
+
}, z.core.$strict>>;
|
|
55
|
+
}, z.core.$strict>>;
|
|
56
|
+
deliveryMetadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
57
|
+
channelKind: z.ZodString;
|
|
58
|
+
channelName: z.ZodString;
|
|
59
|
+
deliveryId: z.ZodString;
|
|
60
|
+
payloadIndex: z.ZodNumber;
|
|
61
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
62
|
+
requestTraceContext: z.ZodOptional<z.ZodObject<{
|
|
63
|
+
spanId: z.ZodString;
|
|
64
|
+
traceFlags: z.ZodNumber;
|
|
65
|
+
traceId: z.ZodString;
|
|
66
|
+
}, z.core.$strict>>;
|
|
67
|
+
acceptedDeploymentId: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, z.core.$strict>>>;
|
|
69
|
+
payload: z.ZodObject<{
|
|
70
|
+
context: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
71
|
+
inputResponses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
72
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
73
|
+
requestId: z.ZodString;
|
|
74
|
+
text: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strict>>>;
|
|
76
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
77
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
78
|
+
text: z.ZodString;
|
|
79
|
+
type: z.ZodLiteral<"text">;
|
|
80
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
81
|
+
image: z.ZodCustom<URL | import("ai").DataContent, URL | import("ai").DataContent>;
|
|
82
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
83
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
84
|
+
type: z.ZodLiteral<"image">;
|
|
85
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
86
|
+
data: z.ZodCustom<URL | import("ai").DataContent, URL | import("ai").DataContent>;
|
|
87
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
88
|
+
mediaType: z.ZodString;
|
|
89
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
90
|
+
type: z.ZodLiteral<"file">;
|
|
91
|
+
}, z.core.$strict>], "type">>]>>;
|
|
92
|
+
outputSchema: z.ZodOptional<z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>;
|
|
93
|
+
task: z.ZodOptional<z.ZodObject<{
|
|
94
|
+
agentRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
95
|
+
replyTo: z.ZodString;
|
|
96
|
+
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
97
|
+
input: z.ZodObject<{
|
|
98
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
99
|
+
message: z.ZodString;
|
|
100
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>>>;
|
|
101
|
+
target: z.ZodString;
|
|
102
|
+
}, z.core.$strict>;
|
|
103
|
+
invocationId: z.ZodString;
|
|
104
|
+
kind: z.ZodLiteral<"agent-invoke">;
|
|
105
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
106
|
+
kind: z.ZodLiteral<"agent-settled">;
|
|
107
|
+
result: z.ZodObject<{
|
|
108
|
+
backgroundTask: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
status: z.ZodLiteral<"working">;
|
|
110
|
+
taskId: z.ZodString;
|
|
111
|
+
}, z.core.$strict>>;
|
|
112
|
+
callId: z.ZodString;
|
|
113
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
kind: z.ZodLiteral<"subagent-result">;
|
|
115
|
+
origin: z.ZodLiteral<"child">;
|
|
116
|
+
outcome: z.ZodType<import("../../shared/agent-turn-outcome.ts").AgentTurnOutcome, unknown, z.core.$ZodTypeInternals<import("../../shared/agent-turn-outcome.ts").AgentTurnOutcome, unknown>>;
|
|
117
|
+
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
118
|
+
subagentName: z.ZodString;
|
|
119
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
120
|
+
cacheReadTokens: z.ZodNumber;
|
|
121
|
+
cacheWriteTokens: z.ZodNumber;
|
|
122
|
+
inputTokens: z.ZodNumber;
|
|
123
|
+
outputTokens: z.ZodNumber;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
}, z.core.$strict>;
|
|
126
|
+
}, z.core.$strict>], "kind">;
|
|
127
|
+
taskId: z.ZodString;
|
|
128
|
+
}, z.core.$strict>>>;
|
|
129
|
+
authorizationEvents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
130
|
+
hookPayload: z.ZodObject<{
|
|
131
|
+
callId: z.ZodString;
|
|
132
|
+
childSessionId: z.ZodString;
|
|
133
|
+
event: z.ZodCustom<Record<string, unknown>, Record<string, unknown>>;
|
|
134
|
+
kind: z.ZodLiteral<"subagent-authorization-event">;
|
|
135
|
+
subagentName: z.ZodString;
|
|
136
|
+
}, z.core.$strict>;
|
|
137
|
+
taskId: z.ZodString;
|
|
138
|
+
}, z.core.$strict>>>;
|
|
139
|
+
inputRequests: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
140
|
+
replyTo: z.ZodString;
|
|
141
|
+
sequence: z.ZodNumber;
|
|
142
|
+
stepIndex: z.ZodNumber;
|
|
143
|
+
taskId: z.ZodString;
|
|
144
|
+
turnId: z.ZodString;
|
|
145
|
+
request: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
146
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
147
|
+
replyTo: z.ZodString;
|
|
148
|
+
sequence: z.ZodNumber;
|
|
149
|
+
stepIndex: z.ZodNumber;
|
|
150
|
+
taskId: z.ZodString;
|
|
151
|
+
turnId: z.ZodString;
|
|
152
|
+
requests: z.ZodArray<z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>>;
|
|
153
|
+
}, z.core.$loose>]>>>;
|
|
154
|
+
views: z.ZodOptional<z.ZodArray<z.ZodType<TaskView, unknown, z.core.$ZodTypeInternals<TaskView, unknown>>>>;
|
|
155
|
+
}, z.core.$strict>>;
|
|
156
|
+
}, z.core.$loose>;
|
|
157
|
+
payloads: z.ZodArray<z.ZodObject<{
|
|
158
|
+
context: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
159
|
+
inputResponses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
160
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
161
|
+
requestId: z.ZodString;
|
|
162
|
+
text: z.ZodOptional<z.ZodString>;
|
|
163
|
+
}, z.core.$strict>>>;
|
|
164
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
165
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
166
|
+
text: z.ZodString;
|
|
167
|
+
type: z.ZodLiteral<"text">;
|
|
168
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
169
|
+
image: z.ZodCustom<URL | import("ai").DataContent, URL | import("ai").DataContent>;
|
|
170
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
171
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
172
|
+
type: z.ZodLiteral<"image">;
|
|
173
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
174
|
+
data: z.ZodCustom<URL | import("ai").DataContent, URL | import("ai").DataContent>;
|
|
175
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
176
|
+
mediaType: z.ZodString;
|
|
177
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
178
|
+
type: z.ZodLiteral<"file">;
|
|
179
|
+
}, z.core.$strict>], "type">>]>>;
|
|
180
|
+
outputSchema: z.ZodOptional<z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>;
|
|
181
|
+
task: z.ZodOptional<z.ZodObject<{
|
|
182
|
+
agentRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
183
|
+
replyTo: z.ZodString;
|
|
184
|
+
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
185
|
+
input: z.ZodObject<{
|
|
186
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
187
|
+
message: z.ZodString;
|
|
188
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>>>;
|
|
189
|
+
target: z.ZodString;
|
|
190
|
+
}, z.core.$strict>;
|
|
191
|
+
invocationId: z.ZodString;
|
|
192
|
+
kind: z.ZodLiteral<"agent-invoke">;
|
|
193
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
194
|
+
kind: z.ZodLiteral<"agent-settled">;
|
|
195
|
+
result: z.ZodObject<{
|
|
196
|
+
backgroundTask: z.ZodOptional<z.ZodObject<{
|
|
197
|
+
status: z.ZodLiteral<"working">;
|
|
198
|
+
taskId: z.ZodString;
|
|
199
|
+
}, z.core.$strict>>;
|
|
200
|
+
callId: z.ZodString;
|
|
201
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
202
|
+
kind: z.ZodLiteral<"subagent-result">;
|
|
203
|
+
origin: z.ZodLiteral<"child">;
|
|
204
|
+
outcome: z.ZodType<import("../../shared/agent-turn-outcome.ts").AgentTurnOutcome, unknown, z.core.$ZodTypeInternals<import("../../shared/agent-turn-outcome.ts").AgentTurnOutcome, unknown>>;
|
|
205
|
+
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
206
|
+
subagentName: z.ZodString;
|
|
207
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
cacheReadTokens: z.ZodNumber;
|
|
209
|
+
cacheWriteTokens: z.ZodNumber;
|
|
210
|
+
inputTokens: z.ZodNumber;
|
|
211
|
+
outputTokens: z.ZodNumber;
|
|
212
|
+
}, z.core.$strip>>;
|
|
213
|
+
}, z.core.$strict>;
|
|
214
|
+
}, z.core.$strict>], "kind">;
|
|
215
|
+
taskId: z.ZodString;
|
|
216
|
+
}, z.core.$strict>>>;
|
|
217
|
+
authorizationEvents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
218
|
+
hookPayload: z.ZodObject<{
|
|
219
|
+
callId: z.ZodString;
|
|
220
|
+
childSessionId: z.ZodString;
|
|
221
|
+
event: z.ZodCustom<Record<string, unknown>, Record<string, unknown>>;
|
|
222
|
+
kind: z.ZodLiteral<"subagent-authorization-event">;
|
|
223
|
+
subagentName: z.ZodString;
|
|
224
|
+
}, z.core.$strict>;
|
|
225
|
+
taskId: z.ZodString;
|
|
226
|
+
}, z.core.$strict>>>;
|
|
227
|
+
inputRequests: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
228
|
+
replyTo: z.ZodString;
|
|
229
|
+
sequence: z.ZodNumber;
|
|
230
|
+
stepIndex: z.ZodNumber;
|
|
231
|
+
taskId: z.ZodString;
|
|
232
|
+
turnId: z.ZodString;
|
|
233
|
+
request: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
234
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
235
|
+
replyTo: z.ZodString;
|
|
236
|
+
sequence: z.ZodNumber;
|
|
237
|
+
stepIndex: z.ZodNumber;
|
|
238
|
+
taskId: z.ZodString;
|
|
239
|
+
turnId: z.ZodString;
|
|
240
|
+
requests: z.ZodArray<z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>>;
|
|
241
|
+
}, z.core.$loose>]>>>;
|
|
242
|
+
views: z.ZodOptional<z.ZodArray<z.ZodType<TaskView, unknown, z.core.$ZodTypeInternals<TaskView, unknown>>>>;
|
|
243
|
+
}, z.core.$strict>>;
|
|
244
|
+
}, z.core.$loose>>;
|
|
245
|
+
version: z.ZodLiteral<4>;
|
|
246
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
247
|
+
kind: z.ZodLiteral<"session-timeout">;
|
|
248
|
+
version: z.ZodLiteral<4>;
|
|
249
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
250
|
+
kind: z.ZodLiteral<"clear">;
|
|
251
|
+
version: z.ZodLiteral<4>;
|
|
252
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
253
|
+
kind: z.ZodLiteral<"compact">;
|
|
254
|
+
version: z.ZodLiteral<4>;
|
|
255
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
256
|
+
kind: z.ZodLiteral<"reset">;
|
|
257
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
258
|
+
version: z.ZodLiteral<4>;
|
|
259
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
260
|
+
kind: z.ZodLiteral<"cancel">;
|
|
261
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
262
|
+
turnId: z.ZodOptional<z.ZodString>;
|
|
263
|
+
version: z.ZodLiteral<4>;
|
|
264
|
+
}, z.core.$strict>], "kind">;
|
|
265
|
+
export type SessionInboxWireV4 = z.infer<typeof sessionInboxWireV4Schema>;
|
|
266
|
+
/** Builds and validates one complete version-4 wire value. */
|
|
267
|
+
export declare function encodeSessionCommandV4(command: DeliverHookPayload | SessionCommand | SessionTimeoutHookPayload): SessionInboxWireV4;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{formatValidationError}from"#runtime/validation.js";import{jsonValueSchema}from"#shared/json-schemas.js";import{coalesceDeliverPayloads}from"#execution/deliver-payloads.js";import{SessionInboxWireError}from"#execution/wire/session-inbox-contract.js";import{sessionInboxWireV3Schema}from"#execution/wire/session-inbox-wire.v3.js";import{tokenUsageSchema}from"#shared/token-usage.js";import{runtimeSubagentChildResultSchema}from"#shared/action-types.js";const taskMetadataSchema=z.object({agentId:z.string().optional(),kind:z.string(),mode:z.enum([`local`,`remote`]).optional(),name:z.string()}).strict(),taskViewBase={executor:z.object({binding:z.object({data:z.record(z.string(),jsonValueSchema),kind:z.string()}).strict().optional()}).strict().optional(),metadata:taskMetadataSchema,taskId:z.string(),usage:tokenUsageSchema.optional()},taskViewSchema=z.discriminatedUnion(`status`,[z.object({...taskViewBase,status:z.literal(`working`)}).strict(),z.object({...taskViewBase,inputRequests:z.array(jsonValueSchema),status:z.literal(`input_required`)}).strict(),z.object({...taskViewBase,lastOutput:z.object({data:jsonValueSchema,type:z.literal(`result`)}).strict(),status:z.literal(`completed`)}).strict(),z.object({...taskViewBase,lastOutput:z.object({data:jsonValueSchema,type:z.literal(`error`)}).strict(),status:z.literal(`failed`)}).strict(),z.object({...taskViewBase,status:z.literal(`cancelled`)}).strict()]),eventCoordinateSchema=z.number().int().nonnegative(),taskInputRequestBase={replyTo:z.string(),sequence:eventCoordinateSchema,stepIndex:eventCoordinateSchema,taskId:z.string(),turnId:z.string()},taskInputRequestSchema=z.union([z.object({...taskInputRequestBase,request:jsonValueSchema}).loose(),z.object({...taskInputRequestBase,requests:z.array(jsonValueSchema)}).loose()]),agentInvocationInputSchema=z.object({agentId:z.string().optional(),message:z.string(),outputSchema:z.record(z.string(),jsonValueSchema).optional(),target:z.string()}).strict(),taskAgentRequestSchema=z.object({replyTo:z.string(),request:z.discriminatedUnion(`kind`,[z.object({input:agentInvocationInputSchema,invocationId:z.string(),kind:z.literal(`agent-invoke`)}).strict(),z.object({kind:z.literal(`agent-settled`),result:runtimeSubagentChildResultSchema}).strict()]),taskId:z.string()}).strict(),subagentAuthorizationEventHookPayloadSchema=z.object({callId:z.string(),childSessionId:z.string(),event:z.custom(e=>typeof e==`object`&&!!e&&!Array.isArray(e),`Expected an object.`),kind:z.literal(`subagent-authorization-event`),subagentName:z.string()}).strict(),taskAuthorizationEventSchema=z.object({hookPayload:subagentAuthorizationEventHookPayloadSchema,taskId:z.string()}).strict(),taskPayloadV4Schema=z.object({agentRequests:z.array(taskAgentRequestSchema).optional(),authorizationEvents:z.array(taskAuthorizationEventSchema).optional(),inputRequests:z.array(taskInputRequestSchema).optional(),views:z.array(taskViewSchema).optional()}).strict(),v3=sessionInboxWireV3Schema.options,v3Deliver=v3[0],deliverPayloadV4Schema=v3Deliver.shape.payload.extend({task:taskPayloadV4Schema.optional()}),version=z.literal(4),sessionInboxWireV4Schema=z.discriminatedUnion(`kind`,[v3Deliver.extend({payload:deliverPayloadV4Schema,payloads:z.array(deliverPayloadV4Schema),version}),v3[1].extend({version}),v3[2].extend({version}),v3[3].extend({version}),v3[4].extend({version}),v3[5].extend({version})]);function encodeSessionCommandV4(e){let t=e.kind===`send`?{auth:e.auth,caller:e.caller,deliveryMetadata:e.delivery===void 0?void 0:[{...e.delivery,payloadIndex:0}],kind:`deliver`,payload:e.payload,payloads:[e.payload],requestId:e.requestId,taskDeliveryId:e.taskDeliveryId,turnPolicy:e.turnPolicy,version:4}:e.kind===`deliver`?{...e,payload:coalesceDeliverPayloads(e.payloads),version:4}:{...e,version:4},n=sessionInboxWireV4Schema.safeParse(t);if(!n.success)throw new SessionInboxWireError(`Produced a session inbox payload that does not match wire version 4: ${formatValidationError(n.error)}`);return n.data}export{encodeSessionCommandV4,sessionInboxWireV4Schema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isObject}from"#shared/guards.js";const sessionInboxWireV3Migration={from:3,migrate(t){if(!isObject(t))throw Error(`session inbox wire v3 value is not an object.`);return t.kind===`deliver`?{...t,payload:migratePayload(t.payload),payloads:Array.isArray(t.payloads)?t.payloads.map(migratePayload):t.payloads,version:4}:{...t,version:4}},to:4};function migratePayload(t){if(!isObject(t)||!isObject(t.task))return t;let n=t.task;return{...t,task:{agentRequests:n.agentRequests,authorizationEvents:n.authorizationEvents,inputRequests:migrateInputRequests(n.inputRequests),views:Array.isArray(n.views)?n.views.map(migrateTaskView):n.views}}}function migrateInputRequests(t){if(Array.isArray(t))return t.flatMap(t=>{if(!isObject(t))return[];if(`request`in t||`requests`in t)return[t];if(!isObject(t.hookPayload)||typeof t.taskId!=`string`)return[];let n=t.hookPayload,r=n.event;return typeof n.childContinuationToken!=`string`||!isObject(r)||!Array.isArray(r.requests)||typeof r.sequence!=`number`||typeof r.stepIndex!=`number`||typeof r.turnId!=`string`?[]:r.requests.map(e=>({...t,replyTo:n.childContinuationToken,request:e,sequence:r.sequence,stepIndex:r.stepIndex,taskId:t.taskId,turnId:r.turnId}))})}function migrateTaskView(t){return!isObject(t)||!isObject(t.executor)?t:{...t,executor:t.executor.binding===void 0?void 0:{binding:t.executor.binding}}}export{sessionInboxWireV3Migration};
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import { z } from "#compiled/zod/index.js";
|
|
2
|
+
import type { DeliverHookPayload, SessionCommand, SessionTimeoutHookPayload } from "#channel/types.js";
|
|
3
|
+
import type { TaskView } from "#tasks/types.js";
|
|
4
|
+
/** Version 5 adds model token cost to delegated usage reports. */
|
|
5
|
+
export declare const sessionInboxWireV5Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
auth: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
7
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
8
|
+
authenticator: z.ZodString;
|
|
9
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
10
|
+
principalId: z.ZodString;
|
|
11
|
+
principalType: z.ZodString;
|
|
12
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strict>>>;
|
|
14
|
+
kind: z.ZodLiteral<"deliver">;
|
|
15
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
16
|
+
taskDeliveryId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
turnPolicy: z.ZodOptional<z.ZodEnum<{
|
|
18
|
+
queue: "queue";
|
|
19
|
+
steer: "steer";
|
|
20
|
+
}>>;
|
|
21
|
+
caller: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
callId: z.ZodString;
|
|
23
|
+
replyTo: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"hook">;
|
|
25
|
+
token: z.ZodString;
|
|
26
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"callback">;
|
|
28
|
+
token: z.ZodString;
|
|
29
|
+
url: z.ZodString;
|
|
30
|
+
}, z.core.$strict>], "kind">;
|
|
31
|
+
subagentName: z.ZodString;
|
|
32
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
33
|
+
activityObserver: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
sink: z.ZodObject<{
|
|
35
|
+
url: z.ZodString;
|
|
36
|
+
version: z.ZodLiteral<1>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
workIdentity: z.ZodOptional<z.ZodObject<{
|
|
39
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
kind: z.ZodEnum<{
|
|
42
|
+
"remote-agent": "remote-agent";
|
|
43
|
+
"root-turn": "root-turn";
|
|
44
|
+
subagent: "subagent";
|
|
45
|
+
task: "task";
|
|
46
|
+
}>;
|
|
47
|
+
name: z.ZodOptional<z.ZodString>;
|
|
48
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
49
|
+
rootSessionId: z.ZodString;
|
|
50
|
+
rootTurnId: z.ZodString;
|
|
51
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
52
|
+
turnId: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strict>>;
|
|
54
|
+
}, z.core.$strict>>;
|
|
55
|
+
}, z.core.$strict>>;
|
|
56
|
+
deliveryMetadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
57
|
+
channelKind: z.ZodString;
|
|
58
|
+
channelName: z.ZodString;
|
|
59
|
+
deliveryId: z.ZodString;
|
|
60
|
+
payloadIndex: z.ZodNumber;
|
|
61
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
62
|
+
requestTraceContext: z.ZodOptional<z.ZodObject<{
|
|
63
|
+
spanId: z.ZodString;
|
|
64
|
+
traceFlags: z.ZodNumber;
|
|
65
|
+
traceId: z.ZodString;
|
|
66
|
+
}, z.core.$strict>>;
|
|
67
|
+
acceptedDeploymentId: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, z.core.$strict>>>;
|
|
69
|
+
payload: z.ZodObject<{
|
|
70
|
+
context: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
71
|
+
inputResponses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
72
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
73
|
+
requestId: z.ZodString;
|
|
74
|
+
text: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strict>>>;
|
|
76
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
77
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
78
|
+
text: z.ZodString;
|
|
79
|
+
type: z.ZodLiteral<"text">;
|
|
80
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
81
|
+
image: z.ZodCustom<URL | import("ai").DataContent, URL | import("ai").DataContent>;
|
|
82
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
83
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
84
|
+
type: z.ZodLiteral<"image">;
|
|
85
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
86
|
+
data: z.ZodCustom<URL | import("ai").DataContent, URL | import("ai").DataContent>;
|
|
87
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
88
|
+
mediaType: z.ZodString;
|
|
89
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
90
|
+
type: z.ZodLiteral<"file">;
|
|
91
|
+
}, z.core.$strict>], "type">>]>>;
|
|
92
|
+
outputSchema: z.ZodOptional<z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>;
|
|
93
|
+
task: z.ZodOptional<z.ZodObject<{
|
|
94
|
+
agentRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
95
|
+
replyTo: z.ZodString;
|
|
96
|
+
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
97
|
+
input: z.ZodObject<{
|
|
98
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
99
|
+
message: z.ZodString;
|
|
100
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>>>;
|
|
101
|
+
target: z.ZodString;
|
|
102
|
+
}, z.core.$strict>;
|
|
103
|
+
invocationId: z.ZodString;
|
|
104
|
+
kind: z.ZodLiteral<"agent-invoke">;
|
|
105
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
106
|
+
kind: z.ZodLiteral<"agent-settled">;
|
|
107
|
+
result: z.ZodObject<{
|
|
108
|
+
backgroundTask: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
status: z.ZodLiteral<"working">;
|
|
110
|
+
taskId: z.ZodString;
|
|
111
|
+
}, z.core.$strict>>;
|
|
112
|
+
callId: z.ZodString;
|
|
113
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
kind: z.ZodLiteral<"subagent-result">;
|
|
115
|
+
origin: z.ZodLiteral<"child">;
|
|
116
|
+
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
117
|
+
kind: z.ZodLiteral<"parked">;
|
|
118
|
+
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
119
|
+
kind: z.ZodLiteral<"succeeded">;
|
|
120
|
+
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
121
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
122
|
+
error: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
123
|
+
kind: z.ZodLiteral<"failed">;
|
|
124
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
125
|
+
kind: z.ZodLiteral<"cancelled">;
|
|
126
|
+
}, z.core.$strict>], "kind">;
|
|
127
|
+
usageDelta: z.ZodObject<{
|
|
128
|
+
cacheReadTokens: z.ZodNumber;
|
|
129
|
+
cacheWriteTokens: z.ZodNumber;
|
|
130
|
+
inputTokens: z.ZodNumber;
|
|
131
|
+
outputTokens: z.ZodNumber;
|
|
132
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
135
|
+
kind: z.ZodLiteral<"terminal">;
|
|
136
|
+
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
137
|
+
kind: z.ZodLiteral<"succeeded">;
|
|
138
|
+
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
139
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
140
|
+
error: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
141
|
+
kind: z.ZodLiteral<"failed">;
|
|
142
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
143
|
+
kind: z.ZodLiteral<"cancelled">;
|
|
144
|
+
}, z.core.$strict>], "kind">;
|
|
145
|
+
usageDelta: z.ZodObject<{
|
|
146
|
+
cacheReadTokens: z.ZodNumber;
|
|
147
|
+
cacheWriteTokens: z.ZodNumber;
|
|
148
|
+
inputTokens: z.ZodNumber;
|
|
149
|
+
outputTokens: z.ZodNumber;
|
|
150
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
}, z.core.$strict>], "kind">;
|
|
153
|
+
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
154
|
+
subagentName: z.ZodString;
|
|
155
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
cacheReadTokens: z.ZodNumber;
|
|
157
|
+
cacheWriteTokens: z.ZodNumber;
|
|
158
|
+
inputTokens: z.ZodNumber;
|
|
159
|
+
outputTokens: z.ZodNumber;
|
|
160
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
}, z.core.$strip>>;
|
|
162
|
+
}, z.core.$strict>;
|
|
163
|
+
}, z.core.$strict>], "kind">;
|
|
164
|
+
taskId: z.ZodString;
|
|
165
|
+
}, z.core.$strict>>>;
|
|
166
|
+
authorizationEvents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
167
|
+
hookPayload: z.ZodObject<{
|
|
168
|
+
callId: z.ZodString;
|
|
169
|
+
childSessionId: z.ZodString;
|
|
170
|
+
event: z.ZodCustom<Record<string, unknown>, Record<string, unknown>>;
|
|
171
|
+
kind: z.ZodLiteral<"subagent-authorization-event">;
|
|
172
|
+
subagentName: z.ZodString;
|
|
173
|
+
}, z.core.$strict>;
|
|
174
|
+
taskId: z.ZodString;
|
|
175
|
+
}, z.core.$strict>>>;
|
|
176
|
+
inputRequests: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
177
|
+
replyTo: z.ZodString;
|
|
178
|
+
sequence: z.ZodNumber;
|
|
179
|
+
stepIndex: z.ZodNumber;
|
|
180
|
+
taskId: z.ZodString;
|
|
181
|
+
turnId: z.ZodString;
|
|
182
|
+
request: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
183
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
184
|
+
replyTo: z.ZodString;
|
|
185
|
+
sequence: z.ZodNumber;
|
|
186
|
+
stepIndex: z.ZodNumber;
|
|
187
|
+
taskId: z.ZodString;
|
|
188
|
+
turnId: z.ZodString;
|
|
189
|
+
requests: z.ZodArray<z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>>;
|
|
190
|
+
}, z.core.$loose>]>>>;
|
|
191
|
+
views: z.ZodOptional<z.ZodArray<z.ZodType<TaskView, unknown, z.core.$ZodTypeInternals<TaskView, unknown>>>>;
|
|
192
|
+
}, z.core.$strict>>;
|
|
193
|
+
}, z.core.$loose>;
|
|
194
|
+
payloads: z.ZodArray<z.ZodObject<{
|
|
195
|
+
context: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
196
|
+
inputResponses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
197
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
198
|
+
requestId: z.ZodString;
|
|
199
|
+
text: z.ZodOptional<z.ZodString>;
|
|
200
|
+
}, z.core.$strict>>>;
|
|
201
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
202
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
203
|
+
text: z.ZodString;
|
|
204
|
+
type: z.ZodLiteral<"text">;
|
|
205
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
206
|
+
image: z.ZodCustom<URL | import("ai").DataContent, URL | import("ai").DataContent>;
|
|
207
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
208
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
209
|
+
type: z.ZodLiteral<"image">;
|
|
210
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
211
|
+
data: z.ZodCustom<URL | import("ai").DataContent, URL | import("ai").DataContent>;
|
|
212
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
213
|
+
mediaType: z.ZodString;
|
|
214
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
215
|
+
type: z.ZodLiteral<"file">;
|
|
216
|
+
}, z.core.$strict>], "type">>]>>;
|
|
217
|
+
outputSchema: z.ZodOptional<z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>;
|
|
218
|
+
task: z.ZodOptional<z.ZodObject<{
|
|
219
|
+
agentRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
220
|
+
replyTo: z.ZodString;
|
|
221
|
+
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
222
|
+
input: z.ZodObject<{
|
|
223
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
224
|
+
message: z.ZodString;
|
|
225
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>>>;
|
|
226
|
+
target: z.ZodString;
|
|
227
|
+
}, z.core.$strict>;
|
|
228
|
+
invocationId: z.ZodString;
|
|
229
|
+
kind: z.ZodLiteral<"agent-invoke">;
|
|
230
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
231
|
+
kind: z.ZodLiteral<"agent-settled">;
|
|
232
|
+
result: z.ZodObject<{
|
|
233
|
+
backgroundTask: z.ZodOptional<z.ZodObject<{
|
|
234
|
+
status: z.ZodLiteral<"working">;
|
|
235
|
+
taskId: z.ZodString;
|
|
236
|
+
}, z.core.$strict>>;
|
|
237
|
+
callId: z.ZodString;
|
|
238
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
239
|
+
kind: z.ZodLiteral<"subagent-result">;
|
|
240
|
+
origin: z.ZodLiteral<"child">;
|
|
241
|
+
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
242
|
+
kind: z.ZodLiteral<"parked">;
|
|
243
|
+
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
244
|
+
kind: z.ZodLiteral<"succeeded">;
|
|
245
|
+
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
246
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
247
|
+
error: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
248
|
+
kind: z.ZodLiteral<"failed">;
|
|
249
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
250
|
+
kind: z.ZodLiteral<"cancelled">;
|
|
251
|
+
}, z.core.$strict>], "kind">;
|
|
252
|
+
usageDelta: z.ZodObject<{
|
|
253
|
+
cacheReadTokens: z.ZodNumber;
|
|
254
|
+
cacheWriteTokens: z.ZodNumber;
|
|
255
|
+
inputTokens: z.ZodNumber;
|
|
256
|
+
outputTokens: z.ZodNumber;
|
|
257
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
260
|
+
kind: z.ZodLiteral<"terminal">;
|
|
261
|
+
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
262
|
+
kind: z.ZodLiteral<"succeeded">;
|
|
263
|
+
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
264
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
265
|
+
error: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
266
|
+
kind: z.ZodLiteral<"failed">;
|
|
267
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
268
|
+
kind: z.ZodLiteral<"cancelled">;
|
|
269
|
+
}, z.core.$strict>], "kind">;
|
|
270
|
+
usageDelta: z.ZodObject<{
|
|
271
|
+
cacheReadTokens: z.ZodNumber;
|
|
272
|
+
cacheWriteTokens: z.ZodNumber;
|
|
273
|
+
inputTokens: z.ZodNumber;
|
|
274
|
+
outputTokens: z.ZodNumber;
|
|
275
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
276
|
+
}, z.core.$strip>;
|
|
277
|
+
}, z.core.$strict>], "kind">;
|
|
278
|
+
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
279
|
+
subagentName: z.ZodString;
|
|
280
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
281
|
+
cacheReadTokens: z.ZodNumber;
|
|
282
|
+
cacheWriteTokens: z.ZodNumber;
|
|
283
|
+
inputTokens: z.ZodNumber;
|
|
284
|
+
outputTokens: z.ZodNumber;
|
|
285
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
286
|
+
}, z.core.$strip>>;
|
|
287
|
+
}, z.core.$strict>;
|
|
288
|
+
}, z.core.$strict>], "kind">;
|
|
289
|
+
taskId: z.ZodString;
|
|
290
|
+
}, z.core.$strict>>>;
|
|
291
|
+
authorizationEvents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
292
|
+
hookPayload: z.ZodObject<{
|
|
293
|
+
callId: z.ZodString;
|
|
294
|
+
childSessionId: z.ZodString;
|
|
295
|
+
event: z.ZodCustom<Record<string, unknown>, Record<string, unknown>>;
|
|
296
|
+
kind: z.ZodLiteral<"subagent-authorization-event">;
|
|
297
|
+
subagentName: z.ZodString;
|
|
298
|
+
}, z.core.$strict>;
|
|
299
|
+
taskId: z.ZodString;
|
|
300
|
+
}, z.core.$strict>>>;
|
|
301
|
+
inputRequests: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
302
|
+
replyTo: z.ZodString;
|
|
303
|
+
sequence: z.ZodNumber;
|
|
304
|
+
stepIndex: z.ZodNumber;
|
|
305
|
+
taskId: z.ZodString;
|
|
306
|
+
turnId: z.ZodString;
|
|
307
|
+
request: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
308
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
309
|
+
replyTo: z.ZodString;
|
|
310
|
+
sequence: z.ZodNumber;
|
|
311
|
+
stepIndex: z.ZodNumber;
|
|
312
|
+
taskId: z.ZodString;
|
|
313
|
+
turnId: z.ZodString;
|
|
314
|
+
requests: z.ZodArray<z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>>;
|
|
315
|
+
}, z.core.$loose>]>>>;
|
|
316
|
+
views: z.ZodOptional<z.ZodArray<z.ZodType<TaskView, unknown, z.core.$ZodTypeInternals<TaskView, unknown>>>>;
|
|
317
|
+
}, z.core.$strict>>;
|
|
318
|
+
}, z.core.$loose>>;
|
|
319
|
+
version: z.ZodLiteral<5>;
|
|
320
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
321
|
+
kind: z.ZodLiteral<"session-timeout">;
|
|
322
|
+
version: z.ZodLiteral<5>;
|
|
323
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
324
|
+
kind: z.ZodLiteral<"clear">;
|
|
325
|
+
version: z.ZodLiteral<5>;
|
|
326
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
327
|
+
kind: z.ZodLiteral<"compact">;
|
|
328
|
+
version: z.ZodLiteral<5>;
|
|
329
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
330
|
+
kind: z.ZodLiteral<"reset">;
|
|
331
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
332
|
+
version: z.ZodLiteral<5>;
|
|
333
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
334
|
+
kind: z.ZodLiteral<"cancel">;
|
|
335
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
336
|
+
turnId: z.ZodOptional<z.ZodString>;
|
|
337
|
+
version: z.ZodLiteral<5>;
|
|
338
|
+
}, z.core.$strict>], "kind">;
|
|
339
|
+
export type SessionInboxWireV5 = z.infer<typeof sessionInboxWireV5Schema>;
|
|
340
|
+
/** Builds and validates one complete version-5 wire value. */
|
|
341
|
+
export declare function encodeSessionCommandV5(command: DeliverHookPayload | SessionCommand | SessionTimeoutHookPayload): SessionInboxWireV5;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{formatValidationError}from"#runtime/validation.js";import{jsonValueSchema}from"#shared/json-schemas.js";import{coalesceDeliverPayloads}from"#execution/deliver-payloads.js";import{SessionInboxWireError}from"#execution/wire/session-inbox-contract.js";import{sessionInboxWireV3Schema}from"#execution/wire/session-inbox-wire.v3.js";import{tokenUsageWithCostSchema}from"#shared/token-usage.js";const taskMetadataSchema=z.object({agentId:z.string().optional(),kind:z.string(),mode:z.enum([`local`,`remote`]).optional(),name:z.string()}).strict(),taskViewBase={executor:z.object({binding:z.object({data:z.record(z.string(),jsonValueSchema),kind:z.string()}).strict().optional()}).strict().optional(),metadata:taskMetadataSchema,taskId:z.string(),usage:tokenUsageWithCostSchema.optional()},taskViewSchema=z.discriminatedUnion(`status`,[z.object({...taskViewBase,status:z.literal(`working`)}).strict(),z.object({...taskViewBase,inputRequests:z.array(jsonValueSchema),status:z.literal(`input_required`)}).strict(),z.object({...taskViewBase,lastOutput:z.object({data:jsonValueSchema,type:z.literal(`result`)}).strict(),status:z.literal(`completed`)}).strict(),z.object({...taskViewBase,lastOutput:z.object({data:jsonValueSchema,type:z.literal(`error`)}).strict(),status:z.literal(`failed`)}).strict(),z.object({...taskViewBase,status:z.literal(`cancelled`)}).strict()]),eventCoordinateSchema=z.number().int().nonnegative(),taskInputRequestBase={replyTo:z.string(),sequence:eventCoordinateSchema,stepIndex:eventCoordinateSchema,taskId:z.string(),turnId:z.string()},taskInputRequestSchema=z.union([z.object({...taskInputRequestBase,request:jsonValueSchema}).loose(),z.object({...taskInputRequestBase,requests:z.array(jsonValueSchema)}).loose()]),agentInvocationInputSchema=z.object({agentId:z.string().optional(),message:z.string(),outputSchema:z.record(z.string(),jsonValueSchema).optional(),target:z.string()}).strict(),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:tokenUsageWithCostSchema}),z.strictObject({kind:z.literal(`terminal`),result:agentTurnResultSchema,usageDelta:tokenUsageWithCostSchema})]),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:tokenUsageWithCostSchema.optional()}).strict(),taskAgentRequestSchema=z.object({replyTo:z.string(),request:z.discriminatedUnion(`kind`,[z.object({input:agentInvocationInputSchema,invocationId:z.string(),kind:z.literal(`agent-invoke`)}).strict(),z.object({kind:z.literal(`agent-settled`),result:runtimeSubagentChildResultSchema}).strict()]),taskId:z.string()}).strict(),subagentAuthorizationEventHookPayloadSchema=z.object({callId:z.string(),childSessionId:z.string(),event:z.custom(e=>typeof e==`object`&&!!e&&!Array.isArray(e),`Expected an object.`),kind:z.literal(`subagent-authorization-event`),subagentName:z.string()}).strict(),taskAuthorizationEventSchema=z.object({hookPayload:subagentAuthorizationEventHookPayloadSchema,taskId:z.string()}).strict(),taskPayloadV5Schema=z.object({agentRequests:z.array(taskAgentRequestSchema).optional(),authorizationEvents:z.array(taskAuthorizationEventSchema).optional(),inputRequests:z.array(taskInputRequestSchema).optional(),views:z.array(taskViewSchema).optional()}).strict(),v3=sessionInboxWireV3Schema.options,v3Deliver=v3[0],deliverPayloadV5Schema=v3Deliver.shape.payload.extend({task:taskPayloadV5Schema.optional()}),version=z.literal(5),sessionInboxWireV5Schema=z.discriminatedUnion(`kind`,[v3Deliver.extend({payload:deliverPayloadV5Schema,payloads:z.array(deliverPayloadV5Schema),version}),v3[1].extend({version}),v3[2].extend({version}),v3[3].extend({version}),v3[4].extend({version}),v3[5].extend({version})]);function encodeSessionCommandV5(e){let t=e.kind===`send`?{auth:e.auth,caller:e.caller,deliveryMetadata:e.delivery===void 0?void 0:[{...e.delivery,payloadIndex:0}],kind:`deliver`,payload:e.payload,payloads:[e.payload],requestId:e.requestId,taskDeliveryId:e.taskDeliveryId,turnPolicy:e.turnPolicy,version:5}:e.kind===`deliver`?{...e,payload:coalesceDeliverPayloads(e.payloads),version:5}:{...e,version:5},n=sessionInboxWireV5Schema.safeParse(t);if(!n.success)throw new SessionInboxWireError(`Produced a session inbox payload that does not match wire version 5: ${formatValidationError(n.error)}`);return n.data}export{encodeSessionCommandV5,sessionInboxWireV5Schema};
|