@pellux/goodvibes-tui 1.27.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +125 -2
- package/README.md +7 -9
- package/bin/goodvibes +2 -2
- package/bin/launcher-support.js +8 -4
- package/docs/README.md +11 -2
- package/docs/foundation-artifacts/operator-contract.json +6403 -2347
- package/package.json +14 -25
- package/scripts/postinstall.js +35 -35
- package/src/audio/spoken-turn-model-routing.ts +1 -1
- package/src/cli/bundle-command.ts +5 -5
- package/src/cli/completions/generate.ts +1 -1
- package/src/cli/doctor.ts +3 -3
- package/src/cli/entrypoint.ts +12 -7
- package/src/cli/help.ts +4 -5
- package/src/cli/hooks-command.ts +1 -1
- package/src/cli/index.ts +1 -4
- package/src/cli/launch-auto-update.ts +59 -7
- package/src/cli/management-commands.ts +6 -6
- package/src/cli/management-utils.ts +5 -5
- package/src/cli/management.ts +7 -7
- package/src/cli/network-posture.ts +1 -1
- package/src/cli/package-verification.ts +7 -6
- package/src/cli/plugin-bundles-command.ts +1 -1
- package/src/cli/plugin-command.ts +2 -2
- package/src/cli/service-command.ts +2 -2
- package/src/cli/service-posture.ts +4 -4
- package/src/cli/status.ts +9 -8
- package/src/cli/surface-command.ts +4 -4
- package/src/cli/tui-startup.ts +12 -3
- package/src/cli-flags.ts +3 -3
- package/src/config/goodvibes-home-audit.ts +0 -2
- package/src/config/secret-config.ts +37 -5
- package/src/config/tui-extension-settings.ts +1 -1
- package/src/core/approval-alert.ts +2 -2
- package/src/core/budget-breach-notifier.ts +3 -3
- package/src/core/conversation-compaction-render.ts +1 -1
- package/src/core/conversation-line-cache.ts +1 -1
- package/src/core/conversation-render-context.ts +1 -1
- package/src/core/conversation-rendering.ts +2 -2
- package/src/core/conversation.ts +10 -10
- package/src/core/long-task-notifier.ts +2 -2
- package/src/core/memory-diagnostics-gateway.ts +1 -1
- package/src/core/scriptable-statusline.ts +1 -1
- package/src/core/session-auto-titler.ts +1 -1
- package/src/core/session-resume-core.ts +2 -2
- package/src/core/stream-event-wiring.ts +24 -44
- package/src/core/terminal-notifier.ts +3 -3
- package/src/core/turn-cancellation.ts +1 -1
- package/src/core/turn-event-wiring.ts +5 -5
- package/src/input/command-registry.ts +6 -6
- package/src/input/commands/channel-pairing.ts +1 -1
- package/src/input/commands/cluster-runtime.ts +1 -1
- package/src/input/commands/codebase-runtime.ts +1 -1
- package/src/input/commands/devices-runtime.ts +1 -1
- package/src/input/commands/hosted-runtime.ts +330 -0
- package/src/input/commands/local-setup-review.ts +1 -1
- package/src/input/commands/local-setup-transfer.ts +2 -2
- package/src/input/commands/local-setup.ts +3 -3
- package/src/input/commands/managed-runtime.ts +2 -2
- package/src/input/commands/operator-rpc.ts +24 -110
- package/src/input/commands/payment-card-intake.ts +1 -1
- package/src/input/commands/permissions-provenance.ts +2 -2
- package/src/input/commands/plugin-runtime.ts +1 -1
- package/src/input/commands/provider.ts +1 -1
- package/src/input/commands/relay-runtime.ts +18 -9
- package/src/input/commands/rewind-runtime.ts +1 -1
- package/src/input/commands/runtime-services.ts +1 -1
- package/src/input/commands/services-runtime.ts +1 -1
- package/src/input/commands/session-workflow.ts +1 -1
- package/src/input/commands/settings-sync-runtime.ts +2 -2
- package/src/input/commands/share-runtime.ts +1 -1
- package/src/input/commands/tasks-runtime.ts +145 -55
- package/src/input/commands/update-runtime.ts +31 -28
- package/src/input/commands/work-plan-runtime.ts +2 -2
- package/src/input/commands/workstream-attempts.ts +1 -1
- package/src/input/commands/workstream-runtime.ts +2 -2
- package/src/input/commands.ts +2 -0
- package/src/input/feature-unit-layout.ts +1 -1
- package/src/input/feed-context-factory.ts +3 -3
- package/src/input/handler-content-actions.ts +2 -2
- package/src/input/handler-feed-routes.ts +1 -1
- package/src/input/handler-feed.ts +3 -3
- package/src/input/handler-modal-token-routes.ts +1 -1
- package/src/input/handler-onboarding-daemon-adopt.ts +3 -2
- package/src/input/handler-onboarding.ts +1 -1
- package/src/input/handler-types.ts +2 -2
- package/src/input/handler-ui-state.ts +1 -1
- package/src/input/handler.ts +4 -4
- package/src/input/input-history.ts +1 -1
- package/src/input/onboarding/onboarding-feature-units.ts +2 -2
- package/src/input/onboarding/onboarding-runtime-status.ts +15 -1
- package/src/input/onboarding/onboarding-wizard-apply.ts +17 -8
- package/src/input/onboarding/onboarding-wizard-cloudflare-step.ts +5 -3
- package/src/input/onboarding/onboarding-wizard-external-surfaces.ts +1 -1
- package/src/input/onboarding/onboarding-wizard-types.ts +1 -1
- package/src/input/payments-config.ts +6 -6
- package/src/input/search.ts +1 -1
- package/src/input/session-picker-modal.ts +46 -0
- package/src/input/settings-modal-activation.ts +1 -1
- package/src/input/settings-modal-behavior.ts +4 -4
- package/src/input/settings-modal-commit.ts +11 -0
- package/src/input/settings-modal-data.ts +13 -80
- package/src/input/settings-modal-mutations.ts +33 -0
- package/src/input/settings-modal-secrets.ts +34 -0
- package/src/input/settings-modal-subscriptions.ts +1 -1
- package/src/input/settings-modal-types.ts +15 -1
- package/src/input/settings-modal.ts +28 -3
- package/src/input/worktree-setup-config.ts +1 -1
- package/src/main.ts +11 -9
- package/src/panels/agent-inspector-shared.ts +2 -2
- package/src/panels/base-panel.ts +2 -2
- package/src/panels/builtin/operations.ts +6 -8
- package/src/panels/builtin/session.ts +17 -0
- package/src/panels/builtin/shared.ts +5 -5
- package/src/panels/builtin-modals.ts +3 -3
- package/src/panels/confirm-state.ts +1 -1
- package/src/panels/cost-tracker-panel.ts +4 -4
- package/src/panels/diff-panel.ts +2 -2
- package/src/panels/diff-review-panel.ts +2 -2
- package/src/panels/expandable-list-panel.ts +2 -2
- package/src/panels/fleet-acts.ts +1 -1
- package/src/panels/fleet-observed-render.ts +1 -1
- package/src/panels/fleet-panel-format.ts +1 -1
- package/src/panels/fleet-panel.ts +1 -1
- package/src/panels/fleet-spawn.ts +1 -1
- package/src/panels/fleet-steer.ts +1 -1
- package/src/panels/fleet-transcript.ts +1 -1
- package/src/panels/git-panel.ts +1 -1
- package/src/panels/hosted-session-feed.ts +352 -0
- package/src/panels/hosted-session-panel.ts +221 -0
- package/src/panels/local-auth-panel.ts +3 -3
- package/src/panels/modals/devices-modal.ts +1 -1
- package/src/panels/modals/local-auth-modal.ts +1 -1
- package/src/panels/modals/pairing-modal.ts +1 -1
- package/src/panels/modals/services-modal.ts +1 -1
- package/src/panels/modals/settings-sync-modal.ts +1 -1
- package/src/panels/modals/subscription-modal.ts +1 -1
- package/src/panels/modals/work-plan-modal.ts +1 -1
- package/src/panels/notifications-panel.ts +1 -1
- package/src/panels/panel-confirm-overlay.ts +1 -1
- package/src/panels/plugins-panel.ts +2 -2
- package/src/panels/polish-core.ts +2 -2
- package/src/panels/polish-tables.ts +1 -1
- package/src/panels/polish.ts +2 -2
- package/src/panels/scrollable-list-panel.ts +3 -3
- package/src/panels/skills-panel.ts +3 -3
- package/src/panels/token-budget-panel.ts +5 -5
- package/src/panels/types.ts +1 -2
- package/src/permissions/prompt.ts +1 -1
- package/src/renderer/autocomplete-overlay.ts +1 -1
- package/src/renderer/block-actions-overlay.ts +1 -1
- package/src/renderer/bookmark-modal.ts +1 -1
- package/src/renderer/buffer.ts +1 -1
- package/src/renderer/code-block.ts +1 -1
- package/src/renderer/composer-fragments.ts +1 -1
- package/src/renderer/compositor.ts +2 -2
- package/src/renderer/config-modal.ts +1 -1
- package/src/renderer/context-inspector.ts +1 -1
- package/src/renderer/conversation-layout.ts +2 -2
- package/src/renderer/conversation-overlays.ts +1 -1
- package/src/renderer/conversation-surface.ts +2 -2
- package/src/renderer/diff-view.ts +1 -1
- package/src/renderer/diff.ts +1 -1
- package/src/renderer/file-picker-overlay.ts +1 -1
- package/src/renderer/fleet-tab-strip.ts +1 -1
- package/src/renderer/fullscreen-primitives.ts +2 -2
- package/src/renderer/fullscreen-workspace.ts +1 -1
- package/src/renderer/header-line.ts +1 -1
- package/src/renderer/help-overlay.ts +1 -1
- package/src/renderer/history-search-overlay.ts +2 -2
- package/src/renderer/layout.ts +5 -8
- package/src/renderer/markdown-inline.ts +1 -1
- package/src/renderer/markdown-table.ts +1 -1
- package/src/renderer/markdown.ts +1 -1
- package/src/renderer/mcp-workspace.ts +1 -1
- package/src/renderer/modal-factory.ts +2 -2
- package/src/renderer/model-workspace.ts +2 -2
- package/src/renderer/onboarding/onboarding-wizard.ts +1 -1
- package/src/renderer/overlay-box.ts +1 -1
- package/src/renderer/panel-composite.ts +1 -1
- package/src/renderer/panel-workspace-bar.ts +1 -1
- package/src/renderer/process-indicator.ts +1 -1
- package/src/renderer/profile-picker-modal.ts +1 -1
- package/src/renderer/search-overlay.ts +2 -2
- package/src/renderer/selection-modal-overlay.ts +1 -1
- package/src/renderer/session-picker-modal.ts +124 -3
- package/src/renderer/settings-modal-helpers.ts +2 -0
- package/src/renderer/settings-modal.ts +2 -2
- package/src/renderer/shell-surface.ts +2 -2
- package/src/renderer/system-message.ts +1 -1
- package/src/renderer/tab-strip.ts +1 -1
- package/src/renderer/theme-mode-config.ts +1 -1
- package/src/renderer/theme.ts +11 -12
- package/src/renderer/thinking.ts +1 -1
- package/src/renderer/tool-call.ts +2 -2
- package/src/renderer/tool-result-expanded-lines.ts +1 -1
- package/src/renderer/turn-injection.ts +7 -8
- package/src/renderer/ui-factory.ts +3 -3
- package/src/runtime/bootstrap-command-context.ts +4 -4
- package/src/runtime/bootstrap-command-parts.ts +5 -5
- package/src/runtime/bootstrap-core.ts +30 -30
- package/src/runtime/bootstrap-shell.ts +4 -4
- package/src/runtime/bootstrap.ts +128 -157
- package/src/runtime/client/approval-updates.ts +82 -0
- package/src/runtime/client/build-floors.ts +167 -0
- package/src/runtime/client/daemon-attach-handshake.ts +115 -0
- package/src/runtime/client/fleet-union.ts +147 -0
- package/src/runtime/client/host-service-status.ts +71 -0
- package/src/runtime/client/hosted-exit.ts +86 -0
- package/src/runtime/client/hosted-roster.ts +110 -0
- package/src/runtime/client/hosted-session-stream.ts +178 -0
- package/src/runtime/client/hosted-sessions.ts +187 -0
- package/src/runtime/client/operator-endpoint.ts +213 -0
- package/src/runtime/client/spine-adoption.ts +99 -0
- package/src/runtime/cloudflare-control-plane.ts +1 -1
- package/src/runtime/context-accounting-source.ts +1 -1
- package/src/runtime/context.ts +2 -2
- package/src/runtime/conversation-rewind-port.ts +42 -14
- package/src/runtime/daemon-attach-notices.ts +55 -19
- package/src/runtime/diagnostics/panels/ops.ts +1 -1
- package/src/runtime/disposal-wiring.ts +4 -24
- package/src/runtime/index.ts +119 -105
- package/src/runtime/install-self-check-startup.ts +2 -2
- package/src/runtime/interaction-seams.ts +1 -1
- package/src/runtime/knowledge-services.ts +8 -2
- package/src/runtime/legacy-daemon-migration.ts +15 -3
- package/src/runtime/legacy-daemon-reconcile.ts +3 -2
- package/src/runtime/memory-spine-transport.ts +37 -267
- package/src/runtime/notification-dispatch.ts +2 -2
- package/src/runtime/onboarding/apply.ts +2 -2
- package/src/runtime/onboarding/derivation.ts +2 -2
- package/src/runtime/onboarding/markers.ts +2 -2
- package/src/runtime/onboarding/progress.ts +2 -2
- package/src/runtime/onboarding/snapshot.ts +1 -1
- package/src/runtime/onboarding/state.ts +2 -2
- package/src/runtime/onboarding/types.ts +2 -2
- package/src/runtime/orchestrator-core-services.ts +1 -1
- package/src/runtime/path-shadow-startup.ts +28 -221
- package/src/runtime/power-keepawake-remote.ts +3 -2
- package/src/runtime/process-lifecycle.ts +2 -2
- package/src/runtime/provider-fallback.ts +10 -66
- package/src/runtime/recovery-autosave.ts +1 -1
- package/src/runtime/recovery-offer-wiring.ts +39 -23
- package/src/runtime/recovery-prompt.ts +31 -17
- package/src/runtime/relay-reachability-bridge.ts +53 -42
- package/src/runtime/release-artifacts.ts +2 -1
- package/src/runtime/runtime-services-types.ts +82 -35
- package/src/runtime/services.ts +305 -300
- package/src/runtime/session-resume-liveness-confirm.ts +1 -1
- package/src/runtime/ui-services.ts +7 -6
- package/src/runtime/update-check.ts +23 -43
- package/src/runtime/workspace-checkpointing.ts +1 -1
- package/src/runtime/wrfc-persistence.ts +2 -2
- package/src/shell/ui-openers.ts +30 -7
- package/src/utils/clipboard.ts +1 -1
- package/src/verification/verification-ledger.ts +10 -8
- package/src/version.ts +1 -1
- package/bin/goodvibes-daemon +0 -90
- package/src/cli/config-overrides.ts +0 -267
- package/src/cli/endpoints.ts +0 -109
- package/src/cli/parser.ts +0 -395
- package/src/cli/redaction.ts +0 -170
- package/src/cli/types.ts +0 -84
- package/src/cluster/commands.ts +0 -382
- package/src/cluster/remote-daemon-target.ts +0 -225
- package/src/cluster/render.ts +0 -268
- package/src/config/atomic-write.ts +0 -70
- package/src/config/credential-availability.ts +0 -122
- package/src/config/goodvibes-home.ts +0 -149
- package/src/config/index.ts +0 -88
- package/src/config/provider-model.ts +0 -23
- package/src/config/read-versioned.ts +0 -228
- package/src/core/alert-gating.ts +0 -67
- package/src/core/consolidation-receipt.ts +0 -41
- package/src/core/focus-tracker.ts +0 -41
- package/src/core/history.ts +0 -45
- package/src/core/memory-status.ts +0 -118
- package/src/core/orchestrator.ts +0 -7
- package/src/core/pairing-devices.ts +0 -49
- package/src/core/pairing-handoff.ts +0 -101
- package/src/core/pairing-offers.ts +0 -83
- package/src/core/pairing-origin.ts +0 -78
- package/src/core/rewind-turn-anchors.ts +0 -311
- package/src/core/session-recovery.ts +0 -210
- package/src/core/stable-host.ts +0 -171
- package/src/core/transcript-journal.ts +0 -503
- package/src/daemon/cli.ts +0 -641
- package/src/daemon/handlers/context.ts +0 -29
- package/src/daemon/handlers/contracts.ts +0 -77
- package/src/daemon/handlers/credentials.ts +0 -139
- package/src/daemon/handlers/drafts/draft-store.ts +0 -427
- package/src/daemon/handlers/drafts/index.ts +0 -17
- package/src/daemon/handlers/drafts/register.ts +0 -331
- package/src/daemon/handlers/errors.ts +0 -18
- package/src/daemon/handlers/inbox/cursor-store.ts +0 -457
- package/src/daemon/handlers/inbox/index.ts +0 -284
- package/src/daemon/handlers/inbox/mapping.ts +0 -192
- package/src/daemon/handlers/inbox/poller.ts +0 -212
- package/src/daemon/handlers/inbox/provider-adapter.ts +0 -156
- package/src/daemon/handlers/inbox/providers/discord.ts +0 -252
- package/src/daemon/handlers/inbox/providers/email.ts +0 -152
- package/src/daemon/handlers/inbox/providers/imap-client.ts +0 -300
- package/src/daemon/handlers/inbox/providers/route-util.ts +0 -24
- package/src/daemon/handlers/inbox/providers/slack.ts +0 -263
- package/src/daemon/handlers/index.ts +0 -117
- package/src/daemon/handlers/register.ts +0 -168
- package/src/daemon/handlers/remote/backends/cloud-terminal.ts +0 -142
- package/src/daemon/handlers/remote/backends/docker.ts +0 -79
- package/src/daemon/handlers/remote/backends/index.ts +0 -40
- package/src/daemon/handlers/remote/backends/local-process.ts +0 -113
- package/src/daemon/handlers/remote/backends/process-runner.ts +0 -127
- package/src/daemon/handlers/remote/backends/ssh.ts +0 -125
- package/src/daemon/handlers/remote/backends/types.ts +0 -97
- package/src/daemon/handlers/remote/dispatcher.ts +0 -181
- package/src/daemon/handlers/remote/index.ts +0 -119
- package/src/daemon/handlers/remote/peer-registry.ts +0 -357
- package/src/daemon/handlers/remote/service.ts +0 -191
- package/src/daemon/handlers/routing/inbox-bridge.ts +0 -71
- package/src/daemon/handlers/routing/index.ts +0 -261
- package/src/daemon/handlers/routing/route-store.ts +0 -319
- package/src/daemon/handlers/routing/routing-resolver.ts +0 -75
- package/src/daemon/handlers/sqlite-store.ts +0 -278
- package/src/daemon/handlers/triage/index.ts +0 -57
- package/src/daemon/handlers/triage/integration.ts +0 -213
- package/src/daemon/handlers/triage/pipeline.ts +0 -274
- package/src/daemon/handlers/triage/scorer.ts +0 -287
- package/src/daemon/handlers/triage/tagger/discord.ts +0 -187
- package/src/daemon/handlers/triage/tagger/imap.ts +0 -384
- package/src/daemon/handlers/triage/tagger/index.ts +0 -184
- package/src/daemon/handlers/triage/tagger/shared.ts +0 -70
- package/src/daemon/handlers/triage/tagger/slack.ts +0 -69
- package/src/daemon/handlers/triage/types.ts +0 -50
- package/src/daemon/lifecycle.ts +0 -41
- package/src/daemon/provision-wake-model.ts +0 -81
- package/src/daemon/safe-serve.ts +0 -61
- package/src/daemon/send/channels.ts +0 -200
- package/src/daemon/send/command.ts +0 -332
- package/src/daemon/send/composition.ts +0 -99
- package/src/daemon/send/failure-text.ts +0 -93
- package/src/daemon/send/inert-text.ts +0 -225
- package/src/daemon/send/stdin.ts +0 -24
- package/src/daemon/service-commands.ts +0 -329
- package/src/export/cost-utils.ts +0 -319
- package/src/input/selection.ts +0 -135
- package/src/plugins/loader.ts +0 -15
- package/src/renderer/bottom-bar.ts +0 -58
- package/src/renderer/conversation-tree.ts +0 -228
- package/src/runtime/agent-graph-composition.ts +0 -78
- package/src/runtime/channel-composition.ts +0 -46
- package/src/runtime/cluster-composition.ts +0 -124
- package/src/runtime/cluster-group-composition.ts +0 -284
- package/src/runtime/code-index-services.ts +0 -167
- package/src/runtime/daemon-handler-composition.ts +0 -76
- package/src/runtime/device-posture-composition.ts +0 -110
- package/src/runtime/durability-housekeeping.ts +0 -183
- package/src/runtime/durability-services.ts +0 -155
- package/src/runtime/embedded-service-factories.ts +0 -58
- package/src/runtime/feature-settings.ts +0 -154
- package/src/runtime/fleet-needs-input-push.ts +0 -70
- package/src/runtime/fleet-services.ts +0 -41
- package/src/runtime/idle-power-services.ts +0 -85
- package/src/runtime/mail-composition.ts +0 -65
- package/src/runtime/memory-fold.ts +0 -55
- package/src/runtime/operator-token-cleanup.ts +0 -109
- package/src/runtime/path-shadow.ts +0 -418
- package/src/runtime/perf/panel-health-monitor.ts +0 -18
- package/src/runtime/provider-optimizer-wiring.ts +0 -55
- package/src/runtime/reachability-notice.ts +0 -100
- package/src/runtime/remote-execution-composition.ts +0 -62
- package/src/runtime/session-liveness-marker.ts +0 -257
- package/src/runtime/session-pointer-surface.ts +0 -22
- package/src/runtime/session-storage-services.ts +0 -41
- package/src/runtime/surface-feature-flags.ts +0 -96
- package/src/runtime/terminal-output-guard.ts +0 -235
- package/src/runtime/trust/workspace-registration.ts +0 -192
- package/src/runtime/trust/workspace-trust.ts +0 -229
- package/src/runtime/ui/index.ts +0 -39
- package/src/runtime/ui/model-picker/data-provider.ts +0 -182
- package/src/runtime/ui/model-picker/health-enrichment.ts +0 -231
- package/src/runtime/ui/model-picker/index.ts +0 -59
- package/src/runtime/ui/model-picker/types.ts +0 -153
- package/src/runtime/ui/provider-health/data-provider.ts +0 -244
- package/src/runtime/ui/provider-health/fallback-visualizer.ts +0 -71
- package/src/runtime/ui/provider-health/index.ts +0 -46
- package/src/runtime/ui/provider-health/types.ts +0 -146
- package/src/runtime/ui-events.ts +0 -1
- package/src/runtime/ui-read-model-helpers.ts +0 -1
- package/src/runtime/ui-read-models-observability-maintenance.ts +0 -1
- package/src/runtime/ui-read-models-observability-options.ts +0 -1
- package/src/runtime/ui-read-models-observability-remote.ts +0 -1
- package/src/runtime/ui-read-models-observability-security.ts +0 -1
- package/src/runtime/ui-read-models-observability-system.ts +0 -1
- package/src/runtime/ui-read-models-observability.ts +0 -1
- package/src/runtime/ui-service-queries.ts +0 -1
- package/src/runtime/voice-setup-services.ts +0 -98
- package/src/runtime/workstream-attempts-validation.ts +0 -77
- package/src/runtime/workstream-draft-edits.ts +0 -95
- package/src/runtime/workstream-draft-store.ts +0 -274
- package/src/runtime/workstream-draft-types.ts +0 -42
- package/src/runtime/workstream-services.ts +0 -373
- package/src/tools/index.ts +0 -1
- package/src/types/grid.ts +0 -48
- package/src/types/sql-js.d.ts +0 -15
- package/src/work-plans/work-plan-store.ts +0 -702
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
|
+
import { createEmptyLine } from '@pellux/goodvibes-sdk/platform/types';
|
|
3
3
|
import { truncateDisplay } from '../utils/terminal-width.ts';
|
|
4
4
|
import { ScrollableListPanel } from './scrollable-list-panel.ts';
|
|
5
5
|
import type { PanelIntegrationContext } from './types.ts';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine, createStyledCell } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
|
+
import { createEmptyLine, createStyledCell } from '@pellux/goodvibes-sdk/platform/types';
|
|
3
3
|
import { getDisplayWidth } from '../utils/terminal-width.ts';
|
|
4
4
|
import { activeUiTones, registerThemeRefresh } from '../renderer/theme.ts';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Line } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { getDisplayWidth, truncateDisplay } from '../utils/terminal-width.ts';
|
|
3
3
|
import { GLYPHS, UI_TONES } from '../renderer/ui-primitives.ts';
|
|
4
4
|
// Build on the leaf primitives in ./polish-core.ts (palette + base line
|
package/src/panels/polish.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine, createStyledCell } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
|
+
import { createEmptyLine, createStyledCell } from '@pellux/goodvibes-sdk/platform/types';
|
|
3
3
|
import { getDisplayWidth, wrapText } from '../utils/terminal-width.ts';
|
|
4
4
|
import { getSurfaceContentRows, getTrackedVisibleWindow, getVisibleWindow, type VisibleWindow } from '../renderer/surface-layout.ts';
|
|
5
5
|
import { GLYPHS } from '../renderer/ui-primitives.ts';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine, createStyledCell } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
|
+
import { createEmptyLine, createStyledCell } from '@pellux/goodvibes-sdk/platform/types';
|
|
3
3
|
import { BasePanel } from './base-panel.ts';
|
|
4
4
|
import type { PanelCategory } from './types.ts';
|
|
5
|
-
import type { ComponentHealthMonitor } from '
|
|
5
|
+
import type { ComponentHealthMonitor } from '@pellux/goodvibes-sdk/platform/runtime/observability';
|
|
6
6
|
import {
|
|
7
7
|
buildEmptyState,
|
|
8
8
|
buildKeyboardHints,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { promises as fsPromises } from 'node:fs';
|
|
2
2
|
import { join, sep } from 'node:path';
|
|
3
|
-
import type { Line } from '
|
|
4
|
-
import { createEmptyLine } from '
|
|
3
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
4
|
+
import { createEmptyLine } from '@pellux/goodvibes-sdk/platform/types';
|
|
5
5
|
import { type ConfirmState, handleConfirmInput, renderConfirmLines } from './confirm-state.ts';
|
|
6
6
|
import { getDisplayWidth, truncateDisplay } from '../utils/terminal-width.ts';
|
|
7
7
|
import { ScrollableListPanel } from './scrollable-list-panel.ts';
|
|
8
|
-
import type { ComponentHealthMonitor } from '
|
|
8
|
+
import type { ComponentHealthMonitor } from '@pellux/goodvibes-sdk/platform/runtime/observability';
|
|
9
9
|
import { listInstalledEcosystemEntries, type EcosystemCatalogPathOptions, type ShellPathService } from '@/runtime/index.ts';
|
|
10
10
|
import {
|
|
11
11
|
buildPanelLine,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
2
2
|
import { BasePanel } from './base-panel.ts';
|
|
3
|
-
import { createEmptyLine, createStyledCell, type Line } from '
|
|
4
|
-
import type { Orchestrator } from '
|
|
3
|
+
import { createEmptyLine, createStyledCell, type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
4
|
+
import type { Orchestrator } from '@pellux/goodvibes-sdk/platform/core';
|
|
5
5
|
import { evaluateSessionMaintenance } from '@/runtime/index.ts';
|
|
6
6
|
import type { TurnEvent } from '@/runtime/index.ts';
|
|
7
|
-
import type { UiEventFeed } from '
|
|
7
|
+
import type { UiEventFeed } from '@/runtime/index.ts';
|
|
8
8
|
import type { UiReadModel, UiSessionSnapshot } from '../runtime/ui-read-models.ts';
|
|
9
|
-
import type { SessionMemoryQuery } from '
|
|
10
|
-
import { calcSessionCost, describePricingSource, isModelPriced } from '
|
|
9
|
+
import type { SessionMemoryQuery } from '@/runtime/index.ts';
|
|
10
|
+
import { calcSessionCost, describePricingSource, isModelPriced } from '@pellux/goodvibes-sdk/platform/providers';
|
|
11
11
|
import { type ConfirmState, handleConfirmInput, renderConfirmLines } from './confirm-state.ts';
|
|
12
12
|
import type { PanelIntegrationContext } from './types.ts';
|
|
13
13
|
import {
|
package/src/panels/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Line } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import type { StatusState } from '../renderer/status-glyphs.ts';
|
|
3
3
|
import type { ComponentResourceContract, ComponentHealthState } from '../runtime/perf/panel-contracts.ts';
|
|
4
4
|
// Routed through the `@/` alias (not `./panel-manager.ts`) so this foundational
|
|
@@ -65,7 +65,6 @@ export type KeyName = NamedKey | (string & {});
|
|
|
65
65
|
* - automation-control: hooks, plugins, marketplace, automation jobs, worktrees
|
|
66
66
|
* - incidents-diagnostics: failure review, eval gates, API call debugging
|
|
67
67
|
* - runtime-ops: live operator consoles (cockpit, tasks, orchestration, comms)
|
|
68
|
-
* 'development' | 'agent' | 'session' | 'ai' are unchanged from before the split.
|
|
69
68
|
*/
|
|
70
69
|
export type PanelCategory =
|
|
71
70
|
| 'development'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Line } from '
|
|
1
|
+
import { type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { UIFactory } from '../renderer/ui-factory.ts';
|
|
3
3
|
import type { PermissionCategory, PermissionRequestAnalysis } from '@pellux/goodvibes-sdk/platform/permissions';
|
|
4
4
|
import { buildPermissionApprovalBrief, getDisplayArg } from '@pellux/goodvibes-sdk/platform/permissions';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Line } from '
|
|
1
|
+
import { type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { fitDisplay, getDisplayWidth, truncateDisplay } from '../utils/terminal-width.ts';
|
|
3
3
|
import { wrapWithHangingIndent } from './text-layout.ts';
|
|
4
4
|
import type { AutocompleteEngine } from '../input/autocomplete.ts';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* block summary and action list are always shown in full.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { type Line } from '
|
|
10
|
+
import { type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
11
11
|
import { ModalFactory, type ModalSection } from './modal-factory.ts';
|
|
12
12
|
import type { BlockActionsMenu } from './block-actions.ts';
|
|
13
13
|
import { describeBlockForReceipt } from '../input/handler-content-actions.ts';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Footer hints: [Up/Down] Navigate [Enter] Jump [o] Open File [d] Remove [Esc] Close
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { type Line } from '
|
|
10
|
+
import { type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
11
11
|
import { ModalFactory } from './modal-factory.ts';
|
|
12
12
|
import { BookmarkModal } from '../input/bookmark-modal.ts';
|
|
13
13
|
import type { BookmarkEntry } from '@pellux/goodvibes-sdk/platform/bookmarks';
|
package/src/renderer/buffer.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Line, type Cell, createStyledCell, createEmptyLine } from '
|
|
1
|
+
import { type Line, type Cell, createStyledCell, createEmptyLine } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { UIFactory } from './ui-factory.ts';
|
|
3
3
|
import { getDisplayWidth } from '../utils/terminal-width.ts';
|
|
4
4
|
import { LAYOUT } from './layout.ts';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// UIFactory static methods are thin wrappers over these.
|
|
6
6
|
// ---------------------------------------------------------------------------
|
|
7
7
|
|
|
8
|
-
import { type Line } from '
|
|
8
|
+
import { type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
9
9
|
import { renderConversationFragment } from './conversation-surface.ts';
|
|
10
10
|
import { activeUiTones } from './theme.ts';
|
|
11
11
|
import { activeTheme } from './theme.ts';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TerminalBuffer } from './buffer.ts';
|
|
2
2
|
import { DiffEngine } from './diff.ts';
|
|
3
|
-
import { type Line, createEmptyCell, createEmptyLine, createStyledCell } from '
|
|
3
|
+
import { type Line, createEmptyCell, createEmptyLine, createStyledCell } from '@pellux/goodvibes-sdk/platform/types';
|
|
4
4
|
import { getDisplayWidth } from '../utils/terminal-width.ts';
|
|
5
5
|
import type { SearchManager } from '../input/search.ts';
|
|
6
|
-
import { allowTerminalWrite } from '
|
|
6
|
+
import { allowTerminalWrite } from '@pellux/goodvibes-terminal-shell/terminal-output-guard';
|
|
7
7
|
import { probeTermCaps, type TermColorCaps } from './term-caps.ts';
|
|
8
8
|
import { activeTheme } from './theme.ts';
|
|
9
9
|
import { UI_TONES } from './ui-primitives.ts';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Line } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { ModalFactory, type ModalSection, type ModalTab } from './modal-factory.ts';
|
|
3
3
|
import { getOverlayMaxWidth } from './overlay-viewport.ts';
|
|
4
4
|
import { activeUiTones } from './theme.ts';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Line } from '
|
|
1
|
+
import { type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { ModalFactory } from './modal-factory.ts';
|
|
3
3
|
import type { ConversationManager } from '../core/conversation';
|
|
4
4
|
import { getOverlayContentBudget, getOverlaySurfaceMetrics, getStableOverlayContentRows } from './overlay-viewport.ts';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
|
+
import { createEmptyLine } from '@pellux/goodvibes-sdk/platform/types';
|
|
3
3
|
import type { ConversationManager } from '../core/conversation';
|
|
4
4
|
|
|
5
5
|
export interface ConversationViewportRequest {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Line } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import type { ConversationManager } from '../core/conversation';
|
|
3
3
|
import type { CommandRegistry } from '../input/command-registry.ts';
|
|
4
4
|
import type { InputHandler } from '../input/handler.ts';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type Line, createEmptyLine, createStyledCell } from '
|
|
1
|
+
import { type Line, createEmptyLine, createStyledCell } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { getDisplayWidth, wrapText } from '../utils/terminal-width.ts';
|
|
3
3
|
import { LAYOUT } from './layout.ts';
|
|
4
4
|
import { GLYPHS } from './ui-primitives.ts';
|
|
5
|
-
import { treeBranchCol, treeContentCol } from '
|
|
5
|
+
import { treeBranchCol, treeContentCol } from '@pellux/goodvibes-terminal-shell';
|
|
6
6
|
|
|
7
7
|
export interface ConversationSurfacePalette {
|
|
8
8
|
readonly accent: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Line, type Cell, createStyledCell } from '
|
|
1
|
+
import { type Line, type Cell, createStyledCell } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { UIFactory } from './ui-factory.ts';
|
|
3
3
|
import { getDisplayWidth, padDisplayEnd } from '../utils/terminal-width.ts';
|
|
4
4
|
import { DIFF_TONES } from './ui-primitives.ts';
|
package/src/renderer/diff.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Line } from '
|
|
1
|
+
import { type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { fitDisplay, getDisplayWidth, truncateDisplay } from '../utils/terminal-width.ts';
|
|
3
3
|
import type { FilePickerModal } from '../input/file-picker.ts';
|
|
4
4
|
import {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// that distinction for the operator.
|
|
10
10
|
// ---------------------------------------------------------------------------
|
|
11
11
|
|
|
12
|
-
import type { Line } from '
|
|
12
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
13
13
|
import type { FleetTabsState } from '../panels/fleet-tabs.ts';
|
|
14
14
|
import { renderTabStrip, type TabHitRegion } from './tab-strip.ts';
|
|
15
15
|
import { UI_TONES } from './ui-primitives.ts';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Line } from '
|
|
2
|
-
import { createEmptyLine, createStyledCell } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
|
+
import { createEmptyLine, createStyledCell } from '@pellux/goodvibes-sdk/platform/types';
|
|
3
3
|
import { getDisplayWidth } from '../utils/terminal-width.ts';
|
|
4
4
|
import { GLYPHS } from './ui-primitives.ts';
|
|
5
5
|
import { activeUiTones, registerThemeRefresh } from './theme.ts';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* has moved off it.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { type Line, createEmptyLine } from '
|
|
17
|
+
import { type Line, createEmptyLine } from '@pellux/goodvibes-sdk/platform/types';
|
|
18
18
|
import { VERSION } from '../version.ts';
|
|
19
19
|
import { getDisplayWidth } from '../utils/terminal-width.ts';
|
|
20
20
|
import type { GitHeaderInfo } from './git-status.ts';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* are a different, complementary surface, not this one.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { type Line } from '
|
|
9
|
+
import { type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
10
10
|
import { ModalFactory } from './modal-factory.ts';
|
|
11
11
|
import type { SlashCommand } from '../input/command-registry.ts';
|
|
12
12
|
import type { KeybindingsManager } from '../input/keybindings.ts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Line } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { fitDisplay, getDisplayWidth } from '../utils/terminal-width.ts';
|
|
3
3
|
import type { HistorySearch } from '../input/input-history.ts';
|
|
4
|
-
import { createBottomBarLine, writeBottomBarText } from '
|
|
4
|
+
import { createBottomBarLine, writeBottomBarText } from '@pellux/goodvibes-terminal-shell';
|
|
5
5
|
import { formatHints } from './hint-grammar.ts';
|
|
6
6
|
|
|
7
7
|
/**
|
package/src/renderer/layout.ts
CHANGED
|
@@ -2,15 +2,12 @@ import { GLYPHS, SPINNER_FRAMES, UI_TONES } from './ui-primitives.ts';
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Layout constants — single source of truth for margins and content width.
|
|
5
|
-
* All renderers import these instead of hardcoding indent values.
|
|
5
|
+
* All renderers import these instead of hardcoding indent values. The object
|
|
6
|
+
* itself lives in @pellux/goodvibes-terminal-shell alongside the transcript
|
|
7
|
+
* tree geometry that reads LEFT_MARGIN/RIGHT_MARGIN out of it, so the margins
|
|
8
|
+
* and the glyph columns derived from them cannot drift apart.
|
|
6
9
|
*/
|
|
7
|
-
export
|
|
8
|
-
LEFT_MARGIN: 4,
|
|
9
|
-
RIGHT_MARGIN: 2,
|
|
10
|
-
contentWidth: (termWidth: number) => termWidth - LAYOUT.LEFT_MARGIN - LAYOUT.RIGHT_MARGIN,
|
|
11
|
-
/** Used by createMessageBar in ui-factory.ts for user message ghost boxes. */
|
|
12
|
-
USER_BOX_MARGIN: 2,
|
|
13
|
-
} as const;
|
|
10
|
+
export { TRANSCRIPT_LAYOUT as LAYOUT } from '@pellux/goodvibes-terminal-shell';
|
|
14
11
|
|
|
15
12
|
export const TOOL_STATUS = {
|
|
16
13
|
SUCCESS_ICON: GLYPHS.status.success,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* renderInlineMarkdown so existing importers are unaffected.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type { Cell } from '
|
|
11
|
+
import type { Cell } from '@pellux/goodvibes-sdk/platform/types';
|
|
12
12
|
|
|
13
13
|
/** Module-level set of inline markdown special characters (hoisted out of hot loop). */
|
|
14
14
|
const INLINE_SPECIAL_CHARS = new Set(['[', '`', '*', '_', '~']);
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* still emitted in full.
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
|
-
import { type Line, type Cell, createStyledCell } from '
|
|
41
|
+
import { type Line, type Cell, createStyledCell } from '@pellux/goodvibes-sdk/platform/types';
|
|
42
42
|
import { UIFactory } from './ui-factory.ts';
|
|
43
43
|
import { getDisplayWidth } from '../utils/terminal-width.ts';
|
|
44
44
|
import { activeTheme } from './theme.ts';
|
package/src/renderer/markdown.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Line, type Cell, createStyledCell } from '
|
|
1
|
+
import { type Line, type Cell, createStyledCell } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { UIFactory } from './ui-factory.ts';
|
|
3
3
|
import { renderCodeBlock } from './code-block.ts';
|
|
4
4
|
import { getDisplayWidth } from '../utils/terminal-width.ts';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { McpWorkspace, McpWorkspaceRow } from '../input/mcp-workspace.ts';
|
|
2
|
-
import type { Line } from '
|
|
2
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
3
3
|
import { wrapText } from '../utils/terminal-width.ts';
|
|
4
4
|
import { GLYPHS } from './ui-primitives.ts';
|
|
5
5
|
import {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Line, Cell } from '
|
|
2
|
-
import { createStyledCell } from '
|
|
1
|
+
import type { Line, Cell } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
|
+
import { createStyledCell } from '@pellux/goodvibes-sdk/platform/types';
|
|
3
3
|
import { fitDisplay, getDisplayWidth, truncateDisplay, wrapText } from '../utils/terminal-width.ts';
|
|
4
4
|
import {
|
|
5
5
|
createOverlayBorderLine,
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import type { ModelDefinition } from '@pellux/goodvibes-sdk/platform/providers';
|
|
9
9
|
import type { ModelPickerModal } from '../input/model-picker.ts';
|
|
10
10
|
import type { ModelPickerTargetInfo } from '../input/model-picker.ts';
|
|
11
|
-
import type { Line } from '
|
|
12
|
-
import { createEmptyLine, createStyledCell } from '
|
|
11
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
12
|
+
import { createEmptyLine, createStyledCell } from '@pellux/goodvibes-sdk/platform/types';
|
|
13
13
|
import { fitDisplay, getDisplayWidth, wrapText } from '../utils/terminal-width.ts';
|
|
14
14
|
import { abbreviateCount } from '../utils/format-number.ts';
|
|
15
15
|
import { GLYPHS, UI_TONES } from './ui-primitives.ts';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createStyledCell, type Line } from '
|
|
1
|
+
import { createStyledCell, type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { getOverlayMaxWidth } from './overlay-viewport.ts';
|
|
3
3
|
import { GLYPHS } from './ui-primitives.ts';
|
|
4
4
|
import { activeUiTones, registerThemeRefresh } from './theme.ts';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Line } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import type { Panel } from '../panels/types.ts';
|
|
3
3
|
import type { InputHandler } from '../input/handler.ts';
|
|
4
4
|
import type { PanelManager } from '../panels/panel-manager.ts';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Line } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import type { WorkspaceTab } from '../panels/panel-manager.ts';
|
|
3
3
|
import { renderTabStrip, type TabHitRegion } from './tab-strip.ts';
|
|
4
4
|
import { UI_TONES } from './ui-primitives.ts';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Line } from '
|
|
1
|
+
import { type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { UIFactory } from './ui-factory.ts';
|
|
3
3
|
import { truncateDisplay } from '../utils/terminal-width.ts';
|
|
4
4
|
import { GLYPHS, UI_TONES } from './ui-primitives.ts';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Footer hints: [Up/Down] Navigate [Enter] Load [d] Arm/Delete [s] Save current [Esc] Close
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { Line } from '
|
|
10
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
11
11
|
import { ModalFactory } from './modal-factory.ts';
|
|
12
12
|
import type { ProfilePickerModal } from '../input/profile-picker-modal.ts';
|
|
13
13
|
import { formatTimestamp } from './modal-utils.ts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Line } from '
|
|
1
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { fitDisplay, getDisplayWidth, truncateDisplay } from '../utils/terminal-width.ts';
|
|
3
3
|
import type { SearchManager } from '../input/search.ts';
|
|
4
|
-
import { createBottomBarLine, writeBottomBarText } from '
|
|
4
|
+
import { createBottomBarLine, writeBottomBarText } from '@pellux/goodvibes-terminal-shell';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Render the search bar as a single Line[] overlay at the bottom of the viewport.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Line } from '
|
|
1
|
+
import { type Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
2
2
|
import { fitDisplay, getDisplayWidth, truncateDisplay } from '../utils/terminal-width.ts';
|
|
3
3
|
import type { SelectionItem, SelectionModal } from '../input/selection-modal.ts';
|
|
4
4
|
import {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* this section is entirely absent and the box sizing is unchanged.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import type { Line } from '
|
|
18
|
+
import type { Line } from '@pellux/goodvibes-sdk/platform/types';
|
|
19
19
|
import type { SharedSessionRecord } from '@pellux/goodvibes-sdk/platform/control-plane';
|
|
20
20
|
import { ModalFactory } from './modal-factory.ts';
|
|
21
21
|
import { UI_TONES } from './ui-primitives.ts';
|
|
@@ -92,10 +92,84 @@ function statusLabel(record: SharedSessionRecord): string {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
const MAX_CROSS_SURFACE_ROWS = 5;
|
|
95
|
+
const MAX_HOSTED_ROWS = 5;
|
|
96
|
+
|
|
97
|
+
// ---------------------------------------------------------------------------
|
|
98
|
+
// Daemon-hosted sessions
|
|
99
|
+
// ---------------------------------------------------------------------------
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The exact honest state of the hosted section, or null when the rows speak for
|
|
103
|
+
* themselves. "Never read" and "the daemon hosts nothing" are different facts
|
|
104
|
+
* and are never collapsed into each other.
|
|
105
|
+
*/
|
|
106
|
+
function hostedRosterNote(roster: SessionPickerModal['hostedRoster']): string | null {
|
|
107
|
+
if (roster.note) return roster.note;
|
|
108
|
+
if (roster.capturedAt === null) return 'Not read yet.';
|
|
109
|
+
if (roster.sessions.length === 0) return 'The daemon is hosting no sessions.';
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* One hosted row: the id first, then what it is doing, what leaving it would
|
|
115
|
+
* do, and finally its title.
|
|
116
|
+
*
|
|
117
|
+
* The id leads because it is the ACTIONABLE part — the row exists so `/hosted
|
|
118
|
+
* attach <id>` can be typed off it — and a narrow terminal clips the tail. What
|
|
119
|
+
* gets clipped must therefore be the descriptive end of the line, never the
|
|
120
|
+
* thing the user has to retype.
|
|
121
|
+
*/
|
|
122
|
+
function hostedRowLabel(
|
|
123
|
+
record: SessionPickerModal['hostedRoster']['sessions'][number],
|
|
124
|
+
contentWidth: number,
|
|
125
|
+
): string {
|
|
126
|
+
const policy = record.effectiveDetachPolicy === 'survive' ? 'survives detach' : 'ends on detach';
|
|
127
|
+
const attached = record.attachedClients.length > 0 ? `${record.attachedClients.length} attached` : 'nobody attached';
|
|
128
|
+
// Fitted to the content width MINUS the list indent modal-factory adds: at
|
|
129
|
+
// the full width the row wraps to a second line, which the section's row
|
|
130
|
+
// accounting does not reserve, and the trailing attach hint is then what the
|
|
131
|
+
// tail clip eats.
|
|
132
|
+
return fitDisplay(
|
|
133
|
+
`${record.id} · ${record.status} · ${policy} · ${attached} · ${record.title || 'untitled'}`,
|
|
134
|
+
Math.max(8, contentWidth - 4),
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Whether the hosted section renders at all.
|
|
140
|
+
*
|
|
141
|
+
* Absent when NOTHING is known: no roster was wired (every pre-existing caller
|
|
142
|
+
* and test), so the box size and content are unchanged for them. The moment the
|
|
143
|
+
* roster has an answer — rows, an empty-but-read list, or a reason it could not
|
|
144
|
+
* read — the section appears, because each of those is a fact worth showing.
|
|
145
|
+
*/
|
|
146
|
+
function hostedSectionVisible(modal: SessionPickerModal): boolean {
|
|
147
|
+
const roster = modal.hostedRoster;
|
|
148
|
+
return roster.sessions.length > 0 || roster.capturedAt !== null || roster.note !== null;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function hostedRowCount(modal: SessionPickerModal): number {
|
|
152
|
+
return Math.min(MAX_HOSTED_ROWS, modal.hostedRoster.sessions.length);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Extra content rows the hosted section needs: separator + header (+note)
|
|
157
|
+
* + rows (+overflow line + the attach hint). Counted for the same reason the
|
|
158
|
+
* cross-surface section counts its own — an uncounted trailing row is silently
|
|
159
|
+
* eaten by modal-factory's tail clip.
|
|
160
|
+
*/
|
|
161
|
+
function hostedExtraRows(modal: SessionPickerModal): number {
|
|
162
|
+
if (!hostedSectionVisible(modal)) return 0;
|
|
163
|
+
const rows = hostedRowCount(modal);
|
|
164
|
+
const noteRow = hostedRosterNote(modal.hostedRoster) ? 1 : 0;
|
|
165
|
+
const overflowRow = modal.hostedRoster.sessions.length > MAX_HOSTED_ROWS ? 1 : 0;
|
|
166
|
+
const hintRow = rows > 0 ? 1 : 0;
|
|
167
|
+
return 2 + noteRow + overflowRow + hintRow + rows;
|
|
168
|
+
}
|
|
95
169
|
|
|
96
170
|
/**
|
|
97
171
|
* The exact honest note for the current state, or null when the union view
|
|
98
|
-
* needs no caveat (fresh
|
|
172
|
+
* needs no caveat (fresh, with rows). Precedence: offline > stale >
|
|
99
173
|
* true-empty — the three designed states, never collapsed into
|
|
100
174
|
* each other (an offline view never silently renders as "no sessions yet").
|
|
101
175
|
*/
|
|
@@ -149,7 +223,7 @@ export function renderSessionPickerModal(
|
|
|
149
223
|
width: number,
|
|
150
224
|
viewportHeight = 24,
|
|
151
225
|
): Line[] {
|
|
152
|
-
const extraRows = crossSurfaceExtraRows(modal);
|
|
226
|
+
const extraRows = crossSurfaceExtraRows(modal) + hostedExtraRows(modal);
|
|
153
227
|
const metrics = getOverlaySurfaceMetrics(width, viewportHeight, {
|
|
154
228
|
chromeRows: 6,
|
|
155
229
|
minContentRows: 5,
|
|
@@ -290,6 +364,53 @@ export function renderSessionPickerModal(
|
|
|
290
364
|
}
|
|
291
365
|
}
|
|
292
366
|
|
|
367
|
+
// Daemon-hosted sessions — conversations whose loop runs in the daemon rather
|
|
368
|
+
// than in this terminal. Read-only here: joining one is `/hosted attach <id>`,
|
|
369
|
+
// which opens a live stream this modal has no business owning, so the full id
|
|
370
|
+
// is rendered for the command to be typed straight off the row.
|
|
371
|
+
if (hostedSectionVisible(modal)) {
|
|
372
|
+
sections.push({ type: 'separator' });
|
|
373
|
+
sections.push({
|
|
374
|
+
type: 'text',
|
|
375
|
+
content: 'Daemon-hosted sessions',
|
|
376
|
+
style: { fg: '240', dim: true, bold: true },
|
|
377
|
+
});
|
|
378
|
+
const note = hostedRosterNote(modal.hostedRoster);
|
|
379
|
+
if (note) {
|
|
380
|
+
sections.push({
|
|
381
|
+
type: 'text',
|
|
382
|
+
content: note,
|
|
383
|
+
style: { fg: modal.hostedRoster.note ? UI_TONES.state.warn : '244', dim: !modal.hostedRoster.note },
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
if (modal.hostedRoster.sessions.length > 0) {
|
|
387
|
+
const rows = modal.hostedRoster.sessions.slice(0, MAX_HOSTED_ROWS);
|
|
388
|
+
sections.push({
|
|
389
|
+
type: 'list',
|
|
390
|
+
items: rows.map((record) => ({
|
|
391
|
+
label: hostedRowLabel(record, contentW),
|
|
392
|
+
// A terminated hosted session is kept with its reason until retention
|
|
393
|
+
// retires it; dimming it keeps it readable without looking live.
|
|
394
|
+
style: record.status === 'terminated'
|
|
395
|
+
? { fg: '244', dim: true }
|
|
396
|
+
: record.status === 'running' ? { fg: UI_TONES.state.good } : undefined,
|
|
397
|
+
})),
|
|
398
|
+
});
|
|
399
|
+
if (modal.hostedRoster.sessions.length > MAX_HOSTED_ROWS) {
|
|
400
|
+
sections.push({
|
|
401
|
+
type: 'text',
|
|
402
|
+
content: `[showing ${MAX_HOSTED_ROWS} of ${modal.hostedRoster.sessions.length}]`,
|
|
403
|
+
style: { fg: '244', dim: true },
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
sections.push({
|
|
407
|
+
type: 'text',
|
|
408
|
+
content: 'Join one with /hosted attach <id>',
|
|
409
|
+
style: { fg: '244', dim: true },
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
293
414
|
// Status message if present
|
|
294
415
|
if (modal.statusMessage) {
|
|
295
416
|
sections.push({ type: 'separator' });
|