@pellux/goodvibes-tui 1.27.0 → 2.0.1
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 +125 -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 +12 -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 +13 -80
- 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 +1 -1
- 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 +15 -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 -641
- 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 -58
- 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
|
@@ -6,11 +6,11 @@ import { fileURLToPath } from 'node:url';
|
|
|
6
6
|
import { PlatformServiceManager } from '@pellux/goodvibes-sdk/platform/daemon';
|
|
7
7
|
import type { ManagedServiceStatus } from '@pellux/goodvibes-sdk/platform/daemon';
|
|
8
8
|
import { resolveDaemonEnabled } from '@pellux/goodvibes-sdk/platform/config';
|
|
9
|
-
import type { ConfigManager } from '
|
|
10
|
-
import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from '
|
|
11
|
-
import type { RuntimeEndpointBinding, RuntimeEndpointId } from '
|
|
9
|
+
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
10
|
+
import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from '@pellux/goodvibes-terminal-shell';
|
|
11
|
+
import type { RuntimeEndpointBinding, RuntimeEndpointId } from '@pellux/goodvibes-terminal-shell';
|
|
12
12
|
import { classifyBindPosture, isNetworkFacing } from './network-posture.ts';
|
|
13
|
-
import { redactText } from '
|
|
13
|
+
import { redactText } from '@pellux/goodvibes-terminal-shell';
|
|
14
14
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
15
15
|
|
|
16
16
|
export interface CliServiceRuntime {
|
package/src/cli/status.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
2
2
|
import { resolveDaemonEnabled } from '@pellux/goodvibes-sdk/platform/config';
|
|
3
3
|
import type { OnboardingCheckMarkersState } from '../runtime/onboarding/index.ts';
|
|
4
|
-
import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from '
|
|
5
|
-
import type { RuntimeEndpointBinding, RuntimeEndpointId } from '
|
|
4
|
+
import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from '@pellux/goodvibes-terminal-shell';
|
|
5
|
+
import type { RuntimeEndpointBinding, RuntimeEndpointId } from '@pellux/goodvibes-terminal-shell';
|
|
6
6
|
import { classifyBindPosture, isNetworkFacing } from './network-posture.ts';
|
|
7
|
-
import type { GoodVibesCliOutputFormat } from '
|
|
7
|
+
import type { GoodVibesCliOutputFormat } from '@pellux/goodvibes-terminal-shell';
|
|
8
8
|
import type { CliServicePosture } from './service-posture.ts';
|
|
9
9
|
import type { InstallSelfCheckFinding } from '../runtime/install-self-check.ts';
|
|
10
|
-
import { getProviderIdFromModel } from '
|
|
10
|
+
import { getProviderIdFromModel } from '@pellux/goodvibes-sdk/platform/providers';
|
|
11
11
|
import { describeConfiguredEffort } from '../providers/reasoning-effort-surface.ts';
|
|
12
12
|
|
|
13
13
|
export interface CliStatusOptions {
|
|
@@ -228,10 +228,11 @@ function renderSandboxSection(sandbox: CliSandboxStatus | null): string[] {
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
/**
|
|
231
|
-
* The `Relay:` block — config + feature-flag gate only.
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
231
|
+
* The `Relay:` block — config + feature-flag gate only. The live registration
|
|
232
|
+
* state lives in the running daemon's memory and no verb exposes it, so no
|
|
233
|
+
* client reads it: this CLI reports the gate, and `/relay status` in the
|
|
234
|
+
* terminal app reports the same gate plus an honest "not readable here" for the
|
|
235
|
+
* live half. "active" means the gate that lets a running daemon register.
|
|
235
236
|
*/
|
|
236
237
|
function renderRelaySection(relay: CliRelayStatus | null): string[] {
|
|
237
238
|
if (!relay) return [];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { ConfigKey } from '
|
|
1
|
+
import type { ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
|
|
2
2
|
import {
|
|
3
3
|
GOODVIBES_NTFY_AGENT_TOPIC,
|
|
4
4
|
GOODVIBES_NTFY_CHAT_TOPIC,
|
|
5
5
|
GOODVIBES_NTFY_REMOTE_TOPIC,
|
|
6
6
|
resolveGoodVibesNtfyTopics,
|
|
7
7
|
} from '@pellux/goodvibes-sdk/platform/integrations';
|
|
8
|
-
import { enableFeatureFlags, getMissingSurfaceFeatureFlags, getServerSurfaceFeatureFlags, surfaceFeatureGateSettingsKeys } from '
|
|
9
|
-
import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from '
|
|
8
|
+
import { enableFeatureFlags, getMissingSurfaceFeatureFlags, getServerSurfaceFeatureFlags, surfaceFeatureGateSettingsKeys } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
9
|
+
import { formatRuntimeEndpointBinding, resolveRuntimeEndpointBinding } from '@pellux/goodvibes-terminal-shell';
|
|
10
10
|
import { classifyBindPosture, isNetworkFacing } from './network-posture.ts';
|
|
11
|
-
import type { CliCommandRuntime } from '
|
|
11
|
+
import type { CliCommandRuntime } from '@pellux/goodvibes-terminal-shell';
|
|
12
12
|
import {
|
|
13
13
|
applyTargetEndpointFlagsOrDefault,
|
|
14
14
|
enableEndpointLanDefault,
|
package/src/cli/tui-startup.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { CommandContext, CommandRegistry } from '../input/command-registry.ts';
|
|
2
2
|
import type { InputHandler } from '../input/handler.ts';
|
|
3
3
|
import type { SelectionItem } from '../input/selection-modal.ts';
|
|
4
|
-
import type { WorkspaceRegistrationManager } from '
|
|
4
|
+
import type { WorkspaceRegistrationManager } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
5
5
|
import { hasResumableWizardProgress, readOnboardingCheckMarker, readWizardProgress } from '../runtime/onboarding/index.ts';
|
|
6
6
|
import { startOnboardingFastPath } from '../runtime/onboarding/fast-path.ts';
|
|
7
7
|
import { checkRecoveryForSession, readLastSessionPointer, type SessionSurface } from '@/runtime/index.ts';
|
|
8
8
|
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
9
|
+
import { writeFatalLine } from '@pellux/goodvibes-sdk/platform/daemon';
|
|
9
10
|
import { offerRecoverySnapshot } from '../runtime/recovery-prompt.ts';
|
|
10
11
|
import { buildRecoveryOfferWiring } from '../runtime/recovery-offer-wiring.ts';
|
|
11
12
|
import type { ConversationManager } from '../core/conversation.ts';
|
|
12
13
|
import type { SessionManager } from '@pellux/goodvibes-sdk/platform/sessions';
|
|
13
|
-
import type { GoodVibesCliParseResult } from '
|
|
14
|
+
import type { GoodVibesCliParseResult } from '@pellux/goodvibes-terminal-shell';
|
|
14
15
|
|
|
15
16
|
export type TuiStartupShellPaths = Parameters<typeof readOnboardingCheckMarker>[0] & {
|
|
16
17
|
readonly workingDirectory: string;
|
|
@@ -309,7 +310,15 @@ export function reportFatalStartupError(err: unknown): void {
|
|
|
309
310
|
// Startup diagnostics must never hide the original launch failure.
|
|
310
311
|
}
|
|
311
312
|
try {
|
|
312
|
-
process.stderr.write
|
|
313
|
+
// writeFatalLine, not process.stderr.write: this repository replaces
|
|
314
|
+
// process.stderr to keep the rendered screen clean
|
|
315
|
+
// (runtime/terminal-output-guard.ts), so a replaced writer that records
|
|
316
|
+
// instead of printing would swallow the one line explaining why the screen
|
|
317
|
+
// is blank — and a stream write issued immediately before the exit below
|
|
318
|
+
// can still be in flight when the process stops existing. The descriptor
|
|
319
|
+
// write is neither interceptable nor droppable. See
|
|
320
|
+
// daemon/fatal-boot-report.ts.
|
|
321
|
+
writeFatalLine(`goodvibes failed to start: ${message}${stack ? `\n${stack}` : ''}`);
|
|
313
322
|
} catch {
|
|
314
323
|
// Ignore secondary stderr failures during process teardown.
|
|
315
324
|
}
|
package/src/cli-flags.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Compatibility wrapper for older imports. New CLI code lives in src/cli.
|
|
2
|
-
export type { GoodVibesCliFlags as CliFlags } from '
|
|
2
|
+
export type { GoodVibesCliFlags as CliFlags } from '@pellux/goodvibes-terminal-shell';
|
|
3
3
|
export {
|
|
4
4
|
applyRuntimeConfigDefault,
|
|
5
5
|
applyRuntimeConfigOverrides,
|
|
@@ -14,8 +14,8 @@ export {
|
|
|
14
14
|
renderGoodVibesVersion,
|
|
15
15
|
} from './cli/index.ts';
|
|
16
16
|
|
|
17
|
-
import { parseGoodVibesCli } from '
|
|
18
|
-
import type { GoodVibesCliFlags } from '
|
|
17
|
+
import { parseGoodVibesCli } from '@pellux/goodvibes-terminal-shell';
|
|
18
|
+
import type { GoodVibesCliFlags } from '@pellux/goodvibes-terminal-shell';
|
|
19
19
|
|
|
20
20
|
export function parseCliFlags(argv: readonly string[], binary = 'goodvibes'): GoodVibesCliFlags {
|
|
21
21
|
return parseGoodVibesCli(argv, binary).flags;
|
|
@@ -117,8 +117,6 @@ const KNOWN_DYNAMIC_KEYS = [
|
|
|
117
117
|
/^featureFlags(?:\.|$)/,
|
|
118
118
|
/^notifications\.webhookUrls$/,
|
|
119
119
|
/^wrfc\.gates$/,
|
|
120
|
-
// TUI-bridged setting awaiting SDK schema registration (handoff Item 5b)
|
|
121
|
-
/^tts\.speed$/,
|
|
122
120
|
];
|
|
123
121
|
|
|
124
122
|
export const GOODVIBES_ALLOWED_WRITE_ROOTS = ['tui/', 'daemon/'] as const;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isSecretRefInput, isDaemonOwnedConfigKey } from '@pellux/goodvibes-sdk/platform/config';
|
|
2
|
-
import type { ConfigKey } from '
|
|
2
|
+
import type { ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
|
|
3
3
|
import type { SecretScope, SecretStorageMedium } from './secrets.ts';
|
|
4
4
|
|
|
5
5
|
export const SECRET_CONFIG_KEYS = new Set<ConfigKey>([
|
|
@@ -43,9 +43,9 @@ export const SECRET_CONFIG_KEYS = new Set<ConfigKey>([
|
|
|
43
43
|
'surfaces.mattermost.botToken',
|
|
44
44
|
'surfaces.matrix.accessToken',
|
|
45
45
|
// TUI-local synthetic sub-keys, one level under the SDK's real `payments`
|
|
46
|
-
// section (not
|
|
47
|
-
//
|
|
48
|
-
// hence the cast. See input/payments-config.ts for why these are named flat
|
|
46
|
+
// section (not a scalar CONFIG_SCHEMA entry — same situation as
|
|
47
|
+
// behavior.notifyAfterSeconds and the other synthetics in
|
|
48
|
+
// settings-modal-data.ts), hence the cast. See input/payments-config.ts for why these are named flat
|
|
49
49
|
// (payments.cardNumber, not payments.card.number): a flat one-level leaf is
|
|
50
50
|
// the shape the real ConfigManager tolerates for an undeclared key.
|
|
51
51
|
'payments.cardNumber' as ConfigKey,
|
|
@@ -147,15 +147,47 @@ export function defaultSecretBackedScope(configKey: ConfigKey): SecretScope {
|
|
|
147
147
|
return isDaemonOwnedConfigKey(configKey) ? 'daemon' : 'user';
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
/**
|
|
151
|
+
* How a DAEMON-scoped credential reaches the daemon that will use it.
|
|
152
|
+
*
|
|
153
|
+
* One call, not two: `credentials.set` derives the store key, writes the value,
|
|
154
|
+
* reads it back to verify, and only then points the config key at it. Doing
|
|
155
|
+
* those halves separately from here would leave a window where the config
|
|
156
|
+
* names a reference that resolves to nothing — which every reader treats as a
|
|
157
|
+
* configured-but-broken credential.
|
|
158
|
+
*/
|
|
159
|
+
export interface DaemonCredentialWriter {
|
|
160
|
+
set(configKey: string, value: string): Promise<unknown>;
|
|
161
|
+
clear(configKey: string): Promise<void>;
|
|
162
|
+
}
|
|
163
|
+
|
|
150
164
|
export async function persistSecretBackedConfigValue(
|
|
151
165
|
configManager: SecretBackedConfigManager,
|
|
152
166
|
secretsManager: SecretBackedSecretStore | null | undefined,
|
|
153
167
|
configKey: ConfigKey,
|
|
154
168
|
rawValue: string,
|
|
155
|
-
options: { readonly scope?: SecretScope } = {},
|
|
169
|
+
options: { readonly scope?: SecretScope; readonly daemonWriter?: DaemonCredentialWriter | null | undefined } = {},
|
|
156
170
|
): Promise<string> {
|
|
157
171
|
const update = buildSecretBackedConfigUpdate(configKey, rawValue);
|
|
158
172
|
const scope = options.scope ?? defaultSecretBackedScope(configKey);
|
|
173
|
+
|
|
174
|
+
// A daemon-scoped credential is the daemon's to store, and the daemon does
|
|
175
|
+
// the whole reference-and-value sequence atomically. This surface neither
|
|
176
|
+
// writes the config key nor the secret in that case — it would be writing
|
|
177
|
+
// both into a tree the daemon never reads.
|
|
178
|
+
if (scope === 'daemon' && options.daemonWriter) {
|
|
179
|
+
const trimmed = rawValue.trim();
|
|
180
|
+
if (trimmed.length === 0) {
|
|
181
|
+
await options.daemonWriter.clear(configKey);
|
|
182
|
+
return '';
|
|
183
|
+
}
|
|
184
|
+
// Already a reference: the caller pasted one rather than a secret, so there
|
|
185
|
+
// is nothing to store — the config value is the whole write.
|
|
186
|
+
if (isSecretReferenceValue(trimmed)) return trimmed;
|
|
187
|
+
await options.daemonWriter.set(configKey, rawValue);
|
|
188
|
+
return update.configValue;
|
|
189
|
+
}
|
|
190
|
+
|
|
159
191
|
const medium = getSecretWriteMedium(configManager.get('storage.secretPolicy'));
|
|
160
192
|
|
|
161
193
|
// 1. Validate config write first. If setDynamic throws, no secret is written (avoids orphans).
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* owned by their real consumer instead of being duplicated in the TUI.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import type { ConfigManager } from '
|
|
20
|
+
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
21
21
|
|
|
22
22
|
type RawRecord = Record<string, unknown>;
|
|
23
23
|
|
|
@@ -22,8 +22,8 @@ import { notifyCompletion } from '@pellux/goodvibes-sdk/platform/utils';
|
|
|
22
22
|
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
23
23
|
import type { WebhookNotifier } from '@pellux/goodvibes-sdk/platform/integrations';
|
|
24
24
|
import type { PermissionRequestHandler, PermissionPromptRequest } from '@pellux/goodvibes-sdk/platform/permissions';
|
|
25
|
-
import type { FocusTracker } from '
|
|
26
|
-
import { shouldFireAlert, FORCE_NOTIFY_DURATION_MS, type ConfigGet } from '
|
|
25
|
+
import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
26
|
+
import { shouldFireAlert, FORCE_NOTIFY_DURATION_MS, type ConfigGet } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
27
27
|
import type { TerminalNotifier } from './terminal-notifier.ts';
|
|
28
28
|
|
|
29
29
|
export interface ApprovalAlertDeps {
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
import { notifyCompletion } from '@pellux/goodvibes-sdk/platform/utils';
|
|
23
23
|
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
24
24
|
import type { WebhookNotifier } from '@pellux/goodvibes-sdk/platform/integrations';
|
|
25
|
-
import { calcSessionCost, computeBudgetBreach, isModelPriced } from '
|
|
26
|
-
import type { FocusTracker } from '
|
|
27
|
-
import { shouldFireAlert, FORCE_NOTIFY_DURATION_MS, type ConfigGet } from '
|
|
25
|
+
import { calcSessionCost, computeBudgetBreach, isModelPriced } from '@pellux/goodvibes-sdk/platform/providers';
|
|
26
|
+
import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
27
|
+
import { shouldFireAlert, FORCE_NOTIFY_DURATION_MS, type ConfigGet } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
28
28
|
|
|
29
29
|
export interface BudgetBreachUsageSnapshot {
|
|
30
30
|
readonly input: number;
|
|
@@ -11,7 +11,7 @@ import { activeTheme } from '../renderer/theme.ts';
|
|
|
11
11
|
import { renderMarkdownTracked } from '../renderer/markdown.ts';
|
|
12
12
|
import { renderConversationCollapsedFragment, renderConversationEventLine } from '../renderer/conversation-surface.ts';
|
|
13
13
|
import { GLYPHS } from '../renderer/ui-primitives.ts';
|
|
14
|
-
import type { Line } from '
|
|
14
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
15
15
|
import type { BlockMeta } from './conversation-types.ts';
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* are replayed at the same buffer offsets a cold render would have produced.
|
|
46
46
|
*/
|
|
47
47
|
|
|
48
|
-
import { createEmptyLine, type Line } from '
|
|
48
|
+
import { createEmptyLine, type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
49
49
|
import type { BlockMeta } from './conversation-types.ts';
|
|
50
50
|
import type { ConversationRenderContext } from './conversation-rendering.ts';
|
|
51
51
|
import {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* type-only, which is what makes this a leaf of the import graph.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type { Line } from '
|
|
11
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
12
12
|
import type { BlockMeta } from './conversation-types.ts';
|
|
13
13
|
import type { AssistantTurnMembership } from './conversation-turn-structure.ts';
|
|
14
14
|
import type { SplashOptions } from '../utils/splash-lines.ts';
|
|
@@ -7,7 +7,7 @@ import { summarizeToolResult } from '../renderer/tool-result-summary.ts';
|
|
|
7
7
|
import type { ToolCall } from '@pellux/goodvibes-sdk/platform/types';
|
|
8
8
|
import { renderThinkingBlock } from '../renderer/thinking.ts';
|
|
9
9
|
import { renderSystemMessage } from '../renderer/system-message.ts';
|
|
10
|
-
import { createEmptyLine, type Line, type Cell } from '
|
|
10
|
+
import { createEmptyLine, type Line, type Cell } from '@pellux/goodvibes-sdk/platform/types';
|
|
11
11
|
import { getSplashLines, type SplashOptions } from '../utils/splash-lines.ts';
|
|
12
12
|
import { interpolateColor, getDisplayWidth, wrapText } from '../utils/terminal-width.ts';
|
|
13
13
|
import { LAYOUT, TOOL_STATUS } from '../renderer/layout.ts';
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
type ConversationRenderContext,
|
|
22
22
|
} from './conversation-render-context.ts';
|
|
23
23
|
import { renderCompactionContinuationMessage } from './conversation-compaction-render.ts';
|
|
24
|
-
import { drawTreeRails, treeIndentCols, treeTextCol } from '
|
|
24
|
+
import { drawTreeRails, treeIndentCols, treeTextCol } from '@pellux/goodvibes-terminal-shell';
|
|
25
25
|
import {
|
|
26
26
|
MAX_NEST_DEPTH,
|
|
27
27
|
buildRenderPlan,
|
package/src/core/conversation.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InfiniteBuffer } from '
|
|
2
|
-
import { createEmptyLine, type Line, type Cell } from '
|
|
1
|
+
import { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
|
|
2
|
+
import { createEmptyLine, type Line, type Cell } from '@pellux/goodvibes-sdk/platform/types';
|
|
3
3
|
import type { SplashOptions } from '../utils/splash-lines.ts';
|
|
4
4
|
import type { ToolCall, ToolResult } from '@pellux/goodvibes-sdk/platform/types';
|
|
5
5
|
import type { ProviderMessage, ContentPart } from '@pellux/goodvibes-sdk/platform/providers';
|
|
@@ -53,14 +53,14 @@ export type { BlockMeta };
|
|
|
53
53
|
import type { ConversationMessageSnapshot } from '@pellux/goodvibes-sdk/platform/core';
|
|
54
54
|
type Message = ConversationMessageSnapshot;
|
|
55
55
|
|
|
56
|
-
/**
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
56
|
+
/**
|
|
57
|
+
* `Orchestrator.usage`'s own type, re-exported under the name this module's
|
|
58
|
+
* callers already use. It was four fields written out here, because the shape
|
|
59
|
+
* was an inferred object literal on the class with no name to import; it has
|
|
60
|
+
* one now.
|
|
61
|
+
*/
|
|
62
|
+
import type { OrchestratorUsageTotals } from '@pellux/goodvibes-sdk/platform/core';
|
|
63
|
+
export type { OrchestratorUsageTotals };
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* sumConversationUsage - Fold every assistant message's per-turn usage into
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
import { notifyCompletion } from '@pellux/goodvibes-sdk/platform/utils';
|
|
32
32
|
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
33
33
|
import type { WebhookNotifier } from '@pellux/goodvibes-sdk/platform/integrations';
|
|
34
|
-
import type { FocusTracker } from '
|
|
35
|
-
import { readNotifyOnlyWhenUnfocused, type ConfigGet } from '
|
|
34
|
+
import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
35
|
+
import { readNotifyOnlyWhenUnfocused, type ConfigGet } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
36
36
|
|
|
37
37
|
/** Default threshold in seconds. Turns shorter than this do not notify. */
|
|
38
38
|
export const NOTIFY_AFTER_SECONDS_DEFAULT = 60;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
20
20
|
import { GoodVibesSdkError } from '@pellux/goodvibes-sdk';
|
|
21
21
|
import { resolveOperatorRpc, describeOperatorRpcError } from '../input/commands/operator-rpc.ts';
|
|
22
|
-
import { memoryStatusLines, type MemoryGovernorSnapshotResult } from '
|
|
22
|
+
import { memoryStatusLines, type MemoryGovernorSnapshotResult } from '@pellux/goodvibes-sdk/platform/runtime/memory';
|
|
23
23
|
|
|
24
24
|
/** The narrow async verb surface the /health memory (doctor) surface drives. */
|
|
25
25
|
export interface MemoryDiagnosticsGateway {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* status area does not show stale text.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type { ConfigManager } from '
|
|
17
|
+
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
18
18
|
import { readStatuslineSettings, STATUSLINE_DEFAULT_TIMEOUT_MS, type StatuslineSettings } from '../config/tui-extension-settings.ts';
|
|
19
19
|
|
|
20
20
|
/** Runs the shell command and resolves its raw stdout, or throws on failure/timeout. */
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type { ConversationMessageSnapshot } from '@pellux/goodvibes-sdk/platform/core';
|
|
12
|
-
import type { ConfigManager } from '
|
|
12
|
+
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
13
13
|
import { readSessionSettings } from '../config/tui-extension-settings.ts';
|
|
14
14
|
|
|
15
15
|
/** Minimal conversation surface the titler needs. */
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
import type { SessionManager, SessionMeta } from '@pellux/goodvibes-sdk/platform/sessions';
|
|
30
30
|
import type { SessionSurface } from '@/runtime/index.ts';
|
|
31
31
|
import type { ConversationManager } from './conversation.ts';
|
|
32
|
-
import { restoreTurnAnchors } from '
|
|
33
|
-
import { replayJournalForSession, type ReplayIntoConversationResult } from '
|
|
32
|
+
import { restoreTurnAnchors } from '@pellux/goodvibes-sdk/platform/rewind';
|
|
33
|
+
import { replayJournalForSession, type ReplayIntoConversationResult } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
34
34
|
|
|
35
35
|
export interface SessionResumeRuntime {
|
|
36
36
|
sessionId: string;
|
|
@@ -53,11 +53,11 @@ export interface StreamMetrics {
|
|
|
53
53
|
*/
|
|
54
54
|
stallEpisode: number;
|
|
55
55
|
/**
|
|
56
|
-
* Populated from the SDK's STREAM_RETRY event
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
56
|
+
* Populated from the SDK's STREAM_RETRY event, which fires when an in-flight
|
|
57
|
+
* provider call reconnects after a transport error rather than failing the
|
|
58
|
+
* turn. Read structurally off the event feed (see looseTurnsFeed below), so a
|
|
59
|
+
* turn that never retries simply leaves these undefined. Cleared on
|
|
60
|
+
* STREAM_DELTA — a byte arriving means the reconnect succeeded.
|
|
61
61
|
*/
|
|
62
62
|
reconnectAttempt: number | undefined;
|
|
63
63
|
reconnectMaxAttempts: number | undefined;
|
|
@@ -133,31 +133,16 @@ interface StreamSystemMessageRouter {
|
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
135
|
* Loosely-typed variant of the turns event feed, used only to subscribe to
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
136
|
+
* STREAM_STALL — a proposed event the SDK's TurnEvent union does not carry, so
|
|
137
|
+
* `events.turns.on` rejects the name at compile time. See the subscription site
|
|
138
|
+
* below. `events.turns.on` stays fully typed against the real union everywhere
|
|
139
|
+
* else in this file, STREAM_RETRY included.
|
|
140
140
|
*/
|
|
141
141
|
interface LooseTurnEventFeed {
|
|
142
142
|
on(type: string, listener: (payload: unknown) => void): () => void;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
/** Payload shape expected from a future SDK STREAM_RETRY event. */
|
|
146
|
-
interface StreamRetryLikePayload {
|
|
147
|
-
readonly attempt: number;
|
|
148
|
-
readonly maxAttempts: number;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
145
|
/** Runtime guard validating an unknown STREAM_RETRY-like payload's shape. */
|
|
152
|
-
function isStreamRetryLikePayload(payload: unknown): payload is StreamRetryLikePayload {
|
|
153
|
-
return (
|
|
154
|
-
typeof payload === 'object' &&
|
|
155
|
-
payload !== null &&
|
|
156
|
-
typeof (payload as Record<string, unknown>).attempt === 'number' &&
|
|
157
|
-
typeof (payload as Record<string, unknown>).maxAttempts === 'number'
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
146
|
/**
|
|
162
147
|
* Minimal cost lookup surface for attaching cost-delta information to failover notices.
|
|
163
148
|
* Returns USD-per-1M-token pricing for the given model ID, or null when the
|
|
@@ -708,29 +693,24 @@ export function wireStreamEventMetrics(
|
|
|
708
693
|
});
|
|
709
694
|
unsubs.push(() => stallWatchdog.dispose());
|
|
710
695
|
|
|
711
|
-
//
|
|
712
|
-
//
|
|
713
|
-
//
|
|
714
|
-
//
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
// used elsewhere in this codebase for settings pending SDK schema additions
|
|
719
|
-
// (see src/input/settings-modal-data.ts). Compiles today against 0.35.0;
|
|
720
|
-
// lights up automatically once the SDK adds the real event.
|
|
721
|
-
const looseTurnsFeed = events.turns as unknown as LooseTurnEventFeed;
|
|
722
|
-
unsubs.push(looseTurnsFeed.on('STREAM_RETRY', (payload) => {
|
|
723
|
-
if (!isStreamRetryLikePayload(payload)) return;
|
|
724
|
-
metrics.reconnectAttempt = payload.attempt;
|
|
725
|
-
metrics.reconnectMaxAttempts = payload.maxAttempts;
|
|
696
|
+
// A provider call that reconnected mid-stream rather than failing the turn.
|
|
697
|
+
// The attempt counter rides into the thinking fragment so a long silence
|
|
698
|
+
// reads as "retrying 2/3" instead of as a hang; STREAM_DELTA clears it,
|
|
699
|
+
// because a byte arriving means the reconnect worked.
|
|
700
|
+
unsubs.push(events.turns.on('STREAM_RETRY', (event) => {
|
|
701
|
+
metrics.reconnectAttempt = event.attempt;
|
|
702
|
+
metrics.reconnectMaxAttempts = event.maxAttempts;
|
|
726
703
|
render();
|
|
727
704
|
}));
|
|
705
|
+
// STREAM_STALL is a proposed SDK event and is not on the TurnEvent union, so
|
|
706
|
+
// the typed feed rejects the name at compile time. Subscribing through the
|
|
707
|
+
// loose variant means the SDK's own signal is observed the day it lands
|
|
708
|
+
// rather than silently dropped. Informational only: the local
|
|
709
|
+
// createStreamStallWatchdog above is the authoritative no-delta detector and
|
|
710
|
+
// already drives the visible indicator via streamMetrics.stallEpisode, so
|
|
711
|
+
// this repaints and does not duplicate or fight it.
|
|
712
|
+
const looseTurnsFeed = events.turns as unknown as LooseTurnEventFeed;
|
|
728
713
|
unsubs.push(looseTurnsFeed.on('STREAM_STALL', () => {
|
|
729
|
-
// Informational only: the TUI's own createStreamStallWatchdog above is
|
|
730
|
-
// the authoritative no-delta detector and already drives the visible
|
|
731
|
-
// indicator via streamMetrics.stallEpisode. This subscription exists so
|
|
732
|
-
// the SDK's own signal (once it lands) is observed rather than silently
|
|
733
|
-
// dropped, without duplicating or fighting the local watchdog.
|
|
734
714
|
render();
|
|
735
715
|
}));
|
|
736
716
|
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
* positioning is involved, so an OSC 9 emitted between frames is safe.
|
|
28
28
|
*/
|
|
29
29
|
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
30
|
-
import { allowTerminalWrite } from '
|
|
31
|
-
import { readBooleanConfig, type ConfigGet } from '
|
|
32
|
-
import type { FocusTracker } from '
|
|
30
|
+
import { allowTerminalWrite } from '@pellux/goodvibes-terminal-shell/terminal-output-guard';
|
|
31
|
+
import { readBooleanConfig, type ConfigGet } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
32
|
+
import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
33
33
|
|
|
34
34
|
export type TerminalNotifySignal = 'approval-wait' | 'turn-end' | 'agent-blocked';
|
|
35
35
|
|
|
@@ -2,20 +2,20 @@ import type { UiRuntimeEvents, RuntimeEventBus } from '@/runtime/index.ts';
|
|
|
2
2
|
import { buildPersistedSessionContext, persistConversation } from '@/runtime/index.ts';
|
|
3
3
|
import { buildCompactionReceiptBlock } from './compaction-receipt.ts';
|
|
4
4
|
import { workstreamFailureNotification } from './workstream-notification.ts';
|
|
5
|
-
import { persistTurnAnchors, recordTurnAnchor, summarizeTurnLabel } from '
|
|
5
|
+
import { persistTurnAnchors, recordTurnAnchor, summarizeTurnLabel } from '@pellux/goodvibes-sdk/platform/rewind';
|
|
6
6
|
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
7
7
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
8
8
|
import type { HookDispatcher, HookPhase, HookCategory, HookEventPath } from '@pellux/goodvibes-sdk/platform/hooks';
|
|
9
9
|
import type { ConversationManager } from './conversation.ts';
|
|
10
10
|
import type { SessionSurface } from '@/runtime/index.ts';
|
|
11
|
-
import { journalPathFor, openTranscriptJournal, type TranscriptJournal } from '
|
|
11
|
+
import { journalPathFor, openTranscriptJournal, type TranscriptJournal } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
12
12
|
import type { WebhookNotifier } from '@pellux/goodvibes-sdk/platform/integrations';
|
|
13
13
|
import { notifyCompletion } from '@pellux/goodvibes-sdk/platform/utils';
|
|
14
14
|
import { maybeNotifyLongTask, readNotifyAfterSeconds, type LongTaskStatus } from './long-task-notifier.ts';
|
|
15
|
-
import type { FocusTracker } from '
|
|
16
|
-
import { shouldFireAlert, FORCE_NOTIFY_DURATION_MS } from '
|
|
15
|
+
import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
16
|
+
import { shouldFireAlert, FORCE_NOTIFY_DURATION_MS } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
17
17
|
import { createBudgetBreachNotifier, type BudgetBreachNotifier } from './budget-breach-notifier.ts';
|
|
18
|
-
import { readBudgetAlertUsd } from '
|
|
18
|
+
import { readBudgetAlertUsd } from '@pellux/goodvibes-sdk/platform/providers';
|
|
19
19
|
|
|
20
20
|
/** Minimal orchestrator surface required by turn-event wiring. */
|
|
21
21
|
interface TurnOrchestrator {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { McpRegistry } from '@pellux/goodvibes-sdk/platform/mcp';
|
|
2
2
|
import type { ProviderRegistry } from '@pellux/goodvibes-sdk/platform/providers';
|
|
3
3
|
import type { ConversationManager } from '../core/conversation';
|
|
4
|
-
import type { ConfigManager } from '
|
|
5
|
-
import type { DeepReadonly, GoodVibesConfig } from '
|
|
4
|
+
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
5
|
+
import type { DeepReadonly, GoodVibesConfig } from '@pellux/goodvibes-sdk/platform/config';
|
|
6
6
|
import type { ToolRegistry } from '@pellux/goodvibes-sdk/platform/tools';
|
|
7
7
|
import type { PermissionRequestHandler } from '@pellux/goodvibes-sdk/platform/permissions';
|
|
8
8
|
import type { SelectionItem, SelectionResult, SelectionAction } from './selection-modal.ts';
|
|
@@ -266,7 +266,7 @@ export interface CommandSessionServices {
|
|
|
266
266
|
*/
|
|
267
267
|
readonly hydrateSessionUsage?: () => void;
|
|
268
268
|
/** The orchestration engine's command-facing facade — see runtime/workstream-services.ts. */
|
|
269
|
-
readonly workstreamEngine?: import('
|
|
269
|
+
readonly workstreamEngine?: import('@pellux/goodvibes-sdk/platform/orchestration').WorkstreamCommandService;
|
|
270
270
|
/** The repo source-tree code index — see runtime/code-index-services.ts. */
|
|
271
271
|
readonly codeIndexStore?: import('@pellux/goodvibes-sdk/platform/state').CodeIndexStore;
|
|
272
272
|
/** Tool-site reindex scheduler — `/codebase status` reports its last activity. */
|
|
@@ -308,14 +308,14 @@ export interface CommandWorkspaceUiServices {
|
|
|
308
308
|
workspaceCheckpointManager?: WorkspaceCheckpointManager;
|
|
309
309
|
/** In-process gateway catalog — the /review hunk-revert flow invokes checkpoints.revertHunk(Preview) over it. */
|
|
310
310
|
gatewayMethods?: GatewayMethodCatalog;
|
|
311
|
-
workspaceTrustManager?: import('
|
|
312
|
-
workspaceRegistrationManager?: import('
|
|
311
|
+
workspaceTrustManager?: import('@pellux/goodvibes-sdk/platform/runtime/operations').WorkspaceTrustManager;
|
|
312
|
+
workspaceRegistrationManager?: import('@pellux/goodvibes-sdk/platform/runtime/operations').WorkspaceRegistrationManager;
|
|
313
313
|
panelManager?: PanelManager;
|
|
314
314
|
profileManager?: import('@pellux/goodvibes-sdk/platform/profiles').ProfileManager;
|
|
315
315
|
bookmarkManager?: import('@pellux/goodvibes-sdk/platform/bookmarks').BookmarkManager;
|
|
316
316
|
projectPlanningService?: import('@pellux/goodvibes-sdk/platform/knowledge').ProjectPlanningService;
|
|
317
317
|
projectPlanningProjectId?: string;
|
|
318
|
-
workPlanStore?: import('
|
|
318
|
+
workPlanStore?: import('@pellux/goodvibes-sdk/platform/workflow').WorkPlanStore;
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
export interface CommandWorkspaceServices
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { getBuiltinSetupSchema } from '@pellux/goodvibes-sdk/platform/channels';
|
|
21
21
|
import type { ChannelSetupFieldDescriptor, ChannelSetupSchema, ChannelSurface } from '@pellux/goodvibes-sdk/platform/channels';
|
|
22
22
|
import type { CommandContext } from '../command-registry.ts';
|
|
23
|
-
import type { ConfigManager, ConfigKey } from '
|
|
23
|
+
import type { ConfigManager, ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
|
|
24
24
|
import { persistSecretBackedConfigValue } from '../../config/secret-config.ts';
|
|
25
25
|
import { describeOperatorRpcError, getOperatorRpc } from './operator-rpc.ts';
|
|
26
26
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* shared caller already reports for any non-interactive invocation.
|
|
13
13
|
*/
|
|
14
14
|
import { resolveDaemonHomeDir } from '@pellux/goodvibes-sdk/platform/workspace';
|
|
15
|
-
import { runClusterCommand, CLUSTER_SUBCOMMANDS } from '
|
|
15
|
+
import { runClusterCommand, CLUSTER_SUBCOMMANDS } from '@pellux/goodvibes-terminal-shell';
|
|
16
16
|
import type { CommandRegistry } from '../command-registry.ts';
|
|
17
17
|
|
|
18
18
|
/** Subcommand → argument hint, surfaced as the operator types. */
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
import type { CodeIndexStats, CodeContextResult, CodeIndexReindexActivity } from '@pellux/goodvibes-sdk/platform/state';
|
|
23
23
|
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
24
|
-
import { isCodeIndexAutoStartEnabled, CODE_INDEX_MAX_FILES, CODE_INDEX_MAX_FILE_BYTES, CODE_INDEX_MAX_TOTAL_BYTES } from '
|
|
24
|
+
import { isCodeIndexAutoStartEnabled, CODE_INDEX_MAX_FILES, CODE_INDEX_MAX_FILE_BYTES, CODE_INDEX_MAX_TOTAL_BYTES } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
25
25
|
import type { CommandContext, CommandRegistry } from '../command-registry.ts';
|
|
26
26
|
|
|
27
27
|
// ---------------------------------------------------------------------------
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CommandContext, CommandRegistry } from '../command-registry.ts';
|
|
2
|
-
import { formatDeviceLine, resolveTokenByIdPrefix } from '
|
|
2
|
+
import { formatDeviceLine, resolveTokenByIdPrefix } from '@pellux/goodvibes-sdk/platform/pairing';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Register the /devices command — manage the per-device pairing tokens minted by
|