eve 0.47.7 → 0.49.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 +35 -0
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/delivery-metadata.d.ts +1 -0
- package/dist/src/channel/delivery-metadata.js +1 -1
- package/dist/src/channel/types.d.ts +20 -8
- package/dist/src/chunks/{use-eve-agent-Dg5S44kG.js → use-eve-agent-BZnOzAVd.js} +25 -5
- package/dist/src/chunks/{use-eve-agent-B5zw1dwj.js → use-eve-agent-Bgp6INfi.js} +25 -5
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/integration-connect.d.ts +2 -1
- package/dist/src/cli/commands/integration-connect.js +1 -1
- package/dist/src/cli/commands/register-integration-commands.d.ts +3 -1
- package/dist/src/cli/commands/register-integration-commands.js +1 -1
- package/dist/src/cli/commands/registry-metadata.d.ts +30 -0
- package/dist/src/cli/commands/registry-metadata.js +1 -1
- package/dist/src/cli/commands/registry-package.d.ts +6 -0
- package/dist/src/cli/commands/registry-package.js +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +30 -0
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.js +1 -0
- package/dist/src/cli/commands/registry-pnpm-build-policy.d.ts +12 -0
- package/dist/src/cli/commands/registry-pnpm-build-policy.js +6 -0
- package/dist/src/cli/commands/registry-recovery.d.ts +4 -0
- package/dist/src/cli/commands/registry-recovery.js +1 -1
- package/dist/src/cli/commands/registry.d.ts +1 -1
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/dev/command-options.d.ts +2 -0
- package/dist/src/cli/dev/run-interactive-ui.js +1 -1
- package/dist/src/cli/dev/tui/blocks.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/registry-result-message.d.ts +17 -0
- package/dist/src/cli/dev/tui/registry-result-message.js +3 -0
- package/dist/src/cli/dev/tui/runner.d.ts +11 -4
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +9 -3
- package/dist/src/cli/dev/tui/setup-commands.js +2 -3
- package/dist/src/cli/dev/tui/setup-flow.d.ts +15 -5
- package/dist/src/cli/dev/tui/setup-panel.d.ts +6 -1
- package/dist/src/cli/dev/tui/setup-panel.js +4 -4
- package/dist/src/cli/dev/tui/setup-selection-input.d.ts +1 -0
- package/dist/src/cli/dev/tui/setup-selection-input.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
- package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
- package/dist/src/cli/dev/tui/tui.d.ts +3 -4
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/run.js +2 -2
- package/dist/src/client/agent-info-schema.d.ts +1 -0
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/open-stream.d.ts +1 -0
- package/dist/src/client/open-stream.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +7 -6
- package/dist/src/compiled/@opentelemetry/api/index.d.ts +6 -0
- package/dist/src/compiled/@workflow/builders/LICENSE.md +201 -0
- package/dist/src/compiled/@workflow/builders/index.d.ts +62 -0
- package/dist/src/compiled/@workflow/builders/index.js +1 -0
- package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +2 -4
- package/dist/src/compiled/@workflow/core/capabilities.d.ts +10 -9
- package/dist/src/compiled/@workflow/core/capture-stack.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/class-serialization.d.ts +8 -8
- package/dist/src/compiled/@workflow/core/context-violation-error.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/create-hook.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/describe-error.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/encryption.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/events-consumer.d.ts +49 -14
- package/dist/src/compiled/@workflow/core/flushable-stream.d.ts +4 -4
- package/dist/src/compiled/@workflow/core/global.d.ts +4 -2
- package/dist/src/compiled/@workflow/core/index.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/log-format.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/private.d.ts +40 -78
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/replay-payload-cache.d.ts +13 -17
- package/dist/src/compiled/@workflow/core/runtime/compute-instance.d.ts +4 -3
- package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +27 -27
- package/dist/src/compiled/@workflow/core/runtime/count-step-started-events.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/runtime/deployment-guard.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/runtime/get-port-lazy.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime/get-world-lazy.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +30 -49
- package/dist/src/compiled/@workflow/core/runtime/quickjs-entrypoint.d.ts +21 -10
- package/dist/src/compiled/@workflow/core/runtime/quickjs-runtime.d.ts +31 -15
- package/dist/src/compiled/@workflow/core/runtime/quickjs-serde.d.ts +10 -10
- package/dist/src/compiled/@workflow/core/runtime/replay-budget.d.ts +4 -4
- package/dist/src/compiled/@workflow/core/runtime/replay-recovery-reporter.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +20 -12
- package/dist/src/compiled/@workflow/core/runtime/resume-latency.d.ts +37 -30
- package/dist/src/compiled/@workflow/core/runtime/run-id-time.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime/run.d.ts +22 -5
- package/dist/src/compiled/@workflow/core/runtime/runs.d.ts +4 -4
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +3 -3
- package/dist/src/compiled/@workflow/core/runtime/step-executor.d.ts +14 -14
- package/dist/src/compiled/@workflow/core/runtime/step-latency.d.ts +42 -25
- package/dist/src/compiled/@workflow/core/runtime/step-ownership.d.ts +6 -6
- package/dist/src/compiled/@workflow/core/runtime/step-single-flight.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +38 -24
- package/dist/src/compiled/@workflow/core/runtime/unserializable-step.d.ts +34 -0
- package/dist/src/compiled/@workflow/core/runtime/vm-mode.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime/wait-continuation.d.ts +31 -9
- package/dist/src/compiled/@workflow/core/runtime/wait-until.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/world-compatibility.d.ts +20 -9
- package/dist/src/compiled/@workflow/core/runtime/world-init.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiled/@workflow/core/sealed-box.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/serialization/codec-devalue-vm.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/codec-devalue.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/codec.d.ts +4 -4
- package/dist/src/compiled/@workflow/core/serialization/compression.d.ts +12 -11
- package/dist/src/compiled/@workflow/core/serialization/encryption.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/serialization/format.d.ts +6 -6
- package/dist/src/compiled/@workflow/core/serialization/hardened.d.ts +23 -22
- package/dist/src/compiled/@workflow/core/serialization/index.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/reducers/class-vm.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/reducers/step-function-vm.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/types.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/serialization/workflow-vm.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization-format.d.ts +11 -11
- package/dist/src/compiled/@workflow/core/serialization.d.ts +18 -19
- package/dist/src/compiled/@workflow/core/source-map.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/step/context-storage.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/step/writable-stream.d.ts +3 -3
- package/dist/src/compiled/@workflow/core/symbols.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +71 -20
- package/dist/src/compiled/@workflow/core/telemetry.d.ts +15 -3
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/vm/script-cache.d.ts +9 -11
- package/dist/src/compiled/@workflow/core/workflow/abort-controller.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow/world-init-stub.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.d.ts +18 -18
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world/analytics.d.ts +3 -2
- package/dist/src/compiled/@workflow/world/attributes-validation.d.ts +28 -0
- package/dist/src/compiled/@workflow/world/attributes.d.ts +8 -107
- package/dist/src/compiled/@workflow/world/env-config.d.ts +5 -5
- package/dist/src/compiled/@workflow/world/event-metadata.d.ts +132 -0
- package/dist/src/compiled/@workflow/world/events.d.ts +42 -96
- package/dist/src/compiled/@workflow/world/hooks.d.ts +12 -11
- package/dist/src/compiled/@workflow/world/index.d.ts +3 -3
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +94 -39
- package/dist/src/compiled/@workflow/world/queue.d.ts +29 -22
- package/dist/src/compiled/@workflow/world/runs.d.ts +20 -0
- package/dist/src/compiled/@workflow/world/slot-identity.d.ts +3 -3
- package/dist/src/compiled/@workflow/world/spec-version.d.ts +82 -15
- package/dist/src/compiled/@workflow/world/ulid.d.ts +2 -2
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +12 -12
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-DXbpwBdw.js → attribute-changes-BwAadFfB.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/debug-log-CVPstO1D.js +1 -0
- package/dist/src/compiled/_chunks/workflow/dist-CgbVZs5l.js +40 -0
- package/dist/src/compiled/_chunks/workflow/dist-DjojkP5e.js +3 -0
- package/dist/src/compiled/_chunks/workflow/frames-CZ9eHShe.js +3 -0
- package/dist/src/compiled/_chunks/workflow/global-singleton-BNinwFrL.js +1 -0
- package/dist/src/compiled/_chunks/workflow/private-CZFMABEf.js +1 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-BToMtPbH.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-DzyAoGh4.js +1 -0
- package/dist/src/compiled/_chunks/workflow/sleep-3_A5uOp-.js +1 -0
- package/dist/src/compiled/_chunks/workflow/undici-DfxNX5og.js +95 -0
- package/dist/src/compiled/_chunks/workflow/wait-until-BtySPYD0.js +15 -0
- package/dist/src/compiled/_chunks/workflow/ws-transport-PnVVxT0R.js +1 -0
- package/dist/src/compiler/extension-compatibility.d.ts +2 -2
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +2 -2
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/context/keys.d.ts +3 -8
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/types.d.ts +7 -7
- package/dist/src/execution/accepted-delivery-deployment.d.ts +7 -0
- package/dist/src/execution/accepted-delivery-deployment.js +1 -0
- package/dist/src/execution/agent-handle-dispatch.js +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.d.ts +4 -1
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/continuation-conflict-step.d.ts +10 -0
- package/dist/src/execution/continuation-conflict-step.js +1 -0
- package/dist/src/execution/delegated-parent-notification.js +1 -1
- package/dist/src/execution/delegation-tool.js +1 -1
- package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +14 -31
- package/dist/src/execution/dispatch-runtime-actions-shared.js +1 -1
- package/dist/src/execution/dispatch-runtime-actions-start.d.ts +33 -0
- package/dist/src/execution/dispatch-runtime-actions-start.js +1 -0
- package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
- package/dist/src/execution/dispatch-turn-step.js +1 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.d.ts +2 -0
- package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.js +1 -0
- package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +25 -3
- package/dist/src/execution/durable-session-migrations/turn-workflow.js +1 -1
- package/dist/src/execution/dynamic-connections.js +1 -1
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/finalize-terminal-session.d.ts +17 -0
- package/dist/src/execution/finalize-terminal-session.js +1 -0
- package/dist/src/execution/inline-turn.d.ts +29 -0
- package/dist/src/execution/inline-turn.js +1 -0
- package/dist/src/execution/next-driver-action.d.ts +9 -4
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/parked-delivery-wait.js +1 -1
- package/dist/src/execution/pending-turn-state.d.ts +1 -0
- package/dist/src/execution/pending-turn-state.js +1 -1
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/remote-agent-dispatch.d.ts +2 -0
- package/dist/src/execution/remote-agent-dispatch.js +1 -1
- package/dist/src/execution/runtime-errors.d.ts +0 -12
- package/dist/src/execution/runtime-errors.js +1 -1
- package/dist/src/execution/session-command-token.d.ts +2 -0
- package/dist/src/execution/session-command-token.js +1 -1
- package/dist/src/execution/session-timeout-steps.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +12 -0
- package/dist/src/execution/stable-workflow-names.js +1 -0
- package/dist/src/execution/subagent-event-proxy-step.d.ts +3 -0
- package/dist/src/execution/subagent-event-proxy-step.js +1 -1
- package/dist/src/execution/subagent-hitl-proxy.d.ts +2 -1
- package/dist/src/execution/subagent-hitl-proxy.js +1 -1
- package/dist/src/execution/subagent-start-local.js +1 -1
- package/dist/src/execution/subagent-start-remote.d.ts +2 -0
- package/dist/src/execution/subagent-start-remote.js +1 -1
- package/dist/src/execution/tasks/child/steps.d.ts +2 -0
- package/dist/src/execution/tasks/child/steps.js +1 -1
- package/dist/src/execution/tasks/child/workflow.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch-task-step.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tasks/parent/run-parent.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.js +1 -1
- package/dist/src/execution/terminal-session-event.d.ts +13 -0
- package/dist/src/execution/terminal-session-event.js +1 -0
- package/dist/src/execution/terminal-session-failure-step.d.ts +1 -0
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/tool-run/answer.d.ts +3 -0
- package/dist/src/execution/tool-run/answer.js +1 -0
- package/dist/src/execution/tool-run/background.d.ts +14 -0
- package/dist/src/execution/tool-run/background.js +1 -0
- package/dist/src/execution/tool-run/cancel.d.ts +7 -0
- package/dist/src/execution/tool-run/cancel.js +1 -0
- package/dist/src/execution/tool-run/dispatch.d.ts +24 -0
- package/dist/src/execution/tool-run/dispatch.js +1 -0
- package/dist/src/execution/tool-run/emit-run-report-step.d.ts +7 -0
- package/dist/src/execution/tool-run/emit-run-report-step.js +1 -0
- package/dist/src/execution/tool-run/messages.d.ts +70 -0
- package/dist/src/execution/tool-run/messages.js +1 -0
- package/dist/src/execution/tool-run/owner-channels.d.ts +29 -0
- package/dist/src/execution/tool-run/owner-channels.js +1 -0
- package/dist/src/execution/tool-run/owner-inbox.d.ts +11 -0
- package/dist/src/execution/tool-run/owner-inbox.js +1 -0
- package/dist/src/execution/tool-run/owner.d.ts +13 -0
- package/dist/src/execution/tool-run/owner.js +1 -0
- package/dist/src/execution/tool-run/resume-hook-step.d.ts +4 -0
- package/dist/src/execution/tool-run/resume-hook-step.js +1 -0
- package/dist/src/execution/tool-run/run-control.d.ts +18 -0
- package/dist/src/execution/tool-run/run-control.js +1 -0
- package/dist/src/execution/tool-run/start.d.ts +11 -0
- package/dist/src/execution/tool-run/start.js +1 -0
- package/dist/src/execution/tool-run/types.d.ts +21 -0
- package/dist/src/execution/tool-run/types.js +1 -0
- package/dist/src/execution/tool-run/workflow.d.ts +9 -0
- package/dist/src/execution/tool-run/workflow.js +1 -0
- package/dist/src/execution/tools/subagent/local.js +1 -1
- package/dist/src/execution/turn-cancellation-control.d.ts +2 -0
- package/dist/src/execution/turn-cancellation-control.js +1 -1
- package/dist/src/execution/turn-control-receiver.js +1 -1
- package/dist/src/execution/turn-dispatch.d.ts +4 -2
- package/dist/src/execution/turn-dispatch.js +1 -1
- package/dist/src/execution/turn-execution-cursor.js +1 -1
- package/dist/src/execution/turn-workflow.js +1 -1
- package/dist/src/execution/wire/session-inbox-contract.d.ts +2 -2
- package/dist/src/execution/wire/session-inbox-contract.js +1 -1
- package/dist/src/execution/wire/session-inbox-encoder.d.ts +6 -2
- package/dist/src/execution/wire/session-inbox-encoder.js +1 -1
- package/dist/src/execution/wire/session-inbox-resume.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v1.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v2-migration.d.ts +0 -2
- package/dist/src/execution/wire/session-inbox-wire.v2-migration.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v2.migration.d.ts +3 -0
- package/dist/src/execution/wire/session-inbox-wire.v2.migration.js +1 -0
- package/dist/src/execution/wire/session-inbox-wire.v3.d.ts +480 -0
- package/dist/src/execution/wire/session-inbox-wire.v3.js +1 -0
- package/dist/src/execution/wire/session-inbox-wire.v3.migration.d.ts +3 -0
- package/dist/src/execution/wire/session-inbox-wire.v3.migration.js +1 -0
- package/dist/src/execution/workflow-entry-finalization.js +1 -1
- package/dist/src/execution/workflow-entry.d.ts +5 -1
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/execution/workflow-registry.d.ts +5 -0
- package/dist/src/execution/workflow-registry.js +1 -0
- package/dist/src/execution/workflow-runtime.d.ts +17 -19
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/execution/workflow-webhook-route.d.ts +4 -0
- package/dist/src/execution/workflow-webhook-route.js +1 -0
- package/dist/src/harness/attachment-staging.js +1 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +10 -0
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/runtime-actions.d.ts +2 -0
- package/dist/src/harness/runtime-actions.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-runs.d.ts +21 -0
- package/dist/src/harness/tool-runs.js +1 -0
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/instrumentation/content-policy.d.ts +3 -1
- package/dist/src/instrumentation/content-policy.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +2 -2
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/attachments/errors.d.ts +3 -0
- package/dist/src/internal/authored-module-loader.d.ts +7 -1
- package/dist/src/internal/authored-module-loader.js +3 -3
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/authored-runtime-modules.d.ts +2 -0
- package/dist/src/internal/authored-runtime-modules.js +1 -1
- package/dist/src/internal/nitro/development-generation.d.ts +2 -0
- package/dist/src/internal/nitro/development-generation.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/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.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 +17 -0
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -0
- package/dist/src/internal/workflow-bundle/authored-workflow-modules.d.ts +19 -0
- package/dist/src/internal/workflow-bundle/authored-workflow-modules.js +1 -0
- package/dist/src/internal/workflow-bundle/builder-support.d.ts +17 -2
- package/dist/src/internal/workflow-bundle/builder-support.js +4 -3
- package/dist/src/internal/workflow-bundle/builder.d.ts +2 -2
- package/dist/src/internal/workflow-bundle/builder.js +2 -2
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.d.ts +2 -0
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.d.ts +3 -0
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +6 -2
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +3 -0
- package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-directive-ast.d.ts +7 -0
- package/dist/src/internal/workflow-bundle/workflow-directive-ast.js +1 -0
- package/dist/src/internal/workflow-bundle/workflow-transformer.d.ts +15 -1
- package/dist/src/internal/workflow-bundle/workflow-transformer.js +4 -4
- package/dist/src/packages/eve-catalog/src/index.js +1 -1
- package/dist/src/protocol/baggage.d.ts +6 -0
- package/dist/src/protocol/baggage.js +1 -0
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +7 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/attachments.d.ts +2 -2
- package/dist/src/public/channels/teams/attachments.js +1 -1
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/telegram/attachments.js +1 -1
- package/dist/src/public/definitions/remote-agent.d.ts +6 -3
- package/dist/src/public/workflow/index.d.ts +3 -0
- package/dist/src/public/workflow/index.js +1 -0
- package/dist/src/public/workflow-modules.d.js +1 -0
- package/dist/src/public/workflow-modules.d.ts +11 -0
- package/dist/src/runtime/actions/keys.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/setup/connection-connector.d.ts +4 -2
- package/dist/src/setup/connection-connector.js +2 -2
- package/dist/src/setup/flows/login.js +1 -1
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/flows/provider.d.ts +5 -0
- package/dist/src/setup/flows/provider.js +4 -4
- package/dist/src/setup/flows/registry-session.d.ts +24 -7
- package/dist/src/setup/flows/registry-session.js +1 -1
- package/dist/src/setup/flows/registry.d.ts +35 -29
- package/dist/src/setup/flows/registry.js +2 -1
- package/dist/src/setup/integrations/web/setup.d.ts +0 -2
- package/dist/src/setup/integrations/web/setup.js +1 -1
- package/dist/src/setup/prompter.d.ts +24 -4
- package/dist/src/setup/prompter.js +1 -1
- package/dist/src/setup/scaffold/connections/catalog.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +2 -2
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/shared/dispatch-action.d.ts +6 -0
- package/dist/src/shared/forwarded-trace-policy.d.ts +28 -0
- package/dist/src/shared/forwarded-trace-policy.js +1 -0
- package/dist/src/shared/instrumentation-decision.d.ts +3 -0
- package/dist/src/shared/instrumentation-decision.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 +6 -0
- package/dist/src/tools/definition.d.ts +39 -3
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.d.ts +1 -1
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/otel-declaration.d.ts +5 -3
- package/dist/src/tracing/otel-registration.d.ts +1 -1
- package/dist/src/tracing/otel-registration.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/channels/custom.mdx +6 -0
- package/docs/channels/eve.mdx +14 -6
- package/docs/channels/mcp.mdx +4 -1
- package/docs/channels/teams.mdx +6 -1
- package/docs/concepts/sessions-runs-and-streaming.md +4 -2
- package/docs/guides/auth-and-route-protection.md +5 -1
- package/docs/guides/client/messages.mdx +6 -0
- package/docs/guides/dev-tui.md +30 -18
- package/docs/guides/instrumentation.md +1 -1
- package/docs/guides/remote-agents.md +25 -0
- package/docs/install-integrations.mdx +2 -0
- package/docs/instructions.mdx +1 -1
- package/docs/memory/custom-provider.md +214 -0
- package/docs/memory/file.md +129 -0
- package/docs/memory/meta.json +5 -0
- package/docs/memory/overview.mdx +282 -0
- package/docs/patterns/multi-tenant-memory.md +12 -20
- package/docs/reference/cli.md +2 -2
- package/docs/tools/meta.json +1 -1
- package/docs/tools/overview.mdx +7 -0
- package/docs/tools/workflows.mdx +288 -0
- package/package.json +18 -7
- package/dist/src/compiled/_chunks/workflow/dist-CqvWKNQv.js +0 -3
- package/dist/src/compiled/_chunks/workflow/dist-Dk0aQqFO.js +0 -40
- package/dist/src/compiled/_chunks/workflow/dist-DpYyXbJv.js +0 -1
- package/dist/src/compiled/_chunks/workflow/env-config-L94XftKz.js +0 -1
- package/dist/src/compiled/_chunks/workflow/frames-Dl2Hcma4.js +0 -3
- package/dist/src/compiled/_chunks/workflow/private-CuQ4HTFC.js +0 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-E-Nkx8q_.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-cIeex2KF.js +0 -1
- package/dist/src/compiled/_chunks/workflow/sleep-CxFsdxB_.js +0 -1
- package/dist/src/compiled/_chunks/workflow/spec-version-DBUVfF_R.js +0 -1
- package/dist/src/compiled/_chunks/workflow/undici-DznrXKcM.js +0 -95
- package/dist/src/compiled/_chunks/workflow/wait-until-BZHmJCAW.js +0 -15
- package/dist/src/compiled/_chunks/workflow/ws-transport-Ct6yyRWZ.js +0 -1
- package/dist/src/internal/authored-directive-prologue.d.ts +0 -4
- package/dist/src/internal/authored-directive-prologue.js +0 -1
- package/docs/memory.md +0 -408
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# eve
|
|
2
2
|
|
|
3
|
+
## 0.49.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1ee8fa9: Session creation on eve, MCP, and authored channels now returns as soon as Workflow accepts the run. Concurrent first messages on one channel address are settled inside the workflow, racing `operationId` requests may return different candidate IDs that callers resolve after startup, and Workflow starts target known deployment IDs without resolving a latest-deployment sentinel.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 68d44b5: Addressed `/add <item>` confirmations now remain responsive in the dev TUI.
|
|
12
|
+
- b20c2aa: Add Browser Use to the `eve connections add` picker. The generated MCP connection reads `BROWSER_USE_API_KEY` into Browser Use's required API-key header without adding Vercel Connect.
|
|
13
|
+
- 0172af9: Preserve parent turn identity when dispatching a subagent after a parked child resumes, preventing handle-store corruption and fatal session failures.
|
|
14
|
+
- fbc89e5: Registry items can now declare optional pnpm packages with build scripts. Before installation, eve asks whether to skip those packages, allow their scripts, or abort, and records the choice in the owning workspace policy.
|
|
15
|
+
- 3f20c80: Add optional `audience` on Slack proactive `receive` / `ctx.send` targets so webhook and schedule handoffs can pass channel visibility without an extra Slack API call.
|
|
16
|
+
- a40ebb0: Update Eve's bundled Workflow SDK packages to the latest 5.0.0 beta releases, which includes performance and stability improvements.
|
|
17
|
+
|
|
18
|
+
## 0.48.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- e219a6a: Reduce channel turn latency by using optimized session resumes, routing work to the deployment that accepted it, and running ordinary same-deployment turns without a child-workflow handshake. Turns that need sleep, background work, runtime actions, or cross-deployment execution continue in the existing child workflow without repeating completed steps.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 62546ab: Continue message turns when any channel cannot retrieve an attachment, and expose a safe retrieval error to the model. Authenticate Microsoft Teams Bot Connector attachment downloads with the configured bot credentials.
|
|
27
|
+
- f43525a: Preserve trace content across principal-forwarding remote agents by intersecting the parent's directional capture ceiling with each trusted receiver's policy. Origin audience remains immutable across hops, private content requires explicit approval on both sides, and malformed or mixed-version assertions degrade to metadata-only.
|
|
28
|
+
- b7321c9: A tool's `execute` can now be a Workflow body: start it with `"use workflow"`, write helpers as `"use step"` functions, and use `createHook`, `createWebhook`, and `sleep` from `workflow` in the body and `start`, `getRun`, and `resumeHook` from `workflow/api` in steps. eve runs each call as a durable run and, by default, parks the turn until it returns. Import `ask` from `eve/workflow` to ask the human on the channel — it returns the hook the answer resumes, so it can be awaited or raced against a `sleep` deadline — and the request stays answerable even after the turn that started it ended. A workflow body may be an async generator whose `yield`s are durable progress. `ctx.abortSignal` aborts on cancellation, and the run waits a grace period for steps to stop and `finally` to clean up. With `execution: "background"` the model gets a receipt and is woken with the result. eve also serves the Workflow webhook route so `createWebhook()` URLs work.
|
|
29
|
+
- 3e2abe5: Replace the Dev TUI's single-item `/add` browser with a channel and integration planner that installs ordered batches, preserves completed results and failures, and installs explicitly addressed items directly.
|
|
30
|
+
- 453d194: Add Neon to the official connection registry and support app-scoped Vercel Connect setup.
|
|
31
|
+
- 1d78323: Fix deliveries to persistent subagent inboxes by projecting current caller metadata through the destination wire schema. Versioned migrations are now pure, immutable data transforms enforced by the wire guard.
|
|
32
|
+
- d1b3439: eve now owns the full OpenTelemetry lifecycle it registers: declared metric readers are flushed on `forceFlush` and shut down on `shutdown`, and declared auto-instrumentations are disabled at shutdown, so metrics recorded near teardown are exported instead of silently dropped.
|
|
33
|
+
- 9ed9d29: Reduce new-session startup latency by returning the session ID as soon as Workflow accepts the run instead of waiting for its command inbox. Hook claims and session initialization also start together so the first turn can begin sooner, and `session.send()` retries the brief inbox-readiness gap three times with exponential backoff.
|
|
34
|
+
- 1d74287: Present model, channel, integration, and review setup as one cohesive fresh-agent onboarding journey.
|
|
35
|
+
- 859151e: Cancel only the active registry item when setup is interrupted, then report installed, failed, and cancelled selections in order.
|
|
36
|
+
- 3c16df6: Publish instrumentation lifecycle events when sessions expire, reset, close, or fail outside an agent turn. Terminal paths now flush providers and release local trace retention state.
|
|
37
|
+
|
|
3
38
|
## 0.47.7
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSession,sessionCallbackToTurnCaller}from"#channel/session.js";import{copyChannelActivityPresentation}from"#channel/activity-renderer.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{normalizeSendInput,serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{
|
|
1
|
+
import{createSession,sessionCallbackToTurnCaller}from"#channel/session.js";import{copyChannelActivityPresentation}from"#channel/activity-renderer.js";import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{normalizeSendInput,serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{isReservedSessionCommandToken}from"#execution/session-command-token.js";function createChannelAddress(r){let i=r.metadata??{},a=`${r.channelName}:${r.continuationToken}`;if(isReservedSessionCommandToken(a))throw Error(`Channel address "${a}" uses eve's reserved session namespace.`);return{continuationToken:r.continuationToken,async deliver(n,o){let s=i.channelKind!==void 0&&i.channelName!==void 0?createChannelDeliveryMetadata(i):void 0,c=normalizeSendInput(n),l=sessionCallbackToTurnCaller(o.callback),u={auth:o.auth,delivery:s,kind:`send`,payload:{...c,message:serializeUrlFilePartsInMessage(c.message)},requestId:i.requestId,turnPolicy:c.message===void 0?void 0:o.turnPolicy??r.turnPolicy??DEFAULT_TURN_POLICY},d=l===void 0?u:{...u,caller:l},f=await(async()=>{let t=await r.runtime.dispatchContinuation({command:d,continuationToken:a});return t.status===`accepted`?createSession(t.sessionId,r.runtime,{...i,turnPolicy:r.turnPolicy}):void 0})();if(f!==void 0)return f;if(c.inputResponses&&c.inputResponses.length>0)throw Error(`Cannot deliver inputResponses — the target session was not found via continuation token.`);let p=o.state,m=p===void 0?r.adapter:{...r.adapter,state:{...r.adapter.state,...p}};m!==r.adapter&©ChannelActivityPresentation(r.adapter,m);let h=o.mode===`task`?void 0:{requestInput:!0},g={adapter:m,auth:o.auth,capabilities:h,callback:o.callback,channelName:r.channelName,continuationConflictCommand:d,continuationToken:a,delivery:s,initiatorAuth:o.initiatorAuth,input:{context:c.context,message:serializeUrlFilePartsInMessage(c.message)??``,outputSchema:c.outputSchema},mode:o.mode??`conversation`,requestId:i.requestId,title:o.title};return createSession((await r.runtime.createSession(g)).sessionId,r.runtime,{...i,turnPolicy:r.turnPolicy})},async send(e,t){return await this.deliver({message:e},t)},async respond(e,t){if(e===void 0||e.length===0)throw Error(`respond() requires at least one input response.`);return await this.deliver({inputResponses:e},t)},async cancel(e){return await r.runtime.dispatchContinuation({command:{kind:`cancel`,turnId:e?.turnId},continuationToken:a})},async compact(){return await r.runtime.dispatchContinuation({command:{kind:`compact`},continuationToken:a})},async clear(){return await r.runtime.dispatchContinuation({command:{kind:`clear`},continuationToken:a})},async reset(e){return await r.runtime.dispatchContinuation({command:{kind:`reset`,reason:e?.reason},continuationToken:a})},async resolveSession(){let t=await r.runtime.resolveContinuation(a);return t===void 0?void 0:createSession(t.sessionId,r.runtime,{...i,turnPolicy:r.turnPolicy})}}}function createChannelAddressFn(e){return t=>createChannelAddress({...e,continuationToken:t})}export{createChannelAddress,createChannelAddressFn};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function createChannelDeliveryMetadata(e){let t={channelKind:e.channelKind,channelName:e.channelName,deliveryId:crypto.randomUUID()};return e.requestId!==void 0&&(t.requestId=e.requestId),e.requestTraceContext!==void 0&&(t.requestTraceContext=e.requestTraceContext),t}export{createChannelDeliveryMetadata};
|
|
1
|
+
function createChannelDeliveryMetadata(e){let t={channelKind:e.channelKind,channelName:e.channelName,deliveryId:crypto.randomUUID()};return e.acceptedDeploymentId!==void 0&&(t.acceptedDeploymentId=e.acceptedDeploymentId),e.requestId!==void 0&&(t.requestId=e.requestId),e.requestTraceContext!==void 0&&(t.requestTraceContext=e.requestTraceContext),t}export{createChannelDeliveryMetadata};
|
|
@@ -2,12 +2,13 @@ import type { UserContent } from "ai";
|
|
|
2
2
|
import type { MessageStreamEvent, UnstampedMessageStreamEvent } from "#protocol/message.js";
|
|
3
3
|
import type { CancelTurnResult as ProtocolCancelTurnResult } from "#protocol/cancel-turn.js";
|
|
4
4
|
import type { RunMode } from "#shared/run-mode.js";
|
|
5
|
-
import type { RuntimeSubagentChildResult } from "#shared/action-types.js";
|
|
5
|
+
import type { RuntimeSubagentChildResult, RuntimeToolResultActionResult } from "#shared/action-types.js";
|
|
6
6
|
import type { InputRequest, InputResponse } from "#shared/input.js";
|
|
7
7
|
import type { ChannelAdapter } from "#channel/adapter.js";
|
|
8
8
|
import type { AgentLimitsDefinition } from "#shared/agent-definition.js";
|
|
9
9
|
import type { JsonObject } from "#shared/json.js";
|
|
10
10
|
import type { InstrumentationDecision } from "#shared/instrumentation-decision.js";
|
|
11
|
+
import type { ForwardedTraceAssertion } from "#shared/forwarded-trace-policy.js";
|
|
11
12
|
import type { TaskView } from "#tasks/types.js";
|
|
12
13
|
export type { ContextAccessor } from "#context/key.js";
|
|
13
14
|
export type { ChannelInstrumentationProjection } from "#channel/instrumentation.js";
|
|
@@ -73,12 +74,14 @@ export interface SessionParent {
|
|
|
73
74
|
*/
|
|
74
75
|
export interface SessionTraceContext {
|
|
75
76
|
readonly decision?: InstrumentationDecision;
|
|
77
|
+
readonly forwardedTracePolicy?: ForwardedTraceAssertion;
|
|
76
78
|
readonly spanId: string;
|
|
77
79
|
readonly traceFlags: number;
|
|
78
80
|
readonly traceId: string;
|
|
79
81
|
}
|
|
80
82
|
/** Framework-owned identity for one inbound channel operation. */
|
|
81
83
|
export interface ChannelDeliveryMetadata {
|
|
84
|
+
readonly acceptedDeploymentId?: string;
|
|
82
85
|
readonly channelKind: string;
|
|
83
86
|
readonly channelName: string;
|
|
84
87
|
readonly deliveryId: string;
|
|
@@ -260,14 +263,13 @@ export interface ClearSessionHookPayload {
|
|
|
260
263
|
readonly kind: "clear";
|
|
261
264
|
}
|
|
262
265
|
/**
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
* lane. Parent-produced dispatch results never travel through this hook.
|
|
266
|
+
* Results resumed back into a parked parent workflow by the work it
|
|
267
|
+
* dispatched: child-produced subagent results and authored workflow tool
|
|
268
|
+
* results. Parent-produced dispatch results never travel through this hook.
|
|
267
269
|
*/
|
|
268
270
|
export interface RuntimeActionResultHookPayload {
|
|
269
271
|
readonly kind: "runtime-action-result";
|
|
270
|
-
readonly results: readonly RuntimeSubagentChildResult[];
|
|
272
|
+
readonly results: readonly (RuntimeSubagentChildResult | RuntimeToolResultActionResult)[];
|
|
271
273
|
}
|
|
272
274
|
/**
|
|
273
275
|
* Event coordinates attached to a proxied `input.requested` batch.
|
|
@@ -419,6 +421,16 @@ export interface RunInput {
|
|
|
419
421
|
* transports omit this field.
|
|
420
422
|
*/
|
|
421
423
|
readonly continuationToken?: string;
|
|
424
|
+
/**
|
|
425
|
+
* Framework-owned delivery to forward when another run wins the initial
|
|
426
|
+
* continuation-token claim. Channel addresses set this so concurrent cold
|
|
427
|
+
* starts preserve every distinct inbound message inside durable execution.
|
|
428
|
+
* Create-once and replay-idempotent starts omit it so losing inputs are
|
|
429
|
+
* discarded.
|
|
430
|
+
*/
|
|
431
|
+
readonly continuationConflictCommand?: Extract<SessionCommand, {
|
|
432
|
+
readonly kind: "send";
|
|
433
|
+
}>;
|
|
422
434
|
/**
|
|
423
435
|
* The original (top-level) caller's auth, forwarded down the delegation
|
|
424
436
|
* chain so the child's `session.auth.initiator` always resolves back to
|
|
@@ -485,8 +497,8 @@ export type RunResult = {
|
|
|
485
497
|
readonly status: "waiting";
|
|
486
498
|
};
|
|
487
499
|
/**
|
|
488
|
-
* Handle returned by `runtime.createSession()` once the
|
|
489
|
-
* before
|
|
500
|
+
* Handle returned by `runtime.createSession()` once the durable run is accepted,
|
|
501
|
+
* before its command inbox or step loop necessarily starts.
|
|
490
502
|
*
|
|
491
503
|
* Carries the identifiers needed for stream endpoints.
|
|
492
504
|
*/
|
|
@@ -316,7 +316,8 @@ const kernelEffect = z.object({
|
|
|
316
316
|
action: z.enum([
|
|
317
317
|
"subagent-call",
|
|
318
318
|
"task-update",
|
|
319
|
-
"task-cancel"
|
|
319
|
+
"task-cancel",
|
|
320
|
+
"workflow-tool-call"
|
|
320
321
|
]).optional(),
|
|
321
322
|
audience: z.array(z.enum([
|
|
322
323
|
"root-session",
|
|
@@ -1261,6 +1262,8 @@ function getStandardSchemaProperties(value) {
|
|
|
1261
1262
|
|
|
1262
1263
|
//#endregion
|
|
1263
1264
|
//#region src/client/session.ts
|
|
1265
|
+
const SESSION_SEND_RETRY_COUNT = 3;
|
|
1266
|
+
const SESSION_SEND_RETRY_BASE_DELAY_MS = 250;
|
|
1264
1267
|
var ClientSession = class ClientSession {
|
|
1265
1268
|
#context;
|
|
1266
1269
|
#state;
|
|
@@ -1304,18 +1307,19 @@ var ClientSession = class ClientSession {
|
|
|
1304
1307
|
return await this.#send({
|
|
1305
1308
|
...options,
|
|
1306
1309
|
message
|
|
1307
|
-
});
|
|
1310
|
+
}, true);
|
|
1308
1311
|
}
|
|
1309
1312
|
async respond(inputResponses, options = {}) {
|
|
1310
1313
|
if (inputResponses.length === 0) throw new Error("ClientSession.respond() requires at least one input response.");
|
|
1311
1314
|
return await this.#send({
|
|
1312
1315
|
...options,
|
|
1313
1316
|
inputResponses
|
|
1314
|
-
});
|
|
1317
|
+
}, false);
|
|
1315
1318
|
}
|
|
1316
|
-
async #send(input) {
|
|
1319
|
+
async #send(input, retrySessionNotActive) {
|
|
1317
1320
|
const initialStreamIndex = this.#state.streamIndex;
|
|
1318
|
-
const
|
|
1321
|
+
const path = createEveSessionRoutePath(this.#state.sessionId);
|
|
1322
|
+
const response = retrySessionNotActive ? await postSessionSend(this.#context, path, input) : await postTurn(this.#context, path, input, false);
|
|
1319
1323
|
if (await readSessionId(response, this.#state.sessionId) !== this.#state.sessionId) throw new Error("Message route returned a different session id.");
|
|
1320
1324
|
return this.#messageResponse(response, input, initialStreamIndex);
|
|
1321
1325
|
}
|
|
@@ -1415,6 +1419,22 @@ var ClientSession = class ClientSession {
|
|
|
1415
1419
|
});
|
|
1416
1420
|
}
|
|
1417
1421
|
};
|
|
1422
|
+
async function postSessionSend(context, path, input) {
|
|
1423
|
+
let retryDelayMs = SESSION_SEND_RETRY_BASE_DELAY_MS;
|
|
1424
|
+
for (let retry = 0;; retry += 1) {
|
|
1425
|
+
try {
|
|
1426
|
+
return await postTurn(context, path, input, false);
|
|
1427
|
+
} catch (error) {
|
|
1428
|
+
if (!isSessionNotActive(error) || retry >= SESSION_SEND_RETRY_COUNT) throw error;
|
|
1429
|
+
}
|
|
1430
|
+
await sleep(retryDelayMs, input.signal);
|
|
1431
|
+
input.signal?.throwIfAborted();
|
|
1432
|
+
retryDelayMs *= 2;
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
function isSessionNotActive(error) {
|
|
1436
|
+
return error instanceof ClientError && error.status === 409 && error.code === "session_not_active";
|
|
1437
|
+
}
|
|
1418
1438
|
function shouldKeepActiveTurnAlive(policy) {
|
|
1419
1439
|
if (policy && "reconnect" in policy) return false;
|
|
1420
1440
|
return policy?.streamIdleReconnectPolicy?.maxAttempts === void 0;
|
|
@@ -316,7 +316,8 @@ const kernelEffect = z.object({
|
|
|
316
316
|
action: z.enum([
|
|
317
317
|
"subagent-call",
|
|
318
318
|
"task-update",
|
|
319
|
-
"task-cancel"
|
|
319
|
+
"task-cancel",
|
|
320
|
+
"workflow-tool-call"
|
|
320
321
|
]).optional(),
|
|
321
322
|
audience: z.array(z.enum([
|
|
322
323
|
"root-session",
|
|
@@ -1261,6 +1262,8 @@ function getStandardSchemaProperties(value) {
|
|
|
1261
1262
|
|
|
1262
1263
|
//#endregion
|
|
1263
1264
|
//#region src/client/session.ts
|
|
1265
|
+
const SESSION_SEND_RETRY_COUNT = 3;
|
|
1266
|
+
const SESSION_SEND_RETRY_BASE_DELAY_MS = 250;
|
|
1264
1267
|
var ClientSession = class ClientSession {
|
|
1265
1268
|
#context;
|
|
1266
1269
|
#state;
|
|
@@ -1304,18 +1307,19 @@ var ClientSession = class ClientSession {
|
|
|
1304
1307
|
return await this.#send({
|
|
1305
1308
|
...options,
|
|
1306
1309
|
message
|
|
1307
|
-
});
|
|
1310
|
+
}, true);
|
|
1308
1311
|
}
|
|
1309
1312
|
async respond(inputResponses, options = {}) {
|
|
1310
1313
|
if (inputResponses.length === 0) throw new Error("ClientSession.respond() requires at least one input response.");
|
|
1311
1314
|
return await this.#send({
|
|
1312
1315
|
...options,
|
|
1313
1316
|
inputResponses
|
|
1314
|
-
});
|
|
1317
|
+
}, false);
|
|
1315
1318
|
}
|
|
1316
|
-
async #send(input) {
|
|
1319
|
+
async #send(input, retrySessionNotActive) {
|
|
1317
1320
|
const initialStreamIndex = this.#state.streamIndex;
|
|
1318
|
-
const
|
|
1321
|
+
const path = createEveSessionRoutePath(this.#state.sessionId);
|
|
1322
|
+
const response = retrySessionNotActive ? await postSessionSend(this.#context, path, input) : await postTurn(this.#context, path, input, false);
|
|
1319
1323
|
if (await readSessionId(response, this.#state.sessionId) !== this.#state.sessionId) throw new Error("Message route returned a different session id.");
|
|
1320
1324
|
return this.#messageResponse(response, input, initialStreamIndex);
|
|
1321
1325
|
}
|
|
@@ -1415,6 +1419,22 @@ var ClientSession = class ClientSession {
|
|
|
1415
1419
|
});
|
|
1416
1420
|
}
|
|
1417
1421
|
};
|
|
1422
|
+
async function postSessionSend(context, path, input) {
|
|
1423
|
+
let retryDelayMs = SESSION_SEND_RETRY_BASE_DELAY_MS;
|
|
1424
|
+
for (let retry = 0;; retry += 1) {
|
|
1425
|
+
try {
|
|
1426
|
+
return await postTurn(context, path, input, false);
|
|
1427
|
+
} catch (error) {
|
|
1428
|
+
if (!isSessionNotActive(error) || retry >= SESSION_SEND_RETRY_COUNT) throw error;
|
|
1429
|
+
}
|
|
1430
|
+
await sleep(retryDelayMs, input.signal);
|
|
1431
|
+
input.signal?.throwIfAborted();
|
|
1432
|
+
retryDelayMs *= 2;
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
function isSessionNotActive(error) {
|
|
1436
|
+
return error instanceof ClientError && error.status === 409 && error.code === "session_not_active";
|
|
1437
|
+
}
|
|
1418
1438
|
function shouldKeepActiveTurnAlive(policy) {
|
|
1419
1439
|
if (policy && "reconnect" in policy) return false;
|
|
1420
1440
|
return policy?.streamIdleReconnectPolicy?.maxAttempts === void 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{initAgentDevHandoff,initAgentReadySummary,initAgentReplPrompt}from"./agent-instructions.js";import{tryInitializeGit}from"./init-git.js";import{confirmInitInNonEmptyDirectory}from"./init-confirm.js";import{cleanupFreshInitTarget,workspaceFailureNote}from"./init-recovery.js";import{selectInitHandoff,spawnCodingAgentRepl}from"./init-repl.js";import{resolveInitTarget}from"./init-target.js";import{mkdtemp,readdir,rename,rm}from"node:fs/promises";import{createLogger,isLogLevelEnabled}from"#internal/logging.js";import{basename,join,relative,resolve}from"node:path";import pc from"#compiled/picocolors/index.js";import{DEFAULT_AGENT_MODEL_ID}from"#shared/default-agent-model.js";import{ensureChannel,scaffoldBaseProject}from"#setup/scaffold/index.js";import{eveDevArguments,packageManagerInstallFailureMessage,packageManagerInstallSucceeded,resultSucceeded,runPackageManagerInstall,spawnPackageManager}from"#setup/primitives/index.js";import{performance}from"node:perf_hooks";import{isCodingAgentLaunch}from"#cli/agent-detection.js";import{EVE_WORDMARK}from"#cli/banner.js";import{formatElapsed}from"#cli/format-elapsed.js";import{startCliLiveRow}from"#cli/ui/live-row.js";import{formatNodeEngineOverrideWarning}from"#setup/node-engine.js";import{detectInvokingPackageManager,detectPackageManager}from"#setup/package-manager.js";import{pathExists}from"#setup/path-exists.js";import{DEFAULT_EVE_PACKAGE_CONTRACT}from"#setup/scaffold/create/project.js";import{addAgentToProject}from"#setup/scaffold/create/add-to-project.js";import{WizardCancelledError}from"#setup/step.js";import{validateModelSlug}from"#setup/flows/model-source-change.js";import{isPackageManagerWorkspaceMember}from"#setup/scaffold/workspace-root.js";const defaultDependencies={addAgentToProject,confirmInitInNonEmptyDirectory,detectInvokingPackageManager,detectPackageManager,ensureChannel,isCodingAgentLaunch,now:()=>performance.now(),runPackageManagerInstall,scaffoldBaseProject,selectInitHandoff,spawnCodingAgentRepl,spawnPackageManager,tryInitializeGit,validateModelSlug},EVE_INIT_PACKAGE_SPEC_ENV=`EVE_INIT_PACKAGE_SPEC`,initLog=createLogger(`init`);async function moveDirectoryContents(e,t){for(let n of await readdir(e))await rename(join(e,n),join(t,n))}function uniqueWorkspaceRootMutations(e){let t=new Map;for(let n of e){let e=`${n.kind}:${n.path}`,r=t.get(e);t.set(e,{...n,nodeEngineOverride:n.nodeEngineOverride??r?.nodeEngineOverride})}return[...t.values()]}function formatWorkspaceRootMutationWarning(e){let t=e.kind===`package-json`?`package.json`:`configuration`,n=e.nodeEngineOverride===void 0?``:` (${formatNodeEngineOverrideWarning(e.nodeEngineOverride)})`;return`Updated workspace root ${t} at ${e.path}${n}`}async function addToExistingProject(e,t,n,r){if(t.channelWebNextjs===!0)throw Error("`--channel-web-nextjs` is not supported when adding an agent to an existing project. Run `eve add channel/web` from the project afterwards instead.");if(t.model!==void 0){let r=await n.validateModelSlug(e,t.model);if(r!==null)throw Error(r)}let i=await n.detectPackageManager(e),a=await n.addAgentToProject({projectRoot:e,model:t.model??DEFAULT_AGENT_MODEL_ID,reasoning:t.reasoning,packageManager:i.kind,evePackage:r});return{configurationFilesChanged:a.configurationFilesChanged,dependenciesAdded:a.dependenciesAdded,filesWritten:a.filesWritten,packageManager:i.kind,nodeEngineOverride:a.nodeEngineOverride}}async function resolveScaffoldPackageManager(e,t){let n=await t.detectPackageManager(e);return n.source==="default"?t.detectInvokingPackageManager()??`pnpm`:n.kind}async function scaffoldProject(e,t,n,r,i,a,o,s){let c=resolve(e,`..`),l=!n&&await pathExists(e)&&(await readdir(e)).length===0;if(!n&&await pathExists(e)&&!l)throw Error(`Cannot create project because "${e}" already exists.`);let m=n&&s?void 0:await mkdtemp(join(c,`.eve-init-`)),h=[];try{let c=m??e;if(i.model!==void 0){let e=await a.validateModelSlug(c,i.model);if(e!==null)throw Error(e)}let u={projectName:m===void 0?`.`:n?basename(e):t,model:i.model??DEFAULT_AGENT_MODEL_ID,reasoning:i.reasoning,evePackage:o,targetDirectory:c,overwriteExisting:s,workspaceProbeDirectory:e,packageManager:r,onWorkspaceRootMutation:e=>{h.push(e)}},d=await a.scaffoldBaseProject(u);return i.channelWebNextjs===!0&&await a.ensureChannel({projectRoot:d,kind:`web`,packageManager:r,force:s,workspaceProbeDirectory:e,configureVercelServices:!1,onWorkspaceRootMutation:e=>{h.push(e)}}),m!==void 0&&(n||l?await moveDirectoryContents(d,e):await rename(d,e)),{projectPath:e,workspaceRootMutations:uniqueWorkspaceRootMutations(h)}}finally{m!==void 0&&await rm(m,{recursive:!0,force:!0})}}function installProgressDetail(e,t){let n=t.text.trim();if(n===``||e!==`npm`)return n||void 0;let r=/^npm silly fetch manifest (.+)$/u.exec(n);if(r!==null)return`Resolving ${r[1]}`;let i=/^npm http fetch \S+ \S+ attempt (\d+) failed with (\S+)$/u.exec(n);if(i!==null)return`npm registry · attempt ${i[1]} failed: ${i[2]}`;if(t.stream===`stdout`||/^npm (?:error|warn)\b/u.test(n))return n}const NPM_NOISE_LINE=/^\s*npm (?:silly|verbose|http|timing)\b/u;function reportExistingProjectChanges(e,t){e.log(`Updated existing project:`);for(let n of t.filesWritten)e.log(` Created ${relative(t.projectPath,n).replaceAll(`\\`,`/`)}`);t.dependenciesAdded.length>0&&e.log(` Added dependencies: ${t.dependenciesAdded.join(`, `)}`);for(let n of t.configurationFilesChanged)e.log(` Updated ${n}`);t.nodeEngineOverride!==void 0&&e.log(pc.yellow(` ⚠ ${formatNodeEngineOverrideWarning(t.nodeEngineOverride)}`))}async function runInitSteps(e){let{dependencies:t,logger:n,options:r,parentDirectory:i,target:s}=e,c=isLogLevelEnabled(`debug`),u=await t.isCodingAgentLaunch(),d=await resolveInitTarget({parentDirectory:i,target:s}),f=resolveInitEvePackageOverride(),p=startCliLiveRow(n);p.update(`Preparing project`);try{let e=d.kind===`fresh`?`creating agent`:`adding agent`;p.update(d.kind===`fresh`?`Creating agent`:`Adding agent`),initLog.debug(e);let i=t.now(),s;if(d.kind===`fresh`){let e=await resolveScaffoldPackageManager(d.projectPath,t),n=isPackageManagerWorkspaceMember(e,d.projectPath),i;try{i=await scaffoldProject(d.projectPath,d.projectName,d.createInPlace,e,r,t,f,d.overwriteExisting)}catch(e){if(d.failurePolicy===`clear`){let t=await cleanupFreshInitTarget(d.projectPath,d.failurePolicy,d.preservedEntries),r=e instanceof Error?e.message:String(e),i=t?`eve restored "${d.projectPath}" to its original state.`:`eve could not completely clean "${d.projectPath}".`;throw Error(`${r}\n\n${i}${workspaceFailureNote(n)}`)}if(d.failurePolicy===`remove`&&n){let t=e instanceof Error?e.message:String(e);throw Error(`${t}${workspaceFailureNote(!0)}`)}throw e}s={failurePolicy:d.failurePolicy,kind:`created`,packageManager:e,preservedTargetEntries:d.preservedEntries,projectPath:i.projectPath,retryCommand:`eve init ${d.projectPath}`,workspaceMember:n,workspaceRootMutations:i.workspaceRootMutations}}else{let e=await addToExistingProject(d.projectPath,r,t,f);s=e.nodeEngineOverride===void 0?{configurationFilesChanged:e.configurationFilesChanged,dependenciesAdded:e.dependenciesAdded,failurePolicy:`preserve`,filesWritten:e.filesWritten,kind:`added`,packageManager:e.packageManager,projectPath:d.projectPath}:{configurationFilesChanged:e.configurationFilesChanged,dependenciesAdded:e.dependenciesAdded,failurePolicy:`preserve`,filesWritten:e.filesWritten,kind:`added`,nodeEngineOverride:e.nodeEngineOverride,packageManager:e.packageManager,projectPath:d.projectPath}}let l=t.now()-i;initLog.debug(`${e} done`,{ms:l}),s.kind===`added`&&(p.stop(),reportExistingProjectChanges(n,s),p=startCliLiveRow(n)),p.update(`Installing dependencies`,`${s.packageManager} install`),initLog.debug(`installing dependencies with ${s.packageManager}`);let m=t.now(),h=[],g=[],_=await t.runPackageManagerInstall(s.packageManager,s.projectPath,{progressDetails:process.stdout.isTTY===!0&&!c,onOutput:e=>{e.text.trim()!==``&&(g.push(e.text),g.length>20&&g.shift(),NPM_NOISE_LINE.test(e.text)||h.push(e.text)),c&&initLog.debug(e.text);let t=installProgressDetail(s.packageManager,e);t!==void 0&&p.update(`Installing dependencies`,t)}}),v=t.now()-m;if(!packageManagerInstallSucceeded(_)){initLog.debug(`dependency installation failed`,{ms:v}),p.stop();let e=h.length>0?h:g;for(let t of e)n.error(t);if(e.length===0){let e=packageManagerInstallFailureMessage(_);e!==void 0&&n.error(e)}if(s.failurePolicy!==`preserve`){if(await cleanupFreshInitTarget(s.projectPath,s.failurePolicy,s.preservedTargetEntries)){let e=s.failurePolicy===`remove`?`eve removed the incomplete project at "${s.projectPath}".`:`eve restored "${s.projectPath}" to its original state.`,t=s.workspaceMember||s.workspaceRootMutations.length>0;throw Error(`Failed to install dependencies.\n\n${e}\n\nResolve the package-manager error above, then retry:\n ${s.retryCommand}${workspaceFailureNote(t)}`)}let e=s.workspaceMember||s.workspaceRootMutations.length>0;throw Error(`Failed to install dependencies, and eve could not completely clean "${s.projectPath}".\n\nResolve the package-manager error above, then install dependencies with ${s.packageManager} in that directory. Or clean the target manually before rerunning eve init.${workspaceFailureNote(e)}`)}throw Error(`The eve agent was added, but dependency installation failed.\n\nResolve the package-manager error above, then install dependencies with ${s.packageManager} in "${s.projectPath}".\n\nDo not rerun eve init; the agent is already configured.`)}return initLog.debug(`dependencies installed`,{ms:v}),s.kind===`created`?(p.update(`Initializing Git repository`),initLog.debug(`initializing git repository`),{...s,agentElapsedMs:l,agentLaunched:u,gitResult:await t.tryInitializeGit(s.projectPath),installElapsedMs:v}):{...s,agentElapsedMs:l,agentLaunched:u,installElapsedMs:v}}finally{p.stop()}}async function runInitCommand(r,i,a,o,s=defaultDependencies){let c;try{c=await runInitSteps({dependencies:s,logger:r,options:o,parentDirectory:i,target:a})}catch(e){if(e instanceof WizardCancelledError)return;throw e}if(c.kind===`created`){r.log(`${pc.green(`✓`)} Created an ${EVE_WORDMARK} agent in ${pc.bold(c.projectPath)} ${pc.dim(`in ${formatElapsed(c.agentElapsedMs)}`)}`);for(let e of c.workspaceRootMutations)r.log(pc.yellow(`⚠ ${formatWorkspaceRootMutationWarning(e)}`))}else r.log(`${pc.green(`✓`)} Added an ${EVE_WORDMARK} agent to ${pc.bold(c.projectPath)} ${pc.dim(`in ${formatElapsed(c.agentElapsedMs)}`)}`);r.log(`${pc.green(`✓`)} Installed dependencies ${pc.dim(`in ${formatElapsed(c.installElapsedMs)}`)}`),c.kind===`created`&&c.gitResult.kind===`failed`&&(r.error(pc.yellow(`Git initialization failed during ${c.gitResult.stage}: ${c.gitResult.reason}`)),c.gitResult.stage===`commit`&&r.error(pc.yellow(`The eve agent was created successfully. Git repository metadata and staged files were preserved at "${c.projectPath}"; the initial commit is optional.\n\nTo create it later, configure Git identity and run:\n git -C ${JSON.stringify(c.projectPath)} commit -m "Initial commit from eve"`)));let l=[...eveDevArguments(c.packageManager)],u=[c.packageManager,...l].join(` `),d=initAgentDevHandoff({projectPath:c.projectPath,devCommand:u});if(c.agentLaunched){r.log(initAgentReadySummary(o.model,c.projectPath)),r.log(d);return}let f;try{f=await s.selectInitHandoff({agentName:basename(c.projectPath)})}catch(e){if(e instanceof WizardCancelledError)return;throw e}if(f===`exit`)return;if(f!==`eve-dev`){if(r.log(pc.dim(`$ ${f}`)),!await s.spawnCodingAgentRepl({command:f,cwd:c.projectPath,prompt:initAgentReplPrompt({devCommand:u}),onPromptUnseeded:e=>{r.log(pc.yellow(`Could not seed ${f} automatically. Paste this prompt into it:`)),r.log(e)}}))throw Error(`Coding-agent REPL exited unsuccessfully in "${c.projectPath}".`);return}let p=c.kind===`created`,m=p?[...l,`--input`,`/model`]:l;if(r.log(pc.dim(p?`$ eve dev --input /model`:`$ eve dev`)),!resultSucceeded(await s.spawnPackageManager(c.packageManager,c.projectPath,m)))throw Error(`Development server exited unsuccessfully in "${c.projectPath}".`)}function resolveInitEvePackageOverride(){let e=process.env[EVE_INIT_PACKAGE_SPEC_ENV]?.trim();if(!(e===void 0||e.length===0))return{nodeEngine:DEFAULT_EVE_PACKAGE_CONTRACT.nodeEngine,version:e}}export{EVE_INIT_PACKAGE_SPEC_ENV,runInitCommand};
|
|
1
|
+
import{initAgentDevHandoff,initAgentReadySummary,initAgentReplPrompt}from"./agent-instructions.js";import{tryInitializeGit}from"./init-git.js";import{confirmInitInNonEmptyDirectory}from"./init-confirm.js";import{cleanupFreshInitTarget,workspaceFailureNote}from"./init-recovery.js";import{selectInitHandoff,spawnCodingAgentRepl}from"./init-repl.js";import{resolveInitTarget}from"./init-target.js";import{mkdtemp,readdir,rename,rm}from"node:fs/promises";import{createLogger,isLogLevelEnabled}from"#internal/logging.js";import{basename,join,relative,resolve}from"node:path";import pc from"#compiled/picocolors/index.js";import{DEFAULT_AGENT_MODEL_ID}from"#shared/default-agent-model.js";import{ensureChannel,scaffoldBaseProject}from"#setup/scaffold/index.js";import{eveDevArguments,packageManagerInstallFailureMessage,packageManagerInstallSucceeded,resultSucceeded,runPackageManagerInstall,spawnPackageManager}from"#setup/primitives/index.js";import{performance}from"node:perf_hooks";import{isCodingAgentLaunch}from"#cli/agent-detection.js";import{EVE_WORDMARK}from"#cli/banner.js";import{formatElapsed}from"#cli/format-elapsed.js";import{startCliLiveRow}from"#cli/ui/live-row.js";import{formatNodeEngineOverrideWarning}from"#setup/node-engine.js";import{detectInvokingPackageManager,detectPackageManager}from"#setup/package-manager.js";import{pathExists}from"#setup/path-exists.js";import{DEFAULT_EVE_PACKAGE_CONTRACT}from"#setup/scaffold/create/project.js";import{addAgentToProject}from"#setup/scaffold/create/add-to-project.js";import{WizardCancelledError}from"#setup/step.js";import{validateModelSlug}from"#setup/flows/model-source-change.js";import{isPackageManagerWorkspaceMember}from"#setup/scaffold/workspace-root.js";const defaultDependencies={addAgentToProject,confirmInitInNonEmptyDirectory,detectInvokingPackageManager,detectPackageManager,ensureChannel,isCodingAgentLaunch,now:()=>performance.now(),runPackageManagerInstall,scaffoldBaseProject,selectInitHandoff,spawnCodingAgentRepl,spawnPackageManager,tryInitializeGit,validateModelSlug},EVE_INIT_PACKAGE_SPEC_ENV=`EVE_INIT_PACKAGE_SPEC`,initLog=createLogger(`init`);async function moveDirectoryContents(e,t){for(let n of await readdir(e))await rename(join(e,n),join(t,n))}function uniqueWorkspaceRootMutations(e){let t=new Map;for(let n of e){let e=`${n.kind}:${n.path}`,r=t.get(e);t.set(e,{...n,nodeEngineOverride:n.nodeEngineOverride??r?.nodeEngineOverride})}return[...t.values()]}function formatWorkspaceRootMutationWarning(e){let t=e.kind===`package-json`?`package.json`:`configuration`,n=e.nodeEngineOverride===void 0?``:` (${formatNodeEngineOverrideWarning(e.nodeEngineOverride)})`;return`Updated workspace root ${t} at ${e.path}${n}`}async function addToExistingProject(e,t,n,r){if(t.channelWebNextjs===!0)throw Error("`--channel-web-nextjs` is not supported when adding an agent to an existing project. Run `eve add channel/web` from the project afterwards instead.");if(t.model!==void 0){let r=await n.validateModelSlug(e,t.model);if(r!==null)throw Error(r)}let i=await n.detectPackageManager(e),a=await n.addAgentToProject({projectRoot:e,model:t.model??DEFAULT_AGENT_MODEL_ID,reasoning:t.reasoning,packageManager:i.kind,evePackage:r});return{configurationFilesChanged:a.configurationFilesChanged,dependenciesAdded:a.dependenciesAdded,filesWritten:a.filesWritten,packageManager:i.kind,nodeEngineOverride:a.nodeEngineOverride}}async function resolveScaffoldPackageManager(e,t){let n=await t.detectPackageManager(e);return n.source==="default"?t.detectInvokingPackageManager()??`pnpm`:n.kind}async function scaffoldProject(e,t,n,r,i,a,o,s){let c=resolve(e,`..`),l=!n&&await pathExists(e)&&(await readdir(e)).length===0;if(!n&&await pathExists(e)&&!l)throw Error(`Cannot create project because "${e}" already exists.`);let m=n&&s?void 0:await mkdtemp(join(c,`.eve-init-`)),h=[];try{let c=m??e;if(i.model!==void 0){let e=await a.validateModelSlug(c,i.model);if(e!==null)throw Error(e)}let u={projectName:m===void 0?`.`:n?basename(e):t,model:i.model??DEFAULT_AGENT_MODEL_ID,reasoning:i.reasoning,evePackage:o,targetDirectory:c,overwriteExisting:s,workspaceProbeDirectory:e,packageManager:r,onWorkspaceRootMutation:e=>{h.push(e)}},d=await a.scaffoldBaseProject(u);return i.channelWebNextjs===!0&&await a.ensureChannel({projectRoot:d,kind:`web`,packageManager:r,force:s,workspaceProbeDirectory:e,configureVercelServices:!1,onWorkspaceRootMutation:e=>{h.push(e)}}),m!==void 0&&(n||l?await moveDirectoryContents(d,e):await rename(d,e)),{projectPath:e,workspaceRootMutations:uniqueWorkspaceRootMutations(h)}}finally{m!==void 0&&await rm(m,{recursive:!0,force:!0})}}function installProgressDetail(e,t){let n=t.text.trim();if(n===``||e!==`npm`)return n||void 0;let r=/^npm silly fetch manifest (.+)$/u.exec(n);if(r!==null)return`Resolving ${r[1]}`;let i=/^npm http fetch \S+ \S+ attempt (\d+) failed with (\S+)$/u.exec(n);if(i!==null)return`npm registry · attempt ${i[1]} failed: ${i[2]}`;if(t.stream===`stdout`||/^npm (?:error|warn)\b/u.test(n))return n}const NPM_NOISE_LINE=/^\s*npm (?:silly|verbose|http|timing)\b/u;function reportExistingProjectChanges(e,t){e.log(`Updated existing project:`);for(let n of t.filesWritten)e.log(` Created ${relative(t.projectPath,n).replaceAll(`\\`,`/`)}`);t.dependenciesAdded.length>0&&e.log(` Added dependencies: ${t.dependenciesAdded.join(`, `)}`);for(let n of t.configurationFilesChanged)e.log(` Updated ${n}`);t.nodeEngineOverride!==void 0&&e.log(pc.yellow(` ⚠ ${formatNodeEngineOverrideWarning(t.nodeEngineOverride)}`))}async function runInitSteps(e){let{dependencies:t,logger:n,options:r,parentDirectory:i,target:s}=e,c=isLogLevelEnabled(`debug`),u=await t.isCodingAgentLaunch(),d=await resolveInitTarget({parentDirectory:i,target:s}),f=resolveInitEvePackageOverride(),p=startCliLiveRow(n);p.update(`Preparing project`);try{let e=d.kind===`fresh`?`creating agent`:`adding agent`;p.update(d.kind===`fresh`?`Creating agent`:`Adding agent`),initLog.debug(e);let i=t.now(),s;if(d.kind===`fresh`){let e=await resolveScaffoldPackageManager(d.projectPath,t),n=isPackageManagerWorkspaceMember(e,d.projectPath),i;try{i=await scaffoldProject(d.projectPath,d.projectName,d.createInPlace,e,r,t,f,d.overwriteExisting)}catch(e){if(d.failurePolicy===`clear`){let t=await cleanupFreshInitTarget(d.projectPath,d.failurePolicy,d.preservedEntries),r=e instanceof Error?e.message:String(e),i=t?`eve restored "${d.projectPath}" to its original state.`:`eve could not completely clean "${d.projectPath}".`;throw Error(`${r}\n\n${i}${workspaceFailureNote(n)}`)}if(d.failurePolicy===`remove`&&n){let t=e instanceof Error?e.message:String(e);throw Error(`${t}${workspaceFailureNote(!0)}`)}throw e}s={failurePolicy:d.failurePolicy,kind:`created`,packageManager:e,preservedTargetEntries:d.preservedEntries,projectPath:i.projectPath,retryCommand:`eve init ${d.projectPath}`,workspaceMember:n,workspaceRootMutations:i.workspaceRootMutations}}else{let e=await addToExistingProject(d.projectPath,r,t,f);s=e.nodeEngineOverride===void 0?{configurationFilesChanged:e.configurationFilesChanged,dependenciesAdded:e.dependenciesAdded,failurePolicy:`preserve`,filesWritten:e.filesWritten,kind:`added`,packageManager:e.packageManager,projectPath:d.projectPath}:{configurationFilesChanged:e.configurationFilesChanged,dependenciesAdded:e.dependenciesAdded,failurePolicy:`preserve`,filesWritten:e.filesWritten,kind:`added`,nodeEngineOverride:e.nodeEngineOverride,packageManager:e.packageManager,projectPath:d.projectPath}}let l=t.now()-i;initLog.debug(`${e} done`,{ms:l}),s.kind===`added`&&(p.stop(),reportExistingProjectChanges(n,s),p=startCliLiveRow(n)),p.update(`Installing dependencies`,`${s.packageManager} install`),initLog.debug(`installing dependencies with ${s.packageManager}`);let m=t.now(),h=[],g=[],_=await t.runPackageManagerInstall(s.packageManager,s.projectPath,{progressDetails:process.stdout.isTTY===!0&&!c,onOutput:e=>{e.text.trim()!==``&&(g.push(e.text),g.length>20&&g.shift(),NPM_NOISE_LINE.test(e.text)||h.push(e.text)),c&&initLog.debug(e.text);let t=installProgressDetail(s.packageManager,e);t!==void 0&&p.update(`Installing dependencies`,t)}}),v=t.now()-m;if(!packageManagerInstallSucceeded(_)){initLog.debug(`dependency installation failed`,{ms:v}),p.stop();let e=h.length>0?h:g;for(let t of e)n.error(t);if(e.length===0){let e=packageManagerInstallFailureMessage(_);e!==void 0&&n.error(e)}if(s.failurePolicy!==`preserve`){if(await cleanupFreshInitTarget(s.projectPath,s.failurePolicy,s.preservedTargetEntries)){let e=s.failurePolicy===`remove`?`eve removed the incomplete project at "${s.projectPath}".`:`eve restored "${s.projectPath}" to its original state.`,t=s.workspaceMember||s.workspaceRootMutations.length>0;throw Error(`Failed to install dependencies.\n\n${e}\n\nResolve the package-manager error above, then retry:\n ${s.retryCommand}${workspaceFailureNote(t)}`)}let e=s.workspaceMember||s.workspaceRootMutations.length>0;throw Error(`Failed to install dependencies, and eve could not completely clean "${s.projectPath}".\n\nResolve the package-manager error above, then install dependencies with ${s.packageManager} in that directory. Or clean the target manually before rerunning eve init.${workspaceFailureNote(e)}`)}throw Error(`The eve agent was added, but dependency installation failed.\n\nResolve the package-manager error above, then install dependencies with ${s.packageManager} in "${s.projectPath}".\n\nDo not rerun eve init; the agent is already configured.`)}return initLog.debug(`dependencies installed`,{ms:v}),s.kind===`created`?(p.update(`Initializing Git repository`),initLog.debug(`initializing git repository`),{...s,agentElapsedMs:l,agentLaunched:u,gitResult:await t.tryInitializeGit(s.projectPath),installElapsedMs:v}):{...s,agentElapsedMs:l,agentLaunched:u,installElapsedMs:v}}finally{p.stop()}}async function runInitCommand(r,i,a,o,s=defaultDependencies){let c;try{c=await runInitSteps({dependencies:s,logger:r,options:o,parentDirectory:i,target:a})}catch(e){if(e instanceof WizardCancelledError)return;throw e}if(c.kind===`created`){r.log(`${pc.green(`✓`)} Created an ${EVE_WORDMARK} agent in ${pc.bold(c.projectPath)} ${pc.dim(`in ${formatElapsed(c.agentElapsedMs)}`)}`);for(let e of c.workspaceRootMutations)r.log(pc.yellow(`⚠ ${formatWorkspaceRootMutationWarning(e)}`))}else r.log(`${pc.green(`✓`)} Added an ${EVE_WORDMARK} agent to ${pc.bold(c.projectPath)} ${pc.dim(`in ${formatElapsed(c.agentElapsedMs)}`)}`);r.log(`${pc.green(`✓`)} Installed dependencies ${pc.dim(`in ${formatElapsed(c.installElapsedMs)}`)}`),c.kind===`created`&&c.gitResult.kind===`failed`&&(r.error(pc.yellow(`Git initialization failed during ${c.gitResult.stage}: ${c.gitResult.reason}`)),c.gitResult.stage===`commit`&&r.error(pc.yellow(`The eve agent was created successfully. Git repository metadata and staged files were preserved at "${c.projectPath}"; the initial commit is optional.\n\nTo create it later, configure Git identity and run:\n git -C ${JSON.stringify(c.projectPath)} commit -m "Initial commit from eve"`)));let l=[...eveDevArguments(c.packageManager)],u=[c.packageManager,...l].join(` `),d=initAgentDevHandoff({projectPath:c.projectPath,devCommand:u});if(c.agentLaunched){r.log(initAgentReadySummary(o.model,c.projectPath)),r.log(d);return}let f;try{f=await s.selectInitHandoff({agentName:basename(c.projectPath)})}catch(e){if(e instanceof WizardCancelledError)return;throw e}if(f===`exit`)return;if(f!==`eve-dev`){if(r.log(pc.dim(`$ ${f}`)),!await s.spawnCodingAgentRepl({command:f,cwd:c.projectPath,prompt:initAgentReplPrompt({devCommand:u}),onPromptUnseeded:e=>{r.log(pc.yellow(`Could not seed ${f} automatically. Paste this prompt into it:`)),r.log(e)}}))throw Error(`Coding-agent REPL exited unsuccessfully in "${c.projectPath}".`);return}let p=c.kind===`created`?[...l,`--onboard`]:l;if(r.log(pc.dim(`$ eve dev`)),!resultSucceeded(await s.spawnPackageManager(c.packageManager,c.projectPath,p)))throw Error(`Development server exited unsuccessfully in "${c.projectPath}".`)}function resolveInitEvePackageOverride(){let e=process.env[EVE_INIT_PACKAGE_SPEC_ENV]?.trim();if(!(e===void 0||e.length===0))return{nodeEngine:DEFAULT_EVE_PACKAGE_CONTRACT.nodeEngine,version:e}}export{EVE_INIT_PACKAGE_SPEC_ENV,runInitCommand};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cleanupCreatedConnectionConnector, setupConnectionConnector } from "#setup/connection-connector.js";
|
|
1
|
+
import { cleanupCreatedConnectionConnector, setupConnectionConnector, type ConnectPrincipalType } from "#setup/connection-connector.js";
|
|
2
2
|
import { ensureVercelProject, type EnsureVercelProjectDeps } from "#setup/flows/ensure-vercel-project.js";
|
|
3
3
|
import { readProjectLink } from "#setup/project-resolution.js";
|
|
4
4
|
import { type Prompter } from "#setup/prompter.js";
|
|
@@ -7,6 +7,7 @@ import type { RegistryCommandLogger } from "./registry.js";
|
|
|
7
7
|
export interface IntegrationConnectOptions {
|
|
8
8
|
creationType?: string;
|
|
9
9
|
connectionMethod?: "mcp" | "oauth";
|
|
10
|
+
principalType?: ConnectPrincipalType;
|
|
10
11
|
nonInteractive?: boolean;
|
|
11
12
|
signal?: AbortSignal;
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{serializeHeadlessSetupEvent}from"./setup-headless.js";import{join}from"node:path";import{createPrompter}from"#setup/prompter.js";import{WizardCancelledError}from"#setup/step.js";import{cleanupCreatedConnectionConnector,setupConnectionConnector}from"#setup/connection-connector.js";import{ensureVercelProject}from"#setup/flows/ensure-vercel-project.js";import{createHeadlessPrompter}from"#setup/headless.js";import{SetupPrerequisiteRequired}from"#setup/integrations/shared/prerequisite.js";import{resolveIntegrationVercelProject}from"#setup/integrations/shared/vercel-project.js";import{readProjectLink}from"#setup/project-resolution.js";import{createRegistrySetupClient}from"#setup/registry-setup-client.js";import{updateConnectionConnectorUid}from"#setup/scaffold/update/update-connection-connector.js";const defaultDependencies={ensureVercelProject,readProjectLink,setupConnectionConnector,cleanupCreatedConnectionConnector,updateConnectionConnectorUid};async function runIntegrationConnect(e){let i={...defaultDependencies,...e.dependencies},a=e.options?.nonInteractive===!0,o=i.createPrompter?.()??(a?createHeadlessPrompter(()=>{}):createPrompter()),s=e.options?.signal;o.intro(`Set up ${e.slug}`);let l=await i.readProjectLink(e.appRoot);if(l===void 0)if(a)l=await resolveIntegrationVercelProject({appRoot:e.appRoot,integration:e.slug,signal:s,deps:{readProjectLink:i.readProjectLink}});else try{l=await i.ensureVercelProject({appRoot:e.appRoot,prompter:o,signal:s,teamSelectMessage:()=>`You need to link to a project to use ${e.slug} through Vercel Connect.\n\nSelect your team`,deps:i.ensureVercelProjectDeps})}catch(e){if(e instanceof WizardCancelledError)return;throw e}let u={log:o.log,prompter:o,projectRoot:e.appRoot,slug:e.slug,service:e.service,creationType:e.options?.creationType,connectionMethod:e.options?.connectionMethod,canonicalConnectorName:e.canonicalConnectorName??e.slug,project:l,signal:s},d=await i.setupConnectionConnector(u),f=join(e.appRoot,`agent`,`connections`,`${e.slug}.ts`);if(!(await i.updateConnectionConnectorUid(f,d.connectorUid)).patched)throw d.kind===`created`&&await i.cleanupCreatedConnectionConnector({log:o.log,projectRoot:e.appRoot,connectorId:d.connectorId,orgId:l.orgId}),Error(`Could not update the connector in agent/connections/${e.slug}.ts.`);o.outro(`Connection ${e.slug} set up.`)}async function runIntegrationConnectCommand(t,r,i,a,o,c={},l=defaultDependencies){let d=createRegistrySetupClient({signal:c.signal});try{await runIntegrationConnect({appRoot:r,slug:i,service:a,canonicalConnectorName:o,options:c,dependencies:{...l,createPrompter:()=>d?.prompter??(c.nonInteractive?createHeadlessPrompter(()=>{}):l.createPrompter?.()??createPrompter())}}),d?.complete()}catch(n){if(d?.fail(n),d!==void 0)return;if(c.nonInteractive&&n instanceof SetupPrerequisiteRequired){t.error(serializeHeadlessSetupEvent({version:1,type:`blocked`,status:`prerequisite_required`,prerequisite:n.prerequisite})),process.exitCode=2;return}t.error(n instanceof Error?n.message:String(n)),process.exitCode=1}}export{runIntegrationConnect,runIntegrationConnectCommand};
|
|
1
|
+
import{serializeHeadlessSetupEvent}from"./setup-headless.js";import{join}from"node:path";import{createPrompter}from"#setup/prompter.js";import{WizardCancelledError}from"#setup/step.js";import{cleanupCreatedConnectionConnector,setupConnectionConnector}from"#setup/connection-connector.js";import{ensureVercelProject}from"#setup/flows/ensure-vercel-project.js";import{createHeadlessPrompter}from"#setup/headless.js";import{SetupPrerequisiteRequired}from"#setup/integrations/shared/prerequisite.js";import{resolveIntegrationVercelProject}from"#setup/integrations/shared/vercel-project.js";import{readProjectLink}from"#setup/project-resolution.js";import{createRegistrySetupClient}from"#setup/registry-setup-client.js";import{updateConnectionConnectorUid}from"#setup/scaffold/update/update-connection-connector.js";const defaultDependencies={ensureVercelProject,readProjectLink,setupConnectionConnector,cleanupCreatedConnectionConnector,updateConnectionConnectorUid};async function runIntegrationConnect(e){let i={...defaultDependencies,...e.dependencies},a=e.options?.nonInteractive===!0,o=i.createPrompter?.()??(a?createHeadlessPrompter(()=>{}):createPrompter()),s=e.options?.signal;o.intro(`Set up ${e.slug}`);let l=await i.readProjectLink(e.appRoot);if(l===void 0)if(a)l=await resolveIntegrationVercelProject({appRoot:e.appRoot,integration:e.slug,signal:s,deps:{readProjectLink:i.readProjectLink}});else try{l=await i.ensureVercelProject({appRoot:e.appRoot,prompter:o,signal:s,teamSelectMessage:()=>`You need to link to a project to use ${e.slug} through Vercel Connect.\n\nSelect your team`,deps:i.ensureVercelProjectDeps})}catch(e){if(e instanceof WizardCancelledError)return;throw e}let u={log:o.log,prompter:o,projectRoot:e.appRoot,slug:e.slug,service:e.service,creationType:e.options?.creationType,connectionMethod:e.options?.connectionMethod,principalType:e.options?.principalType,canonicalConnectorName:e.canonicalConnectorName??e.slug,project:l,signal:s},d=await i.setupConnectionConnector(u),f=join(e.appRoot,`agent`,`connections`,`${e.slug}.ts`);if(!(await i.updateConnectionConnectorUid(f,d.connectorUid)).patched)throw d.kind===`created`&&await i.cleanupCreatedConnectionConnector({log:o.log,projectRoot:e.appRoot,connectorId:d.connectorId,orgId:l.orgId}),Error(`Could not update the connector in agent/connections/${e.slug}.ts.`);o.outro(`Connection ${e.slug} set up.`)}async function runIntegrationConnectCommand(t,r,i,a,o,c={},l=defaultDependencies){let d=createRegistrySetupClient({signal:c.signal});try{await runIntegrationConnect({appRoot:r,slug:i,service:a,canonicalConnectorName:o,options:c,dependencies:{...l,createPrompter:()=>d?.prompter??(c.nonInteractive?createHeadlessPrompter(()=>{}):l.createPrompter?.()??createPrompter())}}),d?.complete()}catch(n){if(d?.fail(n),d!==void 0)return;if(c.nonInteractive&&n instanceof SetupPrerequisiteRequired){t.error(serializeHeadlessSetupEvent({version:1,type:`blocked`,status:`prerequisite_required`,prerequisite:n.prerequisite})),process.exitCode=2;return}t.error(n instanceof Error?n.message:String(n)),process.exitCode=1}}export{runIntegrationConnect,runIntegrationConnectCommand};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Command } from "#compiled/commander/index.js";
|
|
2
2
|
import { type CliApplicationContext } from "#cli/application-command.js";
|
|
3
|
+
import type { ConnectPrincipalType } from "#setup/connection-connector.js";
|
|
3
4
|
interface IntegrationCommandLogger {
|
|
4
5
|
error(message: string): void;
|
|
5
6
|
log(message: string): void;
|
|
6
7
|
}
|
|
8
|
+
export declare function parseConnectPrincipalType(value: string): ConnectPrincipalType;
|
|
7
9
|
/** Registers hidden built-in integration setup commands used by trusted registry items. */
|
|
8
10
|
export declare function registerIntegrationCommands(input: {
|
|
9
11
|
program: Command;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseSetupAnswer}from"./setup-answers.js";import{applicationCommand}from"#cli/application-command.js";function registerIntegrationCommands(
|
|
1
|
+
import{parseSetupAnswer}from"./setup-answers.js";import{InvalidArgumentError}from"#compiled/commander/index.js";import{applicationCommand}from"#cli/application-command.js";function parseConnectPrincipalType(e){if(e===`app`||e===`user`)return e;throw new InvalidArgumentError(`Expected principal type "app" or "user".`)}function registerIntegrationCommands(t){let{applicationContext:r,logger:i,program:a}=t,o=a.command(`integration`,{hidden:!0});applicationCommand(o.command(`setup <kind>`),r).option(`-y, --yes`).option(`--non-interactive`,`Run without interactive prompts, instead emit structured NDJSON when further input is required`).option(`--answer <key=value>`,`Answer a setup question; requires --non-interactive.`,parseSetupAnswer,{}).action(async(e,t)=>{let{runIntegrationSetupCommand:n}=await import(`./integration-setup.js`);await n(i,r.root,e,{yes:t.yes,nonInteractive:t.nonInteractive,answers:t.answer})}),applicationCommand(o.command(`connect <slug> <service> [canonical-name]`),r).option(`-y, --yes`).option(`--creation-type <type>`,`Select the Vercel Connect creation type.`).option(`--connection-method <method>`,`Select the Vercel Connect connection method.`).option(`--principal-type <type>`,`Require app- or user-scoped Vercel Connect credentials.`,parseConnectPrincipalType).option(`--non-interactive`,`Run without interactive prompts, instead emit structured NDJSON when further input is required`).action(async(e,t,n,a)=>{let{runIntegrationConnectCommand:o}=await import(`./integration-connect.js`);await o(i,r.root,e,t,n,a)})}export{parseConnectPrincipalType,registerIntegrationCommands};
|
|
@@ -6,6 +6,16 @@ declare const EveRegistryMetadataSchema: z.ZodObject<{
|
|
|
6
6
|
"chat-sdk": "chat-sdk";
|
|
7
7
|
native: "native";
|
|
8
8
|
}>>;
|
|
9
|
+
install: z.ZodOptional<z.ZodObject<{
|
|
10
|
+
pnpm: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
buildScripts: z.ZodArray<z.ZodObject<{
|
|
12
|
+
packages: z.ZodArray<z.ZodString>;
|
|
13
|
+
optional: z.ZodLiteral<true>;
|
|
14
|
+
recommendedAction: z.ZodLiteral<"ignore-optional">;
|
|
15
|
+
reason: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
9
19
|
setup: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
|
|
10
20
|
package: z.ZodString;
|
|
11
21
|
bin: z.ZodString;
|
|
@@ -40,6 +50,16 @@ export declare function eveMetadataFromRegistryItem(item: unknown): {
|
|
|
40
50
|
requires?: string | undefined;
|
|
41
51
|
docs?: string | undefined;
|
|
42
52
|
implementation?: "chat-sdk" | "native" | undefined;
|
|
53
|
+
install?: {
|
|
54
|
+
pnpm?: {
|
|
55
|
+
buildScripts: {
|
|
56
|
+
packages: string[];
|
|
57
|
+
optional: true;
|
|
58
|
+
recommendedAction: "ignore-optional";
|
|
59
|
+
reason: string;
|
|
60
|
+
}[];
|
|
61
|
+
} | undefined;
|
|
62
|
+
} | undefined;
|
|
43
63
|
setup?: {
|
|
44
64
|
package: string;
|
|
45
65
|
bin: string;
|
|
@@ -61,6 +81,16 @@ export declare function parseRegistryPresentationManifest(input: unknown): {
|
|
|
61
81
|
requires?: string | undefined;
|
|
62
82
|
docs?: string | undefined;
|
|
63
83
|
implementation?: "chat-sdk" | "native" | undefined;
|
|
84
|
+
install?: {
|
|
85
|
+
pnpm?: {
|
|
86
|
+
buildScripts: {
|
|
87
|
+
packages: string[];
|
|
88
|
+
optional: true;
|
|
89
|
+
recommendedAction: "ignore-optional";
|
|
90
|
+
reason: string;
|
|
91
|
+
}[];
|
|
92
|
+
} | undefined;
|
|
93
|
+
} | undefined;
|
|
64
94
|
setup?: {
|
|
65
95
|
package: string;
|
|
66
96
|
bin: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{RegistryPackageComponentSchema}from"./registry-package.js";import{z}from"#compiled/zod/index.js";const RegistrySetupSchema=z.object({package:z.string().min(1),bin:z.string().min(1),args:z.array(z.string()).default([])}),EveRegistryMetadataSchema=z.object({requires:z.string().optional(),docs:z.string().min(1).optional(),implementation:z.enum([`native`,`chat-sdk`]).optional(),setup:z.union([RegistrySetupSchema,z.array(RegistrySetupSchema).min(1)]).transform(e=>Array.isArray(e)?e:[e]).optional(),components:z.array(RegistryPackageComponentSchema).min(1).optional()}),EveRegistryItemMetadataSchema=z.object({meta:z.object({eve:EveRegistryMetadataSchema.optional()}).optional()}),OfficialRegistryCatalogSchema=z.object({items:z.array(z.object({name:z.string().min(1),meta:z.object({eve:EveRegistryMetadataSchema.optional()}).optional()}))}),RegistryPresentationManifestSchema=EveRegistryItemMetadataSchema.extend({title:z.string().optional(),description:z.string().optional(),dependencies:z.array(z.string()).optional(),files:z.array(z.object({target:z.string()})).optional()});function eveMetadataFromRegistryItem(e){return EveRegistryItemMetadataSchema.parse(e).meta?.eve}function parseOfficialRegistrySearchMetadata(e){let{items:t}=OfficialRegistryCatalogSchema.parse(e),n=new Map;for(let e of t){let{docs:t,implementation:r}=e.meta?.eve??{};(t!==void 0||r!==void 0)&&n.set(e.name,{docs:t,implementation:r})}return n}function parseRegistryPresentationManifest(e){return RegistryPresentationManifestSchema.safeParse(e).data}export{eveMetadataFromRegistryItem,parseOfficialRegistrySearchMetadata,parseRegistryPresentationManifest};
|
|
1
|
+
import{RegistryPackageComponentSchema}from"./registry-package.js";import{z}from"#compiled/zod/index.js";const RegistrySetupSchema=z.object({package:z.string().min(1),bin:z.string().min(1),args:z.array(z.string()).default([])}),ExactPackageNameSchema=z.string().regex(/^(?:@[a-z0-9][a-z0-9._~-]*\/)?[a-z0-9][a-z0-9._~-]*$/u),PnpmBuildScriptPolicySchema=z.object({packages:z.array(ExactPackageNameSchema).min(1),optional:z.literal(!0),recommendedAction:z.literal(`ignore-optional`),reason:z.string().min(1)}),EveRegistryMetadataSchema=z.object({requires:z.string().optional(),docs:z.string().min(1).optional(),implementation:z.enum([`native`,`chat-sdk`]).optional(),install:z.object({pnpm:z.object({buildScripts:z.array(PnpmBuildScriptPolicySchema).min(1)}).optional()}).optional(),setup:z.union([RegistrySetupSchema,z.array(RegistrySetupSchema).min(1)]).transform(e=>Array.isArray(e)?e:[e]).optional(),components:z.array(RegistryPackageComponentSchema).min(1).optional()}),EveRegistryItemMetadataSchema=z.object({meta:z.object({eve:EveRegistryMetadataSchema.optional()}).optional()}),OfficialRegistryCatalogSchema=z.object({items:z.array(z.object({name:z.string().min(1),meta:z.object({eve:EveRegistryMetadataSchema.optional()}).optional()}))}),RegistryPresentationManifestSchema=EveRegistryItemMetadataSchema.extend({title:z.string().optional(),description:z.string().optional(),dependencies:z.array(z.string()).optional(),files:z.array(z.object({target:z.string()})).optional()});function eveMetadataFromRegistryItem(e){return EveRegistryItemMetadataSchema.parse(e).meta?.eve}function parseOfficialRegistrySearchMetadata(e){let{items:t}=OfficialRegistryCatalogSchema.parse(e),n=new Map;for(let e of t){let{docs:t,implementation:r}=e.meta?.eve??{};(t!==void 0||r!==void 0)&&n.set(e.name,{docs:t,implementation:r})}return n}function parseRegistryPresentationManifest(e){return RegistryPresentationManifestSchema.safeParse(e).data}export{eveMetadataFromRegistryItem,parseOfficialRegistrySearchMetadata,parseRegistryPresentationManifest};
|
|
@@ -3,6 +3,7 @@ import { z } from "#compiled/zod/index.js";
|
|
|
3
3
|
import { type Prompter } from "#setup/prompter.js";
|
|
4
4
|
import type { RegistrySetupCompletion } from "#setup/registry-setup-protocol.js";
|
|
5
5
|
import type { AddCommandOptions, RegistryCommandLogger } from "./registry.js";
|
|
6
|
+
import { type DeclaredPnpmBuildPolicy } from "./registry-pnpm-build-policy-flow.js";
|
|
6
7
|
import type { RegistrySetupCommand } from "./registry-setup-command.js";
|
|
7
8
|
export declare const RegistryPackageComponentSchema: z.ZodObject<{
|
|
8
9
|
item: z.ZodString;
|
|
@@ -13,6 +14,11 @@ export declare const RegistryPackageComponentSchema: z.ZodObject<{
|
|
|
13
14
|
export type RegistryPackageComponent = z.infer<typeof RegistryPackageComponentSchema>;
|
|
14
15
|
interface PackageMetadata {
|
|
15
16
|
requires?: string;
|
|
17
|
+
install?: {
|
|
18
|
+
pnpm?: {
|
|
19
|
+
buildScripts: readonly DeclaredPnpmBuildPolicy[];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
16
22
|
setup?: RegistrySetupCommand[];
|
|
17
23
|
}
|
|
18
24
|
export interface RegistryPackageDependencies {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasInteractiveTerminal}from"./preconditions.js";import{headlessSetupContinuation,serializeHeadlessSetupEvent}from"./setup-headless.js";import{z}from"#compiled/zod/index.js";import{createPrompter}from"#setup/prompter.js";import{headlessAsker,interactiveAsker,withAnswers,withPolicy}from"#setup/ask.js";import{mergeRegistrySetupCompletions}from"#setup/registry-setup-completion.js";import{addRegistryItems,getRegistryItems}from"#compiled/shadcn-registry/index.js";const RegistryPackageComponentSchema=z.object({item:z.string().min(1),label:z.string().min(1),description:z.string().optional(),default:z.boolean().default(!1)});async function selectComponents(e,r,i,
|
|
1
|
+
import{hasInteractiveTerminal}from"./preconditions.js";import{headlessSetupContinuation,serializeHeadlessSetupEvent}from"./setup-headless.js";import{prepareDeclaredPnpmBuildPolicy}from"./registry-pnpm-build-policy-flow.js";import{z}from"#compiled/zod/index.js";import{createPrompter}from"#setup/prompter.js";import{headlessAsker,interactiveAsker,withAnswers,withPolicy}from"#setup/ask.js";import{mergeRegistrySetupCompletions}from"#setup/registry-setup-completion.js";import{addRegistryItems,getRegistryItems}from"#compiled/shadcn-registry/index.js";const RegistryPackageComponentSchema=z.object({item:z.string().min(1),label:z.string().min(1),description:z.string().optional(),default:z.boolean().default(!1)});async function selectComponents(e,r,i,a,u,d){if(a.prompter===void 0&&!a.nonInteractive&&(a.yes===!0||!u))return i.filter(e=>e.default);let f={key:`components`,message:`Add ${r}`,required:!0,recommended:i.filter(e=>e.default),options:i.map(e=>({id:e.item,value:e,label:e.label,hint:e.description}))},p=a.nonInteractive?withAnswers(a.answers??{})(a.yes?withPolicy(`assume`)(headlessAsker()):headlessAsker()):interactiveAsker(d());try{return await p.askMany(f)}catch(i){if(!a.nonInteractive||!(i instanceof Error)||i.name!==`InteractionRequired`)throw i;let o=i.question,{setupQuestionToWire:s}=await import(`#setup/setup-question-wire.js`),c=s(o);e.error(serializeHeadlessSetupEvent({version:1,type:`blocked`,status:`input_required`,item:r,installed:!1,completedItems:[],question:c,next:headlessSetupContinuation({item:r,installed:!1,answers:a.answers,question:c})})),process.exitCode=2;return}}async function runRegistryPackage(t){let{logger:n,appRoot:i,item:o,components:s,config:c,options:l,dependencies:p,operations:m}=t,h=p.hasInteractiveTerminal?.()??hasInteractiveTerminal(),g=l.prompter,getPrompter=()=>g??=p.createPrompter?.()??createPrompter(),_=await selectComponents(n,o,s,l,h,getPrompter);if(_===void 0)return!1;let v=_.map(e=>m.itemAddress(e.item)),y=await getRegistryItems(v,{config:c});if(y.length!==_.length)throw Error(`Registry package "${o}" could not resolve all selected components.`);let b=y.map(e=>{let t=m.metadata(e);return m.assertCompatibleVersion(t?.requires),t});if(l.skipInstall!==!0&&!await prepareDeclaredPnpmBuildPolicy({logger:n,appRoot:i,item:o,policies:b.flatMap(e=>e?.install?.pnpm?.buildScripts??[]),options:l}))return!1;l.skipInstall!==!0&&await addRegistryItems(v,{config:c,cwd:i,overwrite:l.overwrite,silent:l.silent});let x={facts:[]};if(l.skipSetup===!0)return x;if(!l.nonInteractive&&l.yes!==!0&&l.prompter===void 0&&!h)return n.log(m.setupReminder(o)),x;for(let e of b){if(e?.setup===void 0)continue;let t=await m.runSetups({item:o,setups:e.setup,prompter:getPrompter()});if(t===!1)return!1;x=mergeRegistrySetupCompletions(x,t)}return x}export{RegistryPackageComponentSchema,runRegistryPackage};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { detectPackageManager } from "#setup/package-manager.js";
|
|
2
|
+
import { type Prompter } from "#setup/prompter.js";
|
|
3
|
+
import type { RegistryCommandLogger } from "./registry-recovery.js";
|
|
4
|
+
import { applyPnpmBuildPolicy, inspectPnpmBuildPolicy } from "./registry-pnpm-build-policy.js";
|
|
5
|
+
export interface DeclaredPnpmBuildPolicy {
|
|
6
|
+
readonly packages: readonly string[];
|
|
7
|
+
readonly optional: true;
|
|
8
|
+
readonly recommendedAction: "ignore-optional";
|
|
9
|
+
readonly reason: string;
|
|
10
|
+
}
|
|
11
|
+
interface PnpmBuildPolicyFlowDependencies {
|
|
12
|
+
readonly detectPackageManager: typeof detectPackageManager;
|
|
13
|
+
readonly inspectPnpmBuildPolicy: typeof inspectPnpmBuildPolicy;
|
|
14
|
+
readonly applyPnpmBuildPolicy: typeof applyPnpmBuildPolicy;
|
|
15
|
+
readonly createPrompter: () => Prompter;
|
|
16
|
+
}
|
|
17
|
+
/** Resolves declared pnpm build-script decisions before registry installation begins. */
|
|
18
|
+
export declare function prepareDeclaredPnpmBuildPolicy(input: {
|
|
19
|
+
readonly logger: RegistryCommandLogger;
|
|
20
|
+
readonly appRoot: string;
|
|
21
|
+
readonly item: string;
|
|
22
|
+
readonly policies: readonly DeclaredPnpmBuildPolicy[] | undefined;
|
|
23
|
+
readonly options: {
|
|
24
|
+
readonly yes?: boolean;
|
|
25
|
+
readonly nonInteractive?: boolean;
|
|
26
|
+
readonly answers?: Readonly<Record<string, unknown>>;
|
|
27
|
+
readonly prompter?: Prompter;
|
|
28
|
+
};
|
|
29
|
+
}, dependencyOverrides?: Partial<PnpmBuildPolicyFlowDependencies>): Promise<boolean>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{headlessSetupContinuation,serializeHeadlessSetupEvent}from"./setup-headless.js";import{applyPnpmBuildPolicy,inspectPnpmBuildPolicy}from"./registry-pnpm-build-policy.js";import{createPrompter}from"#setup/prompter.js";import{detectPackageManager}from"#setup/package-manager.js";import{WizardCancelledError}from"#setup/step.js";const PNPM_BUILD_POLICY_ANSWER_KEY=`install.pnpm.buildScripts`;function pnpmBuildPolicyChoice(e){return e===`ignore-optional`||e===`allow-builds`||e===`abort`?e:void 0}async function prepareDeclaredPnpmBuildPolicy(a,o={}){if(a.policies===void 0||a.policies.length===0)return!0;let s={detectPackageManager:o.detectPackageManager??detectPackageManager,inspectPnpmBuildPolicy:o.inspectPnpmBuildPolicy??inspectPnpmBuildPolicy,applyPnpmBuildPolicy:o.applyPnpmBuildPolicy??applyPnpmBuildPolicy,createPrompter:o.createPrompter??createPrompter};if((await s.detectPackageManager(a.appRoot)).kind!==`pnpm`)return!0;for(let t of a.policies){let n=await s.inspectPnpmBuildPolicy(a.appRoot,t.packages);if(n.satisfied)continue;let r=a.options.answers?.[PNPM_BUILD_POLICY_ANSWER_KEY],i=pnpmBuildPolicyChoice(r);if(r!==void 0&&i===void 0)throw Error(`${PNPM_BUILD_POLICY_ANSWER_KEY} must be "ignore-optional", "allow-builds", or "abort".`);if(a.options.nonInteractive&&i===void 0&&a.options.yes!==!0){let n={key:PNPM_BUILD_POLICY_ANSWER_KEY,kind:`select`,message:`How should pnpm handle these optional packages?`,required:!0,recommended:t.recommendedAction,options:[{id:`ignore-optional`,label:`Ignore optional packages`},{id:`allow-builds`,label:`Allow build scripts`},{id:`abort`,label:`Abort add`}]};return a.logger.error(serializeHeadlessSetupEvent({version:1,type:`blocked`,item:a.item,installed:!1,completedItems:[],status:`input_required`,question:n,next:headlessSetupContinuation({item:a.item,installed:!1,question:n})})),process.exitCode=2,!1}if(i===void 0&&a.options.yes===!0&&(i=t.recommendedAction),i===void 0){let e=a.options.prompter??s.createPrompter();try{i=await e.select({message:`How should pnpm handle these optional packages?`,description:t.reason,metadata:[{label:`Packages`,value:t.packages.join(`, `)},{label:`Policy file`,value:n.filePath}],hintLayout:`inline`,initialValue:t.recommendedAction,options:[{value:`ignore-optional`,label:`Ignore optional packages (recommended)`,hint:`Add the item without installing these packages or running their build scripts.`},{value:`allow-builds`,label:`Allow build scripts`,hint:`Install these packages and allow their third-party build scripts to run.`},{value:`abort`,label:`Abort add`,hint:`Do not add this registry item.`}]})}catch(e){if(!(e instanceof WizardCancelledError))throw e;return!1}}if(i===`abort`)return a.options.nonInteractive&&a.logger.log(serializeHeadlessSetupEvent({version:1,type:`cancelled`,item:a.item,completedItems:[]})),!1;if(i===void 0)throw Error(`pnpm build policy selection is required.`);await s.applyPnpmBuildPolicy(n,i)}return!0}export{prepareDeclaredPnpmBuildPolicy};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type PnpmBuildPolicyAction = "ignore-optional" | "allow-builds";
|
|
2
|
+
export interface PnpmBuildPolicyContext {
|
|
3
|
+
readonly filePath: string;
|
|
4
|
+
readonly packages: readonly string[];
|
|
5
|
+
readonly satisfied: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Applies one explicit pnpm build policy while preserving unrelated workspace settings. */
|
|
8
|
+
export declare function withPnpmBuildPolicy(source: string, packages: readonly string[], action: PnpmBuildPolicyAction): string;
|
|
9
|
+
/** Resolves whether every package already has an explicit non-blocking pnpm policy. */
|
|
10
|
+
export declare function inspectPnpmBuildPolicy(appRoot: string, packages: readonly string[]): Promise<PnpmBuildPolicyContext>;
|
|
11
|
+
/** Persists the policy selected before the registry installation transaction begins. */
|
|
12
|
+
export declare function applyPnpmBuildPolicy(context: PnpmBuildPolicyContext, action: PnpmBuildPolicyAction): Promise<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{access,readFile,writeFile}from"node:fs/promises";import{join}from"node:path";import{PNPM_WORKSPACE_PATH,findClaimingAncestorPnpmWorkspaceRoot}from"#setup/primitives/pm/pnpm.js";function blockRange(e,t){let n=e.findIndex(e=>RegExp(`^${t}:`).test(e));if(n<0)return;if(!RegExp(`^${t}:\\s*(?:#.*)?$`).test(e[n]??``))throw Error(`Cannot safely update ${t} because it does not use block-style YAML in ${PNPM_WORKSPACE_PATH}.`);let r=n+1;for(;r<e.length&&!/^\S/u.test(e[r]??``);)r+=1;return{start:n,end:r}}function unquoteYamlScalar(e){let t=e.trim();if(t.startsWith(`"`)&&t.endsWith(`"`))try{let e=JSON.parse(t);if(typeof e==`string`)return e}catch{return t}return t.startsWith(`'`)&&t.endsWith(`'`)?t.slice(1,-1).replaceAll(`''`,`'`):t}function mappingEntry(e){let t=/^\s+("(?:[^"\\]|\\.)*"|'(?:[^']|'')*'|[^:#][^:]*?):\s*(true|false)\s*(?:#.*)?$/u.exec(e);if(t!==null)return{key:unquoteYamlScalar(t[1]),value:t[2]===`true`}}function sequenceEntry(e){let t=/^\s+-\s+(.*?)(?:\s+#.*)?$/u.exec(e);return t===null?void 0:unquoteYamlScalar(t[1])}function policyEntries(e,t,n){let r=blockRange(e,t),i=new Map;if(r===void 0)return i;for(let t of e.slice(r.start+1,r.end))if(n===`mapping`){let e=mappingEntry(t);e!==void 0&&i.set(e.key,e.value)}else{let e=sequenceEntry(t);e!==void 0&&i.set(e,!0)}return i}function removePolicyEntries(e,t,n,r){let i=blockRange(e,t);if(i===void 0)return;for(let t=i.end-1;t>i.start;--t){let i=n===`mapping`?mappingEntry(e[t]??``)?.key:sequenceEntry(e[t]??``);i!==void 0&&r.has(i)&&e.splice(t,1)}let a=blockRange(e,t);if(a!==void 0&&!e.slice(a.start+1,a.end).some(e=>(n===`mapping`?mappingEntry(e):sequenceEntry(e))!==void 0)){let t=e.slice(a.start+1,a.end).filter(e=>e.trimStart().startsWith(`#`));e.splice(a.start,a.end-a.start,...t)}}function appendPolicyEntries(e,t,n,r){let i=blockRange(e,t);if(i===void 0){for(;e.at(-1)===``;)e.pop();e.length>0&&e.push(``),e.push(`${t}:`),i={start:e.length-1,end:e.length}}let a=policyEntries(e,t,n),o=r.filter(e=>!a.has(e));if(o.length===0)return;let s=o.map(e=>n===`mapping`?` ${JSON.stringify(e)}: true`:` - ${JSON.stringify(e)}`);e.splice(i.end,0,...s)}function withPnpmBuildPolicy(e,t,n){let r=[...new Set(t)].sort(),i=new Set(r),a=e.replace(/\r\n/gu,`
|
|
2
|
+
`).split(`
|
|
3
|
+
`);for(removePolicyEntries(a,`allowBuilds`,`mapping`,i),removePolicyEntries(a,`ignoredOptionalDependencies`,`sequence`,i),n===`allow-builds`?appendPolicyEntries(a,`allowBuilds`,`mapping`,r):appendPolicyEntries(a,`ignoredOptionalDependencies`,`sequence`,r);a.at(-1)===``;)a.pop();return`${a.join(`
|
|
4
|
+
`)}\n`}async function readWorkspacePolicy(e){try{return await readFile(e,`utf8`)}catch(e){if(e.code===`ENOENT`)return``;throw e}}async function owningPnpmWorkspaceRoot(t){try{return await access(join(t,PNPM_WORKSPACE_PATH)),t}catch(e){if(e.code!==`ENOENT`)throw e}return findClaimingAncestorPnpmWorkspaceRoot(t)??t}async function inspectPnpmBuildPolicy(e,t){let n=join(await owningPnpmWorkspaceRoot(e),PNPM_WORKSPACE_PATH),a=(await readWorkspacePolicy(n)).replace(/\r\n/gu,`
|
|
5
|
+
`).split(`
|
|
6
|
+
`),o=policyEntries(a,`allowBuilds`,`mapping`),s=policyEntries(a,`ignoredOptionalDependencies`,`sequence`);return{filePath:n,packages:t,satisfied:t.every(e=>o.get(e)===!0||s.has(e))}}async function applyPnpmBuildPolicy(e,t){let r=await readWorkspacePolicy(e.filePath);await writeFile(e.filePath,withPnpmBuildPolicy(r,e.packages,t),`utf8`)}export{applyPnpmBuildPolicy,inspectPnpmBuildPolicy,withPnpmBuildPolicy};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import type { RegistrySetupCompletion } from "#setup/registry-setup-protocol.js";
|
|
1
2
|
export interface RegistryCommandLogger {
|
|
2
3
|
error(message: string): void;
|
|
3
4
|
log(message: string): void;
|
|
4
5
|
}
|
|
6
|
+
export declare function reportRegistryCompletion(logger: RegistryCommandLogger, item: string, completion: RegistrySetupCompletion | false, options: {
|
|
7
|
+
nonInteractive?: boolean;
|
|
8
|
+
}): RegistrySetupCompletion | undefined;
|
|
5
9
|
export declare function errorMessage(error: unknown): string;
|
|
6
10
|
export declare function runRegistryAction<T>(logger: RegistryCommandLogger, _appRoot: string, action: () => Promise<T>): Promise<T | undefined>;
|
|
7
11
|
export declare function resolveRegistryItemForAdd<T>(logger: RegistryCommandLogger, loadItem: () => Promise<T>, printSuggestions: () => Promise<void>): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WizardCancelledError}from"#setup/step.js";function errorMessage(e){return e instanceof Error?e.message:String(e)}function isRegistryNotFoundError(e){return e instanceof Error&&`code`in e&&e.code===`NOT_FOUND`}async function runRegistryAction(
|
|
1
|
+
import{reportHeadlessSetupCompletion}from"./setup-headless.js";import{WizardCancelledError}from"#setup/step.js";function reportRegistryCompletion(t,n,r,i){return reportHeadlessSetupCompletion({logger:t,item:n,completion:r,nonInteractive:i.nonInteractive})}function errorMessage(e){return e instanceof Error?e.message:String(e)}function isRegistryNotFoundError(e){return e instanceof Error&&`code`in e&&e.code===`NOT_FOUND`}async function runRegistryAction(e,n,r){try{return await r()}catch(n){if(n instanceof WizardCancelledError)return;e.error(errorMessage(n)),process.exitCode=1;return}}async function resolveRegistryItemForAdd(e,t,n){try{return{found:!0,item:await t()}}catch(t){if(!isRegistryNotFoundError(t))throw t;return e.error(errorMessage(t)),await n(),process.exitCode=1,{found:!1}}}function setupResumeCommand(e){return`eve add ${/^[\w@./:-]+$/.test(e)?e:`'${e.replaceAll(`'`,`'\\''`)}'`} --skip-install`}function setupReminder(e,t){return`${t===`cancelled`?`Setup cancelled.`:`Setup skipped.`} Run \`${setupResumeCommand(e)}\` when you're ready.`}export{errorMessage,reportRegistryCompletion,resolveRegistryItemForAdd,runRegistryAction,setupReminder,setupResumeCommand};
|
|
@@ -80,7 +80,7 @@ export declare function installRegistryItem(appRoot: string, item: string, optio
|
|
|
80
80
|
setup?: RegistrySetupCompletion;
|
|
81
81
|
}>;
|
|
82
82
|
/** Installs an official, configured, or URL-addressed registry item. */
|
|
83
|
-
export declare function runAddCommand(logger: RegistryCommandLogger, appRoot: string, item: string, options: RunAddCommandOptions, dependencies?: AddCommandDependencies): Promise<RegistrySetupCompletion | undefined>;
|
|
83
|
+
export declare function runAddCommand(logger: RegistryCommandLogger, appRoot: string, item: string, options: RunAddCommandOptions, dependencies?: AddCommandDependencies): Promise<RegistrySetupCompletion | false | undefined>;
|
|
84
84
|
/** Adds registry namespace mappings to the project's package.json. */
|
|
85
85
|
export declare function runRegistryAddCommand(logger: RegistryCommandLogger, appRoot: string, mappings: readonly string[]): Promise<void>;
|
|
86
86
|
/** Lists registry items from every configured source or one selected source. */
|