@pellux/goodvibes-tui 1.27.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +127 -2
- package/README.md +7 -9
- package/bin/goodvibes +2 -2
- package/bin/launcher-support.js +8 -4
- package/docs/README.md +11 -2
- package/docs/foundation-artifacts/operator-contract.json +6403 -2347
- package/package.json +14 -25
- package/scripts/postinstall.js +35 -35
- package/src/audio/spoken-turn-model-routing.ts +1 -1
- package/src/cli/bundle-command.ts +5 -5
- package/src/cli/completions/generate.ts +1 -1
- package/src/cli/doctor.ts +3 -3
- package/src/cli/entrypoint.ts +12 -7
- package/src/cli/help.ts +4 -5
- package/src/cli/hooks-command.ts +1 -1
- package/src/cli/index.ts +1 -4
- package/src/cli/launch-auto-update.ts +59 -7
- package/src/cli/management-commands.ts +6 -6
- package/src/cli/management-utils.ts +5 -5
- package/src/cli/management.ts +7 -7
- package/src/cli/network-posture.ts +1 -1
- package/src/cli/package-verification.ts +7 -6
- package/src/cli/plugin-bundles-command.ts +1 -1
- package/src/cli/plugin-command.ts +2 -2
- package/src/cli/service-command.ts +2 -2
- package/src/cli/service-posture.ts +4 -4
- package/src/cli/status.ts +9 -8
- package/src/cli/surface-command.ts +4 -4
- package/src/cli/tui-startup.ts +3 -3
- package/src/cli-flags.ts +3 -3
- package/src/config/goodvibes-home-audit.ts +0 -2
- package/src/config/secret-config.ts +37 -5
- package/src/config/tui-extension-settings.ts +1 -1
- package/src/core/approval-alert.ts +2 -2
- package/src/core/budget-breach-notifier.ts +3 -3
- package/src/core/conversation-compaction-render.ts +1 -1
- package/src/core/conversation-line-cache.ts +1 -1
- package/src/core/conversation-render-context.ts +1 -1
- package/src/core/conversation-rendering.ts +2 -2
- package/src/core/conversation.ts +10 -10
- package/src/core/long-task-notifier.ts +2 -2
- package/src/core/memory-diagnostics-gateway.ts +1 -1
- package/src/core/scriptable-statusline.ts +1 -1
- package/src/core/session-auto-titler.ts +1 -1
- package/src/core/session-resume-core.ts +2 -2
- package/src/core/stream-event-wiring.ts +24 -44
- package/src/core/terminal-notifier.ts +3 -3
- package/src/core/turn-cancellation.ts +1 -1
- package/src/core/turn-event-wiring.ts +5 -5
- package/src/input/command-registry.ts +6 -6
- package/src/input/commands/channel-pairing.ts +1 -1
- package/src/input/commands/cluster-runtime.ts +1 -1
- package/src/input/commands/codebase-runtime.ts +1 -1
- package/src/input/commands/devices-runtime.ts +1 -1
- package/src/input/commands/hosted-runtime.ts +330 -0
- package/src/input/commands/local-setup-review.ts +1 -1
- package/src/input/commands/local-setup-transfer.ts +2 -2
- package/src/input/commands/local-setup.ts +3 -3
- package/src/input/commands/managed-runtime.ts +2 -2
- package/src/input/commands/operator-rpc.ts +24 -110
- package/src/input/commands/payment-card-intake.ts +1 -1
- package/src/input/commands/permissions-provenance.ts +2 -2
- package/src/input/commands/plugin-runtime.ts +1 -1
- package/src/input/commands/provider.ts +1 -1
- package/src/input/commands/relay-runtime.ts +18 -9
- package/src/input/commands/rewind-runtime.ts +1 -1
- package/src/input/commands/runtime-services.ts +1 -1
- package/src/input/commands/services-runtime.ts +1 -1
- package/src/input/commands/session-workflow.ts +1 -1
- package/src/input/commands/settings-sync-runtime.ts +2 -2
- package/src/input/commands/share-runtime.ts +1 -1
- package/src/input/commands/tasks-runtime.ts +145 -55
- package/src/input/commands/update-runtime.ts +31 -28
- package/src/input/commands/work-plan-runtime.ts +2 -2
- package/src/input/commands/workstream-attempts.ts +1 -1
- package/src/input/commands/workstream-runtime.ts +2 -2
- package/src/input/commands.ts +2 -0
- package/src/input/feature-unit-layout.ts +1 -1
- package/src/input/feed-context-factory.ts +3 -3
- package/src/input/handler-content-actions.ts +2 -2
- package/src/input/handler-feed-routes.ts +1 -1
- package/src/input/handler-feed.ts +3 -3
- package/src/input/handler-modal-token-routes.ts +1 -1
- package/src/input/handler-onboarding-daemon-adopt.ts +3 -2
- package/src/input/handler-onboarding.ts +1 -1
- package/src/input/handler-types.ts +2 -2
- package/src/input/handler-ui-state.ts +1 -1
- package/src/input/handler.ts +4 -4
- package/src/input/input-history.ts +1 -1
- package/src/input/onboarding/onboarding-feature-units.ts +2 -2
- package/src/input/onboarding/onboarding-runtime-status.ts +15 -1
- package/src/input/onboarding/onboarding-wizard-apply.ts +17 -8
- package/src/input/onboarding/onboarding-wizard-cloudflare-step.ts +5 -3
- package/src/input/onboarding/onboarding-wizard-external-surfaces.ts +1 -1
- package/src/input/onboarding/onboarding-wizard-types.ts +1 -1
- package/src/input/payments-config.ts +6 -6
- package/src/input/search.ts +1 -1
- package/src/input/session-picker-modal.ts +46 -0
- package/src/input/settings-modal-activation.ts +1 -1
- package/src/input/settings-modal-behavior.ts +4 -4
- package/src/input/settings-modal-commit.ts +11 -0
- package/src/input/settings-modal-data.ts +9 -122
- package/src/input/settings-modal-mutations.ts +33 -0
- package/src/input/settings-modal-secrets.ts +34 -0
- package/src/input/settings-modal-subscriptions.ts +1 -1
- package/src/input/settings-modal-types.ts +15 -1
- package/src/input/settings-modal.ts +28 -3
- package/src/input/worktree-setup-config.ts +1 -1
- package/src/main.ts +11 -9
- package/src/panels/agent-inspector-shared.ts +2 -2
- package/src/panels/base-panel.ts +2 -2
- package/src/panels/builtin/operations.ts +6 -8
- package/src/panels/builtin/session.ts +17 -0
- package/src/panels/builtin/shared.ts +5 -5
- package/src/panels/builtin-modals.ts +3 -3
- package/src/panels/confirm-state.ts +1 -1
- package/src/panels/cost-tracker-panel.ts +4 -4
- package/src/panels/diff-panel.ts +2 -2
- package/src/panels/diff-review-panel.ts +2 -2
- package/src/panels/expandable-list-panel.ts +2 -2
- package/src/panels/fleet-acts.ts +1 -1
- package/src/panels/fleet-observed-render.ts +1 -1
- package/src/panels/fleet-panel-format.ts +1 -1
- package/src/panels/fleet-panel.ts +1 -1
- package/src/panels/fleet-spawn.ts +1 -1
- package/src/panels/fleet-steer.ts +1 -1
- package/src/panels/fleet-transcript.ts +1 -1
- package/src/panels/git-panel.ts +1 -1
- package/src/panels/hosted-session-feed.ts +352 -0
- package/src/panels/hosted-session-panel.ts +221 -0
- package/src/panels/local-auth-panel.ts +3 -3
- package/src/panels/modals/devices-modal.ts +1 -1
- package/src/panels/modals/local-auth-modal.ts +1 -1
- package/src/panels/modals/pairing-modal.ts +1 -1
- package/src/panels/modals/services-modal.ts +1 -1
- package/src/panels/modals/settings-sync-modal.ts +1 -1
- package/src/panels/modals/subscription-modal.ts +1 -1
- package/src/panels/modals/work-plan-modal.ts +1 -1
- package/src/panels/notifications-panel.ts +1 -1
- package/src/panels/panel-confirm-overlay.ts +1 -1
- package/src/panels/plugins-panel.ts +2 -2
- package/src/panels/polish-core.ts +2 -2
- package/src/panels/polish-tables.ts +1 -1
- package/src/panels/polish.ts +2 -2
- package/src/panels/scrollable-list-panel.ts +3 -3
- package/src/panels/skills-panel.ts +3 -3
- package/src/panels/token-budget-panel.ts +5 -5
- package/src/panels/types.ts +1 -2
- package/src/permissions/prompt.ts +1 -1
- package/src/renderer/autocomplete-overlay.ts +1 -1
- package/src/renderer/block-actions-overlay.ts +1 -1
- package/src/renderer/bookmark-modal.ts +1 -1
- package/src/renderer/buffer.ts +1 -1
- package/src/renderer/code-block.ts +1 -1
- package/src/renderer/composer-fragments.ts +1 -1
- package/src/renderer/compositor.ts +2 -2
- package/src/renderer/config-modal.ts +1 -1
- package/src/renderer/context-inspector.ts +1 -1
- package/src/renderer/conversation-layout.ts +2 -2
- package/src/renderer/conversation-overlays.ts +1 -1
- package/src/renderer/conversation-surface.ts +2 -2
- package/src/renderer/diff-view.ts +1 -1
- package/src/renderer/diff.ts +1 -1
- package/src/renderer/file-picker-overlay.ts +1 -1
- package/src/renderer/fleet-tab-strip.ts +1 -1
- package/src/renderer/fullscreen-primitives.ts +2 -2
- package/src/renderer/fullscreen-workspace.ts +1 -1
- package/src/renderer/header-line.ts +1 -1
- package/src/renderer/help-overlay.ts +1 -1
- package/src/renderer/history-search-overlay.ts +2 -2
- package/src/renderer/layout.ts +5 -8
- package/src/renderer/markdown-inline.ts +1 -1
- package/src/renderer/markdown-table.ts +1 -1
- package/src/renderer/markdown.ts +1 -1
- package/src/renderer/mcp-workspace.ts +1 -1
- package/src/renderer/modal-factory.ts +2 -2
- package/src/renderer/model-workspace.ts +2 -2
- package/src/renderer/onboarding/onboarding-wizard.ts +1 -1
- package/src/renderer/overlay-box.ts +1 -1
- package/src/renderer/panel-composite.ts +1 -1
- package/src/renderer/panel-workspace-bar.ts +1 -1
- package/src/renderer/process-indicator.ts +1 -1
- package/src/renderer/profile-picker-modal.ts +1 -1
- package/src/renderer/search-overlay.ts +2 -2
- package/src/renderer/selection-modal-overlay.ts +1 -1
- package/src/renderer/session-picker-modal.ts +124 -3
- package/src/renderer/settings-modal-helpers.ts +2 -0
- package/src/renderer/settings-modal.ts +2 -2
- package/src/renderer/shell-surface.ts +2 -2
- package/src/renderer/system-message.ts +1 -1
- package/src/renderer/tab-strip.ts +1 -1
- package/src/renderer/theme-mode-config.ts +21 -33
- package/src/renderer/theme.ts +11 -12
- package/src/renderer/thinking.ts +1 -1
- package/src/renderer/tool-call.ts +2 -2
- package/src/renderer/tool-result-expanded-lines.ts +1 -1
- package/src/renderer/turn-injection.ts +7 -8
- package/src/renderer/ui-factory.ts +3 -3
- package/src/runtime/bootstrap-command-context.ts +4 -4
- package/src/runtime/bootstrap-command-parts.ts +5 -5
- package/src/runtime/bootstrap-core.ts +30 -30
- package/src/runtime/bootstrap-shell.ts +4 -4
- package/src/runtime/bootstrap.ts +128 -157
- package/src/runtime/client/approval-updates.ts +82 -0
- package/src/runtime/client/build-floors.ts +167 -0
- package/src/runtime/client/daemon-attach-handshake.ts +115 -0
- package/src/runtime/client/fleet-union.ts +147 -0
- package/src/runtime/client/host-service-status.ts +71 -0
- package/src/runtime/client/hosted-exit.ts +86 -0
- package/src/runtime/client/hosted-roster.ts +110 -0
- package/src/runtime/client/hosted-session-stream.ts +178 -0
- package/src/runtime/client/hosted-sessions.ts +187 -0
- package/src/runtime/client/operator-endpoint.ts +213 -0
- package/src/runtime/client/spine-adoption.ts +99 -0
- package/src/runtime/cloudflare-control-plane.ts +1 -1
- package/src/runtime/context-accounting-source.ts +1 -1
- package/src/runtime/context.ts +2 -2
- package/src/runtime/conversation-rewind-port.ts +42 -14
- package/src/runtime/daemon-attach-notices.ts +55 -19
- package/src/runtime/diagnostics/panels/ops.ts +1 -1
- package/src/runtime/disposal-wiring.ts +4 -24
- package/src/runtime/index.ts +119 -105
- package/src/runtime/install-self-check-startup.ts +2 -2
- package/src/runtime/interaction-seams.ts +1 -1
- package/src/runtime/knowledge-services.ts +8 -2
- package/src/runtime/legacy-daemon-migration.ts +4 -3
- package/src/runtime/legacy-daemon-reconcile.ts +3 -2
- package/src/runtime/memory-spine-transport.ts +37 -267
- package/src/runtime/notification-dispatch.ts +2 -2
- package/src/runtime/onboarding/apply.ts +2 -2
- package/src/runtime/onboarding/derivation.ts +2 -2
- package/src/runtime/onboarding/markers.ts +2 -2
- package/src/runtime/onboarding/progress.ts +2 -2
- package/src/runtime/onboarding/snapshot.ts +1 -1
- package/src/runtime/onboarding/state.ts +2 -2
- package/src/runtime/onboarding/types.ts +2 -2
- package/src/runtime/orchestrator-core-services.ts +1 -1
- package/src/runtime/path-shadow-startup.ts +28 -221
- package/src/runtime/power-keepawake-remote.ts +3 -2
- package/src/runtime/process-lifecycle.ts +2 -2
- package/src/runtime/provider-fallback.ts +10 -66
- package/src/runtime/recovery-autosave.ts +1 -1
- package/src/runtime/recovery-offer-wiring.ts +39 -23
- package/src/runtime/recovery-prompt.ts +31 -17
- package/src/runtime/relay-reachability-bridge.ts +53 -42
- package/src/runtime/release-artifacts.ts +2 -1
- package/src/runtime/runtime-services-types.ts +82 -35
- package/src/runtime/services.ts +305 -300
- package/src/runtime/session-resume-liveness-confirm.ts +1 -1
- package/src/runtime/ui-services.ts +7 -6
- package/src/runtime/update-check.ts +23 -43
- package/src/runtime/workspace-checkpointing.ts +1 -1
- package/src/runtime/wrfc-persistence.ts +2 -2
- package/src/shell/ui-openers.ts +30 -7
- package/src/utils/clipboard.ts +1 -1
- package/src/verification/verification-ledger.ts +10 -8
- package/src/version.ts +1 -1
- package/bin/goodvibes-daemon +0 -90
- package/src/cli/config-overrides.ts +0 -267
- package/src/cli/endpoints.ts +0 -109
- package/src/cli/parser.ts +0 -395
- package/src/cli/redaction.ts +0 -170
- package/src/cli/types.ts +0 -84
- package/src/cluster/commands.ts +0 -382
- package/src/cluster/remote-daemon-target.ts +0 -225
- package/src/cluster/render.ts +0 -268
- package/src/config/atomic-write.ts +0 -70
- package/src/config/credential-availability.ts +0 -122
- package/src/config/goodvibes-home.ts +0 -149
- package/src/config/index.ts +0 -88
- package/src/config/provider-model.ts +0 -23
- package/src/config/read-versioned.ts +0 -228
- package/src/core/alert-gating.ts +0 -67
- package/src/core/consolidation-receipt.ts +0 -41
- package/src/core/focus-tracker.ts +0 -41
- package/src/core/history.ts +0 -45
- package/src/core/memory-status.ts +0 -118
- package/src/core/orchestrator.ts +0 -7
- package/src/core/pairing-devices.ts +0 -49
- package/src/core/pairing-handoff.ts +0 -101
- package/src/core/pairing-offers.ts +0 -83
- package/src/core/pairing-origin.ts +0 -78
- package/src/core/rewind-turn-anchors.ts +0 -311
- package/src/core/session-recovery.ts +0 -210
- package/src/core/stable-host.ts +0 -171
- package/src/core/transcript-journal.ts +0 -503
- package/src/daemon/cli.ts +0 -693
- package/src/daemon/fatal-boot-report.ts +0 -111
- package/src/daemon/handlers/context.ts +0 -29
- package/src/daemon/handlers/contracts.ts +0 -77
- package/src/daemon/handlers/credentials.ts +0 -139
- package/src/daemon/handlers/drafts/draft-store.ts +0 -427
- package/src/daemon/handlers/drafts/index.ts +0 -17
- package/src/daemon/handlers/drafts/register.ts +0 -331
- package/src/daemon/handlers/errors.ts +0 -18
- package/src/daemon/handlers/inbox/cursor-store.ts +0 -457
- package/src/daemon/handlers/inbox/index.ts +0 -284
- package/src/daemon/handlers/inbox/mapping.ts +0 -192
- package/src/daemon/handlers/inbox/poller.ts +0 -212
- package/src/daemon/handlers/inbox/provider-adapter.ts +0 -156
- package/src/daemon/handlers/inbox/providers/discord.ts +0 -252
- package/src/daemon/handlers/inbox/providers/email.ts +0 -152
- package/src/daemon/handlers/inbox/providers/imap-client.ts +0 -300
- package/src/daemon/handlers/inbox/providers/route-util.ts +0 -24
- package/src/daemon/handlers/inbox/providers/slack.ts +0 -263
- package/src/daemon/handlers/index.ts +0 -117
- package/src/daemon/handlers/register.ts +0 -168
- package/src/daemon/handlers/remote/backends/cloud-terminal.ts +0 -142
- package/src/daemon/handlers/remote/backends/docker.ts +0 -79
- package/src/daemon/handlers/remote/backends/index.ts +0 -40
- package/src/daemon/handlers/remote/backends/local-process.ts +0 -113
- package/src/daemon/handlers/remote/backends/process-runner.ts +0 -127
- package/src/daemon/handlers/remote/backends/ssh.ts +0 -125
- package/src/daemon/handlers/remote/backends/types.ts +0 -97
- package/src/daemon/handlers/remote/dispatcher.ts +0 -181
- package/src/daemon/handlers/remote/index.ts +0 -119
- package/src/daemon/handlers/remote/peer-registry.ts +0 -357
- package/src/daemon/handlers/remote/service.ts +0 -191
- package/src/daemon/handlers/routing/inbox-bridge.ts +0 -71
- package/src/daemon/handlers/routing/index.ts +0 -261
- package/src/daemon/handlers/routing/route-store.ts +0 -319
- package/src/daemon/handlers/routing/routing-resolver.ts +0 -75
- package/src/daemon/handlers/sqlite-store.ts +0 -278
- package/src/daemon/handlers/triage/index.ts +0 -57
- package/src/daemon/handlers/triage/integration.ts +0 -213
- package/src/daemon/handlers/triage/pipeline.ts +0 -274
- package/src/daemon/handlers/triage/scorer.ts +0 -287
- package/src/daemon/handlers/triage/tagger/discord.ts +0 -187
- package/src/daemon/handlers/triage/tagger/imap.ts +0 -384
- package/src/daemon/handlers/triage/tagger/index.ts +0 -184
- package/src/daemon/handlers/triage/tagger/shared.ts +0 -70
- package/src/daemon/handlers/triage/tagger/slack.ts +0 -69
- package/src/daemon/handlers/triage/types.ts +0 -50
- package/src/daemon/lifecycle.ts +0 -41
- package/src/daemon/provision-wake-model.ts +0 -81
- package/src/daemon/safe-serve.ts +0 -61
- package/src/daemon/send/channels.ts +0 -200
- package/src/daemon/send/command.ts +0 -332
- package/src/daemon/send/composition.ts +0 -99
- package/src/daemon/send/failure-text.ts +0 -93
- package/src/daemon/send/inert-text.ts +0 -225
- package/src/daemon/send/stdin.ts +0 -24
- package/src/daemon/service-commands.ts +0 -329
- package/src/export/cost-utils.ts +0 -319
- package/src/input/selection.ts +0 -135
- package/src/plugins/loader.ts +0 -15
- package/src/renderer/bottom-bar.ts +0 -58
- package/src/renderer/conversation-tree.ts +0 -228
- package/src/runtime/agent-graph-composition.ts +0 -78
- package/src/runtime/channel-composition.ts +0 -46
- package/src/runtime/cluster-composition.ts +0 -124
- package/src/runtime/cluster-group-composition.ts +0 -284
- package/src/runtime/code-index-services.ts +0 -167
- package/src/runtime/daemon-handler-composition.ts +0 -76
- package/src/runtime/device-posture-composition.ts +0 -110
- package/src/runtime/durability-housekeeping.ts +0 -183
- package/src/runtime/durability-services.ts +0 -155
- package/src/runtime/embedded-service-factories.ts +0 -74
- package/src/runtime/feature-settings.ts +0 -154
- package/src/runtime/fleet-needs-input-push.ts +0 -70
- package/src/runtime/fleet-services.ts +0 -41
- package/src/runtime/idle-power-services.ts +0 -85
- package/src/runtime/mail-composition.ts +0 -65
- package/src/runtime/memory-fold.ts +0 -55
- package/src/runtime/operator-token-cleanup.ts +0 -109
- package/src/runtime/path-shadow.ts +0 -418
- package/src/runtime/perf/panel-health-monitor.ts +0 -18
- package/src/runtime/provider-optimizer-wiring.ts +0 -55
- package/src/runtime/reachability-notice.ts +0 -100
- package/src/runtime/remote-execution-composition.ts +0 -62
- package/src/runtime/session-liveness-marker.ts +0 -257
- package/src/runtime/session-pointer-surface.ts +0 -22
- package/src/runtime/session-storage-services.ts +0 -41
- package/src/runtime/surface-feature-flags.ts +0 -96
- package/src/runtime/terminal-output-guard.ts +0 -235
- package/src/runtime/trust/workspace-registration.ts +0 -192
- package/src/runtime/trust/workspace-trust.ts +0 -229
- package/src/runtime/ui/index.ts +0 -39
- package/src/runtime/ui/model-picker/data-provider.ts +0 -182
- package/src/runtime/ui/model-picker/health-enrichment.ts +0 -231
- package/src/runtime/ui/model-picker/index.ts +0 -59
- package/src/runtime/ui/model-picker/types.ts +0 -153
- package/src/runtime/ui/provider-health/data-provider.ts +0 -244
- package/src/runtime/ui/provider-health/fallback-visualizer.ts +0 -71
- package/src/runtime/ui/provider-health/index.ts +0 -46
- package/src/runtime/ui/provider-health/types.ts +0 -146
- package/src/runtime/ui-events.ts +0 -1
- package/src/runtime/ui-read-model-helpers.ts +0 -1
- package/src/runtime/ui-read-models-observability-maintenance.ts +0 -1
- package/src/runtime/ui-read-models-observability-options.ts +0 -1
- package/src/runtime/ui-read-models-observability-remote.ts +0 -1
- package/src/runtime/ui-read-models-observability-security.ts +0 -1
- package/src/runtime/ui-read-models-observability-system.ts +0 -1
- package/src/runtime/ui-read-models-observability.ts +0 -1
- package/src/runtime/ui-service-queries.ts +0 -1
- package/src/runtime/voice-setup-services.ts +0 -98
- package/src/runtime/workstream-attempts-validation.ts +0 -77
- package/src/runtime/workstream-draft-edits.ts +0 -95
- package/src/runtime/workstream-draft-store.ts +0 -274
- package/src/runtime/workstream-draft-types.ts +0 -42
- package/src/runtime/workstream-services.ts +0 -373
- package/src/tools/index.ts +0 -1
- package/src/types/grid.ts +0 -48
- package/src/types/sql-js.d.ts +0 -15
- package/src/work-plans/work-plan-store.ts +0 -702
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { dirname, join, resolve } from 'node:path';
|
|
3
|
-
import { atomicWriteFileSync } from '
|
|
3
|
+
import { atomicWriteFileSync } from '@pellux/goodvibes-sdk/platform/config';
|
|
4
4
|
import type { CommandRegistry } from '../command-registry.ts';
|
|
5
5
|
import type { SelectionAction, SelectionItem } from '../selection-modal.ts';
|
|
6
6
|
import { openCommandPanel, requireServiceRegistry, requireShellPaths } from './runtime-services.ts';
|
|
@@ -8,7 +8,7 @@ import type { SessionReturnContextSummary } from '@/runtime/index.ts';
|
|
|
8
8
|
import { formatReturnContextForDisplay, getReturnContextMode, maybeAssistReturnContextSummary } from '@/runtime/index.ts';
|
|
9
9
|
import { requirePanelManager, requireProviderApi, requireSessionManager, requireSurface } from './runtime-services.ts';
|
|
10
10
|
import { resumeSessionCore, reopenPanelsWithModalSkip, DEFAULT_PANEL_REOPEN_LIMIT } from '../../core/session-resume-core.ts';
|
|
11
|
-
import { checkSessionLiveness } from '
|
|
11
|
+
import { checkSessionLiveness } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
12
12
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
13
13
|
|
|
14
14
|
function parseTranscriptKind(raw: string | undefined): TranscriptEventKind | 'all' {
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
setManagedSettingLock,
|
|
16
16
|
type SettingsSyncBundle,
|
|
17
17
|
} from '@/runtime/index.ts';
|
|
18
|
-
import { getProviderIdFromModel } from '
|
|
19
|
-
import { type ConfigKey } from '
|
|
18
|
+
import { getProviderIdFromModel } from '@pellux/goodvibes-sdk/platform/providers';
|
|
19
|
+
import { type ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
|
|
20
20
|
import { CONFIG_KEYS } from '@pellux/goodvibes-sdk/platform/config';
|
|
21
21
|
import type { CommandRegistry } from '../command-registry.ts';
|
|
22
22
|
import { openCommandPanel, requireShellPaths } from './runtime-services.ts';
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
11
11
|
import { requireShellPaths } from './runtime-services.ts';
|
|
12
12
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
13
|
-
import { calcSessionCost, isModelPriced } from '
|
|
13
|
+
import { calcSessionCost, isModelPriced } from '@pellux/goodvibes-sdk/platform/providers';
|
|
14
14
|
import {
|
|
15
15
|
GistUploadTarget,
|
|
16
16
|
NO_TOKEN_GUIDANCE,
|
|
@@ -1,17 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* tasks-runtime.ts — `/tasks`.
|
|
3
|
+
*
|
|
4
|
+
* The reads are a UNION now: this surface's own runtime tasks (the exec, agent
|
|
5
|
+
* and ACP work the loop here spawned) plus the daemon's (scheduled work,
|
|
6
|
+
* channel-driven runs, tasks other surfaces submitted). Before the daemon
|
|
7
|
+
* became its own product one registry held both, and `tasks.list(500)` off the
|
|
8
|
+
* in-process transport answered synchronously. It no longer holds both, so this
|
|
9
|
+
* command crosses a wire and is async — the same shape `/ci` and the fleet act
|
|
10
|
+
* verbs already use.
|
|
11
|
+
*
|
|
12
|
+
* The list output is unchanged for a local-only fleet: same header, same
|
|
13
|
+
* columns, same 20-row cap, same filter semantics. What is added is the daemon
|
|
14
|
+
* half, and one honest line when the daemon could not be reached — a partial
|
|
15
|
+
* list of real tasks beats an error page, but it must not read as complete.
|
|
16
|
+
*
|
|
17
|
+
* Writes do NOT degrade that way. A lifecycle act against a task this terminal
|
|
18
|
+
* does not own is routed to the daemon's verb where one exists (cancel, retry)
|
|
19
|
+
* and refused by name where none does (update, complete, fail, pause and
|
|
20
|
+
* resume have no wire verb). Applying one locally would report success and
|
|
21
|
+
* change nothing on the process that actually runs the task.
|
|
22
|
+
*/
|
|
23
|
+
import type { CommandRegistry, CommandContext } from '../command-registry.ts';
|
|
2
24
|
import type { RuntimeTask, TaskLifecycleState } from '@/runtime/index.ts';
|
|
3
25
|
import { reviewWorktreeAttachments } from '@/runtime/index.ts';
|
|
4
26
|
import { requireOperatorClient, requireOpsApi, requirePanelManager, requireShellPaths } from './runtime-services.ts';
|
|
27
|
+
import { createTasksClient, type TasksClient, type UnionTask } from '@pellux/goodvibes-sdk/platform/runtime/client';
|
|
28
|
+
import { createDaemonVerbCaller } from '../../runtime/client/operator-endpoint.ts';
|
|
5
29
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
6
30
|
|
|
7
|
-
function sortRuntimeTasks(tasks:
|
|
31
|
+
function sortRuntimeTasks(tasks: readonly UnionTask[]): UnionTask[] {
|
|
8
32
|
const statusOrder: TaskLifecycleState[] = ['running', 'queued', 'blocked', 'failed', 'completed', 'cancelled'];
|
|
9
33
|
const ranking = new Map(statusOrder.map((status, index) => [status, index] as const));
|
|
10
34
|
return [...tasks].sort((a, b) => {
|
|
11
|
-
const rankDelta = (ranking.get(a.status) ?? 99) - (ranking.get(b.status) ?? 99);
|
|
35
|
+
const rankDelta = (ranking.get(a.task.status) ?? 99) - (ranking.get(b.task.status) ?? 99);
|
|
12
36
|
if (rankDelta !== 0) return rankDelta;
|
|
13
|
-
const aWhen = a.startedAt ?? a.queuedAt;
|
|
14
|
-
const bWhen = b.startedAt ?? b.queuedAt;
|
|
37
|
+
const aWhen = a.task.startedAt ?? a.task.queuedAt;
|
|
38
|
+
const bWhen = b.task.startedAt ?? b.task.queuedAt;
|
|
15
39
|
return bWhen - aWhen;
|
|
16
40
|
});
|
|
17
41
|
}
|
|
@@ -28,13 +52,38 @@ function summarizeTaskResult(task: RuntimeTask): string {
|
|
|
28
52
|
return normalized.length <= 140 ? normalized : `${normalized.slice(0, 137)}...`;
|
|
29
53
|
}
|
|
30
54
|
|
|
55
|
+
/** The union reader: the in-process source plus this workspace's daemon. */
|
|
56
|
+
function tasksClientFor(ctx: CommandContext): TasksClient {
|
|
57
|
+
const operatorClient = requireOperatorClient(ctx);
|
|
58
|
+
return createTasksClient({
|
|
59
|
+
local: {
|
|
60
|
+
list: (limit) => operatorClient.tasks.list(limit),
|
|
61
|
+
get: (taskId) => operatorClient.tasks.get(taskId),
|
|
62
|
+
},
|
|
63
|
+
verbs: createDaemonVerbCaller({
|
|
64
|
+
configManager: ctx.platform.configManager,
|
|
65
|
+
// Lazy, matching getOperatorRpc: a disabled-daemon context with no shell
|
|
66
|
+
// paths wired still gets the honest reason instead of a throw.
|
|
67
|
+
homeDirectory: () => requireShellPaths(ctx).homeDirectory,
|
|
68
|
+
}),
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** The five lifecycle acts the operator contract carries no verb for. */
|
|
73
|
+
const LOCAL_ONLY_ACTS = new Set(['update', 'complete', 'fail', 'pause', 'resume']);
|
|
74
|
+
|
|
75
|
+
function refuseDaemonOwnedAct(taskId: string, subcommand: string): string {
|
|
76
|
+
return `${taskId} runs on the daemon, and the operator contract carries no ${subcommand} verb to reach it with. `
|
|
77
|
+
+ 'Cancel and retry are available; the rest act on this terminal\'s own tasks.';
|
|
78
|
+
}
|
|
79
|
+
|
|
31
80
|
export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
|
|
32
81
|
registry.register({
|
|
33
82
|
name: 'tasks',
|
|
34
83
|
aliases: ['task'],
|
|
35
84
|
description: 'Inspect and control runtime tasks',
|
|
36
85
|
usage: '[list [status|kind] | show <taskId> | output <taskId> | create <kind> <owner> <title...> | update <taskId> <title|description|result> <value...> | complete <taskId> [result] | fail <taskId> <error...> | cancel <taskId> [note] | pause <taskId> [note] | resume <taskId> [note] | retry <taskId> [note]]',
|
|
37
|
-
handler(args, ctx) {
|
|
86
|
+
async handler(args, ctx) {
|
|
38
87
|
if (args.length === 0) {
|
|
39
88
|
if (ctx.showPanel) ctx.showPanel('tasks');
|
|
40
89
|
else {
|
|
@@ -46,20 +95,31 @@ export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
|
|
|
46
95
|
return;
|
|
47
96
|
}
|
|
48
97
|
|
|
49
|
-
const operatorClient = requireOperatorClient(ctx);
|
|
50
|
-
const tasks = sortRuntimeTasks([...operatorClient.tasks.list(500)]);
|
|
51
98
|
const subcommand = args[0]?.toLowerCase() ?? 'list';
|
|
99
|
+
const tasksClient = tasksClientFor(ctx);
|
|
52
100
|
|
|
53
101
|
if (subcommand === 'list') {
|
|
102
|
+
const { tasks: union, daemonUnavailable } = await tasksClient.list(500);
|
|
103
|
+
const tasks = sortRuntimeTasks(union);
|
|
54
104
|
const filter = args[1]?.toLowerCase();
|
|
55
|
-
const filtered = tasks.filter((
|
|
105
|
+
const filtered = tasks.filter((entry) => !filter || entry.task.status === filter || entry.task.kind === filter);
|
|
106
|
+
// The daemon note rides ALONGSIDE whatever was found rather than
|
|
107
|
+
// replacing it: the local half is real work, and hiding it behind an
|
|
108
|
+
// error would lose tasks that are genuinely running here.
|
|
109
|
+
const daemonNote = daemonUnavailable
|
|
110
|
+
? [` (the daemon's tasks are not included: ${daemonUnavailable})`]
|
|
111
|
+
: [];
|
|
56
112
|
if (filtered.length === 0) {
|
|
57
|
-
ctx.print(
|
|
113
|
+
ctx.print([
|
|
114
|
+
filter ? `No tasks matched "${filter}".` : 'No tasks recorded yet.',
|
|
115
|
+
...daemonNote,
|
|
116
|
+
].join('\n'));
|
|
58
117
|
return;
|
|
59
118
|
}
|
|
60
119
|
ctx.print([
|
|
61
120
|
`Runtime Tasks (${filtered.length})`,
|
|
62
|
-
...filtered.slice(0, 20).map((task) => ` ${task.id} ${task.status.padEnd(9)} ${task.kind.padEnd(11)} ${task.owner} ${task.title}`),
|
|
121
|
+
...filtered.slice(0, 20).map(({ task }) => ` ${task.id} ${task.status.padEnd(9)} ${task.kind.padEnd(11)} ${task.owner} ${task.title}`),
|
|
122
|
+
...daemonNote,
|
|
63
123
|
].join('\n'));
|
|
64
124
|
return;
|
|
65
125
|
}
|
|
@@ -70,17 +130,19 @@ export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
|
|
|
70
130
|
ctx.print('Usage: /tasks show <taskId>');
|
|
71
131
|
return;
|
|
72
132
|
}
|
|
73
|
-
const
|
|
74
|
-
if (!
|
|
133
|
+
const found = await tasksClient.get(taskId);
|
|
134
|
+
if (!found) {
|
|
75
135
|
ctx.print(`Unknown task: ${taskId}`);
|
|
76
136
|
return;
|
|
77
137
|
}
|
|
138
|
+
const { task, origin } = found;
|
|
78
139
|
ctx.print([
|
|
79
140
|
`Task ${task.id}`,
|
|
80
141
|
` title: ${task.title}`,
|
|
81
142
|
` kind: ${task.kind}`,
|
|
82
143
|
` status: ${task.status}`,
|
|
83
144
|
` owner: ${task.owner}`,
|
|
145
|
+
` runs on: ${origin === 'local' ? 'this terminal' : 'the daemon'}`,
|
|
84
146
|
` cancellable: ${task.cancellable ? 'yes' : 'no'}`,
|
|
85
147
|
` queuedAt: ${new Date(task.queuedAt).toISOString()}`,
|
|
86
148
|
` startedAt: ${task.startedAt ? new Date(task.startedAt).toISOString() : 'n/a'}`,
|
|
@@ -111,11 +173,12 @@ export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
|
|
|
111
173
|
ctx.print('Usage: /tasks output <taskId>');
|
|
112
174
|
return;
|
|
113
175
|
}
|
|
114
|
-
const
|
|
115
|
-
if (!
|
|
176
|
+
const found = await tasksClient.get(taskId);
|
|
177
|
+
if (!found) {
|
|
116
178
|
ctx.print(`Unknown task: ${taskId}`);
|
|
117
179
|
return;
|
|
118
180
|
}
|
|
181
|
+
const { task } = found;
|
|
119
182
|
const payload = typeof task.result === 'string'
|
|
120
183
|
? task.result
|
|
121
184
|
: task.result !== undefined
|
|
@@ -139,6 +202,10 @@ export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
|
|
|
139
202
|
ctx.print(`Unknown task kind: ${kind}`);
|
|
140
203
|
return;
|
|
141
204
|
}
|
|
205
|
+
// Created HERE on purpose: a task this command creates is one this
|
|
206
|
+
// terminal's loop is expected to drive, so it belongs in the registry
|
|
207
|
+
// that drives it. Submitting work TO the daemon is what /schedule and
|
|
208
|
+
// the channel surfaces do.
|
|
142
209
|
const task = opsApi.tasks.create({
|
|
143
210
|
kind: kind as import('@/runtime/index.ts').TaskKind,
|
|
144
211
|
owner,
|
|
@@ -149,58 +216,81 @@ export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
|
|
|
149
216
|
return;
|
|
150
217
|
}
|
|
151
218
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
if (!taskId || !field || !value) {
|
|
158
|
-
ctx.print('Usage: /tasks update <taskId> <title|description|result> <value...>');
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
if (field !== 'title' && field !== 'description' && field !== 'result') {
|
|
162
|
-
ctx.print(`Unsupported task update field: ${field}`);
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
opsApi.tasks.update(taskId, field === 'result' ? { result: value } : { [field]: value });
|
|
166
|
-
ctx.print(`Updated task ${taskId} field ${field}.`);
|
|
219
|
+
const taskId = args[1];
|
|
220
|
+
if (!taskId) {
|
|
221
|
+
ctx.print(subcommand === 'update'
|
|
222
|
+
? 'Usage: /tasks update <taskId> <title|description|result> <value...>'
|
|
223
|
+
: `Usage: /tasks ${subcommand} <taskId> [note]`);
|
|
167
224
|
return;
|
|
168
225
|
}
|
|
169
226
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
const result = args.slice(2).join(' ').trim() || undefined;
|
|
178
|
-
opsApi.tasks.complete(taskId, result);
|
|
179
|
-
ctx.print(`Completed task ${taskId}.`);
|
|
227
|
+
// Which registry owns this id decides what may be done to it. An act
|
|
228
|
+
// aimed at a daemon task must never be applied to a local record that
|
|
229
|
+
// does not exist — that reports success and changes nothing.
|
|
230
|
+
const found = await tasksClient.get(taskId);
|
|
231
|
+
if (!found) {
|
|
232
|
+
ctx.print(`Unknown task: ${taskId}`);
|
|
180
233
|
return;
|
|
181
234
|
}
|
|
182
235
|
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
236
|
+
if (found.origin === 'daemon') {
|
|
237
|
+
if (LOCAL_ONLY_ACTS.has(subcommand)) {
|
|
238
|
+
ctx.print(refuseDaemonOwnedAct(taskId, subcommand));
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
try {
|
|
242
|
+
switch (subcommand) {
|
|
243
|
+
case 'cancel':
|
|
244
|
+
await tasksClient.cancel(taskId);
|
|
245
|
+
ctx.print(`Cancelled task ${taskId} on the daemon.`);
|
|
246
|
+
return;
|
|
247
|
+
case 'retry':
|
|
248
|
+
await tasksClient.retry(taskId);
|
|
249
|
+
ctx.print(`Re-queued task ${taskId} on the daemon.`);
|
|
250
|
+
return;
|
|
251
|
+
default:
|
|
252
|
+
ctx.print(`Unknown tasks subcommand: ${subcommand}`);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
} catch (error) {
|
|
256
|
+
ctx.print(summarizeError(error));
|
|
189
257
|
return;
|
|
190
258
|
}
|
|
191
|
-
opsApi.tasks.fail(taskId, { error: errorText });
|
|
192
|
-
ctx.print(`Failed task ${taskId}.`);
|
|
193
|
-
return;
|
|
194
259
|
}
|
|
195
260
|
|
|
196
|
-
const taskId = args[1];
|
|
197
|
-
const note = args.slice(2).join(' ').trim() || undefined;
|
|
198
|
-
if (!taskId) {
|
|
199
|
-
ctx.print(`Usage: /tasks ${subcommand} <taskId> [note]`);
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
261
|
const opsApi = requireOpsApi(ctx);
|
|
203
262
|
try {
|
|
263
|
+
if (subcommand === 'update') {
|
|
264
|
+
const field = args[2];
|
|
265
|
+
const value = args.slice(3).join(' ').trim();
|
|
266
|
+
if (!field || !value) {
|
|
267
|
+
ctx.print('Usage: /tasks update <taskId> <title|description|result> <value...>');
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
if (field !== 'title' && field !== 'description' && field !== 'result') {
|
|
271
|
+
ctx.print(`Unsupported task update field: ${field}`);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
opsApi.tasks.update(taskId, field === 'result' ? { result: value } : { [field]: value });
|
|
275
|
+
ctx.print(`Updated task ${taskId} field ${field}.`);
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
if (subcommand === 'complete') {
|
|
279
|
+
opsApi.tasks.complete(taskId, args.slice(2).join(' ').trim() || undefined);
|
|
280
|
+
ctx.print(`Completed task ${taskId}.`);
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
if (subcommand === 'fail') {
|
|
284
|
+
const errorText = args.slice(2).join(' ').trim();
|
|
285
|
+
if (!errorText) {
|
|
286
|
+
ctx.print('Usage: /tasks fail <taskId> <error...>');
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
opsApi.tasks.fail(taskId, { error: errorText });
|
|
290
|
+
ctx.print(`Failed task ${taskId}.`);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
const note = args.slice(2).join(' ').trim() || undefined;
|
|
204
294
|
switch (subcommand) {
|
|
205
295
|
case 'cancel':
|
|
206
296
|
opsApi.tasks.cancel(taskId, note);
|
|
@@ -3,29 +3,36 @@
|
|
|
3
3
|
* download-verify-swap mechanics are the SDK's canonical update policy
|
|
4
4
|
* module (platform/runtime/self-update — hoisted from this file's
|
|
5
5
|
* semantics), the same mechanism the daemon's hourly loop and
|
|
6
|
-
*
|
|
6
|
+
* the suite installer follow: one update mechanism everywhere. This file owns
|
|
7
7
|
* only the /update UX: install-kind gating, target selection, and the
|
|
8
8
|
* printed report.
|
|
9
9
|
*
|
|
10
10
|
* Subcommands:
|
|
11
11
|
* /update [check] — resolve the latest release tag and report
|
|
12
12
|
* whether this build is already current.
|
|
13
|
-
* /update apply — for a binary install (
|
|
14
|
-
* download + verify + atomically swap
|
|
15
|
-
* app
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* can't do safely.
|
|
13
|
+
* /update apply — for a binary install (the curl installer),
|
|
14
|
+
* download + verify + atomically swap THIS
|
|
15
|
+
* app's binary, and refresh the sqlite-vec
|
|
16
|
+
* native addon in lockstep so the vector index
|
|
17
|
+
* never goes stale beside a new binary. Every
|
|
18
|
+
* swap parks the outgoing file at
|
|
19
|
+
* `<path>.previous`, so the replaced version is
|
|
20
|
+
* always kept. For any other install kind,
|
|
21
|
+
* prints the exact command to run instead — it
|
|
22
|
+
* never attempts a swap it can't do safely.
|
|
24
23
|
* /update rollback — exchange each installed file with its kept
|
|
25
24
|
* `.previous` counterpart: one command back to
|
|
26
25
|
* the version that ran before the last update
|
|
27
26
|
* (and, being an exchange, one more command
|
|
28
27
|
* forward again).
|
|
28
|
+
*
|
|
29
|
+
* IT DOES NOT UPDATE THE DAEMON. `goodvibes-daemon` used to sit beside this
|
|
30
|
+
* binary as part of the same release, and this command swapped both. The daemon
|
|
31
|
+
* is its own product now, released from its own repository on its own version
|
|
32
|
+
* line, and it updates itself on an hourly loop. A swap from here would fetch
|
|
33
|
+
* an asset this repository's releases do not publish — and if one ever appeared
|
|
34
|
+
* under that name, would overwrite a working daemon with a build from the wrong
|
|
35
|
+
* line. The daemon is a neighbour in the install directory, not cargo.
|
|
29
36
|
* /update review — install/subscription/sandbox posture,
|
|
30
37
|
* unrelated to the update mechanics above.
|
|
31
38
|
* /update bundle export|inspect <path> — portable posture bundle, as before.
|
|
@@ -301,8 +308,6 @@ export async function applyUpdate(options: ApplyUpdateOptions): Promise<void> {
|
|
|
301
308
|
const baseUrl = releaseDownloadBaseUrl(latestTag);
|
|
302
309
|
const io = options.io ?? realUpdateFileIo;
|
|
303
310
|
const appBinaryPath = options.execPath;
|
|
304
|
-
const daemonBinaryPath = join(dirname(appBinaryPath), 'goodvibes-daemon');
|
|
305
|
-
const daemonBinaryPresent = io.exists(daemonBinaryPath);
|
|
306
311
|
|
|
307
312
|
// The sqlite-vec native addon travels with the binaries: refresh it in the
|
|
308
313
|
// same download-verify-swap pass so /update never leaves a new binary beside a
|
|
@@ -326,9 +331,6 @@ export async function applyUpdate(options: ApplyUpdateOptions): Promise<void> {
|
|
|
326
331
|
|
|
327
332
|
const targets: UpdateTarget[] = [
|
|
328
333
|
{ label: 'app binary', path: appBinaryPath, assetName: artifacts.app, executable: true },
|
|
329
|
-
...(daemonBinaryPresent
|
|
330
|
-
? [{ label: 'daemon binary', path: daemonBinaryPath, assetName: artifacts.daemon, executable: true }]
|
|
331
|
-
: []),
|
|
332
334
|
...(addon && addonTargetPath
|
|
333
335
|
? [{ label: 'vector addon', path: addonTargetPath, assetName: addon.assetName, executable: false }]
|
|
334
336
|
: []),
|
|
@@ -360,15 +362,14 @@ export async function applyUpdate(options: ApplyUpdateOptions): Promise<void> {
|
|
|
360
362
|
[
|
|
361
363
|
`Updated to ${latestTag}.`,
|
|
362
364
|
` app binary: ${appBinaryPath}`,
|
|
363
|
-
daemonBinaryPresent
|
|
364
|
-
? ` daemon binary: ${daemonBinaryPath}`
|
|
365
|
-
: ` daemon binary: not found at ${daemonBinaryPath} — left untouched`,
|
|
366
365
|
...(addonTargetPath ? [` vector addon: ${addonTargetPath}`] : []),
|
|
367
366
|
'',
|
|
368
367
|
'Restart goodvibes to run the new version.',
|
|
368
|
+
// Named, not silently omitted: someone who used to see two binaries swap
|
|
369
|
+
// here should read why only one did.
|
|
369
370
|
serviceInfo.managed
|
|
370
|
-
? `The daemon
|
|
371
|
-
: 'The daemon
|
|
371
|
+
? `The daemon updates itself on its own release line — this changed nothing about it (it runs under ${serviceInfo.unitName}.service).`
|
|
372
|
+
: 'The daemon updates itself on its own release line — this changed nothing about it.',
|
|
372
373
|
].join('\n'),
|
|
373
374
|
);
|
|
374
375
|
}
|
|
@@ -387,9 +388,9 @@ export interface RollbackUpdateOptions {
|
|
|
387
388
|
/**
|
|
388
389
|
* One-command rollback to the version that ran before the last update,
|
|
389
390
|
* delegating the exchange mechanics to the SDK's rollbackKeptPrevious (the
|
|
390
|
-
* same module the swap uses): every installed file (app
|
|
391
|
-
* binary
|
|
392
|
-
* with it — the previous version becomes live, and the version being rolled
|
|
391
|
+
* same module the swap uses): every installed file this command owns (the app
|
|
392
|
+
* binary and the vector addon) that has a kept `.previous` counterpart is
|
|
393
|
+
* EXCHANGED with it — the previous version becomes live, and the version being rolled
|
|
393
394
|
* back is itself kept at `.previous`, so a second `/update rollback` rolls
|
|
394
395
|
* forward again. Files without a kept counterpart are reported and left
|
|
395
396
|
* untouched; nothing is downloaded.
|
|
@@ -408,9 +409,11 @@ export function rollbackUpdate(options: RollbackUpdateOptions): void {
|
|
|
408
409
|
|
|
409
410
|
const io = options.io ?? realUpdateFileIo;
|
|
410
411
|
const addon = resolveSqliteVecAsset(options.platform, options.arch);
|
|
412
|
+
// The daemon binary is deliberately absent: this command never replaced it,
|
|
413
|
+
// so it has nothing here to restore. Rolling back a file another product owns
|
|
414
|
+
// would undo an update this app did not perform.
|
|
411
415
|
const targets = [
|
|
412
416
|
{ label: 'app binary', path: options.execPath },
|
|
413
|
-
{ label: 'daemon binary', path: join(dirname(options.execPath), 'goodvibes-daemon') },
|
|
414
417
|
...(addon ? [{ label: 'vector addon', path: join(dirname(options.execPath), 'lib', addon.dirName, addon.fileName) }] : []),
|
|
415
418
|
];
|
|
416
419
|
|
|
@@ -431,8 +434,8 @@ export function rollbackUpdate(options: RollbackUpdateOptions): void {
|
|
|
431
434
|
'',
|
|
432
435
|
'Restart goodvibes to run the restored version.',
|
|
433
436
|
serviceInfo.managed
|
|
434
|
-
? `The daemon
|
|
435
|
-
: 'The daemon
|
|
437
|
+
? `The daemon was not rolled back — it updates itself on its own release line (it runs under ${serviceInfo.unitName}.service).`
|
|
438
|
+
: 'The daemon was not rolled back — it updates itself on its own release line.',
|
|
436
439
|
].join('\n'),
|
|
437
440
|
);
|
|
438
441
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CommandRegistry } from '../command-registry.ts';
|
|
2
|
-
import type { WorkPlanItemStatus, WorkPlanStore } from '
|
|
3
|
-
import { WORK_PLAN_STATUSES } from '
|
|
2
|
+
import type { WorkPlanItemStatus, WorkPlanStore } from '@pellux/goodvibes-sdk/platform/workflow';
|
|
3
|
+
import { WORK_PLAN_STATUSES } from '@pellux/goodvibes-sdk/platform/workflow';
|
|
4
4
|
import { openModalCommand } from './runtime-services.ts';
|
|
5
5
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
6
6
|
|
|
@@ -23,7 +23,7 @@ import type {
|
|
|
23
23
|
import { AttemptError } from '@pellux/goodvibes-sdk/platform/orchestration';
|
|
24
24
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
25
25
|
import type { CommandContext } from '../command-registry.ts';
|
|
26
|
-
import type { WorkstreamCommandService } from '
|
|
26
|
+
import type { WorkstreamCommandService } from '@pellux/goodvibes-sdk/platform/orchestration';
|
|
27
27
|
import { requirePanelManager } from './runtime-services.ts';
|
|
28
28
|
import { describeFailureReason, isTurnBudgetReason } from '../../core/turn-budget-outcome.ts';
|
|
29
29
|
import { type AttemptGraphItem, renderDependentHoldLines } from './workstream-attempt-dependents.ts';
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
|
|
27
27
|
import { AdaptivePlanner } from '@pellux/goodvibes-sdk/platform/core';
|
|
28
28
|
import type { CreateWorkstreamInput, PhaseKind, PhaseRole, WorkItem, WorkItemState, Workstream, WorkstreamIsolation } from '@pellux/goodvibes-sdk/platform/orchestration';
|
|
29
|
-
import type { WorkstreamCommandService, WorkstreamDraft, WorkstreamDraftProvenance } from '
|
|
30
|
-
import { validateAttempts } from '
|
|
29
|
+
import type { WorkstreamCommandService, WorkstreamDraft, WorkstreamDraftProvenance } from '@pellux/goodvibes-sdk/platform/orchestration';
|
|
30
|
+
import { validateAttempts } from '@pellux/goodvibes-sdk/platform/orchestration';
|
|
31
31
|
import { handleAttemptsSubcommand } from './workstream-attempts.ts';
|
|
32
32
|
import type { CommandContext, CommandRegistry } from '../command-registry.ts';
|
|
33
33
|
import { describeOperatorRpcError, getOperatorRpc } from './operator-rpc.ts';
|
package/src/input/commands.ts
CHANGED
|
@@ -80,6 +80,7 @@ import { registerReviewRuntimeCommands } from './commands/review-runtime.ts';
|
|
|
80
80
|
import { registerPaletteRuntimeCommands } from './commands/palette-runtime.ts';
|
|
81
81
|
import { registerCiRuntimeCommands } from './commands/ci-runtime.ts';
|
|
82
82
|
import { registerCheckinRuntimeCommands } from './commands/checkin-runtime.ts';
|
|
83
|
+
import { registerHostedRuntimeCommands } from './commands/hosted-runtime.ts';
|
|
83
84
|
import { registerMailRuntimeCommands } from './commands/mail-runtime.ts';
|
|
84
85
|
import { registerCalendarRuntimeCommands } from './commands/calendar-runtime.ts';
|
|
85
86
|
import { registerPrincipalsRuntimeCommands } from './commands/principals-runtime.ts';
|
|
@@ -188,6 +189,7 @@ export const BUILTIN_COMMAND_GROUPS: readonly BuiltinCommandGroup[] = [
|
|
|
188
189
|
{ category: 'Policy', register: (registry) => registry.register(policyCommand) },
|
|
189
190
|
{ category: 'Providers', register: (registry) => registry.register(providerCommand) },
|
|
190
191
|
{ category: 'Eval', register: (registry) => registry.register(evalCommand) },
|
|
192
|
+
{ category: 'Sessions & Replay', register: registerHostedRuntimeCommands },
|
|
191
193
|
{ category: 'Sessions & Replay', register: (registry) => registry.register(sessionCommand) },
|
|
192
194
|
{ category: 'Sessions & Replay', register: (registry) => registry.register(resumeCommand) },
|
|
193
195
|
{ category: 'Memory', register: (registry) => registry.register(recallCommand) },
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
import { FEATURE_SETTINGS } from '@pellux/goodvibes-sdk/platform/runtime/state';
|
|
23
23
|
import type { FeatureSetting } from '@pellux/goodvibes-sdk/platform/runtime/state';
|
|
24
24
|
import type { ConfigSetting } from '@pellux/goodvibes-sdk/platform/config';
|
|
25
|
-
import { getConfigSchemaSetting } from '
|
|
25
|
+
import { getConfigSchemaSetting } from '@pellux/goodvibes-terminal-shell';
|
|
26
26
|
import type { FlagEntry, SettingEntry, SettingsCategory } from './settings-modal-types.ts';
|
|
27
27
|
|
|
28
28
|
/** Every enablement key — these rows render as feature headers, never as plain sub-rows. */
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* already-allocated context before each feed() dispatch.
|
|
12
12
|
*/
|
|
13
13
|
import type { InputFeedContext } from './handler-feed.ts';
|
|
14
|
-
import type { SelectionManager } from '
|
|
15
|
-
import type { InfiniteBuffer } from '
|
|
14
|
+
import type { SelectionManager } from '@pellux/goodvibes-terminal-shell';
|
|
15
|
+
import type { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
|
|
16
16
|
import type { CommandRegistry, CommandContext } from './command-registry.ts';
|
|
17
17
|
import type { AutocompleteEngine } from './autocomplete.ts';
|
|
18
18
|
import type { FilePickerModal } from './file-picker.ts';
|
|
@@ -38,7 +38,7 @@ import type { KeybindingsManager } from './keybindings.ts';
|
|
|
38
38
|
import type { ModelPickerTarget } from './model-picker.ts';
|
|
39
39
|
import type { KillRing } from './kill-ring.ts';
|
|
40
40
|
import type { PanelMouseLayout } from './handler-feed-routes.ts';
|
|
41
|
-
import type { FocusTracker } from '
|
|
41
|
+
import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
42
42
|
import type { PanelBurstGuardState } from './panel-paste-flood-guard.ts';
|
|
43
43
|
|
|
44
44
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync, writeFileSync, existsSync } from 'node:fs';
|
|
2
2
|
import { copyToClipboard, pasteFromClipboard, pasteImageFromClipboard } from '../utils/clipboard.ts';
|
|
3
|
-
import type { InfiniteBuffer } from '
|
|
3
|
+
import type { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
|
|
4
4
|
import type { BlockMeta, ConversationManager } from '../core/conversation';
|
|
5
5
|
import type { PermissionCategory } from '@pellux/goodvibes-sdk/platform/permissions';
|
|
6
6
|
import type { ContentPart } from '@pellux/goodvibes-sdk/platform/providers';
|
|
@@ -9,7 +9,7 @@ import type { BookmarkManager } from '@pellux/goodvibes-sdk/platform/bookmarks';
|
|
|
9
9
|
import { resolveAndValidatePath } from '@pellux/goodvibes-sdk/platform/utils';
|
|
10
10
|
import { analyzePermissionRequest } from '@pellux/goodvibes-sdk/platform/permissions';
|
|
11
11
|
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
12
|
-
import type { SelectionManager } from '
|
|
12
|
+
import type { SelectionManager } from '@pellux/goodvibes-terminal-shell';
|
|
13
13
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
14
14
|
|
|
15
15
|
export const MARKER_REGEX = /\[(TEXT|IMAGE): [^\]]+\]/g;
|
|
@@ -4,7 +4,7 @@ import type { InputHistory } from './input-history.ts';
|
|
|
4
4
|
import type { ContentPart } from '@pellux/goodvibes-sdk/platform/providers';
|
|
5
5
|
import type { CommandRegistry, CommandContext } from './command-registry.ts';
|
|
6
6
|
import type { AutocompleteEngine } from './autocomplete.ts';
|
|
7
|
-
import type { SelectionManager } from '
|
|
7
|
+
import type { SelectionManager } from '@pellux/goodvibes-terminal-shell';
|
|
8
8
|
import type { WrappedPromptInfo } from './handler-prompt-buffer.ts';
|
|
9
9
|
import {
|
|
10
10
|
ensureInputCursorVisible as computeInputScrollTop,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InputToken } from '@pellux/goodvibes-sdk/platform/core';
|
|
2
|
-
import type { InfiniteBuffer } from '
|
|
2
|
+
import type { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
|
|
3
3
|
import type { CommandContext, CommandRegistry } from './command-registry.ts';
|
|
4
4
|
import { AutocompleteEngine } from './autocomplete.ts';
|
|
5
5
|
import { FilePickerModal } from './file-picker.ts';
|
|
@@ -40,12 +40,12 @@ import { handleCommandModeToken } from './handler-command-route.ts';
|
|
|
40
40
|
import { handleGlobalShortcutToken } from './handler-shortcuts.ts';
|
|
41
41
|
import type { Panel } from '../panels/types.ts';
|
|
42
42
|
import { handlePanelIntegrationAction } from './panel-integration-actions.ts';
|
|
43
|
-
import { SelectionManager } from '
|
|
43
|
+
import { SelectionManager } from '@pellux/goodvibes-terminal-shell';
|
|
44
44
|
import type { PanelManager } from '../panels/panel-manager.ts';
|
|
45
45
|
import type { KeybindingsManager } from './keybindings.ts';
|
|
46
46
|
import type { ModelPickerTarget } from './model-picker.ts';
|
|
47
47
|
import type { KillRing } from './kill-ring.ts';
|
|
48
|
-
import type { FocusTracker } from '
|
|
48
|
+
import type { FocusTracker } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* InputFeedContext — The single long-lived context object passed to feedInputTokens
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InputToken } from '@pellux/goodvibes-sdk/platform/core';
|
|
2
|
-
import type { InfiniteBuffer } from '
|
|
2
|
+
import type { InfiniteBuffer } from '@pellux/goodvibes-terminal-shell';
|
|
3
3
|
import type { ConversationManager } from '../core/conversation';
|
|
4
4
|
import type { SelectionResult, SelectionModal } from './selection-modal.ts';
|
|
5
5
|
import type { BookmarkModal } from './bookmark-modal.ts';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { join } from 'node:path';
|
|
8
8
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
9
|
-
import { resolveDaemonCompanionToken } from '
|
|
9
|
+
import { resolveDaemonCompanionToken } from '@pellux/goodvibes-sdk/platform/runtime/operations';
|
|
10
10
|
import { isLoopbackAddress } from './onboarding/onboarding-wizard-helpers.ts';
|
|
11
11
|
import {
|
|
12
12
|
buildManagedDaemonServiceManager,
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
isRuntimeEndpointActive,
|
|
23
23
|
runtimePortDiagnostic,
|
|
24
24
|
} from './onboarding/onboarding-runtime-status.ts';
|
|
25
|
+
import { GOODVIBES_TUI_SURFACE_ROOT } from '../config/surface.ts';
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* Immediately (not deferred to the final wizard Apply):
|
|
@@ -60,7 +61,7 @@ export async function handleConnectExistingDaemonForHandler(handler: InputHandle
|
|
|
60
61
|
handler.requestRender();
|
|
61
62
|
try {
|
|
62
63
|
const daemonHomeDir = join(handler.uiServices.environment.homeDirectory, '.goodvibes', 'daemon');
|
|
63
|
-
resolveDaemonCompanionToken(daemonHomeDir, token);
|
|
64
|
+
resolveDaemonCompanionToken(daemonHomeDir, GOODVIBES_TUI_SURFACE_ROOT, token);
|
|
64
65
|
// hostMode has to move with the host. The control-plane URL is DERIVED from
|
|
65
66
|
// hostMode/host/port, and 'local' pins the dial target to 127.0.0.1 no
|
|
66
67
|
// matter what host is stored — so adopting a daemon on another machine
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createOAuthLocalListener, resolveDaemonEnabled } from '@pellux/goodvibes-sdk/platform/config';
|
|
2
2
|
import { beginOpenAICodexLogin, exchangeOpenAICodexCode } from '@pellux/goodvibes-sdk/platform/config';
|
|
3
3
|
import { summarizeError, openExternalUrl } from '@pellux/goodvibes-sdk/platform/utils';
|
|
4
|
-
import { getProviderIdFromModel } from '
|
|
4
|
+
import { getProviderIdFromModel } from '@pellux/goodvibes-sdk/platform/providers';
|
|
5
5
|
import { buildProviderAccountSnapshot } from '@/runtime/index.ts';
|
|
6
6
|
import { enrichProviderAccountsSnapshot } from '../runtime/onboarding/provider-key-capture.ts';
|
|
7
7
|
import { handleConnectExistingDaemonForHandler, handleMigrateLegacyDaemonServiceForHandler } from './handler-onboarding-daemon-adopt.ts';
|