eve 0.67.0 → 0.67.2
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 +19 -0
- package/dist/src/channel/channel-address.d.ts +2 -2
- package/dist/src/channel/compiled-channel.d.ts +3 -2
- package/dist/src/channel/cross-channel-receive.d.ts +1 -18
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/forwarded-principal.d.ts +3 -2
- package/dist/src/channel/resolve-text.d.ts +2 -1
- package/dist/src/channel/schedule-auth.d.ts +0 -2
- package/dist/src/channel/schedule-auth.js +1 -1
- package/dist/src/channel/schedule.d.ts +2 -2
- package/dist/src/channel/session-callback.d.ts +2 -1
- package/dist/src/channel/types.d.ts +0 -7
- package/dist/src/chunks/{use-eve-agent-OCHP4s0z.js → use-eve-agent-D4HVZBjn.js} +1 -1
- package/dist/src/chunks/{use-eve-agent-DzdyI97Z.js → use-eve-agent-DXcE_8Ja.js} +1 -1
- package/dist/src/cli/acp/command.d.ts +2 -1
- package/dist/src/cli/agent-command.d.ts +2 -1
- package/dist/src/cli/agent-detection.d.ts +0 -1
- package/dist/src/cli/agent-detection.js +1 -1
- package/dist/src/cli/application-command.d.ts +2 -1
- package/dist/src/cli/application-root.d.ts +3 -8
- package/dist/src/cli/application-root.js +1 -1
- package/dist/src/cli/commands/agent-instructions.d.ts +0 -4
- package/dist/src/cli/commands/agent-instructions.js +3 -3
- package/dist/src/cli/commands/extension-init.js +1 -1
- package/dist/src/cli/commands/init-agent-workspace.js +1 -1
- package/dist/src/cli/commands/init-project.d.ts +0 -1
- package/dist/src/cli/commands/init-project.js +1 -1
- package/dist/src/cli/commands/init-target.d.ts +1 -1
- package/dist/src/cli/commands/init-telemetry.d.ts +2 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/registry-declared-setups.d.ts +2 -1
- package/dist/src/cli/commands/registry-install-transaction.d.ts +0 -13
- package/dist/src/cli/commands/registry-install-transaction.js +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +1 -1
- package/dist/src/cli/commands/registry-presentation.d.ts +0 -1
- package/dist/src/cli/commands/registry-presentation.js +1 -1
- package/dist/src/cli/commands/registry-project.d.ts +2 -1
- package/dist/src/cli/commands/registry.d.ts +0 -4
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/commands/setup-headless.d.ts +2 -1
- package/dist/src/cli/commands/vercel-non-interactive.d.ts +2 -1
- package/dist/src/cli/dev/diagnostic-dump.d.ts +0 -2
- package/dist/src/cli/dev/diagnostic-dump.js +1 -1
- package/dist/src/cli/dev/diagnostic-sink.d.ts +3 -2
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/tui/agent-header.d.ts +2 -1
- package/dist/src/cli/dev/tui/argument-typeahead.d.ts +2 -1
- package/dist/src/cli/dev/tui/dev-rebuild-status.d.ts +2 -1
- package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +2 -1
- package/dist/src/cli/dev/tui/errors.d.ts +2 -7
- package/dist/src/cli/dev/tui/errors.js +1 -1
- package/dist/src/cli/dev/tui/flow-drawer.d.ts +2 -1
- package/dist/src/cli/dev/tui/line-editor.d.ts +1 -1
- package/dist/src/cli/dev/tui/mcp-connection-status.d.ts +2 -1
- package/dist/src/cli/dev/tui/message-queue.d.ts +4 -3
- package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +2 -1
- package/dist/src/cli/dev/tui/provider-picker.d.ts +3 -2
- package/dist/src/cli/dev/tui/question-panel.d.ts +2 -1
- package/dist/src/cli/dev/tui/registry-result-message.d.ts +3 -4
- package/dist/src/cli/dev/tui/registry-result-message.js +1 -1
- package/dist/src/cli/dev/tui/remote-connection-probe.d.ts +3 -2
- package/dist/src/cli/dev/tui/runner.d.ts +0 -1
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-panel.d.ts +2 -2
- package/dist/src/cli/dev/tui/setup-selection-input.d.ts +2 -2
- package/dist/src/cli/dev/tui/status-line.d.ts +2 -1
- package/dist/src/cli/dev/tui/stream-format.d.ts +3 -2
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +3 -2
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/tool-block-groups.d.ts +3 -2
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +2 -1
- package/dist/src/cli/dev/tui/traces/trace-content.d.ts +0 -9
- package/dist/src/cli/dev/tui/traces/trace-content.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-view.d.ts +3 -2
- package/dist/src/cli/dev/tui/traces/trace-viewer-session.d.ts +2 -1
- package/dist/src/cli/dev/tui/traces/trace-viewer-state.d.ts +2 -3
- package/dist/src/cli/dev/tui/traces/trace-viewer-state.js +1 -1
- package/dist/src/cli/dev/ui-options.d.ts +3 -2
- package/dist/src/cli/dev/url-target.d.ts +2 -1
- package/dist/src/cli/invoke/command.d.ts +0 -11
- package/dist/src/cli/invoke/command.js +1 -1
- package/dist/src/cli/invoke/result.d.ts +1 -1
- package/dist/src/cli/telemetry/index.d.ts +0 -6
- package/dist/src/cli/telemetry/preference.d.ts +2 -1
- package/dist/src/cli/ui/alt-screen.d.ts +3 -2
- package/dist/src/cli/ui/live-region.d.ts +3 -2
- package/dist/src/cli/ui/output.d.ts +1 -16
- package/dist/src/cli/ui/output.js +2 -5
- package/dist/src/client/eve-agent-store-helpers.d.ts +0 -1
- package/dist/src/client/eve-agent-store-helpers.js +1 -1
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/message-action-parts.d.ts +2 -1
- package/dist/src/client/session-utils.d.ts +3 -2
- package/dist/src/compiled/.vendor-stamp.json +6 -6
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +4 -3
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +23 -0
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/hook-wake.d.ts +69 -36
- package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +25 -22
- package/dist/src/compiled/@workflow/core/runtime/run-spec-version.d.ts +16 -0
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +59 -1
- package/dist/src/compiled/@workflow/core/runtime/step-latency.d.ts +3 -2
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +34 -12
- package/dist/src/compiled/@workflow/core/runtime.js +4 -4
- package/dist/src/compiled/@workflow/core/serialization.d.ts +7 -2
- package/dist/src/compiled/@workflow/core/serialization.js +1 -1
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +29 -0
- package/dist/src/compiled/@workflow/core/types.d.ts +1 -0
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.d.ts +13 -0
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world/events.d.ts +14 -4
- package/dist/src/compiled/@workflow/world/index.d.ts +2 -2
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +2 -1
- package/dist/src/compiled/@workflow/world/shared.d.ts +24 -0
- package/dist/src/compiled/@workflow/world/spec-version.d.ts +23 -0
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-DzJovO_f.js → attribute-changes-D721NpZv.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/{dist-BQSf8Hax.js → dist-BUFGAKRb.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/dist-CaNNONeg.js +3 -0
- package/dist/src/compiled/_chunks/workflow/{frames-qKc30rjg.js → frames-Dr9fHWdo.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/{global-BQnKzRXo.js → global-DKbOgrts.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/helpers-DkKxg_yn.js +1 -0
- package/dist/src/compiled/_chunks/workflow/logger-D4GJNTk4.js +14 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-uTW-jBYz.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-5DmiMN9b.js +1 -0
- package/dist/src/compiled/_chunks/workflow/serialization-CNIYl1D3.js +3 -0
- package/dist/src/compiled/_chunks/workflow/sleep-DFKgN7UG.js +1 -0
- package/dist/src/compiled/_chunks/workflow/wait-until-3_1djUuL.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{ws-transport-BrsMYqJg.js → ws-transport--rYOVIaf.js} +1 -1
- package/dist/src/compiler/artifacts.d.ts +4 -27
- package/dist/src/compiler/artifacts.js +1 -1
- package/dist/src/compiler/compile-agent.d.ts +2 -1
- package/dist/src/compiler/compile-agent.js +1 -1
- package/dist/src/compiler/diagnostics.d.ts +0 -11
- package/dist/src/compiler/diagnostics.js +1 -1
- package/dist/src/compiler/manifest.d.ts +0 -4
- package/dist/src/compiler/module-map.d.ts +1 -5
- package/dist/src/compiler/module-map.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-connection.d.ts +2 -1
- package/dist/src/compiler/normalize-instructions.d.ts +2 -6
- package/dist/src/compiler/normalize-instructions.js +1 -1
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +0 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-skill.d.ts +2 -1
- package/dist/src/compiler/project-sources.d.ts +0 -14
- package/dist/src/compiler/project-sources.js +1 -1
- package/dist/src/compiler/resolve-workspace-subagent.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +1 -2
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/context/build-base-tool-context.d.ts +2 -1
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +0 -4
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-metadata.d.ts +0 -1
- package/dist/src/context/dynamic-tool-metadata.js +1 -1
- package/dist/src/context/memory-lifecycle.d.ts +0 -8
- package/dist/src/context/memory-lifecycle.js +1 -1
- package/dist/src/discover/connections.d.ts +0 -15
- package/dist/src/discover/connections.js +1 -1
- package/dist/src/discover/diagnostics.d.ts +0 -12
- package/dist/src/discover/diagnostics.js +1 -1
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/discover-subagent.d.ts +0 -1
- package/dist/src/discover/discover-subagent.js +1 -1
- package/dist/src/discover/extensions.d.ts +3 -10
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/filesystem.d.ts +5 -9
- package/dist/src/discover/filesystem.js +1 -1
- package/dist/src/discover/grammar.d.ts +0 -46
- package/dist/src/discover/grammar.js +1 -1
- package/dist/src/discover/manifest.d.ts +5 -4
- package/dist/src/discover/memory.d.ts +0 -1
- package/dist/src/discover/memory.js +1 -1
- package/dist/src/discover/named-source-directory.js +1 -1
- package/dist/src/discover/project-source.d.ts +2 -1
- package/dist/src/discover/project.js +1 -1
- package/dist/src/discover/sandbox.js +1 -1
- package/dist/src/discover/skills.d.ts +0 -4
- package/dist/src/discover/skills.js +1 -1
- package/dist/src/evals/cli/eval-client.d.ts +2 -1
- package/dist/src/evals/judge.d.ts +2 -1
- package/dist/src/evals/runner/execute-task.d.ts +1 -1
- package/dist/src/evals/types.d.ts +1 -1
- package/dist/src/eve-channel/support.d.ts +1 -3
- package/dist/src/eve-channel/support.js +1 -1
- package/dist/src/execution/dynamic-workflow/schema.d.ts +2 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/effective-agent-config.d.ts +2 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +3 -5
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/history-view.d.ts +2 -1
- package/dist/src/execution/node-step.d.ts +3 -2
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/active-handles.d.ts +2 -4
- package/dist/src/execution/sandbox/active-handles.js +1 -1
- package/dist/src/execution/sandbox/bash.d.ts +2 -1
- package/dist/src/execution/sandbox/bindings/docker-templates.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +0 -6
- package/dist/src/execution/sandbox/bindings/immutable-resources.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
- package/dist/src/execution/sandbox/bindings/local-provider-utils.d.ts +3 -2
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-network.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +0 -3
- package/dist/src/execution/sandbox/bindings/microsandbox-options.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.d.ts +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +1 -1
- package/dist/src/execution/sandbox/dockerfile.d.ts +0 -1
- package/dist/src/execution/sandbox/dockerfile.js +1 -1
- package/dist/src/execution/sandbox/ensure.d.ts +2 -1
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/prewarm.d.ts +1 -18
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/sandbox/require-sandbox.d.ts +0 -11
- package/dist/src/execution/sandbox/require-sandbox.js +1 -1
- package/dist/src/execution/sandbox/truncate-output.d.ts +2 -5
- package/dist/src/execution/sandbox/truncate-output.js +2 -2
- package/dist/src/execution/session/admission.d.ts +3 -2
- package/dist/src/execution/session/event-sink.d.ts +2 -1
- package/dist/src/execution/session/finalization.d.ts +2 -1
- package/dist/src/execution/session/handoff.d.ts +3 -2
- package/dist/src/execution/session/route-selected-delivery.d.ts +2 -1
- package/dist/src/execution/session/timeout-control.d.ts +2 -1
- package/dist/src/execution/session-activity.d.ts +0 -3
- package/dist/src/execution/session-activity.js +1 -1
- package/dist/src/execution/session-inbox/protocol.d.ts +2 -1
- package/dist/src/execution/session.d.ts +3 -2
- package/dist/src/execution/stable-workflow-names.d.ts +0 -6
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/ask-question-workflow.js +1 -1
- package/dist/src/execution/tools/connection-search.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +2 -1
- package/dist/src/execution/tools/subagent/start.js +1 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +4 -3
- package/dist/src/execution/tools/workflow/background.d.ts +2 -6
- package/dist/src/execution/tools/workflow/background.js +1 -1
- package/dist/src/execution/tools/workflow/owner-channels.d.ts +1 -1
- package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +2 -1
- package/dist/src/execution/web-fetch/execute.d.ts +2 -2
- package/dist/src/execution/web-fetch/request.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/computer-use-driver-source.d.ts +0 -2
- package/dist/src/extensions/code/extension/lib/computer-use-driver-source.js +57 -57
- package/dist/src/extensions/code/extension/lib/computer-use.d.ts +1 -1
- package/dist/src/extensions/code/extension/lib/generated-paths.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/grep-search.d.ts +5 -5
- package/dist/src/extensions/code/extension/lib/grep-search.js +2 -2
- package/dist/src/extensions/code/extension/lib/guidelines.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/patch.d.ts +3 -2
- package/dist/src/extensions/code/extension/lib/prwatch-github.d.ts +1 -2
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
- package/dist/src/extensions/code/extension/lib/prwatch-registry.d.ts +2 -1
- package/dist/src/framework/host-inventory.d.ts +3 -2
- package/dist/src/harness/approval-candidates.d.ts +4 -3
- package/dist/src/harness/approval-delivery-coordinator.d.ts +2 -1
- package/dist/src/harness/authorization.d.ts +0 -9
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/compaction-prompt.d.ts +2 -1
- package/dist/src/harness/coordination.d.ts +0 -4
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/input-requests.d.ts +1 -10
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/pending-input-batches.d.ts +0 -5
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/provider-safety.d.ts +9 -0
- package/dist/src/harness/provider-safety.js +1 -1
- package/dist/src/harness/provider-tools.d.ts +2 -1
- package/dist/src/harness/session-limit-continuation.d.ts +0 -4
- package/dist/src/harness/session-limit-continuation.js +1 -1
- package/dist/src/harness/session-usage-limits.d.ts +2 -1
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-model-output.d.ts +2 -1
- package/dist/src/harness/turn-cancellation.d.ts +2 -7
- package/dist/src/harness/turn-cancellation.js +1 -1
- package/dist/src/harness/turn-client-context.d.ts +2 -1
- package/dist/src/harness/workflow-stream-error.d.ts +0 -7
- package/dist/src/harness/workflow-stream-error.js +1 -1
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/state.d.ts +2 -2
- package/dist/src/internal/agent-name.d.ts +0 -2
- package/dist/src/internal/agent-name.js +1 -1
- package/dist/src/internal/application/build-profile.d.ts +2 -2
- package/dist/src/internal/application/cache-metadata.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.js +1 -1
- package/dist/src/internal/application/dev-environment.d.ts +2 -8
- package/dist/src/internal/application/dev-environment.js +1 -1
- package/dist/src/internal/application/optional-package-import.js +1 -1
- package/dist/src/internal/application/optional-package-install.js +1 -1
- package/dist/src/internal/application/output-publication-lock.js +1 -1
- package/dist/src/internal/application/output-publication.d.ts +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/application/paths.d.ts +0 -5
- package/dist/src/internal/application/paths.js +1 -1
- package/dist/src/internal/application/tsconfig-dependencies.d.ts +0 -16
- package/dist/src/internal/application/tsconfig-dependencies.js +1 -1
- package/dist/src/internal/authored-asset-import-plugin.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-definition/source-identity.d.ts +1 -1
- package/dist/src/internal/authored-module-evaluation-error.js +1 -1
- package/dist/src/internal/authored-module-loader.js +1 -1
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/authored-relative-extension-resolver.js +1 -1
- package/dist/src/internal/bundler/extension-scope-plugin.d.ts +2 -1
- package/dist/src/internal/bundler/extension-scope-plugin.js +1 -1
- package/dist/src/internal/bundler/nitro-rolldown.d.ts +3 -12
- package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
- package/dist/src/internal/bundler/vendored-dependency-log.d.ts +7 -0
- package/dist/src/internal/bundler/vendored-dependency-log.js +1 -0
- package/dist/src/internal/eve-project-root.d.ts +0 -3
- package/dist/src/internal/eve-project-root.js +1 -1
- package/dist/src/internal/external-resources-snapshot.d.ts +1 -1
- package/dist/src/internal/external-resources.d.ts +0 -1
- package/dist/src/internal/external-resources.js +1 -1
- package/dist/src/internal/gateway.d.ts +2 -0
- package/dist/src/internal/gateway.js +1 -1
- package/dist/src/internal/helpers/markdown.js +1 -1
- package/dist/src/internal/instrumentation-layout.js +1 -1
- package/dist/src/internal/invocation/metadata.d.ts +1 -1
- package/dist/src/internal/materialized-authored-modules.d.ts +2 -1
- package/dist/src/internal/materialized-authored-modules.js +1 -1
- package/dist/src/internal/mcp/protected-resource.d.ts +2 -1
- package/dist/src/internal/mcp/streamable-http-server.d.ts +4 -5
- package/dist/src/internal/mcp/streamable-http-server.js +1 -1
- package/dist/src/internal/model-catalog.d.ts +2 -1
- package/dist/src/internal/nitro/dev-runtime-artifacts-retention.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +0 -4
- package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot-copy.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot-local-roots.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot.d.ts +0 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot.js +1 -1
- package/dist/src/internal/nitro/development-generation.d.ts +0 -1
- package/dist/src/internal/nitro/development-generation.js +1 -1
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/build-extension.js +1 -1
- package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
- package/dist/src/internal/nitro/host/channel-routes.d.ts +1 -1
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +2 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-candidate.d.ts +2 -1
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.d.ts +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/internal/nitro/host/extension-external-dependency-plugin.js +1 -1
- package/dist/src/internal/nitro/host/local-tracing-runtime-plugin.js +1 -1
- package/dist/src/internal/nitro/host/nitro-bundler-config.js +1 -1
- package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +2 -26
- package/dist/src/internal/nitro/host/schedule-task-routes.js +2 -2
- package/dist/src/internal/nitro/host/start-production-server.js +1 -1
- package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
- package/dist/src/internal/nitro/routes/channel-request-instrumentation.d.ts +2 -1
- package/dist/src/internal/nitro/routes/channel-route-context.d.ts +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts +2 -1
- package/dist/src/internal/resolve-model-endpoint-status.d.ts +2 -1
- package/dist/src/internal/vercel/assemble-eve-services.d.ts +3 -2
- package/dist/src/internal/vercel/build-agent-workspace.js +1 -1
- package/dist/src/internal/vercel/eve-service-contribution.d.ts +2 -3
- package/dist/src/internal/vercel/eve-service-contribution.js +1 -1
- package/dist/src/internal/vercel/project-link.d.ts +2 -1
- package/dist/src/internal/vercel/project-link.js +1 -1
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow/development-world-codec.d.ts +2 -1
- package/dist/src/internal/workflow/development-world-server.js +1 -1
- package/dist/src/internal/workflow/world-compatibility.d.ts +2 -1
- package/dist/src/internal/workflow-bundle/builder-support.d.ts +0 -9
- package/dist/src/internal/workflow-bundle/builder-support.js +2 -3
- package/dist/src/internal/workflow-bundle/builder.js +2 -2
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +0 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/protocol/activity.d.ts +3 -3
- package/dist/src/protocol/activity.js +1 -1
- package/dist/src/protocol/baggage.d.ts +2 -2
- package/dist/src/protocol/cancel-turn.d.ts +0 -2
- package/dist/src/protocol/event-dedupe.d.ts +2 -1
- package/dist/src/protocol/event-id.d.ts +0 -6
- package/dist/src/protocol/event-id.js +1 -1
- package/dist/src/protocol/traceparent.d.ts +2 -1
- package/dist/src/public/channels/chat-sdk/audience.d.ts +2 -4
- package/dist/src/public/channels/chat-sdk/audience.js +1 -1
- package/dist/src/public/channels/discord/discordChannel.d.ts +1 -1
- package/dist/src/public/channels/github/api.d.ts +2 -22
- package/dist/src/public/channels/github/api.js +1 -1
- package/dist/src/public/channels/github/auth.d.ts +0 -9
- package/dist/src/public/channels/github/auth.js +1 -1
- package/dist/src/public/channels/github/binding.d.ts +3 -2
- package/dist/src/public/channels/github/checkout.d.ts +3 -3
- package/dist/src/public/channels/github/defaults.d.ts +3 -2
- package/dist/src/public/channels/github/githubChannel.d.ts +1 -1
- package/dist/src/public/channels/github/limits.d.ts +0 -2
- package/dist/src/public/channels/github/limits.js +2 -2
- package/dist/src/public/channels/github/pr-context.d.ts +2 -3
- package/dist/src/public/channels/github/pr-context.js +1 -1
- package/dist/src/public/channels/github/state.d.ts +2 -1
- package/dist/src/public/channels/github/verify.d.ts +2 -1
- package/dist/src/public/channels/linear/defaults.d.ts +2 -1
- package/dist/src/public/channels/linear/inbound-images.d.ts +2 -1
- package/dist/src/public/channels/slack/app-manifest.d.ts +3 -4
- package/dist/src/public/channels/slack/app-manifest.js +1 -1
- package/dist/src/public/channels/slack/hitl.d.ts +0 -4
- package/dist/src/public/channels/slack/hitl.js +2 -2
- package/dist/src/public/channels/slack/inbound.d.ts +2 -1
- package/dist/src/public/channels/slack/model-context.d.ts +0 -18
- package/dist/src/public/channels/slack/model-context.js +1 -1
- package/dist/src/public/channels/slack/mrkdwn.d.ts +0 -2
- package/dist/src/public/channels/slack/mrkdwn.js +1 -1
- package/dist/src/public/channels/slack/privacy.d.ts +2 -1
- package/dist/src/public/channels/slack/verify.d.ts +1 -1
- package/dist/src/public/channels/teams/teamsChannel.d.ts +1 -1
- package/dist/src/public/channels/telegram/audience.d.ts +2 -3
- package/dist/src/public/channels/telegram/audience.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +1 -1
- package/dist/src/public/channels/twilio/defaults.d.ts +0 -7
- package/dist/src/public/channels/twilio/defaults.js +1 -1
- package/dist/src/public/channels/twilio/routing.d.ts +2 -1
- package/dist/src/public/channels/twilio/twilioChannel.d.ts +1 -1
- package/dist/src/public/channels/upload-policy.d.ts +0 -11
- package/dist/src/public/channels/upload-policy.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +1 -1
- package/dist/src/public/index.js +1 -1
- package/dist/src/public/memory/file/provider.js +1 -1
- package/dist/src/public/models/openai/chatgpt/model.d.ts +2 -1
- package/dist/src/public/models/openai/chatgpt/token-broker.d.ts +1 -1
- package/dist/src/public/next/server.js +1 -1
- package/dist/src/public/nuxt/dev-server.d.ts +3 -2
- package/dist/src/public/nuxt/dev-server.js +1 -1
- package/dist/src/public/skills/index.js +1 -1
- package/dist/src/public/sveltekit/dev-server.d.ts +3 -2
- package/dist/src/public/sveltekit/dev-server.js +1 -1
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/runtime/compiled-artifacts-source.d.ts +0 -4
- package/dist/src/runtime/compiled-artifacts-source.js +1 -1
- package/dist/src/runtime/connections/instance-identity.d.ts +0 -3
- package/dist/src/runtime/connections/instance-identity.js +1 -1
- package/dist/src/runtime/connections/mcp-tracing.d.ts +1 -6
- package/dist/src/runtime/connections/mcp-tracing.js +1 -1
- package/dist/src/runtime/connections/openapi-client.d.ts +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +0 -9
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/hooks/registry.d.ts +0 -7
- package/dist/src/runtime/hooks/registry.js +1 -1
- package/dist/src/runtime/loaders/artifact-paths.d.ts +2 -1
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +0 -1
- package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
- package/dist/src/runtime/resolve-agent.d.ts +2 -2
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-dynamic-tool.d.ts +0 -16
- package/dist/src/runtime/resolve-dynamic-tool.js +1 -1
- package/dist/src/runtime/sandbox/prepared-artifacts.d.ts +1 -2
- package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -1
- package/dist/src/runtime/schedules/register.d.ts +0 -4
- package/dist/src/runtime/schedules/register.js +1 -1
- package/dist/src/self-modification/credentials.d.ts +1 -4
- package/dist/src/self-modification/credentials.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/search_traces.js +1 -1
- package/dist/src/self-modification/filesystem.d.ts +0 -1
- package/dist/src/self-modification/filesystem.js +1 -1
- package/dist/src/self-modification/git-workspace.d.ts +0 -3
- package/dist/src/self-modification/git-workspace.js +1 -1
- package/dist/src/self-modification/github-publisher.d.ts +2 -1
- package/dist/src/self-modification/migration.d.ts +0 -1
- package/dist/src/self-modification/migration.js +1 -1
- package/dist/src/self-modification/mode.d.ts +2 -1
- package/dist/src/self-modification/proposal.d.ts +0 -2
- package/dist/src/self-modification/proposal.js +2 -2
- package/dist/src/self-modification/setup.js +1 -1
- package/dist/src/services/dev-client/agent-info-probe.d.ts +2 -1
- package/dist/src/services/dev-client/request-headers.d.ts +1 -1
- package/dist/src/services/dev-client/vercel-auth-error.d.ts +0 -8
- package/dist/src/services/dev-client/vercel-auth-error.js +2 -3
- package/dist/src/setup/ai-gateway-api-key.d.ts +2 -1
- package/dist/src/setup/append-env.d.ts +3 -2
- package/dist/src/setup/ask.d.ts +3 -3
- package/dist/src/setup/boxes/apply-ai-gateway-credential.d.ts +2 -1
- package/dist/src/setup/boxes/deploy-project.d.ts +4 -3
- package/dist/src/setup/boxes/link-project.d.ts +2 -1
- package/dist/src/setup/boxes/resolve-provisioning.d.ts +2 -1
- package/dist/src/setup/boxes/select-model.d.ts +2 -37
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/cli/option-row.d.ts +1 -1
- package/dist/src/setup/cli/prompt-ui.d.ts +0 -10
- package/dist/src/setup/cli/prompt-ui.js +1 -1
- package/dist/src/setup/cli/rail-log.d.ts +0 -2
- package/dist/src/setup/cli/rail-log.js +2 -2
- package/dist/src/setup/connect-provisioning.d.ts +2 -1
- package/dist/src/setup/connection-connector.d.ts +2 -1
- package/dist/src/setup/flows/link.d.ts +2 -1
- package/dist/src/setup/flows/model-login.d.ts +1 -1
- package/dist/src/setup/flows/model-source-change.js +1 -1
- package/dist/src/setup/flows/provider.d.ts +2 -45
- package/dist/src/setup/flows/provider.js +1 -4
- package/dist/src/setup/flows/registry-session.d.ts +3 -2
- package/dist/src/setup/integrations/discord/api.d.ts +2 -1
- package/dist/src/setup/integrations/discord/connect.d.ts +3 -3
- package/dist/src/setup/integrations/discord/connect.js +1 -1
- package/dist/src/setup/integrations/discord/setup.d.ts +2 -1
- package/dist/src/setup/integrations/file-memory/vercel.d.ts +1 -1
- package/dist/src/setup/integrations/github/connect.d.ts +3 -3
- package/dist/src/setup/integrations/github/connect.js +1 -1
- package/dist/src/setup/integrations/github/setup.d.ts +1 -1
- package/dist/src/setup/integrations/linear/connect.d.ts +2 -2
- package/dist/src/setup/integrations/linear/connect.js +1 -1
- package/dist/src/setup/integrations/linear/setup.d.ts +1 -1
- package/dist/src/setup/integrations/linq/connect.d.ts +3 -4
- package/dist/src/setup/integrations/linq/connect.js +1 -1
- package/dist/src/setup/integrations/linq/management.d.ts +2 -1
- package/dist/src/setup/integrations/linq/setup.d.ts +1 -9
- package/dist/src/setup/integrations/linq/setup.js +1 -1
- package/dist/src/setup/integrations/photon/connect.d.ts +5 -7
- package/dist/src/setup/integrations/photon/connect.js +1 -1
- package/dist/src/setup/integrations/photon/management.d.ts +5 -4
- package/dist/src/setup/integrations/photon/setup-flow.d.ts +2 -1
- package/dist/src/setup/integrations/registry.d.ts +0 -2
- package/dist/src/setup/integrations/registry.js +1 -1
- package/dist/src/setup/integrations/runner.d.ts +3 -2
- package/dist/src/setup/integrations/shared/scaffold.d.ts +2 -1
- package/dist/src/setup/integrations/shared/vercel-project.d.ts +2 -1
- package/dist/src/setup/integrations/shopify/setup.d.ts +2 -1
- package/dist/src/setup/integrations/teams/connect.d.ts +3 -3
- package/dist/src/setup/integrations/teams/connect.js +1 -1
- package/dist/src/setup/integrations/teams/setup.d.ts +2 -1
- package/dist/src/setup/integrations/web/setup.d.ts +2 -1
- package/dist/src/setup/primitives/pm/pnpm.js +1 -1
- package/dist/src/setup/primitives/pm/process-result.d.ts +2 -1
- package/dist/src/setup/primitives/pm/shared.d.ts +2 -1
- package/dist/src/setup/primitives/process-output.d.ts +2 -1
- package/dist/src/setup/primitives/run-vercel.js +1 -1
- package/dist/src/setup/project-resolution.d.ts +0 -2
- package/dist/src/setup/project-resolution.js +1 -1
- package/dist/src/setup/provider-settings.js +1 -1
- package/dist/src/setup/quit-guard.d.ts +3 -2
- package/dist/src/setup/scaffold/connections/catalog.d.ts +0 -13
- package/dist/src/setup/scaffold/connections/catalog.js +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.d.ts +2 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/files.d.ts +2 -1
- package/dist/src/setup/scaffold/update/channels.d.ts +0 -1
- package/dist/src/setup/scaffold/version-tokens.js +1 -1
- package/dist/src/setup/scaffold/workspace-glob.d.ts +0 -1
- package/dist/src/setup/scaffold/workspace-glob.js +1 -1
- package/dist/src/setup/scaffold/workspace-root.d.ts +2 -1
- package/dist/src/setup/scaffold/workspace-root.js +1 -1
- package/dist/src/setup/slack-connect-create.d.ts +1 -1
- package/dist/src/setup/slack-connect-lifecycle.d.ts +5 -5
- package/dist/src/setup/slack-connect.d.ts +0 -4
- package/dist/src/setup/slack-connect.js +1 -1
- package/dist/src/setup/slackbot.d.ts +3 -3
- package/dist/src/setup/slackbot.js +1 -1
- package/dist/src/setup/vercel-api-failure.d.ts +0 -2
- package/dist/src/setup/vercel-api-failure.js +1 -1
- package/dist/src/setup/vercel-project-api.d.ts +1 -1
- package/dist/src/setup/vercel-project.d.ts +4 -38
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/shared/action-types.d.ts +1 -58
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +0 -3
- package/dist/src/shared/agent-turn-outcome.d.ts +1 -3
- package/dist/src/shared/agent-turn-outcome.js +1 -1
- package/dist/src/shared/chatgpt-model.d.ts +0 -1
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/conversation-context.d.ts +2 -1
- package/dist/src/shared/conversation-identity.d.ts +2 -0
- package/dist/src/shared/conversation-identity.js +1 -0
- package/dist/src/shared/extension-package-contract.d.ts +2 -1
- package/dist/src/shared/forwarded-trace-policy.d.ts +3 -2
- package/dist/src/shared/gateway-service-tier.d.ts +2 -1
- package/dist/src/shared/memory-state.d.ts +0 -8
- package/dist/src/shared/memory-state.js +1 -1
- package/dist/src/shared/sandbox-environment.d.ts +0 -1
- package/dist/src/shared/sandbox-environment.js +1 -1
- package/dist/src/shared/skill-package.d.ts +0 -5
- package/dist/src/shared/skill-package.js +1 -1
- package/dist/src/shared/skill-paths.d.ts +0 -13
- package/dist/src/shared/skill-paths.js +2 -2
- package/dist/src/shared/token-usage.d.ts +0 -7
- package/dist/src/shared/token-usage.js +1 -1
- package/dist/src/shared/ulid.d.ts +2 -8
- package/dist/src/shared/ulid.js +1 -1
- package/dist/src/shared/vercel-project.d.ts +2 -1
- package/dist/src/shared/vercel-services.d.ts +2 -2
- package/dist/src/shared/workflow-sandbox.d.ts +0 -7
- package/dist/src/source-change/agent-config-ast.d.ts +2 -1
- package/dist/src/source-change/agent-config-string-path.d.ts +2 -2
- package/dist/src/source-change/apply-agent-model-settings.d.ts +2 -1
- package/dist/src/source-change/apply-model-selection.d.ts +2 -1
- package/dist/src/source-change/static-source-change.d.ts +4 -3
- package/dist/src/subagents/invocation.d.ts +1 -1
- package/dist/src/subagents/tool.d.ts +2 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/definition.d.ts +0 -3
- package/dist/src/tools/durable-callbacks.d.ts +1 -2
- package/dist/src/tools/durable-callbacks.js +1 -1
- package/dist/src/tools/framework/agent.js +1 -1
- package/dist/src/tools/framework/task-cancel.d.ts +1 -1
- package/dist/src/tools/native-definition.d.ts +2 -1
- package/dist/src/tracing/agent-action-instrumentation.d.ts +2 -1
- package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
- package/dist/src/tracing/agent-memory-instrumentation.d.ts +2 -1
- package/dist/src/tracing/agent-otel-attributes.js +1 -1
- package/dist/src/tracing/agent-otel-provider.d.ts +2 -1
- package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
- package/dist/src/tracing/agent-span-id-generator.js +1 -1
- package/dist/src/tracing/agent-tool-instrumentation.d.ts +2 -1
- package/dist/src/tracing/agent-tool-span-context.d.ts +3 -2
- package/dist/src/tracing/agent-trace-context-store.d.ts +0 -2
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +0 -24
- package/dist/src/tracing/agent-trace-state.js +1 -1
- package/dist/src/tracing/batch-span-processor.d.ts +2 -1
- package/dist/src/tracing/conversation-context.d.ts +0 -2
- package/dist/src/tracing/conversation-context.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/local-trace-analysis.d.ts +4 -3
- package/dist/src/tracing/local-trace-discovery-index.d.ts +0 -2
- package/dist/src/tracing/local-trace-discovery-index.js +1 -1
- package/dist/src/tracing/local-trace-query.d.ts +2 -1
- package/dist/src/tracing/local-trace-retention.d.ts +4 -4
- package/dist/src/tracing/telemetry-budget.d.ts +0 -1
- package/dist/src/tracing/telemetry-budget.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +7 -0
- package/package.json +8 -8
- package/dist/src/cli/commands/channel-add-conflicts.d.ts +0 -21
- package/dist/src/cli/commands/channel-add-conflicts.js +0 -1
- package/dist/src/cli/commands/init-confirm.d.ts +0 -12
- package/dist/src/cli/commands/init-confirm.js +0 -1
- package/dist/src/cli/commands/registry-search-presentation.d.ts +0 -16
- package/dist/src/cli/commands/registry-search-presentation.js +0 -6
- package/dist/src/compiled/_chunks/workflow/dist-BfMqXLK3.js +0 -3
- package/dist/src/compiled/_chunks/workflow/helpers-CNMO7zB1.js +0 -1
- package/dist/src/compiled/_chunks/workflow/logger-BCEj9caG.js +0 -14
- package/dist/src/compiled/_chunks/workflow/resume-hook-QS_cMwHn.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-CA5wWV2S.js +0 -1
- package/dist/src/compiled/_chunks/workflow/serialization-CJ265vSe.js +0 -3
- package/dist/src/compiled/_chunks/workflow/sleep-CBn94Ayv.js +0 -1
- package/dist/src/compiled/_chunks/workflow/wait-until-Bo2U6ON9.js +0 -1
- package/dist/src/compiler/compile-from-memory.d.ts +0 -44
- package/dist/src/compiler/compile-from-memory.js +0 -1
- package/dist/src/execution/connection-auth-tool-result.d.ts +0 -2
- package/dist/src/execution/connection-auth-tool-result.js +0 -1
- package/dist/src/internal/process/pnpm.d.ts +0 -28
- package/dist/src/internal/process/pnpm.js +0 -1
- package/dist/src/public/channels/slack/api-encoding.d.ts +0 -5
- package/dist/src/public/channels/slack/api-encoding.js +0 -1
- package/dist/src/public/definitions/instrumentation.d.ts +0 -1
- package/dist/src/public/definitions/instrumentation.js +0 -1
- package/dist/src/public/models/openai/chatgpt/unsigned-jwt.d.ts +0 -5
- package/dist/src/public/models/openai/chatgpt/unsigned-jwt.js +0 -1
- package/dist/src/sandbox/backends/probes.d.ts +0 -7
- package/dist/src/sandbox/backends/probes.js +0 -1
- package/dist/src/setup/channel-add-conflicts.d.ts +0 -28
- package/dist/src/setup/channel-add-conflicts.js +0 -1
- package/dist/src/setup/gateway-models.d.ts +0 -10
- package/dist/src/setup/gateway-models.js +0 -1
- package/dist/src/setup/primitives/run-pnpm.d.ts +0 -1
- package/dist/src/setup/primitives/run-pnpm.js +0 -1
- package/dist/src/shared/dispatch-action.d.ts +0 -30
- package/dist/src/shared/dispatch-action.js +0 -1
|
@@ -5,9 +5,7 @@ type NetworkPolicySandboxSession = SandboxSession & {
|
|
|
5
5
|
};
|
|
6
6
|
import type { GitHubRepository } from "./config.js";
|
|
7
7
|
export declare const SELF_MODIFICATION_CONFIG_PATH = "agent/extensions/self-modification/extension.ts";
|
|
8
|
-
export declare const WORKSPACE_PATH = "/workspace";
|
|
9
8
|
export declare const REPOSITORY_PATH = "/workspace/repository";
|
|
10
|
-
export declare const BASE_REF = "refs/eve-self-modification/base";
|
|
11
9
|
export interface PreparedSelfModificationWorkspace {
|
|
12
10
|
readonly baseSha: string;
|
|
13
11
|
readonly directory: string;
|
|
@@ -31,5 +29,4 @@ export declare function readPreparedSelfModificationWorkspace(input: {
|
|
|
31
29
|
readonly sandbox: Pick<SandboxSession, "run">;
|
|
32
30
|
readonly targetBranch: string;
|
|
33
31
|
}): Promise<PreparedSelfModificationWorkspace>;
|
|
34
|
-
export declare function verifyApplicationRoot(sandbox: Pick<SandboxSession, "run">, directory: string): Promise<void>;
|
|
35
32
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{assertFullSha,assertGitRef}from"./identifiers.js";import{gitOutput,runGitCommand,withBrokeredGitHubCredential}from"./git.js";import{shellQuote}from"#shared/shell-quote.js";import{gitHubRemoteUrl}from"#shared/git.js";const SELF_MODIFICATION_CONFIG_PATH=`agent/extensions/self-modification/extension.ts`,
|
|
1
|
+
import{assertFullSha,assertGitRef}from"./identifiers.js";import{gitOutput,runGitCommand,withBrokeredGitHubCredential}from"./git.js";import{shellQuote}from"#shared/shell-quote.js";import{gitHubRemoteUrl}from"#shared/git.js";const SELF_MODIFICATION_CONFIG_PATH=`agent/extensions/self-modification/extension.ts`,REPOSITORY_PATH=`/workspace/repository`,BASE_REF=`refs/eve-self-modification/base`;async function prepareSelfModificationWorkspace(e){assertGitRef(e.targetBranch,`target branch`);let t=gitHubRemoteUrl(e.repository);await withBrokeredGitHubCredential(e.sandbox,e.token,async()=>{await run(e.sandbox,`rm -rf ${quote(REPOSITORY_PATH)} && mkdir -p ${quote(REPOSITORY_PATH)}`),await run(e.sandbox,`git -C ${quote(REPOSITORY_PATH)} init`),await run(e.sandbox,`git -C ${quote(REPOSITORY_PATH)} remote add origin ${quote(t)}`),await run(e.sandbox,`GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_GLOBAL=/dev/null GIT_LFS_SKIP_SMUDGE=1 GIT_TERMINAL_PROMPT=0 git -C ${quote(REPOSITORY_PATH)} fetch --no-tags origin ${quote(`refs/heads/${e.targetBranch}`)}`),await run(e.sandbox,`git -C ${quote(REPOSITORY_PATH)} update-ref ${BASE_REF} FETCH_HEAD`),await run(e.sandbox,`git -C ${quote(REPOSITORY_PATH)} checkout --detach ${BASE_REF}`)});let n=await gitOutput(e.sandbox,`git -C ${quote(REPOSITORY_PATH)} rev-parse ${BASE_REF}`);return assertFullSha(n,`target branch revision`),await verifyApplicationRoot(e.sandbox,e.directory),{baseSha:n,directory:e.directory,repository:e.repository,repositoryPath:REPOSITORY_PATH,targetBranch:e.targetBranch}}async function readPreparedSelfModificationWorkspace(e){let t=await gitOutput(e.sandbox,`git -C ${quote(REPOSITORY_PATH)} rev-parse ${BASE_REF}`);return assertFullSha(t,`target branch revision`),await verifyApplicationRoot(e.sandbox,e.directory),{baseSha:t,directory:e.directory,repository:e.repository,repositoryPath:REPOSITORY_PATH,targetBranch:e.targetBranch}}async function verifyApplicationRoot(e,t){let n=t===`.`?REPOSITORY_PATH:`${REPOSITORY_PATH}/${t}`;if((await e.run({command:`test -d ${quote(`${n}/agent`)}`})).exitCode!==0)throw Error(`Self-modification source directory does not contain agent/: ${t}`)}function quote(e){return shellQuote(e)}async function run(e,t){await runGitCommand(e,t)}export{REPOSITORY_PATH,SELF_MODIFICATION_CONFIG_PATH,prepareSelfModificationWorkspace,readPreparedSelfModificationWorkspace};
|
|
@@ -12,7 +12,7 @@ export interface PublishedSelfModificationProposal {
|
|
|
12
12
|
readonly merged: false;
|
|
13
13
|
readonly deployed: false;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
interface GitHubDraftPublisherInput {
|
|
16
16
|
readonly credentialProvider: GitHubCredentialProvider;
|
|
17
17
|
readonly description: string;
|
|
18
18
|
readonly fetch?: typeof fetch;
|
|
@@ -25,3 +25,4 @@ export interface GitHubDraftPublisherInput {
|
|
|
25
25
|
/** Captures agent-only edits, then publishes one replay-safe draft pull request. */
|
|
26
26
|
export declare function publishGitHubDraftPullRequest(input: GitHubDraftPublisherInput): Promise<PublishedSelfModificationProposal>;
|
|
27
27
|
export declare function selfModificationBranchName(baseSha: string, operationId: string): string;
|
|
28
|
+
export {};
|
|
@@ -25,4 +25,4 @@ export default defineSelfModificationConfig({
|
|
|
25
25
|
import config from "../config";
|
|
26
26
|
|
|
27
27
|
export default selfModification(config);
|
|
28
|
-
`]};async function detectLegacySelfModificationScaffold(e){let t=join(e,LEGACY_SELF_MODIFICATION_ROOT),n=await listFiles(t);if(!n.includes(`agent.ts`))return;let r=await readText(join(t,`agent.ts`));if(r===void 0||!r.includes(`defineSelfModificationAgent`))return;let i=new Set(LEGACY_FILES),a=JSON.stringify(await Promise.all(n.map(async e=>[e,await readText(join(t,e))]))),o=n.some(e=>!i.has(e))||(await Promise.all(Object.entries(LEGACY_DEFAULTS).map(async([e,n])=>{let r=await readText(join(t,e));return r===void 0||!n.includes(r)}))).some(Boolean)||!r.includes(`from "eve/self-modification/agent"`)||(await readText(join(t,`sandbox.ts`)))?.includes(`from "eve/self-modification/sandbox"`)!==!0;return{root:t,paths:n.map(e=>join(LEGACY_SELF_MODIFICATION_ROOT,e)),customized:o,signature:a}}async function removeLegacySelfModificationScaffold(e,t){let n=await detectLegacySelfModificationScaffold(e);if(n===void 0||n.root!==t.root||n.customized!==t.customized||n.signature!==t.signature)throw Error(`The self-modification scaffold changed while setup was waiting for cleanup approval.`);await rm(t.root,{recursive:!0,force:!0})}async function listFiles(e){try{return(await readdir(e,{recursive:!0,withFileTypes:!0})).filter(e=>e.isFile()).map(t=>relative(e,join(t.parentPath,t.name)).replaceAll(`\\`,`/`)).sort()}catch(e){if(e.code===`ENOENT`)return[];throw e}}async function readText(e){try{return await readFile(e,`utf8`)}catch(e){if(e.code===`ENOENT`)return;throw e}}export{
|
|
28
|
+
`]};async function detectLegacySelfModificationScaffold(e){let t=join(e,LEGACY_SELF_MODIFICATION_ROOT),n=await listFiles(t);if(!n.includes(`agent.ts`))return;let r=await readText(join(t,`agent.ts`));if(r===void 0||!r.includes(`defineSelfModificationAgent`))return;let i=new Set(LEGACY_FILES),a=JSON.stringify(await Promise.all(n.map(async e=>[e,await readText(join(t,e))]))),o=n.some(e=>!i.has(e))||(await Promise.all(Object.entries(LEGACY_DEFAULTS).map(async([e,n])=>{let r=await readText(join(t,e));return r===void 0||!n.includes(r)}))).some(Boolean)||!r.includes(`from "eve/self-modification/agent"`)||(await readText(join(t,`sandbox.ts`)))?.includes(`from "eve/self-modification/sandbox"`)!==!0;return{root:t,paths:n.map(e=>join(LEGACY_SELF_MODIFICATION_ROOT,e)),customized:o,signature:a}}async function removeLegacySelfModificationScaffold(e,t){let n=await detectLegacySelfModificationScaffold(e);if(n===void 0||n.root!==t.root||n.customized!==t.customized||n.signature!==t.signature)throw Error(`The self-modification scaffold changed while setup was waiting for cleanup approval.`);await rm(t.root,{recursive:!0,force:!0})}async function listFiles(e){try{return(await readdir(e,{recursive:!0,withFileTypes:!0})).filter(e=>e.isFile()).map(t=>relative(e,join(t.parentPath,t.name)).replaceAll(`\\`,`/`)).sort()}catch(e){if(e.code===`ENOENT`)return[];throw e}}async function readText(e){try{return await readFile(e,`utf8`)}catch(e){if(e.code===`ENOENT`)return;throw e}}export{detectLegacySelfModificationScaffold,removeLegacySelfModificationScaffold};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ResolvedSelfModificationConfig } from "./config.js";
|
|
2
|
-
|
|
2
|
+
type SelfModificationMode = "local" | "disabled" | "deployed";
|
|
3
3
|
/** Resolves the mutually exclusive local or deployed editing mode. */
|
|
4
4
|
export declare function resolveSelfModificationMode(config: ResolvedSelfModificationConfig): SelfModificationMode;
|
|
5
|
+
export {};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { SandboxSession } from "eve/sandbox";
|
|
2
2
|
import type { PreparedSelfModificationWorkspace } from "./git-workspace.js";
|
|
3
|
-
export declare const MAX_PROPOSAL_CHANGED_BYTES = 1000000;
|
|
4
|
-
export declare const MAX_PROPOSAL_CHANGED_FILES = 100;
|
|
5
3
|
export interface ProposalChange {
|
|
6
4
|
readonly bytes: number;
|
|
7
5
|
readonly kind: "add" | "delete" | "modify";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{assertFullSha}from"./identifiers.js";import{gitOutput,runGitCommand}from"./git.js";import{createHash}from"node:crypto";import{shellQuote}from"#shared/shell-quote.js";const MAX_PROPOSAL_CHANGED_BYTES=1e6
|
|
2
|
-
`)&&!e.includes(`\r`)&&!e.split(`/`).some(e=>e===``||e===`.`||e===`..`)}function proposalMode(e,t){if(e===`100644`||e===`100755`)return e;throw Error(`Self-modification proposal uses unsafe Git mode ${e}: ${JSON.stringify(t)}.`)}async function blobSize(e,t,n){assertFullSha(n,`proposal blob`);let r=await gitOutput(e,`git -C ${quote(t)} cat-file -s ${quote(n)}`);if(!/^\d+$/u.test(r)||!Number.isSafeInteger(Number(r)))throw Error(`Git returned an invalid blob size.`);return Number(r)}function quote(e){return shellQuote(e)}export{
|
|
1
|
+
import{assertFullSha}from"./identifiers.js";import{gitOutput,runGitCommand}from"./git.js";import{createHash}from"node:crypto";import{shellQuote}from"#shared/shell-quote.js";const MAX_PROPOSAL_CHANGED_BYTES=1e6;async function captureSelfModificationProposal(e){let t=quote(e.workspace.repositoryPath);assertFullSha(e.workspace.baseSha,`proposal base revision`),await runGitCommand(e.sandbox,`git -C ${t} add -A -- .`);let n=await gitOutput(e.sandbox,`git -C ${t} write-tree`),r=await gitOutput(e.sandbox,`git -C ${t} rev-parse ${quote(`${e.workspace.baseSha}^{tree}`)}`);assertFullSha(n,`proposal tree`),assertFullSha(r,`proposal base tree`);let i=parseRawDiff(await gitOutput(e.sandbox,`git -C ${t} diff-tree -r --no-commit-id --raw -z --no-renames ${quote(e.workspace.baseSha)} ${quote(n)}`,!1));if(i.length===0)throw Error(`Self-modification proposal contains no changes.`);if(i.length>100)throw Error(`Self-modification proposal changes ${i.length} files; limit is 100.`);let a=await selfModificationMountPaths({directory:e.workspace.directory,repositoryPath:e.workspace.repositoryPath,sandbox:e.sandbox,tree:e.workspace.baseSha}),o=await selfModificationMountPaths({directory:e.workspace.directory,repositoryPath:e.workspace.repositoryPath,sandbox:e.sandbox,tree:n}),s=[...new Set([...a,...o])],c=[],l=0;for(let t of i){let n=t.status===`D`?null:proposalMode(t.newMode,t.path),r=t.status===`D`?null:t.newObjectId;assertAllowedChange({mode:n,objectId:r,path:t.path},e.workspace.directory,s);let i=r===null?0:await blobSize(e.sandbox,e.workspace.repositoryPath,r);if(l+=i,l>MAX_PROPOSAL_CHANGED_BYTES)throw Error(`Self-modification proposal changes more than ${MAX_PROPOSAL_CHANGED_BYTES} bytes.`);c.push({bytes:i,kind:t.status===`A`?`add`:t.status===`D`?`delete`:`modify`,mode:n,objectId:r,path:t.path})}return{baseSha:e.workspace.baseSha,baseTreeSha:r,changedBytes:l,changes:c,proposedTreeSha:n}}async function readProposalBlob(e){if(e.change.objectId===null)throw Error(`Cannot read a deleted proposal blob.`);let t=await gitOutput(e.sandbox,`git -C ${quote(e.workspace.repositoryPath)} cat-file blob ${quote(e.change.objectId)} | base64 | tr -d '\\n'`),n=Buffer.from(t,`base64`),r=createHash(`sha1`).update(`blob ${n.byteLength}\0`).update(n).digest(`hex`);if(n.byteLength!==e.change.bytes||r!==e.change.objectId.toLowerCase())throw Error(`Self-modification proposal blob changed after validation: ${JSON.stringify(e.change.path)}.`);return t}function parseRawDiff(e){if(e.length===0)return[];let t=e.split(`\0`);if(t.at(-1)===``&&t.pop(),t.length%2!=0)throw Error(`Git returned malformed raw diff output.`);let n=[];for(let e=0;e<t.length;e+=2){let r=t[e],i=t[e+1],a=r===void 0?null:/^:[0-7]{6} ([0-7]{6}) [a-f0-9]{40} ([a-f0-9]{40}) ([ADM])$/u.exec(r);if(a===null||i===void 0||!isSafePath(i))throw Error(`Git returned malformed raw diff output.`);n.push({newMode:a[1],newObjectId:a[2],path:i,status:a[3]})}return n}function assertAllowedChange(e,t,n=[]){let r=e.path,i=t===`.`?``:`${t}/`,a=`${i}agent/`,o=r.split(`/`),s=o.at(-1)??``;if(!isSafePath(r)||o.includes(`.git`)||s===`.env`||s===`.envrc`||s.startsWith(`.env.`)||o.some(e=>[`node_modules`,`dist`,`build`,`.next`,`.output`,`.turbo`,`.vercel`,`coverage`,`out`].includes(e))||r.startsWith(`.github/workflows/`)||r.startsWith(`${a}subagents/self-modification/`)||r.startsWith(`${a}extensions/self-modification/`)||r===`${i}agent/extensions/self-modification.ts`||n.some(e=>r===e||r.startsWith(`${e}/`))||r===`${i}agent/extensions/selfmod.ts`||r===`${i}agent/self-modification.config.ts`)throw Error(`Self-modification proposal changes a protected path: ${JSON.stringify(r)}.`)}async function selfModificationMountPaths(e){let t=`${e.directory===`.`?``:`${e.directory}/`}agent/extensions`,n=await gitOutput(e.sandbox,`git -C ${quote(e.repositoryPath)} grep -l -z -F -- "eve/self-modification" ${quote(e.tree)} -- ${quote(t)}`,!1).catch(e=>{if(e instanceof Error&&e.message.includes(`failed with exit 1:`))return``;throw e});return[...new Set(n.split(`\0`).filter(Boolean).flatMap(e=>{let n=e.slice(e.indexOf(`:`)+1);if(!n.startsWith(`${t}/`))return[];let r=n.slice(t.length+1);return r.endsWith(`/extension.ts`)?[`${t}/${r.slice(0,-13)}`]:r.includes(`/`)?[`${t}/${r.split(`/`)[0]}`]:[n]}))]}function isSafePath(e){return e.length>0&&!e.startsWith(`/`)&&!e.includes(`\\`)&&!e.includes(`
|
|
2
|
+
`)&&!e.includes(`\r`)&&!e.split(`/`).some(e=>e===``||e===`.`||e===`..`)}function proposalMode(e,t){if(e===`100644`||e===`100755`)return e;throw Error(`Self-modification proposal uses unsafe Git mode ${e}: ${JSON.stringify(t)}.`)}async function blobSize(e,t,n){assertFullSha(n,`proposal blob`);let r=await gitOutput(e,`git -C ${quote(t)} cat-file -s ${quote(n)}`);if(!/^\d+$/u.test(r)||!Number.isSafeInteger(Number(r)))throw Error(`Git returned an invalid blob size.`);return Number(r)}function quote(e){return shellQuote(e)}export{assertAllowedChange,captureSelfModificationProposal,parseRawDiff,readProposalBlob};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SELF_MODIFICATION_CONFIG_PATH}from"./git-workspace.js";import{createHash}from"node:crypto";import{mkdir,readFile,writeFile}from"node:fs/promises";import{join,relative}from"node:path";import{
|
|
1
|
+
import{SELF_MODIFICATION_CONFIG_PATH}from"./git-workspace.js";import{createHash}from"node:crypto";import{mkdir,readFile,writeFile}from"node:fs/promises";import{join,relative}from"node:path";import{execFile}from"node:child_process";import{promisify}from"node:util";import{stripLogicalPathExtension}from"#discover/filesystem.js";import{captureVercel,runVercelCaptureStdout}from"#setup/primitives/run-vercel.js";import{discoverAgent}from"#discover/discover-agent.js";const runFile=promisify(execFile),defaultDependencies={captureVercel,runVercelCaptureStdout};function connectorName(e,t){return`selfmod-${e}-${t}`.toLowerCase().replaceAll(/[^a-z0-9-]/gu,`-`)}function renderSelfModificationConfig(e){if(e===void 0)return`import selfModification from "eve/self-modification";
|
|
2
2
|
|
|
3
3
|
export default selfModification({
|
|
4
4
|
// model: "provider/model",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AgentInfoResult, type Client } from "#client/index.js";
|
|
2
|
-
|
|
2
|
+
type AgentInfoProbeResult = {
|
|
3
3
|
readonly kind: "ready";
|
|
4
4
|
readonly info: AgentInfoResult;
|
|
5
5
|
} | {
|
|
@@ -15,3 +15,4 @@ export declare function probeAgentInfo(input: {
|
|
|
15
15
|
readonly client: Pick<Client, "info">;
|
|
16
16
|
readonly timeoutMs?: number;
|
|
17
17
|
}): Promise<AgentInfoProbeResult>;
|
|
18
|
+
export {};
|
|
@@ -4,7 +4,7 @@ declare const VercelOidcClaimsSchema: z.ZodObject<{
|
|
|
4
4
|
project_id: z.ZodString;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
/** Vercel owner and project expected to have minted an OIDC token. */
|
|
7
|
-
|
|
7
|
+
interface DevelopmentOidcTarget {
|
|
8
8
|
readonly ownerId: string;
|
|
9
9
|
readonly projectId: string;
|
|
10
10
|
/** Ignore an ambient token and ask Vercel for this exact project. */
|
|
@@ -25,14 +25,6 @@ export declare function vercelTrustedSourcesErrorCode(message: string): string |
|
|
|
25
25
|
* error survived a network/IPC boundary.
|
|
26
26
|
*/
|
|
27
27
|
export declare function isVercelAuthChallenge(error: unknown): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Builds the human-readable repair message for the existing dev-client
|
|
30
|
-
* challenge surface, including a structured local OIDC failure when known.
|
|
31
|
-
*/
|
|
32
|
-
export declare function formatVercelAuthChallengeMessage(input: {
|
|
33
|
-
readonly serverUrl: string;
|
|
34
|
-
readonly oidcTokenFailure?: DevelopmentOidcTokenFailure;
|
|
35
|
-
}): string;
|
|
36
28
|
export declare function formatDevelopmentOidcTokenFailure(failure: DevelopmentOidcTokenFailure): string;
|
|
37
29
|
/**
|
|
38
30
|
* Keeps the actionable Trusted Sources reason and stable error code while
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import{isObject}from"#shared/guards.js";import{ClientError}from"#client/client-error.js";const VERCEL_AUTH_CHALLENGE_MARKERS=[`vercel.com/sso-api`,`<title>Authentication Required</title>`],TRUSTED_SOURCES_ERROR_CODE=/^TRUSTED_SOURCES_[A-Z0-9_]+$/u;function vercelTrustedSourcesErrorCode(e){for(let t of e.replaceAll(`\r
|
|
2
2
|
`,`
|
|
3
3
|
`).trim().split(`
|
|
4
|
-
`)){let e=t.trim();if(TRUSTED_SOURCES_ERROR_CODE.test(e))return e}}function bodyLooksLikeVercelAuthChallenge(e){return e.length>0&&VERCEL_AUTH_CHALLENGE_MARKERS.every(t=>e.includes(t))}function isVercelSsoUrl(e){let t=URL.parse(e);return t?.origin===`https://vercel.com`&&t.pathname===`/sso-api`&&t.searchParams.has(`url`)}function isVercelSsoRedirect(e,t){if(e<300||e>=400||t===void 0)return!1;for(let[e,n]of Object.entries(t))if(e.toLowerCase()===`location`&&typeof n==`string`)return isVercelSsoUrl(n);return!1}function isVercelUnauthorized(e,t){if(e!==401||t===void 0)return!1;for(let[e,n]of Object.entries(t))if(e.toLowerCase()===`x-vercel-error`&&n===`UNAUTHORIZED`)return!0;return!1}function bodyLooksLikeStructuredVercelAuthChallenge(e){let t;try{t=JSON.parse(e)}catch{return!1}if(!isObject(t)||!isObject(t.error)||!isObject(t.protection))return!1;let n=t.error.code,r=t.protection.vercel_auth_callback;return(n===401||n===`401`)&&t.error.message===`Protected deployment`&&typeof r==`string`&&isVercelSsoUrl(r)}function isVercelAuthChallenge(e){let t=e instanceof ClientError||isObject(e)?e:void 0;if(t===void 0||typeof t.status!=`number`||typeof t.body!=`string`)return!1;let n=isObject(t.headers)?t.headers:void 0;return isVercelSsoRedirect(t.status,n)||isVercelUnauthorized(t.status,n)||t.status===401&&(bodyLooksLikeVercelAuthChallenge(t.body)||bodyLooksLikeStructuredVercelAuthChallenge(t.body))}function
|
|
5
|
-
`)}function formatDevelopmentOidcTokenFailure(e){switch(e.kind){case`resolution-failed`:return`The local Vercel OIDC token could not be resolved: ${e.message}`;case`malformed-token`:return e.reason===`missing-payload`?`Vercel returned a local OIDC token without a JWT payload.`:`Vercel returned a local OIDC token whose payload is not valid JSON.`;case`invalid-claims`:return`The local Vercel OIDC token has invalid claims: ${e.invalidClaims.join(`, `)}.`;case`target-mismatch`:return`The local Vercel OIDC token does not match the resolved deployment: ${e.mismatchedClaims.join(`, `)}.`;default:return e}}function formatVercelTrustedSourcesFailure(e){let t=e.replaceAll(`\r
|
|
4
|
+
`)){let e=t.trim();if(TRUSTED_SOURCES_ERROR_CODE.test(e))return e}}function bodyLooksLikeVercelAuthChallenge(e){return e.length>0&&VERCEL_AUTH_CHALLENGE_MARKERS.every(t=>e.includes(t))}function isVercelSsoUrl(e){let t=URL.parse(e);return t?.origin===`https://vercel.com`&&t.pathname===`/sso-api`&&t.searchParams.has(`url`)}function isVercelSsoRedirect(e,t){if(e<300||e>=400||t===void 0)return!1;for(let[e,n]of Object.entries(t))if(e.toLowerCase()===`location`&&typeof n==`string`)return isVercelSsoUrl(n);return!1}function isVercelUnauthorized(e,t){if(e!==401||t===void 0)return!1;for(let[e,n]of Object.entries(t))if(e.toLowerCase()===`x-vercel-error`&&n===`UNAUTHORIZED`)return!0;return!1}function bodyLooksLikeStructuredVercelAuthChallenge(e){let t;try{t=JSON.parse(e)}catch{return!1}if(!isObject(t)||!isObject(t.error)||!isObject(t.protection))return!1;let n=t.error.code,r=t.protection.vercel_auth_callback;return(n===401||n===`401`)&&t.error.message===`Protected deployment`&&typeof r==`string`&&isVercelSsoUrl(r)}function isVercelAuthChallenge(e){let t=e instanceof ClientError||isObject(e)?e:void 0;if(t===void 0||typeof t.status!=`number`||typeof t.body!=`string`)return!1;let n=isObject(t.headers)?t.headers:void 0;return isVercelSsoRedirect(t.status,n)||isVercelUnauthorized(t.status,n)||t.status===401&&(bodyLooksLikeVercelAuthChallenge(t.body)||bodyLooksLikeStructuredVercelAuthChallenge(t.body))}function formatDevelopmentOidcTokenFailure(e){switch(e.kind){case`resolution-failed`:return`The local Vercel OIDC token could not be resolved: ${e.message}`;case`malformed-token`:return e.reason===`missing-payload`?`Vercel returned a local OIDC token without a JWT payload.`:`Vercel returned a local OIDC token whose payload is not valid JSON.`;case`invalid-claims`:return`The local Vercel OIDC token has invalid claims: ${e.invalidClaims.join(`, `)}.`;case`target-mismatch`:return`The local Vercel OIDC token does not match the resolved deployment: ${e.mismatchedClaims.join(`, `)}.`;default:return e}}function formatVercelTrustedSourcesFailure(e){let t=e.replaceAll(`\r
|
|
6
5
|
`,`
|
|
7
6
|
`).trim().split(`
|
|
8
7
|
`),n=t.findIndex(e=>TRUSTED_SOURCES_ERROR_CODE.test(e.trim()));if(n<0)return e;let r=t[n].trim(),i=t.slice(0,n).join(`
|
|
9
|
-
`).trim();return i.length===0?e:`${i}\n\n${r}`}export{formatDevelopmentOidcTokenFailure,
|
|
8
|
+
`).trim();return i.length===0?e:`${i}\n\n${r}`}export{formatDevelopmentOidcTokenFailure,formatVercelTrustedSourcesFailure,isVercelAuthChallenge,vercelTrustedSourcesErrorCode};
|
|
@@ -2,7 +2,7 @@ import { appendEnv } from "./append-env.js";
|
|
|
2
2
|
export declare const AI_GATEWAY_API_KEY_ENV_VAR = "AI_GATEWAY_API_KEY";
|
|
3
3
|
export declare const AI_GATEWAY_API_KEY_ENV_FILE = ".env.local";
|
|
4
4
|
/** The location written by eve when a user supplies an AI Gateway API key. */
|
|
5
|
-
|
|
5
|
+
interface AiGatewayApiKeyLocation {
|
|
6
6
|
envKey: typeof AI_GATEWAY_API_KEY_ENV_VAR;
|
|
7
7
|
envFile: typeof AI_GATEWAY_API_KEY_ENV_FILE;
|
|
8
8
|
envPath: string;
|
|
@@ -13,3 +13,4 @@ export declare function writeAiGatewayApiKey(input: {
|
|
|
13
13
|
apiKey: string;
|
|
14
14
|
appendEnv?: typeof appendEnv;
|
|
15
15
|
}): Promise<AiGatewayApiKeyLocation>;
|
|
16
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
interface AppendEnvOptions {
|
|
2
2
|
/** Replace existing keys. Default: false (existing keys are preserved). */
|
|
3
3
|
force?: boolean;
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
interface AppendEnvResult {
|
|
6
6
|
/** Keys that were inserted or replaced. */
|
|
7
7
|
written: string[];
|
|
8
8
|
/** Keys that already existed and were preserved (only when `force` is false). */
|
|
@@ -19,3 +19,4 @@ export interface AppendEnvResult {
|
|
|
19
19
|
* accurately ("already had X — kept your value").
|
|
20
20
|
*/
|
|
21
21
|
export declare function appendEnv(envPath: string, values: Record<string, string>, options?: AppendEnvOptions): Promise<AppendEnvResult>;
|
|
22
|
+
export {};
|
package/dist/src/setup/ask.d.ts
CHANGED
|
@@ -156,7 +156,7 @@ export interface Asker {
|
|
|
156
156
|
askMany<T>(question: MultiSelectQuestion<T>): Promise<T[]>;
|
|
157
157
|
}
|
|
158
158
|
/** A ladder rung: wraps an asker and resolves (or rewrites) some questions. */
|
|
159
|
-
|
|
159
|
+
type AskerDecorator = (inner: Asker) => Asker;
|
|
160
160
|
/** How a question got its value, so nothing is silently assumed. */
|
|
161
161
|
export type ResolutionSource = "answer" | "detected" | "assumed" | "asked" | "skipped";
|
|
162
162
|
/** One announced question outcome. */
|
|
@@ -166,7 +166,7 @@ export interface Resolution {
|
|
|
166
166
|
source: ResolutionSource;
|
|
167
167
|
}
|
|
168
168
|
/** Every resolution is announced with its source: nothing is silently assumed. */
|
|
169
|
-
|
|
169
|
+
interface AskerEvents {
|
|
170
170
|
onResolved?: (resolution: Resolution) => void;
|
|
171
171
|
}
|
|
172
172
|
/**
|
|
@@ -195,7 +195,7 @@ export declare function withAnswers(answers: Record<string, unknown>, events?: A
|
|
|
195
195
|
*/
|
|
196
196
|
export declare function withRequired(keys: readonly string[]): AskerDecorator;
|
|
197
197
|
/** The two detected/recommended rungs of the ladder. */
|
|
198
|
-
|
|
198
|
+
type AnswerPolicy = "confirm-detected" | "assume";
|
|
199
199
|
/**
|
|
200
200
|
* The detected/recommended rungs. "confirm-detected" turns a detected value
|
|
201
201
|
* into a one-keystroke confirm (synthesized as an internal question through
|
|
@@ -10,7 +10,7 @@ export interface ApplyAiGatewayCredentialDeps {
|
|
|
10
10
|
runVercelEnvPull: typeof runVercelEnvPull;
|
|
11
11
|
detectAiGatewayResolution: typeof detectAiGatewayResolution;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
interface ApplyAiGatewayCredentialOptions {
|
|
14
14
|
/** Reports credential progress and warnings. The box never prompts through it. */
|
|
15
15
|
prompter: Prompter;
|
|
16
16
|
deps?: ApplyAiGatewayCredentialDeps;
|
|
@@ -26,3 +26,4 @@ export interface ApplyAiGatewayCredentialOptions {
|
|
|
26
26
|
* scaffolded provider block.
|
|
27
27
|
*/
|
|
28
28
|
export declare function applyAiGatewayCredential(options: ApplyAiGatewayCredentialOptions): SetupBox<SetupState, null, ResolvedAiGatewayCredentials>;
|
|
29
|
+
export {};
|
|
@@ -14,7 +14,7 @@ export interface DeployProjectDeps {
|
|
|
14
14
|
detectDeployment: typeof detectDeployment;
|
|
15
15
|
syncHostFrameworkPreset: typeof syncHostFrameworkPreset;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
interface DeployProjectOptions {
|
|
18
18
|
/** Deploy progress and command output stream through this log (rail styling preserved). */
|
|
19
19
|
prompter: {
|
|
20
20
|
log: ChannelSetupLog;
|
|
@@ -41,11 +41,11 @@ export interface DeployProjectOptions {
|
|
|
41
41
|
* commands inside `perform`; it is fixed at composition time (the box prompts
|
|
42
42
|
* for nothing) and passed straight through {@link DeployProjectOptions.headless}.
|
|
43
43
|
*/
|
|
44
|
-
|
|
44
|
+
interface DeployProjectInput {
|
|
45
45
|
headless: boolean;
|
|
46
46
|
}
|
|
47
47
|
/** The deploy facts `apply` records: the (re)deployed project and the cleared flags. */
|
|
48
|
-
|
|
48
|
+
interface DeployProjectPayload {
|
|
49
49
|
project: ProjectResolution;
|
|
50
50
|
deploymentPending: boolean;
|
|
51
51
|
deploymentDependenciesInstalled: boolean;
|
|
@@ -70,3 +70,4 @@ export interface DeployProjectPayload {
|
|
|
70
70
|
* gets the reconcile without composing a separate box.
|
|
71
71
|
*/
|
|
72
72
|
export declare function deployProject(options: DeployProjectOptions): SetupBox<SetupState, DeployProjectInput, DeployProjectPayload>;
|
|
73
|
+
export {};
|
|
@@ -9,7 +9,7 @@ export interface LinkProjectDeps {
|
|
|
9
9
|
detectProjectResolution: typeof detectProjectResolution;
|
|
10
10
|
unresolvedProject: typeof unresolvedProject;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
interface LinkProjectOptions {
|
|
13
13
|
/** Streams link progress and, in interactive runs, may confirm ambiguous framework detection. */
|
|
14
14
|
prompter: Prompter;
|
|
15
15
|
/** Headless runs must not ask follow-up questions after the plan is fixed. */
|
|
@@ -31,3 +31,4 @@ export interface LinkProjectOptions {
|
|
|
31
31
|
* in `state.project`.
|
|
32
32
|
*/
|
|
33
33
|
export declare function linkVercelProject(options: LinkProjectOptions): SetupBox<SetupState, null, ProjectResolution>;
|
|
34
|
+
export {};
|
|
@@ -50,7 +50,7 @@ export interface ResolveProvisioningOptions {
|
|
|
50
50
|
deps?: ResolveProvisioningDeps;
|
|
51
51
|
}
|
|
52
52
|
/** Both provisioning plans plus the model wiring they imply. Input and payload. */
|
|
53
|
-
|
|
53
|
+
interface ResolvedProvisioning {
|
|
54
54
|
vercelProject: ResolvedVercelProject;
|
|
55
55
|
aiGateway: ResolvedAiGateway;
|
|
56
56
|
modelWiring: WiringMode;
|
|
@@ -71,3 +71,4 @@ export interface ResolvedProvisioning {
|
|
|
71
71
|
* `perform` passes the plan through untouched so `apply` can record it.
|
|
72
72
|
*/
|
|
73
73
|
export declare function resolveProvisioning(options: ResolveProvisioningOptions): SetupBox<SetupState, ResolvedProvisioning, ResolvedProvisioning>;
|
|
74
|
+
export {};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { type GatewayCatalogModel } from "#shared/gateway-model-catalog.js";
|
|
2
|
-
import
|
|
3
|
-
import type { SetupState } from "../state.js";
|
|
4
|
-
import type { SetupBox } from "../step.js";
|
|
2
|
+
import type { SelectOption } from "../ask.js";
|
|
5
3
|
export type { GatewayCatalogModel } from "#shared/gateway-model-catalog.js";
|
|
6
|
-
/** Fetches the raw AI Gateway catalog.
|
|
4
|
+
/** Fetches the raw AI Gateway catalog. */
|
|
7
5
|
export declare function fetchGatewayCatalog(signal?: AbortSignal): Promise<GatewayCatalogModel[]>;
|
|
8
|
-
export { parseGatewayModelCatalog as parseGatewayCatalog } from "#shared/gateway-model-catalog.js";
|
|
9
6
|
/**
|
|
10
7
|
* Builds picker options from a fetched catalog, keeping the default model and
|
|
11
8
|
* filtering the rest to language models with the `web-search` tag. The curated
|
|
@@ -15,35 +12,3 @@ export { parseGatewayModelCatalog as parseGatewayCatalog } from "#shared/gateway
|
|
|
15
12
|
* back to a static shortlist when the catalog is missing or yields nothing.
|
|
16
13
|
*/
|
|
17
14
|
export declare function modelOptionsFromCatalog(catalog: readonly GatewayCatalogModel[] | undefined): SelectOption<string>[];
|
|
18
|
-
/** Injected for tests; defaults to the real AI Gateway catalog fetch. */
|
|
19
|
-
export interface SelectModelDeps {
|
|
20
|
-
fetchModels: (signal?: AbortSignal) => Promise<GatewayCatalogModel[]>;
|
|
21
|
-
}
|
|
22
|
-
export interface SelectModelOptions {
|
|
23
|
-
/** Resolves the model question; the composed stack decides how. */
|
|
24
|
-
asker: Asker;
|
|
25
|
-
/**
|
|
26
|
-
* Resolve to this value without fetching the catalog or asking. Stays a
|
|
27
|
-
* factory option (not a `withAnswers` rung) because a preset must keep
|
|
28
|
-
* short-circuiting the catalog fetch and must keep accepting ids the
|
|
29
|
-
* filtered catalog does not list, exactly as the dual-face box did.
|
|
30
|
-
*/
|
|
31
|
-
presetModel?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Pre-select this model in the picker so enter confirms it. Falls back to the
|
|
34
|
-
* top catalog entry when omitted or not present in the catalog.
|
|
35
|
-
*/
|
|
36
|
-
defaultModel?: string;
|
|
37
|
-
deps?: SelectModelDeps;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* THE MODEL BOX: pick the default model baked into `agent/agent.ts`. The
|
|
41
|
-
* gather fetches the AI Gateway catalog and asks one required "model" select
|
|
42
|
-
* through the box's asker, so an interactive stack offers a searchable picker
|
|
43
|
-
* while a headless stack refuses structurally when no preset answered it.
|
|
44
|
-
* The model is the first thing the interview decides about the agent itself;
|
|
45
|
-
* how the credential is wired (gateway vs your own provider key) is the
|
|
46
|
-
* provisioning box's later decision, and the byok scaffold derives its
|
|
47
|
-
* provider block from whatever model was picked here.
|
|
48
|
-
*/
|
|
49
|
-
export declare function selectModel(options: SelectModelOptions): SetupBox<SetupState, string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{DEFAULT_AGENT_MODEL_ID}from"#shared/default-agent-model.js";import{AI_GATEWAY_MODELS_URL,vercelGatewayFetch}from"#internal/gateway.js";import{parseGatewayModelCatalog}from"#shared/gateway-model-catalog.js";function modelOption(e,t,n,r=!0){return{id:e,label:t,value:e,hint:n,featured:r||void 0}}const FEATURED_MODEL_IDS=[DEFAULT_AGENT_MODEL_ID,`anthropic/claude-opus-4.8`,`openai/gpt-5.5`],FALLBACK_MODELS=[modelOption(DEFAULT_AGENT_MODEL_ID,`Grok 4.7`,`SpaceXAI`),modelOption(`anthropic/claude-opus-4.8`,`Claude Opus 4.8`,`Anthropic`),modelOption(`openai/gpt-5.5`,`GPT-5.5`,`OpenAI`),modelOption(`google/gemini-3.5`,`Gemini 3.5`,`Google`,!1)],PROVIDER_BRANDS={openai:`OpenAI`,zai:`Z.AI`,xai:`xAI`,spacexai:`SpaceXAI`,deepseek:`DeepSeek`,moonshotai:`Moonshot AI`};function providerLabel(e){return e.length===0?``:PROVIDER_BRANDS[e]??e.charAt(0).toUpperCase()+e.slice(1)}async function fetchGatewayCatalog(e){let t=new AbortController,n=setTimeout(()=>t.abort(),5e3);try{let n=e===void 0?t.signal:AbortSignal.any([e,t.signal]),r=await vercelGatewayFetch(AI_GATEWAY_MODELS_URL,{signal:n});if(!r.ok)throw Error(`AI Gateway model catalog request failed (${r.status}).`);return parseGatewayModelCatalog(await r.json())}finally{clearTimeout(n)}}function featuredPriority(e){let t=FEATURED_MODEL_IDS.indexOf(e);return t===-1?FEATURED_MODEL_IDS.length:t}function modelOptionsFromCatalog(e){if(e===void 0)return FALLBACK_MODELS;let t=e.filter(e=>e.type===`language`&&(e.id===DEFAULT_AGENT_MODEL_ID||(e.tags??[]).includes(`web-search`))).map(e=>{let t=e.id.split(`/`)[0]??``;return{value:e.id,label:e.name,hint:providerLabel(t),provider:t,released:e.released}}).sort((e,t)=>{let n=featuredPriority(e.value)-featuredPriority(t.value);if(n!==0)return n;let r=(t.released??-1/0)-(e.released??-1/0);if(r!==0)return r;let i=e.label.localeCompare(t.label);return i===0?e.value.localeCompare(t.value):i});return t.length===0?FALLBACK_MODELS:t.map(({value:e,label:t,hint:n})=>({id:e,label:t,value:e,hint:n,featured:FEATURED_MODEL_IDS.includes(e)||void 0}))}export{fetchGatewayCatalog,modelOptionsFromCatalog};
|
|
@@ -20,7 +20,7 @@ export interface RowColors {
|
|
|
20
20
|
yellow(text: string): string;
|
|
21
21
|
}
|
|
22
22
|
/** The glyphs the row painter draws; the TUI passes theme-derived values, the CLI the unicode set. */
|
|
23
|
-
|
|
23
|
+
interface RowGlyphs {
|
|
24
24
|
/** Hollow cursor marker for an inert row. */
|
|
25
25
|
pointer: string;
|
|
26
26
|
/** Filled cursor marker for an actionable row. */
|
|
@@ -128,16 +128,6 @@ export declare function renderSelectPrompt<T extends PromptValue>(input: {
|
|
|
128
128
|
options: readonly PromptOption<T>[];
|
|
129
129
|
state: PromptState;
|
|
130
130
|
}): string;
|
|
131
|
-
/**
|
|
132
|
-
* Renders the virtual Submit row that closes every multi-select list. It has
|
|
133
|
-
* no checkbox — its bold label sits in the checkbox column, trails a green
|
|
134
|
-
* check, and uses the shared cursor highlight; enter confirms the checklist only
|
|
135
|
-
* from here. The label reads "Skip" while an optional checklist has nothing
|
|
136
|
-
* picked (the caller computes that), so an empty confirm is honest about what
|
|
137
|
-
* it does. Callers put a blank rail line above it to set it apart from the
|
|
138
|
-
* options.
|
|
139
|
-
*/
|
|
140
|
-
export declare function renderSubmitRow(isCursor: boolean, colors: PromptColors, label?: string): string;
|
|
141
131
|
/**
|
|
142
132
|
* Renders the type-ahead select interaction: a filter line, a scrolling window
|
|
143
133
|
* of options, and a mode-aware help line. Single-select marks the highlighted
|
|
@@ -2,4 +2,4 @@ import{UNICODE_ROW_GLYPHS,renderCursorRow,renderOptionRow,renderOptionRowContinu
|
|
|
2
2
|
`);return`${t.green(`│`)}\n${t.green(`●`)} ${n}\n`}function formatPromptCancellation(e,t){let n=e.replace(/\n/g,`
|
|
3
3
|
`);return`${t.red(`│`)}\n${t.red(`●`)} ${t.red(n)}\n`}function formatRailLine(e,t,n){if(e===``)return`${t.green(`│`)}\n`;let r=`${t.green(`│`)} `;return`${e.split(`
|
|
4
4
|
`).map(e=>e===``?t.green(`│`):wrapTextWithPrefix(n,e,r)).join(`
|
|
5
|
-
`)}\n`}function renderMultiselectPrompt(e){let t=railFor(e.state,e.colors),n=formatPromptHeader(e.state,e.message,{colors:e.colors,leadingRail:e.leadingRail}),r=new Set(e.selectedValues),i=e.options.some(e=>!e.disabled)?``:`\n${t}\n${t} ${e.colors.dim(`(no channels available to add)`)}`;switch(e.state){case`submit`:{let t=r.size===0?e.colors.dim(`(none selected)`):e.options.filter(e=>r.has(e.value)).map(e=>e.label).join(`, `);return formatPromptSubmission(e.state,e.message,t,{colors:e.colors,leadingRail:e.leadingRail})}case`cancel`:return`${n}${t} ${e.colors.strikethrough(e.colors.dim(`cancelled`))}\n${t}`;case`error`:{let r=renderMultiselectRows({...e,rail:t});return`${n.trim()}\n${t} ${r}${i}\n${cornerFor(e.state,e.colors)} ${e.colors.red(e.error??``)}\n`}case`initial`:case`active`:return`${n}${t} ${renderMultiselectRows({...e,rail:t})}${i}\n${cornerWithNote(cornerFor(e.state,e.colors),e.footerNote)}\n`}}function cornerWithNote(e,t){return t?`${e} ${t}`:e}function renderSelectPrompt(e){let t=railFor(e.state,e.colors),n=formatPromptHeader(e.state,e.message,{colors:e.colors,leadingRail:e.leadingRail}),r=e.options[e.cursor];switch(e.state){case`submit`:{let t=r?r.label:``;return formatPromptSubmission(e.state,e.message,t,{colors:e.colors,leadingRail:e.leadingRail})}case`cancel`:return`${n}${t} ${r?e.colors.strikethrough(e.colors.dim(r.label)):``}\n${t}`;case`initial`:case`active`:case`error`:{let r=labelColumnWidth(e.options);return`${n}${t} ${e.options.map((n,i)=>{let a=i===e.cursor;return`${optionRow(n,{colors:e.colors,isCursor:a,isChecked:!1,placeholder:!1,hintPadding:r-n.label.length})}${descriptionLine(n,a,t,e.colors)}`}).join(`\n${t} `)}\n${cornerWithNote(cornerFor(e.state,e.colors),e.footerNote)}\n`}}}function labelColumnWidth(e){return e.reduce((e,t)=>Math.max(e,t.label.length),0)}function optionRow(e,t){return renderOptionRow({colors:t.colors,glyphs:UNICODE_ROW_GLYPHS,label:e.label,hint:e.hint,focusHint:e.focusHint,accent:e.accent,isCursor:t.isCursor,state:resolveOptionRowState(e,t.isChecked),placeholder:t.placeholder,hintPadding:t.hintPadding})}function descriptionLine(e,t,n,r){return t&&e.description&&!e.disabled?`\n${n} ${renderOptionRowContinuation(r.dim(e.description))}`:``}function renderSubmitRow(e,t,n=`Submit`){let r=t.bold(n),i=e?`${UNICODE_ROW_GLYPHS.selectedPointer} ${r}`:` ${t.dim(r)}`;return`${renderCursorRow(i,e,t)} ${t.green(UNICODE_ROW_GLYPHS.success)}`}function renderMultiselectRows(e){let t=new Set(e.selectedValues),n=labelColumnWidth(e.options),r=e.options.map((r,i)=>{let a=i===e.cursor;return`${optionRow(r,{colors:e.colors,isCursor:a,isChecked:t.has(r.value),placeholder:!0,hintPadding:n-r.label.length})}${descriptionLine(r,a,e.rail,e.colors)}`}).join(`\n${e.rail} `),i=renderSubmitRow(e.cursor===e.options.length,e.colors,e.submitLabel);return`${r}\n${e.rail}\n${e.rail} ${i}`}function searchableHelpLine(e,t,n){let r=(n?[[t.cyan(`type`),`to filter`]]:[[t.cyan(`type`),`to filter`],[t.cyan(`enter`),`to select`]]).map(([e,n])=>`${e}${t.dim(` ${n}`)}`).join(t.dim(` · `));return`\n${e} ${t.dim(`(`)}${r}${t.dim(`)`)}`}function renderSearchableSelect(e){let{colors:t}=e,n=railFor(e.state,t),r=formatPromptHeader(e.state,e.message,{colors:t,leadingRail:e.leadingRail});if(e.state===`submit`)return formatPromptSubmission(e.state,e.message,e.submitDisplay,{colors:t,leadingRail:e.leadingRail});if(e.state===`cancel`)return`${r}${n} ${t.strikethrough(t.dim(e.filter))}${e.filter.trim()?`\n${n}`:``}`;let i=new Set(e.selectedValues),a=0;for(;e.options[a]?.featured;)a+=1;let o=e.viewSize??8,s=e.filter===``&&a>0?Math.min(a,o):o,c=e.multiple&&e.cursor>=e.options.length,l=!c&&e.cursor>=e.options.length?0:e.cursor,u=t.inverse(` `);e.filter.length>0?u=e.filter+t.inverse(` `):e.placeholder&&(u=t.dim(e.placeholder));let d=Math.max(0,Math.min(l-Math.floor(s/2),Math.max(0,e.options.length-s))),f=Math.min(d+s,e.options.length),p=e.options.slice(d,f),m=labelColumnWidth(p),h=p.length===0?t.dim(`(no matches)`):p.map((r,a)=>{let o=!c&&a+d===l;return`${optionRow(r,{colors:t,isCursor:o,isChecked:e.multiple&&i.has(r.value),placeholder:!1,hintPadding:m-r.label.length})}${descriptionLine(r,o,n,t)}`}).join(`\n${n} `),g=e.multiple?`\n${n}\n${n} ${renderSubmitRow(c,t,e.submitLabel)}`:``,_=e.options.length>p.length?`\n${n} ${t.dim(`↑↓ ${e.options.length} options, showing ${d+1}–${f}`)}`:``,v=searchableHelpLine(n,t,e.multiple),y=`${n} ${t.dim(` `)} ${u}\n${n} ${h}${g}${_}${v}`;return e.state===`error`?`${r.trim()}\n${y}\n${cornerFor(e.state,t)} ${t.red(e.error??``)}\n`:`${r}${y}\n${cornerWithNote(cornerFor(e.state,t),e.footerNote)}\n`}export{CORNER,RAIL,bulletFor,cornerFor,formatPromptCancellation,formatPromptHeader,formatPromptOpener,formatPromptOutro,formatPromptSubmission,formatRailLine,railFor,renderMultiselectPrompt,renderSearchableSelect,renderSelectPrompt
|
|
5
|
+
`)}\n`}function renderMultiselectPrompt(e){let t=railFor(e.state,e.colors),n=formatPromptHeader(e.state,e.message,{colors:e.colors,leadingRail:e.leadingRail}),r=new Set(e.selectedValues),i=e.options.some(e=>!e.disabled)?``:`\n${t}\n${t} ${e.colors.dim(`(no channels available to add)`)}`;switch(e.state){case`submit`:{let t=r.size===0?e.colors.dim(`(none selected)`):e.options.filter(e=>r.has(e.value)).map(e=>e.label).join(`, `);return formatPromptSubmission(e.state,e.message,t,{colors:e.colors,leadingRail:e.leadingRail})}case`cancel`:return`${n}${t} ${e.colors.strikethrough(e.colors.dim(`cancelled`))}\n${t}`;case`error`:{let r=renderMultiselectRows({...e,rail:t});return`${n.trim()}\n${t} ${r}${i}\n${cornerFor(e.state,e.colors)} ${e.colors.red(e.error??``)}\n`}case`initial`:case`active`:return`${n}${t} ${renderMultiselectRows({...e,rail:t})}${i}\n${cornerWithNote(cornerFor(e.state,e.colors),e.footerNote)}\n`}}function cornerWithNote(e,t){return t?`${e} ${t}`:e}function renderSelectPrompt(e){let t=railFor(e.state,e.colors),n=formatPromptHeader(e.state,e.message,{colors:e.colors,leadingRail:e.leadingRail}),r=e.options[e.cursor];switch(e.state){case`submit`:{let t=r?r.label:``;return formatPromptSubmission(e.state,e.message,t,{colors:e.colors,leadingRail:e.leadingRail})}case`cancel`:return`${n}${t} ${r?e.colors.strikethrough(e.colors.dim(r.label)):``}\n${t}`;case`initial`:case`active`:case`error`:{let r=labelColumnWidth(e.options);return`${n}${t} ${e.options.map((n,i)=>{let a=i===e.cursor;return`${optionRow(n,{colors:e.colors,isCursor:a,isChecked:!1,placeholder:!1,hintPadding:r-n.label.length})}${descriptionLine(n,a,t,e.colors)}`}).join(`\n${t} `)}\n${cornerWithNote(cornerFor(e.state,e.colors),e.footerNote)}\n`}}}function labelColumnWidth(e){return e.reduce((e,t)=>Math.max(e,t.label.length),0)}function optionRow(e,t){return renderOptionRow({colors:t.colors,glyphs:UNICODE_ROW_GLYPHS,label:e.label,hint:e.hint,focusHint:e.focusHint,accent:e.accent,isCursor:t.isCursor,state:resolveOptionRowState(e,t.isChecked),placeholder:t.placeholder,hintPadding:t.hintPadding})}function descriptionLine(e,t,n,r){return t&&e.description&&!e.disabled?`\n${n} ${renderOptionRowContinuation(r.dim(e.description))}`:``}function renderSubmitRow(e,t,n=`Submit`){let r=t.bold(n),i=e?`${UNICODE_ROW_GLYPHS.selectedPointer} ${r}`:` ${t.dim(r)}`;return`${renderCursorRow(i,e,t)} ${t.green(UNICODE_ROW_GLYPHS.success)}`}function renderMultiselectRows(e){let t=new Set(e.selectedValues),n=labelColumnWidth(e.options),r=e.options.map((r,i)=>{let a=i===e.cursor;return`${optionRow(r,{colors:e.colors,isCursor:a,isChecked:t.has(r.value),placeholder:!0,hintPadding:n-r.label.length})}${descriptionLine(r,a,e.rail,e.colors)}`}).join(`\n${e.rail} `),i=renderSubmitRow(e.cursor===e.options.length,e.colors,e.submitLabel);return`${r}\n${e.rail}\n${e.rail} ${i}`}function searchableHelpLine(e,t,n){let r=(n?[[t.cyan(`type`),`to filter`]]:[[t.cyan(`type`),`to filter`],[t.cyan(`enter`),`to select`]]).map(([e,n])=>`${e}${t.dim(` ${n}`)}`).join(t.dim(` · `));return`\n${e} ${t.dim(`(`)}${r}${t.dim(`)`)}`}function renderSearchableSelect(e){let{colors:t}=e,n=railFor(e.state,t),r=formatPromptHeader(e.state,e.message,{colors:t,leadingRail:e.leadingRail});if(e.state===`submit`)return formatPromptSubmission(e.state,e.message,e.submitDisplay,{colors:t,leadingRail:e.leadingRail});if(e.state===`cancel`)return`${r}${n} ${t.strikethrough(t.dim(e.filter))}${e.filter.trim()?`\n${n}`:``}`;let i=new Set(e.selectedValues),a=0;for(;e.options[a]?.featured;)a+=1;let o=e.viewSize??8,s=e.filter===``&&a>0?Math.min(a,o):o,c=e.multiple&&e.cursor>=e.options.length,l=!c&&e.cursor>=e.options.length?0:e.cursor,u=t.inverse(` `);e.filter.length>0?u=e.filter+t.inverse(` `):e.placeholder&&(u=t.dim(e.placeholder));let d=Math.max(0,Math.min(l-Math.floor(s/2),Math.max(0,e.options.length-s))),f=Math.min(d+s,e.options.length),p=e.options.slice(d,f),m=labelColumnWidth(p),h=p.length===0?t.dim(`(no matches)`):p.map((r,a)=>{let o=!c&&a+d===l;return`${optionRow(r,{colors:t,isCursor:o,isChecked:e.multiple&&i.has(r.value),placeholder:!1,hintPadding:m-r.label.length})}${descriptionLine(r,o,n,t)}`}).join(`\n${n} `),g=e.multiple?`\n${n}\n${n} ${renderSubmitRow(c,t,e.submitLabel)}`:``,_=e.options.length>p.length?`\n${n} ${t.dim(`↑↓ ${e.options.length} options, showing ${d+1}–${f}`)}`:``,v=searchableHelpLine(n,t,e.multiple),y=`${n} ${t.dim(` `)} ${u}\n${n} ${h}${g}${_}${v}`;return e.state===`error`?`${r.trim()}\n${y}\n${cornerFor(e.state,t)} ${t.red(e.error??``)}\n`:`${r}${y}\n${cornerWithNote(cornerFor(e.state,t),e.footerNote)}\n`}export{CORNER,RAIL,bulletFor,cornerFor,formatPromptCancellation,formatPromptHeader,formatPromptOpener,formatPromptOutro,formatPromptSubmission,formatRailLine,railFor,renderMultiselectPrompt,renderSearchableSelect,renderSelectPrompt};
|
|
@@ -24,8 +24,6 @@ export interface RailSpinner {
|
|
|
24
24
|
* checked in the colocated test.
|
|
25
25
|
*/
|
|
26
26
|
export declare const SPINNER_FRAMES: readonly ["⠨", "⠸", "⢸", "⢺", "⢾", "⢿", "⢾", "⢼", "⢸", "⠸", "⠨", "⠪", "⠮", "⠯", "⢯", "⢿", "⠿", "⠾", "⠺", "⠪"];
|
|
27
|
-
/** Delay between spinner frames. ~8 fps reads as a calm pulse. */
|
|
28
|
-
export declare const SPINNER_FRAME_MS = 120;
|
|
29
27
|
/** A rail log whose current command detail can be cleared before the next prompt is drawn. */
|
|
30
28
|
export interface RailLog extends ChannelSetupLog {
|
|
31
29
|
section?(title: string, lines: readonly string[]): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{formatPromptHeader,formatRailLine}from"./prompt-ui.js";import{clipVisible,visibleLength}from"#cli/ui/terminal-text.js";import{LiveRegion}from"#cli/ui/live-region.js";const SPINNER_FRAMES=[`⠨`,`⠸`,`⢸`,`⢺`,`⢾`,`⢿`,`⢾`,`⢼`,`⢸`,`⠸`,`⠨`,`⠪`,`⠮`,`⠯`,`⢯`,`⢿`,`⠿`,`⠾`,`⠺`,`⠪`],SPINNER_CELLS=[...SPINNER_FRAMES[0]].length;function dotCount(e){let t=0;for(let n of e){let e=(n.codePointAt(0)??10240)-10240;for(;e>0;)t+=e&1,e>>=1}return t}const SPINNER_STATIC=SPINNER_FRAMES.reduce((e,t)=>dotCount(t)>dotCount(e)?t:e)
|
|
1
|
+
import{formatPromptHeader,formatRailLine}from"./prompt-ui.js";import{clipVisible,visibleLength}from"#cli/ui/terminal-text.js";import{LiveRegion}from"#cli/ui/live-region.js";const SPINNER_FRAMES=[`⠨`,`⠸`,`⢸`,`⢺`,`⢾`,`⢿`,`⢾`,`⢼`,`⢸`,`⠸`,`⠨`,`⠪`,`⠮`,`⠯`,`⢯`,`⢿`,`⠿`,`⠾`,`⠺`,`⠪`],SPINNER_CELLS=[...SPINNER_FRAMES[0]].length;function dotCount(e){let t=0;for(let n of e){let e=(n.codePointAt(0)??10240)-10240;for(;e>0;)t+=e&1,e>>=1}return t}const SPINNER_STATIC=SPINNER_FRAMES.reduce((e,t)=>dotCount(t)>dotCount(e)?t:e);function createRailLog(e){let{colors:t,output:n}=e,r=n.isTTY===!0,i=r&&n.columns?n.columns:80,a=Math.max(4,i-(SPINNER_CELLS+3)),o=r?new LiveRegion({write:e=>(n.write(e),!0)}):void 0,s,clip=e=>visibleLength(e)>a?`${clipVisible(e,a-1)}…`:e,spinnerRow=e=>{let n=SPINNER_FRAMES[e.frame%SPINNER_FRAMES.length]??SPINNER_FRAMES[0];return`${t.green(n)} ${e.label}`},previewRow=e=>`${t.green(`│`)} ${t.dim(clip(e))}`;function liveRows(){let e=s?.view;if(e===void 0)return[];let n=e.kind===`spinner`?[t.green(`│`),spinnerRow(e)]:[];return e.preview!==void 0&&n.push(previewRow(e.preview)),n}function commit(e){if(o===void 0){n.write(e);return}o.flush(e.replace(/\n+$/u,``).split(`
|
|
2
2
|
`),liveRows())}function writeLine(e){commit(formatRailLine(e,t,n))}function settle(e){let r=s;if(r!==void 0&&(r.view?.kind===`spinner`&&r.view.timer!==void 0&&clearInterval(r.view.timer),s=void 0,o!==void 0)){if(e&&r.commandLines.length>0){let e=r.commandLines.flatMap(e=>formatRailLine(t.dim(e),t,n).replace(/\n+$/u,``).split(`
|
|
3
|
-
`));o.flush(e,[])}else o.update([])}}return{message(e){settle(!1),writeLine(e),s={commandLines:[],view:{kind:`status`}}},info(e){settle(!1),writeLine(t.dim(e))},success(e){settle(!1),writeLine(t.dim(e))},warning(e){settle(!0),writeLine(t.yellow(e))},error(e){settle(!0),writeLine(t.red(e))},commandOutput(e){if(o===void 0||s===void 0){n.write(formatRailLine(t.dim(e),t,n));return}s.commandLines.push(e),s.view!==void 0&&(s.view.preview=e,o.update(liveRows()))},section(e,r){settle(!1);let i=r.map(e=>formatRailLine(e,t,n)).join(``);commit(`${formatPromptHeader(`submit`,e,{colors:t,leadingRail:`green`})}${i}`)},spinner(e){if(settle(!1),o===void 0)return n.write(`${t.green(`│`)}\n${t.green(SPINNER_STATIC)} ${e}\n`),{stop(){}};let r={kind:`spinner`,frame:0,label:clip(e)},i={commandLines:[],view:r};s=i,o.update(liveRows());let a=setInterval(()=>{s===i&&i.view===r&&(r.frame+=1,o.update(liveRows()))},120);r.timer=a,a.unref?.();let c=!1;return{stop(){c||(c=!0,clearInterval(a),s===i&&(i.view=void 0,o.update([])))}}},settle(){settle(!1)}}}export{SPINNER_FRAMES,
|
|
3
|
+
`));o.flush(e,[])}else o.update([])}}return{message(e){settle(!1),writeLine(e),s={commandLines:[],view:{kind:`status`}}},info(e){settle(!1),writeLine(t.dim(e))},success(e){settle(!1),writeLine(t.dim(e))},warning(e){settle(!0),writeLine(t.yellow(e))},error(e){settle(!0),writeLine(t.red(e))},commandOutput(e){if(o===void 0||s===void 0){n.write(formatRailLine(t.dim(e),t,n));return}s.commandLines.push(e),s.view!==void 0&&(s.view.preview=e,o.update(liveRows()))},section(e,r){settle(!1);let i=r.map(e=>formatRailLine(e,t,n)).join(``);commit(`${formatPromptHeader(`submit`,e,{colors:t,leadingRail:`green`})}${i}`)},spinner(e){if(settle(!1),o===void 0)return n.write(`${t.green(`│`)}\n${t.green(SPINNER_STATIC)} ${e}\n`),{stop(){}};let r={kind:`spinner`,frame:0,label:clip(e)},i={commandLines:[],view:r};s=i,o.update(liveRows());let a=setInterval(()=>{s===i&&i.view===r&&(r.frame+=1,o.update(liveRows()))},120);r.timer=a,a.unref?.();let c=!1;return{stop(){c||(c=!0,clearInterval(a),s===i&&(i.view=void 0,o.update([])))}}},settle(){settle(!1)}}}export{SPINNER_FRAMES,createRailLog};
|
|
@@ -11,7 +11,7 @@ export type ConnectTriggerAttachmentResult = {
|
|
|
11
11
|
state: "attach-failed";
|
|
12
12
|
};
|
|
13
13
|
/** Inputs required to replace a Vercel Connect connector's trigger destination. */
|
|
14
|
-
|
|
14
|
+
interface ReplaceConnectTriggerOptions {
|
|
15
15
|
connectorUid: string;
|
|
16
16
|
projectRoot: string;
|
|
17
17
|
triggerPath: string;
|
|
@@ -30,3 +30,4 @@ export interface ReplaceConnectTriggerOptions {
|
|
|
30
30
|
* destination created during connector provisioning.
|
|
31
31
|
*/
|
|
32
32
|
export declare function replaceConnectTrigger(options: ReplaceConnectTriggerOptions): Promise<ConnectTriggerAttachmentResult>;
|
|
33
|
+
export {};
|
|
@@ -17,7 +17,7 @@ export interface SetupConnectionConnectorOptions {
|
|
|
17
17
|
signal?: AbortSignal;
|
|
18
18
|
}
|
|
19
19
|
/** Connector identity returned by the Vercel CLI. */
|
|
20
|
-
|
|
20
|
+
interface ConnectConnectorRef {
|
|
21
21
|
uid: string;
|
|
22
22
|
id: string;
|
|
23
23
|
name?: string;
|
|
@@ -42,3 +42,4 @@ export declare function cleanupCreatedConnectionConnector(input: {
|
|
|
42
42
|
}): Promise<void>;
|
|
43
43
|
/** Attaches the canonical connector by name first, then offers explicit Find/Create fallbacks. */
|
|
44
44
|
export declare function setupConnectionConnector(options: SetupConnectionConnectorOptions): Promise<SetupConnectionConnectorResult>;
|
|
45
|
+
export {};
|
|
@@ -15,7 +15,7 @@ export interface LinkFlowDeps {
|
|
|
15
15
|
linkProject?: LinkProjectDeps;
|
|
16
16
|
applyAiGatewayCredential?: ApplyAiGatewayCredentialDeps;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
type LinkFlowResult = {
|
|
19
19
|
kind: "done";
|
|
20
20
|
/**
|
|
21
21
|
* The credential the runtime will actually resolve, from the one
|
|
@@ -60,3 +60,4 @@ export declare function runLinkFlow(input: {
|
|
|
60
60
|
teamSelectMessage?: (currentTeam: string) => string;
|
|
61
61
|
deps?: Partial<LinkFlowDeps>;
|
|
62
62
|
}): Promise<LinkFlowResult>;
|
|
63
|
+
export {};
|
|
@@ -15,7 +15,7 @@ type LoginInput = {
|
|
|
15
15
|
/** Applies writes under one watcher lease and waits for runtime activation. */
|
|
16
16
|
withConnectionUpdate?(task: () => Promise<void>): Promise<void>;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
type ModelLoginResult = {
|
|
19
19
|
kind: "ready";
|
|
20
20
|
reload: boolean;
|
|
21
21
|
model?: ConnectedModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readFile}from"node:fs/promises";import{
|
|
1
|
+
import{readFile}from"node:fs/promises";import{resolveDiscoveryProject}from"#discover/project.js";import pc from"#compiled/picocolors/index.js";import{join}from"node:path";import{parseModelHelper}from"#shared/model-helper.js";import{discoverAgent}from"#discover/discover-agent.js";import{formatLanguageModelGatewayId}from"#internal/runtime-model.js";import{CHATGPT_MODEL_SELECTION_PREFIX}from"#shared/chatgpt-model.js";import{createCompiledRuntimeModelCatalogLoader}from"#compiler/model-catalog.js";import{readModelSelectionFromSource}from"#source-change/apply-model-selection.js";import{createStaticSourceChange}from"#source-change/static-source-change.js";function formatApplyModelSettingsOutcome(e){return e.kind===`rejected`?e.message:e.kind===`unchanged`?`Model settings are already up to date.`:e.changed.length===1&&e.changed[0]===`model`&&e.model!==void 0?`Model changed to ${pc.bold(e.model)}. Live on your next prompt.`:`Model settings updated: ${e.changed.map(t=>t===`model`?`model ${e.model??`updated`}`:t===`reasoning`?`reasoning ${e.reasoning??`provider default`}`:`Fast mode ${e.fastMode?`on`:`off`}`).join(`, `)}. Live on your next prompt.`}async function changeAgentModelSettings(e){let{appRoot:t,patch:n}=e;if(n.model.kind===`set`){let e=await validateModelSlug(t,n.model.value);if(e!==null)return{kind:`rejected`,message:e}}let r=await resolveDiscoveryProject(t),{manifest:i}=await discoverAgent(r),a=await createStaticSourceChange(i).updateModelSettings(n);if(a.kind===`bail`)return{kind:`rejected`,message:`Couldn't edit ${a.at.logicalPath}: ${a.reason}. Change the model settings by hand.`};if(a.changed.length===0)return{kind:`unchanged`};let o={kind:`changed`,changed:a.changed};return n.model.kind===`set`&&(o.model=n.model.value),n.reasoning.kind!==`keep`&&(o.reasoning=n.reasoning.kind===`set`?n.reasoning.value:null),n.gatewayServiceTier.kind!==`keep`&&(o.fastMode=n.gatewayServiceTier.kind===`set`),o}async function changeAgentModel(e){let{appRoot:t,slug:n}=e,r=await validateModelSlug(t,n);return r===null?changeValidatedAgentModel(e):{kind:`rejected`,message:r}}async function changeValidatedAgentModel(e){let{appRoot:t,slug:n}=e,r=await resolveDiscoveryProject(t),{manifest:i}=await discoverAgent(r),a=await createStaticSourceChange(i).updateModelName(n);return a.kind===`bail`?{kind:`rejected`,message:`Couldn't edit ${a.at.logicalPath}: ${a.reason}. Change \`model\` by hand.`}:a.from===a.to?{kind:`unchanged`,model:a.to}:{kind:`changed`,to:a.to}}async function validateModelSlug(e,t){if(parseModelHelper(t)!==void 0)return null;if(t.startsWith(CHATGPT_MODEL_SELECTION_PREFIX))return"Choose a bare OpenAI model id after `chatgpt/`.";if(!t.includes(`/`))return`\`${t}\` isn't a provider/model id (e.g. anthropic/claude-sonnet-5).`;let n=createCompiledRuntimeModelCatalogLoader(e);try{if(await n.getModelLimits(formatLanguageModelGatewayId(t))===null)return`I couldn't confirm \`${t}\` in the AI Gateway model catalog, so I didn't change agent.ts.`}catch{return null}return null}async function readAuthoredModelSelection(e){let t=await resolveDiscoveryProject(e),{manifest:n}=await discoverAgent(t);if(!n.configModule)return;let r=await readFile(join(t.agentRoot,n.configModule.logicalPath),`utf8`);return readModelSelectionFromSource(r)}export{changeAgentModel,changeAgentModelSettings,changeValidatedAgentModel,formatApplyModelSettingsOutcome,readAuthoredModelSelection,validateModelSlug};
|
|
@@ -1,24 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import { validateGatewayApiKey, type GatewayKeyValidation } from "../validate-gateway-key.js";
|
|
4
|
-
import { getVercelAuthStatus } from "../vercel-project.js";
|
|
1
|
+
import type { SelectOption } from "../prompter.js";
|
|
2
|
+
import type { GatewayKeyValidation } from "../validate-gateway-key.js";
|
|
5
3
|
import type { ProviderSelection } from "#setup/provider-settings.js";
|
|
6
|
-
import { HumanActionRequiredError } from "#setup/human-action.js";
|
|
7
|
-
import { runLinkFlow } from "./link.js";
|
|
8
4
|
export type ProviderConnection = ProviderSelection | "external";
|
|
9
|
-
export declare const PROVIDER_QUESTION = "Which model provider do you want to use?";
|
|
10
|
-
export declare const EXTERNAL_PROVIDER_INSTRUCTIONS_TITLE = "Using another model provider";
|
|
11
|
-
export declare const EXTERNAL_PROVIDER_INSTRUCTIONS: readonly string[];
|
|
12
|
-
/** Injected for tests; defaults to the real link flow, env write, and key check. */
|
|
13
|
-
export interface ProviderFlowDeps {
|
|
14
|
-
getVercelAuthStatus: typeof getVercelAuthStatus;
|
|
15
|
-
runLinkFlow: typeof runLinkFlow;
|
|
16
|
-
appendEnv: typeof appendEnv;
|
|
17
|
-
validateGatewayApiKey: typeof validateGatewayApiKey;
|
|
18
|
-
}
|
|
19
|
-
export type ProviderFlowResult = {
|
|
20
|
-
kind: ProviderSelection | "cancelled" | "external-provider";
|
|
21
|
-
};
|
|
22
5
|
type AcceptedGatewayKeyValidation = Exclude<GatewayKeyValidation, {
|
|
23
6
|
kind: "invalid";
|
|
24
7
|
}>;
|
|
@@ -41,30 +24,4 @@ export interface ProviderPickerRequest {
|
|
|
41
24
|
initialValue: ProviderConnection;
|
|
42
25
|
validateInlineKey(key: string, signal: AbortSignal): Promise<GatewayKeyValidation>;
|
|
43
26
|
}
|
|
44
|
-
/** Renderer-owned provider chooser; only the Dev TUI invokes this flow. */
|
|
45
|
-
export type ProviderPicker = (request: ProviderPickerRequest) => Promise<ProviderPickerChoice | undefined>;
|
|
46
|
-
/**
|
|
47
|
-
* THE PROVIDER FLOW behind the dev TUI `/model` menu's provider row
|
|
48
|
-
* (`eve link` keeps {@link runLinkFlow}'s shape). One question chooses a
|
|
49
|
-
* project-backed AI Gateway connection, an `AI_GATEWAY_API_KEY`, ChatGPT, or a
|
|
50
|
-
* direct provider. Selecting an available but inactive project only changes
|
|
51
|
-
* the selection; selecting the active project opens the link flow so it can
|
|
52
|
-
* be replaced. A project-less agent can create its first project there rather
|
|
53
|
-
* than dead-end on an empty list.
|
|
54
|
-
*/
|
|
55
|
-
export declare function runProviderFlow(input: {
|
|
56
|
-
appRoot: string;
|
|
57
|
-
prompter: Prompter;
|
|
58
|
-
signal?: AbortSignal;
|
|
59
|
-
picker?: ProviderPicker;
|
|
60
|
-
/** Provider availability resolved before the picker opened. */
|
|
61
|
-
availableProviders: readonly ProviderSelection[];
|
|
62
|
-
/** The current provider selection. */
|
|
63
|
-
selectedProvider: ProviderSelection;
|
|
64
|
-
/** Whether that selection was explicitly persisted rather than inferred from available access. */
|
|
65
|
-
selectionExplicit?: boolean;
|
|
66
|
-
/** Interactive caller recovery that resumes project linking after Vercel repair. */
|
|
67
|
-
recoverHumanAction?: (error: HumanActionRequiredError) => Promise<"retry" | "cancel">;
|
|
68
|
-
deps?: Partial<ProviderFlowDeps>;
|
|
69
|
-
}): Promise<ProviderFlowResult>;
|
|
70
27
|
export {};
|