eve 0.68.0 → 0.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +96 -0
- package/bin/eve.js +15 -0
- package/dist/src/_virtual/_rolldown/runtime.js +1 -1
- package/dist/src/approval/definition.d.ts +19 -5
- package/dist/src/channel/adapter.d.ts +2 -0
- package/dist/src/channel/auth/oidc.js +1 -1
- package/dist/src/channel/channel-address.d.ts +1 -4
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/channel-operations.d.ts +4 -11
- package/dist/src/channel/channel-operations.js +1 -1
- package/dist/src/channel/compiled-channel.d.ts +0 -2
- package/dist/src/channel/compiled-channel.js +2 -2
- package/dist/src/channel/cross-channel-receive.d.ts +1 -3
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/forwarded-principal.js +1 -1
- package/dist/src/channel/schedule-auth.d.ts +16 -0
- package/dist/src/channel/schedule-auth.js +1 -1
- package/dist/src/channel/session-callback.js +1 -1
- package/dist/src/channel/session.d.ts +3 -8
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/task-card.d.ts +121 -0
- package/dist/src/channel/task-card.js +1 -0
- package/dist/src/channel/types.d.ts +12 -57
- package/dist/src/chunks/{use-eve-agent-DXcE_8Ja.js → use-eve-agent-D_5129A9.js} +295 -205
- package/dist/src/chunks/{use-eve-agent-D4HVZBjn.js → use-eve-agent-Dab2MnT2.js} +295 -205
- package/dist/src/cli/commands/info.d.ts +11 -0
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/commands/init-agent-workspace.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/dev/command-options.d.ts +2 -2
- package/dist/src/cli/dev/command.js +1 -1
- package/dist/src/cli/dev/tui/blocks.d.ts +19 -18
- package/dist/src/cli/dev/tui/blocks.js +3 -3
- package/dist/src/cli/dev/tui/command-typeahead.d.ts +3 -6
- package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +10 -0
- package/dist/src/cli/dev/tui/diagnostic-presentation.js +3 -2
- package/dist/src/cli/dev/tui/prompt-placeholder.d.ts +2 -0
- package/dist/src/cli/dev/tui/prompt-placeholder.js +1 -0
- package/dist/src/cli/dev/tui/rail.d.ts +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +25 -2
- package/dist/src/cli/dev/tui/runner.js +3 -3
- package/dist/src/cli/dev/tui/status-line.d.ts +4 -2
- package/dist/src/cli/dev/tui/status-line.js +1 -1
- package/dist/src/cli/dev/tui/subagent-pump.d.ts +44 -52
- package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
- package/dist/src/cli/dev/tui/task-activity.d.ts +55 -0
- package/dist/src/cli/dev/tui/task-activity.js +1 -0
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +13 -30
- package/dist/src/cli/dev/tui/terminal-renderer.js +11 -11
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/theme.js +1 -1
- package/dist/src/cli/dev/tui/tool-block-groups.d.ts +6 -9
- package/dist/src/cli/dev/tui/tool-block-groups.js +1 -1
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +16 -3
- package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-conversation.js +3 -1
- package/dist/src/cli/dev/tui/traces/trace-view.js +1 -1
- package/dist/src/cli/dev/tui/types.d.ts +11 -5
- package/dist/src/cli/dev/ui-options.d.ts +2 -2
- package/dist/src/cli/option-parsers.d.ts +3 -1
- package/dist/src/cli/option-parsers.js +1 -1
- package/dist/src/cli/ui/terminal-text.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +150 -9
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/agent-session.d.ts +28 -0
- package/dist/src/client/agent-session.js +1 -0
- package/dist/src/client/eve-agent-store-helpers.d.ts +1 -1
- package/dist/src/client/eve-agent-store-helpers.js +2 -2
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/index.d.ts +2 -1
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/message-action-parts.js +1 -1
- package/dist/src/client/message-reducer.js +1 -1
- package/dist/src/client/message-task-parts.d.ts +8 -0
- package/dist/src/client/message-task-parts.js +1 -0
- package/dist/src/client/optimistic-message-submissions.js +1 -1
- package/dist/src/client/session-controls.d.ts +0 -1
- package/dist/src/client/session-utils.d.ts +10 -0
- package/dist/src/client/session-utils.js +1 -1
- package/dist/src/client/session.d.ts +8 -16
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/stream-version.js +1 -1
- package/dist/src/client/types.d.ts +2 -4
- package/dist/src/compiled/.vendor-stamp.json +3 -2
- package/dist/src/compiled/@eve/catalog/index.js +1 -1
- package/dist/src/compiled/@vercel/connect/LICENSE +202 -0
- package/dist/src/compiled/@vercel/connect/authorization-details.d.ts +11 -0
- package/dist/src/compiled/@vercel/connect/authorization.d.ts +47 -0
- package/dist/src/compiled/@vercel/connect/connector.d.ts +32 -0
- package/dist/src/compiled/@vercel/connect/index.d.ts +5 -0
- package/dist/src/compiled/@vercel/connect/index.js +26 -0
- package/dist/src/compiled/@vercel/connect/installation.d.ts +48 -0
- package/dist/src/compiled/@vercel/connect/token.d.ts +137 -0
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiler/bundled-extension.d.ts +7 -1
- package/dist/src/compiler/bundled-extension.js +1 -1
- package/dist/src/compiler/default-tool-policy.d.ts +2 -2
- package/dist/src/compiler/default-tool-policy.js +1 -1
- package/dist/src/compiler/development-extensions.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +54 -18
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/extension-mount-bindings.d.ts +5 -0
- package/dist/src/compiler/extension-mount-bindings.js +1 -0
- package/dist/src/compiler/load-binding-namespace.d.ts +10 -2
- package/dist/src/compiler/load-binding-namespace.js +1 -1
- package/dist/src/compiler/manifest.d.ts +19 -17
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/module-lifecycle.d.ts +2 -2
- package/dist/src/compiler/module-lifecycle.js +1 -1
- package/dist/src/compiler/module-map.d.ts +1 -1
- package/dist/src/compiler/module-map.js +3 -3
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +18 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest-types.d.ts +2 -0
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/project-sources.d.ts +4 -0
- package/dist/src/compiler/project-sources.js +1 -1
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +5 -0
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/computer-use/extension/lib/computer-use-sandbox.d.ts +8 -0
- package/dist/src/computer-use/extension/lib/computer-use-sandbox.js +3 -3
- package/dist/src/computer-use/extension/lib/computer-use.d.ts +2 -0
- package/dist/src/computer-use/extension/lib/computer-use.js +2 -1
- package/dist/src/computer-use/extension/tools/computer_use.js +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.d.ts +5 -0
- 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 -1
- package/dist/src/context/key-names.d.ts +0 -1
- package/dist/src/context/key-names.js +1 -1
- package/dist/src/context/keys.d.ts +8 -14
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/memory-lifecycle.js +1 -1
- package/dist/src/context/memory-tools.d.ts +0 -1
- package/dist/src/context/provider.d.ts +1 -3
- package/dist/src/context/run-step.d.ts +2 -3
- package/dist/src/context/run-step.js +1 -1
- package/dist/src/context/serialize.js +1 -1
- package/dist/src/discover/bundled-extension.js +1 -1
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/extensions.d.ts +0 -7
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/manifest.d.ts +4 -0
- package/dist/src/evals/assertions/run.d.ts +4 -3
- package/dist/src/evals/assertions/run.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/match.d.ts +4 -4
- package/dist/src/evals/mock-model.js +1 -1
- package/dist/src/evals/runner/derive-run-facts.d.ts +3 -3
- package/dist/src/evals/runner/derive-run-facts.js +1 -1
- package/dist/src/evals/runner/reporters/assertion-scores.d.ts +19 -0
- package/dist/src/evals/runner/reporters/assertion-scores.js +1 -0
- package/dist/src/evals/runner/reporters/braintrust.js +1 -1
- package/dist/src/evals/runner/reporters/datadog-client.d.ts +123 -0
- package/dist/src/evals/runner/reporters/datadog-client.js +4 -0
- package/dist/src/evals/runner/reporters/datadog.d.ts +9 -98
- package/dist/src/evals/runner/reporters/datadog.js +2 -3
- package/dist/src/evals/session-content.js +1 -1
- package/dist/src/evals/session.d.ts +4 -4
- package/dist/src/evals/session.js +2 -2
- package/dist/src/evals/types.d.ts +18 -15
- package/dist/src/eve-channel/create-request.d.ts +5 -4
- package/dist/src/eve-channel/create-request.js +1 -1
- package/dist/src/eve-channel/index.d.ts +0 -9
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.d.ts +3 -7
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/eve-channel/support.d.ts +15 -5
- package/dist/src/eve-channel/support.js +1 -1
- package/dist/src/eve-channel/turn-policy-request.d.ts +2 -0
- package/dist/src/eve-channel/turn-policy-request.js +1 -0
- package/dist/src/eve-channel/types.d.ts +4 -0
- package/dist/src/execution/agent-sessions/context.d.ts +60 -0
- package/dist/src/execution/agent-sessions/context.js +1 -0
- package/dist/src/{subagents/remote-dispatch.d.ts → execution/agent-sessions/remote.d.ts} +17 -40
- package/dist/src/execution/agent-sessions/remote.js +1 -0
- package/dist/src/execution/agent-sessions/requests.d.ts +20 -0
- package/dist/src/execution/agent-sessions/requests.js +1 -0
- package/dist/src/execution/agent-sessions/session.d.ts +12 -0
- package/dist/src/execution/agent-sessions/session.js +1 -0
- package/dist/src/execution/agent-sessions/steps.d.ts +59 -0
- package/dist/src/execution/agent-sessions/steps.js +1 -0
- package/dist/src/execution/agent-sessions/target.d.ts +45 -0
- package/dist/src/execution/agent-sessions/target.js +1 -0
- package/dist/src/execution/agent-sessions/usage.d.ts +18 -0
- package/dist/src/execution/agent-sessions/usage.js +1 -0
- package/dist/src/execution/authorization-callback-match.d.ts +2 -4
- package/dist/src/execution/authorization-callback-match.js +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.d.ts +1 -5
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.js +1 -1
- package/dist/src/execution/connection-announcement.d.ts +7 -0
- package/dist/src/execution/connection-announcement.js +4 -0
- package/dist/src/execution/continuation-conflict-step.d.ts +2 -3
- package/dist/src/execution/continuation-conflict-step.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +9 -27
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/coordination-dispatch-step.d.ts +3 -2
- package/dist/src/execution/coordination-dispatch-step.js +1 -1
- package/dist/src/execution/create-session-step.d.ts +0 -1
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/deliver-payloads.js +1 -1
- package/dist/src/execution/durable-session-store.d.ts +0 -1
- package/dist/src/execution/dynamic-connections.js +1 -1
- package/dist/src/execution/dynamic-workflow/program-step.js +1 -1
- package/dist/src/execution/dynamic-workflow/schema.d.ts +1 -3
- package/dist/src/execution/dynamic-workflow/schema.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.d.ts +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/dynamic-workflow/workflow.js +1 -1
- package/dist/src/execution/forward-session-input.d.ts +4 -0
- package/dist/src/execution/forward-session-input.js +1 -0
- package/dist/src/execution/legacy-remote-agent/protocol.d.ts +41 -0
- package/dist/src/execution/legacy-remote-agent/protocol.js +1 -0
- package/dist/src/execution/legacy-session/authorization.js +1 -1
- package/dist/src/execution/legacy-session/completion-step.js +1 -1
- package/dist/src/execution/legacy-session/inbox.js +1 -1
- package/dist/src/execution/legacy-session/input.js +1 -1
- package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
- package/dist/src/execution/model-call-batching.js +1 -1
- package/dist/src/execution/node-step.d.ts +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.d.ts +9 -6
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/publish-session-events.d.ts +130 -0
- package/dist/src/execution/publish-session-events.js +1 -0
- package/dist/src/execution/route-child-delivery.d.ts +5 -4
- package/dist/src/execution/route-child-delivery.js +1 -3
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/session/admission.d.ts +1 -12
- package/dist/src/execution/session/admission.js +1 -1
- package/dist/src/execution/session/entry-input.d.ts +0 -2
- package/dist/src/execution/session/entry.js +1 -1
- package/dist/src/execution/session/finalization.js +1 -1
- package/dist/src/execution/session/handoff-steps.d.ts +13 -2
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +17 -3
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +27 -28
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.d.ts +5 -0
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/pending-turn-state.d.ts +2 -0
- package/dist/src/execution/session/pending-turn-state.js +1 -1
- package/dist/src/execution/session/principal.d.ts +14 -0
- package/dist/src/execution/session/principal.js +1 -0
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/route-selected-delivery.js +1 -1
- package/dist/src/execution/session/state-cursor.d.ts +17 -15
- package/dist/src/execution/session/state-cursor.js +1 -1
- package/dist/src/execution/session/state-delta.d.ts +33 -0
- package/dist/src/execution/session/state-delta.js +1 -0
- package/dist/src/execution/session/timeout-steps.js +1 -1
- package/dist/src/execution/session/turn-event-handler.d.ts +2 -2
- package/dist/src/execution/session/turn-event-handler.js +1 -1
- package/dist/src/execution/session/turn-step-result.d.ts +1 -3
- package/dist/src/execution/session/turn-step-result.js +1 -1
- package/dist/src/execution/session/turn-step-types.d.ts +24 -15
- package/dist/src/execution/session/turn-step.d.ts +2 -2
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn-waiting-step.d.ts +4 -0
- package/dist/src/execution/session/turn-waiting-step.js +1 -0
- package/dist/src/execution/session/turn.d.ts +33 -2
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session-callback-request.js +1 -1
- package/dist/src/execution/session-event-stream.d.ts +33 -0
- package/dist/src/execution/session-event-stream.js +1 -0
- package/dist/src/execution/session-inbox/inbox.d.ts +2 -0
- package/dist/src/execution/session-inbox/inbox.js +1 -1
- package/dist/src/execution/session-inbox/protocol.js +1 -1
- package/dist/src/execution/session-inbox/release-step.js +1 -1
- package/dist/src/execution/session-inbox/resume.js +1 -1
- package/dist/src/execution/session-workflow-tool-run.d.ts +11 -2
- package/dist/src/execution/session-workflow-tool-run.js +1 -1
- package/dist/src/execution/session.d.ts +0 -1
- package/dist/src/execution/session.js +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.d.ts +21 -9
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +0 -1
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/tasks/calls.d.ts +42 -0
- package/dist/src/execution/tasks/calls.js +1 -0
- package/dist/src/execution/tasks/model-step.d.ts +58 -0
- package/dist/src/execution/tasks/model-step.js +1 -0
- package/dist/src/execution/tasks/render.d.ts +66 -0
- package/dist/src/execution/tasks/render.js +8 -0
- package/dist/src/execution/tasks/session.d.ts +19 -0
- package/dist/src/execution/tasks/session.js +1 -0
- package/dist/src/execution/tasks/start.d.ts +34 -0
- package/dist/src/execution/tasks/start.js +1 -0
- package/dist/src/execution/tasks/steps.d.ts +31 -0
- package/dist/src/execution/tasks/steps.js +1 -0
- package/dist/src/execution/tasks/table.d.ts +192 -0
- package/dist/src/execution/tasks/table.js +1 -0
- package/dist/src/execution/tasks/task-id-input.d.ts +19 -0
- package/dist/src/execution/tasks/task-id-input.js +1 -0
- package/dist/src/execution/tasks/tool-entry-point.d.ts +11 -0
- package/dist/src/execution/tasks/tool-entry-point.js +1 -0
- package/dist/src/execution/tasks/workflow-target.d.ts +2 -0
- package/dist/src/execution/tasks/workflow-target.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.js +1 -1
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/terminate-child-sessions-step.d.ts +2 -9
- package/dist/src/execution/terminate-child-sessions-step.js +1 -1
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.d.ts +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/agent-router.d.ts +1 -1
- package/dist/src/execution/tools/agent-router.js +1 -1
- package/dist/src/execution/tools/connection-approval.d.ts +25 -0
- package/dist/src/execution/tools/connection-approval.js +1 -0
- package/dist/src/execution/tools/connection-search-rank.d.ts +21 -0
- package/dist/src/execution/tools/connection-search-rank.js +1 -0
- package/dist/src/execution/tools/connection-target.d.ts +13 -0
- package/dist/src/execution/tools/connection-target.js +1 -0
- package/dist/src/execution/tools/connection-tools.d.ts +10 -0
- package/dist/src/execution/tools/connection-tools.js +2 -0
- package/dist/src/execution/tools/load-skill.js +1 -1
- package/dist/src/execution/tools/workflow/answer.d.ts +7 -4
- package/dist/src/execution/tools/workflow/answer.js +1 -1
- package/dist/src/execution/tools/workflow/ask.d.ts +73 -10
- package/dist/src/execution/tools/workflow/ask.js +1 -1
- package/dist/src/execution/tools/workflow/body.d.ts +60 -19
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/cancel.d.ts +7 -2
- package/dist/src/execution/tools/workflow/cancel.js +1 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +10 -4
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +1 -1
- package/dist/src/execution/tools/workflow/{background.d.ts → harness-definition.d.ts} +6 -6
- package/dist/src/execution/tools/workflow/harness-definition.js +1 -0
- package/dist/src/execution/tools/workflow/interrupt.d.ts +6 -0
- package/dist/src/execution/tools/workflow/interrupt.js +1 -0
- package/dist/src/execution/tools/workflow/messages.d.ts +135 -10
- package/dist/src/execution/tools/workflow/messages.js +1 -1
- package/dist/src/execution/tools/workflow/owner-inbox.js +1 -1
- package/dist/src/execution/tools/workflow/owner.d.ts +15 -4
- package/dist/src/execution/tools/workflow/owner.js +1 -1
- package/dist/src/execution/tools/workflow/serve.d.ts +3 -0
- package/dist/src/execution/tools/workflow/serve.js +1 -0
- package/dist/src/execution/tools/workflow/start.d.ts +18 -11
- package/dist/src/execution/tools/workflow/start.js +1 -1
- package/dist/src/execution/tools/workflow/step-execution.js +1 -1
- package/dist/src/execution/tools/workflow/step.js +1 -1
- package/dist/src/execution/tools/workflow/types.d.ts +0 -10
- package/dist/src/execution/tools/workflow/withdraw-step.d.ts +31 -0
- package/dist/src/execution/tools/workflow/withdraw-step.js +1 -0
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.d.ts +3 -5
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.js +1 -1
- package/dist/src/execution/tools/workflow/workflow.d.ts +3 -3
- package/dist/src/execution/tools/workflow/workflow.js +1 -1
- package/dist/src/execution/web-fetch/request.js +1 -1
- package/dist/src/execution/workflow-callback-url.d.ts +0 -5
- package/dist/src/execution/workflow-callback-url.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +3 -5
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-webhook-route.js +1 -1
- package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -1
- package/dist/src/extensions/code/extension/lib/github-shell.js +1 -1
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
- package/dist/src/framework/sources/modules/agent.d.ts +1 -0
- package/dist/src/framework/sources/modules/agent.js +1 -1
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/action-presentation.js +1 -1
- package/dist/src/harness/action-result-helpers.d.ts +1 -0
- package/dist/src/harness/action-result-helpers.js +1 -1
- package/dist/src/harness/advertised-tools.d.ts +1 -1
- package/dist/src/harness/advertised-tools.js +1 -1
- package/dist/src/harness/announcements.d.ts +22 -0
- package/dist/src/harness/announcements.js +1 -0
- package/dist/src/harness/approval-candidates.d.ts +10 -2
- package/dist/src/harness/approval-candidates.js +1 -1
- package/dist/src/harness/approval-delivery-coordinator.d.ts +4 -5
- package/dist/src/harness/approval-delivery-coordinator.js +1 -1
- package/dist/src/harness/approval-recheck.d.ts +7 -0
- package/dist/src/harness/approval-recheck.js +1 -0
- package/dist/src/harness/authorization-event-fields.d.ts +13 -0
- package/dist/src/harness/authorization-event-fields.js +1 -0
- package/dist/src/harness/authorization.d.ts +2 -1
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/coordination.d.ts +31 -27
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/current-messages.d.ts +6 -1
- package/dist/src/harness/current-messages.js +1 -1
- package/dist/src/harness/emission.d.ts +7 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +4 -15
- package/dist/src/harness/hitl/session-limit-input-requests.d.ts +2 -0
- package/dist/src/harness/hitl/session-limit-input-requests.js +1 -1
- package/dist/src/harness/input-request-resolution.d.ts +5 -2
- package/dist/src/harness/input-request-resolution.js +1 -1
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/messages.d.ts +11 -3
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/nested-actions.d.ts +23 -0
- package/dist/src/harness/nested-actions.js +1 -0
- package/dist/src/harness/pending-input-batches.d.ts +8 -6
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/provider-tool-history.d.ts +7 -2
- package/dist/src/harness/provider-tool-history.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +41 -36
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/stale-input-responses.js +1 -1
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-model-output.js +1 -1
- package/dist/src/harness/tool-presentation.js +1 -1
- package/dist/src/harness/tools.d.ts +1 -5
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/turn-tag-state.d.ts +6 -5
- package/dist/src/harness/types.d.ts +7 -15
- package/dist/src/harness/workflow-dispatch.d.ts +30 -0
- package/dist/src/harness/workflow-dispatch.js +1 -0
- package/dist/src/harness/workflow-tool-runs.d.ts +5 -65
- package/dist/src/harness/workflow-tool-runs.js +1 -1
- package/dist/src/instrumentation/lifecycle.d.ts +3 -0
- package/dist/src/instrumentation/native-events.d.ts +0 -7
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +1 -4
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/state.d.ts +0 -6
- package/dist/src/instrumentation/state.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +10 -0
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +12 -6
- package/dist/src/internal/authored-module-loader.js +2 -2
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/authored-package-boundary.d.ts +3 -0
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/bundler/extension-mount-plugin.d.ts +14 -0
- package/dist/src/internal/bundler/extension-mount-plugin.js +1 -0
- package/dist/src/internal/bundler/extension-scope-plugin.d.ts +8 -11
- package/dist/src/internal/bundler/extension-scope-plugin.js +2 -3
- package/dist/src/internal/invocation/workflow-execution.d.ts +2 -2
- package/dist/src/internal/invocation/workflow-execution.js +1 -1
- package/dist/src/internal/mount-state.d.ts +1 -0
- package/dist/src/internal/mount-state.js +1 -0
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
- package/dist/src/internal/node-esm-compat-banner.js +1 -1
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +4 -3
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -1
- package/dist/src/internal/workflow-bundle/builder.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/models/auto.d.ts +6 -0
- package/dist/src/models/auto.js +2 -2
- package/dist/src/protocol/message-version.d.ts +1 -0
- package/dist/src/protocol/message-version.js +1 -1
- package/dist/src/protocol/message.d.ts +126 -67
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/protocol/remote-agent-protocol.d.ts +16 -0
- package/dist/src/protocol/remote-agent-protocol.js +1 -0
- package/dist/src/protocol/routes.d.ts +0 -6
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/protocol/task-tools.d.ts +21 -0
- package/dist/src/protocol/task-tools.js +1 -0
- package/dist/src/public/channels/auth.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +25 -16
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
- package/dist/src/public/channels/chat-sdk/index.d.ts +1 -1
- package/dist/src/public/channels/chat-sdk/input-actions.d.ts +8 -0
- package/dist/src/public/channels/chat-sdk/input-actions.js +1 -0
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/linq/linqChannel.js +1 -1
- package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
- package/dist/src/public/channels/slack/action-status.d.ts +11 -12
- package/dist/src/public/channels/slack/action-status.js +1 -1
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/auth.d.ts +3 -0
- package/dist/src/public/channels/slack/auth.js +1 -1
- package/dist/src/public/channels/slack/connections.d.ts +6 -6
- package/dist/src/public/channels/slack/connections.js +1 -1
- package/dist/src/public/channels/slack/defaults.d.ts +13 -19
- package/dist/src/public/channels/slack/defaults.js +4 -4
- package/dist/src/public/channels/slack/hitl.d.ts +22 -13
- package/dist/src/public/channels/slack/hitl.js +2 -2
- package/dist/src/public/channels/slack/index.d.ts +4 -3
- package/dist/src/public/channels/slack/index.js +1 -1
- package/dist/src/public/channels/slack/input-response.d.ts +1 -5
- package/dist/src/public/channels/slack/input-response.js +1 -1
- package/dist/src/public/channels/slack/interaction-cards.js +1 -1
- package/dist/src/public/channels/slack/interactions.js +1 -1
- package/dist/src/public/channels/slack/renderers.d.ts +76 -0
- package/dist/src/public/channels/slack/renderers.js +1 -0
- package/dist/src/public/channels/slack/session-operations.d.ts +6 -0
- package/dist/src/public/channels/slack/session-operations.js +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +47 -103
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/slack/task-card.d.ts +24 -0
- package/dist/src/public/channels/slack/task-card.js +1 -0
- package/dist/src/public/channels/telegram/hitl.d.ts +7 -1
- package/dist/src/public/channels/telegram/hitl.js +2 -1
- package/dist/src/public/channels/telegram/state.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +5 -0
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +6 -1
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +4 -6
- package/dist/src/public/definitions/connections/openapi.d.ts +7 -8
- package/dist/src/public/definitions/extension.d.ts +2 -2
- package/dist/src/public/definitions/extension.js +1 -1
- package/dist/src/public/definitions/hook.d.ts +4 -4
- package/dist/src/public/definitions/state.d.ts +4 -2
- package/dist/src/public/definitions/state.js +1 -1
- package/dist/src/public/memory/index.d.ts +0 -1
- package/dist/src/public/models/openai/index.d.ts +1 -1
- package/dist/src/public/models/openai/index.js +1 -1
- package/dist/src/public/schedules/index.d.ts +1 -0
- package/dist/src/public/schedules/index.js +1 -1
- package/dist/src/public/server/index.d.ts +28 -0
- package/dist/src/public/server/index.js +1 -0
- package/dist/src/public/tools/index.d.ts +3 -2
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/public/tools/no-reply.d.ts +1 -0
- package/dist/src/public/tools/no-reply.js +1 -0
- package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +6 -7
- package/dist/src/runtime/agent/bootstrap-model-utils.js +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +0 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.d.ts +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
- package/dist/src/runtime/channels/registry.js +1 -1
- package/dist/src/runtime/connections/mcp-client.d.ts +1 -9
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +1 -1
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/connections/tool-result.d.ts +27 -0
- package/dist/src/runtime/connections/tool-result.js +2 -0
- package/dist/src/runtime/connections/tool-signature.d.ts +14 -0
- package/dist/src/runtime/connections/tool-signature.js +1 -0
- package/dist/src/runtime/local-dev-capability.js +1 -1
- package/dist/src/runtime/prompt/compose.d.ts +1 -3
- package/dist/src/runtime/prompt/compose.js +3 -3
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
- package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
- package/dist/src/runtime/sessions/turn.d.ts +1 -16
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/subagents/workflow-reference.d.ts +6 -3
- package/dist/src/runtime/subagents/workflow-reference.js +1 -1
- package/dist/src/runtime/subagents/workflow.d.ts +12 -6
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/self-modification/extension/classify-registry-item.d.ts +3 -0
- package/dist/src/self-modification/extension/classify-registry-item.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/instructions.js +7 -7
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.d.ts +2 -0
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.js +1 -1
- package/dist/src/self-modification/scaffold.d.ts +2 -0
- package/dist/src/self-modification/scaffold.js +7 -0
- package/dist/src/self-modification/setup.js +1 -7
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/integrations/shopify/templates.d.ts +1 -1
- package/dist/src/setup/integrations/shopify/templates.js +31 -19
- package/dist/src/setup/scaffold/create/agent-paths.d.ts +5 -0
- package/dist/src/setup/scaffold/create/agent-paths.js +1 -0
- package/dist/src/setup/scaffold/create/instructions-template.d.ts +1 -0
- package/dist/src/setup/scaffold/create/instructions-template.js +8 -0
- package/dist/src/setup/scaffold/create/project.js +3 -10
- package/dist/src/shared/action-request-name.d.ts +3 -0
- package/dist/src/shared/action-request-name.js +1 -0
- package/dist/src/shared/action-types.d.ts +49 -21
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +0 -7
- package/dist/src/shared/chatgpt-model.d.ts +1 -1
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/connection-types.d.ts +2 -8
- package/dist/src/shared/default-agent-model.d.ts +10 -1
- package/dist/src/shared/default-agent-model.js +1 -1
- package/dist/src/shared/extension-mount.d.ts +2 -0
- package/dist/src/shared/extension-mount.js +1 -0
- package/dist/src/shared/format-duration.d.ts +2 -0
- package/dist/src/shared/format-duration.js +1 -0
- package/dist/src/shared/input.d.ts +1 -0
- package/dist/src/shared/memory-state.d.ts +1 -0
- package/dist/src/shared/memory-state.js +1 -1
- package/dist/src/shared/model-helper.d.ts +2 -2
- package/dist/src/shared/model-helper.js +1 -1
- package/dist/src/shared/model-summary.d.ts +2 -6
- package/dist/src/shared/model-summary.js +1 -1
- package/dist/src/shared/presentation-text.d.ts +5 -0
- package/dist/src/shared/presentation-text.js +1 -1
- package/dist/src/shared/serialized-observability-state.d.ts +0 -4
- package/dist/src/shared/serialized-observability-state.js +1 -1
- package/dist/src/shared/value-delta.d.ts +39 -0
- package/dist/src/shared/value-delta.js +1 -0
- package/dist/src/subagents/adapter-state.d.ts +0 -2
- package/dist/src/subagents/adapter-state.js +1 -1
- package/dist/src/subagents/adapter.js +1 -1
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/event-proxy-step.d.ts +16 -29
- package/dist/src/subagents/event-proxy-step.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +35 -17
- package/dist/src/subagents/hitl-proxy.js +1 -1
- package/dist/src/subagents/invocation.d.ts +1 -2
- package/dist/src/subagents/parent-notification.d.ts +2 -1
- package/dist/src/subagents/parent-notification.js +1 -1
- package/dist/src/subagents/token-budget.d.ts +8 -9
- package/dist/src/subagents/token-budget.js +1 -1
- package/dist/src/subagents/tool.d.ts +6 -12
- package/dist/src/subagents/tool.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/behavior.d.ts +5 -5
- package/dist/src/tools/definition.d.ts +50 -14
- package/dist/src/tools/definition.js +1 -1
- package/dist/src/tools/durable-callbacks.d.ts +1 -1
- package/dist/src/tools/dynamic.d.ts +6 -0
- package/dist/src/tools/framework/agent-contract.d.ts +2 -5
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/tools/framework/agent.d.ts +2 -5
- package/dist/src/tools/framework/agent.js +1 -1
- package/dist/src/tools/framework/connection-tools.d.ts +3 -0
- package/dist/src/tools/framework/connection-tools.js +1 -0
- package/dist/src/tools/provided/agent-router.d.ts +6 -3
- package/dist/src/tools/provided/agent-router.js +1 -1
- package/dist/src/{execution/tools → tools/provided}/ask-question-workflow.d.ts +3 -4
- package/dist/src/tools/provided/ask-question-workflow.js +1 -0
- package/dist/src/tools/provided/ask-question.d.ts +20 -5
- package/dist/src/tools/provided/ask-question.js +2 -1
- package/dist/src/tools/provided/interrupted.d.ts +18 -0
- package/dist/src/tools/provided/interrupted.js +1 -0
- package/dist/src/tools/provided/no-reply.d.ts +19 -0
- package/dist/src/tools/provided/no-reply.js +1 -0
- package/dist/src/tools/provided/sleep-workflow.d.ts +4 -0
- package/dist/src/tools/provided/sleep-workflow.js +1 -0
- package/dist/src/tools/provided/sleep.d.ts +11 -5
- package/dist/src/tools/provided/sleep.js +1 -1
- package/dist/src/tools/provided/task-cancel.d.ts +6 -0
- package/dist/src/tools/provided/task-cancel.js +1 -0
- package/dist/src/tools/provided/task-wait.d.ts +9 -0
- package/dist/src/tools/provided/task-wait.js +1 -0
- package/dist/src/tools/provided/workflow.d.ts +2 -2
- package/dist/src/tools/provided/workflow.js +1 -1
- package/dist/src/tools/schema-emission.d.ts +23 -0
- package/dist/src/tools/schema-emission.js +1 -0
- package/dist/src/tools/schema.d.ts +22 -8
- package/dist/src/tools/schema.js +1 -1
- package/dist/src/tools/workflow-definition.d.ts +187 -85
- package/dist/src/tools/workflow-definition.js +1 -1
- package/dist/src/tools/workflow-entry-point.d.ts +3 -0
- package/dist/src/tools/workflow-entry-point.js +1 -0
- package/dist/src/tracing/agent-action-instrumentation.d.ts +1 -3
- package/dist/src/tracing/agent-action-instrumentation.js +1 -1
- package/dist/src/tracing/agent-invocation-coordinator.d.ts +9 -18
- package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
- package/dist/src/tracing/agent-otel-content.d.ts +0 -2
- package/dist/src/tracing/agent-otel-content.js +3 -3
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-runtime-context.d.ts +20 -0
- package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
- package/dist/src/tracing/agent-otel-usage.js +1 -1
- package/dist/src/tracing/agent-span-contract.d.ts +1 -1
- package/dist/src/tracing/agent-span-contract.js +1 -1
- package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
- package/dist/src/tracing/agent-span-id-generator.js +1 -1
- package/dist/src/tracing/agent-trace-context-codec.d.ts +1 -2
- package/dist/src/tracing/agent-trace-context-codec.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.d.ts +2 -27
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +1 -19
- package/dist/src/tracing/content-attributes.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +36 -13
- package/docs/channels/chat-sdk.mdx +15 -4
- package/docs/channels/custom.mdx +89 -17
- package/docs/channels/eve.mdx +1 -1
- package/docs/channels/mcp.mdx +1 -1
- package/docs/channels/overview.mdx +14 -56
- package/docs/channels/slack.mdx +230 -35
- package/docs/channels/telegram.mdx +2 -0
- package/docs/concepts/built-in-tools.md +36 -28
- package/docs/concepts/context-control.md +2 -2
- package/docs/concepts/execution-model-and-durability.mdx +10 -11
- package/docs/concepts/sessions-runs-and-streaming.md +67 -47
- package/docs/connections/mcp.mdx +4 -4
- package/docs/connections/openapi.mdx +2 -2
- package/docs/connections/overview.mdx +2 -2
- package/docs/evals/assertions.mdx +5 -5
- package/docs/evals/cases.mdx +1 -1
- package/docs/evals/reporters.mdx +6 -4
- package/docs/extensions.md +11 -2
- package/docs/guides/client/streaming.mdx +31 -11
- package/docs/guides/dev-tui.md +13 -3
- package/docs/guides/dynamic-capabilities.md +5 -3
- package/docs/guides/evaluate.md +29 -2
- package/docs/guides/frontend/overview.mdx +5 -7
- package/docs/guides/hooks.md +16 -12
- package/docs/guides/instrumentation/instrumentation.mdx +2 -0
- package/docs/guides/remote-agents.md +12 -14
- package/docs/guides/self-modification.md +10 -0
- package/docs/instructions.mdx +1 -1
- package/docs/patterns/multi-tenant-approvals.md +1 -1
- package/docs/protocols/ucp.mdx +20 -16
- package/docs/reference/cli.md +61 -8
- package/docs/reference/typescript-api.md +43 -41
- package/docs/schedules.mdx +14 -34
- package/docs/subagents/index.mdx +24 -56
- package/docs/tools/human-in-the-loop.md +48 -13
- package/docs/tools/meta.json +1 -1
- package/docs/tools/overview.mdx +79 -59
- package/docs/tools/tasks-upgrade.md +201 -0
- package/docs/tools/tasks.md +315 -0
- package/docs/tools/workflows.mdx +368 -154
- package/package.json +18 -12
- package/dist/src/channel/activity-renderer.d.ts +0 -21
- package/dist/src/channel/activity-renderer.js +0 -1
- package/dist/src/channel/activity-sink.d.ts +0 -2
- package/dist/src/channel/activity-sink.js +0 -1
- package/dist/src/eve-channel/activity-observer-request.d.ts +0 -7
- package/dist/src/eve-channel/activity-observer-request.js +0 -1
- package/dist/src/eve-channel/delivery-policy-request.d.ts +0 -4
- package/dist/src/eve-channel/delivery-policy-request.js +0 -1
- package/dist/src/execution/activity-cohort.d.ts +0 -20
- package/dist/src/execution/activity-cohort.js +0 -1
- package/dist/src/execution/activity-collector.d.ts +0 -12
- package/dist/src/execution/activity-collector.js +0 -1
- package/dist/src/execution/activity-events.d.ts +0 -8
- package/dist/src/execution/activity-events.js +0 -1
- package/dist/src/execution/activity-route.d.ts +0 -2
- package/dist/src/execution/activity-route.js +0 -1
- package/dist/src/execution/activity-work-id.d.ts +0 -9
- package/dist/src/execution/activity-work-id.js +0 -1
- package/dist/src/execution/activity-work.d.ts +0 -30
- package/dist/src/execution/activity-work.js +0 -1
- package/dist/src/execution/cancel-indexed-session-tasks-step.d.ts +0 -7
- package/dist/src/execution/cancel-indexed-session-tasks-step.js +0 -1
- package/dist/src/execution/dispatch-action-failures.d.ts +0 -8
- package/dist/src/execution/dispatch-action-failures.js +0 -1
- package/dist/src/execution/dispatch-start-operation.d.ts +0 -15
- package/dist/src/execution/dispatch-start-operation.js +0 -1
- package/dist/src/execution/publish-channel-event.d.ts +0 -23
- package/dist/src/execution/publish-channel-event.js +0 -1
- package/dist/src/execution/scheduled-launch-delivery.d.ts +0 -7
- package/dist/src/execution/scheduled-launch-delivery.js +0 -1
- package/dist/src/execution/session/event-sink.d.ts +0 -26
- package/dist/src/execution/session/event-sink.js +0 -1
- package/dist/src/execution/session-activity-projection.d.ts +0 -16
- package/dist/src/execution/session-activity-projection.js +0 -1
- package/dist/src/execution/session-activity-renderer-step.d.ts +0 -15
- package/dist/src/execution/session-activity-renderer-step.js +0 -1
- package/dist/src/execution/session-activity.d.ts +0 -3
- package/dist/src/execution/session-activity.js +0 -1
- package/dist/src/execution/submit-activity.d.ts +0 -7
- package/dist/src/execution/submit-activity.js +0 -1
- package/dist/src/execution/task-event-callback.d.ts +0 -12
- package/dist/src/execution/task-event-callback.js +0 -1
- package/dist/src/execution/task-input-capability.d.ts +0 -4
- package/dist/src/execution/task-input-capability.js +0 -1
- package/dist/src/execution/task-input-response-route.d.ts +0 -2
- package/dist/src/execution/task-input-response-route.js +0 -1
- package/dist/src/execution/tasks/child/notify.d.ts +0 -44
- package/dist/src/execution/tasks/child/notify.js +0 -1
- package/dist/src/execution/tasks/parent/control-shared.d.ts +0 -23
- package/dist/src/execution/tasks/parent/control-shared.js +0 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +0 -35
- package/dist/src/execution/tasks/parent/delegate.js +0 -1
- package/dist/src/execution/tasks/parent/dispatch.d.ts +0 -22
- package/dist/src/execution/tasks/parent/dispatch.js +0 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +0 -27
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +0 -1
- package/dist/src/execution/tasks/parent/run-parent.d.ts +0 -58
- package/dist/src/execution/tasks/parent/run-parent.js +0 -1
- package/dist/src/execution/tasks/parent/subagent-task-projection.d.ts +0 -26
- package/dist/src/execution/tasks/parent/subagent-task-projection.js +0 -1
- package/dist/src/execution/tasks/parent/task-cancel.d.ts +0 -12
- package/dist/src/execution/tasks/parent/task-cancel.js +0 -1
- package/dist/src/execution/tasks/parent/tool-execution.d.ts +0 -45
- package/dist/src/execution/tasks/parent/tool-execution.js +0 -1
- package/dist/src/execution/terminal-session-event.d.ts +0 -13
- package/dist/src/execution/terminal-session-event.js +0 -1
- package/dist/src/execution/tools/ask-question-workflow.js +0 -1
- package/dist/src/execution/tools/ask-question.d.ts +0 -19
- package/dist/src/execution/tools/ask-question.js +0 -2
- package/dist/src/execution/tools/connection-search.d.ts +0 -2
- package/dist/src/execution/tools/connection-search.js +0 -2
- package/dist/src/execution/tools/sleep-workflow.d.ts +0 -3
- package/dist/src/execution/tools/sleep-workflow.js +0 -1
- package/dist/src/execution/tools/sleep.d.ts +0 -10
- package/dist/src/execution/tools/sleep.js +0 -1
- package/dist/src/execution/tools/subagent/accept-event-step.d.ts +0 -7
- package/dist/src/execution/tools/subagent/accept-event-step.js +0 -1
- package/dist/src/execution/tools/subagent/emit-event-step.d.ts +0 -12
- package/dist/src/execution/tools/subagent/emit-event-step.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +0 -42
- package/dist/src/execution/tools/subagent/invoke-agent.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +0 -44
- package/dist/src/execution/tools/subagent/invoke-preparation.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-step.d.ts +0 -64
- package/dist/src/execution/tools/subagent/invoke-step.js +0 -1
- package/dist/src/execution/tools/subagent/receipt-identity.d.ts +0 -11
- package/dist/src/execution/tools/subagent/receipt-identity.js +0 -1
- package/dist/src/execution/tools/subagent/start.d.ts +0 -51
- package/dist/src/execution/tools/subagent/start.js +0 -1
- package/dist/src/execution/tools/subagent/steer.d.ts +0 -13
- package/dist/src/execution/tools/subagent/steer.js +0 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +0 -24
- package/dist/src/execution/tools/subagent/task-agent-requests.js +0 -1
- package/dist/src/execution/tools/subagent/task-cancel.d.ts +0 -10
- package/dist/src/execution/tools/subagent/task-cancel.js +0 -1
- package/dist/src/execution/tools/tasks.d.ts +0 -3
- package/dist/src/execution/tools/tasks.js +0 -1
- package/dist/src/execution/tools/workflow/background.js +0 -1
- package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +0 -14
- package/dist/src/execution/tools/workflow/workflow-owner-background.js +0 -1
- package/dist/src/harness/background-tools.d.ts +0 -45
- package/dist/src/harness/background-tools.js +0 -1
- package/dist/src/instrumentation/background-task-runtime.d.ts +0 -18
- package/dist/src/instrumentation/background-task-runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.3.0/node_modules/@vercel/cli-config/dist/index.js +0 -21
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/envpath.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errors.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/exec.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/fsutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/lookup.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/safety.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/authorization.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/connector.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/installation.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/base-url.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/default-scopes.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/env.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/url-validation.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/auth-errors.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-context.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/oauth.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-error.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-io.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-util.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/version.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +0 -2
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +0 -1
- package/dist/src/node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +0 -1
- package/dist/src/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +0 -2
- package/dist/src/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +0 -1
- package/dist/src/protocol/activity.d.ts +0 -112
- package/dist/src/protocol/activity.js +0 -1
- package/dist/src/protocol/agent-handle-error.d.ts +0 -13
- package/dist/src/protocol/agent-handle-error.js +0 -1
- package/dist/src/public/channels/slack/activity-plan.d.ts +0 -5
- package/dist/src/public/channels/slack/activity-plan.js +0 -1
- package/dist/src/public/channels/slack/activity.d.ts +0 -63
- package/dist/src/public/channels/slack/activity.js +0 -2
- package/dist/src/public/tools/connection-search.d.ts +0 -1
- package/dist/src/public/tools/connection-search.js +0 -1
- package/dist/src/public/tools/task-cancel.d.ts +0 -1
- package/dist/src/public/tools/task-cancel.js +0 -1
- package/dist/src/runtime/prompt/connections.d.ts +0 -9
- package/dist/src/runtime/prompt/connections.js +0 -2
- package/dist/src/shared/empty-delivery.d.ts +0 -3
- package/dist/src/shared/empty-delivery.js +0 -1
- package/dist/src/subagents/agent-handle-errors.d.ts +0 -25
- package/dist/src/subagents/agent-handle-errors.js +0 -1
- package/dist/src/subagents/callback-step.d.ts +0 -11
- package/dist/src/subagents/callback-step.js +0 -1
- package/dist/src/subagents/continuation-bundle.d.ts +0 -13
- package/dist/src/subagents/continuation-bundle.js +0 -1
- package/dist/src/subagents/handle-dispatch.d.ts +0 -65
- package/dist/src/subagents/handle-dispatch.js +0 -1
- package/dist/src/subagents/handles/operation-id.d.ts +0 -15
- package/dist/src/subagents/handles/operation-id.js +0 -1
- package/dist/src/subagents/handles/prompt.d.ts +0 -52
- package/dist/src/subagents/handles/prompt.js +0 -3
- package/dist/src/subagents/handles/query.d.ts +0 -41
- package/dist/src/subagents/handles/query.js +0 -1
- package/dist/src/subagents/handles/state-key.d.ts +0 -8
- package/dist/src/subagents/handles/state-key.js +0 -1
- package/dist/src/subagents/handles/store.d.ts +0 -217
- package/dist/src/subagents/handles/store.js +0 -1
- package/dist/src/subagents/handles/transitions.d.ts +0 -103
- package/dist/src/subagents/handles/transitions.js +0 -1
- package/dist/src/subagents/remote-dispatch.js +0 -1
- package/dist/src/subagents/start-local.d.ts +0 -29
- package/dist/src/subagents/start-local.js +0 -1
- package/dist/src/subagents/start-remote.d.ts +0 -21
- package/dist/src/subagents/start-remote.js +0 -1
- package/dist/src/tasks/delivery-context.d.ts +0 -32
- package/dist/src/tasks/delivery-context.js +0 -4
- package/dist/src/tasks/delivery-policy.d.ts +0 -14
- package/dist/src/tasks/delivery-policy.js +0 -1
- package/dist/src/tasks/json.d.ts +0 -88
- package/dist/src/tasks/json.js +0 -1
- package/dist/src/tasks/notification.d.ts +0 -10
- package/dist/src/tasks/notification.js +0 -1
- package/dist/src/tasks/task-id.d.ts +0 -31
- package/dist/src/tasks/task-id.js +0 -1
- package/dist/src/tasks/task-inbox-token.d.ts +0 -2
- package/dist/src/tasks/task-inbox-token.js +0 -1
- package/dist/src/tasks/transitions.d.ts +0 -17
- package/dist/src/tasks/transitions.js +0 -1
- package/dist/src/tasks/types.d.ts +0 -138
- package/dist/src/tasks/types.js +0 -1
- package/dist/src/tools/framework/connection-search.d.ts +0 -3
- package/dist/src/tools/framework/connection-search.js +0 -1
- package/dist/src/tools/framework/task-cancel.d.ts +0 -4
- package/dist/src/tools/framework/task-cancel.js +0 -1
- package/dist/src/tools/framework/task-contract.d.ts +0 -19
- package/dist/src/tools/framework/task-contract.js +0 -1
- package/dist/src/tools/native-definition.d.ts +0 -7
- package/dist/src/tools/native-definition.js +0 -1
- package/dist/src/tracing/agent-invocation-terminal.d.ts +0 -18
- package/dist/src/tracing/agent-invocation-terminal.js +0 -1
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.d.ts +0 -0
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.js +0 -0
|
@@ -11,10 +11,13 @@ export type RolldownResolveContext = {
|
|
|
11
11
|
export declare function createGenerationPackageBoundaryPlugin(input: {
|
|
12
12
|
readonly externalDependencies: readonly string[];
|
|
13
13
|
readonly packageRoot: string;
|
|
14
|
+
readonly extensionSpecifiers?: ReadonlySet<string>;
|
|
15
|
+
readonly resolveExternalPaths?: boolean;
|
|
14
16
|
}): Record<string, unknown>;
|
|
15
17
|
export declare function createRuntimeLoaderPackageBoundaryPlugin(input: {
|
|
16
18
|
readonly externalDependencies: readonly string[];
|
|
17
19
|
readonly packageRoot: string;
|
|
20
|
+
readonly extensionSpecifier?: string;
|
|
18
21
|
}): Record<string, unknown>;
|
|
19
22
|
/**
|
|
20
23
|
* Keeps package imports external in an extension distribution while enforcing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire,isBuiltin}from"node:module";import{resolvePackageDependencyPath,resolveWorkflowModulePath}from"#internal/application/package.js";import{existsSync,readFileSync,realpathSync}from"node:fs";import{dirname,join,resolve,sep}from"node:path";import{normalizeEsmImportSpecifier}from"#internal/application/import-specifier.js";const RESOLVE_EXTENSIONS=[`.ts`,`.tsx`,`.mts`,`.cts`,`.js`,`.jsx`,`.mjs`,`.cjs`,`.json`];function createGenerationPackageBoundaryPlugin(e){return{name:`eve-generation-package-boundary`,async resolveId(t,n,r){if(isPackageImport(t))
|
|
1
|
+
import{createRequire,isBuiltin}from"node:module";import{resolvePackageDependencyPath,resolvePackageRoot,resolveWorkflowModulePath}from"#internal/application/package.js";import{existsSync,readFileSync,realpathSync}from"node:fs";import{dirname,join,resolve,sep}from"node:path";import{normalizeEsmImportSpecifier}from"#internal/application/import-specifier.js";const RESOLVE_EXTENSIONS=[`.ts`,`.tsx`,`.mts`,`.cts`,`.js`,`.jsx`,`.mjs`,`.cjs`,`.json`];function createGenerationPackageBoundaryPlugin(e){return{name:`eve-generation-package-boundary`,async resolveId(t,n,r){if(!isPackageImport(t)||e.extensionSpecifiers?.has(t))return;if(isFrameworkRuntimeImport(t,n))return e.extensionSpecifiers?.has(t)?void 0:{external:!0,id:resolveFrameworkRuntimeImport(t)};if(t.startsWith(`#`)){let r=resolvePackageImport(t,n,e.packageRoot);if(r!==void 0)return{id:r}}let i=await resolveConfiguredExternalModule.call(this,{externalDependencies:e.externalDependencies,importer:n,kind:r.kind,packageRoot:e.packageRoot,source:t});if(i!==void 0)return{external:!0,id:e.resolveExternalPaths?normalizeEsmImportSpecifier(i.resolvedId):t}}}}function createRuntimeLoaderPackageBoundaryPlugin(e){let t=toCanonicalPath(e.packageRoot);return{name:`eve-runtime-loader-package-boundary`,async resolveId(n,r,i){if(!isPackageImport(n)||n===e.extensionSpecifier)return;if(isFrameworkRuntimeImport(n,r))return{external:!0,id:resolveRuntimeLoaderFrameworkImport(n)};if(n.startsWith(`#`)){let t=resolvePackageImport(n,r,e.packageRoot);if(t!==void 0)return isFrameworkPackagePath(t)?{external:!0,id:normalizeEsmImportSpecifier(t)}:{id:t}}let a=await resolveConfiguredExternalModule.call(this,{externalDependencies:e.externalDependencies,importer:r,kind:i.kind,packageRoot:e.packageRoot,source:n});if(a!==void 0){let e=resolveExistingExternalFilePath(a.resolvedId)??a.resolvedId;return{external:!0,id:normalizeEsmImportSpecifier(e)}}let o=r===void 0||r.startsWith(`\0`)?void 0:resolve(r);if(o!==void 0&&isPathInsideOrEqual(toCanonicalPath(o),t)){let e=await this.resolve(n,r,{kind:i.kind,skipSelf:!0});if(e===null||typeof e.id!=`string`)throw Error(`Cannot resolve package "${n}" imported from "${o}". Install it with your package manager (e.g. \`pnpm install\`); a running \`eve dev\` retries on the next rebuild.`);if(isNodeModulesPath(e.id))return{external:!0,id:n}}}}}function createDistributionPackageBoundaryPlugin(e){let t=new Set(e.runtimeDependencies);return{name:`eve-extension-distribution-package-boundary`,async resolveId(n,r,i){if(!isPackageImport(n))return;if(n.startsWith(`#`)){let a=await this.resolve(n,r,{kind:i.kind,skipSelf:!0});if(a!==null&&typeof a.id==`string`&&!isPathInsideOrEqual(toCanonicalPath(a.id),toCanonicalPath(e.packageRoot))){let e=nearestPackageName(a.id);if(e!==void 0&&!t.has(e))throw Error(`Package import "${n}" resolves to undeclared package "${e}". Add "${e}" to dependencies, optionalDependencies, or peerDependencies.`)}return}if(isBuiltin(n))return{external:!0,id:n};let a=packageImportName(n);if(!t.has(a))throw Error(`Package "${n}" is not declared by the extension. Add "${a}" to dependencies, optionalDependencies, or peerDependencies.`);let o=await this.resolve(n,r,{kind:i.kind,skipSelf:!0});if(o===null&&(o=await this.resolve(n,join(e.packageRoot,`package.json`),{kind:i.kind,skipSelf:!0})),o===null||typeof o.id!=`string`)throw Error(`Cannot resolve declared package "${n}". Install the extension's dependencies before building.`);return{external:!0,id:n}}}}async function resolveConfiguredExternalModule(e){let t=resolveConfiguredExternalDependency(e.source,e.externalDependencies);if(t===void 0)return;let n=await this.resolve(e.source,e.importer,{kind:e.kind,skipSelf:!0});if(n===null&&(n=await this.resolve(e.source,join(e.packageRoot,`package.json`),{kind:e.kind,skipSelf:!0})),n===null||typeof n.id!=`string`)throw Error(`Cannot resolve external package "${e.source}".`);return{packageName:t,resolvedId:n.id}}function normalizeExternalDependencies(e=[]){return[...new Set(e)].sort()}function resolveConfiguredExternalDependency(e,t){return t.find(t=>e===t||e.startsWith(`${t}/`))}function packageImportName(e){return e.startsWith(`@`)?e.split(`/`,2).join(`/`):e.split(`/`,1)[0]}function nearestPackageName(e){let t=nearestPackageRoot(e);if(t!==void 0)try{let e=JSON.parse(readFileSync(join(t,`package.json`),`utf8`));return typeof e.name==`string`&&e.name.length>0?e.name:void 0}catch{return}}function nearestPackageRoot(e){let t=dirname(toCanonicalPath(e));for(;;){if(existsSync(join(t,`package.json`)))return t;let e=dirname(t);if(e===t)return;t=e}}function resolvePackageImport(e,t,n){let r=t===void 0||t.startsWith(`\0`)?n:nearestPackageRoot(t)??n;try{let t=createRequire(join(r,`package.json`)).resolve(e);return isPathInsideOrEqual(toCanonicalPath(t),toCanonicalPath(r))?t:void 0}catch{return}}let canonicalFrameworkPackageRoot;function isFrameworkPackagePath(e){return canonicalFrameworkPackageRoot??=toCanonicalPath(resolvePackageRoot()),nearestPackageRoot(e)===canonicalFrameworkPackageRoot}function resolveExistingExternalFilePath(e){if(existsSync(e))return e;for(let t of RESOLVE_EXTENSIONS){let n=`${e}${t}`;if(existsSync(n))return n}}function isPackageImport(e){return isPathImport(e)||/^(?:node|data|file):/.test(e)?!1:!e.startsWith(`@/`)}function isPathImport(e){return e.startsWith(`.`)||e.startsWith(`/`)||/^[A-Za-z]:[\\/]/.test(e)}function isFrameworkRuntimeImport(e,t){return e===`eve/self-modification`?!1:e===`eve`||e.startsWith(`eve/`)?!0:e===`workflow`||e.startsWith(`workflow/`)||e.startsWith(`@workflow/`)?t===void 0||!isNodeModulesPath(t):!1}function resolveFrameworkRuntimeImport(e){return e===`eve`||e.startsWith(`eve/`)?e:normalizeEsmImportSpecifier(resolveWorkflowModulePath(e))}function resolveRuntimeLoaderFrameworkImport(e){return e===`eve`||e.startsWith(`eve/`)?normalizeEsmImportSpecifier(resolvePackageDependencyPath(e)):resolveFrameworkRuntimeImport(e)}function isNodeModulesPath(e){return e.replaceAll(`\\`,`/`).includes(`/node_modules/`)}function toCanonicalPath(e){try{return realpathSync(e)}catch{return resolve(e)}}function isPathInsideOrEqual(e,t){let n=resolve(e),r=resolve(t);return n===r||n.startsWith(`${r}${sep}`)}export{RESOLVE_EXTENSIONS,createDistributionPackageBoundaryPlugin,createGenerationPackageBoundaryPlugin,createRuntimeLoaderPackageBoundaryPlugin,isNodeModulesPath,isPathImport,normalizeExternalDependencies};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Mount {
|
|
2
|
+
readonly mountId: string;
|
|
3
|
+
readonly sourceRoot: string;
|
|
4
|
+
readonly packageName: string;
|
|
5
|
+
readonly specifier?: string;
|
|
6
|
+
readonly mountSourcePath?: string;
|
|
7
|
+
readonly programmaticImport?: {
|
|
8
|
+
readonly specifier: string;
|
|
9
|
+
readonly entryPath: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/** Isolates extension-owned source modules, but leaves ordinary dependencies shared. */
|
|
13
|
+
export declare function createExtensionMountPlugin(mounts: readonly Mount[], overridePaths?: ReadonlyMap<string, string>): Record<string, unknown> | null;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{readFileSync,realpathSync}from"node:fs";import{resolve,sep}from"node:path";const MOUNT_QUERY=`?eve-mount=`;function canonicalize(e){try{return realpathSync(e)}catch{return resolve(e)}}function within(e,t){return e===t||e.startsWith(`${t}${sep}`)}function createExtensionMountPlugin(e,t=new Map){if(e.length===0)return null;let n=new Map,canonical=e=>{let t=n.get(e);return t===void 0&&(t=canonicalize(e),n.set(e,t)),t},r=e.map(e=>({...e,root:canonical(e.sourceRoot)})),i=new Map(r.filter(e=>e.mountSourcePath!==void 0).map(e=>[canonical(resolve(e.mountSourcePath)),e])),a=new Map(r.map(e=>[e.mountId,e])),o=new Map([...t].map(([e,t])=>[canonical(e),a.get(t)]));return{name:`eve-extension-mount`,async resolveId(e,t){if(e===`eve/context`)return;let n=e.indexOf(MOUNT_QUERY),s=n>=0?decodeURIComponent(e.slice(n+11)):void 0,c=t?.indexOf(MOUNT_QUERY)??-1,l=c>=0?decodeURIComponent(t.slice(c+11)):void 0,u=n>=0?e.slice(0,n):e,d=c>=0?t.slice(0,c):t,f=d===void 0?void 0:canonical(d),p=f===void 0?void 0:i.get(f),m=f===void 0?void 0:o.get(f),h=s??l??p?.mountId??m?.mountId,g=h===void 0?void 0:a.get(h);if(h!==void 0&&g===void 0)throw Error(`Unknown extension mount "${h}".`);let _=g!==void 0&&f!==void 0&&!within(f,g.root)&&o.get(f)===g,v=g!==void 0&&(u===g.specifier||u===g.programmaticImport?.specifier)?g:void 0,y=await this.resolve(v?.programmaticImport?.entryPath??u,d,{skipSelf:!0,kind:`import-statement`});if(y===null||y.id.startsWith(`\0`))return y;if(y.external){if(v===void 0)return y;throw Error(`Extension export "${u}" for mount "${h}" was externalized; it must be bundled to isolate its configuration.`)}if(!/\.(?:[cm]?[jt]sx?|json)$/.test(y.id))return y;let b=canonical(y.id);if(g!==void 0&&(v!==void 0||!_&&within(b,g.root)))return{id:`${y.id}${MOUNT_QUERY}${encodeURIComponent(h)}`};if(g!==void 0)return y;if(t===void 0||t.startsWith(`\0`))return;let x=r.filter(e=>within(b,e.root));if(x.length>1)throw Error(`Import "${e}" from "${t}" refers to multiple extension mounts (${x.map(e=>e.mountId).join(`, `)}). Import it from an owned mount or contribution instead.`);return x.length===1?{id:`${y.id}${MOUNT_QUERY}${encodeURIComponent(x[0].mountId)}`}:void 0},load(e){let t=e.indexOf(MOUNT_QUERY);if(t<0)return;let n=e.slice(0,t);if(!/\.(?:[cm]?[jt]sx?|json)$/.test(n))return;let r=n.slice(n.lastIndexOf(`.`)+1),i=r===`json`?`json`:r===`tsx`?`tsx`:r===`jsx`?`jsx`:[`ts`,`mts`,`cts`].includes(r)?`ts`:`js`;return{code:readFileSync(n,`utf8`),moduleType:i}}}}export{createExtensionMountPlugin};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* One extension's on-disk source root paired with
|
|
3
|
-
* state keys and config binding must be scoped to.
|
|
2
|
+
* One extension's on-disk source root paired with its logical mount identity.
|
|
4
3
|
*/
|
|
5
4
|
interface ExtensionScope {
|
|
6
5
|
/** Absolute path to the extension's source root. */
|
|
7
6
|
readonly sourceRoot: string;
|
|
8
|
-
|
|
9
|
-
readonly packageNamespace: string;
|
|
7
|
+
readonly mountId: string;
|
|
10
8
|
}
|
|
11
9
|
/** The subset of the rolldown/rollup plugin shape this plugin implements. */
|
|
12
10
|
export interface ExtensionScopeBundlerPlugin {
|
|
@@ -20,19 +18,18 @@ export interface ExtensionScopeBundlerPlugin {
|
|
|
20
18
|
/**
|
|
21
19
|
* Path-containment scope plugin for the whole-application bundle (the production
|
|
22
20
|
* build). Any module physically under an extension's source root has its
|
|
23
|
-
* `eve/context
|
|
24
|
-
* bakes the extension's package namespace into `defineState`/`defineExtension`.
|
|
21
|
+
* `eve/context` imports redirected to a mount-owned state shim.
|
|
25
22
|
*
|
|
26
23
|
* Returns `null` when there are no extensions, so consumer-only builds carry no
|
|
27
24
|
* extra plugin and their output is byte-identical to a non-extension build.
|
|
28
25
|
*/
|
|
29
26
|
export declare function createExtensionScopePlugin(scopes: readonly ExtensionScope[]): ExtensionScopeBundlerPlugin | null;
|
|
30
27
|
/**
|
|
31
|
-
* Fixed-
|
|
32
|
-
* dev/eval per-module loader). The compiler already knows the
|
|
33
|
-
*
|
|
34
|
-
*
|
|
28
|
+
* Fixed-mount scope plugin for a single extension-owned module bundle (the
|
|
29
|
+
* dev/eval per-module loader). The compiler already knows the owning mount,
|
|
30
|
+
* so every module in the bundle — the entry plus its same-package dependencies —
|
|
31
|
+
* is scoped, with no reliance on
|
|
35
32
|
* filesystem path matching (which is unreliable under workspace symlinks).
|
|
36
33
|
*/
|
|
37
|
-
export declare function
|
|
34
|
+
export declare function createFixedMountScopePlugin(mountId: string): ExtensionScopeBundlerPlugin;
|
|
38
35
|
export {};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import{realpathSync}from"node:fs";import{resolve,sep}from"node:path";const VIRTUAL_PREFIX=`\0eve-ext-scope
|
|
2
|
-
`):
|
|
3
|
-
`)}function scopeHooks(e,t){return{name:e,resolveId(e,n){let r=SCOPED_FRAMEWORK_MODULES[e];if(r===void 0||n===void 0||n.startsWith(`\0`))return;let i=t(n);if(i!==void 0)return`${VIRTUAL_PREFIX}${r}:${i}`},load(e){if(!e.startsWith(VIRTUAL_PREFIX))return;let t=e.slice(15),n=t.indexOf(`:`);return{code:shimSource(t.slice(0,n),t.slice(n+1)),moduleType:`js`}}}}function createExtensionScopePlugin(e){if(e.length===0)return null;let t=e.map(e=>({root:canonicalize(e.sourceRoot),packageNamespace:e.packageNamespace}));return scopeHooks(`eve-extension-scope`,e=>{let n=importerPath(e);for(let e of t)if(isUnder(n,e.root))return e.packageNamespace})}function createFixedNamespaceScopePlugin(e){return scopeHooks(`eve-extension-scope-fixed`,()=>e)}export{createExtensionScopePlugin,createFixedNamespaceScopePlugin};
|
|
1
|
+
import{realpathSync}from"node:fs";import{resolve,sep}from"node:path";const VIRTUAL_PREFIX=`\0eve-ext-scope:`;function canonicalize(e){try{return realpathSync(e)}catch{return resolve(e)}}function importerPath(e){let t=e.indexOf(`?`);return canonicalize(t===-1?e:e.slice(0,t))}function isUnder(e,t){return e===t||e.startsWith(`${t}${sep}`)}function shimSource(e){return[`import { defineMountedState } from "eve/internal/mount-state";`,`export function defineState(name, initial) {`,` return defineMountedState(${JSON.stringify(e)}, name, initial);`,`}`,``].join(`
|
|
2
|
+
`)}function scopeHooks(e,t){return{name:e,resolveId(e,n){if(e!==`eve/context`||n===void 0||n.startsWith(`\0`))return;let r=t(n);if(r!==void 0)return`${VIRTUAL_PREFIX}context:${encodeURIComponent(r)}`},load(e){if(!e.startsWith(VIRTUAL_PREFIX))return;let t=e.slice(15),n=t.indexOf(`:`);return t.slice(0,n)===`context`?{code:shimSource(decodeURIComponent(t.slice(n+1))),moduleType:`js`}:void 0}}}function createExtensionScopePlugin(e){if(e.length===0)return null;let t=e.map(e=>({root:canonicalize(e.sourceRoot),mountId:e.mountId}));return scopeHooks(`eve-extension-scope`,e=>{let n=e.indexOf(`?eve-mount=`);if(n>=0){let r=decodeURIComponent(e.slice(n+11)),i=t.find(e=>e.mountId===r);if(i===void 0)throw Error(`Unknown extension mount "${r}".`);return isUnder(importerPath(e),i.root)?i.mountId:void 0}let r=importerPath(e),i=t.filter(e=>isUnder(r,e.root));if(i.length!==0){if(i.length>1)throw Error(`Ambiguous extension scope for "${r}".`);return i[0].mountId}})}function createFixedMountScopePlugin(e){return scopeHooks(`eve-extension-scope-fixed`,()=>e)}export{createExtensionScopePlugin,createFixedMountScopePlugin};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { UserContent } from "ai";
|
|
2
2
|
import type { SessionAuthContext } from "#channel/types.js";
|
|
3
|
-
import {
|
|
3
|
+
import type { ChannelFrom } from "#channel/channel-operations.js";
|
|
4
4
|
import type { AgentInvocation, AgentInvocationMutationResult } from "#internal/invocation/agent-invocation.js";
|
|
5
5
|
import type { RouteSessionCreator } from "#internal/nitro/routes/channel-route-context.js";
|
|
6
|
-
import type
|
|
6
|
+
import { type InputResponse } from "#shared/input.js";
|
|
7
7
|
export declare class WorkflowAgentInvocationExecution {
|
|
8
8
|
#private;
|
|
9
9
|
constructor(input: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{parseInputResponses}from"#shared/input.js";import{parseJsonValue}from"#shared/json.js";import{RunExpiredError,WorkflowRunNotFoundError}from"#compiled/@workflow/errors/index.js";import{getRun,getWorld}from"#internal/workflow/runtime.js";import{parseNdjsonStream}from"#execution/ndjson-stream.js";import{INVOCATION_OWNER_ATTRIBUTE,INVOCATION_TOKEN_ATTRIBUTE,invocationInputRequestId,invocationOwnerKey}from"#internal/invocation/metadata.js";var WorkflowAgentInvocationExecution=class{#e;#t;constructor(e){this.#e=e.createSession,this.#t=e.from}async create(e){let t=`invocation:${crypto.randomUUID()}`,n=await this.#e({auth:e.auth,capabilities:{requestInput:!0},continuationToken:t,externalInvocation:{continuationToken:t,ownerKey:invocationOwnerKey(e.auth)},input:{message:e.message}}),r=await this.#n(n.sessionId,e.auth);if(r===void 0)throw Error(`Invocation run was unavailable after durable creation.`);return workingInvocation(n.sessionId,r.createdAt.toISOString(),r.expiredAt?.toISOString())}async read(e){let t=await this.#n(e.invocationId,e.auth);if(t===void 0)return;let n={createdAt:t.createdAt.toISOString(),expiresAt:t.expiredAt?.toISOString(),invocationId:t.runId};return t.status===`cancelled`?{...n,status:`cancelled`}:projectInvocation(n,t.status,await readRecentPersistedEvents(e.invocationId))}async update(e){let t=await this.read(e);if(t===void 0)return{type:`not_found`};if(t.status!==`input_required`)return replaysResolvedBatch(await readRecentPersistedEvents(e.invocationId),e.responses)?{invocation:t,type:`success`}:conflict(`Invocation is not waiting for input.`);let n=await this.#n(e.invocationId,e.auth);if(n===void 0)return{type:`not_found`};let r=latestPendingInputBatch(await readRecentPersistedEvents(e.invocationId));if(r===void 0)return conflict(`Invocation input changed before the update could be applied.`);let i=new Set,a=[];for(let t of e.responses){let e=r.rawRequestIds[t.requestId];if(e===void 0)return conflict(`Unknown input request: ${t.requestId}`);i.add(t.requestId),a.push({...t,requestId:e})}if(i.size!==e.responses.length||i.size!==Object.keys(r.requests).length)return conflict(`Responses must answer the complete pending input batch exactly once.`);let o=n.attributes[INVOCATION_TOKEN_ATTRIBUTE];if(o===void 0)return{type:`not_found`};try{await this.#t(o).respond(parseInputResponses(a),{auth:e.auth})}catch(e){if(RunExpiredError.is(e))return{type:`not_found`};throw e}return{invocation:workingInvocation(e.invocationId,t.createdAt,t.expiresAt),type:`success`}}async cancel(e){let t=await this.read(e);if(t===void 0||isTerminal(t.status))return t;try{await getRun(e.invocationId).cancel()}catch(e){if(WorkflowRunNotFoundError.is(e)||RunExpiredError.is(e))return;throw e}return await this.read(e)}async#n(e,t){let n=await getWorld();try{let r=await n.runs.get(e);return r.attributes[INVOCATION_TOKEN_ATTRIBUTE]===void 0?void 0:r.attributes[INVOCATION_OWNER_ATTRIBUTE]===invocationOwnerKey(t)?r:void 0}catch(e){if(WorkflowRunNotFoundError.is(e)||RunExpiredError.is(e))return;throw e}}};async function readRecentPersistedEvents(e){let t=getRun(e).getReadable({startIndex:-64}),n=await t.getTailIndex();if(n<0)return await t.cancel(`invocation event stream is empty`).catch(()=>{}),[];let r=Math.min(n+1,64),i=parseNdjsonStream(()=>t).getReader(),a=[];try{for(;a.length<r;){let{done:e,value:t}=await i.read();if(e)break;a.push(t)}}finally{await i.cancel(`invocation event window read complete`).catch(()=>{}),i.releaseLock()}return a}function pendingInputBatch(e){let t={},n={};for(let r of e.data.requests){let i=invocationInputRequestId(e.meta.id,r.requestId);t[i]=r.requestId,n[i]={...r,requestId:i}}return{id:e.meta.id,rawRequestIds:t,requests:n}}function withoutResolved(e,t){let n=new Set(t.map(e=>e.requestId)),r={},i={};for(let[t,a]of Object.entries(e.rawRequestIds)){if(n.has(a))continue;r[t]=a;let o=e.requests[t];o!==void 0&&(i[t]=o)}return Object.keys(r).length===0?void 0:{id:e.id,rawRequestIds:r,requests:i}}function foldInputBatches(e){let t,n,r;for(let i of e)if(i.type===`input.requested`)n=pendingInputBatch(i),t=n;else if(i.type===`input.resolved`){if(n===void 0)continue;let e=new Map;for(let t of i.data.resolutions)e.set(t.requestId,t.response);r={batch:n,responses:e},t!==void 0&&(t=withoutResolved(t,i.data.resolutions))}else i.type===`turn.started`&&(t=void 0);return{pending:t,resolved:r}}function latestPendingInputBatch(e){return foldInputBatches(e).pending}function replaysResolvedBatch(e,t){let n=foldInputBatches(e).resolved;if(n===void 0||t.length!==n.responses.size)return!1;let r=new Set;for(let e of t){let t=n.batch.rawRequestIds[e.requestId];if(t===void 0||r.has(t)||(r.add(t),!n.responses.has(t)))return!1;let i=n.responses.get(t);if(i?.optionId!==e.optionId||i?.text!==e.text)return!1}return!0}function projectInvocation(e,t,n){let r=new Map,i,a,o;for(let e of n)switch(e.type){case`turn.started`:r.clear(),i=void 0,a=void 0,o=void 0;break;case`input.requested`:i=pendingInputBatch(e);break;case`input.resolved`:i!==void 0&&(i=withoutResolved(i,e.data.resolutions)),o=void 0;break;case`authorization.required`:{let t={description:e.data.description,name:e.data.name};e.data.authorization!==void 0&&(t.authorization=e.data.authorization),e.data.webhookUrl!==void 0&&(t.webhookUrl=e.data.webhookUrl),r.set(e.data.name,t);break}case`authorization.completed`:r.delete(e.data.name),o=void 0;break;case`message.completed`:e.data.finishReason!==`tool-calls`&&(a=safeJson(e.data.message));break;case`turn.waiting`:a=void 0;break;case`turn.completed`:o=`completed`;break;case`turn.cancelled`:o=`cancelled`;break;case`turn.failed`:case`session.failed`:o=e}let s=typeof o==`object`?o:void 0,failed=()=>({...e,error:publicInvocationFailure(e.invocationId,s),status:`failed`});if(t===`failed`||s?.type===`session.failed`)return failed();if(t===`completed`)return{...e,result:a,status:`completed`};let c=[...r.values()];return c.length>0?{...e,authorizations:c,pollAfterMs:1e3,result:a,status:`authorization_required`}:i===void 0?s===void 0?o===`cancelled`?{...e,status:`cancelled`}:o===`completed`?{...e,result:a,status:`completed`}:{...e,pollAfterMs:1e3,result:a,status:`working`}:failed():{...e,inputRequests:i.requests,result:a,status:`input_required`}}function workingInvocation(e,t,n){return{createdAt:t,expiresAt:n,invocationId:e,pollAfterMs:1e3,status:`working`}}function safeJson(e){try{return parseJsonValue(e)}catch{return String(e)}}function publicInvocationFailure(e,t){let n={runId:e};t!==void 0&&(n.eveCode=t.data.code);let r=vercelDeploymentId();r!==void 0&&(n.vercelDeploymentId=r),typeof t?.data.details?.errorId==`string`&&(n.errorId=t.data.details.errorId);let i=t===void 0?null:semanticFailure(t.data);if(i===null){let e=t===void 0?null:fallbackFailure(t.data);return e===null?{code:-32603,data:n,message:`Invocation failed.`}:(e.name!==void 0&&(n.name=e.name),{code:-32603,data:n,message:e.message})}return n.semanticErrorId=i.id,n.name=i.name,i.hint!==void 0&&(n.hint=i.hint),{code:-32603,data:n,message:i.message}}function semanticFailure(e){let t=e.details;if(typeof t?.semanticErrorId!=`string`||t.semanticErrorId.trim().length===0||typeof t.name!=`string`||t.name.trim().length===0)return null;let n=typeof t.message==`string`&&t.message.trim().length>0?t.message.trim():e.message.trim();if(n.length===0)return null;let r=typeof t.hint==`string`&&t.hint.trim().length>0?t.hint.trim():void 0,i={id:t.semanticErrorId,message:n,name:t.name};return r!==void 0&&(i.hint=r),i}function fallbackFailure(e){let t=e.message.trim(),n=typeof e.details?.name==`string`?e.details.name.trim():``;if(t.length===0&&n.length===0)return null;let r={message:t.length===0?n:truncateForDisplay(t)};return n.length>0&&(r.name=n),r}function truncateForDisplay(e,t=160){return e.length<=t?e:`${e.slice(0,t-1).trimEnd()}…`}function vercelDeploymentId(){if(process.env.VERCEL!==`1`)return;let e=process.env.VERCEL_DEPLOYMENT_ID?.trim();return e&&e.length>0?e:void 0}function conflict(e){return{message:e,type:`conflict`}}function isTerminal(e){return e===`completed`||e===`failed`||e===`cancelled`}export{WorkflowAgentInvocationExecution};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { defineMountedState } from "#public/definitions/state.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineMountedState}from"#public/definitions/state.js";export{defineMountedState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readFile}from"node:fs/promises";import{
|
|
1
|
+
import{readFile}from"node:fs/promises";import{isObject}from"#shared/guards.js";import{EVE_ROUTE_PREFIX}from"#protocol/routes.js";import{resolveDiscoveryProject}from"#discover/project.js";import{resolveInstalledPackageInfo,resolvePackageSourceFilePath}from"#internal/application/package.js";import{dirname,isAbsolute,join,relative,resolve,sep}from"node:path";import{normalizePublicRoutePrefix}from"#shared/public-route-prefix.js";import{tryReadExtensionBuildConfig}from"#internal/nitro/host/build-extension.js";import{toErrorMessage}from"#shared/errors.js";import{createDiskRuntimeCompiledArtifactsSource}from"#runtime/compiled-artifacts-source.js";import{build,copyPublicAssets,prepare,prerender}from"nitro/builder";import{prepareEveVersionedCacheDirectory,writeEveVersionedCacheMetadata}from"#internal/application/cache-metadata.js";import{createApplicationBuildWorkspace,removeApplicationBuildWorkspace}from"#internal/application/build-workspace.js";import{ApplicationBuildProfiler,createApplicationBuildProfile,measureApplicationBuildOutput,writeApplicationBuildProfile}from"#internal/application/build-profile.js";import{RecoverablePublicationError,publishApplicationBuildArtifacts}from"#internal/application/output-publication.js";import{stageProductionCompilerArtifacts}from"#internal/application/production-compiler-artifacts.js";import{materializeVercelWorkflowFunctionOutput,normalizeEveVercelFunctionOutput}from"#internal/workflow-bundle/vercel-workflow-output.js";import{createProductionApplicationNitro}from"#internal/nitro/host/create-application-nitro.js";import{emitVercelAgentSummary}from"#internal/nitro/host/build-vercel-agent-summary.js";import{emitConnectManifest}from"#internal/external-resources.js";import{copyHostMiddlewareFunctions}from"#internal/nitro/host/copy-host-middleware.js";import{normalizeVercelServiceCrons}from"#internal/nitro/host/normalize-vercel-service-crons.js";import{prepareProductionApplicationHost,refreshProductionCompiledArtifacts}from"#internal/nitro/host/prepare-application-host.js";import{createProductionNitroArtifactsConfig}from"#internal/nitro/host/artifacts-config.js";import{runVercelBuildPrewarm}from"#internal/nitro/host/vercel-build-prewarm.js";import{prewarmAppSandboxes}from"#execution/sandbox/prewarm.js";import{findClosestVercelOutputDirectory}from"#shared/vercel-output-directory.js";import{resolveEveServicePrefixByRoot}from"#internal/vercel/vercel-service-config-operations.js";import{parseVercelServicesConfig}from"#internal/vercel/vercel-services-config.js";function trimTrailingSlash(e){return e.replace(/[\\/]+$/,``)}async function measureBuildPhase(e,t,n){return e===void 0?n():e.measure(t,n)}function isPathInside(e,t){let n=relative(e,t);return n.length===0||!n.startsWith(`..${sep}`)&&n!==`..`&&!isAbsolute(n)}function assertProfileOutputOutsideBuildOutput(e,t){if(e!==void 0&&isPathInside(t,e))throw Error(`Build profile path ${e} must be outside the published output directory ${t}.`)}async function writeOptionalApplicationBuildProfile(e){try{assertProfileOutputOutsideBuildOutput(e.profileOutputPath,e.outputDirectory);let t=e.profiler.finish(),n=await measureApplicationBuildOutput(e.outputDirectory);await writeApplicationBuildProfile(e.profileOutputPath,createApplicationBuildProfile({output:n,target:process.env.VERCEL?`vercel`:`local`,timing:t}))}catch(t){console.warn(`eve: failed to write optional build profile to ${e.profileOutputPath}; continuing with the published build output: ${toErrorMessage(t)}`)}}async function resolveEveServicePrefixForVercelFunctionOutput(e,t){let n=Array.from(new Set([resolve(e),resolve(t)])),r=await findClosestVercelOutputDirectory(e);if(r!==void 0)try{let e=join(r,`config.json`),t=parseVercelServicesConfig(JSON.parse(await readFile(e,`utf8`)),e),i=resolveEveServicePrefixByRoot({appRoots:n,configRoot:await resolveVercelOutputConfigRoot(r),config:t});if(i!==void 0)return i}catch(e){if(!(e instanceof Error&&`code`in e&&e.code===`ENOENT`))throw e}let i=e;for(;;){for(let e of[join(i,`vercel.json`),join(i,`.vercel`,`output`,`config.json`)])try{let t=parseVercelServicesConfig(JSON.parse(await readFile(e,`utf8`)),e),r=e.endsWith(`vercel.json`)?i:await resolveVercelOutputConfigRoot(dirname(e)),a=resolveEveServicePrefixByRoot({appRoots:n,configRoot:r,config:t});if(a!==void 0)return a}catch(e){if(!(e instanceof Error&&`code`in e&&e.code===`ENOENT`))throw e}let e=dirname(i);if(e===i)return;i=e}}async function resolveVercelOutputConfigRoot(e){let t=dirname(dirname(e));try{let e=JSON.parse(await readFile(join(t,`.vercel`,`project.json`),`utf8`));if(isObject(e)&&isObject(e.settings)){let n=e.settings.rootDirectory;if(typeof n==`string`&&n.trim().length>0)return resolve(t,n)}}catch(e){if(!(e instanceof Error&&`code`in e&&e.code===`ENOENT`))throw e}return t}async function buildNitroOutput(e,t,n){let r=trimTrailingSlash(e.options.output.dir);return await measureBuildPhase(t,`${n}.cache.prepare`,()=>prepareEveVersionedCacheDirectory(r)),await measureBuildPhase(t,`${n}.prepare`,()=>prepare(e)),await measureBuildPhase(t,`${n}.public-assets`,()=>copyPublicAssets(e)),await measureBuildPhase(t,`${n}.prerender`,()=>prerender(e)),await measureBuildPhase(t,`${n}.bundle`,()=>build(e)),await measureBuildPhase(t,`${n}.cache.write`,()=>writeEveVersionedCacheMetadata(r)),r}async function buildApplication(e,t){let n=t.profileOutputPath===void 0?void 0:resolve(t.profileOutputPath),r=n===void 0?void 0:new ApplicationBuildProfiler,i=await measureBuildPhase(r,`extension.check`,()=>tryReadExtensionBuildConfig(e));if(i!==null)throw Error(`Package "${i.packageName}" is an eve extension. Run \`eve extension build\` instead of \`eve build\`.`);let a=await measureBuildPhase(r,`project.resolve`,()=>resolveDiscoveryProject(e)),o=await measureBuildPhase(r,`workspace.create`,()=>createApplicationBuildWorkspace(a.appRoot,t.vercelServiceOutput?.serviceOutputDirectory)),s=!1,c;try{c=await buildApplicationInWorkspace(o,t,r)}catch(e){throw s=e instanceof RecoverablePublicationError,e}finally{s||await measureBuildPhase(r,`workspace.remove`,()=>removeApplicationBuildWorkspace(o))}return r!==void 0&&n!==void 0&&await writeOptionalApplicationBuildProfile({outputDirectory:c,profileOutputPath:n,profiler:r}),c}async function buildApplicationInWorkspace(e,t,n){let r=await measureBuildPhase(n,`host.prepare`,()=>prepareProductionApplicationHost(e)),i=!!process.env.VERCEL,a=i?await measureBuildPhase(n,`vercel.service-prefix.resolve`,()=>resolveEveServicePrefixForVercelFunctionOutput(r.appRoot,r.compileResult.project.agentRoot)):void 0,o=normalizePublicRoutePrefix(a),s=o===EVE_ROUTE_PREFIX?void 0:o;if(t.publicRoutePrefix!==void 0&&s!==void 0&&t.publicRoutePrefix!==s)throw Error(`EVE_PUBLIC_ROUTE_PREFIX ${JSON.stringify(t.publicRoutePrefix)} conflicts with the configured Vercel service prefix ${JSON.stringify(a)}.`);let c=t.publicRoutePrefix??s,l=createProductionNitroArtifactsConfig(e.appRoot).sandboxScope,u=await measureBuildPhase(n,`nitro.create`,()=>createProductionApplicationNitro(r,{buildDir:e.nitro.buildDir,outputDir:e.publication.output.stagedDir,publicRoutePrefix:c,workspaceMember:t.workspaceMember}));try{if(!t.skipSandboxPrewarm){let t={appRoot:r.appRoot,compiledArtifactsSource:createDiskRuntimeCompiledArtifactsSource(e.compiler.rootDir,{moduleMapLoaderPath:resolvePackageSourceFilePath(`src/internal/authored-module-map-loader.ts`),sandboxAppRoot:r.appRoot,sandboxScope:l}),log(e){console.log(e)}};await measureBuildPhase(n,`sandbox.prewarm`,async()=>{i?await runVercelBuildPrewarm(t):await prewarmAppSandboxes(t)}),await refreshProductionCompiledArtifacts(r,e.host.artifactsDir)}await buildNitroOutput(u,n,`nitro`),i&&await measureBuildPhase(n,`vercel.workflow-function.materialize`,()=>materializeVercelWorkflowFunctionOutput(e.publication.output.stagedDir)),a!==void 0&&await measureBuildPhase(n,`vercel.functions.normalize`,()=>normalizeEveVercelFunctionOutput(e.publication.output.stagedDir,{servicePrefix:a}));let o=t.vercelServiceOutput;o!==void 0&&(await measureBuildPhase(n,`vercel.service-crons.normalize`,()=>normalizeVercelServiceCrons({publicRoutePrefix:c,serviceOutputDirectory:e.publication.output.stagedDir})),await measureBuildPhase(n,`vercel.host-middleware.copy`,()=>copyHostMiddlewareFunctions({hostOutputDirectory:o.hostOutputDirectory,serviceOutputDirectory:e.publication.output.stagedDir}))),await measureBuildPhase(n,`agent-summary.emit`,()=>emitVercelAgentSummary({manifest:r.compileResult.manifest,outputPath:e.publication.summary.stagedPath})),await measureBuildPhase(n,`connect-manifest.emit`,()=>emitConnectManifest({appRoot:r.appRoot,generatorVersion:resolveInstalledPackageInfo().version,manifest:r.compileResult.manifest,outputDirectory:e.publication.output.stagedDir,publicRoutePrefix:c})),i||await measureBuildPhase(n,`compiler-artifacts.stage`,()=>stageProductionCompilerArtifacts({compilerArtifactsRoot:e.compiler.artifactsDir,outputDir:e.publication.output.stagedDir}))}finally{await measureBuildPhase(n,`nitro.close`,()=>u.close())}return await measureBuildPhase(n,`output.publish`,()=>publishCompletedApplicationBuild(e)),e.publication.output.finalDir}async function publishCompletedApplicationBuild(e){await publishApplicationBuildArtifacts({appRoot:e.appRoot,finalOutputDir:e.publication.output.finalDir,finalSummaryPath:e.publication.summary.finalPath,scratchDir:e.rootDir,stagedOutputDir:e.publication.output.stagedDir,stagedSummaryPath:e.publication.summary.stagedPath})}export{buildApplication};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readFile}from"node:fs/promises";import{resolvePackageRoot,resolvePackageSourceDirectoryPath,resolvePackageSourceFilePath,resolveWorkflowModulePath}from"#internal/application/package.js";import{dirname,isAbsolute,join,relative,resolve}from"node:path";import{fileURLToPath}from"node:url";import{resolveAuthoredTsConfigPath}from"#internal/authored-module-loader.js";import{EVE_PACKAGE_NAME}from"#internal/package-name.js";import{createExtensionScopePlugin}from"#internal/bundler/extension-scope-plugin.js";import{applyWorkflowTransform}from"#internal/workflow-bundle/workflow-builders.js";import{createExtensionExternalDependencyPlugin,resolveExtensionExternalDependencyPaths}from"#internal/nitro/host/extension-external-dependency-plugin.js";import{createNitro}from"nitro/builder";import{prepareEveVersionedCacheDirectory,writeEveVersionedCacheMetadata}from"#internal/application/cache-metadata.js";import{createProductionNitroArtifactsConfig}from"#internal/nitro/host/artifacts-config.js";import{configureInstrumentationEntry}from"#internal/nitro/host/instrumentation-entry.js";import{createCompiledSandboxProviderPrunePlugin}from"#internal/nitro/host/compiled-sandbox-provider-prune-plugin.js";import{createDevelopmentRuntimePrunePlugin}from"#internal/nitro/host/development-runtime-prune-plugin.js";import{configureDevelopmentNitroRoutes,configureProductionNitroRoutes}from"#internal/nitro/host/configure-nitro-routes.js";import{applyEveCronHandlerRoute}from"#internal/nitro/host/cron-handler-route.js";import{createNitroBundlerConfig}from"#internal/nitro/host/nitro-bundler-config.js";import{OPTIONAL_ENGINE_PACKAGES_BY_BACKEND_NAME,createOptionalEngineDependencyPlugin}from"#internal/nitro/host/optional-engine-dependency-plugin.js";import{addNitroRoutingImportSpecifierPlugin}from"#internal/nitro/host/nitro-routing-import-specifier-plugin.js";import{registerScheduleTaskHandlers}from"#internal/nitro/host/schedule-task-routes.js";import{createEveVercelOptions}from"#internal/nitro/host/vercel-build-output-config.js";const WORKFLOW_ALIAS_SPECIFIERS=[`workflow`,`workflow/api`,`workflow/errors`,`workflow/internal/builtins`,`workflow/internal/private`,`workflow/runtime`],INSTRUMENTATION_ALIAS_PATHS={"eve/instrumentation":`src/public/instrumentation/index.ts`,"eve/instrumentation/otel":`src/public/instrumentation/otel.ts`},WORKFLOW_TRANSFORM_PATCHED=Symbol(`eve.workflow-transform-patched`),LOCAL_SANDBOX_BACKEND_NAMES=new Set([`docker`,...Object.keys(OPTIONAL_ENGINE_PACKAGES_BY_BACKEND_NAME)]);function resolveWorkflowAliases(){let e={};for(let t of WORKFLOW_ALIAS_SPECIFIERS)e[t]=resolveWorkflowModulePath(t);return e}function resolveProductionNitroPreset(){return process.env.VERCEL?`vercel`:void 0}function manifestHasWorkflowProgram(e){return[e,...e.subagents.map(e=>e.agent)].some(e=>e.tools.some(e=>e.workflowProgram!==void 0))}function manifestHasWebSocketChannel(e){return e.channelRoutes.effective.some(e=>e.method===`WEBSOCKET`)}function collectHostedTraceDependencies(e,t){let n=new Set(collectExtensionExternalDependencies(e.compileResult.manifest)),r=[...e.compileResult.manifest.config.build?.externalDependencies??[],...e.compileResult.manifest.subagents.flatMap(e=>e.configResolver===void 0?e.agent.config.build?.externalDependencies??[]:e.configResolver.build?.externalDependencies??[])];return[...new Set([...t,...r,...[...n].map(e=>`${e}*`)])].filter(e=>e!==EVE_PACKAGE_NAME&&e!==`${EVE_PACKAGE_NAME}*`)}function collectExtensionExternalDependencies(e){return[e,...e.subagents.map(e=>e.agent)].flatMap(e=>e.extensionMounts.flatMap(e=>e.externalDependencies))}function collectConfiguredSandboxProviderNames(e){let t=[e,...e.subagents.map(e=>e.agent)];return new Set(t.map(e=>e.sandbox?.providerName).filter(e=>typeof e==`string`))}function shouldPruneLocalSandboxProviders(e){return e.preset===`vercel`&&![...e.configuredBackendNames].some(e=>LOCAL_SANDBOX_BACKEND_NAMES.has(e))}function createDevelopmentWatchOptions(e){return{ignored:[e,join(e,`**`)]}}function normalizePath(e){return e.replaceAll(`\\`,`/`)}function stripPathQueryAndHash(e){let t=e.indexOf(`?`),n=e.indexOf(`#`),r=t===-1?n:n===-1?t:Math.min(t,n);return r===-1?e:e.slice(0,r)}function stripFileSystemPrefix(e){return e.startsWith(`/@fs/`)?e.slice(4):e}function resolveNitroModuleComparisonPath(e,t){return t.startsWith(`file://`)?normalizePath(stripFileSystemPrefix(stripPathQueryAndHash(fileURLToPath(t)))):isAbsolute(t)?normalizePath(stripFileSystemPrefix(stripPathQueryAndHash(t))):normalizePath(stripFileSystemPrefix(stripPathQueryAndHash(resolve(e,t))))}function isWorkflowBundlePath(e,t){let n=normalizePath(e);return n.startsWith(t)||n.includes(`/.eve/workflow-cache/`)}function normalizeStepTransformComparisonPath(e){let t=normalizePath(e);return process.platform===`win32`?t.toLowerCase():t}function parseImportedModuleSpecifiers(e){let t=/^\s*import\s+(?:.+?\s+from\s+)?["']([^"']+)["'];?\s*$/gm,n=[];for(let r of e.matchAll(t)){let e=r[1];e!==void 0&&n.push(e)}return n}function resolveNitroImportPath(e,t,n){return t.startsWith(`workflow`)?resolveWorkflowModulePath(t):t.startsWith(`.`)||t.startsWith(`/`)||t.startsWith(`file://`)?resolveNitroModuleComparisonPath(n===void 0?e:dirname(resolveNitroModuleComparisonPath(e,n)),t):null}async function collectNitroStepTransformTargets(e,t){let n=await readFile(e,`utf8`),r=new Set;for(let i of parseImportedModuleSpecifiers(n)){let n=resolveNitroImportPath(t,i,e);n!==null&&r.add(normalizeStepTransformComparisonPath(n))}return r}async function addNitroStepNoExternals(e,t){if(e.options.noExternals===!0)return;let n;try{n=await collectNitroStepTransformTargets(t,e.options.rootDir)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}let r=Array.isArray(e.options.noExternals)?[...e.options.noExternals]:[];e.options.noExternals=[...new Set([...r,...n])]}function createRelativeTransformFilename(e,t){let n=createPackageRelativeTransformFilename(t);if(n!==void 0)return n;let r=normalizePath(e).replace(/\/$/,``),i=normalizePath(t),a=r.toLowerCase(),o=i.toLowerCase();if(o.startsWith(`${a}/`))return i.slice(r.length+1);if(o===a)return`.`;let s=relative(r,i).replaceAll(`\\`,`/`);if(s.startsWith(`../`)&&(s=s.split(`/`).filter(e=>e!==`..`).join(`/`)),s.includes(`:`)||s.startsWith(`/`)){let e=i.split(`/`).pop();return e===void 0||e.length===0?`unknown.ts`:e}return s}function createPackageRelativeTransformFilename(e){let t=normalizePath(resolvePackageRoot()).replace(/\/$/,``),n=normalizePath(e),r=t.toLowerCase(),i=n.toLowerCase(),a=`${t}/src/`,o=`${r}/src/`,s=`${t}/dist/src/`,c=`${r}/dist/src/`;if(i.startsWith(o))return`src/${n.slice(a.length)}`;if(i.startsWith(c))return`src/${n.slice(s.length)}`}function addWorkflowModuleSideEffectsPlugin(e,t){let n=[t,join(e.options.buildDir,`workflow`)].map(t=>resolveNitroModuleComparisonPath(e.options.rootDir,t));e.hooks.hook(`rollup:before`,(t,r)=>{Array.isArray(r.plugins)&&r.plugins.unshift({name:`eve:workflow-module-side-effects`,resolveId(t,r){let i=resolveNitroImportPath(e.options.rootDir,t,r)??resolveNitroModuleComparisonPath(e.options.rootDir,t);return n.some(e=>isWorkflowBundlePath(i,e))?{id:i,moduleSideEffects:`no-treeshake`}:null}})})}function addNitroStepModuleSideEffectsPlugin(e,t){e.hooks.hook(`rollup:before`,(n,r)=>{Array.isArray(r.plugins)&&r.plugins.unshift({name:`eve:workflow-step-module-side-effects`,async resolveId(n,r){let i=resolveNitroImportPath(e.options.rootDir,n,r);return i===null||!(await t()).has(normalizeStepTransformComparisonPath(i))?null:{id:i,moduleSideEffects:`no-treeshake`}}})})}function addNitroStepTransformPlugin(e,t){e.hooks.hook(`rollup:before`,(n,r)=>{Array.isArray(r.plugins)&&r.plugins.unshift({async transform(n,r){let i=await t(),a=resolveNitroModuleComparisonPath(e.options.rootDir,r);return i.has(normalizeStepTransformComparisonPath(a))?{code:(await applyWorkflowTransform(createRelativeTransformFilename(e.options.rootDir,a),n,`step`,a,e.options.rootDir)).code,map:null}:null},name:`eve:workflow-step-transform`})})}function addInstrumentationModuleSideEffectsPlugin(e,t){let n=new Set(t.map(normalizePath));e.hooks.hook(`rollup:before`,(e,t)=>{Array.isArray(t.plugins)&&t.plugins.unshift({name:`eve:instrumentation-module-side-effects`,resolveId(e){return n.has(normalizePath(e))?{id:e,moduleSideEffects:`no-treeshake`}:null}})})}function patchWorkflowTransformExcludePath(e,t){let n=normalizePath(t);e.hooks.hook(`rollup:before`,(e,t)=>{if(Array.isArray(t.plugins))for(let e of t.plugins){if(typeof e!=`object`||!e)continue;let t=e;if(t.name!==`workflow:transform`||t[WORKFLOW_TRANSFORM_PATCHED]===!0||typeof t.transform!=`function`)continue;let r=t.transform;t.transform=function(e,t,...i){return isWorkflowBundlePath(t,n)?null:r.call(this,e,t,...i)},t[WORKFLOW_TRANSFORM_PATCHED]=!0}})}function createApplicationNitroBundlerConfiguration(e,t){let{preset:n}=t,r=collectConfiguredSandboxProviderNames(e.compileResult.manifest),i=shouldPruneLocalSandboxProviders({configuredBackendNames:r,preset:n})?createCompiledSandboxProviderPrunePlugin():null,a=[],o=[];for(let[e,t]of Object.entries(OPTIONAL_ENGINE_PACKAGES_BY_BACKEND_NAME))(r.has(e)?a:o).push(t);let s=createExtensionScopePlugin([e.compileResult.manifest,...e.compileResult.manifest.subagents.map(e=>e.agent)].flatMap(e=>e.extensionMounts.map(e=>({sourceRoot:e.sourceRoot,packageNamespace:e.packageNamespace})))),c=[e.compileResult.manifest,...e.compileResult.manifest.subagents.map(e=>e.agent)].flatMap(e=>e.extensionMounts),l=[t.development?null:createDevelopmentRuntimePrunePlugin(),i,createOptionalEngineDependencyPlugin(o),createExtensionExternalDependencyPlugin(c),s].filter(e=>e!==null);return{nitroRolldownConfig:{tsconfig:resolveAuthoredTsConfigPath(e.appRoot)},nitroRollupConfig:createNitroBundlerConfig(l),tracedAppDependencies:collectHostedTraceDependencies(e,a),tracedAppDependencyPaths:resolveExtensionExternalDependencyPaths(c)}}function createApplicationNitroPlugins(e){let t=[e.compiledArtifacts.bootstrapPath,e.compiledArtifacts.workflowWorldPluginPath];return manifestHasWorkflowProgram(e.compileResult.manifest)&&t.push(resolvePackageSourceFilePath(`src/internal/nitro/host/workflow-sandbox-runtime-plugin.ts`)),e.compiledArtifacts.instrumentationPluginPath!==void 0&&t.push(e.compiledArtifacts.instrumentationPluginPath),t}function configureSharedApplicationNitro(e,t){t.compiledArtifacts.instrumentationPluginPath!==void 0&&configureInstrumentationEntry(e,t.compiledArtifacts.instrumentationPluginPath),addNitroRoutingImportSpecifierPlugin(e);let n=resolveWorkflowAliases();for(let[t,r]of Object.entries(n))e.options.alias[t]=r;for(let[t,n]of Object.entries(INSTRUMENTATION_ALIAS_PATHS))e.options.alias[t]=resolvePackageSourceFilePath(n);addWorkflowModuleSideEffectsPlugin(e,t.workflowBuildDir),patchWorkflowTransformExcludePath(e,t.workflowBuildDir),t.compiledArtifacts.instrumentationSourcePaths!==void 0&&addInstrumentationModuleSideEffectsPlugin(e,t.compiledArtifacts.instrumentationSourcePaths)}function configureNitroStepPlugins(e,t){let n,getTargets=()=>n??=collectNitroStepTransformTargets(t,e.options.rootDir),invalidate=()=>{n=void 0};return e.hooks.hook(`build:before`,invalidate),addNitroStepModuleSideEffectsPlugin(e,getTargets),addNitroStepTransformPlugin(e,getTargets),[invalidate]}function externalizeDevelopmentWorkflowBundle(e,t){let n=new Set([normalizePath(join(t.workflowBuildDir,`workflows.mjs`))]);e.hooks.hook(`rollup:before`,(e,t)=>{let r=t.external;t.external=(e,...t)=>{if(n.has(normalizePath(e)))return!0;if(typeof r==`function`)return r(e,...t)}})}async function createDevelopmentApplicationNitro(e){let t=e.workspace.nitroBuildDir,n=createApplicationNitroBundlerConfiguration(e,{development:!0,preset:void 0}),r=createApplicationNitroPlugins(e);e.compiledArtifacts.instrumentationPluginPath===void 0&&r.unshift(resolvePackageSourceFilePath(`src/internal/nitro/host/local-tracing-runtime-plugin.ts`)),await prepareEveVersionedCacheDirectory(t);let i=await createNitro({_cli:{command:`dev`},buildDir:t,dev:!0,features:{websocket:!0},logLevel:1,output:{dir:e.workspace.nitroOutputDir},plugins:r,publicAssets:[],scanDirs:[resolvePackageSourceDirectoryPath(`src/execution`)],rolldownConfig:n.nitroRolldownConfig,rollupConfig:n.nitroRollupConfig,rootDir:e.appRoot,serverDir:!1,traceDeps:n.tracedAppDependencies,traceOpts:{nft:{paths:n.tracedAppDependencyPaths}},vercel:createEveVercelOptions({agentName:e.compileResult.manifest.config.name,enabled:!1}),watchOptions:createDevelopmentWatchOptions(e.appRoot)},{watch:!0});await writeEveVersionedCacheMetadata(t);let a=join(i.options.buildDir,`workflow`,`steps.mjs`);configureSharedApplicationNitro(i,e);let o=configureNitroStepPlugins(i,a);return i.hooks.hook(`dev:reload`,()=>{for(let e of o)e()}),externalizeDevelopmentWorkflowBundle(i,e),await configureDevelopmentNitroRoutes(i,e),await addNitroStepNoExternals(i,a),i}async function createProductionApplicationNitro(e,t){let n=resolveProductionNitroPreset(),r=createApplicationNitroBundlerConfiguration(e,{development:!1,preset:n}),i=createApplicationNitroPlugins(e);i.push(resolvePackageSourceFilePath(`src/internal/nitro/host/sandbox-shutdown-plugin.ts`)),await prepareEveVersionedCacheDirectory(t.buildDir);let a=await createNitro({_cli:{command:`build`},buildDir:t.buildDir,dev:!1,features:{websocket:manifestHasWebSocketChannel(e.compileResult.manifest)},output:{dir:t.outputDir},preset:n,plugins:i,publicAssets:[],scanDirs:[resolvePackageSourceDirectoryPath(`src/execution`)],rolldownConfig:r.nitroRolldownConfig,rollupConfig:r.nitroRollupConfig,rootDir:e.appRoot,serverDir:!1,traceDeps:r.tracedAppDependencies,traceOpts:{nft:{paths:r.tracedAppDependencyPaths}},vercel:createEveVercelOptions({agentName:e.compileResult.manifest.config.name,enabled:n===`vercel`,publicRoutePrefix:t.publicRoutePrefix,workspaceMember:t.workspaceMember})});if(await writeEveVersionedCacheMetadata(t.buildDir),configureSharedApplicationNitro(a,e),configureNitroStepPlugins(a,join(e.workflowBuildDir,`steps.mjs`)),e.scheduleRegistrations.length>0){applyEveCronHandlerRoute(a);let t=createProductionNitroArtifactsConfig(e.appRoot);registerScheduleTaskHandlers(a,{artifactsConfig:t,dispatchModulePath:resolvePackageSourceFilePath(`src/internal/nitro/routes/schedule-task.ts`),registrations:e.scheduleRegistrations})}return await configureProductionNitroRoutes(a,e),await addNitroStepNoExternals(a,join(e.workflowBuildDir,`steps.mjs`)),a}export{createDevelopmentApplicationNitro,createProductionApplicationNitro,shouldPruneLocalSandboxProviders};
|
|
1
|
+
import{readFile}from"node:fs/promises";import{resolvePackageRoot,resolvePackageSourceDirectoryPath,resolvePackageSourceFilePath,resolveWorkflowModulePath}from"#internal/application/package.js";import{dirname,isAbsolute,join,relative,resolve}from"node:path";import{fileURLToPath}from"node:url";import{resolveAuthoredTsConfigPath}from"#internal/authored-module-loader.js";import{extensionOverridePaths}from"#compiler/extension-mount-bindings.js";import{EVE_PACKAGE_NAME}from"#internal/package-name.js";import{createExtensionMountPlugin}from"#internal/bundler/extension-mount-plugin.js";import{createExtensionScopePlugin}from"#internal/bundler/extension-scope-plugin.js";import{applyWorkflowTransform}from"#internal/workflow-bundle/workflow-builders.js";import{createExtensionExternalDependencyPlugin,resolveExtensionExternalDependencyPaths}from"#internal/nitro/host/extension-external-dependency-plugin.js";import{createNitro}from"nitro/builder";import{prepareEveVersionedCacheDirectory,writeEveVersionedCacheMetadata}from"#internal/application/cache-metadata.js";import{createProductionNitroArtifactsConfig}from"#internal/nitro/host/artifacts-config.js";import{configureInstrumentationEntry}from"#internal/nitro/host/instrumentation-entry.js";import{createCompiledSandboxProviderPrunePlugin}from"#internal/nitro/host/compiled-sandbox-provider-prune-plugin.js";import{createDevelopmentRuntimePrunePlugin}from"#internal/nitro/host/development-runtime-prune-plugin.js";import{configureDevelopmentNitroRoutes,configureProductionNitroRoutes}from"#internal/nitro/host/configure-nitro-routes.js";import{applyEveCronHandlerRoute}from"#internal/nitro/host/cron-handler-route.js";import{createNitroBundlerConfig}from"#internal/nitro/host/nitro-bundler-config.js";import{OPTIONAL_ENGINE_PACKAGES_BY_BACKEND_NAME,createOptionalEngineDependencyPlugin}from"#internal/nitro/host/optional-engine-dependency-plugin.js";import{addNitroRoutingImportSpecifierPlugin}from"#internal/nitro/host/nitro-routing-import-specifier-plugin.js";import{registerScheduleTaskHandlers}from"#internal/nitro/host/schedule-task-routes.js";import{createEveVercelOptions}from"#internal/nitro/host/vercel-build-output-config.js";const WORKFLOW_ALIAS_SPECIFIERS=[`workflow`,`workflow/api`,`workflow/errors`,`workflow/internal/builtins`,`workflow/internal/private`,`workflow/runtime`],INSTRUMENTATION_ALIAS_PATHS={"eve/instrumentation":`src/public/instrumentation/index.ts`,"eve/instrumentation/otel":`src/public/instrumentation/otel.ts`},WORKFLOW_TRANSFORM_PATCHED=Symbol(`eve.workflow-transform-patched`),LOCAL_SANDBOX_BACKEND_NAMES=new Set([`docker`,...Object.keys(OPTIONAL_ENGINE_PACKAGES_BY_BACKEND_NAME)]);function resolveWorkflowAliases(){let e={};for(let t of WORKFLOW_ALIAS_SPECIFIERS)e[t]=resolveWorkflowModulePath(t);return e}function resolveProductionNitroPreset(){return process.env.VERCEL?`vercel`:void 0}function manifestHasWorkflowProgram(e){return[e,...e.subagents.map(e=>e.agent)].some(e=>e.tools.some(e=>e.workflowProgram!==void 0))}function manifestHasWebSocketChannel(e){return e.channelRoutes.effective.some(e=>e.method===`WEBSOCKET`)}function collectHostedTraceDependencies(e,t){let n=new Set(collectExtensionExternalDependencies(e.compileResult.manifest)),r=[...e.compileResult.manifest.config.build?.externalDependencies??[],...e.compileResult.manifest.subagents.flatMap(e=>e.configResolver===void 0?e.agent.config.build?.externalDependencies??[]:e.configResolver.build?.externalDependencies??[])];return[...new Set([...t,...r,...[...n].map(e=>`${e}*`)])].filter(e=>e!==EVE_PACKAGE_NAME&&e!==`${EVE_PACKAGE_NAME}*`)}function collectExtensionExternalDependencies(e){return[e,...e.subagents.map(e=>e.agent)].flatMap(e=>e.extensionMounts.flatMap(e=>e.externalDependencies))}function collectConfiguredSandboxProviderNames(e){let t=[e,...e.subagents.map(e=>e.agent)];return new Set(t.map(e=>e.sandbox?.providerName).filter(e=>typeof e==`string`))}function shouldPruneLocalSandboxProviders(e){return e.preset===`vercel`&&![...e.configuredBackendNames].some(e=>LOCAL_SANDBOX_BACKEND_NAMES.has(e))}function createDevelopmentWatchOptions(e){return{ignored:[e,join(e,`**`)]}}function normalizePath(e){return e.replaceAll(`\\`,`/`)}function stripPathQueryAndHash(e){let t=e.indexOf(`?`),n=e.indexOf(`#`),r=t===-1?n:n===-1?t:Math.min(t,n);return r===-1?e:e.slice(0,r)}function stripFileSystemPrefix(e){return e.startsWith(`/@fs/`)?e.slice(4):e}function resolveNitroModuleComparisonPath(e,t){return t.startsWith(`file://`)?normalizePath(stripFileSystemPrefix(stripPathQueryAndHash(fileURLToPath(t)))):isAbsolute(t)?normalizePath(stripFileSystemPrefix(stripPathQueryAndHash(t))):normalizePath(stripFileSystemPrefix(stripPathQueryAndHash(resolve(e,t))))}function isWorkflowBundlePath(e,t){let n=normalizePath(e);return n.startsWith(t)||n.includes(`/.eve/workflow-cache/`)}function normalizeStepTransformComparisonPath(e){let t=normalizePath(e);return process.platform===`win32`?t.toLowerCase():t}function parseImportedModuleSpecifiers(e){let t=/^\s*import\s+(?:.+?\s+from\s+)?["']([^"']+)["'];?\s*$/gm,n=[];for(let r of e.matchAll(t)){let e=r[1];e!==void 0&&n.push(e)}return n}function resolveNitroImportPath(e,t,n){return t.startsWith(`workflow`)?resolveWorkflowModulePath(t):t.startsWith(`.`)||t.startsWith(`/`)||t.startsWith(`file://`)?resolveNitroModuleComparisonPath(n===void 0?e:dirname(resolveNitroModuleComparisonPath(e,n)),t):null}async function collectNitroStepTransformTargets(e,t){let n=await readFile(e,`utf8`),r=new Set;for(let i of parseImportedModuleSpecifiers(n)){let n=resolveNitroImportPath(t,i,e);n!==null&&r.add(normalizeStepTransformComparisonPath(n))}return r}async function addNitroStepNoExternals(e,t){if(e.options.noExternals===!0)return;let n;try{n=await collectNitroStepTransformTargets(t,e.options.rootDir)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}let r=Array.isArray(e.options.noExternals)?[...e.options.noExternals]:[];e.options.noExternals=[...new Set([...r,...n])]}function createRelativeTransformFilename(e,t){let n=createPackageRelativeTransformFilename(t);if(n!==void 0)return n;let r=normalizePath(e).replace(/\/$/,``),i=normalizePath(t),a=r.toLowerCase(),o=i.toLowerCase();if(o.startsWith(`${a}/`))return i.slice(r.length+1);if(o===a)return`.`;let s=relative(r,i).replaceAll(`\\`,`/`);if(s.startsWith(`../`)&&(s=s.split(`/`).filter(e=>e!==`..`).join(`/`)),s.includes(`:`)||s.startsWith(`/`)){let e=i.split(`/`).pop();return e===void 0||e.length===0?`unknown.ts`:e}return s}function createPackageRelativeTransformFilename(e){let t=normalizePath(resolvePackageRoot()).replace(/\/$/,``),n=normalizePath(e),r=t.toLowerCase(),i=n.toLowerCase(),a=`${t}/src/`,o=`${r}/src/`,s=`${t}/dist/src/`,c=`${r}/dist/src/`;if(i.startsWith(o))return`src/${n.slice(a.length)}`;if(i.startsWith(c))return`src/${n.slice(s.length)}`}function addWorkflowModuleSideEffectsPlugin(e,t){let n=[t,join(e.options.buildDir,`workflow`)].map(t=>resolveNitroModuleComparisonPath(e.options.rootDir,t));e.hooks.hook(`rollup:before`,(t,r)=>{Array.isArray(r.plugins)&&r.plugins.unshift({name:`eve:workflow-module-side-effects`,resolveId(t,r){let i=resolveNitroImportPath(e.options.rootDir,t,r)??resolveNitroModuleComparisonPath(e.options.rootDir,t);return n.some(e=>isWorkflowBundlePath(i,e))?{id:i,moduleSideEffects:`no-treeshake`}:null}})})}function addNitroStepModuleSideEffectsPlugin(e,t){e.hooks.hook(`rollup:before`,(n,r)=>{Array.isArray(r.plugins)&&r.plugins.unshift({name:`eve:workflow-step-module-side-effects`,async resolveId(n,r){let i=resolveNitroImportPath(e.options.rootDir,n,r);return i===null||!(await t()).has(normalizeStepTransformComparisonPath(i))?null:{id:i,moduleSideEffects:`no-treeshake`}}})})}function addNitroStepTransformPlugin(e,t){e.hooks.hook(`rollup:before`,(n,r)=>{Array.isArray(r.plugins)&&r.plugins.unshift({async transform(n,r){let i=await t(),a=resolveNitroModuleComparisonPath(e.options.rootDir,r);return i.has(normalizeStepTransformComparisonPath(a))?{code:(await applyWorkflowTransform(createRelativeTransformFilename(e.options.rootDir,a),n,`step`,a,e.options.rootDir)).code,map:null}:null},name:`eve:workflow-step-transform`})})}function addInstrumentationModuleSideEffectsPlugin(e,t){let n=new Set(t.map(normalizePath));e.hooks.hook(`rollup:before`,(e,t)=>{Array.isArray(t.plugins)&&t.plugins.unshift({name:`eve:instrumentation-module-side-effects`,resolveId(e){return n.has(normalizePath(e))?{id:e,moduleSideEffects:`no-treeshake`}:null}})})}function patchWorkflowTransformExcludePath(e,t){let n=normalizePath(t);e.hooks.hook(`rollup:before`,(e,t)=>{if(Array.isArray(t.plugins))for(let e of t.plugins){if(typeof e!=`object`||!e)continue;let t=e;if(t.name!==`workflow:transform`||t[WORKFLOW_TRANSFORM_PATCHED]===!0||typeof t.transform!=`function`)continue;let r=t.transform;t.transform=function(e,t,...i){return isWorkflowBundlePath(t,n)?null:r.call(this,e,t,...i)},t[WORKFLOW_TRANSFORM_PATCHED]=!0}})}function createApplicationNitroBundlerConfiguration(e,t){let{preset:n}=t,r=collectConfiguredSandboxProviderNames(e.compileResult.manifest),i=shouldPruneLocalSandboxProviders({configuredBackendNames:r,preset:n})?createCompiledSandboxProviderPrunePlugin():null,a=[],o=[];for(let[e,t]of Object.entries(OPTIONAL_ENGINE_PACKAGES_BY_BACKEND_NAME))(r.has(e)?a:o).push(t);let s=createExtensionScopePlugin([e.compileResult.manifest,...e.compileResult.manifest.subagents.map(e=>e.agent)].flatMap(e=>e.extensionMounts.map(e=>({sourceRoot:e.sourceRoot,mountId:e.mountId})))),c=[e.compileResult.manifest,...e.compileResult.manifest.subagents.map(e=>e.agent)].flatMap(e=>e.extensionMounts),l=[t.development?null:createDevelopmentRuntimePrunePlugin(),i,createOptionalEngineDependencyPlugin(o),createExtensionExternalDependencyPlugin(c),createExtensionMountPlugin(c,extensionOverridePaths(e.compileResult.manifest)),s].filter(e=>e!==null);return{nitroRolldownConfig:{tsconfig:resolveAuthoredTsConfigPath(e.appRoot)},nitroRollupConfig:createNitroBundlerConfig(l),tracedAppDependencies:collectHostedTraceDependencies(e,a),tracedAppDependencyPaths:resolveExtensionExternalDependencyPaths(c)}}function createApplicationNitroPlugins(e){let t=[e.compiledArtifacts.bootstrapPath,e.compiledArtifacts.workflowWorldPluginPath];return manifestHasWorkflowProgram(e.compileResult.manifest)&&t.push(resolvePackageSourceFilePath(`src/internal/nitro/host/workflow-sandbox-runtime-plugin.ts`)),e.compiledArtifacts.instrumentationPluginPath!==void 0&&t.push(e.compiledArtifacts.instrumentationPluginPath),t}function configureSharedApplicationNitro(e,t){t.compiledArtifacts.instrumentationPluginPath!==void 0&&configureInstrumentationEntry(e,t.compiledArtifacts.instrumentationPluginPath),addNitroRoutingImportSpecifierPlugin(e);let n=resolveWorkflowAliases();for(let[t,r]of Object.entries(n))e.options.alias[t]=r;for(let[t,n]of Object.entries(INSTRUMENTATION_ALIAS_PATHS))e.options.alias[t]=resolvePackageSourceFilePath(n);addWorkflowModuleSideEffectsPlugin(e,t.workflowBuildDir),patchWorkflowTransformExcludePath(e,t.workflowBuildDir),t.compiledArtifacts.instrumentationSourcePaths!==void 0&&addInstrumentationModuleSideEffectsPlugin(e,t.compiledArtifacts.instrumentationSourcePaths)}function configureNitroStepPlugins(e,t){let n,getTargets=()=>n??=collectNitroStepTransformTargets(t,e.options.rootDir),invalidate=()=>{n=void 0};return e.hooks.hook(`build:before`,invalidate),addNitroStepModuleSideEffectsPlugin(e,getTargets),addNitroStepTransformPlugin(e,getTargets),[invalidate]}function externalizeDevelopmentWorkflowBundle(e,t){let n=new Set([normalizePath(join(t.workflowBuildDir,`workflows.mjs`))]);e.hooks.hook(`rollup:before`,(e,t)=>{let r=t.external;t.external=(e,...t)=>{if(n.has(normalizePath(e)))return!0;if(typeof r==`function`)return r(e,...t)}})}async function createDevelopmentApplicationNitro(e){let t=e.workspace.nitroBuildDir,n=createApplicationNitroBundlerConfiguration(e,{development:!0,preset:void 0}),r=createApplicationNitroPlugins(e);e.compiledArtifacts.instrumentationPluginPath===void 0&&r.unshift(resolvePackageSourceFilePath(`src/internal/nitro/host/local-tracing-runtime-plugin.ts`)),await prepareEveVersionedCacheDirectory(t);let i=await createNitro({_cli:{command:`dev`},buildDir:t,dev:!0,features:{websocket:!0},logLevel:1,output:{dir:e.workspace.nitroOutputDir},plugins:r,publicAssets:[],scanDirs:[resolvePackageSourceDirectoryPath(`src/execution`)],rolldownConfig:n.nitroRolldownConfig,rollupConfig:n.nitroRollupConfig,rootDir:e.appRoot,serverDir:!1,traceDeps:n.tracedAppDependencies,traceOpts:{nft:{paths:n.tracedAppDependencyPaths}},vercel:createEveVercelOptions({agentName:e.compileResult.manifest.config.name,enabled:!1}),watchOptions:createDevelopmentWatchOptions(e.appRoot)},{watch:!0});await writeEveVersionedCacheMetadata(t);let a=join(i.options.buildDir,`workflow`,`steps.mjs`);configureSharedApplicationNitro(i,e);let o=configureNitroStepPlugins(i,a);return i.hooks.hook(`dev:reload`,()=>{for(let e of o)e()}),externalizeDevelopmentWorkflowBundle(i,e),await configureDevelopmentNitroRoutes(i,e),await addNitroStepNoExternals(i,a),i}async function createProductionApplicationNitro(e,t){let n=resolveProductionNitroPreset(),r=createApplicationNitroBundlerConfiguration(e,{development:!1,preset:n}),i=createApplicationNitroPlugins(e);i.push(resolvePackageSourceFilePath(`src/internal/nitro/host/sandbox-shutdown-plugin.ts`)),await prepareEveVersionedCacheDirectory(t.buildDir);let a=await createNitro({_cli:{command:`build`},buildDir:t.buildDir,dev:!1,features:{websocket:manifestHasWebSocketChannel(e.compileResult.manifest)},output:{dir:t.outputDir},preset:n,plugins:i,publicAssets:[],scanDirs:[resolvePackageSourceDirectoryPath(`src/execution`)],rolldownConfig:r.nitroRolldownConfig,rollupConfig:r.nitroRollupConfig,rootDir:e.appRoot,serverDir:!1,traceDeps:r.tracedAppDependencies,traceOpts:{nft:{paths:r.tracedAppDependencyPaths}},vercel:createEveVercelOptions({agentName:e.compileResult.manifest.config.name,enabled:n===`vercel`,publicRoutePrefix:t.publicRoutePrefix,workspaceMember:t.workspaceMember})});if(await writeEveVersionedCacheMetadata(t.buildDir),configureSharedApplicationNitro(a,e),configureNitroStepPlugins(a,join(e.workflowBuildDir,`steps.mjs`)),e.scheduleRegistrations.length>0){applyEveCronHandlerRoute(a);let t=createProductionNitroArtifactsConfig(e.appRoot);registerScheduleTaskHandlers(a,{artifactsConfig:t,dispatchModulePath:resolvePackageSourceFilePath(`src/internal/nitro/routes/schedule-task.ts`),registrations:e.scheduleRegistrations})}return await configureProductionNitroRoutes(a,e),await addNitroStepNoExternals(a,join(e.workflowBuildDir,`steps.mjs`)),a}export{createDevelopmentApplicationNitro,createProductionApplicationNitro,shouldPruneLocalSandboxProviders};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createHash}from"node:crypto";import{readFile}from"node:fs/promises";import{readDevelopmentEnvironmentHostValues}from"#cli/dev/environment.js";import{computeChannelRouteRegistrations}from"#internal/nitro/host/channel-routes.js";async function computeDevelopmentHostFingerprint(e){let t=e.compileResult.manifest,n=[t,...t.subagents.map(e=>e.agent)],r={agentName:t.config.name,bundler:{externalDependencies:[...new Set([...t.config.build?.externalDependencies??[],...t.subagents.flatMap(e=>e.configResolver===void 0?e.agent.config.build?.externalDependencies??[]:e.configResolver.build?.externalDependencies??[])])].sort((e,t)=>e.localeCompare(t)),extensionScopes:n.flatMap(e=>e.extensionMounts).map(e=>({
|
|
1
|
+
import{createHash}from"node:crypto";import{readFile}from"node:fs/promises";import{readDevelopmentEnvironmentHostValues}from"#cli/dev/environment.js";import{computeChannelRouteRegistrations}from"#internal/nitro/host/channel-routes.js";async function computeDevelopmentHostFingerprint(e){let t=e.compileResult.manifest,n=[t,...t.subagents.map(e=>e.agent)],r={agentName:t.config.name,bundler:{externalDependencies:[...new Set([...t.config.build?.externalDependencies??[],...t.subagents.flatMap(e=>e.configResolver===void 0?e.agent.config.build?.externalDependencies??[]:e.configResolver.build?.externalDependencies??[])])].sort((e,t)=>e.localeCompare(t)),extensionScopes:n.flatMap(e=>e.extensionMounts).map(e=>({mountId:e.mountId,sourceRoot:e.sourceRoot})).sort((e,t)=>e.mountId.localeCompare(t.mountId)),sandboxProviders:[...new Set(n.map(e=>e.sandbox?.providerName).filter(e=>e!==void 0))].sort((e,t)=>e.localeCompare(t))},channels:computeChannelRouteRegistrations(e),environment:readDevelopmentEnvironmentHostValues(e.appRoot),instrumentation:await readInstrumentationSource(e),workflow:{authoredSources:e.generation.workflowSourceFingerprint??null,enabled:n.some(e=>e.tools.some(e=>e.workflowProgram!==void 0)),world:t.config.experimental?.workflow?.world??`local`}};return createHash(`sha256`).update(JSON.stringify(r)).digest(`hex`)}async function readInstrumentationSource(e){let t=e.compiledArtifacts.instrumentationSourcePaths,n=e.compiledArtifacts.instrumentationLayout;if(t===void 0||n===void 0)return null;let r=await Promise.all(t.map(async e=>await readFile(e,`utf8`)));return{kind:n.kind,modules:r.map((e,t)=>({slot:n.slots[t],source:e}))}}export{computeDevelopmentHostFingerprint};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{join}from"node:path";import{loadAuthoredModuleNamespace}from"#internal/authored-module-loader.js";import{createCompiledBindingNamespaceLoader}from"#compiler/load-binding-namespace.js";import{compileInstructionsEntry}from"#compiler/normalize-instructions.js";import{compileSkillSource}from"#compiler/normalize-skill.js";import{compileToolEntry}from"#compiler/normalize-tool.js";import{EXTENSION_CAPABILITY_VERSIONS}from"#compiler/extension-compatibility.js";import{extensionUsesState}from"#internal/nitro/host/extension-state-usage.js";async function deriveExtensionCapabilityRequirements(e){let t=new Set([`extension`]),n=collectSubagentManifests(e.manifest),[r,i,a,o,s]=await Promise.all([Promise.all(n.flatMap(t=>t.tools.map(n=>compileToolEntry(t.agentRoot,n,createLoadOptions(e,n,t.agentRoot))))),Promise.all(n.flatMap(t=>t.skills.map(n=>compileSkillSource(t.agentRoot,n,createLoadOptions(e,n,t.agentRoot))))),Promise.all(n.flatMap(t=>t.instructions.map(n=>compileInstructionsEntry(t.agentRoot,n,createLoadOptions(e,n,t.agentRoot))))),loadAuthoredModuleNamespace(join(e.sourceRoot,e.declarationModule.logicalPath),{externalDependencies:e.runtimeDependencies}),extensionUsesState(e.runtimeRoot)]);r.length>0&&t.add(`tool`),r.some(e=>e.kind===`dynamic-tool`)&&t.add(`dynamicTool`),n.some(e=>e.channels.length>0)&&t.add(`channel`),n.some(e=>e.connections.length>0)&&t.add(`connection`),n.some(e=>e.hooks.length>0)&&t.add(`hook`),n.some(e=>e.schedules.length>0)&&t.add(`schedule`),n.some(e=>e.subagents.length>0)&&t.add(`subagent`),i.length>0&&t.add(`skill`),i.some(e=>e.kind===`dynamic-skill`)&&t.add(`dynamicSkill`),a.length>0&&t.add(`instructions`),a.some(e=>e.kind===`dynamic-instructions`)&&t.add(`dynamicInstructions`);let c=o[e.declarationModule.exportName??`default`];return(typeof c==`function`||typeof c==`object`&&c)&&`schema`in c&&c.schema!==void 0&&t.add(`config`),s&&t.add(`state`),e.runtimeImports.includes(`eve/ai`)&&t.add(`tool`),e.runtimeImports.includes(`eve/models`)&&t.add(`dynamicTool`),Object.fromEntries(Object.keys(EXTENSION_CAPABILITY_VERSIONS).filter(e=>t.has(e)).map(e=>[e,EXTENSION_CAPABILITY_VERSIONS[e]]))}function createLoadOptions(e,t,n){let r={kind:`extension`,namespace:e.shortName,packageName:e.packageName},i={backing:{externalDependencies:e.runtimeDependencies,extensionScope:{namespace:e.shortName,sourceRoot:e.sourceRoot},kind:`filesystem`,sourcePath:join(n,t.logicalPath)},logicalPath:t.logicalPath,owner:r};return{binding:i,loadNamespace:createCompiledBindingNamespaceLoader({bindings:{[t.sourceId]:i},registries:[]}),owner:r}}function collectSubagentManifests(e){return[e,...e.subagents.flatMap(e=>collectSubagentManifests(e.manifest))]}export{deriveExtensionCapabilityRequirements};
|
|
1
|
+
import{join}from"node:path";import{extensionMountId}from"#compiler/source-graph.js";import{loadAuthoredModuleNamespace}from"#internal/authored-module-loader.js";import{createCompiledBindingNamespaceLoader}from"#compiler/load-binding-namespace.js";import{compileInstructionsEntry}from"#compiler/normalize-instructions.js";import{compileSkillSource}from"#compiler/normalize-skill.js";import{compileToolEntry}from"#compiler/normalize-tool.js";import{EXTENSION_CAPABILITY_VERSIONS}from"#compiler/extension-compatibility.js";import{extensionUsesState}from"#internal/nitro/host/extension-state-usage.js";async function deriveExtensionCapabilityRequirements(e){let t=new Set([`extension`]),n=collectSubagentManifests(e.manifest),[r,i,a,o,s]=await Promise.all([Promise.all(n.flatMap(t=>t.tools.map(n=>compileToolEntry(t.agentRoot,n,createLoadOptions(e,n,t.agentRoot))))),Promise.all(n.flatMap(t=>t.skills.map(n=>compileSkillSource(t.agentRoot,n,createLoadOptions(e,n,t.agentRoot))))),Promise.all(n.flatMap(t=>t.instructions.map(n=>compileInstructionsEntry(t.agentRoot,n,createLoadOptions(e,n,t.agentRoot))))),loadAuthoredModuleNamespace(join(e.sourceRoot,e.declarationModule.logicalPath),{externalDependencies:e.runtimeDependencies}),extensionUsesState(e.runtimeRoot)]);r.length>0&&t.add(`tool`),r.some(e=>e.kind===`dynamic-tool`)&&t.add(`dynamicTool`),n.some(e=>e.channels.length>0)&&t.add(`channel`),n.some(e=>e.connections.length>0)&&t.add(`connection`),n.some(e=>e.hooks.length>0)&&t.add(`hook`),n.some(e=>e.schedules.length>0)&&t.add(`schedule`),n.some(e=>e.subagents.length>0)&&t.add(`subagent`),i.length>0&&t.add(`skill`),i.some(e=>e.kind===`dynamic-skill`)&&t.add(`dynamicSkill`),a.length>0&&t.add(`instructions`),a.some(e=>e.kind===`dynamic-instructions`)&&t.add(`dynamicInstructions`);let c=o[e.declarationModule.exportName??`default`];return(typeof c==`function`||typeof c==`object`&&c)&&`schema`in c&&c.schema!==void 0&&t.add(`config`),s&&t.add(`state`),e.runtimeImports.includes(`eve/ai`)&&t.add(`tool`),e.runtimeImports.includes(`eve/models`)&&t.add(`dynamicTool`),Object.fromEntries(Object.keys(EXTENSION_CAPABILITY_VERSIONS).filter(e=>t.has(e)).map(e=>[e,EXTENSION_CAPABILITY_VERSIONS[e]]))}function createLoadOptions(e,t,n){let r={kind:`extension`,mountId:extensionMountId(``,e.shortName),namespace:e.shortName,packageName:e.packageName},i={backing:{externalDependencies:e.runtimeDependencies,extensionScope:{namespace:e.shortName,sourceRoot:e.sourceRoot},kind:`filesystem`,sourcePath:join(n,t.logicalPath)},logicalPath:t.logicalPath,owner:r};return{binding:i,loadNamespace:createCompiledBindingNamespaceLoader({bindings:{[t.sourceId]:i},registries:[]}),owner:r}}function collectSubagentManifests(e){return[e,...e.subagents.flatMap(e=>collectSubagentManifests(e.manifest))]}export{deriveExtensionCapabilityRequirements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readdir,realpath,stat}from"node:fs/promises";import{resolveDiscoveryProject}from"#discover/project.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{basename,dirname,join,resolve,sep}from"node:path";import{buildExtensionPackage,tryReadExtensionBuildConfig}from"#internal/nitro/host/build-extension.js";import{withExtensionBuildLock}from"#internal/nitro/host/extension-build-lock.js";import{toErrorMessage}from"#shared/errors.js";import{
|
|
1
|
+
import{readdir,realpath,stat}from"node:fs/promises";import{resolveDiscoveryProject}from"#discover/project.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{basename,dirname,join,resolve,sep}from"node:path";import{buildExtensionPackage,tryReadExtensionBuildConfig}from"#internal/nitro/host/build-extension.js";import{withExtensionBuildLock}from"#internal/nitro/host/extension-build-lock.js";import{toErrorMessage}from"#shared/errors.js";import{discoverExtensionMountDeclarations}from"#discover/discover-agent.js";import{createDiskProjectSource}from"#discover/project-source.js";import{locateExtensionMountPackage}from"#discover/extensions.js";import{EXTENSION_COMPATIBILITY_MANIFEST_FILENAME,readExtensionCompatibilityManifest}from"#compiler/extension-compatibility.js";import{isAuthoredSourcePath,resolveDevelopmentSourceRoot}from"#internal/nitro/dev-runtime-source-snapshot.js";import{resolveTsConfigDependencyPaths}from"#internal/application/tsconfig-dependencies.js";async function prepareDevelopmentWorkspaceExtensions(e){let t=await discoverWorkspaceExtensions(e.appRoot),n=new Map(e.previousExtensions?.map(e=>[e.packageRoot,e])),r=e.changedPaths===void 0?void 0:await Promise.all(e.changedPaths.map(async e=>await toCanonicalPath(e))),i=e.previousExtensions===void 0||r?.length===0;return await Promise.all(t.map(async e=>{let t=n.get(e.packageRoot);(i===!0||t===void 0||!sameBuildInputs(t,e)||r?.some(t=>affectsExtensionBuild(t,e))===!0)&&await withExtensionBuildLock(e.packageRoot,async()=>{await buildExtensionPackage(e.packageRoot,e.config)})})),t}async function buildWorkspaceExtensions(e){let t=await discoverWorkspaceExtensions(e);await Promise.all(t.map(async e=>{if(!await isExtensionDistributionCurrent(e))try{await withExtensionBuildLock(e.packageRoot,async()=>{await isExtensionDistributionCurrent(e)||await buildExtensionPackage(e.packageRoot,e.config)})}catch(t){throw Error(`Failed to build workspace extension "${e.config.packageName}" at ${e.packageRoot}. Fix the error below, then rebuild the agent, or run \`eve extension build\` in that package directory to build it on its own.\n${toErrorMessage(t)}`)}}))}async function discoverWorkspaceExtensions(e){let t=resolve(e),n=await resolveDiscoveryProject(t),r=createDiskProjectSource(),i=await discoverExtensionMountGraph({agentRoot:n.agentRoot,source:r}),a=await toCanonicalPath(resolveDevelopmentSourceRoot(t)),o=new Map;for(let e of i){let n=await resolveWorkspaceExtension({appRoot:t,agentRoot:e.agentRoot,mount:e.mount,source:r,workspaceSourceRoot:a});n!==void 0&&o.set(n.packageRoot,n)}return[...o.values()].sort((e,t)=>e.packageRoot.localeCompare(t.packageRoot))}async function isExtensionDistributionCurrent(e){let t=join(e.config.distRoot,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME),n;try{if((await readExtensionCompatibilityManifest(t)).builtWithEve!==resolveInstalledPackageInfo().version)return!1;n=(await stat(t)).mtimeMs}catch{return!1}let r=await readdir(e.config.sourceRoot,{recursive:!0}),i=[e.config.sourceRoot,...r.map(t=>join(e.config.sourceRoot,t)),...e.buildConfigPaths];return(await Promise.all(i.map(async e=>(await stat(e).catch(()=>void 0))?.mtimeMs??0))).every(e=>e<=n)}async function discoverExtensionMountGraph(e){let t=(await discoverExtensionMountDeclarations(e)).mounts.map(t=>({agentRoot:e.agentRoot,mount:t})),n=join(e.agentRoot,`subagents`);if(await e.source.stat(n)!==`directory`)return t;let r=await e.source.readDirectory(n),i=await Promise.all(r.filter(e=>e.isDirectory()).map(async t=>await discoverExtensionMountGraph({agentRoot:join(n,t.name),source:e.source})));return[...t,...i.flat()]}async function resolveWorkspaceExtension(e){let t=(await locateExtensionMountPackage({source:e.source,agentRoot:e.agentRoot,appRoot:e.appRoot,mount:e.mount.mountRef,namespace:e.mount.namespace})).location;if(t?.authoredSourceRoot===void 0)return;let n=await realpath(t.packageRoot).catch(()=>void 0);if(n===void 0||!isAuthoredSourcePath(n,e.workspaceSourceRoot)||(await stat(t.authoredSourceRoot).catch(()=>void 0))?.isDirectory()!==!0)return;let r=await tryReadExtensionBuildConfig(n);if(r===null)return;let i=[join(n,`package.json`),join(n,`tsconfig.json`),...await resolveTsConfigDependencyPaths(n)];return{config:r,packageRoot:n,buildConfigPaths:[...new Set(i.map(e=>resolve(e)))].sort((e,t)=>e.localeCompare(t))}}function affectsExtensionBuild(e,t){return isPathInsideOrEqual(e,t.config.sourceRoot)||t.buildConfigPaths.includes(e)}function sameBuildConfig(e,t){return e.sourceRoot===t.sourceRoot&&e.distRoot===t.distRoot&&e.outDir===t.outDir&&e.packageName===t.packageName&&e.shortName===t.shortName&&e.runtimeDependencies.length===t.runtimeDependencies.length&&e.runtimeDependencies.every((e,n)=>e===t.runtimeDependencies[n])}function sameBuildInputs(e,t){return sameBuildConfig(e.config,t.config)&&e.buildConfigPaths.length===t.buildConfigPaths.length&&e.buildConfigPaths.every((e,n)=>e===t.buildConfigPaths[n])}function isPathInsideOrEqual(e,t){let n=resolve(e),r=resolve(t);return n===r||n.startsWith(`${r}${sep}`)}async function toCanonicalPath(e){let t=resolve(e),n=[];for(;;)try{return join(await realpath(t),...n.reverse())}catch{let r=dirname(t);if(r===t)return resolve(e);n.push(basename(t)),t=r}}export{buildWorkspaceExtensions,prepareDevelopmentWorkspaceExtensions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createWorkflowRuntime}from"#execution/workflow-runtime.js";import{
|
|
1
|
+
import{createWorkflowRuntime}from"#execution/workflow-runtime.js";import{getCompiledRuntimeAgentBundle}from"#runtime/sessions/compiled-agent-cache.js";import{resolveRemoteAgentStreamHeaders}from"#execution/agent-sessions/remote.js";import{resolveNitroCompiledArtifactsSource}from"#internal/nitro/routes/runtime-artifacts.js";async function resolveNitroChannelRuntimeBundle(e){let t=resolveNitroCompiledArtifactsSource(e),n=await getCompiledRuntimeAgentBundle({compiledArtifactsSource:t}),r=createWorkflowRuntime({compiledArtifactsSource:t});return{agentName:n.resolvedAgent.config?.name??`eve`,channels:n.graph.root.channels,resolveRemoteAgentStreamHeaders:async e=>await resolveRemoteAgentStreamHeaders({bundle:n,...e}),runtime:r}}export{resolveNitroChannelRuntimeBundle};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
const BANNER_LINES=[{importLine:`import { fileURLToPath as __eveFileURLToPath } from "node:url";`,declarationLine:`const __filename = __eveFileURLToPath(import.meta.url);`,bindingName:`__filename`},{importLine:`import { dirname as __eveDirname } from "node:path";`,declarationLine:`const __dirname = __eveDirname(__filename);`,bindingName:`__dirname`}],FILENAME_BANNER_LINE=BANNER_LINES[0],DIRNAME_BANNER_LINE=BANNER_LINES[1],REQUIRE_LINE={importLine:`import { createRequire as __eveCreateRequire } from "node:module";`,declarationLine:`const require = __eveCreateRequire(import.meta.url);`,bindingName:`require`};function buildNodeEsmCompatBanner(e,t={}){let n=[...BANNER_LINES];t.includeRequire===!0&&n.push(REQUIRE_LINE);let r=[],i=[],a=collectTopLevelVariableBindings(e),o=a.has(FILENAME_BANNER_LINE.bindingName),s=a.has(DIRNAME_BANNER_LINE.bindingName);for(let e of n)a.has(e.bindingName)||(r.push(e.importLine),i.push(e===DIRNAME_BANNER_LINE&&o?`const __dirname = __eveDirname(__eveFileURLToPath(import.meta.url));`:e.declarationLine));return o&&!s&&r.unshift(FILENAME_BANNER_LINE.importLine),i.length===0?``:[...r,...i].join(`
|
|
2
2
|
`)}function collectTopLevelVariableBindings(e){let t=new Set;for(let n of e.body)if(n.type===`VariableDeclaration`)for(let e of n.declarations??[])e.id.type===`Identifier`&&e.id.name!==void 0&&t.add(e.id.name);return t}function createNodeEsmCompatBannerPlugin(e={}){return{name:`eve-node-esm-compat-banner`,renderChunk(t,n){let r=buildNodeEsmCompatBanner(mayDeclareCompatibilityBinding(t,e)?this.parse(t):{body:[]},e);return r===``?null:{code:`${r}\n${t}`,map:createPrependedLineSourceMap({insertedLineCount:r.split(`
|
|
3
|
-
`).length,source:n?.fileName??`eve-node-esm-compat-banner-input`,sourceContent:t})}}}}const DECLARATION_TRIVIA=String.raw`(?:\s|/\*[
|
|
3
|
+
`).length,source:n?.fileName??`eve-node-esm-compat-banner-input`,sourceContent:t})}}}}const DECLARATION_TRIVIA=String.raw`(?:\s|/\*(?:[^*]|\*(?!/))*\*/|//[^\r\n\u2028\u2029]*[\r\n\u2028\u2029])*`,DECLARATION_START=String.raw`(?:(?<![\w$"'\x60])(?:var|let|const|using)\b|,)${DECLARATION_TRIVIA}`,PATH_BINDING_DECLARATION=new RegExp(String.raw`${DECLARATION_START}(?:__filename|__dirname)\b`),REQUIRE_BINDING_DECLARATION=new RegExp(String.raw`${DECLARATION_START}require\b`),IDENTIFIER_ESCAPE=String.raw`\\u(?:[\da-fA-F]{4}|\{[\da-fA-F]+\})`,ESCAPED_IDENTIFIER_DECLARATION=new RegExp(String.raw`${DECLARATION_START}([\w$]*(?:${IDENTIFIER_ESCAPE}[\w$]*)+)`,`g`),IDENTIFIER_ESCAPE_PATTERN=new RegExp(IDENTIFIER_ESCAPE,`g`);function mayDeclareCompatibilityBinding(e,t){return PATH_BINDING_DECLARATION.test(e)||t.includeRequire===!0&&REQUIRE_BINDING_DECLARATION.test(e)||declaresEscapedCompatibilityBinding(e,t)}function declaresEscapedCompatibilityBinding(e,t){if(!e.includes(`\\u`))return!1;for(let n of e.matchAll(ESCAPED_IDENTIFIER_DECLARATION)){let e=n[1].replace(IDENTIFIER_ESCAPE_PATTERN,e=>{let t=Number.parseInt(e.slice(2).replace(/[{}]/g,``),16);return t<=1114111?String.fromCodePoint(t):`�`});if(e===FILENAME_BANNER_LINE.bindingName||e===DIRNAME_BANNER_LINE.bindingName||t.includeRequire===!0&&e===REQUIRE_LINE.bindingName)return!0}return!1}function createPrependedLineSourceMap({insertedLineCount:e,source:t,sourceContent:n}){let r=n.split(`
|
|
4
4
|
`).length;return{version:3,sources:[t],sourcesContent:[n],names:[],mappings:`${`;`.repeat(e)}AAAA${`;AACA`.repeat(r-1)}`}}export{buildNodeEsmCompatBanner,createNodeEsmCompatBannerPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolvePackageSourceFilePath}from"#internal/application/package.js";import{
|
|
1
|
+
import{resolvePackageSourceFilePath}from"#internal/application/package.js";import{createDiskRuntimeCompiledArtifactsSource}from"#runtime/compiled-artifacts-source.js";import{DEVELOPMENT_WORKER_APP_ROOT_ENV,DEVELOPMENT_WORKFLOW_DELIVERY_HEADER,DEVELOPMENT_WORKFLOW_SECRET_ENV,DEVELOPMENT_WORKFLOW_STREAM_ROUTE,DEVELOPMENT_WORKFLOW_TRANSPORT_HEADER,DEVELOPMENT_WORKFLOW_WORLD_ROUTE,DEVELOPMENT_WORLD_OPERATIONS}from"#internal/workflow/development-world-protocol.js";import{timingSafeEqualStrings}from"#internal/nitro/dev-client-address.js";import{isMissingWorkflowRunError}from"#internal/workflow/is-inactive-workflow-run-error.js";import{decodeDevelopmentWorldJson,decodeDevelopmentWorldValue,deserializeDevelopmentWorldError,encodeDevelopmentWorldValue}from"#internal/workflow/development-world-codec.js";import{getDevelopmentWorkflowGeneration,withDevelopmentWorkflowGeneration}from"#internal/workflow/development-generation-context.js";import{cancelExpiredDevelopmentRun}from"#internal/workflow/cancel-expired-development-run.js";var MissingDevelopmentGenerationError=class extends Error{constructor(e,t){super(`Workflow run references missing development generation "${e}". Start a new local session.`,t===void 0?void 0:{cause:t}),this.name=`MissingDevelopmentGenerationError`}};async function call(e,t=[]){let n=await fetchDevelopmentWorld(DEVELOPMENT_WORKFLOW_WORLD_ROUTE,{body:encodeDevelopmentWorldValue({arguments:t,operation:e}),method:`POST`});return decodeDevelopmentWorldValue(await n.text())}async function getGenerationAvailability(e){let t=await fetchDevelopmentWorld(DEVELOPMENT_WORKFLOW_WORLD_ROUTE,{body:encodeDevelopmentWorldValue({operation:`eve.getGenerationAvailability`,generationId:e}),method:`POST`});return decodeDevelopmentWorldValue(await t.text())}function createDevelopmentWorkflowWorld(){let e=buildForwardedOperations();return{specVersion:8,async getDeploymentId(){return getDevelopmentWorkflowGeneration()?.generationId??await call(`getDeploymentId`)},resolveLatestDeploymentId:e.topLevel.resolveLatestDeploymentId,queue:e.topLevel.queue,createQueueHandler,runs:e.groups.runs,steps:e.groups.steps,events:e.groups.events,hooks:e.groups.hooks,streams:{...e.groups.streams,get:async(e,t,n)=>{let r=new URL(resolveDevelopmentWorldBaseUrl());r.pathname=DEVELOPMENT_WORKFLOW_STREAM_ROUTE,r.searchParams.set(`runId`,e),r.searchParams.set(`name`,t),n!==void 0&&r.searchParams.set(`startIndex`,String(n));let i=await fetchDevelopmentWorld(r,{method:`GET`});if(i.body===null)throw Error(`Development Workflow stream response had no body.`);return i.body}},async start(){},async close(){}}}function buildForwardedOperations(){let e={},t={};for(let n of DEVELOPMENT_WORLD_OPERATIONS){let forward=async(...e)=>await call(n,e),r=n.indexOf(`.`);r===-1?t[n]=forward:(e[n.slice(0,r)]??={})[n.slice(r+1)]=forward}return{groups:e,topLevel:t}}function createQueueHandler(e,t){return async n=>{let r=readRequiredEnvironment(DEVELOPMENT_WORKFLOW_SECRET_ENV),i=n.headers.get(DEVELOPMENT_WORKFLOW_DELIVERY_HEADER);if(i===null||!timingSafeEqualStrings(i,r))return Response.json({error:`Workflow delivery is not trusted.`},{status:401});let a=n.headers.get(`x-vqs-queue-name`),o=n.headers.get(`x-vqs-message-id`),s=Number(n.headers.get(`x-vqs-message-attempt`));if(a===null||!a.startsWith(e)||o===null||!Number.isInteger(s)||s<1||n.body===null)return Response.json({error:`Workflow delivery is malformed.`},{status:400});let c=decodeDevelopmentWorldJson(await n.text());try{let e=readRequiredEnvironment(DEVELOPMENT_WORKER_APP_ROOT_ENV),n=await resolveDeliveryGenerationId(c);if(n===void 0)return Response.json({ok:!0});let r=await getGenerationAvailability(n);if(r.kind===`missing`)throw new MissingDevelopmentGenerationError(n);if(r.kind===`ineligible`||r.kind===`dormant`)return Response.json({ok:!0});let i=r.runtimeAppRoot,l=await withDevelopmentWorkflowGeneration({generationId:n,source:createDiskRuntimeCompiledArtifactsSource(i,{durableReference:`development-generation`,moduleMapLoaderPath:resolvePackageSourceFilePath(`src/internal/authored-module-map-loader.ts`),sandboxAppRoot:e})},async()=>await t(c,{attempt:s,messageId:o,queueName:a}));return Response.json(l===void 0?{ok:!0}:{timeoutSeconds:l.timeoutSeconds})}catch(e){if(e instanceof MissingDevelopmentGenerationError){let e=resolveDeliveryRunId(c);if(e!==void 0)try{await cancelExpiredDevelopmentRun(createDevelopmentWorkflowWorld(),e)}catch(e){return Response.json(String(e),{status:500})}return Response.json({ok:!0})}return Response.json(String(e),{status:500})}}}async function resolveDeliveryGenerationId(e){if(!isRecord(e)||e.__healthCheck===!0)return await call(`resolveLatestDeploymentId`);let t=isRecord(e.runInput)?e.runInput:void 0;if(t!==void 0)return typeof t.deploymentId==`string`?t.deploymentId:await call(`resolveLatestDeploymentId`);let n=resolveDeliveryRunId(e);if(n===void 0)return await call(`resolveLatestDeploymentId`);try{return(await call(`runs.get`,[n,{resolveData:`none`}])).deploymentId}catch(e){if(!isMissingWorkflowRunError(e))throw e;return}}function resolveDeliveryRunId(e){if(isRecord(e)&&e.__healthCheck!==!0)return typeof e.runId==`string`?e.runId:typeof e.workflowRunId==`string`?e.workflowRunId:void 0}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}async function fetchDevelopmentWorld(e,t){let n=e instanceof URL?e:new URL(e,resolveDevelopmentWorldBaseUrl()),r=new Headers(t.headers);r.set(DEVELOPMENT_WORKFLOW_TRANSPORT_HEADER,readRequiredEnvironment(DEVELOPMENT_WORKFLOW_SECRET_ENV));let i=await fetch(n,{...t,headers:r});if(!i.ok){let e=await i.text(),t=readDevelopmentWorldError(e);throw t===void 0?Error(`Development Workflow World request failed (${String(i.status)}): ${e}`):t}return i}function readDevelopmentWorldError(e){try{return deserializeDevelopmentWorldError(decodeDevelopmentWorldValue(e))}catch{return}}function resolveDevelopmentWorldBaseUrl(){return readRequiredEnvironment(`WORKFLOW_LOCAL_BASE_URL`)}function readRequiredEnvironment(e){let t=process.env[e];if(t===void 0||t.length===0)throw Error(`Development Workflow transport is missing ${e}.`);return t}export{MissingDevelopmentGenerationError,createDevelopmentWorkflowWorld};
|
|
@@ -5,9 +5,10 @@ export interface AuthoredWorkflowDirectiveSource {
|
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* The directive transform understands one shape: a top-level `async function`
|
|
8
|
-
* whose first statement is the directive. A marked `defineWorkflowTool`
|
|
9
|
-
* into that shape here; every other
|
|
10
|
-
*
|
|
8
|
+
* whose first statement is the directive. A marked `defineWorkflowTool` entry
|
|
9
|
+
* point (`execute` or `task`) is hoisted into that shape here; every other
|
|
10
|
+
* placement is a build error, because an ignored directive would run side
|
|
11
|
+
* effects inline in a replayed body.
|
|
11
12
|
*/
|
|
12
13
|
export declare function prepareAuthoredWorkflowDirectives(input: {
|
|
13
14
|
readonly filePath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseWithNitroRolldownAst}from"#internal/bundler/nitro-rolldown.js";import{mayContainWorkflowDirective,readWorkflowDirective}from"#internal/workflow-bundle/workflow-directive-ast.js";const
|
|
1
|
+
import{parseWithNitroRolldownAst}from"#internal/bundler/nitro-rolldown.js";import{mayContainWorkflowDirective,readWorkflowDirective}from"#internal/workflow-bundle/workflow-directive-ast.js";import{WORKFLOW_TOOL_ENTRY_POINTS}from"#tools/workflow-entry-point.js";const ENTRY_POINT_METHODS=new Intl.ListFormat(`en`,{type:`disjunction`}).format(WORKFLOW_TOOL_ENTRY_POINTS.map(e=>`"${e}"`));async function prepareAuthoredWorkflowDirectives(e){if(!mayContainWorkflowDirective(e.source)&&!e.source.includes(`eve/workflow`))return{hasDirectives:!1,hasWorkflowDirective:!1,source:e.source};let t=/\.[cm]?js$/.test(e.filePath)?`${e.filePath}.jsx`:e.filePath,n=await parseWithNitroRolldownAst(t,e.source),r=n.body??[];if(r.some(e=>e.source?.value===`eve/workflow`))throw Error(`${e.filePath}: "eve/workflow" has been removed. Use defineWorkflowTool() from "eve/tools" and call ctx.agent(target, input) or ctx.ask(request) in its executor.`);for(let t of r){if(typeof t.directive!=`string`)break;let n=readWorkflowDirective(t);if(n!==void 0)throw Error(`${JSON.stringify(n)} in "${e.filePath}" is a module-level directive. Put it as the first statement of the function it marks: a top-level "async function" declaration or the ${ENTRY_POINT_METHODS} method of a default-exported defineWorkflowTool().`)}let i=new Set;for(let e of r){let t=e.type===`FunctionDeclaration`?e:e.type===`ExportNamedDeclaration`&&e.declaration?.type===`FunctionDeclaration`?e.declaration:void 0;t!==void 0&&i.add(t)}let a=findDefaultExportEntryPoints(r);for(let e of a)i.add(e.fn);let o=collectDirectiveFunctions(n);if(o.length===0)return{hasDirectives:!1,hasWorkflowDirective:!1,source:e.source};let s=o.some(e=>e.directive===`use workflow`);for(let t of o){if(!i.has(t.fn))throw Error(`${JSON.stringify(t.directive)} in "${e.filePath}" marks ${describeFunction(t.fn)}. Workflow directives must mark a top-level "async function" declaration or the ${ENTRY_POINT_METHODS} method of a default-exported defineWorkflowTool().`);if(t.fn.async!==!0)throw Error(`${JSON.stringify(t.directive)} in "${e.filePath}" marks ${describeFunction(t.fn)}, which is not async. Declare it with "async function".`);let n=a.find(e=>e.fn===t.fn);if(n!==void 0&&t.directive!==`use workflow`)throw Error(`"use step" in "${e.filePath}" marks the default export's "${n.name}" method. A tool's "${n.name}" can be a workflow ("use workflow"); steps are the helper functions it calls.`)}let c=a.find(e=>o.some(t=>t.fn===e.fn));if(c===void 0)return{hasDirectives:!0,hasWorkflowDirective:s,source:e.source};if(declaresTopLevelBinding(r,c.name))throw Error(`"use workflow" in "${e.filePath}" marks the "${c.name}" method, but the module also declares a top-level "${c.name}" binding. eve hoists that method to a top-level "async function ${c.name}"; rename the existing binding.`);return{hasDirectives:!0,hasWorkflowDirective:s,source:hoistEntryPointMethod(e.source,c)}}function findDefaultExportEntryPoints(e){let t=e.find(e=>e.type===`ExportDefaultDeclaration`)?.declaration,n=t?.type===`CallExpression`?t.arguments?.[0]:t;if(n?.type!==`ObjectExpression`)return[];let r=[];for(let e of n.properties??[]){if(e.type!==`Property`||e.kind!==`init`||e.computed===!0)continue;let t=readPropertyName(e.key),n=e.value;t!==void 0&&WORKFLOW_TOOL_ENTRY_POINTS.some(e=>e===t)&&isAstNode(n)&&isFunctionLike(n)&&r.push({fn:n,name:t,property:e})}return r}function hoistEntryPointMethod(e,t){let{fn:n,name:r,property:i}=t;if(i.start===void 0||i.end===void 0||!isAstNode(n.body)||n.body.start===void 0||n.body.end===void 0)throw Error(`Cannot hoist a "${r}" method without source ranges.`);let a=n.params??[],o=a[0],s=a[a.length-1],c=o?.start===void 0||s?.end===void 0?``:e.slice(o.start,s.end),l=sliceNode(e,n.typeParameters),u=sliceNode(e,n.returnType),d=e.slice(n.body.start,n.body.end),f=`async function${n.generator===!0?`*`:``} ${r}${l}(${c})${u} ${d}`;return`${e.slice(0,i.start)}${r}${e.slice(i.end)}\n${f}\n`}function sliceNode(e,t){return t==null||t.start===void 0||t.end===void 0?``:e.slice(t.start,t.end)}function declaresTopLevelBinding(e,t){for(let n of e){let e=n.type===`ExportNamedDeclaration`?n.declaration:n;if(e!=null){if((e.type===`FunctionDeclaration`||e.type===`ClassDeclaration`)&&e.id?.name===t)return!0;if(e.type===`VariableDeclaration`){for(let n of e.declarations??[])if(n.id?.name===t)return!0}if(e.type===`ImportDeclaration`){for(let n of e.specifiers??[])if(n.local?.name===t)return!0}}}return!1}function collectDirectiveFunctions(e){let t=[];return visit(e,e=>{if(!isFunctionLike(e))return;let n=readLeadingDirective(e);n!==void 0&&t.push({directive:n,fn:e})}),t}function readLeadingDirective(e){if(isAstNode(e.body)&&e.body.type===`BlockStatement`&&Array.isArray(e.body.body))return readWorkflowDirective(e.body.body[0])}function describeFunction(e){return e.type===`FunctionDeclaration`?e.id?.name===void 0?`a nested function declaration`:`the nested function "${e.id.name}"`:e.type===`ArrowFunctionExpression`?`an arrow function`:e.id?.name===void 0?`a function expression`:`the function "${e.id.name}"`}function readPropertyName(e){if(e!=null){if(e.type===`Identifier`)return e.name;if(e.type===`Literal`&&typeof e.value==`string`)return e.value}}function isFunctionLike(e){return e.type===`FunctionDeclaration`||e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`}function visit(e,t){if(!e.type?.startsWith(`TS`)){t(e);for(let n of Object.values(e))if(Array.isArray(n))for(let e of n)isAstNode(e)&&visit(e,t);else isAstNode(n)&&visit(n,t)}}function isAstNode(e){return typeof e==`object`&&!!e&&typeof e.type==`string`}export{prepareAuthoredWorkflowDirectives};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{mkdir,readFile,writeFile}from"node:fs/promises";import{resolvePackageSourceDirectoryPath,resolveWorkflowModulePath}from"#internal/application/package.js";import{dirname,join,resolve}from"node:path";import{buildSingleRolldownChunk}from"#internal/bundler/nitro-rolldown.js";import{createAuthoredPackageTsConfigPathsPlugin}from"#internal/authored-package-tsconfig-paths.js";import{createAuthoredRelativeExtensionResolverPlugin}from"#internal/authored-relative-extension-resolver.js";import{findWorkflowPatterns}from"#internal/workflow-bundle/workflow-builders.js";import{mapConcurrent}from"#shared/map-concurrent.js";import{onVendoredDependencyLog}from"#internal/bundler/vendored-dependency-log.js";import{prepareEveVersionedCacheDirectory,writeEveVersionedCacheMetadata}from"#internal/application/cache-metadata.js";import{WORKFLOW_BUILDER_DEFERRED_PACKAGES,WORKFLOW_STEP_EXTERNAL_PACKAGES}from"#internal/workflow-bundle/vercel-workflow-output.js";import{deriveEveWorkflowQueueNamespace}from"#internal/workflow/queue-namespace.js";import{runQueuedWorkflowBuild}from"#internal/workflow-bundle/build-queue.js";import{WORKFLOW_SOURCE_EXTENSIONS,WORKFLOW_VIRTUAL_ENTRY_ID,bundleFinalWorkflowOutput,collectWorkflowInputFiles,composeWorkflowDriverCode,convertClassesManifest,convertStepsManifest,convertWorkflowsManifest,createEvePackageImportsPlugin,createWorkflowDriverAliasPlugin,createWorkflowImport,createWorkflowNodeBuiltinGuardPlugin,createWorkflowPseudoPackagePlugin,createWorkflowTransformPlugin,createWorkflowVirtualEntryPlugin,mergeWorkflowManifest}from"#internal/workflow-bundle/builder-support.js";import{writeNitroStepEntrypoint}from"#internal/workflow-bundle/nitro-step-entry.js";var WorkflowBundleBuilder=class{#e;#t;#n;#r;config;constructor(e){let t=[resolvePackageSourceDirectoryPath(`src/execution`),resolvePackageSourceDirectoryPath(`src/runtime/subagents`),resolvePackageSourceDirectoryPath(`src/subagents`)];e.includeTestFixtures===!0&&t.push(resolvePackageSourceDirectoryPath(`src/internal/testing`)),this.config={buildTarget:`standalone`,dirs:t,externalPackages:[...WORKFLOW_STEP_EXTERNAL_PACKAGES,...WORKFLOW_BUILDER_DEFERRED_PACKAGES],projectRoot:e.appRoot,watch:e.watch,workingDir:e.rootDir},this.#e=e.authoredWorkflowModules??{directiveModules:[],workflowModules:[]},this.#t=e.compiledArtifactsBootstrapPath,this.#n=e.outDir,this.#r=deriveEveWorkflowQueueNamespace(e.agentName)}async build(e={}){await runQueuedWorkflowBuild(this.#n,async()=>this.#i(e))}async#i(e){await prepareEveVersionedCacheDirectory(this.#n);let t=await this.#o();if(t.length===0)throw Error(`Expected framework workflow source files under eve's execution, runtime/subagents, or
|
|
1
|
+
import{mkdir,readFile,writeFile}from"node:fs/promises";import{resolvePackageSourceDirectoryPath,resolveWorkflowModulePath}from"#internal/application/package.js";import{dirname,join,resolve}from"node:path";import{buildSingleRolldownChunk}from"#internal/bundler/nitro-rolldown.js";import{createAuthoredPackageTsConfigPathsPlugin}from"#internal/authored-package-tsconfig-paths.js";import{createAuthoredRelativeExtensionResolverPlugin}from"#internal/authored-relative-extension-resolver.js";import{findWorkflowPatterns}from"#internal/workflow-bundle/workflow-builders.js";import{mapConcurrent}from"#shared/map-concurrent.js";import{onVendoredDependencyLog}from"#internal/bundler/vendored-dependency-log.js";import{prepareEveVersionedCacheDirectory,writeEveVersionedCacheMetadata}from"#internal/application/cache-metadata.js";import{WORKFLOW_BUILDER_DEFERRED_PACKAGES,WORKFLOW_STEP_EXTERNAL_PACKAGES}from"#internal/workflow-bundle/vercel-workflow-output.js";import{deriveEveWorkflowQueueNamespace}from"#internal/workflow/queue-namespace.js";import{runQueuedWorkflowBuild}from"#internal/workflow-bundle/build-queue.js";import{WORKFLOW_SOURCE_EXTENSIONS,WORKFLOW_VIRTUAL_ENTRY_ID,bundleFinalWorkflowOutput,collectWorkflowInputFiles,composeWorkflowDriverCode,convertClassesManifest,convertStepsManifest,convertWorkflowsManifest,createEvePackageImportsPlugin,createWorkflowDriverAliasPlugin,createWorkflowImport,createWorkflowNodeBuiltinGuardPlugin,createWorkflowPseudoPackagePlugin,createWorkflowTransformPlugin,createWorkflowVirtualEntryPlugin,mergeWorkflowManifest}from"#internal/workflow-bundle/builder-support.js";import{writeNitroStepEntrypoint}from"#internal/workflow-bundle/nitro-step-entry.js";var WorkflowBundleBuilder=class{#e;#t;#n;#r;config;constructor(e){let t=[resolvePackageSourceDirectoryPath(`src/execution`),resolvePackageSourceDirectoryPath(`src/runtime/subagents`),resolvePackageSourceDirectoryPath(`src/subagents`),resolvePackageSourceDirectoryPath(`src/tools/provided`)];e.includeTestFixtures===!0&&t.push(resolvePackageSourceDirectoryPath(`src/internal/testing`)),this.config={buildTarget:`standalone`,dirs:t,externalPackages:[...WORKFLOW_STEP_EXTERNAL_PACKAGES,...WORKFLOW_BUILDER_DEFERRED_PACKAGES],projectRoot:e.appRoot,watch:e.watch,workingDir:e.rootDir},this.#e=e.authoredWorkflowModules??{directiveModules:[],workflowModules:[]},this.#t=e.compiledArtifactsBootstrapPath,this.#n=e.outDir,this.#r=deriveEveWorkflowQueueNamespace(e.agentName)}async build(e={}){await runQueuedWorkflowBuild(this.#n,async()=>this.#i(e))}async#i(e){await prepareEveVersionedCacheDirectory(this.#n);let t=await this.#o();if(t.length===0)throw Error(`Expected framework workflow source files under eve's execution, runtime/subagents, subagents, or tools/provided source directories.`);let n=await this.findTsConfigPath();await mkdir(this.#n,{recursive:!0});let r=await this.discoverEntries(t),i=this.#e,a=mergeStepEntries(r,i),o=join(this.#n,`steps.mjs`),s=join(this.#n,`workflows.mjs`),c=e.nitroStepOutfile,l=e.nitroWorkflowOutfile,writeStepEntry=(e,t)=>writeNitroStepEntrypoint({builtinsPath:resolveWorkflowModulePath(`workflow/internal/builtins`),discoveredEntries:a,outfile:e,precomputedManifest:t,preferAbsoluteFileImports:!0,projectRoot:this.config.projectRoot??this.config.workingDir,sideEffectFiles:[this.#t],workingDir:this.config.workingDir}),u=await writeStepEntry(o);c!==void 0&&c!==o&&await writeStepEntry(c,u);let{manifest:d}=await this.createWorkflowsBundle({additionalOutputs:l===void 0||l===s?[]:[{outfile:l,stepRegistrationsPath:c??o}],appWorkflowFiles:i.workflowModules,frameworkSerdeFiles:r.discoveredSerdeFiles,frameworkWorkflowFiles:r.discoveredWorkflows,outfile:s,stepRegistrationsPath:o,tsconfigPath:n});await this.createManifest({workflowBundlePath:join(this.#n,`workflows.mjs`),manifestDir:this.#n,manifest:{steps:{...u.steps,...d.steps},workflows:{...u.workflows,...d.workflows},classes:{...u.classes,...d.classes}}}),await writeEveVersionedCacheMetadata(this.#n)}get transformProjectRoot(){return this.config.projectRoot??this.config.workingDir}async findTsConfigPath(){let e=this.transformProjectRoot;for(;;){for(let t of[`tsconfig.json`,`jsconfig.json`]){let n=join(e,t);try{return await readFile(n),n}catch(e){if(!(e instanceof Error&&`code`in e&&e.code===`ENOENT`))throw e}}let t=dirname(e);if(t===e)return;e=t}}async getInputFiles(){let e=this.config.dirs.map(e=>resolve(this.config.workingDir,e));return(await Promise.all(e.map(e=>collectWorkflowInputFiles(e)))).flat()}async discoverEntries(e){let t={discoveredSerdeFiles:[],discoveredSteps:[],discoveredWorkflows:[]},n=await mapConcurrent(e,async e=>{let t=await readFile(e,`utf8`);return{filePath:e,patterns:await findWorkflowPatterns(e,t)}});for(let{filePath:e,patterns:r}of n)r.hasUseStep&&t.discoveredSteps.push(e),r.hasUseWorkflow&&t.discoveredWorkflows.push(e),r.hasSerde&&t.discoveredSerdeFiles.push(e);return t}async createWorkflowsBundle({additionalOutputs:e=[],appWorkflowFiles:t,frameworkSerdeFiles:n,frameworkWorkflowFiles:r,outfile:i,stepRegistrationsPath:a,tsconfigPath:o}){let s={},c=await mapConcurrent([{label:`framework`,serdeFiles:n,workflowFiles:r},{label:`app`,serdeFiles:[],workflowFiles:t}],async e=>{let t={};return{code:await this.#a({...e,manifest:t,tsconfigPath:o}),manifest:t}});for(let e of c)mergeWorkflowManifest(s,e.manifest);let l=composeWorkflowDriverCode(c.map(e=>e.code));return await Promise.all([{outfile:i,stepRegistrationsPath:a},...e].map(e=>bundleFinalWorkflowOutput({code:l,outfile:e.outfile,queueNamespace:this.#r,stepRegistrationsPath:e.stepRegistrationsPath}))),{manifest:s}}async#a(e){let t=[...e.workflowFiles].sort(),n=new Set(t),r=[...e.serdeFiles].sort().filter(e=>!n.has(e));if(t.length===0&&r.length===0)return``;let i=[...t.map(e=>createWorkflowImport(e,this.config.workingDir)),...r.map(e=>createWorkflowImport(e,this.config.workingDir))].join(`
|
|
2
2
|
`);return(await buildSingleRolldownChunk(`${e.label} workflow driver chunk`,{cwd:this.config.workingDir,onLog(e,t,n){if(e===`warn`&&t.code===`UNRESOLVED_IMPORT`)throw Error(`Cannot build workflow bundle: ${t.message}`);onVendoredDependencyLog(e,t,n)},input:WORKFLOW_VIRTUAL_ENTRY_ID,platform:`neutral`,plugins:[createWorkflowVirtualEntryPlugin(i),createWorkflowPseudoPackagePlugin(),createWorkflowDriverAliasPlugin(this.config.workingDir),createAuthoredRelativeExtensionResolverPlugin({extensions:WORKFLOW_SOURCE_EXTENSIONS}),createAuthoredPackageTsConfigPathsPlugin({appPackageRoot:this.transformProjectRoot,extensions:WORKFLOW_SOURCE_EXTENSIONS}),createEvePackageImportsPlugin(this.config.workingDir,{workflowCondition:!0}),createWorkflowTransformPlugin({manifest:e.manifest,projectRoot:this.transformProjectRoot,sideEffectFiles:[...t,...r],workingDir:this.config.workingDir}),createWorkflowNodeBuiltinGuardPlugin()],resolve:{conditionNames:[`eve-source`,`workflow`],extensions:WORKFLOW_SOURCE_EXTENSIONS,mainFields:[`module`,`main`]},tsconfig:e.tsconfigPath??!1,output:{comments:!1,format:`cjs`,sourcemap:`inline`}})).code}async createManifest({manifest:e,manifestDir:t}){let n={version:`1.0.0`,steps:convertStepsManifest(e.steps),workflows:convertWorkflowsManifest(e.workflows),classes:convertClassesManifest(e.classes)},r=JSON.stringify(n,null,2);return await mkdir(t,{recursive:!0}),await writeFile(join(t,`manifest.json`),r),r}async#o(){return await this.getInputFiles()}};function mergeStepEntries(e,t){return{discoveredSerdeFiles:e.discoveredSerdeFiles,discoveredSteps:[...new Set([...e.discoveredSteps,...t.directiveModules])]}}export{WorkflowBundleBuilder};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{transformDynamicRemoteAgentCredentials}from"#internal/workflow-bundle/dynamic-remote-agent-transform.js";import{transformDynamicToolExecute}from"#internal/workflow-bundle/dynamic-tool-transform.js";function createDynamicCapabilityTransformPlugin(e={}){return{async transform(t,n){let r=n.replaceAll(`\\`,`/`),i=e.dynamicTools!==!1,a=e.dynamicRemoteAgents!==!1&&r.includes(`/subagents/`);if(!i&&!a)return null;let o=t,s=!1;if(i){let t=await transformDynamicToolExecute(
|
|
1
|
+
import{transformDynamicRemoteAgentCredentials}from"#internal/workflow-bundle/dynamic-remote-agent-transform.js";import{transformDynamicToolExecute}from"#internal/workflow-bundle/dynamic-tool-transform.js";function createDynamicCapabilityTransformPlugin(e={}){return{async transform(t,n){let r=n.split(`?`)[0].replaceAll(`\\`,`/`),i=e.dynamicTools!==!1,a=e.dynamicRemoteAgents!==!1&&r.includes(`/subagents/`);if(!i&&!a)return null;let o=t,s=!1;if(i){let t=await transformDynamicToolExecute(r,o,e.workflowFunctions?.(n));t!==null&&(o=t.code,s=!0)}if(a){let e=await transformDynamicRemoteAgentCredentials(r,o);e!==null&&(o=e.code,s=!0)}return s?{code:o,map:null}:null},name:`eve:dynamic-capability-transform`}}export{createDynamicCapabilityTransformPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync,readFileSync,realpathSync}from"node:fs";import{dirname,isAbsolute,join,relative,resolve,sep}from"node:path";import{EVE_PACKAGE_NAME}from"#internal/package-name.js";import{STABLE_WORKFLOW_NAMES}from"#execution/stable-workflow-names.js";import{prepareAuthoredWorkflowDirectives}from"#internal/workflow-bundle/authored-workflow-directives.js";import{
|
|
1
|
+
import{existsSync,readFileSync,realpathSync}from"node:fs";import{dirname,isAbsolute,join,relative,resolve,sep}from"node:path";import{AGENT_TOOL_SERVE_WORKFLOW_NAME}from"#runtime/subagents/workflow-reference.js";import{EVE_PACKAGE_NAME}from"#internal/package-name.js";import{STABLE_WORKFLOW_NAMES}from"#execution/stable-workflow-names.js";import{prepareAuthoredWorkflowDirectives}from"#internal/workflow-bundle/authored-workflow-directives.js";import{findWorkflowDirectiveFunctions,stripJavaScriptExtension,transformWorkflowDirectives}from"#internal/workflow-bundle/workflow-transformer.js";const packageJsonCache=new Map,projectDepsCache=new Map;async function applyWorkflowTransform(e,t,n,r,i,a=new Set([...STABLE_WORKFLOW_NAMES,AGENT_TOOL_SERVE_WORKFLOW_NAME])){let o=i??process.cwd(),s=r===void 0?isAbsolute(e)?e:join(o,e):r,{moduleSpecifier:c,stableModuleSpecifier:l}=resolveModuleSpecifier(s,o,n===`metadata`);if(r!==void 0&&isAuthoredApplicationModule(r,o)){let e=n===!1?void 0:await prepareAuthoredWorkflowDirectives({filePath:r,source:t});return transformWorkflowDirectives({authored:!0,authorizeSteps:!0,filename:authoredRelativePath(r,o),mode:e?.hasDirectives===!0&&n,moduleSpecifier:authoredModuleIdBase(r,o),source:e?.source??t,stableModuleSpecifier:void 0,stableWorkflowNames:a})}return transformWorkflowDirectives({authorizeSteps:isPackageTestFixtureModule(s),filename:e,mode:n,moduleSpecifier:c,source:t,stableModuleSpecifier:l,stableWorkflowNames:a})}function isPackageTestFixtureModule(e){return e.replace(/\\/g,`/`).includes(`/src/internal/testing/`)}function isAuthoredApplicationModule(e,t){let n=toRealPath(t).replace(/\\/g,`/`).replace(/\/$/,``),r=toRealPath(e).replace(/\\/g,`/`);return!r.startsWith(`${n}/`)||isInNodeModules(r)?!1:findPackageJson(r)?.name!==EVE_PACKAGE_NAME}function authoredRelativePath(e,t){return toRelativeImportPath(toRealPath(e),toRealPath(t)).replace(/^\.\//,``)}function authoredModuleIdBase(e,t){return`./${stripJavaScriptExtension(authoredRelativePath(e,t))}`}function toRealPath(e){try{return realpathSync(e)}catch{return resolve(e)}}async function findWorkflowPatterns(e,t){let n=await findWorkflowDirectiveFunctions(e,t);return{hasSerde:t.includes(`workflow.serde`)||t.includes(`@serde`)||t.includes(`workflowSerde`)||t.includes(`__workflow_serde`),hasUseStep:n.some(e=>e.directive===`use step`),hasUseWorkflow:n.some(e=>e.directive===`use workflow`)}}function getImportPath(e,t){let n=isInNodeModules(e),r=!n&&isWorkspacePackage(e,t);if(n||r){let n=findPackageJson(e);if(n!==null){let i=getProjectDependencies(t).has(n.name);if(!(r||i))return{importPath:toRelativeImportPath(e,t),isPackage:!1};let a=resolveExportSubpath(e,n);return a?{importPath:`${n.name}${a}`,isPackage:!0}:isRootEntrypointFile(e,n)?{importPath:n.name,isPackage:!0}:{importPath:toRelativeImportPath(e,t),isPackage:!1}}}return{importPath:toRelativeImportPath(e,t),isPackage:!1}}function resolveModuleSpecifier(e,t,n=!1){let r=isInNodeModules(e),i=!r&&isWorkspacePackage(e,t),a=findPackageJson(e);if(n&&a!==null)return{moduleSpecifier:`${a.name}@${a.version}`,stableModuleSpecifier:a.name};if(!r&&!i)return{moduleSpecifier:void 0,stableModuleSpecifier:a?.name===EVE_PACKAGE_NAME?EVE_PACKAGE_NAME:void 0};if(a===null)return{moduleSpecifier:void 0,stableModuleSpecifier:void 0};let o=resolveExportSubpath(e,a),s=o?`${a.name}${o}`:a.name;return{moduleSpecifier:`${s}@${a.version}`,stableModuleSpecifier:s}}function findPackageJson(e){let t=dirname(e),n=[];for(;t!==dirname(t);){let e=packageJsonCache.get(t);if(e!==void 0){for(let t of n)packageJsonCache.set(t,e);return e}n.push(t);let r=join(t,`package.json`);if(existsSync(r))try{let e=JSON.parse(readFileSync(r,`utf8`));if(typeof e.name==`string`&&typeof e.version==`string`){let r={dir:t,exports:e.exports,main:e.main,module:e.module,name:e.name,version:e.version};packageJsonCache.set(t,r);for(let e of n)packageJsonCache.set(e,r);return r}}catch{}t=dirname(t)}for(let e of n)packageJsonCache.set(e,null);return null}function resolveExportSubpath(e,t){if(t.exports===null||typeof t.exports!=`object`||Array.isArray(t.exports))return``;let n=e.replace(/\\/g,`/`),r=t.dir.replace(/\\/g,`/`),i=n.startsWith(`${r}/`)?`./${n.substring(r.length+1)}`:null;if(i===null)return``;for(let[e,n]of Object.entries(t.exports)){let t=resolveExportTarget(n);if(t!==null&&normalizeExportPath(t)===i)return e===`.`?``:e.substring(1)}return``}function resolveExportTarget(e){if(typeof e==`string`)return e;if(Array.isArray(e)){for(let t of e){let e=resolveExportTarget(t);if(e!==null)return e}return null}if(typeof e==`object`&&e)for(let t of[`workflow`,`default`,`require`,`import`,`node`]){let n=e[t],r=resolveExportTarget(n);if(r!==null)return r}return null}function normalizeExportPath(e){return e.startsWith(`./`)?e:`./${e}`}function isInNodeModules(e){return e.split(sep).join(`/`).includes(`/node_modules/`)}function getProjectDependencies(e){let t=projectDepsCache.get(e);if(t!==void 0)return t;let n=new Set,r=join(e,`package.json`);if(existsSync(r))try{let e=JSON.parse(readFileSync(r,`utf8`));for(let t of[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`]){let r=e[t];if(typeof r==`object`&&r&&!Array.isArray(r))for(let e of Object.keys(r))n.add(e)}}catch{}return projectDepsCache.set(e,n),n}function isWorkspacePackage(e,t){if(isInNodeModules(e))return!1;let n=findPackageJson(e);return n===null||resolve(n.dir)===resolve(t)?!1:getProjectDependencies(t).has(n.name)}function toRelativeImportPath(e,t){let n=t.replace(/\\/g,`/`),r=e.replace(/\\/g,`/`),i=r.startsWith(`${n}/`)?r.substring(n.length+1):relative(t,e).replace(/\\/g,`/`);return i.startsWith(`.`)||(i=`./${i}`),i}function hasRootExport(e){if(typeof e==`string`||Array.isArray(e))return!0;if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length>0&&t.every(e=>!e.startsWith(`.`))?!0:`.`in e}function normalizePackageTargetPath(e){let t=e.replace(/\\/g,`/`);return t.startsWith(`./`)?t.substring(2):t.startsWith(`/`)?t.substring(1):t}function isRootEntrypointFile(e,t){let n=e.replace(/\\/g,`/`),r=t.dir.replace(/\\/g,`/`);if(!n.startsWith(`${r}/`))return!1;let i=n.substring(r.length+1);if(t.exports!==void 0){let e;if(t.exports!==null&&typeof t.exports==`object`&&`.`in t.exports)e=t.exports[`.`];else if(hasRootExport(t.exports))e=t.exports;else return!1;let n=resolveExportTarget(e);return n!==null&&normalizePackageTargetPath(n)===i}return[t.module,t.main,`index.js`,`index.mjs`,`index.cjs`,`index.ts`,`index.mts`,`index.cts`].flatMap(e=>typeof e==`string`?[normalizePackageTargetPath(e)]:[]).includes(i)}export{applyWorkflowTransform,findWorkflowPatterns,getImportPath,isAuthoredApplicationModule};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type Experimental_EvaluationModel as EvaluationModel } from "ai";
|
|
2
2
|
import { type DynamicSentinel } from "#dynamic/definition.js";
|
|
3
3
|
import type { AgentReasoningDefinition, PublicAgentDynamicModelResult, PublicAgentStaticModelDefinition } from "#shared/agent-definition.js";
|
|
4
|
+
type AutoModelSelection = PublicAgentStaticModelDefinition | {
|
|
5
|
+
readonly model: PublicAgentStaticModelDefinition;
|
|
6
|
+
readonly reasoning?: AgentReasoningDefinition;
|
|
7
|
+
};
|
|
4
8
|
type AutoOption = string | {
|
|
5
9
|
readonly model: PublicAgentStaticModelDefinition;
|
|
6
10
|
readonly description: string;
|
|
@@ -9,6 +13,8 @@ type AutoOption = string | {
|
|
|
9
13
|
interface AutoConfig<T extends Readonly<Record<string, AutoOption>> = Readonly<Record<string, AutoOption>>> {
|
|
10
14
|
/** Evaluation model instance or ID. Defaults to TypeSafe Jev through AI SDK model resolution. */
|
|
11
15
|
readonly model?: EvaluationModel;
|
|
16
|
+
/** Model selection to use when evaluation fails. */
|
|
17
|
+
readonly fallback?: AutoModelSelection;
|
|
12
18
|
readonly options: T;
|
|
13
19
|
}
|
|
14
20
|
/** Select a language model from the current prompt with an AI SDK evaluation model. */
|