@pellux/goodvibes-tui 1.27.1 → 2.0.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 +127 -2
- package/README.md +7 -9
- package/bin/goodvibes +2 -2
- package/bin/launcher-support.js +8 -4
- package/docs/README.md +11 -2
- package/docs/foundation-artifacts/operator-contract.json +6403 -2347
- package/package.json +14 -25
- package/scripts/postinstall.js +35 -35
- package/src/audio/spoken-turn-model-routing.ts +1 -1
- package/src/cli/bundle-command.ts +5 -5
- package/src/cli/completions/generate.ts +1 -1
- package/src/cli/doctor.ts +3 -3
- package/src/cli/entrypoint.ts +12 -7
- package/src/cli/help.ts +4 -5
- package/src/cli/hooks-command.ts +1 -1
- package/src/cli/index.ts +1 -4
- package/src/cli/launch-auto-update.ts +59 -7
- package/src/cli/management-commands.ts +6 -6
- package/src/cli/management-utils.ts +5 -5
- package/src/cli/management.ts +7 -7
- package/src/cli/network-posture.ts +1 -1
- package/src/cli/package-verification.ts +7 -6
- package/src/cli/plugin-bundles-command.ts +1 -1
- package/src/cli/plugin-command.ts +2 -2
- package/src/cli/service-command.ts +2 -2
- package/src/cli/service-posture.ts +4 -4
- package/src/cli/status.ts +9 -8
- package/src/cli/surface-command.ts +4 -4
- package/src/cli/tui-startup.ts +3 -3
- package/src/cli-flags.ts +3 -3
- package/src/config/goodvibes-home-audit.ts +0 -2
- package/src/config/secret-config.ts +37 -5
- package/src/config/tui-extension-settings.ts +1 -1
- package/src/core/approval-alert.ts +2 -2
- package/src/core/budget-breach-notifier.ts +3 -3
- package/src/core/conversation-compaction-render.ts +1 -1
- package/src/core/conversation-line-cache.ts +1 -1
- package/src/core/conversation-render-context.ts +1 -1
- package/src/core/conversation-rendering.ts +2 -2
- package/src/core/conversation.ts +10 -10
- package/src/core/long-task-notifier.ts +2 -2
- package/src/core/memory-diagnostics-gateway.ts +1 -1
- package/src/core/scriptable-statusline.ts +1 -1
- package/src/core/session-auto-titler.ts +1 -1
- package/src/core/session-resume-core.ts +2 -2
- package/src/core/stream-event-wiring.ts +24 -44
- package/src/core/terminal-notifier.ts +3 -3
- package/src/core/turn-cancellation.ts +1 -1
- package/src/core/turn-event-wiring.ts +5 -5
- package/src/input/command-registry.ts +6 -6
- package/src/input/commands/channel-pairing.ts +1 -1
- package/src/input/commands/cluster-runtime.ts +1 -1
- package/src/input/commands/codebase-runtime.ts +1 -1
- package/src/input/commands/devices-runtime.ts +1 -1
- package/src/input/commands/hosted-runtime.ts +330 -0
- package/src/input/commands/local-setup-review.ts +1 -1
- package/src/input/commands/local-setup-transfer.ts +2 -2
- package/src/input/commands/local-setup.ts +3 -3
- package/src/input/commands/managed-runtime.ts +2 -2
- package/src/input/commands/operator-rpc.ts +24 -110
- package/src/input/commands/payment-card-intake.ts +1 -1
- package/src/input/commands/permissions-provenance.ts +2 -2
- package/src/input/commands/plugin-runtime.ts +1 -1
- package/src/input/commands/provider.ts +1 -1
- package/src/input/commands/relay-runtime.ts +18 -9
- package/src/input/commands/rewind-runtime.ts +1 -1
- package/src/input/commands/runtime-services.ts +1 -1
- package/src/input/commands/services-runtime.ts +1 -1
- package/src/input/commands/session-workflow.ts +1 -1
- package/src/input/commands/settings-sync-runtime.ts +2 -2
- package/src/input/commands/share-runtime.ts +1 -1
- package/src/input/commands/tasks-runtime.ts +145 -55
- package/src/input/commands/update-runtime.ts +31 -28
- package/src/input/commands/work-plan-runtime.ts +2 -2
- package/src/input/commands/workstream-attempts.ts +1 -1
- package/src/input/commands/workstream-runtime.ts +2 -2
- package/src/input/commands.ts +2 -0
- package/src/input/feature-unit-layout.ts +1 -1
- package/src/input/feed-context-factory.ts +3 -3
- package/src/input/handler-content-actions.ts +2 -2
- package/src/input/handler-feed-routes.ts +1 -1
- package/src/input/handler-feed.ts +3 -3
- package/src/input/handler-modal-token-routes.ts +1 -1
- package/src/input/handler-onboarding-daemon-adopt.ts +3 -2
- package/src/input/handler-onboarding.ts +1 -1
- package/src/input/handler-types.ts +2 -2
- package/src/input/handler-ui-state.ts +1 -1
- package/src/input/handler.ts +4 -4
- package/src/input/input-history.ts +1 -1
- package/src/input/onboarding/onboarding-feature-units.ts +2 -2
- package/src/input/onboarding/onboarding-runtime-status.ts +15 -1
- package/src/input/onboarding/onboarding-wizard-apply.ts +17 -8
- package/src/input/onboarding/onboarding-wizard-cloudflare-step.ts +5 -3
- package/src/input/onboarding/onboarding-wizard-external-surfaces.ts +1 -1
- package/src/input/onboarding/onboarding-wizard-types.ts +1 -1
- package/src/input/payments-config.ts +6 -6
- package/src/input/search.ts +1 -1
- package/src/input/session-picker-modal.ts +46 -0
- package/src/input/settings-modal-activation.ts +1 -1
- package/src/input/settings-modal-behavior.ts +4 -4
- package/src/input/settings-modal-commit.ts +11 -0
- package/src/input/settings-modal-data.ts +9 -122
- package/src/input/settings-modal-mutations.ts +33 -0
- package/src/input/settings-modal-secrets.ts +34 -0
- package/src/input/settings-modal-subscriptions.ts +1 -1
- package/src/input/settings-modal-types.ts +15 -1
- package/src/input/settings-modal.ts +28 -3
- package/src/input/worktree-setup-config.ts +1 -1
- package/src/main.ts +11 -9
- package/src/panels/agent-inspector-shared.ts +2 -2
- package/src/panels/base-panel.ts +2 -2
- package/src/panels/builtin/operations.ts +6 -8
- package/src/panels/builtin/session.ts +17 -0
- package/src/panels/builtin/shared.ts +5 -5
- package/src/panels/builtin-modals.ts +3 -3
- package/src/panels/confirm-state.ts +1 -1
- package/src/panels/cost-tracker-panel.ts +4 -4
- package/src/panels/diff-panel.ts +2 -2
- package/src/panels/diff-review-panel.ts +2 -2
- package/src/panels/expandable-list-panel.ts +2 -2
- package/src/panels/fleet-acts.ts +1 -1
- package/src/panels/fleet-observed-render.ts +1 -1
- package/src/panels/fleet-panel-format.ts +1 -1
- package/src/panels/fleet-panel.ts +1 -1
- package/src/panels/fleet-spawn.ts +1 -1
- package/src/panels/fleet-steer.ts +1 -1
- package/src/panels/fleet-transcript.ts +1 -1
- package/src/panels/git-panel.ts +1 -1
- package/src/panels/hosted-session-feed.ts +352 -0
- package/src/panels/hosted-session-panel.ts +221 -0
- package/src/panels/local-auth-panel.ts +3 -3
- package/src/panels/modals/devices-modal.ts +1 -1
- package/src/panels/modals/local-auth-modal.ts +1 -1
- package/src/panels/modals/pairing-modal.ts +1 -1
- package/src/panels/modals/services-modal.ts +1 -1
- package/src/panels/modals/settings-sync-modal.ts +1 -1
- package/src/panels/modals/subscription-modal.ts +1 -1
- package/src/panels/modals/work-plan-modal.ts +1 -1
- package/src/panels/notifications-panel.ts +1 -1
- package/src/panels/panel-confirm-overlay.ts +1 -1
- package/src/panels/plugins-panel.ts +2 -2
- package/src/panels/polish-core.ts +2 -2
- package/src/panels/polish-tables.ts +1 -1
- package/src/panels/polish.ts +2 -2
- package/src/panels/scrollable-list-panel.ts +3 -3
- package/src/panels/skills-panel.ts +3 -3
- package/src/panels/token-budget-panel.ts +5 -5
- package/src/panels/types.ts +1 -2
- package/src/permissions/prompt.ts +1 -1
- package/src/renderer/autocomplete-overlay.ts +1 -1
- package/src/renderer/block-actions-overlay.ts +1 -1
- package/src/renderer/bookmark-modal.ts +1 -1
- package/src/renderer/buffer.ts +1 -1
- package/src/renderer/code-block.ts +1 -1
- package/src/renderer/composer-fragments.ts +1 -1
- package/src/renderer/compositor.ts +2 -2
- package/src/renderer/config-modal.ts +1 -1
- package/src/renderer/context-inspector.ts +1 -1
- package/src/renderer/conversation-layout.ts +2 -2
- package/src/renderer/conversation-overlays.ts +1 -1
- package/src/renderer/conversation-surface.ts +2 -2
- package/src/renderer/diff-view.ts +1 -1
- package/src/renderer/diff.ts +1 -1
- package/src/renderer/file-picker-overlay.ts +1 -1
- package/src/renderer/fleet-tab-strip.ts +1 -1
- package/src/renderer/fullscreen-primitives.ts +2 -2
- package/src/renderer/fullscreen-workspace.ts +1 -1
- package/src/renderer/header-line.ts +1 -1
- package/src/renderer/help-overlay.ts +1 -1
- package/src/renderer/history-search-overlay.ts +2 -2
- package/src/renderer/layout.ts +5 -8
- package/src/renderer/markdown-inline.ts +1 -1
- package/src/renderer/markdown-table.ts +1 -1
- package/src/renderer/markdown.ts +1 -1
- package/src/renderer/mcp-workspace.ts +1 -1
- package/src/renderer/modal-factory.ts +2 -2
- package/src/renderer/model-workspace.ts +2 -2
- package/src/renderer/onboarding/onboarding-wizard.ts +1 -1
- package/src/renderer/overlay-box.ts +1 -1
- package/src/renderer/panel-composite.ts +1 -1
- package/src/renderer/panel-workspace-bar.ts +1 -1
- package/src/renderer/process-indicator.ts +1 -1
- package/src/renderer/profile-picker-modal.ts +1 -1
- package/src/renderer/search-overlay.ts +2 -2
- package/src/renderer/selection-modal-overlay.ts +1 -1
- package/src/renderer/session-picker-modal.ts +124 -3
- package/src/renderer/settings-modal-helpers.ts +2 -0
- package/src/renderer/settings-modal.ts +2 -2
- package/src/renderer/shell-surface.ts +2 -2
- package/src/renderer/system-message.ts +1 -1
- package/src/renderer/tab-strip.ts +1 -1
- package/src/renderer/theme-mode-config.ts +21 -33
- package/src/renderer/theme.ts +11 -12
- package/src/renderer/thinking.ts +1 -1
- package/src/renderer/tool-call.ts +2 -2
- package/src/renderer/tool-result-expanded-lines.ts +1 -1
- package/src/renderer/turn-injection.ts +7 -8
- package/src/renderer/ui-factory.ts +3 -3
- package/src/runtime/bootstrap-command-context.ts +4 -4
- package/src/runtime/bootstrap-command-parts.ts +5 -5
- package/src/runtime/bootstrap-core.ts +30 -30
- package/src/runtime/bootstrap-shell.ts +4 -4
- package/src/runtime/bootstrap.ts +128 -157
- package/src/runtime/client/approval-updates.ts +82 -0
- package/src/runtime/client/build-floors.ts +167 -0
- package/src/runtime/client/daemon-attach-handshake.ts +115 -0
- package/src/runtime/client/fleet-union.ts +147 -0
- package/src/runtime/client/host-service-status.ts +71 -0
- package/src/runtime/client/hosted-exit.ts +86 -0
- package/src/runtime/client/hosted-roster.ts +110 -0
- package/src/runtime/client/hosted-session-stream.ts +178 -0
- package/src/runtime/client/hosted-sessions.ts +187 -0
- package/src/runtime/client/operator-endpoint.ts +213 -0
- package/src/runtime/client/spine-adoption.ts +99 -0
- package/src/runtime/cloudflare-control-plane.ts +1 -1
- package/src/runtime/context-accounting-source.ts +1 -1
- package/src/runtime/context.ts +2 -2
- package/src/runtime/conversation-rewind-port.ts +42 -14
- package/src/runtime/daemon-attach-notices.ts +55 -19
- package/src/runtime/diagnostics/panels/ops.ts +1 -1
- package/src/runtime/disposal-wiring.ts +4 -24
- package/src/runtime/index.ts +119 -105
- package/src/runtime/install-self-check-startup.ts +2 -2
- package/src/runtime/interaction-seams.ts +1 -1
- package/src/runtime/knowledge-services.ts +8 -2
- package/src/runtime/legacy-daemon-migration.ts +4 -3
- package/src/runtime/legacy-daemon-reconcile.ts +3 -2
- package/src/runtime/memory-spine-transport.ts +37 -267
- package/src/runtime/notification-dispatch.ts +2 -2
- package/src/runtime/onboarding/apply.ts +2 -2
- package/src/runtime/onboarding/derivation.ts +2 -2
- package/src/runtime/onboarding/markers.ts +2 -2
- package/src/runtime/onboarding/progress.ts +2 -2
- package/src/runtime/onboarding/snapshot.ts +1 -1
- package/src/runtime/onboarding/state.ts +2 -2
- package/src/runtime/onboarding/types.ts +2 -2
- package/src/runtime/orchestrator-core-services.ts +1 -1
- package/src/runtime/path-shadow-startup.ts +28 -221
- package/src/runtime/power-keepawake-remote.ts +3 -2
- package/src/runtime/process-lifecycle.ts +2 -2
- package/src/runtime/provider-fallback.ts +10 -66
- package/src/runtime/recovery-autosave.ts +1 -1
- package/src/runtime/recovery-offer-wiring.ts +39 -23
- package/src/runtime/recovery-prompt.ts +31 -17
- package/src/runtime/relay-reachability-bridge.ts +53 -42
- package/src/runtime/release-artifacts.ts +2 -1
- package/src/runtime/runtime-services-types.ts +82 -35
- package/src/runtime/services.ts +305 -300
- package/src/runtime/session-resume-liveness-confirm.ts +1 -1
- package/src/runtime/ui-services.ts +7 -6
- package/src/runtime/update-check.ts +23 -43
- package/src/runtime/workspace-checkpointing.ts +1 -1
- package/src/runtime/wrfc-persistence.ts +2 -2
- package/src/shell/ui-openers.ts +30 -7
- package/src/utils/clipboard.ts +1 -1
- package/src/verification/verification-ledger.ts +10 -8
- package/src/version.ts +1 -1
- package/bin/goodvibes-daemon +0 -90
- package/src/cli/config-overrides.ts +0 -267
- package/src/cli/endpoints.ts +0 -109
- package/src/cli/parser.ts +0 -395
- package/src/cli/redaction.ts +0 -170
- package/src/cli/types.ts +0 -84
- package/src/cluster/commands.ts +0 -382
- package/src/cluster/remote-daemon-target.ts +0 -225
- package/src/cluster/render.ts +0 -268
- package/src/config/atomic-write.ts +0 -70
- package/src/config/credential-availability.ts +0 -122
- package/src/config/goodvibes-home.ts +0 -149
- package/src/config/index.ts +0 -88
- package/src/config/provider-model.ts +0 -23
- package/src/config/read-versioned.ts +0 -228
- package/src/core/alert-gating.ts +0 -67
- package/src/core/consolidation-receipt.ts +0 -41
- package/src/core/focus-tracker.ts +0 -41
- package/src/core/history.ts +0 -45
- package/src/core/memory-status.ts +0 -118
- package/src/core/orchestrator.ts +0 -7
- package/src/core/pairing-devices.ts +0 -49
- package/src/core/pairing-handoff.ts +0 -101
- package/src/core/pairing-offers.ts +0 -83
- package/src/core/pairing-origin.ts +0 -78
- package/src/core/rewind-turn-anchors.ts +0 -311
- package/src/core/session-recovery.ts +0 -210
- package/src/core/stable-host.ts +0 -171
- package/src/core/transcript-journal.ts +0 -503
- package/src/daemon/cli.ts +0 -693
- package/src/daemon/fatal-boot-report.ts +0 -111
- package/src/daemon/handlers/context.ts +0 -29
- package/src/daemon/handlers/contracts.ts +0 -77
- package/src/daemon/handlers/credentials.ts +0 -139
- package/src/daemon/handlers/drafts/draft-store.ts +0 -427
- package/src/daemon/handlers/drafts/index.ts +0 -17
- package/src/daemon/handlers/drafts/register.ts +0 -331
- package/src/daemon/handlers/errors.ts +0 -18
- package/src/daemon/handlers/inbox/cursor-store.ts +0 -457
- package/src/daemon/handlers/inbox/index.ts +0 -284
- package/src/daemon/handlers/inbox/mapping.ts +0 -192
- package/src/daemon/handlers/inbox/poller.ts +0 -212
- package/src/daemon/handlers/inbox/provider-adapter.ts +0 -156
- package/src/daemon/handlers/inbox/providers/discord.ts +0 -252
- package/src/daemon/handlers/inbox/providers/email.ts +0 -152
- package/src/daemon/handlers/inbox/providers/imap-client.ts +0 -300
- package/src/daemon/handlers/inbox/providers/route-util.ts +0 -24
- package/src/daemon/handlers/inbox/providers/slack.ts +0 -263
- package/src/daemon/handlers/index.ts +0 -117
- package/src/daemon/handlers/register.ts +0 -168
- package/src/daemon/handlers/remote/backends/cloud-terminal.ts +0 -142
- package/src/daemon/handlers/remote/backends/docker.ts +0 -79
- package/src/daemon/handlers/remote/backends/index.ts +0 -40
- package/src/daemon/handlers/remote/backends/local-process.ts +0 -113
- package/src/daemon/handlers/remote/backends/process-runner.ts +0 -127
- package/src/daemon/handlers/remote/backends/ssh.ts +0 -125
- package/src/daemon/handlers/remote/backends/types.ts +0 -97
- package/src/daemon/handlers/remote/dispatcher.ts +0 -181
- package/src/daemon/handlers/remote/index.ts +0 -119
- package/src/daemon/handlers/remote/peer-registry.ts +0 -357
- package/src/daemon/handlers/remote/service.ts +0 -191
- package/src/daemon/handlers/routing/inbox-bridge.ts +0 -71
- package/src/daemon/handlers/routing/index.ts +0 -261
- package/src/daemon/handlers/routing/route-store.ts +0 -319
- package/src/daemon/handlers/routing/routing-resolver.ts +0 -75
- package/src/daemon/handlers/sqlite-store.ts +0 -278
- package/src/daemon/handlers/triage/index.ts +0 -57
- package/src/daemon/handlers/triage/integration.ts +0 -213
- package/src/daemon/handlers/triage/pipeline.ts +0 -274
- package/src/daemon/handlers/triage/scorer.ts +0 -287
- package/src/daemon/handlers/triage/tagger/discord.ts +0 -187
- package/src/daemon/handlers/triage/tagger/imap.ts +0 -384
- package/src/daemon/handlers/triage/tagger/index.ts +0 -184
- package/src/daemon/handlers/triage/tagger/shared.ts +0 -70
- package/src/daemon/handlers/triage/tagger/slack.ts +0 -69
- package/src/daemon/handlers/triage/types.ts +0 -50
- package/src/daemon/lifecycle.ts +0 -41
- package/src/daemon/provision-wake-model.ts +0 -81
- package/src/daemon/safe-serve.ts +0 -61
- package/src/daemon/send/channels.ts +0 -200
- package/src/daemon/send/command.ts +0 -332
- package/src/daemon/send/composition.ts +0 -99
- package/src/daemon/send/failure-text.ts +0 -93
- package/src/daemon/send/inert-text.ts +0 -225
- package/src/daemon/send/stdin.ts +0 -24
- package/src/daemon/service-commands.ts +0 -329
- package/src/export/cost-utils.ts +0 -319
- package/src/input/selection.ts +0 -135
- package/src/plugins/loader.ts +0 -15
- package/src/renderer/bottom-bar.ts +0 -58
- package/src/renderer/conversation-tree.ts +0 -228
- package/src/runtime/agent-graph-composition.ts +0 -78
- package/src/runtime/channel-composition.ts +0 -46
- package/src/runtime/cluster-composition.ts +0 -124
- package/src/runtime/cluster-group-composition.ts +0 -284
- package/src/runtime/code-index-services.ts +0 -167
- package/src/runtime/daemon-handler-composition.ts +0 -76
- package/src/runtime/device-posture-composition.ts +0 -110
- package/src/runtime/durability-housekeeping.ts +0 -183
- package/src/runtime/durability-services.ts +0 -155
- package/src/runtime/embedded-service-factories.ts +0 -74
- package/src/runtime/feature-settings.ts +0 -154
- package/src/runtime/fleet-needs-input-push.ts +0 -70
- package/src/runtime/fleet-services.ts +0 -41
- package/src/runtime/idle-power-services.ts +0 -85
- package/src/runtime/mail-composition.ts +0 -65
- package/src/runtime/memory-fold.ts +0 -55
- package/src/runtime/operator-token-cleanup.ts +0 -109
- package/src/runtime/path-shadow.ts +0 -418
- package/src/runtime/perf/panel-health-monitor.ts +0 -18
- package/src/runtime/provider-optimizer-wiring.ts +0 -55
- package/src/runtime/reachability-notice.ts +0 -100
- package/src/runtime/remote-execution-composition.ts +0 -62
- package/src/runtime/session-liveness-marker.ts +0 -257
- package/src/runtime/session-pointer-surface.ts +0 -22
- package/src/runtime/session-storage-services.ts +0 -41
- package/src/runtime/surface-feature-flags.ts +0 -96
- package/src/runtime/terminal-output-guard.ts +0 -235
- package/src/runtime/trust/workspace-registration.ts +0 -192
- package/src/runtime/trust/workspace-trust.ts +0 -229
- package/src/runtime/ui/index.ts +0 -39
- package/src/runtime/ui/model-picker/data-provider.ts +0 -182
- package/src/runtime/ui/model-picker/health-enrichment.ts +0 -231
- package/src/runtime/ui/model-picker/index.ts +0 -59
- package/src/runtime/ui/model-picker/types.ts +0 -153
- package/src/runtime/ui/provider-health/data-provider.ts +0 -244
- package/src/runtime/ui/provider-health/fallback-visualizer.ts +0 -71
- package/src/runtime/ui/provider-health/index.ts +0 -46
- package/src/runtime/ui/provider-health/types.ts +0 -146
- package/src/runtime/ui-events.ts +0 -1
- package/src/runtime/ui-read-model-helpers.ts +0 -1
- package/src/runtime/ui-read-models-observability-maintenance.ts +0 -1
- package/src/runtime/ui-read-models-observability-options.ts +0 -1
- package/src/runtime/ui-read-models-observability-remote.ts +0 -1
- package/src/runtime/ui-read-models-observability-security.ts +0 -1
- package/src/runtime/ui-read-models-observability-system.ts +0 -1
- package/src/runtime/ui-read-models-observability.ts +0 -1
- package/src/runtime/ui-service-queries.ts +0 -1
- package/src/runtime/voice-setup-services.ts +0 -98
- package/src/runtime/workstream-attempts-validation.ts +0 -77
- package/src/runtime/workstream-draft-edits.ts +0 -95
- package/src/runtime/workstream-draft-store.ts +0 -274
- package/src/runtime/workstream-draft-types.ts +0 -42
- package/src/runtime/workstream-services.ts +0 -373
- package/src/tools/index.ts +0 -1
- package/src/types/grid.ts +0 -48
- package/src/types/sql-js.d.ts +0 -15
- package/src/work-plans/work-plan-store.ts +0 -702
|
@@ -19,8 +19,8 @@ import type { UiRuntimeServices } from '../runtime/ui-services.ts';
|
|
|
19
19
|
import type { CommandContext } from './command-registry.ts';
|
|
20
20
|
import type { ConversationManager } from '../core/conversation';
|
|
21
21
|
import type { ModelPickerModal, ModelPickerTarget } from './model-picker.ts';
|
|
22
|
-
import type { SelectionManager } from '
|
|
23
|
-
import type { InfiniteBuffer } from '
|
|
22
|
+
import type { SelectionManager } from '@pellux/goodvibes-terminal-shell';
|
|
23
|
+
import type { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
|
|
24
24
|
import type { AutocompleteEngine } from './autocomplete.ts';
|
|
25
25
|
import type { BookmarkModal } from './bookmark-modal.ts';
|
|
26
26
|
import type { SettingsModal } from './settings-modal.ts';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InputToken } from '@pellux/goodvibes-sdk/platform/core';
|
|
2
|
-
import type { InfiniteBuffer } from '
|
|
2
|
+
import type { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
|
|
3
3
|
import type { SearchManager } from './search.ts';
|
|
4
4
|
import type { HistorySearch } from './input-history.ts';
|
|
5
5
|
import type { ConversationManager } from '../core/conversation';
|
package/src/input/handler.ts
CHANGED
|
@@ -9,8 +9,8 @@ import type { OnboardingRuntimePosture } from './handler-types.ts';
|
|
|
9
9
|
import { beginOpenAICodexLogin, exchangeOpenAICodexCode } from '@pellux/goodvibes-sdk/platform/config';
|
|
10
10
|
import { openExternalUrl } from '@pellux/goodvibes-sdk/platform/utils';
|
|
11
11
|
import { buildProviderAccountSnapshot } from '@/runtime/index.ts';
|
|
12
|
-
import { SelectionManager } from '
|
|
13
|
-
import type { InfiniteBuffer } from '
|
|
12
|
+
import { SelectionManager } from '@pellux/goodvibes-terminal-shell';
|
|
13
|
+
import type { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
|
|
14
14
|
import type { CommandRegistry, CommandContext } from './command-registry.ts';
|
|
15
15
|
import { AutocompleteEngine } from './autocomplete.ts';
|
|
16
16
|
import { FilePickerModal } from './file-picker.ts';
|
|
@@ -25,7 +25,7 @@ import { ContextInspectorModal } from '../renderer/context-inspector.ts';
|
|
|
25
25
|
import { BookmarkModal } from './bookmark-modal.ts';
|
|
26
26
|
import { SettingsModal } from './settings-modal.ts';
|
|
27
27
|
import { McpWorkspace } from './mcp-workspace.ts';
|
|
28
|
-
import { SessionPickerModal } from './session-picker-modal.ts';
|
|
28
|
+
import { SessionPickerModal, getSharedHostedSessionRoster } from './session-picker-modal.ts';
|
|
29
29
|
import { ConfigModal } from './config-modal.ts';
|
|
30
30
|
import { ProfilePickerModal } from './profile-picker-modal.ts';
|
|
31
31
|
import type { PanelBurstGuardState } from './panel-paste-flood-guard.ts';
|
|
@@ -283,7 +283,7 @@ export class InputHandler implements InputHandlerLike {
|
|
|
283
283
|
// retirement: ProcessModal/LiveTailModal/AgentDetailModal were removed
|
|
284
284
|
// — F2 now opens the Fleet panel, which subsumes the live process tree.
|
|
285
285
|
this.bookmarkModal = new BookmarkModal(uiServices.shell.bookmarkManager);
|
|
286
|
-
this.sessionPickerModal = new SessionPickerModal(uiServices.sessions.sessionManager, uiServices.sessions.sessionBroker);
|
|
286
|
+
this.sessionPickerModal = new SessionPickerModal(uiServices.sessions.sessionManager, uiServices.sessions.sessionBroker, getSharedHostedSessionRoster(), () => this.requestRender()); // third source: the daemon-hosted roster
|
|
287
287
|
this.profilePickerModal = new ProfilePickerModal(uiServices.shell.profileManager);
|
|
288
288
|
this.selectionQueue = attachSelectionModalQueue(this); // wires exitApp teardown too — see selection-modal-queue.ts
|
|
289
289
|
this.initFeedContext();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
import { atomicWriteFileSync } from '
|
|
3
|
+
import { atomicWriteFileSync } from '@pellux/goodvibes-sdk/platform/config';
|
|
4
4
|
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
5
5
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
6
6
|
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* lockstep with the SDK feature-flag set.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type { ConfigKey } from '
|
|
18
|
-
import { getFeatureSetting, isFeatureDefaultEnabled } from '
|
|
17
|
+
import type { ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
|
|
18
|
+
import { getFeatureSetting, isFeatureDefaultEnabled } from '@pellux/goodvibes-terminal-shell';
|
|
19
19
|
import type {
|
|
20
20
|
OnboardingWizardControllerLike,
|
|
21
21
|
OnboardingWizardFieldDefinition,
|
|
@@ -38,6 +38,11 @@ export function runtimePortDiagnostic(
|
|
|
38
38
|
const version = status.version ? ` version ${status.version}` : '';
|
|
39
39
|
return `An existing GoodVibes service was verified at ${status.baseUrl}${version}.`;
|
|
40
40
|
}
|
|
41
|
+
// The only mode left after every named branch above is 'embedded', and this
|
|
42
|
+
// function reads either endpoint's status (see getRuntimeEndpointStatus):
|
|
43
|
+
// the daemon status can never carry it in this product (adoptOnly is
|
|
44
|
+
// hardcoded — see bootstrap.ts), but the HTTP listener's status legitimately
|
|
45
|
+
// does, since the SDK always reports its in-process listener as 'embedded'.
|
|
41
46
|
return `An embedded GoodVibes service is running at ${status.baseUrl}.`;
|
|
42
47
|
}
|
|
43
48
|
if (portInUse) {
|
|
@@ -58,6 +63,11 @@ export function isRuntimeEndpointActive(
|
|
|
58
63
|
endpoint: OnboardingRuntimeEndpoint,
|
|
59
64
|
): boolean {
|
|
60
65
|
const status = getRuntimeEndpointStatus(state, endpoint);
|
|
66
|
+
// This helper serves both endpoints (see handler-onboarding.ts's daemon and
|
|
67
|
+
// httpListener calls), so the 'embedded' arm stays live for httpListener even
|
|
68
|
+
// though a daemon status here is never 'embedded' in this product (adoptOnly
|
|
69
|
+
// is hardcoded — see bootstrap.ts). Dropping the arm would mark a running
|
|
70
|
+
// HTTP listener as inactive.
|
|
61
71
|
if (status) return status.mode === 'embedded' || status.mode === 'external';
|
|
62
72
|
return endpoint === 'daemon'
|
|
63
73
|
? state?.daemonRunning === true
|
|
@@ -70,7 +80,9 @@ export function isRuntimeEndpointOccupyingConfiguredPort(
|
|
|
70
80
|
): boolean {
|
|
71
81
|
const status = getRuntimeEndpointStatus(state, endpoint);
|
|
72
82
|
// 'incompatible' means a GoodVibes daemon holds the configured port (we just
|
|
73
|
-
// did not adopt it) — the port IS occupied, so report it as such.
|
|
83
|
+
// did not adopt it) — the port IS occupied, so report it as such. As with
|
|
84
|
+
// isRuntimeEndpointActive above, 'embedded' stays live here for httpListener
|
|
85
|
+
// (daemon status never carries it in this product).
|
|
74
86
|
if (status) return status.mode === 'embedded' || status.mode === 'external' || status.mode === 'blocked' || status.mode === 'incompatible';
|
|
75
87
|
return endpoint === 'daemon'
|
|
76
88
|
? state?.daemonRunning === true || state?.daemonPortInUse === true
|
|
@@ -87,6 +99,8 @@ export function formatRuntimeActiveSuccessMessage(
|
|
|
87
99
|
const version = status.version ? ` version ${status.version}` : '';
|
|
88
100
|
return `${label} is already running as a verified external GoodVibes service at ${status.baseUrl}${version}.`;
|
|
89
101
|
}
|
|
102
|
+
// Reachable for httpListener (the SDK always reports its in-process listener
|
|
103
|
+
// as 'embedded'); a daemon status never carries this mode in this product.
|
|
90
104
|
if (status?.mode === 'embedded') {
|
|
91
105
|
return `${label} is running as an embedded service at ${status.baseUrl}.`;
|
|
92
106
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OnboardingAcknowledgementTarget, OnboardingApplyOperation, OnboardingApplyRequest } from '../../runtime/onboarding/index.ts';
|
|
2
|
-
import { formatProviderModel } from '
|
|
3
|
-
import { getServerSurfaceFeatureFlags } from '
|
|
4
|
-
import { featureEnablementWrite } from '
|
|
2
|
+
import { formatProviderModel } from '@pellux/goodvibes-sdk/platform/providers';
|
|
3
|
+
import { getServerSurfaceFeatureFlags } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
4
|
+
import { featureEnablementWrite } from '@pellux/goodvibes-terminal-shell';
|
|
5
5
|
import {
|
|
6
6
|
buildCloudflareApiTokenRef,
|
|
7
7
|
buildCloudflareOperationalTokenRef,
|
|
@@ -303,14 +303,23 @@ function addCloudflareOperations(
|
|
|
303
303
|
setConfig('batch.mode', batchMode);
|
|
304
304
|
setConfig('batch.queueBackend', batchMode !== 'off' && components.queues ? 'cloudflare' : 'local');
|
|
305
305
|
// Zero Trust Tunnel auto-enables trustProxy on both services so the
|
|
306
|
-
// login-rate-limiter keys on the
|
|
307
|
-
// egress address.
|
|
308
|
-
//
|
|
309
|
-
//
|
|
310
|
-
//
|
|
306
|
+
// login-rate-limiter keys on the client address the tunnel forwards rather
|
|
307
|
+
// than the tunnel's own egress address. On its own, that address is read
|
|
308
|
+
// from X-Forwarded-For, which a client reaching the listener directly can
|
|
309
|
+
// set for itself — so it could still choose which address the rate limiter
|
|
310
|
+
// and the audit log recorded.
|
|
311
|
+
//
|
|
312
|
+
// httpListener.trustCloudflare is what closes that: the listener reads
|
|
313
|
+
// CF-Connecting-IP instead, and only when the connecting peer is inside a
|
|
314
|
+
// published Cloudflare range, so a direct client cannot name its own
|
|
315
|
+
// address. This route puts the listener behind the tunnel, which is exactly
|
|
316
|
+
// the deployment the stricter read is for, so the wizard turns it on rather
|
|
317
|
+
// than leaving it to be found in the settings list. It is a no-op without
|
|
318
|
+
// trustProxy, which the same branch writes.
|
|
311
319
|
if (components.zeroTrustTunnel) {
|
|
312
320
|
setConfig('controlPlane.trustProxy', true);
|
|
313
321
|
setConfig('httpListener.trustProxy', true);
|
|
322
|
+
setConfig('httpListener.trustCloudflare', true);
|
|
314
323
|
}
|
|
315
324
|
}
|
|
316
325
|
|
|
@@ -264,9 +264,9 @@ export function buildCloudflareStep(controller: OnboardingWizardControllerLike):
|
|
|
264
264
|
fields.push({
|
|
265
265
|
kind: 'status',
|
|
266
266
|
id: 'cloudflare.trust-proxy-notice',
|
|
267
|
-
label: '
|
|
267
|
+
label: 'Forwarded-address handling will be configured for this route',
|
|
268
268
|
defaultValue: 'Notice',
|
|
269
|
-
hint: 'Selecting Zero Trust Tunnel auto-writes controlPlane.trustProxy=true and httpListener.trustProxy=true so the login rate-limiter keys on the
|
|
269
|
+
hint: 'Selecting Zero Trust Tunnel auto-writes controlPlane.trustProxy=true and httpListener.trustProxy=true, so the login rate-limiter keys on the client address the tunnel forwards rather than the tunnel egress address. On their own those two read that address from X-Forwarded-For, which a client reaching the port directly can set for itself. It also writes httpListener.trustCloudflare=true, which is ON for this route: the HTTP listener instead reads CF-Connecting-IP and only accepts it from a peer inside a published Cloudflare range, so a direct client cannot name its own address to pick which rate-limit bucket and audit-log entry it lands in. The control plane has no equivalent setting, so keep it reachable only through the tunnel. See docs/deployment-and-services.md for the full posture.',
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
272
|
|
|
@@ -476,7 +476,9 @@ export function buildCloudflareStep(controller: OnboardingWizardControllerLike):
|
|
|
476
476
|
`Components: ${enabled ? componentCount : 0} selected`,
|
|
477
477
|
`Token setup: ${enabled ? setupSource : 'not used'}`,
|
|
478
478
|
`Provision on final apply: ${enabled ? controller.getStringFieldValue('cloudflare.provision-on-apply', 'no') : 'no'}`,
|
|
479
|
-
...(enabled && components.zeroTrustTunnel
|
|
479
|
+
...(enabled && components.zeroTrustTunnel
|
|
480
|
+
? ['trustProxy: enabled for control plane and HTTP listener; trustCloudflare: ON for the HTTP listener (see notice)']
|
|
481
|
+
: []),
|
|
480
482
|
],
|
|
481
483
|
fields,
|
|
482
484
|
};
|
|
@@ -34,7 +34,7 @@ import type {
|
|
|
34
34
|
ChannelSetupFieldKind,
|
|
35
35
|
ChannelSurface,
|
|
36
36
|
} from '@pellux/goodvibes-sdk/platform/channels';
|
|
37
|
-
import { DEFAULT_CONFIG, type ConfigKey } from '
|
|
37
|
+
import { DEFAULT_CONFIG, type ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
|
|
38
38
|
import type { OnboardingSnapshotState } from '../../runtime/onboarding/index.ts';
|
|
39
39
|
import { TELEGRAM_MODE_OPTIONS, WHATSAPP_PROVIDER_OPTIONS } from './onboarding-wizard-constants.ts';
|
|
40
40
|
import type { ExternalSurfaceSetupFieldSpec, ExternalSurfaceSpec, OnboardingWizardRadioOption } from './onboarding-wizard-types.ts';
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
type OnboardingStep1CapabilityItem,
|
|
10
10
|
type OnboardingStepDerivationState,
|
|
11
11
|
} from '../../runtime/onboarding/index.ts';
|
|
12
|
-
import type { ConfigKey } from '
|
|
12
|
+
import type { ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
|
|
13
13
|
|
|
14
14
|
export type OnboardingWizardMode = OnboardingMode;
|
|
15
15
|
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
* implicit card the way this app's `/payments card` flow models it, so these
|
|
27
27
|
* four fields are synthetic sub-keys under the SDK's real `payments`
|
|
28
28
|
* section — the same established pattern this codebase already uses for
|
|
29
|
-
* `
|
|
30
|
-
* EXISTING section that CONFIG_SCHEMA
|
|
29
|
+
* `behavior.notifyAfterSeconds`, `storage.codeIndexEnabled`, etc.: a key one
|
|
30
|
+
* level under an EXISTING section that CONFIG_SCHEMA has no scalar entry for.
|
|
31
31
|
*
|
|
32
32
|
* That one-level-under-an-existing-section shape matters mechanically: the
|
|
33
33
|
* real ConfigManager's dotted-path resolver only throws "Invalid config path"
|
|
34
34
|
* when an INTERMEDIATE segment is missing (e.g. `payments.card.number`, where
|
|
35
35
|
* `card` is not itself a section) — it does not throw for a final leaf that
|
|
36
|
-
* the schema
|
|
37
|
-
* `
|
|
36
|
+
* the schema has not declared (`payments.cardNumber`), the same tolerance
|
|
37
|
+
* `storage.codeIndexEnabled` relies on under `storage`. So these four keys are named
|
|
38
38
|
* FLAT (`payments.cardNumber`, not `payments.card.number`) specifically so
|
|
39
39
|
* `ConfigManager.get/setDynamic` accepts them — verified against the real
|
|
40
40
|
* ConfigManager (not the fake store this module used before this round): a
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
*/
|
|
63
63
|
|
|
64
64
|
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
65
|
-
import type { ConfigKey } from '
|
|
65
|
+
import type { ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
|
|
66
66
|
import type { SettingEntry } from './settings-modal-types.ts';
|
|
67
67
|
|
|
68
68
|
/** Real ConfigManager's read surface — these four keys are defensive reads (see header comment). */
|
|
@@ -79,7 +79,7 @@ export const PAYMENTS_CVV_HANDLING_CONFIG_KEY = 'payments.cvvHandling' as Config
|
|
|
79
79
|
function readStringField(configManager: PaymentsConfigReader, key: ConfigKey): string {
|
|
80
80
|
// Defensive try/catch, same rationale as worktree-setup-config.ts's
|
|
81
81
|
// readWorktreeSetupList and this codebase's other one-level-under-a-real-
|
|
82
|
-
// section synthetic reads (
|
|
82
|
+
// section synthetic reads (behavior.notifyAfterSeconds, storage.codeIndexEnabled): the real
|
|
83
83
|
// ConfigManager never throws for these particular keys (verified — see
|
|
84
84
|
// header comment), but degrading to empty rather than crashing the whole
|
|
85
85
|
// settings modal is the same posture every synthetic setting here takes
|
package/src/input/search.ts
CHANGED
|
@@ -17,6 +17,17 @@
|
|
|
17
17
|
* selectable for load/delete. `sessionBroker` is optional so every existing
|
|
18
18
|
* caller/test that only cares about local saved-session management keeps
|
|
19
19
|
* working unchanged.
|
|
20
|
+
*
|
|
21
|
+
* Hosted sessions: a third, also read-only section lists the conversations
|
|
22
|
+
* running INSIDE the daemon (`sessions.hosted.list`, held by the shared roster
|
|
23
|
+
* in runtime/client/hosted-roster.ts). They belong in the place a person
|
|
24
|
+
* already goes to ask "what sessions are there" — a hosted session is exactly
|
|
25
|
+
* that, one whose loop happens to live elsewhere. Joining one is `/hosted
|
|
26
|
+
* attach <id>` rather than an Enter here, for the same reason cross-surface
|
|
27
|
+
* rows are not loadable: there is no on-disk transcript this process can
|
|
28
|
+
* `load()`, and attaching opens a live stream that the picker has no business
|
|
29
|
+
* owning. The id is rendered in full so the command can be typed straight from
|
|
30
|
+
* the row.
|
|
20
31
|
*/
|
|
21
32
|
|
|
22
33
|
import { unlinkSync } from 'node:fs';
|
|
@@ -25,6 +36,20 @@ import type { SharedSessionRecord } from '@pellux/goodvibes-sdk/platform/control
|
|
|
25
36
|
import type { CrossSurfaceView, SessionReadFacade } from '@pellux/goodvibes-sdk/platform/runtime/session-spine';
|
|
26
37
|
import type { ConversationManager } from '../core/conversation';
|
|
27
38
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
39
|
+
import type { HostedRosterSnapshot } from '../runtime/client/hosted-roster.ts';
|
|
40
|
+
// Re-exported so the composition site (input/handler.ts) reaches the picker and
|
|
41
|
+
// its hosted roster through ONE import — that file sits on this repo's 800-line
|
|
42
|
+
// per-file gate and a second import line there is a real cost.
|
|
43
|
+
export { getSharedHostedSessionRoster } from '../runtime/client/hosted-roster.ts';
|
|
44
|
+
|
|
45
|
+
/** What the picker needs of the hosted roster: the last answer, and a way to ask again. */
|
|
46
|
+
export interface SessionPickerHostedRoster {
|
|
47
|
+
snapshot(): HostedRosterSnapshot;
|
|
48
|
+
refresh(): Promise<void>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Honest default when no roster was wired: nothing has been read, and nothing is claimed. */
|
|
52
|
+
const UNREAD_HOSTED_ROSTER: HostedRosterSnapshot = { sessions: [], capturedAt: null, note: null };
|
|
28
53
|
|
|
29
54
|
// ---------------------------------------------------------------------------
|
|
30
55
|
// SessionPickerModal
|
|
@@ -51,12 +76,22 @@ export class SessionPickerModal {
|
|
|
51
76
|
public visibleRows = 8;
|
|
52
77
|
public deleteConfirmationTarget: string | null = null;
|
|
53
78
|
|
|
79
|
+
/** Daemon-hosted sessions (view-only) — see class doc. Never a fabricated empty list. */
|
|
80
|
+
public hostedRoster: HostedRosterSnapshot = UNREAD_HOSTED_ROSTER;
|
|
81
|
+
|
|
54
82
|
/** Last status message to show in the modal (e.g. error or success). */
|
|
55
83
|
public statusMessage = '';
|
|
56
84
|
|
|
57
85
|
public constructor(
|
|
58
86
|
private readonly sessionManager: SessionManager,
|
|
59
87
|
private readonly sessionBroker?: SessionReadFacade,
|
|
88
|
+
private readonly hostedRosterSource?: SessionPickerHostedRoster,
|
|
89
|
+
/**
|
|
90
|
+
* Called when a late roster refresh lands, so the frame the user is looking
|
|
91
|
+
* at picks it up. Without it the refresh still happens; it just shows on the
|
|
92
|
+
* next keystroke, which is what a modal with no render hook can honestly do.
|
|
93
|
+
*/
|
|
94
|
+
private readonly onRosterRefreshed?: () => void,
|
|
60
95
|
) {}
|
|
61
96
|
|
|
62
97
|
/**
|
|
@@ -72,6 +107,17 @@ export class SessionPickerModal {
|
|
|
72
107
|
this.crossSurfaceSessions = [];
|
|
73
108
|
this.crossSurfaceView = DORMANT_CROSS_SURFACE_VIEW;
|
|
74
109
|
}
|
|
110
|
+
// The roster's LAST answer renders immediately (a round trip must not delay
|
|
111
|
+
// the modal), and a refresh is asked for behind it. A refusal keeps the last
|
|
112
|
+
// rows and records why, so the section never silently empties.
|
|
113
|
+
this.hostedRoster = this.hostedRosterSource?.snapshot() ?? UNREAD_HOSTED_ROSTER;
|
|
114
|
+
if (this.hostedRosterSource) {
|
|
115
|
+
const source = this.hostedRosterSource;
|
|
116
|
+
void source.refresh().then(() => {
|
|
117
|
+
this.hostedRoster = source.snapshot();
|
|
118
|
+
this.onRosterRefreshed?.();
|
|
119
|
+
});
|
|
120
|
+
}
|
|
75
121
|
this.selectedIndex = 0;
|
|
76
122
|
this.scrollOffset = 0;
|
|
77
123
|
this.statusMessage = '';
|
|
@@ -16,7 +16,7 @@ import { buildMcpEntries, buildSubscriptionEntries } from './settings-modal-data
|
|
|
16
16
|
import { modelPickerLaunchForKey } from './settings-modal-behavior.ts';
|
|
17
17
|
import type { ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
|
|
18
18
|
import type { SubscriptionManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
19
|
-
import type { ServiceInspectionQuery } from '
|
|
19
|
+
import type { ServiceInspectionQuery } from '@/runtime/index.ts';
|
|
20
20
|
import type { ModelPickerTarget } from './model-picker.ts';
|
|
21
21
|
|
|
22
22
|
// ---------------------------------------------------------------------------
|
|
@@ -33,10 +33,10 @@ export function getNumericAdjustmentMeta(setting: ConfigSetting): {
|
|
|
33
33
|
if (setting.key === 'wrfc.scoreThreshold') {
|
|
34
34
|
return { step: 0.1, min: 0, max: 10, precision: 1 };
|
|
35
35
|
}
|
|
36
|
-
if (
|
|
37
|
-
// Speed multiplier
|
|
38
|
-
//
|
|
39
|
-
return { step: 0.1, min: 0.
|
|
36
|
+
if (setting.key === 'tts.speed') {
|
|
37
|
+
// Speed multiplier, 0.1 increments across the schema's own supported range
|
|
38
|
+
// (see the key's numRange in the SDK config schema).
|
|
39
|
+
return { step: 0.1, min: 0.25, max: 4, precision: 1 };
|
|
40
40
|
}
|
|
41
41
|
return { step: 1, precision: 0 };
|
|
42
42
|
}
|
|
@@ -19,6 +19,7 @@ import { buildMcpEntries } from './settings-modal-data.ts';
|
|
|
19
19
|
import { isWorktreeSetupListConfigKey, parseWorktreeSetupListInput } from './worktree-setup-config.ts';
|
|
20
20
|
import { isSandboxExecListConfigKey, parseSandboxExecListInput } from './sandbox-exec-config.ts';
|
|
21
21
|
import { isExecEnvScrubAllowlistConfigKey, parseExecEnvScrubAllowlistInput } from './exec-env-scrub-config.ts';
|
|
22
|
+
import type { SettingsDaemonCredentialWriter } from './settings-modal-secrets.ts';
|
|
22
23
|
import type { McpEntry, SettingEntry } from './settings-modal-types.ts';
|
|
23
24
|
|
|
24
25
|
export interface CommitEditContext {
|
|
@@ -27,6 +28,14 @@ export interface CommitEditContext {
|
|
|
27
28
|
readonly editBuffer: string;
|
|
28
29
|
readonly configManager: ConfigManager | null;
|
|
29
30
|
readonly secretsManager: SettingsSecretsManager | null;
|
|
31
|
+
/**
|
|
32
|
+
* The daemon's credential write, when a daemon is adopted. A daemon-scoped
|
|
33
|
+
* credential must land where the daemon reads it, not in this surface's own
|
|
34
|
+
* tree — see settings-modal-secrets.ts.
|
|
35
|
+
*/
|
|
36
|
+
readonly daemonCredentials?: SettingsDaemonCredentialWriter | null;
|
|
37
|
+
/** Renders a refused credential write; without it a failure would be silent. */
|
|
38
|
+
readonly reportError?: ((message: string) => void) | undefined;
|
|
30
39
|
readonly mcpRegistry: McpRegistry | null;
|
|
31
40
|
readonly mcpAllowAllConfirmationTarget: string | null;
|
|
32
41
|
getSelectedMcp(): McpEntry | null;
|
|
@@ -135,7 +144,9 @@ export function commitEditValue(ctx: CommitEditContext): boolean {
|
|
|
135
144
|
value: String(parsed ?? ''),
|
|
136
145
|
configManager: ctx.configManager,
|
|
137
146
|
secretsManager: ctx.secretsManager,
|
|
147
|
+
daemonCredentials: ctx.daemonCredentials ?? null,
|
|
138
148
|
setConfigValue: (key, value) => ctx.setValue(key, value),
|
|
149
|
+
...(ctx.reportError ? { onError: ctx.reportError } : {}),
|
|
139
150
|
});
|
|
140
151
|
} else {
|
|
141
152
|
ctx.setValue(setting.key as ConfigKey, parsed);
|
|
@@ -13,8 +13,8 @@ import type { FeatureFlagManager } from '@/runtime/index.ts';
|
|
|
13
13
|
import type { McpRegistry } from '@pellux/goodvibes-sdk/platform/mcp';
|
|
14
14
|
import { buildSubscriptionEntries } from './settings-modal-subscriptions.ts';
|
|
15
15
|
import type { SubscriptionManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
16
|
-
import type { ServiceInspectionQuery } from '
|
|
17
|
-
import { CODE_INDEX_ENABLED_CONFIG_KEY } from '
|
|
16
|
+
import type { ServiceInspectionQuery } from '@/runtime/index.ts';
|
|
17
|
+
import { CODE_INDEX_ENABLED_CONFIG_KEY } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
18
18
|
import {
|
|
19
19
|
WORKTREE_SETUP_CARRY_OVER_GLOBS_CONFIG_KEY,
|
|
20
20
|
WORKTREE_SETUP_COMMANDS_CONFIG_KEY,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
isWorktreeSetupListConfigKey,
|
|
24
24
|
readWorktreeSetupList,
|
|
25
25
|
} from './worktree-setup-config.ts';
|
|
26
|
-
import { BUDGET_ALERT_USD_CONFIG_KEY, BUDGET_ALERT_USD_DEFAULT, readBudgetAlertUsd } from '
|
|
26
|
+
import { BUDGET_ALERT_USD_CONFIG_KEY, BUDGET_ALERT_USD_DEFAULT, readBudgetAlertUsd } from '@pellux/goodvibes-sdk/platform/providers';
|
|
27
27
|
import { MEMORY_PROJECTION_DIR_CONFIG_KEY, buildMemoryProjectionDirSyntheticEntry } from './commands/recall-files-config.ts';
|
|
28
28
|
import { MEMORY_SHOW_PROVENANCE_CONFIG_KEY, buildMemoryProvenanceSyntheticEntry } from '../core/memory-provenance.ts';
|
|
29
29
|
import {
|
|
@@ -36,13 +36,6 @@ import {
|
|
|
36
36
|
isExecEnvScrubAllowlistConfigKey,
|
|
37
37
|
readExecEnvScrubAllowlist,
|
|
38
38
|
} from './exec-env-scrub-config.ts';
|
|
39
|
-
import {
|
|
40
|
-
THEME_MODE_CONFIG_KEY,
|
|
41
|
-
THEME_MODE_VALUES,
|
|
42
|
-
THEME_MODE_DEFAULT,
|
|
43
|
-
THEME_MODE_DESCRIPTION,
|
|
44
|
-
coerceThemeModeSetting,
|
|
45
|
-
} from '../renderer/theme-mode-config.ts';
|
|
46
39
|
import {
|
|
47
40
|
SETTINGS_CATEGORIES,
|
|
48
41
|
type FlagEntry,
|
|
@@ -54,7 +47,7 @@ import {
|
|
|
54
47
|
import { enrichRelaySettingDescriptions } from './relay-settings-descriptions.ts';
|
|
55
48
|
import { enrichDaemonOwnedSettingDescriptions } from './daemon-owned-settings-descriptions.ts';
|
|
56
49
|
import { applyFeatureUnitLayout } from './feature-unit-layout.ts';
|
|
57
|
-
import { FEATURE_SETTINGS_BY_ID } from '
|
|
50
|
+
import { FEATURE_SETTINGS_BY_ID } from '@pellux/goodvibes-terminal-shell';
|
|
58
51
|
import {
|
|
59
52
|
buildPaymentsSyntheticEntries,
|
|
60
53
|
isPaymentsSyntheticConfigKey,
|
|
@@ -145,12 +138,6 @@ export function buildSettingGroups(
|
|
|
145
138
|
if (rawCat === 'cluster' && groups.has('network')) groups.get('network')!.push(entry);
|
|
146
139
|
}
|
|
147
140
|
|
|
148
|
-
// Synthetic display.themeMode enum (auto|dark|light) — TUI-local, see theme-mode-config.ts.
|
|
149
|
-
const displayEntries = groups.get('display');
|
|
150
|
-
if (displayEntries && !displayEntries.some((e) => e.setting.key === (THEME_MODE_CONFIG_KEY as ConfigKey))) {
|
|
151
|
-
displayEntries.push(buildThemeModeSyntheticEntry(configManager));
|
|
152
|
-
}
|
|
153
|
-
|
|
154
141
|
const uiEntries = groups.get('ui');
|
|
155
142
|
if (uiEntries) {
|
|
156
143
|
const uiPriority: Record<string, number> = {
|
|
@@ -172,11 +159,6 @@ export function buildSettingGroups(
|
|
|
172
159
|
}
|
|
173
160
|
}
|
|
174
161
|
|
|
175
|
-
// Synthetic tts.speed (not yet an SDK ConfigKey) — surfaced with an honest caveat.
|
|
176
|
-
if (ttsEntries && !ttsEntries.some((e) => e.setting.key === ('tts.speed' as ConfigKey))) {
|
|
177
|
-
ttsEntries.push(buildTtsSpeedSyntheticEntry(configManager));
|
|
178
|
-
}
|
|
179
|
-
|
|
180
162
|
// Synthetic behavior.notifyAfterSeconds (TUI-local): long-task push threshold.
|
|
181
163
|
const behaviorEntries = groups.get('behavior');
|
|
182
164
|
if (behaviorEntries && !behaviorEntries.some((e) => e.setting.key === ('behavior.notifyAfterSeconds' as ConfigKey))) {
|
|
@@ -288,80 +270,6 @@ export function buildSettingGroups(
|
|
|
288
270
|
return groups;
|
|
289
271
|
}
|
|
290
272
|
|
|
291
|
-
// ---------------------------------------------------------------------------
|
|
292
|
-
// TTS_SPEED_DEFAULT — the pending-SDK default for tts.speed
|
|
293
|
-
// ---------------------------------------------------------------------------
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Pending default for tts.speed. Matches the value the SDK will use once
|
|
297
|
-
* the schema field is added: 1 (normal speed, provider default).
|
|
298
|
-
* Used for the synthetic settings-modal entry and isDefault comparisons.
|
|
299
|
-
*/
|
|
300
|
-
export const TTS_SPEED_DEFAULT = 1;
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* The synthetic ConfigSetting descriptor for tts.speed.
|
|
304
|
-
* `tts.speed` is not yet a ConfigKey in the SDK schema. This descriptor is
|
|
305
|
-
* TUI-local and is injected into the tts settings group so users can see
|
|
306
|
-
* and interact with the setting before the SDK schema catches up.
|
|
307
|
-
*
|
|
308
|
-
* The key is cast to ConfigKey because ConfigSetting requires it and the SDK
|
|
309
|
-
* will add this key in a future release. The cast is safe: configManager.get
|
|
310
|
-
* returns undefined for unknown keys rather than throwing.
|
|
311
|
-
*/
|
|
312
|
-
export const TTS_SPEED_SYNTHETIC_SETTING: ConfigSetting = {
|
|
313
|
-
key: 'tts.speed' as ConfigKey,
|
|
314
|
-
type: 'number',
|
|
315
|
-
default: TTS_SPEED_DEFAULT,
|
|
316
|
-
description: 'Playback speed multiplier passed to the TTS provider (1.0 = normal). Takes effect immediately via the TUI bridge; SDK schema registration is pending (native typing only).',
|
|
317
|
-
};
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Build the synthetic SettingEntry for tts.speed.
|
|
321
|
-
*
|
|
322
|
-
* Reads the raw value from configManager using a cast key (tts.speed is not
|
|
323
|
-
* yet a valid ConfigKey). If the value is absent or not a positive finite
|
|
324
|
-
* number, falls back to TTS_SPEED_DEFAULT and marks isDefault true.
|
|
325
|
-
*/
|
|
326
|
-
export function buildTtsSpeedSyntheticEntry(configManager: Pick<ConfigManager, 'get'>): SettingEntry {
|
|
327
|
-
const raw = configManager.get('tts.speed' as ConfigKey);
|
|
328
|
-
const parsed = typeof raw === 'number' ? raw : parseFloat(String(raw ?? ''));
|
|
329
|
-
const currentValue: number = isFinite(parsed) && parsed > 0 ? parsed : TTS_SPEED_DEFAULT;
|
|
330
|
-
return {
|
|
331
|
-
setting: TTS_SPEED_SYNTHETIC_SETTING,
|
|
332
|
-
currentValue,
|
|
333
|
-
isDefault: deepEqual(currentValue, TTS_SPEED_DEFAULT),
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
// ---------------------------------------------------------------------------
|
|
338
|
-
// display.themeMode synthetic setting (light theme)
|
|
339
|
-
// ---------------------------------------------------------------------------
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* The synthetic ConfigSetting descriptor for display.themeMode. TUI-local (not
|
|
343
|
-
* in the SDK ConfigKey union); the key is cast to ConfigKey as the other
|
|
344
|
-
* synthetic settings do. Stored under the existing `display` section so
|
|
345
|
-
* ConfigManager.setDynamic/get round-trip it with no SDK change.
|
|
346
|
-
*/
|
|
347
|
-
export const THEME_MODE_SYNTHETIC_SETTING: ConfigSetting = {
|
|
348
|
-
key: THEME_MODE_CONFIG_KEY as ConfigKey,
|
|
349
|
-
type: 'enum',
|
|
350
|
-
default: THEME_MODE_DEFAULT,
|
|
351
|
-
enumValues: [...THEME_MODE_VALUES],
|
|
352
|
-
description: THEME_MODE_DESCRIPTION,
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
/** Build the synthetic SettingEntry for display.themeMode. */
|
|
356
|
-
export function buildThemeModeSyntheticEntry(configManager: Pick<ConfigManager, 'get'>): SettingEntry {
|
|
357
|
-
const currentValue = coerceThemeModeSetting(configManager.get(THEME_MODE_CONFIG_KEY as ConfigKey));
|
|
358
|
-
return {
|
|
359
|
-
setting: THEME_MODE_SYNTHETIC_SETTING,
|
|
360
|
-
currentValue,
|
|
361
|
-
isDefault: currentValue === THEME_MODE_DEFAULT,
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
|
|
365
273
|
// ---------------------------------------------------------------------------
|
|
366
274
|
// behavior.notifyAfterSeconds synthetic setting
|
|
367
275
|
// ---------------------------------------------------------------------------
|
|
@@ -628,16 +536,6 @@ export function buildNetworkFilteredItems(
|
|
|
628
536
|
// refreshEntryValues — re-reads currentValue/isDefault for all loaded entries
|
|
629
537
|
// ---------------------------------------------------------------------------
|
|
630
538
|
|
|
631
|
-
/**
|
|
632
|
-
* Normalize a raw config value for the tts.speed synthetic entry.
|
|
633
|
-
* Returns the raw value if it is a positive finite number, otherwise falls
|
|
634
|
-
* back to TTS_SPEED_DEFAULT. Mirrors the logic in buildTtsSpeedSyntheticEntry.
|
|
635
|
-
*/
|
|
636
|
-
function normalizeTtsSpeedValue(raw: unknown): number {
|
|
637
|
-
const parsed = typeof raw === 'number' ? raw : parseFloat(String(raw ?? ''));
|
|
638
|
-
return isFinite(parsed) && parsed > 0 ? parsed : TTS_SPEED_DEFAULT;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
539
|
export function refreshEntryValues(
|
|
642
540
|
groups: Map<SettingsCategory, SettingEntry[]>,
|
|
643
541
|
configManager: ConfigManager,
|
|
@@ -683,16 +581,10 @@ export function refreshEntryValues(
|
|
|
683
581
|
continue;
|
|
684
582
|
}
|
|
685
583
|
const raw = configManager.get(entry.setting.key as ConfigKey);
|
|
686
|
-
// Synthetic entries
|
|
687
|
-
//
|
|
688
|
-
//
|
|
689
|
-
|
|
690
|
-
entry.currentValue = normalizeTtsSpeedValue(raw);
|
|
691
|
-
} else if (entry.setting.key === (THEME_MODE_CONFIG_KEY as ConfigKey)) {
|
|
692
|
-
entry.currentValue = coerceThemeModeSetting(raw);
|
|
693
|
-
} else {
|
|
694
|
-
entry.currentValue = raw;
|
|
695
|
-
}
|
|
584
|
+
// Synthetic entries that have no SDK schema key return undefined from
|
|
585
|
+
// configManager; the schema-driven entries above already normalize on
|
|
586
|
+
// their own read paths, so the raw value is used as-is here.
|
|
587
|
+
entry.currentValue = raw;
|
|
696
588
|
entry.isDefault = deepEqual(entry.currentValue, entry.setting.default);
|
|
697
589
|
}
|
|
698
590
|
}
|
|
@@ -735,12 +627,7 @@ export function updateEntryForKey(
|
|
|
735
627
|
continue;
|
|
736
628
|
}
|
|
737
629
|
const raw = configManager.get(key);
|
|
738
|
-
|
|
739
|
-
entry.currentValue = key === ('tts.speed' as ConfigKey)
|
|
740
|
-
? normalizeTtsSpeedValue(raw)
|
|
741
|
-
: key === (THEME_MODE_CONFIG_KEY as ConfigKey)
|
|
742
|
-
? coerceThemeModeSetting(raw)
|
|
743
|
-
: raw;
|
|
630
|
+
entry.currentValue = raw;
|
|
744
631
|
entry.isDefault = deepEqual(entry.currentValue, entry.setting.default);
|
|
745
632
|
}
|
|
746
633
|
}
|