eve 0.56.0 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/dist/src/channel/adapter-context.d.ts +1 -1
- package/dist/src/channel/adapter.d.ts +2 -2
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/session.d.ts +4 -3
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +7 -4
- package/dist/src/chunks/{use-eve-agent-RUGSwq8b.js → use-eve-agent-C2APNCdP.js} +45 -12
- package/dist/src/chunks/{use-eve-agent-CMdMlS7Y.js → use-eve-agent-D0YnDLi_.js} +45 -12
- package/dist/src/cli/commands/init.d.ts +2 -6
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/trace-detail.js +1 -1
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/run-interactive-ui.js +1 -1
- package/dist/src/cli/dev/tui/agent-header.js +1 -1
- package/dist/src/cli/dev/tui/blocks.d.ts +1 -6
- package/dist/src/cli/dev/tui/blocks.js +1 -1
- package/dist/src/cli/dev/tui/command-typeahead.js +1 -1
- package/dist/src/cli/dev/tui/message-queue.d.ts +11 -7
- package/dist/src/cli/dev/tui/message-queue.js +1 -1
- package/dist/src/cli/dev/tui/model-editor.d.ts +1 -1
- package/dist/src/cli/dev/tui/model-editor.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +0 -3
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/prompt-commands.d.ts +1 -1
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/question-panel.js +1 -1
- package/dist/src/cli/dev/tui/remote-auth-result.js +1 -1
- package/dist/src/cli/dev/tui/remote-auth.js +1 -1
- package/dist/src/cli/dev/tui/remote-startup.d.ts +10 -0
- package/dist/src/cli/dev/tui/remote-startup.js +1 -0
- package/dist/src/cli/dev/tui/runner.d.ts +12 -18
- package/dist/src/cli/dev/tui/runner.js +3 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +7 -13
- package/dist/src/cli/dev/tui/setup-commands.js +2 -2
- package/dist/src/cli/dev/tui/setup-issues.d.ts +1 -1
- package/dist/src/cli/dev/tui/setup-issues.js +1 -1
- package/dist/src/cli/dev/tui/setup-panel.d.ts +5 -17
- package/dist/src/cli/dev/tui/setup-panel.js +5 -6
- package/dist/src/cli/dev/tui/status-line.d.ts +1 -8
- package/dist/src/cli/dev/tui/status-line.js +1 -1
- package/dist/src/cli/dev/tui/steering-stream.d.ts +15 -0
- package/dist/src/cli/dev/tui/steering-stream.js +1 -0
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +3 -2
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
- package/dist/src/cli/dev/tui/test/mock-terminal.d.ts +2 -2
- package/dist/src/cli/dev/tui/test/mock-terminal.js +1 -1
- package/dist/src/cli/dev/tui/theme.d.ts +0 -2
- package/dist/src/cli/dev/tui/theme.js +1 -1
- package/dist/src/cli/dev/tui/vercel-status.d.ts +4 -2
- package/dist/src/cli/dev/tui/vercel-status.js +1 -1
- package/dist/src/cli/run.js +1 -1
- package/dist/src/cli/telemetry/index.d.ts +1 -1
- package/dist/src/cli/telemetry/index.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +2 -0
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/eve-agent-store-state.d.ts +19 -0
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/ndjson.d.ts +2 -0
- package/dist/src/client/ndjson.js +3 -3
- package/dist/src/client/open-stream.d.ts +1 -0
- package/dist/src/client/open-stream.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- 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/helpers.js +1 -0
- package/dist/src/compiled/@workflow/core/runtime.js +2 -2
- package/dist/src/compiled/@workflow/core/serialization.js +1 -0
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +2 -2
- package/dist/src/compiled/_chunks/workflow/attribute-changes-DTFAjP0J.js +6 -0
- package/dist/src/compiled/_chunks/workflow/{dist-PLkAQ-U7.js → dist-C5KCXSdI.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{frames-BvATzM2t.js → frames-DJw9L4rO.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/global-DFW-hO6M.js +1 -0
- package/dist/src/compiled/_chunks/workflow/helpers-ClCA9Lmc.js +1 -0
- package/dist/src/compiled/_chunks/workflow/logger-D6vwIEf9.js +13 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-_baK8jaT.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-CRdL17z4.js +1 -0
- package/dist/src/compiled/_chunks/workflow/serialization-CWYPL4Eq.js +3 -0
- package/dist/src/compiled/_chunks/workflow/sleep-BL0kgJnT.js +1 -0
- package/dist/src/compiled/_chunks/workflow/wait-until-DyIt9lEx.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{ws-transport-CVezyWwZ.js → ws-transport-Dl5FG4Sw.js} +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +15 -6
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +3 -1
- package/dist/src/context/keys.js +1 -1
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.js +4 -3
- package/dist/src/execution/activity-cohort.js +1 -1
- package/dist/src/execution/activity-collector.js +1 -1
- package/dist/src/execution/authorization-callback-match.d.ts +2 -1
- package/dist/src/execution/authorization-callback-match.js +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/cancel-indexed-session-tasks-step.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.d.ts +1 -1
- package/dist/src/execution/connections/callback-route.d.ts +1 -11
- package/dist/src/execution/connections/callback-route.js +1 -1
- package/dist/src/execution/continuation-conflict-step.d.ts +0 -1
- package/dist/src/execution/continuation-conflict-step.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +1 -1
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/create-session-step.d.ts +1 -1
- package/dist/src/execution/durable-session-store.d.ts +10 -48
- package/dist/src/execution/durable-session-store.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +0 -16
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/hook-ownership.d.ts +2 -4
- package/dist/src/execution/hook-ownership.js +1 -1
- package/dist/src/execution/legacy-session/authorization.d.ts +9 -0
- package/dist/src/execution/legacy-session/authorization.js +1 -0
- package/dist/src/execution/legacy-session/completion-step.d.ts +10 -0
- package/dist/src/execution/legacy-session/completion-step.js +1 -0
- package/dist/src/execution/legacy-session/inbox.d.ts +24 -0
- package/dist/src/execution/legacy-session/inbox.js +1 -0
- package/dist/src/execution/legacy-session/input.d.ts +19 -0
- package/dist/src/execution/legacy-session/input.js +1 -0
- package/dist/src/execution/legacy-session/interrupt-step.d.ts +3 -0
- package/dist/src/execution/legacy-session/interrupt-step.js +1 -0
- package/dist/src/execution/legacy-session/prepare-step.d.ts +24 -0
- package/dist/src/execution/legacy-session/prepare-step.js +1 -0
- package/dist/src/execution/legacy-session/snapshot.d.ts +12 -0
- package/dist/src/execution/legacy-session/snapshot.js +1 -0
- package/dist/src/execution/legacy-session/turn-workflow.d.ts +8 -0
- package/dist/src/execution/legacy-session/turn-workflow.js +1 -0
- package/dist/src/execution/model-call-batching.d.ts +1 -0
- package/dist/src/execution/model-call-batching.js +1 -1
- package/dist/src/execution/node-step.d.ts +1 -0
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.d.ts +2 -20
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/reconcile-session-continuation-token.d.ts +1 -1
- package/dist/src/execution/report-dropped-wire-payload-step.d.ts +1 -1
- package/dist/src/execution/route-child-delivery.d.ts +2 -2
- package/dist/src/execution/route-child-delivery.js +1 -1
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/bindings/eve-image.js +1 -1
- package/dist/src/execution/session/accepted-deployment.d.ts +3 -0
- package/dist/src/execution/session/accepted-deployment.js +1 -0
- package/dist/src/execution/session/admission.d.ts +38 -0
- package/dist/src/execution/session/admission.js +1 -0
- package/dist/src/execution/session/entry-input.d.ts +42 -0
- package/dist/src/execution/session/entry-input.js +1 -0
- package/dist/src/execution/session/entry.d.ts +13 -0
- package/dist/src/execution/session/entry.js +1 -0
- package/dist/src/execution/session/event-sink.d.ts +31 -0
- package/dist/src/execution/session/event-sink.js +1 -0
- package/dist/src/execution/session/finalization.d.ts +33 -0
- package/dist/src/execution/session/finalization.js +1 -0
- package/dist/src/execution/session/handoff-steps.d.ts +22 -0
- package/dist/src/execution/session/handoff-steps.js +1 -0
- package/dist/src/execution/session/handoff.d.ts +69 -0
- package/dist/src/execution/session/handoff.js +1 -0
- package/dist/src/execution/session/hook-tokens.d.ts +11 -0
- package/dist/src/execution/session/hook-tokens.js +1 -0
- package/dist/src/execution/session/input-queue.d.ts +72 -0
- package/dist/src/execution/session/input-queue.js +1 -0
- package/dist/src/execution/session/next-input.d.ts +32 -0
- package/dist/src/execution/session/next-input.js +1 -0
- package/dist/src/execution/{pending-turn-state.d.ts → session/pending-turn-state.d.ts} +0 -1
- package/dist/src/execution/{pending-turn-state.js → session/pending-turn-state.js} +1 -1
- package/dist/src/execution/session/program.d.ts +47 -0
- package/dist/src/execution/session/program.js +1 -0
- package/dist/src/execution/session/route-selected-delivery.d.ts +9 -0
- package/dist/src/execution/session/route-selected-delivery.js +1 -0
- package/dist/src/execution/session/state-cursor.d.ts +31 -0
- package/dist/src/execution/session/state-cursor.js +1 -0
- package/dist/src/execution/{session-timeout-control.d.ts → session/timeout-control.d.ts} +1 -1
- package/dist/src/execution/session/timeout-control.js +1 -0
- package/dist/src/execution/{session-timeout-steps.d.ts → session/timeout-steps.d.ts} +3 -2
- package/dist/src/execution/session/timeout-steps.js +1 -0
- package/dist/src/execution/{session-timeout-workflow.d.ts → session/timeout-workflow.d.ts} +3 -1
- package/dist/src/execution/session/timeout-workflow.js +1 -0
- package/dist/src/execution/session/timeout.d.ts +3 -0
- package/dist/src/execution/session/timeout.js +1 -0
- package/dist/src/execution/session/turn-step-result.d.ts +4 -0
- package/dist/src/execution/session/turn-step-result.js +1 -0
- package/dist/src/execution/session/turn-step-types.d.ts +68 -0
- package/dist/src/execution/session/turn-step-types.js +1 -0
- package/dist/src/execution/{workflow-steps.d.ts → session/turn-step.d.ts} +1 -2
- package/dist/src/execution/session/turn-step.js +1 -0
- package/dist/src/execution/session/turn.d.ts +31 -0
- package/dist/src/execution/session/turn.js +1 -0
- package/dist/src/execution/session-inbox/address.d.ts +21 -0
- package/dist/src/execution/session-inbox/address.js +1 -0
- package/dist/src/execution/session-inbox/inbox.d.ts +54 -0
- package/dist/src/execution/session-inbox/inbox.js +1 -0
- package/dist/src/execution/session-inbox/protocol.d.ts +10 -0
- package/dist/src/execution/session-inbox/protocol.js +1 -0
- package/dist/src/execution/session-inbox/release-step.d.ts +5 -0
- package/dist/src/execution/session-inbox/release-step.js +1 -0
- package/dist/src/execution/session-inbox/resume.d.ts +21 -0
- package/dist/src/execution/session-inbox/resume.js +1 -0
- package/dist/src/execution/{turn-workflow-tool-run.d.ts → session-workflow-tool-run.d.ts} +2 -2
- package/dist/src/execution/session-workflow-tool-run.js +1 -0
- package/dist/src/execution/settle-cancelled-turn-step.d.ts +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/skills/instructions.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +1 -1
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/task-input-response-route.js +1 -1
- package/dist/src/execution/tasks/child/steps.d.ts +1 -1
- package/dist/src/execution/tasks/child/steps.js +1 -1
- package/dist/src/execution/tasks/child/workflow.js +1 -1
- package/dist/src/execution/tasks/parent/delegate.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.d.ts +1 -1
- package/dist/src/execution/terminal-session-event.d.ts +1 -1
- package/dist/src/execution/terminal-session-event.js +1 -1
- package/dist/src/execution/terminal-session-failure-step.d.ts +1 -1
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/terminate-child-sessions-step.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/subagent/accept-event-step.js +1 -1
- package/dist/src/execution/tools/subagent/emit-called-step.d.ts +1 -1
- package/dist/src/execution/tools/subagent/emit-called-step.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +1 -1
- package/dist/src/execution/tools/subagent/invoke-agent.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +6 -0
- package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-step.js +1 -1
- package/dist/src/execution/tools/subagent/steer.d.ts +13 -0
- package/dist/src/execution/tools/subagent/steer.js +1 -0
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +1 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.js +1 -1
- package/dist/src/execution/tools/subagent/task-cancel.js +1 -1
- package/dist/src/execution/tools/workflow/ask.d.ts +0 -9
- package/dist/src/execution/tools/workflow/ask.js +1 -1
- package/dist/src/execution/tools/workflow/body.d.ts +0 -2
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +1 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +1 -1
- package/dist/src/execution/tools/workflow/messages.d.ts +0 -1
- package/dist/src/execution/tools/workflow/messages.js +1 -1
- package/dist/src/execution/tools/workflow/owner.d.ts +3 -1
- package/dist/src/execution/tools/workflow/owner.js +1 -1
- package/dist/src/execution/tools/workflow/resume-hook-step.d.ts +1 -1
- package/dist/src/execution/tools/workflow/step-context.d.ts +0 -1
- package/dist/src/execution/tools/workflow/step-execution.js +1 -1
- package/dist/src/execution/tools/workflow/step.js +1 -1
- package/dist/src/execution/tools/workflow/workflow.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +15 -18
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/harness/authorization.d.ts +5 -37
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/emission-state.d.ts +1 -0
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/generation-steering.d.ts +22 -0
- package/dist/src/harness/generation-steering.js +1 -0
- package/dist/src/harness/messages.d.ts +1 -1
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/prompt-cache.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +1 -1
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/semantic-errors/rules/gateway.js +1 -1
- package/dist/src/harness/semantic-errors/signals.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/types.d.ts +2 -0
- package/dist/src/instrumentation/ai-sdk-hook-bridge.js +1 -1
- package/dist/src/instrumentation/channel-delivery.js +1 -1
- package/dist/src/instrumentation/lifecycle.d.ts +1 -0
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.js +3 -2
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/gateway.d.ts +1 -0
- package/dist/src/internal/gateway.js +1 -1
- package/dist/src/internal/model-auth/api-key.d.ts +7 -0
- package/dist/src/internal/model-auth/api-key.js +1 -0
- package/dist/src/internal/model-auth/available-models.d.ts +2 -0
- package/dist/src/internal/model-auth/available-models.js +1 -0
- package/dist/src/internal/model-auth/development-broker-client.d.ts +3 -0
- package/dist/src/internal/model-auth/development-broker-client.js +1 -0
- package/dist/src/internal/model-auth/development-broker-protocol.d.ts +12 -0
- package/dist/src/internal/model-auth/development-broker-protocol.js +1 -0
- package/dist/src/internal/model-auth/development-broker-server.d.ts +4 -0
- package/dist/src/internal/model-auth/development-broker-server.js +1 -0
- package/dist/src/internal/model-auth/gateway-credential.d.ts +2 -0
- package/dist/src/internal/model-auth/gateway-credential.js +1 -0
- package/dist/src/internal/model-auth/store.d.ts +16 -0
- package/dist/src/internal/model-auth/store.js +1 -0
- package/dist/src/internal/model-auth/transport.d.ts +6 -0
- package/dist/src/internal/model-auth/transport.js +1 -0
- package/dist/src/internal/model-auth/vercel-cli.d.ts +7 -0
- package/dist/src/internal/model-auth/vercel-cli.js +1 -0
- package/dist/src/internal/model-auth/vercel-team.d.ts +3 -0
- package/dist/src/internal/model-auth/vercel-team.js +1 -0
- package/dist/src/internal/model-auth/vercel.d.ts +13 -0
- package/dist/src/internal/model-auth/vercel.js +1 -0
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/internal/nitro/routes/info.js +1 -1
- package/dist/src/internal/resolve-model-endpoint-status.d.ts +2 -0
- package/dist/src/internal/resolve-model-endpoint-status.js +1 -1
- package/dist/src/internal/vercel/api-resource.d.ts +4 -0
- package/dist/src/internal/vercel/api-resource.js +1 -0
- package/dist/src/internal/vercel/eve-service-contribution.js +1 -1
- package/dist/src/internal/vercel/vercel-services-config.d.ts +2 -0
- package/dist/src/internal/vercel/vercel-services-config.js +1 -1
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow/development-world-server.js +1 -1
- package/dist/src/internal/workflow/local-world-delivery-timeouts.d.ts +1 -1
- package/dist/src/internal/workflow/runtime.d.ts +1 -6
- package/dist/src/internal/workflow/runtime.js +1 -1
- package/dist/src/internal/workflow/vercel-world-defaults.d.ts +4 -0
- package/dist/src/internal/workflow/vercel-world-defaults.js +1 -0
- package/dist/src/protocol/activity.js +1 -1
- package/dist/src/protocol/message.d.ts +8 -0
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/protocol/routes.d.ts +0 -2
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +1 -1
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/models/anthropic/index.d.ts +3 -0
- package/dist/src/public/models/anthropic/index.js +1 -0
- package/dist/src/public/models/openai/chatgpt/codex-app-server.js +1 -1
- package/dist/src/public/models/openai/chatgpt/credential-store.js +1 -1
- package/dist/src/public/models/openai/chatgpt/oauth.js +1 -1
- package/dist/src/public/models/openai/chatgpt/transport.js +1 -1
- package/dist/src/public/models/openai/index.d.ts +4 -2
- package/dist/src/public/models/openai/index.js +1 -1
- package/dist/src/public/sandbox/docker-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +1 -1
- package/dist/src/public/vercel/index.d.ts +2 -1
- package/dist/src/public/vercel/index.js +1 -1
- package/dist/src/runtime/agent/resolve-model.js +1 -1
- package/dist/src/runtime/prompt/compose.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/self-modification/agent.js +1 -1
- package/dist/src/self-modification/setup.d.ts +9 -3
- package/dist/src/self-modification/setup.js +2 -2
- package/dist/src/setup/cli/option-row.d.ts +2 -1
- package/dist/src/setup/cli/option-row.js +1 -1
- package/dist/src/setup/cli/prompt-ui.d.ts +2 -0
- package/dist/src/setup/cli/prompt-ui.js +1 -1
- package/dist/src/setup/cli/select-state.d.ts +1 -1
- package/dist/src/setup/cli/select-state.js +1 -1
- package/dist/src/setup/flows/chatgpt-auth.js +1 -1
- package/dist/src/setup/flows/deploy.d.ts +4 -9
- package/dist/src/setup/flows/deploy.js +1 -1
- package/dist/src/setup/flows/ensure-vercel-project.js +1 -1
- package/dist/src/setup/flows/install-vercel-cli.d.ts +2 -3
- package/dist/src/setup/flows/login.d.ts +3 -1
- package/dist/src/setup/flows/login.js +1 -1
- package/dist/src/setup/flows/model-login-connection.d.ts +36 -0
- package/dist/src/setup/flows/model-login-connection.js +1 -0
- package/dist/src/setup/flows/model-login-progress.d.ts +7 -0
- package/dist/src/setup/flows/model-login-progress.js +1 -0
- package/dist/src/setup/flows/model-login.d.ts +22 -0
- package/dist/src/setup/flows/model-login.js +1 -0
- package/dist/src/setup/flows/model-source-change.d.ts +7 -0
- package/dist/src/setup/flows/model-source-change.js +1 -1
- package/dist/src/setup/flows/model.d.ts +6 -24
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/flows/registry.d.ts +3 -19
- package/dist/src/setup/flows/registry.js +1 -1
- package/dist/src/setup/flows/vercel-model-login.d.ts +5 -0
- package/dist/src/setup/flows/vercel-model-login.js +1 -0
- package/dist/src/setup/integrations/self-modification/setup.d.ts +2 -0
- package/dist/src/setup/integrations/self-modification/setup.js +1 -1
- package/dist/src/setup/project-resolution.js +1 -1
- package/dist/src/setup/prompter.d.ts +3 -1
- package/dist/src/setup/provider-settings.d.ts +19 -6
- package/dist/src/setup/provider-settings.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/setup/with-spinner.d.ts +1 -1
- package/dist/src/setup/with-spinner.js +1 -1
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +6 -4
- package/dist/src/shared/chatgpt-model.d.ts +2 -2
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/model-connection.d.ts +17 -0
- package/dist/src/shared/model-connection.js +1 -0
- package/dist/src/shared/model-endpoint-status.d.ts +2 -1
- package/dist/src/shared/model-helper.d.ts +26 -0
- package/dist/src/shared/model-helper.js +1 -0
- package/dist/src/shared/package-version.d.ts +2 -0
- package/dist/src/shared/package-version.js +1 -0
- package/dist/src/shared/vercel-services.d.ts +1 -0
- package/dist/src/shared/vercel-services.js +1 -1
- package/dist/src/source-change/agent-config-ast.d.ts +6 -0
- package/dist/src/source-change/agent-config-ast.js +1 -1
- package/dist/src/source-change/apply-model-selection.d.ts +3 -1
- package/dist/src/source-change/apply-model-selection.js +1 -2
- package/dist/src/source-change/static-source-change.js +1 -1
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/event-proxy-step.d.ts +3 -3
- package/dist/src/subagents/event-proxy-step.js +1 -1
- package/dist/src/subagents/handle-dispatch.d.ts +12 -2
- package/dist/src/subagents/handle-dispatch.js +1 -1
- package/dist/src/subagents/handles/operation-id.d.ts +1 -1
- package/dist/src/subagents/handles/query.d.ts +0 -6
- package/dist/src/subagents/handles/query.js +1 -1
- package/dist/src/subagents/handles/state-key.d.ts +1 -1
- package/dist/src/subagents/handles/store.d.ts +1 -1
- package/dist/src/subagents/handles/store.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +1 -1
- package/dist/src/subagents/parent-notification.d.ts +2 -2
- package/dist/src/subagents/parent-result.d.ts +1 -1
- package/dist/src/subagents/remote-dispatch.d.ts +1 -1
- package/dist/src/subagents/remote-dispatch.js +1 -1
- package/dist/src/subagents/start-local.js +1 -1
- package/dist/src/subagents/tool.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tasks/session-index.js +1 -1
- package/dist/src/tasks/types.d.ts +1 -1
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-usage.js +1 -1
- package/dist/src/tracing/agent-span-contract.d.ts +1 -0
- package/dist/src/tracing/agent-span-contract.js +1 -1
- package/dist/src/tracing/agent-tool-instrumentation.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 +22 -22
- package/docs/channels/chat-sdk.mdx +4 -2
- package/docs/channels/custom.mdx +16 -10
- package/docs/channels/eve.mdx +3 -1
- package/docs/channels/linq.mdx +1 -1
- package/docs/channels/overview.mdx +4 -2
- package/docs/channels/photon.mdx +4 -1
- package/docs/channels/slack.mdx +3 -1
- package/docs/concepts/execution-model-and-durability.mdx +62 -13
- package/docs/concepts/sessions-runs-and-streaming.md +14 -5
- package/docs/getting-started.mdx +7 -3
- package/docs/guides/deployment/vercel.mdx +1 -1
- package/docs/guides/dev-tui.md +54 -27
- package/docs/guides/frontend/overview.mdx +3 -1
- package/docs/guides/instrumentation/meta.json +1 -0
- package/docs/memory/custom-provider.md +1 -1
- package/docs/protocols/acp.md +1 -1
- package/docs/reference/cli.md +2 -2
- package/docs/reference/telemetry.md +1 -1
- package/docs/reference/typescript-api.md +12 -5
- package/docs/sandbox.mdx +3 -3
- package/docs/subagents/index.mdx +2 -2
- package/docs/tools/workflows.mdx +1 -1
- package/docs/tutorial/how-it-runs.mdx +1 -1
- package/package.json +6 -1
- package/dist/src/cli/commands/init-repl.d.ts +0 -80
- package/dist/src/cli/commands/init-repl.js +0 -1
- package/dist/src/cli/commands/init-self-modification.d.ts +0 -7
- package/dist/src/cli/commands/init-self-modification.js +0 -1
- package/dist/src/cli/dev/tui/prompt-placeholder.d.ts +0 -12
- package/dist/src/cli/dev/tui/prompt-placeholder.js +0 -1
- package/dist/src/cli/dev/tui/remote-auth-command.d.ts +0 -11
- package/dist/src/cli/dev/tui/remote-auth-command.js +0 -3
- package/dist/src/compiled/_chunks/workflow/attribute-changes-BAcgmlXp.js +0 -20
- package/dist/src/compiled/_chunks/workflow/private-CFJkQA7R.js +0 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-BEHe0Uut.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-ChHLjaCt.js +0 -1
- package/dist/src/compiled/_chunks/workflow/sleep-BB2HuVie.js +0 -1
- package/dist/src/execution/accepted-delivery-deployment.d.ts +0 -7
- package/dist/src/execution/accepted-delivery-deployment.js +0 -1
- package/dist/src/execution/dispatch-turn-step.d.ts +0 -5
- package/dist/src/execution/dispatch-turn-step.js +0 -1
- package/dist/src/execution/durable-session-migrations/chain.d.ts +0 -38
- package/dist/src/execution/durable-session-migrations/chain.js +0 -1
- package/dist/src/execution/durable-session-migrations/snapshot.d.ts +0 -6
- package/dist/src/execution/durable-session-migrations/snapshot.js +0 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow-v0-to-v1.d.ts +0 -12
- package/dist/src/execution/durable-session-migrations/turn-workflow-v0-to-v1.js +0 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.d.ts +0 -2
- package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.js +0 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +0 -88
- package/dist/src/execution/durable-session-migrations/turn-workflow.js +0 -1
- package/dist/src/execution/forward-turn-cancellation-step.d.ts +0 -6
- package/dist/src/execution/forward-turn-cancellation-step.js +0 -1
- package/dist/src/execution/forward-turn-delivery-step.d.ts +0 -6
- package/dist/src/execution/forward-turn-delivery-step.js +0 -1
- package/dist/src/execution/inline-turn.d.ts +0 -31
- package/dist/src/execution/inline-turn.js +0 -1
- package/dist/src/execution/next-driver-action.d.ts +0 -85
- package/dist/src/execution/parked-delivery-wait.d.ts +0 -54
- package/dist/src/execution/parked-delivery-wait.js +0 -1
- package/dist/src/execution/session-command-inbox.d.ts +0 -52
- package/dist/src/execution/session-command-inbox.js +0 -1
- package/dist/src/execution/session-command-token.d.ts +0 -6
- package/dist/src/execution/session-command-token.js +0 -1
- package/dist/src/execution/session-state-cursor.d.ts +0 -25
- package/dist/src/execution/session-state-cursor.js +0 -1
- package/dist/src/execution/session-timeout-control.js +0 -1
- package/dist/src/execution/session-timeout-steps.js +0 -1
- package/dist/src/execution/session-timeout-workflow.js +0 -1
- package/dist/src/execution/session-timeout.d.ts +0 -2
- package/dist/src/execution/session-timeout.js +0 -1
- package/dist/src/execution/turn-cancellation-control.d.ts +0 -30
- package/dist/src/execution/turn-cancellation-control.js +0 -1
- package/dist/src/execution/turn-cancellation-token.d.ts +0 -10
- package/dist/src/execution/turn-cancellation-token.js +0 -1
- package/dist/src/execution/turn-control-protocol.d.ts +0 -36
- package/dist/src/execution/turn-control-protocol.js +0 -1
- package/dist/src/execution/turn-control-receiver.d.ts +0 -54
- package/dist/src/execution/turn-control-receiver.js +0 -1
- package/dist/src/execution/turn-dispatch.d.ts +0 -39
- package/dist/src/execution/turn-dispatch.js +0 -1
- package/dist/src/execution/turn-execution-cursor.d.ts +0 -49
- package/dist/src/execution/turn-execution-cursor.js +0 -1
- package/dist/src/execution/turn-workflow-tool-run.js +0 -1
- package/dist/src/execution/turn-workflow.d.ts +0 -13
- package/dist/src/execution/turn-workflow.js +0 -1
- package/dist/src/execution/wire/session-inbox-contract.d.ts +0 -38
- package/dist/src/execution/wire/session-inbox-contract.js +0 -1
- package/dist/src/execution/wire/session-inbox-encoder.d.ts +0 -47
- package/dist/src/execution/wire/session-inbox-encoder.js +0 -1
- package/dist/src/execution/wire/session-inbox-resume.d.ts +0 -12
- package/dist/src/execution/wire/session-inbox-resume.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.d.ts +0 -29
- package/dist/src/execution/wire/session-inbox-wire.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v0.d.ts +0 -5
- package/dist/src/execution/wire/session-inbox-wire.v0.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v1.d.ts +0 -237
- package/dist/src/execution/wire/session-inbox-wire.v1.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v2-migration.d.ts +0 -2
- package/dist/src/execution/wire/session-inbox-wire.v2-migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v2.d.ts +0 -478
- package/dist/src/execution/wire/session-inbox-wire.v2.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v2.migration.d.ts +0 -3
- package/dist/src/execution/wire/session-inbox-wire.v2.migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v3.d.ts +0 -480
- package/dist/src/execution/wire/session-inbox-wire.v3.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v3.migration.d.ts +0 -3
- package/dist/src/execution/wire/session-inbox-wire.v3.migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v4.d.ts +0 -267
- package/dist/src/execution/wire/session-inbox-wire.v4.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v4.migration.d.ts +0 -3
- package/dist/src/execution/wire/session-inbox-wire.v4.migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v5.d.ts +0 -341
- package/dist/src/execution/wire/session-inbox-wire.v5.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v5.migration.d.ts +0 -3
- package/dist/src/execution/wire/session-inbox-wire.v5.migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v6.d.ts +0 -341
- package/dist/src/execution/wire/session-inbox-wire.v6.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v7.d.ts +0 -342
- package/dist/src/execution/wire/session-inbox-wire.v7.js +0 -1
- package/dist/src/execution/workflow-entry-crash.d.ts +0 -39
- package/dist/src/execution/workflow-entry-crash.js +0 -1
- package/dist/src/execution/workflow-entry-finalization.d.ts +0 -28
- package/dist/src/execution/workflow-entry-finalization.js +0 -1
- package/dist/src/execution/workflow-entry.d.ts +0 -37
- package/dist/src/execution/workflow-entry.js +0 -1
- package/dist/src/execution/workflow-steps.js +0 -1
- package/dist/src/subagents/handles/rebase.d.ts +0 -4
- package/dist/src/subagents/handles/rebase.js +0 -1
- /package/dist/src/{execution/next-driver-action.js → client/eve-agent-store-state.js} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { ModelAccessChange } from "#shared/model-connection.js";
|
|
2
|
+
import { runModelLogin } from "#setup/flows/model-login.js";
|
|
1
3
|
import { runDeployFlow } from "#setup/flows/deploy.js";
|
|
2
4
|
import { runInstallVercelCliFlow } from "#setup/flows/install-vercel-cli.js";
|
|
3
|
-
import { runLoginFlow } from "#setup/flows/login.js";
|
|
4
5
|
import { runModelFlow } from "#setup/flows/model.js";
|
|
5
|
-
import { runRegistryFlow
|
|
6
|
+
import { runRegistryFlow } from "#setup/flows/registry.js";
|
|
6
7
|
import type { Prompter } from "#setup/prompter.js";
|
|
7
8
|
import { type TuiPrompterRenderer } from "./tui-prompter.js";
|
|
8
9
|
import type { PromptCommandExtensionName } from "./prompt-commands.js";
|
|
@@ -15,11 +16,7 @@ export type TuiSetupCommand = PromptCommandExtensionName;
|
|
|
15
16
|
* move past their opening question.
|
|
16
17
|
*/
|
|
17
18
|
export declare const SETUP_FLOW_CONFIG: {
|
|
18
|
-
|
|
19
|
-
title: string;
|
|
20
|
-
indicator: "pulse";
|
|
21
|
-
};
|
|
22
|
-
"vc:login": {
|
|
19
|
+
login: {
|
|
23
20
|
title: string;
|
|
24
21
|
indicator: "pulse";
|
|
25
22
|
};
|
|
@@ -54,19 +51,18 @@ export interface TuiSetupCommandInput {
|
|
|
54
51
|
/** Registry address supplied by `/add <item>`, confirmed and installed directly. */
|
|
55
52
|
initialRegistryAddress?: string;
|
|
56
53
|
/** Presentation and navigation supplied by an enclosing setup journey. */
|
|
57
|
-
registryPlannerContext?: RegistryPlannerContext;
|
|
58
54
|
onOnboardingScreen?: (input: OnboardingScreenEvent) => void;
|
|
59
55
|
/** Live ChatGPT identity shown only inside model configuration UI. */
|
|
60
56
|
chatGptAccountLabel?: string;
|
|
61
|
-
/**
|
|
57
|
+
/** Groups setup writes under one runtime update. */
|
|
62
58
|
withExclusiveTerminal?<T>(task: () => Promise<T>): Promise<T>;
|
|
63
59
|
createPrompter?: (renderer: TuiPrompterRenderer) => Prompter;
|
|
64
60
|
/** Test seam; defaults to the real setup flows. */
|
|
65
61
|
flows?: Partial<TuiSetupFlows>;
|
|
66
62
|
}
|
|
67
63
|
export interface TuiSetupFlows {
|
|
64
|
+
runModelLogin?: typeof runModelLogin;
|
|
68
65
|
runInstallVercelCliFlow: typeof runInstallVercelCliFlow;
|
|
69
|
-
runLoginFlow: typeof runLoginFlow;
|
|
70
66
|
runModelFlow: typeof runModelFlow;
|
|
71
67
|
runRegistryFlow: typeof runRegistryFlow;
|
|
72
68
|
runDeployFlow: typeof runDeployFlow;
|
|
@@ -82,9 +78,7 @@ export interface TuiSetupCommandResult {
|
|
|
82
78
|
/** Keep warning/error lines after the bordered panel closes. */
|
|
83
79
|
preserveFlowDiagnostics: boolean;
|
|
84
80
|
/** Status refresh required after the command settles. */
|
|
85
|
-
effect?: VercelStatusEffect |
|
|
86
|
-
kind: "model-access-changed";
|
|
87
|
-
};
|
|
81
|
+
effect?: VercelStatusEffect | ModelAccessChange;
|
|
88
82
|
}
|
|
89
83
|
/**
|
|
90
84
|
* Runs one TUI setup command (/model, /add, /deploy) over the
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{formatRegistrySessionResult,registryItemProgress,registryResultTone}from"./registry-result-message.js";import{createTuiPrompter}from"./tui-prompter.js";import{runDeployFlow}from"#setup/flows/deploy.js";import{WizardCancelledError}from"#setup/step.js";import{
|
|
2
|
-
`),preserveFlowDiagnostics:!1};return a.accessChanged&&(l.effect={kind:`model-access-changed
|
|
1
|
+
import{formatRegistrySessionResult,registryItemProgress,registryResultTone}from"./registry-result-message.js";import{createTuiPrompter}from"./tui-prompter.js";import{runDeployFlow}from"#setup/flows/deploy.js";import{WizardCancelledError}from"#setup/step.js";import{runModelLogin}from"#setup/flows/model-login.js";import{HumanActionRequiredError}from"#setup/human-action.js";import{runInstallVercelCliFlow}from"#setup/flows/install-vercel-cli.js";import{runModelFlow}from"#setup/flows/model.js";import{RegistryFlowFailedError,runRegistryFlow}from"#setup/flows/registry.js";const SETUP_FLOW_CONFIG={login:{title:`Connecting your model`,indicator:`pulse`},model:{title:`Configure the agent model`,indicator:`pulse`},add:{title:`Add to your agent`,indicator:`pulse`},deploy:{title:`Deploy to Vercel`,indicator:`spinner`}};function muteableRenderer(e,t,n){return{readSelect:n=>t()?Promise.resolve(void 0):e.readSelect(n),readEditableSelect:n=>t()?Promise.resolve(void 0):e.readEditableSelect(n),readProviderPicker:n=>t()?Promise.resolve(void 0):e.readProviderPicker(n),readModelEditor:n=>t()?Promise.resolve(void 0):e.readModelEditor(n),readText:n=>t()?Promise.resolve(void 0):e.readText(n),readAcknowledge:n=>t()?Promise.resolve():e.readAcknowledge(n),readChoice:n=>t()?{choice:Promise.resolve(void 0),close:()=>{}}:e.readChoice(n),setNavigation:n=>{t()||e.setNavigation?.(n)},setStatus:n=>{t()||e.setStatus(n)},renderLine:(n,r)=>{(!t()||r===`warning`||r===`error`)&&e.renderLine(n,r)},replaceContent:n=>{t()||e.replaceContent?.(n)},renderOutput:n=>{t()||e.renderOutput(n)},withInheritedStdio:t=>e.withInheritedStdio(t),withExclusiveTerminal:e=>n?.(e)??e()}}function cancelledSetupResult(){return{message:``,cancelled:!0,preserveFlowDiagnostics:!1}}async function runTuiSetupCommand(e){let{command:t}=e,n=!1,r=new AbortController,i=muteableRenderer(e.renderer,()=>n,e.withExclusiveTerminal),a=(e.createPrompter??createTuiPrompter)(i),cancelActiveRegistryItem,runRegistryItem=async e=>{let t=new AbortController;cancelActiveRegistryItem=()=>t.abort(new WizardCancelledError);try{return await e(AbortSignal.any([r.signal,t.signal]))}finally{cancelActiveRegistryItem=void 0}},o=e.renderer.waitForInterrupt(),s=executeSetupCommand(e,a,i,r.signal,runRegistryItem),c=s.then(e=>({kind:`outcome`,value:e}));try{for(;;){let i=!1;try{let e=await Promise.race([c,o.promise.then(e=>({kind:`interrupt`,interrupt:e}))]);if(e.kind===`outcome`)return e.value;if(t===`add`&&e.interrupt===`escape`&&cancelActiveRegistryItem!==void 0)cancelActiveRegistryItem(),i=!0;else{n=!0,r.abort(new WizardCancelledError);let e=await s;return e.partial===!0?e:{...e,...cancelledSetupResult(),tone:void 0}}}finally{o.dispose()}i&&(o=e.renderer.waitForInterrupt())}}finally{e.renderer.setStatus(void 0)}}async function executeSetupCommand(e,t,n,r,i){let{command:a,appRoot:o}=e,s={runInstallVercelCliFlow,runModelFlow,runRegistryFlow,runDeployFlow,...e.flows};try{switch(a){case`login`:{let n=await(s.runModelLogin??runModelLogin)({appRoot:o,agentRoot:e.agentRoot,prompter:t,signal:r,automatic:e.initialModelStep===`provider`,withConnectionUpdate:e.withExclusiveTerminal});return n.kind===`cancelled`?{message:`Connect a model with /login when you’re ready.`,cancelled:!0,preserveFlowDiagnostics:!1}:{message:`Connected. Start chatting · /add to extend your agent`,effect:{kind:`model-access-changed`,reload:n.reload,...n.model&&{model:n.model}},preserveFlowDiagnostics:!1}}case`model`:{let i={appRoot:e.agentRoot??o,environmentRoot:o,prompter:t,signal:r,chatGptAccountLabel:e.chatGptAccountLabel,deps:{pickModelSettings:e=>n.readModelEditor(e)}};e.initialModelStep!==void 0&&(i.initialStep=e.initialModelStep),e.onOnboardingScreen!==void 0&&(i.onScreen=t=>e.onOnboardingScreen?.({screen:t}));let a=await s.runModelFlow(i);if(a.kind===`cancelled`)return cancelledSetupResult();let c=[];a.modelMessage!==void 0&&c.push(a.modelMessage),a.providerSelection!==void 0&&c.push(providerSelectionMessage(a.providerSelection));let l={message:c.join(`
|
|
2
|
+
`),preserveFlowDiagnostics:!1};return a.accessChanged&&(l.effect={kind:`model-access-changed`,reload:!0}),l}case`add`:{let a=await s.runRegistryFlow({appRoot:o,prompter:t,signal:r,initialAddress:e.initialRegistryAddress,onScreen:e.onOnboardingScreen,onItemStart:registryItemProgress(n),runItem:i});if(a.kind===`cancelled`)return cancelledSetupResult();let c=a.result,l=registryResultTone(c),u=c.items.length>0||c.failures.length>0||c.outcomes!==void 0?formatRegistrySessionResult(c):`No integrations selected.`,d={message:l===`error`?`/add failed — ${u}`:u,preserveFlowDiagnostics:!0};return c.cancelled===!0?(d.partial=!0,d.tone=`error`):l!==void 0&&(d.tone=l),c.deployed===`production`&&(d.effect={kind:`deployed`}),d}case`deploy`:{let e=await s.runDeployFlow({appRoot:o,prompter:t,interactive:!0,signal:r});return e.kind===`cancelled`?cancelledSetupResult():e.kind===`needs-link`?{message:`Not linked to a Vercel project. Run eve deploy in an interactive terminal to link it.`,preserveFlowDiagnostics:!0}:e.kind===`local-model`?{message:`ChatGPT subscription models are local-only. Switch to an AI Gateway or server-authenticated model before deploying.`,preserveFlowDiagnostics:!0}:{message:e.productionUrl===void 0?`Deployed.`:`Deployed: ${e.productionUrl}`,preserveFlowDiagnostics:!0,effect:{kind:`deployed`}}}}}catch(e){if(e instanceof WizardCancelledError)return cancelledSetupResult();let n=e instanceof RegistryFlowFailedError?e.cause:e,i=await vercelCliUpgradeOutcome(n,a,s,{appRoot:o,prompter:t,signal:r});if(i!==void 0)return withRegistryResults(i,e);let c=vercelActionOutcome(n,a);return c===void 0?e instanceof RegistryFlowFailedError?{message:`${formatRegistrySessionResult(e.completed)}\n\n${e.message}`,partial:!0,tone:`error`,preserveFlowDiagnostics:!0}:{message:`/${a} failed: ${e instanceof Error?e.message:String(e)}`,tone:`error`,preserveFlowDiagnostics:!0}:withRegistryResults(c,e)}}function withRegistryResults(e,t){return t instanceof RegistryFlowFailedError?{...e,message:`${formatRegistrySessionResult(t.completed)}\n\n${e.message}`,partial:!0,tone:`error`,preserveFlowDiagnostics:!0}:e}async function vercelCliUpgradeOutcome(e,t,n,r){if(!(e instanceof HumanActionRequiredError)||e.action.kind!==`vercel-cli-upgrade`)return;let i;try{i=await r.prompter.select({message:`Your Vercel CLI needs an update to list your teams. Upgrade now?`,options:[{value:`upgrade`,label:`Upgrade Vercel CLI`,description:`Run the Vercel CLI's native upgrader`},{value:`later`,label:`Not now`}],initialValue:`upgrade`})}catch{i=`later`}if(i===`later`)return{message:`The Vercel CLI needs an update — run \`vercel upgrade\`, then retry /${t}.`,tone:`error`,preserveFlowDiagnostics:!0};let a;try{a=await n.runInstallVercelCliFlow({appRoot:r.appRoot,prompter:r.prompter,signal:r.signal,upgrade:!0})}catch(e){return{message:vercelCliUpgradeFailureMessage(t,errorMessage(e)),tone:`error`,preserveFlowDiagnostics:!0}}switch(a.kind){case`installed`:return{message:`Upgraded the Vercel CLI. Retry /${t}.`,tone:`error`,preserveFlowDiagnostics:!1};case`failed`:return{message:vercelCliUpgradeFailureMessage(t,a.reason),tone:`error`,preserveFlowDiagnostics:!0};case`cancelled`:return{message:`Vercel CLI upgrade cancelled — run \`vercel upgrade\`, then retry /${t}.`,tone:`error`,preserveFlowDiagnostics:!0};case`already`:return{message:`The Vercel CLI is already up to date. Retry /${t}.`,tone:`error`,preserveFlowDiagnostics:!1}}}function errorMessage(e){let t=(e instanceof Error?e.message:String(e)).replace(/\s+/gu,` `).trim();return t.length<=240?t:`${t.slice(0,239)}…`}function vercelCliUpgradeFailureMessage(e,t){return`Couldn't upgrade the Vercel CLI${t===void 0||t===``?``:` (${t})`} — run \`vercel upgrade\`, then retry /${e}.`}function vercelActionOutcome(e,t){if(!(e instanceof HumanActionRequiredError))return;let n=vercelActionMessage(e.action.kind,t);return n===void 0?void 0:{message:n,tone:`error`,preserveFlowDiagnostics:!0}}function vercelActionMessage(e,t){switch(e){case`vercel-login`:return`You're not logged in to Vercel — run /deploy to connect your Vercel account, then retry /${t}.`;case`vercel-forbidden`:return`Vercel denied access to that team — check your team access and SSO, then retry /${t}.`;case`vercel-cli-missing`:return`The Vercel CLI isn't installed — run /deploy to install it, then retry /${t}.`;case`vercel-cli-upgrade`:return`The Vercel CLI needs an update — run \`vercel upgrade\`, then retry /${t}.`;default:return}}function providerSelectionMessage(e){return e===`chatgpt`?`ChatGPT subscription selected.`:e===`ai-gateway-project`?`AI Gateway via Project selected.`:`AI Gateway via API key selected.`}export{SETUP_FLOW_CONFIG,runTuiSetupCommand};
|
|
@@ -47,7 +47,7 @@ export declare const LOGIN_SETUP_ISSUE: SetupIssue;
|
|
|
47
47
|
* The CLI-missing hint, surfaced by the same off-critical-path probe as
|
|
48
48
|
* {@link LOGIN_SETUP_ISSUE}. When the `vercel` binary is absent the probe
|
|
49
49
|
* reports this instead of the login hint, so the diagnostic points at its fix
|
|
50
|
-
* command (`/
|
|
50
|
+
* command (`/deploy`) rather than a logged-out state the probe can't determine.
|
|
51
51
|
*/
|
|
52
52
|
export declare const CLI_MISSING_SETUP_ISSUE: SetupIssue;
|
|
53
53
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{join}from"node:path";import{pathExists}from"#setup/path-exists.js";import{hasEnvValue,resolveGatewayCredential}from"#internal/resolve-model-endpoint-status.js";function normalizeLocalModelEndpoint(e,t){let n=modelProviderAccess({env:t,info:e});if(e===void 0||n.kind!==`gateway`||n.runtime.status!==`connected`)return e;let{credential:r}=n.runtime,i=e.agent.model;if(i.id===void 0||i.routing.kind!==`gateway`)return e;let a=i.endpoint;if(a?.kind===`gateway`&&a.connected&&a.credential===r)return e;let o={connected:!0,credential:r,kind:`gateway`};return{...e,agent:{...e.agent,model:{contextWindowTokens:i.contextWindowTokens,endpoint:o,id:i.id,providerOptions:i.providerOptions,reasoning:i.reasoning,routing:i.routing,source:i.source}}}}function modelProviderAccess(e){let t=e.info?.agent.model;if(t?.routing?.kind===`external`)return{kind:`external`};if(t?.routing?.kind!==`gateway`)return{kind:`unknown`};let n=resolveGatewayCredential({apiKeyInEnv:hasEnvValue(e.env.AI_GATEWAY_API_KEY),oidcAvailable:hasEnvValue(e.env.VERCEL_OIDC_TOKEN)});if(
|
|
1
|
+
import{join}from"node:path";import{pathExists}from"#setup/path-exists.js";import{hasEnvValue,resolveGatewayCredential}from"#internal/resolve-model-endpoint-status.js";function normalizeLocalModelEndpoint(e,t){let n=modelProviderAccess({env:t,info:e});if(e===void 0||n.kind!==`gateway`||n.runtime.status!==`connected`)return e;let{credential:r}=n.runtime,i=e.agent.model;if(i.id===void 0||i.routing.kind!==`gateway`)return e;let a=i.endpoint;if(a?.kind===`gateway`&&a.connected&&a.credential===r)return e;let o={connected:!0,credential:r,kind:`gateway`};return{...e,agent:{...e.agent,model:{contextWindowTokens:i.contextWindowTokens,endpoint:o,id:i.id,providerOptions:i.providerOptions,reasoning:i.reasoning,routing:i.routing,source:i.source}}}}function modelProviderAccess(e){let t=e.info?.agent.model;if(t?.routing?.kind===`external`)return{kind:`external`};if(t?.routing?.kind!==`gateway`)return{kind:`unknown`};let n=e.env.EVE_MODEL_CONNECTION,r=resolveGatewayCredential({apiKeyInEnv:(n===void 0||n===`ai-gateway-key`&&e.env.EVE_MODEL_KEY_SOURCE!==`secret`)&&hasEnvValue(e.env.AI_GATEWAY_API_KEY),oidcAvailable:(n===void 0||n===`ai-gateway-project`)&&hasEnvValue(e.env.VERCEL_OIDC_TOKEN)});if(r?.credential===`api-key`)return{kind:`gateway`,runtime:{status:`connected`,credential:`api-key`}};let i=t.endpoint;return i?.kind===`gateway`&&i.connected?{kind:`gateway`,runtime:{status:`connected`,credential:i.credential}}:r===void 0?i?.kind===`gateway`?{kind:`gateway`,runtime:{status:`disconnected`}}:{kind:`gateway`,runtime:{status:`unknown`}}:{kind:`gateway`,runtime:{status:`connected`,credential:r.credential}}}const BOOT_DETECTIONS=[{id:`model-provider`,async detect({appRoot:e,env:t,info:n}){let r=modelProviderAccess({env:t,info:n});if(r.kind===`external`)return[];if(r.kind===`gateway`){if(r.runtime.status===`connected`)return[];if(r.runtime.status===`disconnected`)return[{kind:`attention`,label:await pathExists(join(e,`.vercel`,`project.json`))?`AI Gateway credentials missing`:`connect a model`,command:`/login`}]}return await pathExists(join(e,`.vercel`,`project.json`))?[{kind:`attention`,label:`AI Gateway credentials missing`,command:`/login`}]:[{kind:`attention`,label:`connect a model`,command:`/login`}]}}],LOGIN_SETUP_ISSUE={kind:`attention`,label:`not logged in`,command:`/deploy`},CLI_MISSING_SETUP_ISSUE={kind:`attention`,label:`Vercel CLI not found`,command:`/deploy`};async function detectSetupIssues(e,t=BOOT_DETECTIONS){return(await Promise.all(t.map(async t=>{try{return await t.detect(e)}catch{return[]}}))).flat()}function orderedSetupIssues(e,t){return t===void 0?[...e]:[t,...e]}function formatSetupIssuesLine(e){let t=e.length===1?`setup issue`:`setup issues`,n=e.map(e=>`${e.label} · ${e.command}`).join(`, `);return`${e.length} ${t}: ${n}`}export{BOOT_DETECTIONS,CLI_MISSING_SETUP_ISSUE,LOGIN_SETUP_ISSUE,detectSetupIssues,formatSetupIssuesLine,normalizeLocalModelEndpoint,orderedSetupIssues};
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure rendering for the bordered setup flow panel — the input-region variant
|
|
3
|
-
* a setup command runs inside for its whole duration (the Claude Code
|
|
4
|
-
* `/model`-panel grammar): a full-width rule, the command as a blue title,
|
|
5
|
-
* the flow's recent progress lines, and the active question (numbered option
|
|
6
|
-
* rows or a text field) or the ephemeral status spinner. Behavior state comes
|
|
7
|
-
* from the shared select reducer (`#setup/cli/select-state.js`); this module
|
|
8
|
-
* only paints rows, so the renderer hosts lifecycle and keys while tests
|
|
9
|
-
* assert on strings.
|
|
10
|
-
*
|
|
11
|
-
* Column grammar: the panel adds a one-space left margin to every row under
|
|
12
|
-
* the rule, while each section contributes two more spaces. Titles, spinners,
|
|
13
|
-
* notices, filter prompts, and option-state glyphs therefore all begin at
|
|
14
|
-
* column 3.
|
|
15
|
-
*/
|
|
1
|
+
/** Pure borderless setup menus. Interaction and terminal lifecycle belong to the renderer. */
|
|
16
2
|
import type { ChannelSetupAction, PromptOption } from "#setup/cli/index.js";
|
|
17
3
|
import { type SearchActionOption, type SelectState } from "#setup/cli/select-state.js";
|
|
18
4
|
import type { PlannerNavigation, SelectMetadata, SelectNotice } from "#setup/prompter.js";
|
|
@@ -143,6 +129,7 @@ export type FlowPanelStatus = {
|
|
|
143
129
|
};
|
|
144
130
|
export type FlowPanelContent = {
|
|
145
131
|
kind: "question";
|
|
132
|
+
title?: string;
|
|
146
133
|
rows: readonly string[];
|
|
147
134
|
/** The install wait keeps its indicator above the concurrent actions. */
|
|
148
135
|
status?: FlowPanelStatus;
|
|
@@ -168,8 +155,9 @@ export interface FlowPanelState {
|
|
|
168
155
|
lines: readonly FlowPanelLine[];
|
|
169
156
|
content: FlowPanelContent;
|
|
170
157
|
}
|
|
158
|
+
export declare function flowMessageRows(lines: readonly FlowPanelLine[], theme: Theme): string[];
|
|
171
159
|
/**
|
|
172
|
-
* Paints the
|
|
160
|
+
* Paints the setup flow panel. Everything a running command produces lives
|
|
173
161
|
* here — progress, questions, the status indicator — and the panel vanishes
|
|
174
162
|
* wholesale when the command resolves; only the command echo and the elbow
|
|
175
163
|
* outcome persist in the transcript.
|
|
@@ -210,7 +198,7 @@ export declare function reasoningTrack(input: {
|
|
|
210
198
|
* adjust inline with left/right, and whose Model row opens the searchable
|
|
211
199
|
* catalog.
|
|
212
200
|
*/
|
|
213
|
-
export declare function renderModelEditorQuestion(input: ModelEditorPanelInput, theme: Theme, width: number): string[];
|
|
201
|
+
export declare function renderModelEditorQuestion(input: ModelEditorPanelInput, theme: Theme, width: number, message?: string): string[];
|
|
214
202
|
/** Paints a text question section: message, a block-cursor input line, hints. */
|
|
215
203
|
export declare function renderTextQuestion(state: SetupTextPanelState, theme: Theme, width: number, caretVisible: boolean): string[];
|
|
216
204
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import{maskLine,visibleLine}from"./line-editor.js";import{modelEditorMenuRows,reasoningPositions}from"./model-editor.js";import{clipVisible,renderInputText,renderInputWithBlockCursor,visibleLength,wrapVisibleLine}from"#cli/ui/terminal-text.js";import{renderCursorRow,renderOptionRow,
|
|
2
|
-
`);for(let[a,o]of
|
|
1
|
+
import{maskLine,visibleLine}from"./line-editor.js";import{modelEditorMenuRows,reasoningPositions}from"./model-editor.js";import{clipVisible,renderInputText,renderInputWithBlockCursor,visibleLength,wrapVisibleLine}from"#cli/ui/terminal-text.js";import{renderCursorRow,renderOptionRow,resolveOptionRowState}from"#setup/cli/option-row.js";import{filterOptions,submitRowIndex}from"#setup/cli/select-state.js";function clip(e,t){return clipVisible(e,t)}function questionFooter(e,t,n){let r=t.colors,i=e.join(` ${t.glyph.dot} `);return[``,...(n===void 0?[i]:wrapVisibleLine(i,Math.max(1,n-3))).map(e=>` ${r.dim(e)}`)]}function solidWithinDim(e,t){return t.color?`[22m${e}[2m`:e}function toneGlyph(e,t){let n=t.colors;switch(e){case`success`:return n.green(t.glyph.success);case`warning`:return n.yellow(t.glyph.warning);case`error`:return n.red(t.glyph.error);case`info`:return n.dim(t.glyph.dot)}}function renderIndicator(e,t){return e.color===`green`?t.colors.green(e.glyph):t.colors.yellow(e.glyph)}function renderStatusText(e,t){if(e.kind===`progress`)return t.colors.dim(e.text);let n=e.text.indexOf(e.emphasis);if(n===-1)return t.colors.dim(e.text);let r=n+e.emphasis.length;return`${t.colors.dim(e.text.slice(0,n))}${t.colors.yellow(e.text.slice(n,r))}${t.colors.dim(e.text.slice(r))}`}function renderFlowPanelStatus(e,t){return`${renderIndicator(e.indicator,t)} ${renderStatusText(e,t)}`}function flowMessageRows(e,t){let n=t.colors,r=[],i=e.slice(-6);for(let e of i){let i=e.text.split(`
|
|
2
|
+
`);for(let[a,o]of i.entries()){let i=e.tone===`info`?n.dim(o):o,s=a===0?`${toneGlyph(e.tone,t)} `:` `;r.push(` ${s}${i}`)}}return i.length>0&&r.push(``),r}function renderFlowPanel(e,t,n){let r=t.colors,i=[],a=e.content.kind===`question`?e.content.title??e.title:e.title;switch(a.length>0&&i.push(` ${r.bold(a)}`,``),e.navigation?.kind===`planner`&&i.push(...plannerStepRows(e.navigation,void 0,t)),i.push(...flowMessageRows(e.lines,t)),e.content.kind){case`question`:e.content.status!==void 0&&i.push(` ${renderFlowPanelStatus(e.content.status,t)}`,``),i.push(...e.content.rows);break;case`status`:if(i.push(` ${renderFlowPanelStatus(e.content.status,t)}`),e.content.preview!==void 0)for(let t of e.content.preview.split(`
|
|
3
3
|
`))i.push(` ${r.dim(t)}`);break;case`preview`:{let[n,...a]=e.content.text.split(`
|
|
4
|
-
`);i.push(` ${renderIndicator(e.content.indicator,t)} ${r.dim(n??``)}`);for(let e of a)i.push(` ${r.dim(e)}`);break}case`idle`:i.push(` ${renderIndicator(e.content.indicator,t)} ${r.dim(`Working…`)}`)}return i.map(
|
|
5
|
-
`).map((e,r)=>` ${t===`stacked`||r>0?n.colors.bold(e):e}`);return r.push(``),r}function searchFilter(e,t,n,r,i){let a=r.colors.dim(r.glyph.caret),o=a;return i?o
|
|
6
|
-
`)
|
|
7
|
-
`).map(e=>` ${i.bold(e)}`));let o=Math.max(4,n-4),s=e.mask?maskLine(e.editor):e.editor,c=e.editor.text.length===0?e.placeholder:void 0,l=renderInputWithBlockCursor({...visibleLine(c===void 0?s:{text:c,cursor:0},o,t.glyph.ellipsis),visible:r,inverse:i.inverse,render:c===void 0?renderInputText:e=>i.dim(renderInputText(e))});return a.push(` ${l}`),e.error!==void 0&&a.push(``,` ${i.red(e.error)}`),a.push(...questionFooter([`enter to submit`,`esc to cancel`],t)),a.map(e=>clip(e,n))}function renderAcknowledgeQuestion(e,t,n){let r=t.colors,i=[` ${r.bold(e.message)}`];if(e.lines.length>0){i.push(``);for(let t of e.lines)i.push(` ${r.dim(t)}`)}return i.push(...questionFooter([`enter to continue`],t)),i.map(e=>clip(e,n))}export{enterBadge,reasoningTrack,renderAcknowledgeQuestion,renderFlowPanel,renderModelEditorQuestion,renderSelectQuestion,renderTextQuestion};
|
|
4
|
+
`);i.push(` ${renderIndicator(e.content.indicator,t)} ${r.dim(n??``)}`);for(let e of a)i.push(` ${r.dim(e)}`);break}case`idle`:i.push(` ${renderIndicator(e.content.indicator,t)} ${r.dim(`Working…`)}`)}return i.map(e=>e.length===0?clip(e,n):clip(` ${e}`,n))}function optionRow(e){let{option:t,theme:n}=e,r=e.railed===!0;return renderOptionRow({colors:n.colors,glyphs:{pointer:n.glyph.pointer,selectedPointer:n.glyph.selectedPointer,success:n.glyph.success,placeholder:n.glyph.option,dot:r?``:n.glyph.dot,warning:n.glyph.warning},label:t.label,hint:t.hint,focusHint:t.focusHint,accent:t.accent,isCursor:e.isCursor,state:resolveOptionRowState(t,e.isChecked),placeholder:e.placeholder,hintPadding:e.hintPadding})}function selectPresentation(e){switch(e.kind){case`single`:return{selection:`single`,filter:void 0,layout:`plain`,edit:void 0};case`search`:return{selection:`single`,filter:{placeholder:e.placeholder},layout:e.layout??`plain`,edit:void 0};case`multi`:return{selection:`multiple`,filter:void 0,layout:`plain`,edit:void 0};case`searchable-multi`:return{selection:`multiple`,filter:{placeholder:e.placeholder},layout:e.layout??`plain`,edit:void 0};case`stacked`:return{selection:`single`,filter:void 0,layout:`stacked`,edit:void 0};case`task-list`:return{selection:`single`,filter:void 0,layout:`task-list`,edit:void 0};case`inline-edit`:return{selection:`single`,filter:void 0,layout:e.layout,edit:e.edit}}}function canNavigateBack(e){return e.activeStep>(e.firstNavigableStep??0)}function canNavigateForward(e){return e.activeStep>=(e.firstNavigableStep??0)&&e.activeStep<e.steps.length-1}function plannerStepRows(e,t,n){let r=e.steps.map((r,i)=>{let a=i===e.activeStep?t:r.count,o=a===void 0||a===0?``:` (${a})`,s=`${r.complete===!0?`${n.glyph.success} `:``}${r.label}${o}`;return i===e.activeStep?n.colors.bold(` ${s}`):r.complete===!0?n.colors.green(s):n.colors.dim(s)});return[` ${r.flatMap((t,i)=>{if(i===r.length-1)return[t];let a=e.activeStep===i&&canNavigateForward(e)?` → `:e.activeStep===i+1&&canNavigateBack(e)?` ← `:` · `;return[t,n.colors.dim(a)]}).join(``)}`,``]}function selectMessageRows(e,t,n){if(e===``)return[];let r=e.split(`
|
|
5
|
+
`).map((e,r)=>` ${t===`stacked`||r>0?n.colors.bold(e):e}`);return r.push(``),r}function searchFilter(e,t,n,r,i){let a=r.colors.dim(r.glyph.caret),o=a;return i?o=e.length>0?e+a:r.colors.dim(t??`type to filter`):e.length>0?o=e+a:t!==void 0&&(o=r.colors.dim(`> ${t}`)),n===void 0?o:`${o} ${r.colors.yellow(n)}`}function isRailedSearch(e){return e.filter!==void 0&&e.layout===`plain`&&e.selection===`single`&&e.edit===void 0}function selectViewSize(e){return e.search?e.railed?5:e.stacked?Math.min(e.optionCount,8):8:e.optionCount}function noticeBody(e,t,n){return e.tone===`info`?n.colors.dim(e.text):e.tone===`success`&&t===`task-list`?n.colors.bold(e.text):e.text}function renameHint(e,t,n,r){let i={text:n.editor.text||n.defaultValue,cursor:n.editor.cursor},a=renderInputWithBlockCursor({...visibleLine(i,1/0),visible:t,inverse:r.colors.inverse});return n.editor.text.length>0&&(a=solidWithinDim(a,r)),{...e,hint:n.formatHint(a)}}function keyHint(e,t,n,r,i){let a=n.phase;if(a.kind===`inactive`)return e;let o=r.colors,s=maskLine(a.editor),c=a.kind!==`validating`&&a.kind!==`invalid`,l=``;a.kind===`editing`?l=` ${enterBadge(r,`validate`)}`:a.kind===`validating`?l=` ${o.yellow(r.glyph.validating)} ${o.dim(`validating`)}`:a.kind===`invalid`&&(l=` ${o.red(`${r.glyph.error} API key is not valid`)}`);let u=`${r.glyph.elbow} `,d=a.editor.text.length===0?`type your key`:void 0,f=d===void 0?s:{text:d,cursor:0},p=Math.max(1,i-visibleLength(`${u}${l}`)),m=visibleLine(f,p,r.glyph.ellipsis),h=c?renderInputWithBlockCursor({...m,visible:t,inverse:r.colors.inverse}):renderInputText(`${m.before}${m.under}${m.after}`);return{...e,hint:`${u}${h}${l}`}}function inlineEditOption(e,t,n,r,i){if(!t||n===void 0||e.value!==n.optionValue)return e;switch(n.editor.kind){case`rename`:return renameHint(e,n.caretVisible,n.editor,r);case`key`:return keyHint(e,n.caretVisible,n.editor,r,i)}}function optionUsesPlaceholder(e,t){let n=e.filter!==void 0&&e.layout!==`task-list`,r=e.selection===`multiple`,i=e.layout!==`plain`;return!n&&!t&&(r||i)}function appendSelectOptionRows(e){let{rows:t,state:n,presentation:r,visible:i,start:a,end:o,cursor:s,visibleLabelWidth:c,width:l,theme:u}=e,d=!1;for(let e=a;e<o;e+=1){let o=i[e],f=e===s,p=r.layout===`task-list`&&o.trailingAction===!0;p&&(appendSelectNotices(t,n.notices,r.layout,u,l),d=!0),p&&(e>a||(n.notices?.length??0)>0)&&t.push(``);let m=r.layout===`stacked`?Math.max(1,l-6):Math.max(1,l-Math.max(c,o.label.length)-9),h=inlineEditOption(o,f,r.edit,u,m),g=r.edit?.editor.kind===`key`&&f,_={...h,hint:(h.hint??(f||o.disabled?o.description:void 0))?.replace(/\s*\n\s*/gu,` `)};g&&(_.hint=void 0);let v=isRailedSearch(r),y=n.cursorBadge??(v&&!p?enterBadge(u):void 0),b=f&&y!==void 0?` ${y}`:``;t.push(` ${optionRow({option:_,isCursor:f,isChecked:r.selection===`multiple`?n.select.selected.has(o.value):o.checked===!0,placeholder:v||optionUsesPlaceholder(r,p),railed:v,hintPadding:Math.max(0,c-_.label.length),theme:u})}${b}`),g&&h.hint&&t.push(` ${h.hint}`)}return d}function appendSubmitRow(e,t,n,r){if(n<0)return;let i=t===n,a=i?`${r.glyph.selectedPointer} ${r.colors.bold(`Submit`)}`:` Submit`;e.push(``,` ${renderCursorRow(a,i,r.colors)}`)}function appendSelectNotices(e,t,n,r,i){if(t!==void 0&&t.length!==0){e.push(``);for(let a of t){let t=toneGlyph(a.tone,r),o=` `.repeat(visibleLength(t)+1),s=Math.max(1,i-2-visibleLength(t)-1),c=wrapVisibleLine(a.text,s);for(let[i,s]of c.entries()){let c=noticeBody({...a,text:s},n,r);e.push(i===0?` ${t} ${c}`:` ${o}${c}`)}}}}function selectFooterHints(e,t,n,r){let i=[],a=`esc to cancel`,o=e.edit;if(o!==void 0&&t[n]?.value===o.optionValue){if(o.editor.kind===`key`){let e=o.editor.phase;if(e.kind!==`inactive`&&e.editor.text.length>0&&(a=`esc to clear`),e.kind===`validating`)return[a];i.push(`type your key`)}else i.push(`type to rename`)}if(e.filter!==void 0&&i.push(`type to filter`),i.push(`↑/↓ move`),r!==void 0){let t=canNavigateBack(r),n=canNavigateForward(r);return i.push(e.selection===`multiple`?`space/enter toggle`:`enter to select`),t&&n?i.push(`←/→ steps`):t?i.push(`← back`):n&&i.push(`→ next`),i.push(a),i}return i.push(e.selection===`multiple`?`space to toggle`:`enter to select`),e.selection===`multiple`&&i.push(`enter on Submit to confirm`),i.push(a),i}function renderActionQuestion(e,t,n){let r=[` ${t.colors.dim(`${t.glyph.dot} ${e.context}`)}`,``];for(let[n,i]of e.actions.entries())r.push(` ${optionRow({option:i,isCursor:n===e.cursor,isChecked:!1,placeholder:!0,hintPadding:0,theme:t})}`);return r.push(...questionFooter([`↑/↓ move`,`enter to select`,`esc to cancel`],t)),r.map(e=>clip(e,n))}function renderSelectQuestion(e,t,n){if(e.kind===`actions`)return renderActionQuestion(e,t,n);let r=t.colors,i=selectPresentation(e),a=i.filter?filterOptions(e.options,e.select.filter,e.searchAction):e.options,o=e.navigation?.kind===`planner`?e.navigation:void 0,s=i.selection===`multiple`&&o===void 0?submitRowIndex(a):-1,c=e.select.cursor,l=isRailedSearch(i),u=[...e.navigation?.kind===`planner`?plannerStepRows(e.navigation,i.selection===`multiple`?e.select.selected.size:void 0,t):[],...selectMessageRows(e.message,i.layout,t)];if(e.description!==void 0||e.metadata!==void 0){if(u.at(-1)===``&&u.pop(),e.description!==void 0)for(let t of wrapVisibleLine(e.description,Math.max(1,n-4)))u.push(` ${r.dim(t)}`);for(let{label:t,value:i}of e.metadata??[]){let e=`${t}: `,a=wrapVisibleLine(i,Math.max(1,n-4-e.length));u.push(` ${r.dim(`${e}${a[0]??``}`)}`);for(let t of a.slice(1))u.push(` ${r.dim(`${` `.repeat(e.length)}${t}`)}`)}u.push(``)}i.filter!==void 0&&u.push(` ${l?` `:``}${searchFilter(e.select.filter,i.filter.placeholder,e.loadingFrame,t,l)}`);let d=selectViewSize({search:i.filter!==void 0,filter:e.select.filter,optionCount:a.length,railed:l,stacked:i.layout===`stacked`}),f=Math.max(0,Math.min(c-Math.floor(d/2),Math.max(0,a.length-d))),p=Math.min(f+d,a.length),m=a.slice(f,p).filter(e=>e.hint!==void 0||e.focusHint!==void 0).reduce((e,t)=>Math.max(e,t.label.length),0);a.length===0&&u.push(` ${r.dim(`(no matches)`)}`);let h=appendSelectOptionRows({rows:u,state:e,presentation:i,visible:a,start:f,end:p,cursor:c,visibleLabelWidth:m,width:n,theme:t});if(appendSubmitRow(u,c,s,t),o!==void 0&&i.selection===`multiple`){let t=e.select.selected.size;u.push(``,` ${r.dim(`${t} selected`)}`)}return!l&&a.length>p-f&&u.push(` ${r.dim(`↑↓ ${a.length} options, showing ${f+1}–${p}`)}`),h||appendSelectNotices(u,e.notices,i.layout,t,n),e.error!==void 0&&u.push(``,` ${r.red(e.error)}`),u.push(...questionFooter(l?[`Enter select`,`Esc back`]:selectFooterHints(i,a,c,o),t,n)),u.map(e=>clip(e,n))}function enterBadge(e,t){return e.colors.dim(t===void 0?e.glyph.enter:`${e.glyph.enter} ${t}`)}function reasoningTrack(e){let{count:t,index:n,theme:r}=e,i=r.glyph,a=i.trackLine.repeat(e.connectorWidth),o=[];for(let e=0;e<t;e+=1)e>0&&o.push(a),o.push(e<n?i.trackFilled:e===n?i.trackCurrent:i.trackEmpty);if(!e.accent||n<0)return o.join(``);let s=o.slice(0,2*n+1).join(``);return`${r.colors.blue(s)}${o.slice(2*n+1).join(``)}`}function renderModelEditorQuestion(e,t,n,r=`Select the model`){let{request:i,state:a}=e;switch(a.screen.kind){case`menu`:return renderModelEditorMenu(e,a.screen.cursor,t,n);case`model`:return renderModelEditorModelScreen(i,a.screen.select,t,n,r)}}function renderModelEditorMenu(e,t,n,r){let{request:i,state:a}=e,{draft:o}=a,s=modelEditorMenuRows(i,o,a.capabilities).map(e=>{if(e.disabled===!0&&e.value===`model`)return o.modelId===null?{...e}:{...e,hint:o.modelId};if(e.disabled===!0||e.value===`done`)return{...e};switch(e.value){case`model`:return{...e,hint:o.modelId??void 0};case`reasoning`:{let r=reasoningPositions(a.capabilities,o.reasoning),i=o.reasoning==="default"?-1:r.indexOf(o.reasoning),s=reasoningTrack({count:r.length,index:i,connectorWidth:1,accent:e.value===t,theme:n}),c=o.reasoning==="default"?`provider default`:o.reasoning;return{...e,hint:`${s} ${c}`}}case`tier`:return{...e,hint:o.tier===`priority`?`fast ${n.glyph.fast}`:`normal`};default:return{...e}}});return renderSelectQuestion({kind:`stacked`,message:``,options:s,select:{filter:``,cursor:Math.max(0,s.findIndex(e=>e.value===t)),selected:new Set}},n,r)}function renderModelEditorModelScreen(e,t,n,r,i){return renderSelectQuestion({kind:`search`,message:i,options:e.model.kind===`pick`?e.model.options:[],placeholder:`type to search`,select:t},n,r)}function renderTextQuestion(e,t,n,r){let i=t.colors,a=[];for(let n of e.notices??[]){let e=n.tone===`info`?i.dim(n.text):n.text;a.push(`${toneGlyph(n.tone,t)} ${e}`)}e.message!==``&&a.push(...e.message.split(`
|
|
6
|
+
`).map(e=>` ${i.bold(e)}`));let o=Math.max(4,n-4),s=e.mask?maskLine(e.editor):e.editor,c=e.editor.text.length===0?e.placeholder:void 0,l=renderInputWithBlockCursor({...visibleLine(c===void 0?s:{text:c,cursor:0},o,t.glyph.ellipsis),visible:r,inverse:i.inverse,render:c===void 0?renderInputText:e=>i.dim(renderInputText(e))});return a.push(` ${l}`),e.error!==void 0&&a.push(``,` ${i.red(e.error)}`),a.push(...questionFooter([`enter to submit`,`esc to cancel`],t)),a.map(e=>clip(e,n))}function renderAcknowledgeQuestion(e,t,n){let r=t.colors,i=e.message===``?[]:[` ${r.bold(e.message)}`];if(e.lines.length>0){i.push(``);for(let t of e.lines)i.push(` ${r.dim(t)}`)}return i.push(...questionFooter([`enter to continue`],t)),i.map(e=>clip(e,n))}export{enterBadge,flowMessageRows,reasoningTrack,renderAcknowledgeQuestion,renderFlowPanel,renderModelEditorQuestion,renderSelectQuestion,renderTextQuestion};
|
|
@@ -10,8 +10,6 @@ export interface DevBuildStatus {
|
|
|
10
10
|
export interface StatusLineInput {
|
|
11
11
|
/** Transient authored-source build state, independent of the server log filter. */
|
|
12
12
|
devBuild?: DevBuildStatus;
|
|
13
|
-
/** Port of the connected local development server; omitted for remote sessions. */
|
|
14
|
-
serverPort?: string;
|
|
15
13
|
/** Resolved model slug, e.g. "anthropic/claude-sonnet-5"; absent when `/eve/v1/info` failed. */
|
|
16
14
|
model?: string;
|
|
17
15
|
/** Authored reasoning effort, rendered bold after the model id, e.g. `(xhigh)`. */
|
|
@@ -34,10 +32,5 @@ export interface StatusLineInput {
|
|
|
34
32
|
theme: Theme;
|
|
35
33
|
width: number;
|
|
36
34
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Builds a leading local `:port` or remote badge followed by the model (with
|
|
39
|
-
* its reasoning level and Fast mode marker), and endpoint
|
|
40
|
-
* segments. Both badges are the final narrow-width fallback. Remote sessions
|
|
41
|
-
* omit endpoint state. Returns undefined when every segment is empty.
|
|
42
|
-
*/
|
|
35
|
+
/** Builds model and connection segments, preserving the remote badge at narrow widths. */
|
|
43
36
|
export declare function buildStatusLine(input: StatusLineInput): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{remoteHost}from"./target.js";import{clipVisible,stripAnsi,visibleLength}from"#cli/ui/terminal-text.js";import{formatModelSummary}from"#shared/model-summary.js";function formatDevBuildStatus(e,t){let n=e.phase===`complete`;return`${n?t.glyph.success:t.glyph.validating} ${n?e.summary.replace(/ changed$/u,` updated`):`${e.summary.replace(/ (?:added|changed|removed)$/u,``)} updating…`}`}function renderModel(e){if(e.model===void 0)return;let t=e.theme.colors,n={model:e.model};if(e.reasoning!==void 0&&(n.reasoning=e.reasoning),e.fastMode===!0&&(n.fastGlyph=e.theme.glyph.fast),e.remote!==void 0){n.model=stripAnsi(e.model).replace(/\s+/gu,` `).trim();let r=stripAnsi(formatModelSummary(n)).replace(/\s+/gu,` `).trim();return t.dim(r)}return t.dim(formatModelSummary(n))}
|
|
1
|
+
import{remoteHost}from"./target.js";import{clipVisible,stripAnsi,visibleLength}from"#cli/ui/terminal-text.js";import{formatModelSummary}from"#shared/model-summary.js";function formatDevBuildStatus(e,t){let n=e.phase===`complete`;return`${n?t.glyph.success:t.glyph.validating} ${n?e.summary.replace(/ changed$/u,` updated`):`${e.summary.replace(/ (?:added|changed|removed)$/u,``)} updating…`}`}function renderModel(e){if(e.model===void 0)return;let t=e.theme.colors,n={model:e.model};if(e.reasoning!==void 0&&(n.reasoning=e.reasoning),e.fastMode===!0&&(n.fastGlyph=e.theme.glyph.fast),e.remote!==void 0){n.model=stripAnsi(e.model).replace(/\s+/gu,` `).trim();let r=stripAnsi(formatModelSummary(n)).replace(/\s+/gu,` `).trim();return t.dim(r)}return t.dim(formatModelSummary(n))}const EXTERNAL_PROVIDER_DISPLAY_NAMES={codex:`chatgpt-sub`};function renderEndpoint(e){if(e.remote!==void 0||e.endpoint===void 0)return;let t=e.theme.colors,n=e.theme.glyph,clause=(e,n)=>`${e}${t.dim(n)}`;if(e.endpoint.kind===`external`){let r=EXTERNAL_PROVIDER_DISPLAY_NAMES[e.endpoint.provider]??e.endpoint.provider;return`${t.dim(r)}${n.external}`}if(e.endpoint.kind===`chatgpt`)switch(e.endpoint.state){case`ready`:return`${t.dim(`chatgpt-sub`)}${n.external}`;case`checking`:return t.dim(`chatgpt-sub checking…`);case`signed-out`:case`reauth-required`:return t.yellow(`${n.warning} chatgpt-sub login · /login`);case`unavailable`:return t.yellow(`${n.warning} chatgpt-sub unavailable`)}if(!e.endpoint.connected)return t.yellow(`${n.warning} ai-gateway`);if(e.endpoint.credential===`api-key`)return clause(`ai-gateway`,`(api-key)`);if(e.endpoint.credential===`oauth`){let n=e.vercel?.modelTeamSlug;return t.dim(n?`Vercel · ${n}`:`Vercel`)}let r=e.vercel?.identity?.projectName;return clause(`ai-gateway`,`(${r===void 0?`oidc`:`oidc:${r}`})`)}function buildStatusLine(e){let{theme:t,width:n}=e,r=t.colors,i=e.devBuild===void 0?void 0:formatDevBuildStatus(e.devBuild,t),a=e.logLevel===void 0?void 0:r.cyan(`logs: ${e.logLevel}`),o=renderModel(e),s=e.remote===void 0?void 0:formatRemoteStatus(e.remote,t),c=renderEndpoint(e),l=s?.full,u=s?.badge,d=r.dim(` · `),compose=(e,t)=>{let n=t.filter(e=>e!==void 0).join(d);return e===void 0||n.length===0?e??n:`${e} ${n}`},f=[compose(l,[a,o,c]),compose(l,[a,o]),compose(l,[a]),compose(u,[a]),compose(u,[])];if(i!==void 0){for(let e of f){let t=visibleLength(e),r=visibleLength(i);if(!(t+(t>0?2:0)+r>n))return`${e}${` `.repeat(n-t-r)}${i}`}return clipVisible(i,n)}if(f[0].length===0)return;for(let e of f)if(e.length>0&&visibleLength(e)<=n)return e;let p=f.findLast(e=>e.length>0);return clipVisible(p,n)}function formatRemoteStatus(e,t){let n=t.colors,r=e.deployment===void 0?remoteHost(e.target):`${e.deployment.projectName} (${e.deployment.environment})`,i=formatRemoteBadge(` ${t.unicode?`↗`:`->`} ${r} `,e.connection.state,t),a;switch(e.connection.state){case`checking`:a=n.dim(`Checking access…`);break;case`ready`:break;case`auth-required`:a=n.yellow(`Authenticate via OIDC`);break;case`authenticating`:a=n.dim(`Authenticating via OIDC…`);break;case`auth-failed`:a=n.yellow(`Authentication failed`);break;case`unavailable`:a=n.yellow(`Remote unavailable`)}return{badge:i,full:a===void 0?i:`${i} ${a}`}}function formatRemoteBadge(e,t,n){let r=n.colors;switch(t){case`checking`:return r.inverse(r.gray(e));case`ready`:return r.inverse(r.blue(e));case`unavailable`:case`auth-required`:case`authenticating`:case`auth-failed`:return r.inverse(r.yellow(e))}}export{buildStatusLine};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type MessageStreamEvent } from "#protocol/message.js";
|
|
2
|
+
/**
|
|
3
|
+
* Follows accepted messages through their boundary, including a send racing
|
|
4
|
+
* settlement. Delivery responses may overlap; stream event IDs deduplicate them.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SteeringStream implements AsyncIterable<MessageStreamEvent> {
|
|
7
|
+
private readonly session;
|
|
8
|
+
private readonly streams;
|
|
9
|
+
private closed;
|
|
10
|
+
private readonly controller;
|
|
11
|
+
constructor(initial: AsyncIterable<MessageStreamEvent>, session: SteeringStream["session"]);
|
|
12
|
+
send(message: string): Promise<void>;
|
|
13
|
+
abort(): void;
|
|
14
|
+
[Symbol.asyncIterator](): AsyncGenerator<MessageStreamEvent>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createEventDeduper}from"#protocol/event-dedupe.js";import{isCurrentTurnBoundaryEvent}from"#protocol/message.js";var SteeringStream=class{session;streams;closed=!1;controller=new AbortController;constructor(e,t){this.session=t,this.streams=[Promise.resolve(e)]}async send(e){if(this.closed)throw Error(`The active stream ended before steering was sent.`);let t=this.session.send(e,{turnPolicy:`steer`,signal:this.controller.signal});this.streams.push(t.then(e=>e,()=>void 0)),await t}abort(){this.closed=!0,this.controller.abort()}async*[Symbol.asyncIterator](){let e=createEventDeduper(),t;try{for(;this.streams.length>0;){let n=await this.streams.shift();if(n!==void 0){for await(let r of n)if(e.admit(r)){if(isCurrentTurnBoundaryEvent(r)){t=r;break}yield r}}}t!==void 0&&(yield t)}finally{this.abort()}}};export{SteeringStream};
|
|
@@ -56,6 +56,7 @@ export declare class TerminalRenderer implements AgentTUIRenderer {
|
|
|
56
56
|
/** The `/traces` full-screen viewer; resolves when the user closes it. */
|
|
57
57
|
readonly traceViewer: TraceViewerRenderer;
|
|
58
58
|
constructor(options?: TerminalRendererOptions);
|
|
59
|
+
setStartupPhase(phase: "starting" | "connecting" | "updating" | undefined): void;
|
|
59
60
|
/**
|
|
60
61
|
* Commits the startup agent header (brand mark + resolved configuration) to
|
|
61
62
|
* scrollback before the first prompt. Later calls (dev HMR refreshing fields
|
|
@@ -79,7 +80,7 @@ export declare class TerminalRenderer implements AgentTUIRenderer {
|
|
|
79
80
|
* Consumes the next prompt produced by mid-turn input — the staged Esc
|
|
80
81
|
* steer message, or the whole queue coalesced into one. The runner calls
|
|
81
82
|
* this at a clean turn boundary and submits the result directly; the
|
|
82
|
-
* remembered origin
|
|
83
|
+
* remembered origin determines the echoed user block's gutter color.
|
|
83
84
|
*/
|
|
84
85
|
takeQueuedPrompt(): string | undefined;
|
|
85
86
|
renderStream(result: AgentTUIStreamResult, options?: AgentTUISessionOptions): Promise<void>;
|
|
@@ -151,7 +152,7 @@ export declare class TerminalRenderer implements AgentTUIRenderer {
|
|
|
151
152
|
/**
|
|
152
153
|
* Sets the setup attention line (yellow `⚠`, commands blue) as a live footer
|
|
153
154
|
* element above the prompt. Unlike committed scrollback, it can be cleared:
|
|
154
|
-
* once the underlying issue is fixed (e.g. `/
|
|
155
|
+
* once the underlying issue is fixed (e.g. `/deploy` succeeds) the runner calls
|
|
155
156
|
* {@link clearSetupWarning} and the line disappears rather than lingering
|
|
156
157
|
* stale in the transcript.
|
|
157
158
|
*/
|