@pellux/goodvibes-tui 2.0.14 → 2.0.16
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 +49 -0
- package/README.md +64 -44
- package/docs/README.md +6 -6
- 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 +19 -19
- 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 +11 -11
- 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,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* terminal-bg-probe
|
|
2
|
+
* terminal-bg-probe, OSC 11 terminal-background detection for `auto` theme mode.
|
|
3
3
|
*
|
|
4
4
|
*. On startup, when appearance is `auto` and stdout is a TTY, we ask
|
|
5
5
|
* the terminal for its background colour with an OSC 11 query and classify the
|
|
@@ -7,21 +7,21 @@
|
|
|
7
7
|
* any timeout, any unparseable reply, any ambiguity resolves to DARK, which is
|
|
8
8
|
* the historical default and keeps headless/unsupported terminals byte-stable.
|
|
9
9
|
*
|
|
10
|
-
* Timing (Option B
|
|
10
|
+
* Timing (Option B, render dark first, repaint once if light wins):
|
|
11
11
|
* The probe never blocks startup. The splash renders immediately in dark; if a
|
|
12
12
|
* light reply arrives within the timeout window the caller flips the active mode
|
|
13
13
|
* to light and repaints ONCE. Rationale vs. blocking the first paint until the
|
|
14
14
|
* reply/timeout: blocking would tax EVERY non-responding terminal (tmux without
|
|
15
15
|
* passthrough, CI, old SSH hosts, dumb terminals) with up to `timeoutMs` of blank
|
|
16
|
-
* screen on every launch
|
|
16
|
+
* screen on every launch, the common failure case. Option B adds zero startup
|
|
17
17
|
* latency and costs at most a single dark→light repaint on genuinely light
|
|
18
18
|
* terminals (rare for this audience, one frame).
|
|
19
19
|
*
|
|
20
20
|
* Stream safety (never corrupt the composer):
|
|
21
21
|
* The reply arrives on the same stdin the keyboard uses. filterInput() sits at
|
|
22
22
|
* the very front of the stdin handler (before blocking-input / paste / the
|
|
23
|
-
* tokenizer). It passes every non-OSC-11 byte straight through
|
|
24
|
-
* keystrokes reach the tokenizer untouched
|
|
23
|
+
* tokenizer). It passes every non-OSC-11 byte straight through, interleaved
|
|
24
|
+
* keystrokes reach the tokenizer untouched, and consumes ONLY a matched OSC 11
|
|
25
25
|
* reply (whole or split across chunks). On timeout, any buffered reply fragment
|
|
26
26
|
* is discarded rather than flushed, so partial/garbled response bytes can never
|
|
27
27
|
* leak into the input pipeline.
|
|
@@ -111,7 +111,7 @@ export function parseColorSpec(spec: string): ProbeRgb | null {
|
|
|
111
111
|
* Classify a background colour as 'light' or 'dark' by relative luminance.
|
|
112
112
|
* Uses the Rec. 601 luma weights (0.299/0.587/0.114) normalized to 0..1 and
|
|
113
113
|
* splits at LUMINANCE_LIGHT_THRESHOLD (0.5): a background at least half as
|
|
114
|
-
* luminous as white reads as light. Conservative by construction
|
|
114
|
+
* luminous as white reads as light. Conservative by construction, the exact
|
|
115
115
|
* threshold only matters for mid-grey backgrounds, which are rare.
|
|
116
116
|
*/
|
|
117
117
|
export function classifyBackgroundLuminance(rgb: ProbeRgb): ThemeMode {
|
|
@@ -130,7 +130,7 @@ interface TerminatorSpan {
|
|
|
130
130
|
* Returns null if no terminator is present yet (reply still arriving). A lone
|
|
131
131
|
* trailing ESC returns null (wait for the next byte to tell ST from a stray ESC);
|
|
132
132
|
* an ESC followed by a non-'\' byte is treated as the end boundary (malformed
|
|
133
|
-
* terminator
|
|
133
|
+
* terminator, the body before it is still parsed, the stray byte passes through).
|
|
134
134
|
*/
|
|
135
135
|
function findTerminator(buffer: string, from: number): TerminatorSpan | null {
|
|
136
136
|
for (let k = from; k < buffer.length; k++) {
|
|
@@ -159,7 +159,7 @@ function trailingPrefixLen(buffer: string): number {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
// ---------------------------------------------------------------------------
|
|
162
|
-
// TerminalBackgroundProbe
|
|
162
|
+
// TerminalBackgroundProbe, the stateful stream filter + timing
|
|
163
163
|
// ---------------------------------------------------------------------------
|
|
164
164
|
|
|
165
165
|
export interface ProbeResolution {
|
|
@@ -177,7 +177,7 @@ export interface TerminalBackgroundProbeOptions {
|
|
|
177
177
|
/**
|
|
178
178
|
* Stateful OSC 11 reply filter. feed() takes a raw stdin chunk and returns the
|
|
179
179
|
* bytes that should continue down the input pipeline (everything except a matched
|
|
180
|
-
* OSC 11 reply). Resolves once
|
|
180
|
+
* OSC 11 reply). Resolves once, on the first complete reply or on timeout.
|
|
181
181
|
*/
|
|
182
182
|
export class TerminalBackgroundProbe {
|
|
183
183
|
/** True until resolved. filterInput() only calls feed() while active. */
|
|
@@ -259,7 +259,7 @@ export class TerminalBackgroundProbe {
|
|
|
259
259
|
clearTimeout(this.timer);
|
|
260
260
|
this.timer = null;
|
|
261
261
|
}
|
|
262
|
-
// Any bytes still buffered here are an incomplete/garbled reply fragment
|
|
262
|
+
// Any bytes still buffered here are an incomplete/garbled reply fragment,
|
|
263
263
|
// discard them so they can never leak into the composer.
|
|
264
264
|
this.buffer = '';
|
|
265
265
|
this.onResolve({ mode, reason });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* terminal-escapes
|
|
2
|
+
* terminal-escapes, the raw control sequences main.ts writes to enter/leave the
|
|
3
3
|
* TUI's terminal mode (alt screen, mouse, cursor, keyboard-extension, paste, and
|
|
4
4
|
* focus reporting). Extracted from main.ts as plain constants so the entry file
|
|
5
5
|
* stays within the source-file line-count gate; behaviour is unchanged.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* theme-mode-config
|
|
2
|
+
* theme-mode-config, the appearance/theme-mode preference, TUI-side.
|
|
3
3
|
*
|
|
4
4
|
* The preference lives at the config key `display.themeMode` (auto | dark |
|
|
5
5
|
* light, default auto), stored under the existing SDK `display` section
|
|
6
|
-
* alongside `display.theme` (the color palette
|
|
6
|
+
* alongside `display.theme` (the color palette, a separate, independent
|
|
7
7
|
* concept: theme picks the palette, themeMode picks light/dark appearance).
|
|
8
8
|
*
|
|
9
9
|
* `display.themeMode` is a real CONFIG_SCHEMA entry (SDK 2.0.0+); this module
|
|
@@ -28,7 +28,7 @@ export const THEME_MODE_CONFIG_KEY: ConfigKey = 'display.themeMode';
|
|
|
28
28
|
/**
|
|
29
29
|
* Default when unset: probe the terminal background on startup. Matches the
|
|
30
30
|
* CONFIG_SCHEMA default for display.themeMode (module-private: nothing
|
|
31
|
-
* outside this file needs the default value directly
|
|
31
|
+
* outside this file needs the default value directly, callers read the
|
|
32
32
|
* resolved mode via coerceThemeModeSetting/resolveConfiguredThemeMode).
|
|
33
33
|
*/
|
|
34
34
|
const THEME_MODE_DEFAULT: ThemeModeSetting = 'auto';
|
package/src/renderer/theme.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* theme.ts
|
|
2
|
+
* theme.ts, Semantic colour token layer.
|
|
3
3
|
*
|
|
4
4
|
* Defines named tokens for every colour decision in the markdown/compositor/
|
|
5
5
|
* conversation-rendering pipeline, resolved to concrete hex or ANSI-256 values
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* Differentiate inline code via inlineCodeFg + bold only; bg inherits terminal.
|
|
17
17
|
*
|
|
18
18
|
* resolveUiTones(mode) is the sibling read path for CHROME tokens (UI_TONES
|
|
19
|
-
* in ui-primitives.ts
|
|
19
|
+
* in ui-primitives.ts, panel/modal/overlay/fullscreen backgrounds, borders,
|
|
20
20
|
* status colours). It composes the same ThemeMode dimension so that
|
|
21
21
|
* DEFAULT_PANEL_PALETTE, DEFAULT_STYLE, FULLSCREEN_PALETTE and
|
|
22
22
|
* DEFAULT_OVERLAY_PALETTE all read through ONE mode-resolved path instead of
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
import { UI_TONES } from './ui-primitives.ts';
|
|
28
28
|
|
|
29
|
-
/** Background mode
|
|
29
|
+
/** Background mode, dark is the safe default for an unprobed terminal. */
|
|
30
30
|
export type ThemeMode = 'dark' | 'light';
|
|
31
31
|
|
|
32
32
|
/** Resolved semantic colour tokens (concrete hex strings or ANSI-256 indices). */
|
|
@@ -35,7 +35,7 @@ export interface ThemeTokens {
|
|
|
35
35
|
heading1: string;
|
|
36
36
|
/** H2 heading foreground */
|
|
37
37
|
heading2: string;
|
|
38
|
-
/** H3 heading foreground (ANSI-256
|
|
38
|
+
/** H3 heading foreground (ANSI-256, falls back to nearest on ansi256 terminals) */
|
|
39
39
|
heading3: string;
|
|
40
40
|
/** Inline code foreground (bold is applied separately by caller) */
|
|
41
41
|
inlineCodeFg: string;
|
|
@@ -69,7 +69,7 @@ export interface ThemeTokens {
|
|
|
69
69
|
modelNameDim: string;
|
|
70
70
|
/** Tool name foreground in tool-result event line */
|
|
71
71
|
toolNameFg: string;
|
|
72
|
-
/** Diff block accent
|
|
72
|
+
/** Diff block accent, marker, label, and collapsed-prefix foreground */
|
|
73
73
|
diffAccent: string;
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -103,13 +103,13 @@ const DARK: ThemeTokens = {
|
|
|
103
103
|
// Light palette
|
|
104
104
|
//
|
|
105
105
|
// Rationale per token:
|
|
106
|
-
// heading1/2: Deep teal (#0077aa)
|
|
106
|
+
// heading1/2: Deep teal (#0077aa), readable on white/cream terminals
|
|
107
107
|
// heading3: ANSI-256 #244 equivalent on light bg → use 24 (dark cyan)
|
|
108
|
-
// inlineCodeFg: Dark orange (#b45309)
|
|
109
|
-
// link: Standard blue (#0055cc)
|
|
110
|
-
// searchMatchBg: Muted yellow (#ffe066)
|
|
108
|
+
// inlineCodeFg: Dark orange (#b45309), distinguishable without a box bg
|
|
109
|
+
// link: Standard blue (#0055cc), matches browser convention
|
|
110
|
+
// searchMatchBg: Muted yellow (#ffe066), visible on light bg
|
|
111
111
|
// searchMatchFg: Black (#000000)
|
|
112
|
-
// searchCurrentBg: Strong amber (#f59e0b)
|
|
112
|
+
// searchCurrentBg: Strong amber (#f59e0b), current match is more vivid
|
|
113
113
|
// searchCurrentFg: Black (#000000)
|
|
114
114
|
// strikethrough: Medium gray (ANSI-256 244 stays; light terminals map it fine)
|
|
115
115
|
// blockquote: Dim blue-gray (ANSI-256 67)
|
|
@@ -117,11 +117,11 @@ const DARK: ThemeTokens = {
|
|
|
117
117
|
// reasoningAccent: Dark purple (#7c3aed)
|
|
118
118
|
// toolAccent: Dark sky (#0369a1)
|
|
119
119
|
// collapsedBodyBg: Very light gray (#f3f4f6)
|
|
120
|
-
// checkboxChecked: Forest green (#15803d)
|
|
121
|
-
// errorBarBg: Soft rose (#fee2e2)
|
|
122
|
-
// modelNameDim: Slate-500 (#64748b)
|
|
123
|
-
// toolNameFg: Slate-800 (#334155)
|
|
124
|
-
// diffAccent: Amber-700 (#b45309)
|
|
120
|
+
// checkboxChecked: Forest green (#15803d), AA on white (contrast ~5.2:1 on #fff)
|
|
121
|
+
// errorBarBg: Soft rose (#fee2e2), light error bar bg, legible text on top
|
|
122
|
+
// modelNameDim: Slate-500 (#64748b), dim label; contrast ~4.6:1 on #fff
|
|
123
|
+
// toolNameFg: Slate-800 (#334155), strong enough for tool names
|
|
124
|
+
// diffAccent: Amber-700 (#b45309), darker amber, contrast ~4.7:1 on #fff
|
|
125
125
|
// ---------------------------------------------------------------------------
|
|
126
126
|
const LIGHT: ThemeTokens = {
|
|
127
127
|
heading1: '#0077aa',
|
|
@@ -147,10 +147,10 @@ const LIGHT: ThemeTokens = {
|
|
|
147
147
|
};
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
|
-
* resolveTheme
|
|
150
|
+
* resolveTheme, Return the semantic token set for the given background mode.
|
|
151
151
|
*
|
|
152
152
|
* Call with the session's resolved mode; 'dark' is the safe default for a
|
|
153
|
-
* caller that has none. The returned object is frozen
|
|
153
|
+
* caller that has none. The returned object is frozen, do not mutate it.
|
|
154
154
|
*/
|
|
155
155
|
export function resolveTheme(mode: ThemeMode): Readonly<ThemeTokens> {
|
|
156
156
|
return mode === 'light' ? LIGHT : DARK;
|
|
@@ -163,15 +163,15 @@ Object.freeze(LIGHT);
|
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
165
|
* Default dark-mode token set, exported for convenience.
|
|
166
|
-
* Frozen
|
|
166
|
+
* Frozen, do not mutate.
|
|
167
167
|
*/
|
|
168
168
|
export const DARK_THEME: Readonly<ThemeTokens> = DARK;
|
|
169
169
|
|
|
170
170
|
// ---------------------------------------------------------------------------
|
|
171
|
-
// Chrome tokens (UI_TONES)
|
|
171
|
+
// Chrome tokens (UI_TONES), mode-resolved sibling to resolveTheme().
|
|
172
172
|
//
|
|
173
173
|
// UI_TONES (ui-primitives.ts) is the dark entry. The light entry mirrors
|
|
174
|
-
// dark for every role that has no light-appropriate equivalent yet
|
|
174
|
+
// dark for every role that has no light-appropriate equivalent yet, the
|
|
175
175
|
// deliverable is the mode dimension and single read path, not a
|
|
176
176
|
// shipped light chrome theme (see module doc comment above).
|
|
177
177
|
// ---------------------------------------------------------------------------
|
|
@@ -184,19 +184,19 @@ type DeepWidenToString<T> = T extends string ? string : { [K in keyof T]: DeepWi
|
|
|
184
184
|
export type UiToneTokens = DeepWidenToString<typeof UI_TONES>;
|
|
185
185
|
|
|
186
186
|
//
|
|
187
|
-
// chrome
|
|
187
|
+
// chrome.*, persistent header/footer/thinking foregrounds that paint on the
|
|
188
188
|
// TRANSPARENT terminal background (see the chrome group's doc in
|
|
189
189
|
// ui-primitives.ts). Unlike fg.muted/fg.dim (which stay light for the opaque
|
|
190
190
|
// dark modal/panel boxes), these invert toward dark so they read on a light
|
|
191
191
|
// terminal. Contrast ratios below are against a white terminal (#ffffff),
|
|
192
192
|
// matching the discipline of the LIGHT ThemeTokens above:
|
|
193
|
-
// label: Slate-500 (#64748b)
|
|
194
|
-
// faint: Slate-400 (#94a3b8)
|
|
193
|
+
// label: Slate-500 (#64748b), header title; ~4.9:1 on #fff (matches modelNameDim)
|
|
194
|
+
// faint: Slate-400 (#94a3b8), version/rule/clean-git; ~2.7:1 on #fff, deliberately
|
|
195
195
|
// faint (mirrors the low-contrast intent of the dark fg.dim role)
|
|
196
|
-
// warn: Amber-700 (#b45309)
|
|
197
|
-
// bad: Red-600 (#dc2626)
|
|
198
|
-
// good: Forest-700 (#15803d)
|
|
199
|
-
// remote: Violet-700 (#6d28d9)
|
|
196
|
+
// warn: Amber-700 (#b45309), dirty git / pending risk; ~5.0:1 on #fff (matches diffAccent)
|
|
197
|
+
// bad: Red-600 (#dc2626), DANGER banner / shell risk (bold); ~5.3:1 on #fff
|
|
198
|
+
// good: Forest-700 (#15803d), tool-call ✓ status; ~5.02:1 on #fff (matches checkboxChecked)
|
|
199
|
+
// remote: Violet-700 (#6d28d9), risk:remote marker / plain status; ~7.10:1 on #fff,
|
|
200
200
|
// deliberately distinct from reasoningAccent (#7c3aed) so the remote-risk cue
|
|
201
201
|
// never reads as a reasoning accent on a light terminal
|
|
202
202
|
const UI_TONES_LIGHT: UiToneTokens = {
|
|
@@ -229,11 +229,11 @@ Object.freeze(UI_TONES_LIGHT.chrome);
|
|
|
229
229
|
Object.freeze(UI_TONES_LIGHT);
|
|
230
230
|
|
|
231
231
|
/**
|
|
232
|
-
* resolveUiTones
|
|
232
|
+
* resolveUiTones, Return the chrome (panel/modal/overlay/fullscreen) token
|
|
233
233
|
* set for the given background mode. Single read path for UI_TONES; the
|
|
234
234
|
* 'dark' resolution is byte-identical to the UI_TONES constant.
|
|
235
235
|
*
|
|
236
|
-
* Prefer activeUiTones() at call sites
|
|
236
|
+
* Prefer activeUiTones() at call sites, resolveUiTones is the pure per-mode
|
|
237
237
|
* resolver underneath it.
|
|
238
238
|
*/
|
|
239
239
|
export function resolveUiTones(mode: ThemeMode): Readonly<UiToneTokens> {
|
|
@@ -243,8 +243,8 @@ export function resolveUiTones(mode: ThemeMode): Readonly<UiToneTokens> {
|
|
|
243
243
|
// ===========================================================================
|
|
244
244
|
// Active-mode runtime.
|
|
245
245
|
//
|
|
246
|
-
// The mode is decided ONCE at startup
|
|
247
|
-
// forced dark/light) or the terminal-background probe (auto)
|
|
246
|
+
// The mode is decided ONCE at startup, from appearance config (display.themeMode
|
|
247
|
+
// forced dark/light) or the terminal-background probe (auto), and is then stable
|
|
248
248
|
// for the session. Two read shapes exist because the two token layers are
|
|
249
249
|
// consumed differently:
|
|
250
250
|
//
|
|
@@ -277,7 +277,7 @@ const themeRefreshers: Array<() => void> = [];
|
|
|
277
277
|
* Register an in-place palette rebuild to run whenever the active mode changes.
|
|
278
278
|
* Base-palette owners register at their own module-eval time (before any
|
|
279
279
|
* extendPalette-derived palette, which depends on the base), so refreshers run
|
|
280
|
-
* base-first
|
|
280
|
+
* base-first, the ordering the extended palettes require to re-merge correctly.
|
|
281
281
|
*/
|
|
282
282
|
export function registerThemeRefresh(rebuild: () => void): void {
|
|
283
283
|
themeRefreshers.push(rebuild);
|
|
@@ -293,12 +293,12 @@ export function setActiveThemeMode(mode: ThemeMode): void {
|
|
|
293
293
|
for (const rebuild of themeRefreshers) rebuild();
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
/** Transcript tokens for the active mode
|
|
296
|
+
/** Transcript tokens for the active mode, read live, per render. */
|
|
297
297
|
export function activeTheme(): Readonly<ThemeTokens> {
|
|
298
298
|
return resolveTheme(activeMode);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
/** Chrome tokens for the active mode
|
|
301
|
+
/** Chrome tokens for the active mode, used to build (and rebuild) palettes. */
|
|
302
302
|
export function activeUiTones(): Readonly<UiToneTokens> {
|
|
303
303
|
return resolveUiTones(activeMode);
|
|
304
304
|
}
|
package/src/renderer/thinking.ts
CHANGED
|
@@ -8,7 +8,7 @@ export function renderThinkingBlock(text: string, width: number): Line[] {
|
|
|
8
8
|
// terminal background (renderConversationNotice passes no bodyBg), so both
|
|
9
9
|
// colors resolve per-render through activeUiTones() to stay legible on a
|
|
10
10
|
// light terminal. Dark values are byte-identical to the prior static reads
|
|
11
|
-
// (state.reasoning for the accent, chrome.faint
|
|
11
|
+
// (state.reasoning for the accent, chrome.faint, which equals fg.dim, for
|
|
12
12
|
// the body text).
|
|
13
13
|
const t = activeUiTones();
|
|
14
14
|
return renderConversationNotice(
|
|
@@ -198,9 +198,9 @@ export function renderToolCallBlock(
|
|
|
198
198
|
|
|
199
199
|
|
|
200
200
|
// Status icon. 'pending' means the tool is still awaiting a decision
|
|
201
|
-
// (e.g. an approval prompt) and has NOT run yet
|
|
201
|
+
// (e.g. an approval prompt) and has NOT run yet, it uses the hollow idle
|
|
202
202
|
// glyph so a not-yet-run tool never shows the completed green ✓ (2c).
|
|
203
|
-
// 'cancelled' means the user stopped THIS call mid-flight
|
|
203
|
+
// 'cancelled' means the user stopped THIS call mid-flight, the blocked glyph
|
|
204
204
|
// in the warn tone, distinct from both success and a real error.
|
|
205
205
|
const icon = status === 'done' ? TOOL_STATUS.SUCCESS_ICON
|
|
206
206
|
: status === 'error' ? TOOL_STATUS.FAIL_ICON
|
|
@@ -233,8 +233,8 @@ export function renderToolCallBlock(
|
|
|
233
233
|
: contentEnd;
|
|
234
234
|
let col: number = leftStart;
|
|
235
235
|
|
|
236
|
-
// In tree mode the status glyph goes in the bullet column
|
|
237
|
-
// as the `●` of the `● assistant` header this row hangs under
|
|
236
|
+
// In tree mode the status glyph goes in the bullet column, the same column
|
|
237
|
+
// as the `●` of the `● assistant` header this row hangs under, so a turn's
|
|
238
238
|
// markers read as that bullet's column continuing down the turn. The row's
|
|
239
239
|
// own text then starts at its depth's text column with no inline icon slot.
|
|
240
240
|
if (inTree) {
|
|
@@ -246,7 +246,7 @@ export function renderToolCallBlock(
|
|
|
246
246
|
col += 2; // icon + space
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
// Tool name
|
|
249
|
+
// Tool name, extract short name for long MCP tool names, but keep a readable dynamic width.
|
|
250
250
|
const rawName = toolCall.name.includes('__')
|
|
251
251
|
? toolCall.name.split('__').pop()!
|
|
252
252
|
: toolCall.name;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tool-result-expanded-lines.ts
|
|
2
|
+
* tool-result-expanded-lines.ts, the single source of truth for how many
|
|
3
3
|
* screen lines a tool-result message's EXPANDED form actually renders to.
|
|
4
4
|
*
|
|
5
5
|
* Tool-result content gets pretty-printed (JSON.stringify(parsed, null, 2))
|
|
6
6
|
* or diff-rendered before display, so the raw message's `content.split('\n')`
|
|
7
|
-
* length is not what the user sees once expanded
|
|
7
|
+
* length is not what the user sees once expanded, a one-line JSON blob can
|
|
8
8
|
* pretty-print to 50 lines. Both the per-block "N lines" badge
|
|
9
9
|
* (conversation-rendering.ts) and the folded-group total (conversation-tool-
|
|
10
10
|
* groups.ts) must count the SAME post-render lines, or the two disagree with
|
|
@@ -41,7 +41,7 @@ export function renderExpandedToolResultLines(content: string, width: number): L
|
|
|
41
41
|
const parsed = JSON.parse(contentToRender);
|
|
42
42
|
contentToRender = `\`\`\`json\n${JSON.stringify(parsed, null, 2)}\n\`\`\``;
|
|
43
43
|
} catch {
|
|
44
|
-
// Leave invalid JSON as-is
|
|
44
|
+
// Leave invalid JSON as-is, falls through to the plain markdown render below.
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
return renderMarkdownTracked(contentToRender, width).lines;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* summarizeToolResult
|
|
2
|
+
* summarizeToolResult, one-line human summaries for tool RESULTS, so the
|
|
3
3
|
* transcript (and the fleet attach view, which shares the same rendering seam
|
|
4
4
|
* in conversation-rendering.ts) shows "wrote haiku.txt (532 B)" instead of a
|
|
5
5
|
* raw `{"files_written":1,"bytes_written":532,...}` JSON blob. The full payload
|
|
6
|
-
* stays reachable behind the existing collapse/expand toggle
|
|
6
|
+
* stays reachable behind the existing collapse/expand toggle, this only
|
|
7
7
|
* changes the collapsed preview line, never destroys data. (item 3.)
|
|
8
8
|
*
|
|
9
|
-
* Returning `null` means "no honest summary for this shape"
|
|
9
|
+
* Returning `null` means "no honest summary for this shape", the caller then
|
|
10
10
|
* falls back to the previous raw-first-line preview, so an unrecognised tool or
|
|
11
11
|
* an unexpected payload is never mis-summarised.
|
|
12
12
|
*/
|
|
@@ -95,7 +95,7 @@ function summarizeEdit(obj: Record<string, unknown>): string | null {
|
|
|
95
95
|
|
|
96
96
|
// The credential scrub's withheld_env report stays OUT of the collapsed line
|
|
97
97
|
// entirely. It withholds the same standing set of names on every spawn, so any
|
|
98
|
-
// per-result rendering repeats identical env-var noise all session long
|
|
98
|
+
// per-result rendering repeats identical env-var noise all session long, the
|
|
99
99
|
// dominant transcript spam for anyone with several keys exported. The report
|
|
100
100
|
// only matters when a command fails because a needed credential was scrubbed,
|
|
101
101
|
// and for that case the full name list is one expand away in the raw payload.
|
|
@@ -104,7 +104,7 @@ function summarizeEdit(obj: Record<string, unknown>): string | null {
|
|
|
104
104
|
* Compact per-command exec-sandbox suffix: `sandboxed` fields are present
|
|
105
105
|
* only when the sandbox was active for the run (SDK's attachSandboxMeta stays
|
|
106
106
|
* quiet otherwise), so absence here means "ran unsandboxed" and the suffix is
|
|
107
|
-
* empty
|
|
107
|
+
* empty, never a fabricated claim either way.
|
|
108
108
|
*
|
|
109
109
|
* sandboxed, network disabled -> " · sandboxed (net off)"
|
|
110
110
|
* sandboxed, network enabled, escalation -> " · sandboxed (net on, +1 escalation)"
|
|
@@ -151,7 +151,7 @@ function summarizeExec(obj: Record<string, unknown>): string | null {
|
|
|
151
151
|
const failed = obj.commands.filter(
|
|
152
152
|
(c) => c && typeof c === 'object' && (c as Record<string, unknown>).success === false,
|
|
153
153
|
).length;
|
|
154
|
-
// Count sandboxed commands across the batch
|
|
154
|
+
// Count sandboxed commands across the batch, a compact "N sandboxed" beats
|
|
155
155
|
// repeating each command's full boundary detail on the collapsed line.
|
|
156
156
|
const sandboxedCount = obj.commands.filter(
|
|
157
157
|
(c) => c && typeof c === 'object' && (c as Record<string, unknown>).sandboxed === true,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* Reality check (since updated): the TUI's main interactive
|
|
16
16
|
* session DOES route through this engine. The SDK `Orchestrator` runs per-turn
|
|
17
17
|
* passive injection on the evolving primary conversation and records each turn
|
|
18
|
-
* on its own bounded ring, exposed via `Orchestrator.getTurnInjections()
|
|
18
|
+
* on its own bounded ring, exposed via `Orchestrator.getTurnInjections()`, the
|
|
19
19
|
* main-session counterpart to `AgentRecord.turnInjections` (there is no
|
|
20
20
|
* AgentRecord for the primary conversation). `buildMainSessionTurnInjectionsText`
|
|
21
21
|
* renders that ring for `/recall injections` with no agent id. Spawned agents
|
|
@@ -55,18 +55,18 @@ function codeSkipNote(entry: TurnInjectionEntry): string {
|
|
|
55
55
|
export function formatTurnInjectionEntry(entry: TurnInjectionEntry): string {
|
|
56
56
|
const backendTag = entry.embeddingBackend === 'fallback-lexical' ? ' [lexical fallback]' : '';
|
|
57
57
|
if (entry.injectedIds.length === 0) {
|
|
58
|
-
// Honest empty state: the engine ran this turn but injected nothing
|
|
58
|
+
// Honest empty state: the engine ran this turn but injected nothing,
|
|
59
59
|
// distinct from "the engine never ran" (see buildTurnInjectionsText).
|
|
60
60
|
const reasonText = entry.reason === 'no records cleared relevance floor'
|
|
61
|
-
? 'nothing injected this turn
|
|
62
|
-
: `nothing injected this turn
|
|
61
|
+
? 'nothing injected this turn: nothing cleared the relevance floor'
|
|
62
|
+
: `nothing injected this turn: ${entry.reason ?? 'unknown reason'}`;
|
|
63
63
|
const codeConsidered = entry.codeCandidatesConsidered ? `, code considered ${entry.codeCandidatesConsidered}` : '';
|
|
64
64
|
return ` turn ${entry.turn}: ${reasonText}${backendTag} (considered ${entry.candidatesConsidered}${codeConsidered}, floor ${entry.relevanceFloor})${codeSkipNote(entry)}`;
|
|
65
65
|
}
|
|
66
66
|
const droppedStr = entry.droppedForBudget.length > 0
|
|
67
67
|
? `, dropped for budget: ${entry.droppedForBudget.join(', ')}`
|
|
68
68
|
: '';
|
|
69
|
-
// The retrieval query is part of the record's honesty contract
|
|
69
|
+
// The retrieval query is part of the record's honesty contract, without it
|
|
70
70
|
// an injected line can't be traced back to WHY those ids were retrieved
|
|
71
71
|
// (a replay finding flagged the omission). Truncated to keep the line scannable.
|
|
72
72
|
const queryStr = entry.query ? ` for ${JSON.stringify(truncateQuery(entry.query))}` : '';
|
|
@@ -87,7 +87,7 @@ function truncateQuery(query: string): string {
|
|
|
87
87
|
*
|
|
88
88
|
* An empty `entries` array is deliberately ambiguous about WHY it's empty
|
|
89
89
|
* (flag disabled, no turn with new input has run yet, or every turn's token
|
|
90
|
-
* budget had no headroom)
|
|
90
|
+
* budget had no headroom), the SDK does not distinguish these cases in the
|
|
91
91
|
* ring itself, so this renders all three possibilities rather than guessing.
|
|
92
92
|
*/
|
|
93
93
|
export function buildTurnInjectionsText(agentId: string, entries: readonly TurnInjectionEntry[]): string {
|
|
@@ -95,7 +95,7 @@ export function buildTurnInjectionsText(agentId: string, entries: readonly TurnI
|
|
|
95
95
|
return (
|
|
96
96
|
`[recall] No per-turn injection records for agent ${agentId} yet. This means one of: ` +
|
|
97
97
|
'passive knowledge injection is disabled, no turn with new input has run yet, or the ' +
|
|
98
|
-
'token budget had no headroom on every turn so far
|
|
98
|
+
'token budget had no headroom on every turn so far; there is no record either way.'
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
101
|
const lines = [`[recall] Per-turn knowledge injections for agent ${agentId} (${entries.length}, most recent first):`];
|
|
@@ -114,7 +114,7 @@ export function buildTurnInjectionsText(agentId: string, entries: readonly TurnI
|
|
|
114
114
|
*
|
|
115
115
|
* As with the agent path, an empty `entries` array is deliberately ambiguous
|
|
116
116
|
* about WHY it's empty (flag disabled, no turn with new input has run yet, or
|
|
117
|
-
* every turn's token budget had no headroom)
|
|
117
|
+
* every turn's token budget had no headroom), the ring does not distinguish
|
|
118
118
|
* these, so this renders all three possibilities rather than guessing.
|
|
119
119
|
*/
|
|
120
120
|
export function buildMainSessionTurnInjectionsText(entries: readonly TurnInjectionEntry[]): string {
|
|
@@ -122,7 +122,7 @@ export function buildMainSessionTurnInjectionsText(entries: readonly TurnInjecti
|
|
|
122
122
|
return (
|
|
123
123
|
'[recall] No per-turn injection records for the main session yet. This means one of: ' +
|
|
124
124
|
'passive knowledge injection is disabled, no turn with new input has run yet, or the ' +
|
|
125
|
-
'token budget had no headroom on every turn so far
|
|
125
|
+
'token budget had no headroom on every turn so far; there is no record either way.'
|
|
126
126
|
);
|
|
127
127
|
}
|
|
128
128
|
const lines = [`[recall] Per-turn knowledge injections for the main session (${entries.length}, most recent first):`];
|