@pellux/goodvibes-tui 2.0.13 → 2.0.15
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/.goodvibes/GOODVIBES.md +1 -1
- package/.goodvibes/agents/reviewer.md +8 -8
- package/.goodvibes/skills/add-provider/SKILL.md +22 -22
- package/CHANGELOG.md +61 -0
- package/README.md +40 -29
- package/docs/README.md +1 -1
- package/docs/foundation-artifacts/README.md +5 -5
- package/docs/foundation-artifacts/operator-contract.json +123 -123
- package/package.json +12 -10
- package/scripts/postinstall.js +3 -3
- package/src/audio/activation-sound.ts +7 -7
- package/src/audio/capture.ts +7 -7
- package/src/audio/onnxruntime-assets.d.ts +1 -1
- package/src/audio/player.ts +4 -4
- package/src/audio/spoken-turn-wiring.ts +4 -4
- package/src/audio/voice-capture-wiring.ts +5 -5
- package/src/audio/voice-input-session.ts +3 -3
- package/src/audio/wake-inference.ts +13 -8
- package/src/audio/wake-runtime.ts +10 -10
- package/src/cli/completions/generate.ts +2 -2
- package/src/cli/doctor.ts +13 -13
- package/src/cli/ensure-goodvibes-gitignore.ts +3 -3
- package/src/cli/entrypoint.ts +3 -3
- package/src/cli/help.ts +6 -6
- package/src/cli/hooks-command.ts +4 -4
- package/src/cli/hooks-report.ts +4 -4
- package/src/cli/launch-auto-update.ts +17 -17
- package/src/cli/management-commands.ts +8 -8
- package/src/cli/management-utils.ts +3 -3
- package/src/cli/management.ts +1 -1
- package/src/cli/plugin-bundles-command.ts +10 -10
- package/src/cli/plugin-command.ts +9 -9
- package/src/cli/service-posture.ts +1 -1
- package/src/cli/status.ts +10 -10
- package/src/cli/surface-command.ts +4 -4
- package/src/cli/tui-startup.ts +23 -23
- package/src/config/run-daemon-config-migration.ts +3 -3
- package/src/config/secret-config.ts +10 -10
- package/src/config/surface.ts +1 -1
- package/src/config/tui-extension-settings.ts +8 -8
- package/src/core/active-model-identity.ts +7 -7
- package/src/core/approval-alert.ts +5 -5
- package/src/core/bookmark-navigation.ts +3 -3
- package/src/core/budget-breach-notifier.ts +6 -6
- package/src/core/compaction-receipt.ts +8 -8
- package/src/core/composer-state.ts +2 -2
- package/src/core/context-usage.ts +1 -1
- package/src/core/conversation-compaction-render.ts +3 -3
- package/src/core/conversation-event-navigation.ts +2 -2
- package/src/core/conversation-fold.ts +9 -9
- package/src/core/conversation-line-cache.ts +14 -14
- package/src/core/conversation-render-context.ts +6 -6
- package/src/core/conversation-rendering.ts +27 -30
- package/src/core/conversation-search-expansion.ts +6 -6
- package/src/core/conversation-splash-state.ts +3 -3
- package/src/core/conversation-turn-structure.ts +13 -13
- package/src/core/conversation-types.ts +3 -3
- package/src/core/conversation-user-receipts.ts +5 -5
- package/src/core/conversation.ts +17 -17
- package/src/core/format-user-error.ts +5 -5
- package/src/core/long-task-notifier.ts +9 -9
- package/src/core/memory-diagnostics-gateway.ts +8 -8
- package/src/core/memory-provenance.ts +5 -5
- package/src/core/model-routing-chip.ts +3 -3
- package/src/core/pairing-tailscale-gateway.ts +3 -3
- package/src/core/permission-mode.ts +5 -5
- package/src/core/power-chip-source.ts +3 -3
- package/src/core/power-status.ts +8 -8
- package/src/core/rewind-receipt.ts +6 -6
- package/src/core/session-resume-core.ts +8 -8
- package/src/core/stream-event-wiring.ts +36 -36
- package/src/core/stream-stall-watchdog.ts +4 -4
- package/src/core/system-message-noise.ts +7 -7
- package/src/core/system-message-router.ts +10 -10
- package/src/core/terminal-notifier.ts +5 -5
- package/src/core/turn-budget-outcome.ts +5 -5
- package/src/core/turn-cancellation.ts +3 -3
- package/src/core/turn-event-wiring.ts +16 -16
- package/src/core/voice-capture-status.ts +2 -2
- package/src/core/voice-provision-gateway.ts +12 -12
- package/src/core/voice-provision-status.ts +19 -19
- package/src/core/voice-stt-gateway.ts +6 -6
- package/src/core/wake-provision-runner.ts +7 -7
- package/src/core/wake-provision-status.ts +17 -17
- package/src/core/workstream-notification.ts +8 -8
- package/src/export/gist-uploader.ts +7 -7
- package/src/input/autocomplete.ts +3 -3
- package/src/input/bookmark-modal.ts +1 -1
- package/src/input/command-args-hint.ts +2 -2
- package/src/input/command-reference.ts +9 -9
- package/src/input/command-registry.ts +32 -32
- package/src/input/commands/acp-runtime.ts +6 -6
- package/src/input/commands/calendar-runtime.ts +9 -9
- package/src/input/commands/channel-pairing.ts +11 -11
- package/src/input/commands/channel-runtime.ts +1 -1
- package/src/input/commands/checkin-runtime.ts +4 -4
- package/src/input/commands/checkpoint-runtime.ts +4 -4
- package/src/input/commands/ci-runtime.ts +4 -4
- package/src/input/commands/cluster-runtime.ts +3 -3
- package/src/input/commands/codebase-runtime.ts +16 -16
- package/src/input/commands/config.ts +6 -6
- package/src/input/commands/connection-status.ts +12 -12
- package/src/input/commands/context-window.ts +2 -2
- package/src/input/commands/cost-attribution-format.ts +4 -4
- package/src/input/commands/cost-runtime.ts +2 -2
- package/src/input/commands/devices-runtime.ts +7 -7
- package/src/input/commands/diff-runtime.ts +2 -2
- package/src/input/commands/editor-runtime.ts +1 -1
- package/src/input/commands/eval.ts +4 -4
- package/src/input/commands/experience-runtime.ts +1 -1
- package/src/input/commands/git-runtime.ts +3 -3
- package/src/input/commands/graph-runtime.ts +3 -3
- package/src/input/commands/guidance-runtime.ts +1 -1
- package/src/input/commands/health-metrics-format.ts +2 -2
- package/src/input/commands/health-runtime.ts +8 -8
- package/src/input/commands/hosted-runtime.ts +13 -13
- package/src/input/commands/image-runtime.ts +6 -6
- package/src/input/commands/intelligence-runtime.ts +2 -2
- package/src/input/commands/local-auth-runtime.ts +3 -3
- package/src/input/commands/local-provider-runtime.ts +3 -3
- package/src/input/commands/local-runtime.ts +7 -7
- package/src/input/commands/mail-runtime.ts +9 -9
- package/src/input/commands/mcp-runtime.ts +1 -1
- package/src/input/commands/memory.ts +13 -13
- package/src/input/commands/notify-runtime.ts +1 -1
- package/src/input/commands/operator-panel-runtime.ts +8 -8
- package/src/input/commands/operator-rpc.ts +3 -3
- package/src/input/commands/operator-runtime.ts +3 -3
- package/src/input/commands/palette-runtime.ts +1 -1
- package/src/input/commands/payment-card-intake.ts +17 -17
- package/src/input/commands/permissions-provenance.ts +7 -7
- package/src/input/commands/permissions-runtime.ts +1 -1
- package/src/input/commands/planning-runtime.ts +9 -9
- package/src/input/commands/platform-services-runtime.ts +2 -2
- package/src/input/commands/policy-dispatch.ts +6 -6
- package/src/input/commands/power-runtime.ts +6 -6
- package/src/input/commands/principals-runtime.ts +3 -3
- package/src/input/commands/product-runtime.ts +3 -3
- package/src/input/commands/profile-render.ts +13 -13
- package/src/input/commands/profile-runtime.ts +13 -13
- package/src/input/commands/profile-types.ts +13 -13
- package/src/input/commands/provider-accounts-runtime.ts +5 -5
- package/src/input/commands/provider.ts +10 -10
- package/src/input/commands/qrcode-runtime.ts +3 -3
- package/src/input/commands/queue-runtime.ts +6 -6
- package/src/input/commands/recall-files-config.ts +4 -4
- package/src/input/commands/recall-files-git.ts +3 -3
- package/src/input/commands/recall-files.ts +12 -12
- package/src/input/commands/recall-query.ts +3 -3
- package/src/input/commands/recall-review.ts +3 -3
- package/src/input/commands/recall-shared.ts +1 -1
- package/src/input/commands/relay-runtime.ts +5 -5
- package/src/input/commands/remote-runtime.ts +3 -3
- package/src/input/commands/review-runtime.ts +8 -8
- package/src/input/commands/rewind-runtime.ts +21 -21
- package/src/input/commands/runtime-services.ts +1 -2
- package/src/input/commands/schedule-nl.ts +2 -2
- package/src/input/commands/schedule-runtime.ts +2 -2
- package/src/input/commands/secret-runtime.ts +3 -3
- package/src/input/commands/session-content.ts +7 -7
- package/src/input/commands/session-picker-filter.ts +3 -3
- package/src/input/commands/session-workflow.ts +10 -10
- package/src/input/commands/session.ts +15 -15
- package/src/input/commands/settings-sync-runtime.ts +2 -2
- package/src/input/commands/share-runtime.ts +4 -4
- package/src/input/commands/shell-core.ts +11 -11
- package/src/input/commands/tasks-runtime.ts +4 -4
- package/src/input/commands/test-runtime.ts +6 -6
- package/src/input/commands/tts-runtime.ts +4 -4
- package/src/input/commands/update-runtime.ts +27 -27
- package/src/input/commands/websearch-runtime.ts +2 -2
- package/src/input/commands/work-plan-runtime.ts +2 -2
- package/src/input/commands/workstream-attempt-dependents.ts +4 -4
- package/src/input/commands/workstream-attempts.ts +16 -16
- package/src/input/commands/workstream-runtime.ts +36 -36
- package/src/input/commands/worktree-runtime.ts +6 -6
- package/src/input/composer-capture.ts +5 -5
- package/src/input/concealed-input.ts +2 -2
- package/src/input/config-modal-types.ts +16 -16
- package/src/input/config-modal.ts +30 -30
- package/src/input/daemon-owned-settings-descriptions.ts +4 -4
- package/src/input/delete-key-policy.ts +1 -1
- package/src/input/exec-env-scrub-config.ts +7 -7
- package/src/input/feature-unit-layout.ts +5 -5
- package/src/input/feed-context-factory.ts +38 -38
- package/src/input/file-picker.ts +1 -1
- package/src/input/handler-command-route.ts +2 -2
- package/src/input/handler-content-actions.ts +8 -8
- package/src/input/handler-feed-routes.ts +13 -13
- package/src/input/handler-feed.ts +31 -31
- package/src/input/handler-interactions.ts +2 -2
- package/src/input/handler-modal-routes.ts +13 -13
- package/src/input/handler-modal-stack.ts +1 -1
- package/src/input/handler-modal-token-routes.ts +1 -1
- package/src/input/handler-onboarding-daemon-adopt.ts +6 -6
- package/src/input/handler-picker-routes.ts +7 -7
- package/src/input/handler-prompt-buffer.ts +1 -1
- package/src/input/handler-shortcuts.ts +12 -12
- package/src/input/handler-types.ts +3 -3
- package/src/input/handler-ui-state.ts +1 -1
- package/src/input/handler.ts +9 -9
- package/src/input/input-history.ts +1 -1
- package/src/input/keybindings.ts +13 -13
- package/src/input/kill-ring.ts +7 -11
- package/src/input/model-picker-filter.ts +3 -3
- package/src/input/model-picker-items.ts +5 -5
- package/src/input/model-picker-types.ts +2 -2
- package/src/input/model-picker.ts +18 -18
- package/src/input/onboarding/onboarding-feature-units.ts +9 -13
- package/src/input/onboarding/onboarding-provider-key-fields.ts +3 -3
- package/src/input/onboarding/onboarding-runtime-status.ts +3 -3
- package/src/input/onboarding/onboarding-wizard-apply.ts +6 -6
- package/src/input/onboarding/onboarding-wizard-cloudflare-step.ts +1 -1
- package/src/input/onboarding/onboarding-wizard-constants.ts +1 -1
- package/src/input/onboarding/onboarding-wizard-external-surfaces.ts +4 -4
- package/src/input/onboarding/onboarding-wizard-network-adopt.ts +6 -6
- package/src/input/onboarding/onboarding-wizard-steps.ts +2 -2
- package/src/input/panel-integration-actions.ts +3 -3
- package/src/input/panel-mouse-geometry.ts +1 -1
- package/src/input/panel-paste-flood-guard.ts +9 -9
- package/src/input/payments-config.ts +15 -15
- package/src/input/profile-picker-modal.ts +1 -1
- package/src/input/provider-key-intake.ts +9 -9
- package/src/input/relay-settings-descriptions.ts +3 -3
- package/src/input/sandbox-exec-config.ts +9 -9
- package/src/input/search.ts +18 -18
- package/src/input/selection-modal-queue.ts +10 -10
- package/src/input/selection-modal.ts +2 -2
- package/src/input/session-picker-modal.ts +7 -7
- package/src/input/settings-modal-activation.ts +1 -1
- package/src/input/settings-modal-adjustment.ts +2 -2
- package/src/input/settings-modal-commit.ts +6 -6
- package/src/input/settings-modal-connections.ts +2 -2
- package/src/input/settings-modal-data.ts +29 -29
- package/src/input/settings-modal-mutations.ts +7 -7
- package/src/input/settings-modal-reset.ts +3 -3
- package/src/input/settings-modal-search.ts +6 -6
- package/src/input/settings-modal-secrets.ts +3 -3
- package/src/input/settings-modal-types.ts +16 -16
- package/src/input/settings-modal.ts +4 -4
- package/src/input/voice-local-settings.ts +3 -3
- package/src/input/worktree-setup-config.ts +8 -8
- package/src/main.ts +15 -15
- package/src/panels/agent-inspector-shared.ts +5 -5
- package/src/panels/base-panel.ts +3 -3
- package/src/panels/builtin/agent.ts +3 -3
- package/src/panels/builtin/development.ts +4 -4
- package/src/panels/builtin/knowledge.ts +1 -1
- package/src/panels/builtin/operations.ts +12 -12
- package/src/panels/builtin/session.ts +8 -8
- package/src/panels/builtin/shared.ts +6 -6
- package/src/panels/builtin-modals.ts +8 -8
- package/src/panels/confirm-state.ts +5 -5
- package/src/panels/cost-tracker-panel.ts +22 -22
- package/src/panels/diff-panel.ts +20 -20
- package/src/panels/diff-review-model.ts +5 -5
- package/src/panels/diff-review-panel.ts +5 -5
- package/src/panels/eval-registry.ts +2 -2
- package/src/panels/expandable-list-panel.ts +5 -5
- package/src/panels/fleet-acts.ts +20 -20
- package/src/panels/fleet-deep-link.ts +5 -5
- package/src/panels/fleet-gateway.ts +12 -12
- package/src/panels/fleet-observed-render.ts +11 -11
- package/src/panels/fleet-panel-format.ts +14 -14
- package/src/panels/fleet-panel-worktree-detail.ts +8 -8
- package/src/panels/fleet-panel.ts +34 -34
- package/src/panels/fleet-read-model.ts +49 -49
- package/src/panels/fleet-spawn.ts +15 -15
- package/src/panels/fleet-steer.ts +7 -7
- package/src/panels/fleet-stop.ts +5 -5
- package/src/panels/fleet-tabs.ts +14 -14
- package/src/panels/fleet-transcript.ts +26 -26
- package/src/panels/git-panel.ts +8 -8
- package/src/panels/hosted-session-feed.ts +13 -13
- package/src/panels/hosted-session-panel.ts +7 -7
- package/src/panels/index.ts +1 -1
- package/src/panels/local-auth-panel.ts +15 -15
- package/src/panels/memory-consolidation-gateway.ts +8 -8
- package/src/panels/modals/devices-modal.ts +8 -8
- package/src/panels/modals/hooks-modal.ts +1 -1
- package/src/panels/modals/keybindings-modal.ts +5 -5
- package/src/panels/modals/knowledge-modal.ts +2 -2
- package/src/panels/modals/local-auth-modal.ts +4 -4
- package/src/panels/modals/marketplace-modal.ts +3 -3
- package/src/panels/modals/memory-modal.ts +19 -19
- package/src/panels/modals/modal-surface-helpers.ts +1 -1
- package/src/panels/modals/modal-theme.ts +3 -3
- package/src/panels/modals/pairing-modal.ts +19 -19
- package/src/panels/modals/planning-modal.ts +4 -4
- package/src/panels/modals/plugins-modal.ts +1 -1
- package/src/panels/modals/policy-modal.ts +4 -4
- package/src/panels/modals/provider-health-modal.ts +1 -1
- package/src/panels/modals/remote-modal.ts +1 -1
- package/src/panels/modals/sandbox-modal.ts +2 -2
- package/src/panels/modals/security-modal.ts +4 -4
- package/src/panels/modals/services-modal.ts +1 -1
- package/src/panels/modals/work-plan-modal.ts +4 -4
- package/src/panels/notifications-feed.ts +6 -6
- package/src/panels/notifications-panel.ts +6 -6
- package/src/panels/panel-confirm-overlay.ts +4 -4
- package/src/panels/panel-manager.ts +13 -13
- package/src/panels/plugins-panel.ts +6 -6
- package/src/panels/polish-core.ts +2 -2
- package/src/panels/polish-tables.ts +2 -2
- package/src/panels/polish.ts +1 -1
- package/src/panels/project-planning-answer-actions.ts +3 -3
- package/src/panels/scrollable-list-panel.ts +15 -15
- package/src/panels/search-focus.ts +1 -1
- package/src/panels/session-maintenance.ts +1 -1
- package/src/panels/skills-panel.ts +3 -3
- package/src/panels/token-budget-panel.ts +11 -11
- package/src/panels/types.ts +14 -14
- package/src/panels/workstream-graph-render.ts +5 -5
- package/src/panels/wrfc-panel-format.ts +1 -1
- package/src/permissions/broker-approval-card.ts +13 -13
- package/src/permissions/hunk-selection.ts +13 -13
- package/src/permissions/prompt.ts +22 -22
- package/src/permissions/sandbox-exec-gate.ts +5 -5
- package/src/providers/provider-classification.ts +1 -1
- package/src/providers/reasoning-effort-surface.ts +12 -12
- package/src/renderer/ansi-sanitize.ts +5 -6
- package/src/renderer/autocomplete-overlay.ts +5 -5
- package/src/renderer/block-actions-overlay.ts +1 -1
- package/src/renderer/bookmark-modal.ts +1 -1
- package/src/renderer/code-block.ts +2 -2
- package/src/renderer/compaction-history-modal.ts +4 -4
- package/src/renderer/compaction-preview.ts +5 -5
- package/src/renderer/compaction-quality.ts +5 -5
- package/src/renderer/composer-fragments.ts +6 -6
- package/src/renderer/compositor.ts +9 -9
- package/src/renderer/config-modal.ts +3 -3
- package/src/renderer/context-inspector.ts +1 -1
- package/src/renderer/context-status-hint.ts +10 -10
- package/src/renderer/conversation-layout.ts +2 -2
- package/src/renderer/conversation-overlays.ts +2 -2
- package/src/renderer/conversation-surface.ts +6 -6
- package/src/renderer/diff.ts +4 -4
- package/src/renderer/fleet-tab-strip.ts +2 -2
- package/src/renderer/footer-tips.ts +4 -4
- package/src/renderer/fullscreen-primitives.ts +1 -1
- package/src/renderer/git-status.ts +5 -5
- package/src/renderer/header-line.ts +5 -5
- package/src/renderer/help-overlay.ts +5 -5
- package/src/renderer/hint-grammar.ts +2 -2
- package/src/renderer/layout.ts +1 -1
- package/src/renderer/markdown-inline.ts +3 -3
- package/src/renderer/markdown-table.ts +7 -7
- package/src/renderer/modal-factory.ts +3 -3
- package/src/renderer/model-picker-overlay.ts +2 -2
- package/src/renderer/model-workspace.ts +7 -7
- package/src/renderer/onboarding/onboarding-wizard.ts +1 -1
- package/src/renderer/overlay-box.ts +1 -1
- package/src/renderer/panel-composite.ts +5 -5
- package/src/renderer/panel-workspace-bar.ts +1 -1
- package/src/renderer/process-indicator.ts +8 -8
- package/src/renderer/profile-picker-modal.ts +3 -3
- package/src/renderer/prompt-content-width.ts +1 -1
- package/src/renderer/search-overlay.ts +3 -3
- package/src/renderer/selection-modal-overlay.ts +6 -6
- package/src/renderer/semantic-diff.ts +6 -7
- package/src/renderer/session-picker-modal.ts +24 -24
- package/src/renderer/settings-modal-connections.ts +3 -3
- package/src/renderer/settings-modal-helpers.ts +16 -16
- package/src/renderer/settings-modal.ts +10 -10
- package/src/renderer/shell-surface.ts +8 -8
- package/src/renderer/status-glyphs.ts +6 -6
- package/src/renderer/syntax-highlighter.ts +2 -3
- package/src/renderer/system-message.ts +3 -3
- package/src/renderer/tab-strip.ts +2 -2
- package/src/renderer/term-caps.ts +12 -12
- package/src/renderer/terminal-bg-probe.ts +10 -10
- package/src/renderer/terminal-escapes.ts +1 -1
- package/src/renderer/theme-mode-config.ts +3 -3
- package/src/renderer/theme.ts +34 -34
- package/src/renderer/thinking.ts +1 -1
- package/src/renderer/tool-call.ts +5 -5
- package/src/renderer/tool-result-expanded-lines.ts +3 -3
- package/src/renderer/tool-result-summary.ts +6 -6
- package/src/renderer/turn-injection.ts +9 -9
- package/src/renderer/ui-factory.ts +33 -33
- package/src/renderer/ui-primitives.ts +4 -4
- package/src/runtime/bootstrap-command-parts.ts +3 -3
- package/src/runtime/bootstrap-core.ts +21 -21
- package/src/runtime/bootstrap-hook-bridge.ts +8 -8
- package/src/runtime/bootstrap-shell.ts +9 -9
- package/src/runtime/bootstrap.ts +16 -16
- package/src/runtime/client/approval-updates.ts +3 -3
- package/src/runtime/client/build-floors.ts +7 -7
- package/src/runtime/client/daemon-attach-handshake.ts +5 -5
- package/src/runtime/client/fleet-union.ts +7 -7
- package/src/runtime/client/host-service-status.ts +2 -2
- package/src/runtime/client/hosted-exit.ts +4 -4
- package/src/runtime/client/hosted-roster.ts +4 -4
- package/src/runtime/client/hosted-session-stream.ts +5 -5
- package/src/runtime/client/hosted-sessions.ts +8 -8
- package/src/runtime/client/operator-endpoint.ts +14 -14
- package/src/runtime/client/spine-adoption.ts +8 -8
- package/src/runtime/context-accounting-source.ts +4 -4
- package/src/runtime/context.ts +2 -2
- package/src/runtime/conversation-rewind-port.ts +6 -6
- package/src/runtime/credential-composition.ts +2 -2
- package/src/runtime/daemon-attach-notices.ts +6 -6
- package/src/runtime/diagnostics/panels/index.ts +1 -1
- package/src/runtime/diagnostics/panels/ops.ts +2 -2
- package/src/runtime/disposal-wiring.ts +6 -6
- package/src/runtime/index.ts +11 -11
- package/src/runtime/install-self-check-startup.ts +4 -4
- package/src/runtime/install-self-check.ts +6 -6
- package/src/runtime/interaction-seams.ts +4 -4
- package/src/runtime/knowledge-services.ts +2 -2
- package/src/runtime/legacy-daemon-migration.ts +37 -37
- package/src/runtime/legacy-daemon-reconcile.ts +30 -30
- package/src/runtime/memory-governance-services.ts +3 -3
- package/src/runtime/memory-spine-transport.ts +3 -3
- package/src/runtime/notification-dispatch.ts +4 -4
- package/src/runtime/onboarding/apply.ts +1 -1
- package/src/runtime/onboarding/derivation.ts +1 -1
- package/src/runtime/onboarding/fast-path.ts +7 -7
- package/src/runtime/onboarding/progress.ts +2 -2
- package/src/runtime/onboarding/provider-key-capture.ts +4 -4
- package/src/runtime/onboarding/snapshot.ts +2 -2
- package/src/runtime/onboarding/state.ts +4 -4
- package/src/runtime/onboarding/types.ts +4 -4
- package/src/runtime/orchestrator-core-services.ts +5 -5
- package/src/runtime/path-shadow-startup.ts +3 -3
- package/src/runtime/perf/panel-contracts.ts +1 -1
- package/src/runtime/power-keepawake-remote.ts +6 -6
- package/src/runtime/process-lifecycle.ts +14 -14
- package/src/runtime/provider-fallback.ts +3 -3
- package/src/runtime/recovery-autosave.ts +3 -3
- package/src/runtime/recovery-decisions.ts +19 -19
- package/src/runtime/recovery-offer-wiring.ts +4 -4
- package/src/runtime/recovery-prompt.ts +20 -20
- package/src/runtime/relay-reachability-bridge.ts +3 -3
- package/src/runtime/release-artifacts.ts +1 -1
- package/src/runtime/resume-notice.ts +20 -20
- package/src/runtime/runtime-services-types.ts +20 -20
- package/src/runtime/services.ts +20 -20
- package/src/runtime/session-continuity-hints.ts +1 -1
- package/src/runtime/session-inbound-inputs.ts +12 -12
- package/src/runtime/session-resume-liveness-confirm.ts +4 -4
- package/src/runtime/session-spine-transport.ts +3 -3
- package/src/runtime/store/domains/panels.ts +2 -2
- package/src/runtime/store/domains/ui-perf.ts +2 -2
- package/src/runtime/store/index.ts +1 -1
- package/src/runtime/store/selectors/index.ts +1 -1
- package/src/runtime/store/state.ts +2 -2
- package/src/runtime/ui-services.ts +3 -3
- package/src/runtime/workspace-checkpointing.ts +3 -3
- package/src/runtime/wrfc-persistence.ts +15 -15
- package/src/scripts/process-messages.ts +1 -1
- package/src/shell/blocking-input.ts +9 -9
- package/src/shell/recovery-input-helpers.ts +2 -2
- package/src/shell/retry-affordance.ts +9 -9
- package/src/shell/ui-openers.ts +14 -14
- package/src/shell/voice-capture-shell.ts +3 -3
- package/src/tools/wrfc-agent-guard.ts +4 -4
- package/src/utils/browser.ts +2 -2
- package/src/utils/format-duration.ts +3 -3
- package/src/utils/format-number.ts +2 -2
- package/src/utils/splash-lines.ts +4 -4
- package/src/utils/terminal-width.ts +6 -6
- package/src/verification/verification-ledger.ts +25 -25
- package/src/version.ts +3 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* conversation-user-receipts.ts
|
|
2
|
+
* conversation-user-receipts.ts, tracks which system-role message indices
|
|
3
3
|
* are a direct receipt for an explicit user action (e.g. answering the
|
|
4
4
|
* startup recovery modal's Resume/Keep/Remove choice), as opposed to ambient
|
|
5
5
|
* boot chatter (provider registration, the resume notice, etc.). Kept in its
|
|
6
|
-
* own file so ConversationManager (core/conversation.ts)
|
|
7
|
-
* line-count gate
|
|
6
|
+
* own file so ConversationManager (core/conversation.ts), already near its
|
|
7
|
+
* line-count gate, doesn't have to carry the bookkeeping inline.
|
|
8
8
|
*
|
|
9
9
|
* ConversationManager.rebuildHistory()'s splash-vs-transcript check consults
|
|
10
10
|
* this via ConversationManager.addUserActionReceipt(): a receipt the user is
|
|
11
11
|
* actively waiting on must displace the splash the way a user message does,
|
|
12
12
|
* while quiet startup plumbing keeps rendering underneath it. Indices mirror
|
|
13
|
-
* messageKindRegistry's own lifecycle
|
|
13
|
+
* messageKindRegistry's own lifecycle, cleared on resetAll(), purged for
|
|
14
14
|
* indices an undo() frees for reuse, deleted when a later add overwrites the
|
|
15
15
|
* same recycled index with a non-receipt message.
|
|
16
16
|
*/
|
|
@@ -33,7 +33,7 @@ export class UserReceiptIndices {
|
|
|
33
33
|
this.indices.clear();
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
/** Drop every tracked index >= minIndex
|
|
36
|
+
/** Drop every tracked index >= minIndex, mirrors undo()'s tail-splice. */
|
|
37
37
|
purgeFrom(minIndex: number): void {
|
|
38
38
|
for (const key of this.indices) {
|
|
39
39
|
if (key >= minIndex) this.indices.delete(key);
|
package/src/core/conversation.ts
CHANGED
|
@@ -65,11 +65,11 @@ export type { OrchestratorUsageTotals };
|
|
|
65
65
|
/**
|
|
66
66
|
* sumConversationUsage - Fold every assistant message's per-turn usage into
|
|
67
67
|
* running totals, plus the *last* assistant message's own input-token figure
|
|
68
|
-
* (context-window occupancy
|
|
68
|
+
* (context-window occupancy, not a running sum).
|
|
69
69
|
*
|
|
70
70
|
* TUI-side counterpart to SDK Orchestrator.usage: after a session resume
|
|
71
71
|
* replays historical messages into a freshly-constructed Orchestrator (whose
|
|
72
|
-
* `usage` starts at all zeros
|
|
72
|
+
* `usage` starts at all zeros, bootstrap.ts always constructs a fresh
|
|
73
73
|
* instance, see), this lets the caller hydrate the footer's token
|
|
74
74
|
* counters from messages that already carry real usage data instead of
|
|
75
75
|
* waiting for the first new turn to populate them.
|
|
@@ -118,9 +118,9 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
118
118
|
protected blockRegistry: BlockMeta[] = [];
|
|
119
119
|
/**
|
|
120
120
|
* Absolute message index -> first rendered line index in the history buffer.
|
|
121
|
-
* Keyed by the message's ABSOLUTE position in the full (unsliced) snapshot
|
|
121
|
+
* Keyed by the message's ABSOLUTE position in the full (unsliced) snapshot,
|
|
122
122
|
* appendConversationMessages writes `messageLineRegistry[absoluteIdx]`, not the
|
|
123
|
-
* slice-relative loop counter
|
|
123
|
+
* slice-relative loop counter, so transcript-event navigation
|
|
124
124
|
* (next/prevTranscriptEventLine), whose event.messageIndex is absolute, resolves
|
|
125
125
|
* correctly even after clearDisplay() renders only a tail slice. Holes (indices
|
|
126
126
|
* not currently rendered) read back as undefined and are filtered out by consumers.
|
|
@@ -131,10 +131,10 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
131
131
|
* navigable (error-navigation worthy).
|
|
132
132
|
*
|
|
133
133
|
* Kind → navigable mapping:
|
|
134
|
-
* - 'system' YES
|
|
134
|
+
* - 'system' YES, generic/catch-all messages (failures, provider errors,
|
|
135
135
|
* session events); the default for any un-prefixed message
|
|
136
|
-
* - 'wrfc' YES
|
|
137
|
-
* - 'operational' NO
|
|
136
|
+
* - 'wrfc' YES, WRFC chain events (failures matter for navigation)
|
|
137
|
+
* - 'operational' NO , noisy tool/scan/plugin/MCP status; not worth jumping to
|
|
138
138
|
*
|
|
139
139
|
* This replaces the old /error/i substring test, which missed failure phrases
|
|
140
140
|
* like "request failed" / "rate limited" and false-positived on benign info
|
|
@@ -237,7 +237,7 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
237
237
|
/**
|
|
238
238
|
* addTypedSystemMessage - System message with an explicit kind tag, stored
|
|
239
239
|
* in messageKindRegistry. `isUserReceipt` (conversation-user-receipts.ts)
|
|
240
|
-
* additionally marks it for rebuildHistory()'s splash check
|
|
240
|
+
* additionally marks it for rebuildHistory()'s splash check, only for a
|
|
241
241
|
* direct receipt to an explicit user action, never ambient boot chatter.
|
|
242
242
|
*/
|
|
243
243
|
public addTypedSystemMessage(content: string, kind: SystemMessageKind, opts?: { isUserReceipt?: boolean }): void {
|
|
@@ -303,7 +303,7 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
305
|
* updateStreamingBlock - Update the in-progress streaming block with accumulated content.
|
|
306
|
-
* Called per-delta during streaming. Does NOT trigger a full rebuild
|
|
306
|
+
* Called per-delta during streaming. Does NOT trigger a full rebuild, instead it
|
|
307
307
|
* directly updates the history buffer from streamingStartLine onward.
|
|
308
308
|
*/
|
|
309
309
|
public override updateStreamingBlock(content: string): void {
|
|
@@ -445,7 +445,7 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
445
445
|
/**
|
|
446
446
|
* getLineCacheSize - Number of per-message Line[] entries currently retained.
|
|
447
447
|
* The cache mark-and-sweeps to the visible message set on every rebuild, so
|
|
448
|
-
* this is bounded by what is on screen
|
|
448
|
+
* this is bounded by what is on screen, exposed for memory-hygiene assertions.
|
|
449
449
|
*/
|
|
450
450
|
public getLineCacheSize(): number {
|
|
451
451
|
return this.lineCache.size;
|
|
@@ -471,7 +471,7 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
471
471
|
// During streaming, the in-progress placeholder (always the last message) is
|
|
472
472
|
// rendered here as EMPTY; the incremental streaming path (updateStreamingBlock)
|
|
473
473
|
// owns its content. This keeps streamingStartLine valid across width-change
|
|
474
|
-
// rebuilds
|
|
474
|
+
// rebuilds, otherwise the placeholder would be re-rendered with its content at
|
|
475
475
|
// the new width while streamingStartLine still pointed into the old buffer.
|
|
476
476
|
const lastMsg = snapshot[snapshot.length - 1];
|
|
477
477
|
const isStreaming = this.streamingStartLine >= 0 && lastMsg?.role === 'assistant';
|
|
@@ -480,7 +480,7 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
480
480
|
: snapshot;
|
|
481
481
|
|
|
482
482
|
// When _displayFromMessageIndex > 0, clearDisplay() was called. Only render
|
|
483
|
-
// messages added after the clear
|
|
483
|
+
// messages added after the clear, the pre-clear history stays off-screen.
|
|
484
484
|
const displayStart = this._displayFromMessageIndex;
|
|
485
485
|
const visibleSnapshot = displayStart > 0 ? renderSnapshot.slice(displayStart) : renderSnapshot;
|
|
486
486
|
|
|
@@ -657,14 +657,14 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
657
657
|
|
|
658
658
|
/** First rendered line for message `absoluteIdx` (undefined if never
|
|
659
659
|
* rendered). For a folded tool-group member this is the group's own
|
|
660
|
-
* header line, not the following message's position
|
|
660
|
+
* header line, not the following message's position, see
|
|
661
661
|
* messageLineRegistry's doc. Flushes history if dirty. */
|
|
662
662
|
public getMessageLine(absoluteIdx: number): number | undefined {
|
|
663
663
|
this.flushHistory();
|
|
664
664
|
return this.messageLineRegistry[absoluteIdx];
|
|
665
665
|
}
|
|
666
666
|
|
|
667
|
-
/** Set a collapseKey's state directly, bypassing block lookup
|
|
667
|
+
/** Set a collapseKey's state directly, bypassing block lookup, needed for
|
|
668
668
|
* a key with no BlockMeta yet (a folded tool-group member's own
|
|
669
669
|
* `msg_<idx>` key only becomes a real block once its group expands). */
|
|
670
670
|
public setCollapsed(collapseKey: string, collapsed: boolean): void {
|
|
@@ -726,7 +726,7 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
726
726
|
this.markDirty();
|
|
727
727
|
}
|
|
728
728
|
|
|
729
|
-
/** Retire the splash for the run
|
|
729
|
+
/** Retire the splash for the run, any submission does it (SplashGateState). */
|
|
730
730
|
public dismissSplash(): void {
|
|
731
731
|
if (this.splashGate.dismiss()) this.markDirty();
|
|
732
732
|
}
|
|
@@ -772,7 +772,7 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
772
772
|
*
|
|
773
773
|
* Contract:
|
|
774
774
|
* - getDisplayBlocks() returns an empty array immediately after this call.
|
|
775
|
-
* - getMessageSnapshot() is unaffected
|
|
775
|
+
* - getMessageSnapshot() is unaffected, full LLM history is preserved.
|
|
776
776
|
* - resetAll() (which clears both display and messages) continues to work.
|
|
777
777
|
* - rebuildHistory() can be called by callers that need a full display rebuild.
|
|
778
778
|
*/
|
|
@@ -792,7 +792,7 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
792
792
|
this._displayFromMessageIndex = this.getMessageSnapshot().length;
|
|
793
793
|
this.appendedUpTo = this._displayFromMessageIndex;
|
|
794
794
|
this.dirty = false;
|
|
795
|
-
// Do NOT re-render here
|
|
795
|
+
// Do NOT re-render here, display stays blank until the next message is added.
|
|
796
796
|
// The lastRenderedWidth is kept so subsequent appends use the correct width.
|
|
797
797
|
}
|
|
798
798
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* formatUserFacingError
|
|
2
|
+
* formatUserFacingError, classifies provider/network errors into plain-language
|
|
3
3
|
* one-liners with a suggested action.
|
|
4
4
|
*
|
|
5
5
|
* Classification order (most-specific first):
|
|
@@ -146,28 +146,28 @@ export function formatUserFacingError(err: unknown): UserFacingError {
|
|
|
146
146
|
case 'auth':
|
|
147
147
|
return {
|
|
148
148
|
kind,
|
|
149
|
-
message: 'Authentication failed
|
|
149
|
+
message: 'Authentication failed: the provider rejected your API key.',
|
|
150
150
|
action: 'Run /login to re-authenticate or check your API key.',
|
|
151
151
|
};
|
|
152
152
|
|
|
153
153
|
case 'rate-limit':
|
|
154
154
|
return {
|
|
155
155
|
kind,
|
|
156
|
-
message: 'Rate limit reached
|
|
156
|
+
message: 'Rate limit reached: the provider is throttling requests.',
|
|
157
157
|
action: 'Wait a moment and retry, or switch models with /model.',
|
|
158
158
|
};
|
|
159
159
|
|
|
160
160
|
case 'context-overflow':
|
|
161
161
|
return {
|
|
162
162
|
kind,
|
|
163
|
-
message: 'Context window exceeded
|
|
163
|
+
message: 'Context window exceeded: the conversation is too long for this model.',
|
|
164
164
|
action: 'Run /compact to summarise the conversation and free context.',
|
|
165
165
|
};
|
|
166
166
|
|
|
167
167
|
case 'network':
|
|
168
168
|
return {
|
|
169
169
|
kind,
|
|
170
|
-
message: 'Network error
|
|
170
|
+
message: 'Network error: could not reach the provider.',
|
|
171
171
|
action: 'Check your connection and retry, or switch models with /model.',
|
|
172
172
|
};
|
|
173
173
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* long-task-notifier
|
|
2
|
+
* long-task-notifier, fires push notifications when a turn or agent task
|
|
3
3
|
* completes after running longer than the configured threshold.
|
|
4
4
|
*
|
|
5
5
|
* PRIVACY GUARANTEE: Notification text must never include conversation content
|
|
6
6
|
* (user messages, assistant replies, tool outputs). Only metadata is included:
|
|
7
7
|
* task kind, elapsed time, ok/fail status, and session id. This module enforces
|
|
8
|
-
* that constraint by construction
|
|
8
|
+
* that constraint by construction, it receives no conversation object and
|
|
9
9
|
* builds all message text from structural metadata only.
|
|
10
10
|
*
|
|
11
11
|
* Delivery targets (in preference order):
|
|
12
12
|
* 1. Desktop notification (linux notify-send / mac osascript) via SDK
|
|
13
|
-
* notifyCompletion
|
|
13
|
+
* notifyCompletion, detected and dispatched by the SDK; silently
|
|
14
14
|
* no-ops when the platform does not support it.
|
|
15
15
|
* 2. Configured outbound webhook channel (ntfy topic / webhook URL) via
|
|
16
|
-
* WebhookNotifier.send()
|
|
16
|
+
* WebhookNotifier.send(), only fires when the user has URLs configured.
|
|
17
17
|
*
|
|
18
18
|
* When neither target is available the function is an honest no-op (debug log
|
|
19
19
|
* only; no user-facing error spam).
|
|
20
20
|
*
|
|
21
21
|
* Focus tracking: when `focusTracker` is supplied, notifications are
|
|
22
22
|
* gated the same way as the other unfocused-user alert classes (see
|
|
23
|
-
* alert-gating.ts)
|
|
23
|
+
* alert-gating.ts), they fire when the terminal is unfocused or focus state
|
|
24
24
|
* was never observed, and are suppressed when it's known to be focused,
|
|
25
25
|
* unless `behavior.notifyOnlyWhenUnfocused` is turned off. `focusTracker` is
|
|
26
26
|
* optional and defaults to "always fire" (the behavior before focus gating existed) when
|
|
@@ -76,7 +76,7 @@ export interface MaybeNotifyLongTaskOptions {
|
|
|
76
76
|
/**
|
|
77
77
|
* Outbound webhook notifier. When provided and the user has URLs
|
|
78
78
|
* configured, the notification is also sent to all configured endpoints
|
|
79
|
-
* (e.g. ntfy.sh topics). Optional
|
|
79
|
+
* (e.g. ntfy.sh topics). Optional, absent means outbound delivery is
|
|
80
80
|
* skipped silently.
|
|
81
81
|
*/
|
|
82
82
|
readonly webhookNotifier?: WebhookNotifier | null;
|
|
@@ -99,7 +99,7 @@ export interface MaybeNotifyLongTaskOptions {
|
|
|
99
99
|
* exceeds the configured threshold.
|
|
100
100
|
*
|
|
101
101
|
* Returns true when at least one delivery was attempted, false when the
|
|
102
|
-
* call was a no-op (threshold not reached, off-state, or focus-gated off
|
|
102
|
+
* call was a no-op (threshold not reached, off-state, or focus-gated off,
|
|
103
103
|
* see `focusTracker`/`configGet` above).
|
|
104
104
|
*
|
|
105
105
|
* PRIVACY: builds message text from structural metadata only (kind, elapsed,
|
|
@@ -125,13 +125,13 @@ export function maybeNotifyLongTask(opts: MaybeNotifyLongTaskOptions): boolean {
|
|
|
125
125
|
// are supplied. Absent either one, behavior is unchanged from before focus
|
|
126
126
|
// gating existed (always fire once the threshold is met).
|
|
127
127
|
if (focusTracker && configGet && readNotifyOnlyWhenUnfocused(configGet) && !focusTracker.shouldAlertWhenUnfocused()) {
|
|
128
|
-
logger.debug('long-task-notifier: suppressed
|
|
128
|
+
logger.debug('long-task-notifier: suppressed; terminal focused');
|
|
129
129
|
return false;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
// Build concise, metadata-only message. No conversation text.
|
|
133
133
|
const statusLabel = status === 'ok' ? 'completed' : 'failed';
|
|
134
|
-
const title = `GoodVibes
|
|
134
|
+
const title = `GoodVibes: ${kind} ${statusLabel}`;
|
|
135
135
|
// PRIVACY: message contains only structural metadata, never conversation content.
|
|
136
136
|
const message = `${kind} ${statusLabel} in ${elapsedSeconds}s · session ${sessionId.slice(0, 8)}`;
|
|
137
137
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// memory-diagnostics-gateway.ts
|
|
3
3
|
//
|
|
4
4
|
// The daemon-backed verb the /health memory (doctor) surface reads:
|
|
5
|
-
// ops.memory.get (GET /api/ops/memory)
|
|
6
|
-
// No named facade exists on the in-process OperatorClient, so
|
|
7
|
-
// the memory-consolidation and voice-provisioning gateways
|
|
5
|
+
// ops.memory.get (GET /api/ops/memory), the read-only MemoryGovernor snapshot.
|
|
6
|
+
// No named facade exists on the in-process OperatorClient, so, exactly like
|
|
7
|
+
// the memory-consolidation and voice-provisioning gateways, it goes over the
|
|
8
8
|
// generic operator invoke path (operator-rpc.ts's resolveOperatorRpc ->
|
|
9
9
|
// sdk.operator.invoke), reaching the SAME daemon the command layer does.
|
|
10
10
|
//
|
|
11
11
|
// A daemon that predates the memory governor answers an honest 501 (the verb is
|
|
12
12
|
// cataloged but has no handler when no live governor is composed) or a 404 (an
|
|
13
|
-
// older daemon without the route)
|
|
13
|
+
// older daemon without the route), both mean "this daemon does not serve
|
|
14
14
|
// memory diagnostics", NOT a fabricated all-zero snapshot (see
|
|
15
15
|
// classifyMemoryDiagnosticsError). The interface is injectable so the command
|
|
16
16
|
// and its tests round-trip against a mocked daemon.
|
|
@@ -30,7 +30,7 @@ export interface MemoryDiagnosticsGateway {
|
|
|
30
30
|
/**
|
|
31
31
|
* Why the gateway could not be built (daemon disabled / no control-plane URL),
|
|
32
32
|
* surfaced verbatim so the surface prints an honest "unavailable" line rather
|
|
33
|
-
* than guessing
|
|
33
|
+
* than guessing, mirrors the memory-consolidation / voice gateways.
|
|
34
34
|
*/
|
|
35
35
|
export type MemoryDiagnosticsGatewayResolution =
|
|
36
36
|
| { readonly available: true; readonly gateway: MemoryDiagnosticsGateway }
|
|
@@ -43,7 +43,7 @@ export interface MemoryDiagnosticsGatewayDeps {
|
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* Build the live memory-diagnostics gateway over the generic operator invoke
|
|
46
|
-
* path
|
|
46
|
+
* path, the same daemon resolution the command layer uses. Returns an honest
|
|
47
47
|
* unavailable reason when no daemon is reachable.
|
|
48
48
|
*/
|
|
49
49
|
export function createMemoryDiagnosticsGateway(deps: MemoryDiagnosticsGatewayDeps): MemoryDiagnosticsGatewayResolution {
|
|
@@ -66,7 +66,7 @@ export const MEMORY_DIAGNOSTICS_UNAVAILABLE = 'this daemon does not serve memory
|
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* Classify an ops.memory.get rejection: a 501 (a daemon composed without a live
|
|
69
|
-
* governor
|
|
69
|
+
* governor, the verb is cataloged but unhandled) or a 404 (an older daemon
|
|
70
70
|
* without the route) are both "verb unavailable"; anything else (network,
|
|
71
71
|
* 401/403, 500) is a generic error.
|
|
72
72
|
*/
|
|
@@ -79,7 +79,7 @@ export function classifyMemoryDiagnosticsError(error: unknown): MemoryDiagnostic
|
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* Render the /health memory (doctor) block from an already-resolved gateway
|
|
82
|
-
* resolution
|
|
82
|
+
* resolution, the testable core the command wraps. Kept separate from the live
|
|
83
83
|
* gateway construction so a wire test injects a fake resolution (available /
|
|
84
84
|
* unavailable / failing) with no HTTP.
|
|
85
85
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// ---------------------------------------------------------------------------
|
|
2
|
-
// memory-provenance.ts
|
|
2
|
+
// memory-provenance.ts, the optional "used N memories" turn chip (owner-ruled
|
|
3
3
|
// 2026-07-13, default OFF).
|
|
4
4
|
//
|
|
5
5
|
// The SDK tags each turn payload with the memory-sourced injection ids it drew
|
|
6
|
-
// on: `metadata.memory.recordIds: string[]` (absent when none)
|
|
6
|
+
// on: `metadata.memory.recordIds: string[]` (absent when none), the SAME
|
|
7
7
|
// convention the webui's chip reads, so both surfaces name the same records.
|
|
8
8
|
// When the memory-provenance setting is ON, a turn that used memories shows a
|
|
9
9
|
// small chip naming how many, with a drill-in listing them. When OFF (default),
|
|
@@ -22,7 +22,7 @@ export const MEMORY_SHOW_PROVENANCE_DESCRIPTION =
|
|
|
22
22
|
/**
|
|
23
23
|
* Read the memory-provenance toggle defensively. `memory.*` is a TUI-local
|
|
24
24
|
* section with no SDK DEFAULT_CONFIG entry, so ConfigManager.get() throws for
|
|
25
|
-
* it until something has been written
|
|
25
|
+
* it until something has been written, an unset key means the default (OFF),
|
|
26
26
|
* not an error (same pattern as memory.projection.dir).
|
|
27
27
|
*/
|
|
28
28
|
export function readMemoryShowProvenance(configManager: Pick<ConfigManager, 'get'>): boolean {
|
|
@@ -37,7 +37,7 @@ export function readMemoryShowProvenance(configManager: Pick<ConfigManager, 'get
|
|
|
37
37
|
* Extract the memory-sourced record ids a turn drew on, from the SDK's
|
|
38
38
|
* `metadata.memory.recordIds` convention. Structural (not a named import) so it
|
|
39
39
|
* reads the field whether or not the pinned SDK's TurnEvent type surfaces it
|
|
40
|
-
* yet, and yields an empty list for any turn without the field
|
|
40
|
+
* yet, and yields an empty list for any turn without the field, never a guess,
|
|
41
41
|
* never a throw.
|
|
42
42
|
*/
|
|
43
43
|
export function memoryRecordIdsFromTurn(turn: unknown): readonly string[] {
|
|
@@ -50,7 +50,7 @@ export function memoryRecordIdsFromTurn(turn: unknown): readonly string[] {
|
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Build the settings-modal synthetic entry for memory.showProvenance (TUI-local,
|
|
53
|
-
* default OFF). Read defensively
|
|
53
|
+
* default OFF). Read defensively, memory.* has no SDK DEFAULT_CONFIG entry, so
|
|
54
54
|
* an unset key means the OFF default, not an error.
|
|
55
55
|
*/
|
|
56
56
|
export function buildMemoryProvenanceSyntheticEntry(configManager: Pick<ConfigManager, 'get'>): {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* model-routing-chip
|
|
2
|
+
* model-routing-chip, turns a mid-session model change into a visible one-line
|
|
3
3
|
* conversation notice so a route/fallback/downgrade is NEVER silent.
|
|
4
4
|
*
|
|
5
5
|
* Driven by the provider registry's `MODEL_CHANGED` runtime event (fired on
|
|
6
|
-
* every setCurrentModel
|
|
6
|
+
* every setCurrentModel, user command, automatic capability route, or
|
|
7
7
|
* SDK-internal downgrade). The chip's job is the OTHERWISE-SILENT changes: the
|
|
8
8
|
* SDK-internal auto-route/downgrade paths call setCurrentModel with no TUI-side
|
|
9
9
|
* narration of their own.
|
|
@@ -83,7 +83,7 @@ export function findRecentFallbackReason(
|
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* The routing-chip line to emit for a MODEL_CHANGED event, or null to stay
|
|
86
|
-
* silent. Null only when there is no real change (no/same previous model)
|
|
86
|
+
* silent. Null only when there is no real change (no/same previous model),
|
|
87
87
|
* changes the failover path narrates itself never reach this function.
|
|
88
88
|
*
|
|
89
89
|
* A change that correlates to a logged fallback transition is reported WITH
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// ---------------------------------------------------------------------------
|
|
2
2
|
// pairing-tailscale-gateway.ts
|
|
3
3
|
//
|
|
4
|
-
// The two tailscale verbs the pairing surfaces drive
|
|
5
|
-
// (tailscale.get) and the one-action serve (tailscale.serve.run)
|
|
4
|
+
// The two tailscale verbs the pairing surfaces drive, a read-only detection
|
|
5
|
+
// (tailscale.get) and the one-action serve (tailscale.serve.run), over the
|
|
6
6
|
// same generic operator invoke path the fleet acts use (resolveOperatorRpc ->
|
|
7
7
|
// sdk.operator.invoke), reaching the SAME daemon the command layer does.
|
|
8
8
|
//
|
|
@@ -25,7 +25,7 @@ export interface PairingTailscaleGatewayDeps {
|
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Probe tailscale (tailscale.get). Returns the honest status, or null when the
|
|
28
|
-
* daemon is unreachable / the call fails
|
|
28
|
+
* daemon is unreachable / the call fails, the pairing surface then stays quiet.
|
|
29
29
|
*/
|
|
30
30
|
export async function probePairingTailscale(
|
|
31
31
|
deps: PairingTailscaleGatewayDeps,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Session permission mode
|
|
2
|
+
* Session permission mode, the small vocabulary and cycle logic shared by the
|
|
3
3
|
* Shift+Tab mode-cycle key, the `/plan` toggle, and the footer mode pill.
|
|
4
4
|
*
|
|
5
5
|
* The SDK owns the permission mode: it lives at config key `permissions.mode`
|
|
6
6
|
* and is read by the SDK's PermissionManager.getMode() (which the orchestrator
|
|
7
7
|
* consults for the standing plan-mode instruction). Setting the config value is
|
|
8
|
-
* the SDK-sanctioned way to change the mode
|
|
8
|
+
* the SDK-sanctioned way to change the mode, the SDK's mode-change emitter then
|
|
9
9
|
* broadcasts PERMISSION_MODE_CHANGED on the runtime bus so every attached
|
|
10
10
|
* surface can reflect it. This module only maps and cycles the values; it never
|
|
11
11
|
* owns the state.
|
|
12
12
|
*
|
|
13
13
|
* Two vocabularies exist and must not be confused:
|
|
14
14
|
* - the CONFIG values ('prompt' | 'allow-all' | 'custom' | 'plan' |
|
|
15
|
-
* 'accept-edits')
|
|
15
|
+
* 'accept-edits'), what is stored and what this module operates on.
|
|
16
16
|
* - the user-facing LABELS ('normal' | 'auto' | 'custom' | 'plan' |
|
|
17
|
-
* 'accept-edits')
|
|
17
|
+
* 'accept-edits'), what the pill shows.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
/** The config `permissions.mode` values, exactly as the SDK schema defines them. */
|
|
@@ -23,7 +23,7 @@ export type PermissionModeValue = 'prompt' | 'allow-all' | 'custom' | 'plan' | '
|
|
|
23
23
|
/**
|
|
24
24
|
* The Shift+Tab cycle order over the four named SESSION modes. `custom` is a
|
|
25
25
|
* per-rule policy, not a session posture, so it is deliberately excluded from
|
|
26
|
-
* the cycle
|
|
26
|
+
* the cycle, cycling FROM custom starts at the first entry (normal).
|
|
27
27
|
*
|
|
28
28
|
* Order (matches the settled convention: escalating autonomy, then wrap):
|
|
29
29
|
* normal → accept-edits → plan → auto → normal
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ---------------------------------------------------------------------------
|
|
2
|
-
// power-chip-source.ts
|
|
2
|
+
// power-chip-source.ts, the topology-aware source of truth behind the
|
|
3
3
|
// always-visible "sleep disabled" chip.
|
|
4
4
|
//
|
|
5
5
|
// Embedded topology: the in-process PowerManager IS the daemon's, so reading
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// External/adopted topology: the local manager is NOT the daemon's, and the
|
|
12
12
|
// adopted-daemon wire is plain HTTP (no realtime event bridge), so the chip
|
|
13
13
|
// POLLS power.status.get on an unref'd interval and renders the DAEMON's
|
|
14
|
-
// state
|
|
14
|
+
// state, a webui-originated toggle on the daemon lights the TUI chip within
|
|
15
15
|
// one poll, and a TUI toggle (forwarded over power.keepAwake.set by
|
|
16
16
|
// power-keepawake-remote.ts) lights the webui's the same way. While the
|
|
17
17
|
// daemon's state is unknown (fetch pending/unreachable) the local projection
|
|
@@ -38,7 +38,7 @@ export interface PowerChipSourceDeps {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export interface PowerChipSource {
|
|
41
|
-
/** The current chip projection
|
|
41
|
+
/** The current chip projection, daemon-synced in external topology, local otherwise. */
|
|
42
42
|
get(): PowerSurfaceState;
|
|
43
43
|
/** Stop the poll + event subscription. */
|
|
44
44
|
stop(): void;
|
package/src/core/power-status.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// ---------------------------------------------------------------------------
|
|
2
|
-
// power-status.ts
|
|
2
|
+
// power-status.ts, the surface-facing view of host sleep ownership (power.*).
|
|
3
3
|
//
|
|
4
4
|
// The SDK's PowerManager owns the policy: a keep-awake toggle (daemon-held,
|
|
5
5
|
// persisted), automatic work-signal inhibition ("held because X"), and the
|
|
6
6
|
// honest lid-split note when idle-sleep can be blocked but lid-close suspend
|
|
7
|
-
// can't. This module is the read-only projection every surface renders from
|
|
8
|
-
// the always-visible "sleep disabled" chip, and the ops/status detail lines
|
|
7
|
+
// can't. This module is the read-only projection every surface renders from,
|
|
8
|
+
// the always-visible "sleep disabled" chip, and the ops/status detail lines,
|
|
9
9
|
// seeded from powerManager.getState() and kept live by OPS_POWER_STATE_CHANGED.
|
|
10
10
|
//
|
|
11
11
|
// Owner ruling: the chip IS the safety mechanism. No timers, no AC-only
|
|
12
|
-
// options
|
|
12
|
+
// options, the keep-awake toggle is exactly one boolean.
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
|
|
15
15
|
import { LID_SWITCH_HONEST_SPLIT, type PowerState } from '@pellux/goodvibes-sdk/platform/power';
|
|
@@ -19,7 +19,7 @@ export const SLEEP_DISABLED_CHIP = 'sleep disabled';
|
|
|
19
19
|
|
|
20
20
|
/** The flattened power state a surface renders from. */
|
|
21
21
|
export interface PowerSurfaceState {
|
|
22
|
-
/** The owner keep-awake toggle
|
|
22
|
+
/** The owner keep-awake toggle, the "sleep disabled" chip source. */
|
|
23
23
|
readonly keepAwake: boolean;
|
|
24
24
|
/** True while any sleep inhibitor (work or keep-awake) is held. */
|
|
25
25
|
readonly inhibited: boolean;
|
|
@@ -29,7 +29,7 @@ export interface PowerSurfaceState {
|
|
|
29
29
|
readonly note: string | null;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
/** The neutral state (no inhibition, nothing held)
|
|
32
|
+
/** The neutral state (no inhibition, nothing held), the pre-event seed default. */
|
|
33
33
|
export const IDLE_POWER_STATE: PowerSurfaceState = {
|
|
34
34
|
keepAwake: false,
|
|
35
35
|
inhibited: false,
|
|
@@ -66,7 +66,7 @@ export function powerSurfaceFromEvent(ev: PowerStateChangedPayload): PowerSurfac
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
* The ops/status detail lines
|
|
69
|
+
* The ops/status detail lines, the honest, plain-language account of sleep
|
|
70
70
|
* ownership. Order: the chip's meaning, then each "held because X" work reason,
|
|
71
71
|
* then the lid-split note VERBATIM when the SDK served it. Empty when nothing
|
|
72
72
|
* is held and no note applies.
|
|
@@ -74,7 +74,7 @@ export function powerSurfaceFromEvent(ev: PowerStateChangedPayload): PowerSurfac
|
|
|
74
74
|
export function powerStatusLines(state: PowerSurfaceState): string[] {
|
|
75
75
|
const lines: string[] = [];
|
|
76
76
|
if (state.keepAwake) {
|
|
77
|
-
lines.push(`${SLEEP_DISABLED_CHIP}
|
|
77
|
+
lines.push(`${SLEEP_DISABLED_CHIP}: keep-awake is on (this host will not idle-sleep)`);
|
|
78
78
|
}
|
|
79
79
|
for (const reason of state.workReasons) {
|
|
80
80
|
lines.push(`held because ${reason}`);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* rewind-receipt.ts
|
|
2
|
+
* rewind-receipt.ts, transcript rendering for an applied unified rewind.
|
|
3
3
|
*
|
|
4
4
|
* The SDK's UnifiedRewindService returns a RewindReceipt from rewind.apply (and
|
|
5
5
|
* emits a matching REWIND_APPLIED workspace event). This module turns that
|
|
6
6
|
* receipt into a distinct, multi-line `[Rewind]` block, mirroring the
|
|
7
7
|
* `[Compaction]` receipt (compaction-receipt.ts) so a rewind is never a silent
|
|
8
|
-
* mutation of files or conversation history
|
|
8
|
+
* mutation of files or conversation history, the transcript records exactly
|
|
9
9
|
* what was restored and whether it can be reversed.
|
|
10
10
|
*
|
|
11
11
|
* The `[Rewind]` prefix is one of the FORCE_CONVERSATION_PREFIXES the
|
|
@@ -42,13 +42,13 @@ function describeAnchor(turnId: string | null): string {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* Build the distinct multi-line `[Rewind]` receipt block. Pure
|
|
45
|
+
* Build the distinct multi-line `[Rewind]` receipt block. Pure, no state, no
|
|
46
46
|
* I/O. Lines after the header are indented two spaces so the transcript renders
|
|
47
47
|
* them as one grouped block under the `[Rewind] Receipt` heading.
|
|
48
48
|
*/
|
|
49
49
|
export function buildRewindReceiptBlock(receipt: RewindReceiptInput): string {
|
|
50
50
|
const lines: string[] = [];
|
|
51
|
-
lines.push(`[Rewind] Receipt
|
|
51
|
+
lines.push(`[Rewind] Receipt: rewound ${receipt.scope} to ${describeAnchor(receipt.turnId)}.`);
|
|
52
52
|
|
|
53
53
|
if (receipt.files) {
|
|
54
54
|
if (receipt.files.restored) {
|
|
@@ -57,7 +57,7 @@ export function buildRewindReceiptBlock(receipt: RewindReceiptInput): string {
|
|
|
57
57
|
`removed ${plural(receipt.files.removedFileCount, 'file')}.`,
|
|
58
58
|
);
|
|
59
59
|
} else {
|
|
60
|
-
lines.push(' Files: not restored
|
|
60
|
+
lines.push(' Files: not restored; no workspace checkpoint matched this anchor.');
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -65,7 +65,7 @@ export function buildRewindReceiptBlock(receipt: RewindReceiptInput): string {
|
|
|
65
65
|
if (receipt.conversation.rewound) {
|
|
66
66
|
lines.push(` Conversation: dropped ${plural(receipt.conversation.droppedMessages, 'message')} after this turn.`);
|
|
67
67
|
} else {
|
|
68
|
-
lines.push(' Conversation: not rewound
|
|
68
|
+
lines.push(' Conversation: not rewound; no conversation boundary was recorded for this anchor.');
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* session-resume-core.ts
|
|
2
|
+
* session-resume-core.ts, the ONE resume routine both resume seams call.
|
|
3
3
|
*
|
|
4
4
|
* Two independent call sites used to duplicate (and diverge from) this
|
|
5
5
|
* sequence: `/session resume` (session-workflow.ts) and the panel/session-
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* logging the outcome in their own idiom (`ctx.print` vs `conversation.log`),
|
|
24
24
|
* and any extra plumbing that only one seam performs (hookDispatcher.fire,
|
|
25
25
|
* sessionSpine.reopen, sharedSessionBroker.reopenSession,
|
|
26
|
-
* writeLastSessionPointer
|
|
26
|
+
* writeLastSessionPointer, all bootstrap-hook-bridge-only, pre-existing
|
|
27
27
|
* asymmetries out of this module's scope).
|
|
28
28
|
*/
|
|
29
29
|
import type { SessionManager, SessionMeta } from '@pellux/goodvibes-sdk/platform/sessions';
|
|
@@ -52,7 +52,7 @@ export interface SessionResumeDeps {
|
|
|
52
52
|
* The app's declare-once session-storage handle. Both resume seams pass the
|
|
53
53
|
* SAME one the runtime writes through, so the anchor sidecar and the
|
|
54
54
|
* transcript journal this routine reads are guaranteed to be the files the
|
|
55
|
-
* live session actually wrote
|
|
55
|
+
* live session actually wrote, the scope can no longer be re-guessed per
|
|
56
56
|
* seam.
|
|
57
57
|
*/
|
|
58
58
|
readonly surface: SessionSurface;
|
|
@@ -65,7 +65,7 @@ export interface SessionResumeDeps {
|
|
|
65
65
|
readonly selectModel?: (model: string) => Promise<{ readonly registryKey: string; readonly providerId: string }>;
|
|
66
66
|
readonly hydrateSessionUsage?: () => void;
|
|
67
67
|
/**
|
|
68
|
-
* Deliberate cap on how many saved panels are reopened at once
|
|
68
|
+
* Deliberate cap on how many saved panels are reopened at once, resuming
|
|
69
69
|
* into a workspace crowded with every panel that happened to be open is
|
|
70
70
|
* its own kind of surprise. Overflow beyond the cap is reported in the
|
|
71
71
|
* outcome (`panels.notReopened`), never silently dropped. Defaults to 4.
|
|
@@ -76,7 +76,7 @@ export interface SessionResumeDeps {
|
|
|
76
76
|
export interface PanelReopenOutcome {
|
|
77
77
|
readonly reopened: readonly string[];
|
|
78
78
|
readonly movedToModal: readonly string[];
|
|
79
|
-
/** Saved panel ids beyond `panelReopenLimit
|
|
79
|
+
/** Saved panel ids beyond `panelReopenLimit`, not attempted, honestly reported (see /panels to open the rest). */
|
|
80
80
|
readonly notReopened: readonly string[];
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -90,7 +90,7 @@ export interface SessionResumeOutcome {
|
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* Exported so both session-workflow.ts's standalone `reopenPanelsFromReturnContext`
|
|
93
|
-
* (kept for its existing direct unit-test coverage
|
|
93
|
+
* (kept for its existing direct unit-test coverage, see
|
|
94
94
|
* session-workflow-panel-restore.test.ts) and `resumeSessionCore` below share
|
|
95
95
|
* the exact same default cap.
|
|
96
96
|
*/
|
|
@@ -107,7 +107,7 @@ export function reopenPanelsWithModalSkip(
|
|
|
107
107
|
const reopened: string[] = [];
|
|
108
108
|
const movedToModal: string[] = [];
|
|
109
109
|
for (const panelId of within) {
|
|
110
|
-
// A MIGRATE-TO-MODAL id has no panel to restore
|
|
110
|
+
// A MIGRATE-TO-MODAL id has no panel to restore, a modal is not part of
|
|
111
111
|
// the saved panel layout. Skip it (don't pop a modal mid-resume) and note
|
|
112
112
|
// it once, rather than firing open() and revealing an empty workspace.
|
|
113
113
|
if (panelManager.getModalRedirect(panelId) !== undefined) {
|
|
@@ -144,7 +144,7 @@ export async function resumeSessionCore(sessionId: string, deps: SessionResumeDe
|
|
|
144
144
|
deps.runtime.sessionId = sessionId;
|
|
145
145
|
|
|
146
146
|
// Restore this session's message-anchored rewind anchors from its sidecar
|
|
147
|
-
// so /rewind works identically before and after the resume
|
|
147
|
+
// so /rewind works identically before and after the resume, the in-memory
|
|
148
148
|
// registry is process-local, so a fresh process starts with none for the
|
|
149
149
|
// loaded session.
|
|
150
150
|
const restoredAnchorCount = restoreTurnAnchors(sessionId, deps.surface);
|