@pellux/goodvibes-tui 1.13.0 → 1.14.0

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.
Files changed (157) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/README.md +6 -6
  3. package/bin/goodvibes +6 -0
  4. package/bin/goodvibes-daemon +6 -0
  5. package/bin/launcher-support.js +34 -1
  6. package/docs/foundation-artifacts/operator-contract.json +8076 -2047
  7. package/package.json +15 -11
  8. package/scripts/postinstall.js +73 -48
  9. package/src/cli/bundle-command.ts +5 -5
  10. package/src/cli/completion.ts +1 -1
  11. package/src/cli/completions/generate.ts +15 -3
  12. package/src/cli/doctor.ts +385 -0
  13. package/src/cli/entrypoint.ts +72 -1
  14. package/src/cli/help.ts +29 -9
  15. package/src/cli/hooks-command.ts +74 -0
  16. package/src/cli/hooks-report.ts +167 -0
  17. package/src/cli/index.ts +3 -0
  18. package/src/cli/management.ts +13 -1
  19. package/src/cli/parser.ts +10 -2
  20. package/src/cli/plugin-bundles-command.ts +228 -0
  21. package/src/cli/plugin-command.ts +179 -0
  22. package/src/cli/service-posture.ts +10 -0
  23. package/src/cli/status.ts +275 -2
  24. package/src/cli/tui-startup.ts +119 -1
  25. package/src/cli/types.ts +3 -1
  26. package/src/config/index.ts +16 -0
  27. package/src/config/tui-extension-settings.ts +169 -0
  28. package/src/core/approval-alert.ts +15 -2
  29. package/src/core/compaction-receipt.ts +127 -0
  30. package/src/core/model-routing-chip.ts +82 -0
  31. package/src/core/permission-mode.ts +89 -0
  32. package/src/core/rewind-receipt.ts +83 -0
  33. package/src/core/rewind-turn-anchors.ts +160 -0
  34. package/src/core/scriptable-statusline.ts +141 -0
  35. package/src/core/session-auto-titler.ts +110 -0
  36. package/src/core/stream-event-wiring.ts +20 -0
  37. package/src/core/system-message-router.ts +1 -1
  38. package/src/core/terminal-notifier.ts +102 -0
  39. package/src/core/turn-event-wiring.ts +80 -1
  40. package/src/input/command-reference.ts +96 -0
  41. package/src/input/command-registry.ts +25 -0
  42. package/src/input/commands/channel-pairing.ts +245 -0
  43. package/src/input/commands/channel-runtime.ts +152 -6
  44. package/src/input/commands/checkin-runtime.ts +89 -0
  45. package/src/input/commands/checkpoint-runtime.ts +7 -179
  46. package/src/input/commands/ci-runtime.ts +207 -0
  47. package/src/input/commands/cost-attribution-format.ts +52 -0
  48. package/src/input/commands/cost-runtime.ts +44 -4
  49. package/src/input/commands/editor-runtime.ts +22 -0
  50. package/src/input/commands/flags-runtime.ts +328 -0
  51. package/src/input/commands/health-metrics-format.ts +67 -0
  52. package/src/input/commands/health-runtime.ts +55 -1
  53. package/src/input/commands/memory.ts +23 -0
  54. package/src/input/commands/operator-rpc.ts +95 -0
  55. package/src/input/commands/palette-runtime.ts +22 -0
  56. package/src/input/commands/permissions-provenance.ts +264 -0
  57. package/src/input/commands/permissions-runtime.ts +21 -0
  58. package/src/input/commands/planning-runtime.ts +28 -1
  59. package/src/input/commands/platform-access-runtime.ts +2 -97
  60. package/src/input/commands/principals-runtime.ts +212 -0
  61. package/src/input/commands/product-runtime.ts +43 -3
  62. package/src/input/commands/recall-files-config.ts +54 -0
  63. package/src/input/commands/recall-files-git.ts +57 -0
  64. package/src/input/commands/recall-files.ts +185 -0
  65. package/src/input/commands/recall-query.ts +8 -3
  66. package/src/input/commands/recall-review.ts +2 -2
  67. package/src/input/commands/recall-shared.ts +13 -0
  68. package/src/input/commands/relay-runtime.ts +86 -0
  69. package/src/input/commands/review-runtime.ts +160 -0
  70. package/src/input/commands/rewind-runtime.ts +362 -0
  71. package/src/input/commands/schedule-nl.ts +147 -0
  72. package/src/input/commands/schedule-runtime.ts +29 -10
  73. package/src/input/commands/secret-runtime.ts +55 -0
  74. package/src/input/commands/session-content.ts +19 -8
  75. package/src/input/commands/session-workflow.ts +10 -0
  76. package/src/input/commands/update-runtime.ts +363 -0
  77. package/src/input/commands/workstream-attempt-dependents.ts +103 -0
  78. package/src/input/commands/workstream-attempts.ts +244 -0
  79. package/src/input/commands/workstream-runtime.ts +164 -26
  80. package/src/input/commands/worktree-runtime.ts +56 -2
  81. package/src/input/commands.ts +135 -80
  82. package/src/input/composer-capture.ts +67 -0
  83. package/src/input/composer-editor.ts +134 -0
  84. package/src/input/concealed-input.ts +94 -0
  85. package/src/input/exec-env-scrub-config.ts +84 -0
  86. package/src/input/feature-unit-layout.ts +142 -0
  87. package/src/input/feed-context-factory.ts +2 -0
  88. package/src/input/handler-feed-routes.ts +17 -0
  89. package/src/input/handler-feed.ts +3 -0
  90. package/src/input/handler-modal-routes.ts +5 -2
  91. package/src/input/handler-shortcuts.ts +37 -0
  92. package/src/input/handler.ts +24 -2
  93. package/src/input/keybindings.ts +11 -2
  94. package/src/input/onboarding/onboarding-feature-units.ts +536 -0
  95. package/src/input/onboarding/onboarding-wizard-apply.ts +40 -6
  96. package/src/input/onboarding/onboarding-wizard-external-surfaces.ts +324 -629
  97. package/src/input/onboarding/onboarding-wizard-steps.ts +5 -5
  98. package/src/input/onboarding/onboarding-wizard-types.ts +6 -0
  99. package/src/input/relay-settings-descriptions.ts +35 -0
  100. package/src/input/sandbox-exec-config.ts +107 -0
  101. package/src/input/settings-modal-adjustment.ts +4 -7
  102. package/src/input/settings-modal-data.ts +178 -8
  103. package/src/input/settings-modal-mutations.ts +41 -13
  104. package/src/input/settings-modal-types.ts +42 -5
  105. package/src/input/settings-modal.ts +67 -15
  106. package/src/input/submission-router.ts +4 -1
  107. package/src/input/worktree-setup-config.ts +93 -0
  108. package/src/main.ts +43 -43
  109. package/src/panels/builtin/development.ts +14 -0
  110. package/src/panels/diff-review-model.ts +189 -0
  111. package/src/panels/diff-review-panel.ts +395 -0
  112. package/src/panels/fleet-panel-format.ts +114 -2
  113. package/src/panels/fleet-panel.ts +65 -78
  114. package/src/panels/fleet-read-model.ts +91 -11
  115. package/src/panels/fleet-stop.ts +19 -4
  116. package/src/panels/modals/memory-modal.ts +11 -2
  117. package/src/permissions/hunk-selection.ts +86 -5
  118. package/src/permissions/prompt.ts +108 -7
  119. package/src/permissions/sandbox-exec-gate.ts +162 -0
  120. package/src/renderer/settings-modal-helpers.ts +21 -1
  121. package/src/renderer/settings-modal.ts +70 -44
  122. package/src/renderer/shell-surface.ts +23 -1
  123. package/src/renderer/system-message.ts +4 -0
  124. package/src/renderer/tool-result-summary.ts +95 -5
  125. package/src/renderer/ui-factory.ts +22 -0
  126. package/src/runtime/bootstrap-command-context.ts +15 -1
  127. package/src/runtime/bootstrap-command-parts.ts +14 -2
  128. package/src/runtime/bootstrap-core.ts +38 -38
  129. package/src/runtime/bootstrap-notifier-sync.ts +41 -0
  130. package/src/runtime/bootstrap-shell.ts +8 -0
  131. package/src/runtime/bootstrap.ts +21 -23
  132. package/src/runtime/context-accounting-source.ts +103 -0
  133. package/src/runtime/conversation-rewind-port.ts +130 -0
  134. package/src/runtime/fleet-needs-input-push.ts +70 -0
  135. package/src/runtime/install-self-check-startup.ts +36 -0
  136. package/src/runtime/install-self-check.ts +149 -0
  137. package/src/runtime/onboarding/fast-path.ts +93 -0
  138. package/src/runtime/process-lifecycle.ts +32 -24
  139. package/src/runtime/relay-reachability-bridge.ts +53 -0
  140. package/src/runtime/release-artifacts.ts +79 -0
  141. package/src/runtime/services.ts +38 -37
  142. package/src/runtime/trust/workspace-registration.ts +184 -0
  143. package/src/runtime/trust/workspace-trust.ts +202 -0
  144. package/src/runtime/ui-services.ts +2 -1
  145. package/src/runtime/update-check.ts +113 -0
  146. package/src/runtime/workspace-checkpointing.ts +32 -0
  147. package/src/runtime/workstream-attempts-validation.ts +77 -0
  148. package/src/runtime/workstream-draft-edits.ts +95 -0
  149. package/src/runtime/workstream-draft-store.ts +101 -0
  150. package/src/runtime/workstream-draft-types.ts +42 -0
  151. package/src/runtime/workstream-services.ts +70 -39
  152. package/src/shell/blocking-input.ts +29 -0
  153. package/src/shell/ui-openers.ts +65 -0
  154. package/src/verification/verification-ledger.ts +56 -2
  155. package/src/version.ts +1 -1
  156. package/src/input/onboarding/onboarding-wizard-external-surface-extra-specs.ts +0 -130
  157. package/src/runtime/render-scheduler.ts +0 -90
package/CHANGELOG.md CHANGED
@@ -4,6 +4,107 @@ All notable changes to GoodVibes TUI.
4
4
 
5
5
  ---
6
6
 
7
+ ## [1.14.0] — 2026-07-11
8
+
9
+ ### Changes
10
+ - f45a47a6 chore: pin @pellux/goodvibes-sdk 1.7.0 — published feature-flags and emitters runtime subpaths; add @pellux/goodvibes-terminal-shell 1.7.0; drop dev-link overrides
11
+ - e9f844d6 feat(flags): align TUI toggle path with the SDK live config->flag bridge
12
+ - 3d1cb772 test(verification): behavior-verify the 28 flag-gated feature-knob settings; clear ledger floor
13
+ - a714db76 chore: adopt repacked SDK dev tarballs 1.6.1 (HEAD 0665cadc)
14
+ - b2dba275 chore: keep onboarding-wizard-steps and settings-modal-data within the 800-line budget
15
+ - 7729ec19 Onboarding: guided coverage for every remaining feature as a unit
16
+ - 4625c662 /flags: fold the flat dump into feature-unit-aware grouped output
17
+ - 64dcf4cd Settings modal: present each feature flag as a unit (toggle + its config keys)
18
+ - c7ad86c3 Fix inert hitl-ux-modes onboarding: enable gating flag with non-default hitlMode
19
+ - dea4fa31 chore: keep runtime/services.ts within the 800-line architecture budget
20
+ - 1ac1036e chore(sdk): reconcile generated artifacts and provider test for SDK 1.6.1
21
+ - 43c84ff7 chore(sdk): wire StepUpService into RuntimeServices for SDK 1.6.1
22
+ - 326772bd refactor(onboarding): source channel setup fields from the SDK schema, keep presentation local
23
+ - 50a41dab refactor(cli): rename the support-snapshot command to 'support-bundle' to end the 'bundle' collision
24
+ - 5cb1b444 feat(workstream): support non-leaf best-of-N attempts and show held dependents
25
+ - 6f8ebde2 feat(health): surface daemon runtime metrics and remaining quota in /health metrics
26
+ - b1299979 feat(rewind): persist message-anchored rewind anchors across session resume
27
+ - 572d52f2 feat(release): mirror platform binary packages to GitHub Packages + workflow structure gate
28
+ - f3a34e00 feat(compaction): surface sectionsIncluded in the post-compaction receipt
29
+ - be1f0fe2 chore: refresh @pellux tarball integrity for repacked SDK 1.6.1 dev state
30
+ - 6f9e03cd feat: surface the new SDK asks/receipts/results (compaction, attribution, judgment, child failure)
31
+ - 14185544 feat(context): bind context_accounting to the live Orchestrator
32
+ - b8b76ea9 chore: reconcile goldens for the refreshed SDK dev-link tarballs
33
+ - b44f70d0 feat(plugin): add the capability-bundle marketplace surface to goodvibes plugin
34
+ - 6613153b feat(relay): expose outbound relay reachability in the TUI
35
+ - 6c7e3fbe chore: refresh dev-linked SDK tarball integrity (relay + capability-bundle content)
36
+ - 44d4dcd8 feat(permissions): wire the exec sandbox into the approval flow
37
+ - 1df64126 feat(runtime): fold workspace registration into the first-open trust prompt
38
+ - 7a447c78 chore: refresh dev-linked SDK tarballs for repacked 1.6.1 (workspace registration store, sandbox policy exports)
39
+ - 6a9ca59e feat(workstream): surface best-of-N attempts (plan validation + attempts subcommand + fleet badge)
40
+ - 3eb500d1 feat(review): add per-hunk reject (revert) to /review via checkpoints.revertHunk
41
+ - 9e81187d feat(rewind): swap the TUI-local rewind coordinator for the SDK UnifiedRewindService
42
+ - e228188a chore: refresh dev-linked SDK tarballs for repacked 1.6.1 (rewind service, hunk revert, best-of-N attempts)
43
+ - 00ba2ff5 feat: add the exec env-scrub allowlist setting, wired through registerAllTools
44
+ - 0cb80635 feat: expose the per-command exec sandbox surface in settings and exec results
45
+ - a6ef4a71 feat: apply temporal-window-only /recall files proposals for real
46
+ - c4bc39b9 chore: refresh dev-linked SDK tarballs for repacked 1.6.1 (sandbox, scrub, temporal patch, learning config)
47
+ - b8c31445 feat(flags): /flags graduation — feature-flag graduation readiness report
48
+ - 3742073e feat(rewind): unified message-anchored /rewind (files + conversation) with /undo and /redo
49
+ - 13572e44 chore: refresh dev-linked SDK tarballs for repacked 1.6.1 (rewind + flag graduation + worktree config)
50
+ - 72cf6f78 memory: add the git-backed file projection surface (/recall files sync|review|apply) + temporal-status visibility
51
+ - 697a9458 exec: render withheld_env in tool results, surface shipped credential-read rules in /permissions
52
+ - e7293290 settings: add learning.consolidation category for the hoisted memory consolidation config
53
+ - 0b7ae90b chore: refresh dev-linked SDK tarball integrity for repacked 1.6.1 content
54
+ - 00986ade Add /cost attribution over cost.attribution.get, pre-launch quota consultation
55
+ - ab27babc Expose worktree.setup.commands/carryOverGlobs, show setup state, add rerun command
56
+ - 235b60f0 Drive /channel pair from the SDK's getBuiltinSetupSchema, add a real verify round-trip
57
+ - 2c1831bf Refresh dev-linked SDK tarballs to the repacked 1.6.1 content
58
+ - c96580bf docs: regenerate command reference for the new /workstream item-edit subcommands
59
+ - 6495cc23 workstream: journal drafts to disk so the plan-review gate survives a restart
60
+ - 06e71816 workstream: editable plan-review gate — edit-item / remove-item / move-item
61
+ - 9155cc6a feat(runtime): wire the fleet needs-input push fan-out live in the composed daemon
62
+ - 0d327ef4 feat(runtime): register the check-in gateway verb group live in the composed daemon
63
+ - 05f88c1b feat: add /principals command and /channel profiles subcommand
64
+ - b9436292 feat: expose check-in config in settings + add /checkin command
65
+ - d6f7f8d3 feat: add /ci command for CI-watch (status, watch, watches, unwatch)
66
+ - 9ab191d5 chore: refresh local SDK 1.6.1 tarballs (initiative cluster surface)
67
+ - c44fff9f Add run-goodvibes composite action + CI self-test
68
+ - 5e07b9e7 Stage Windows support: WSL2 documented, windows-x64 as non-gating beta
69
+ - e6f2b32b Add platform binary packages (esbuild/biome pattern) for npm/pnpm installs
70
+ - b76019d5 Collapse the global-install trust list to one package
71
+ - ef35276c feat(install): one-command curl installer for TUI, daemon, and agent
72
+ - 7000df12 feat(onboarding): fast-path first run + guided channel pairing
73
+ - ec214814 feat(runtime): per-workspace trust gate composed into the permission machinery
74
+ - 46677c0d feat(input): fuzzy command palette over the command registry
75
+ - 17bc7769 feat(docs): generate command reference from the registry with a drift gate
76
+ - 1ad897d5 chore: refresh dev-link integrity + operator contract for repacked SDK 1.6.1 tarballs
77
+ - 673bd32e Add comment-on-hunk review loop that steers comments to the session
78
+ - d082f7bc Add /permissions provenance panel
79
+ - d9847b14 Add doctor explain/routing/hooks diagnostician subcommands
80
+ - e91e9b02 feat: adopt SDK session permission-mode, compaction-receipt, and concealed-input surfaces
81
+ - 3b0c470a feat(settings): surface C3a config keys — permissions.backgroundAgents and diagnostics.postEdit
82
+ - 1d484a37 test: reconcile suite with SDK 1.6.1 surfaces (repo_map tool, fleet event domain, operator contract)
83
+ - bb8424f6 chore: refresh dev-link integrity for repacked SDK 1.6.1 tarballs
84
+ - d277d84c Add doctor exposure report and startup install self-check
85
+ - 2de2cfcd Regenerate operator contract artifact for SDK 1.6.1 gateway catalog
86
+ - efe3e075 Add hooks validate and plugin init/validate CLI subcommands
87
+ - 93312c5b Adopt goodvibes-terminal-shell package and SDK 1.6.1 surfaces
88
+ - 21d67309 Dev-link goodvibes SDK 1.6.1 tarballs for local adoption work
89
+ - 6f125cf0 Composer set: $EDITOR composition, # note capture, auto-titles, NL schedules
90
+ - ab695150 Add /flags command surfacing every feature flag by state
91
+ - 5ce19325 Add scriptable statusline driven by statusline.command config
92
+ - a4465501 Add checkpoints.* config keys for the workspace checkpoint root guard
93
+ - 512e7e24 test(goldens): regenerate settings-modal snapshot for OSC 9 notification settings
94
+ - e0e2ea5c test(goldens): regenerate fleet-panel snapshots for blocked-on-me badge + sort
95
+ - 93617d1a Routing chip: surface mid-session model changes as a visible conversation notice
96
+ - 949efcdb Approval prompt: 350ms input debounce, requester attribution, remember-scope preview
97
+ - cc89882e Notifications: OSC 9 in-terminal alerts + optional bell on approval/turn-end/agent-blocked
98
+ - 26a18444 Fleet: derive blocked-on-me state with badge, blocked-first sort, and jump key
99
+ - db8ca380 /update: implement a real self-update path instead of a decorative posture review
100
+ - 994a4444 Extract checksum verification into a shared release-artifacts module
101
+ - c0fa04e4 postinstall: hard-fail on a checksum entry missing from SHA256SUMS.txt
102
+
103
+ ## [1.13.1] — 2026-07-09
104
+
105
+ ### Changes
106
+ - 9dbd88e4 fix(daemon): attach handlers for every ws-only gateway verb — fleet.*, checkpoints.*, sessions.search, push.* were 501 on every vendored daemon build
107
+
7
108
  ## [1.13.0] — 2026-07-09
8
109
 
9
110
  ### Changes
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![CI](https://github.com/mgd34msu/goodvibes-tui/actions/workflows/ci.yml/badge.svg)](https://github.com/mgd34msu/goodvibes-tui/actions/workflows/ci.yml)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
- [![Version](https://img.shields.io/badge/version-1.13.0-blue.svg)](https://github.com/mgd34msu/goodvibes-tui)
5
+ [![Version](https://img.shields.io/badge/version-1.14.0-blue.svg)](https://github.com/mgd34msu/goodvibes-tui)
6
6
 
7
7
  A terminal-native AI coding, operations, automation, knowledge, and integration console with a typed runtime, omnichannel surfaces, structured memory/knowledge, and a raw ANSI renderer.
8
8
 
@@ -18,11 +18,11 @@ GoodVibes is a Bun program. Install Bun first and make sure `bun` is on `PATH`,
18
18
 
19
19
  ```sh
20
20
  bun add -g @pellux/goodvibes-tui
21
- bun pm trust -g @pellux/goodvibes-tui @pellux/goodvibes-sdk core-js tree-sitter-css tree-sitter-javascript tree-sitter-json tree-sitter-python tree-sitter-typescript
21
+ bun pm trust -g @pellux/goodvibes-tui
22
22
  goodvibes
23
23
  ```
24
24
 
25
- Bun blocks lifecycle scripts for untrusted global packages. The trust command is required after the first global install so GoodVibes can run its postinstall binary installer and every native dependency can run its install step. All packages in the trust command are required; if any remain untrusted, the install is incomplete. `tree-sitter-javascript` may appear more than once in the dependency tree, including under `tree-sitter-typescript`; trusting the package name covers those installed versions. Verify the global install with:
25
+ Bun blocks lifecycle scripts for untrusted global packages. Only one package needs trusting — `@pellux/goodvibes-tui` itself — so its postinstall can place the matching TUI and daemon binaries. No dependency needs trusting: the prebuilt binaries arrive through the platform-specific `@pellux/goodvibes-tui-<os>-<arch>` package (installed by the package manager with registry integrity, no lifecycle script), and the tree-sitter grammar packages ship their `.wasm` files as plain files — the app loads those, never the native bindings their `install` scripts would build. If you skip the trust step entirely the `goodvibes` launcher still self-heals on first run by fetching and checksum-verifying the binaries. Verify the global install with:
26
26
 
27
27
  ```sh
28
28
  bun pm -g untrusted
@@ -30,7 +30,7 @@ goodvibes --version
30
30
  goodvibes-daemon --version
31
31
  ```
32
32
 
33
- `bun pm -g untrusted` must report `Found 0 untrusted dependencies with scripts`. If it lists any package, rerun the full trust command above. `npm install -g @pellux/goodvibes-tui` is also supported, but it does not install Bun for you. The package preinstall check fails with a clear message if `bun` is missing from `PATH`.
33
+ `bun pm -g untrusted` must report `Found 0 untrusted dependencies with scripts` after trusting `@pellux/goodvibes-tui`. `npm install -g @pellux/goodvibes-tui` is also supported, but it does not install Bun for you. The package preinstall check fails with a clear message if `bun` is missing from `PATH`.
34
34
 
35
35
  Or run from source:
36
36
 
@@ -53,9 +53,9 @@ Release distribution:
53
53
 
54
54
  - GitHub Releases are the primary distribution path for compiled binaries
55
55
  - `bun add -g @pellux/goodvibes-tui` is the recommended global install path; the package is hosted on the npm registry and Bun installs from that registry directly
56
- - Bun global installs require trusting `@pellux/goodvibes-tui` so the package postinstall can download the matching TUI and daemon binaries; the dependency lifecycle packages currently requiring trust are `@pellux/goodvibes-sdk`, `core-js`, `tree-sitter-css`, `tree-sitter-javascript`, `tree-sitter-json`, `tree-sitter-python`, and `tree-sitter-typescript`
56
+ - Bun global installs require trusting only `@pellux/goodvibes-tui` so the package postinstall can place the matching TUI and daemon binaries; no dependency needs trusting (grammar `.wasm` files ship as plain files, the platform binary package carries the binaries with registry integrity, and no runtime dependency's install script is loaded)
57
57
  - `npm install -g @pellux/goodvibes-tui` is supported on Linux, macOS, and WSL when Bun is already installed; the preinstall check verifies Bun, and the install script downloads the matching TUI and daemon binaries for the current platform
58
- - native Windows is not supported; use WSL on Windows
58
+ - Windows is supported via WSL2 today: inside a WSL2 distribution GoodVibes is an ordinary Linux install, so the `linux-x64`/`linux-arm64` binaries run natively. Native Windows is beta (the `windows-x64` binary compiles but is not yet a stable release asset). See [docs/windows.md](docs/windows.md).
59
59
 
60
60
  Common paths:
61
61
 
package/bin/goodvibes CHANGED
@@ -7,6 +7,7 @@ import {
7
7
  isExecutable,
8
8
  isSourceCheckout,
9
9
  resolveArtifactName,
10
+ resolvePlatformPackageBinary,
10
11
  run,
11
12
  supportedTargetsText,
12
13
  } from './launcher-support.js';
@@ -37,6 +38,11 @@ if (vendoredBinary && isExecutable(vendoredBinary)) {
37
38
  run(vendoredBinary, process.argv.slice(2));
38
39
  }
39
40
 
41
+ const platformPackageBinary = resolvePlatformPackageBinary('app', process.platform, process.arch, packageRoot);
42
+ if (platformPackageBinary) {
43
+ run(platformPackageBinary, process.argv.slice(2));
44
+ }
45
+
40
46
  if (artifactName) {
41
47
  try {
42
48
  const installedBinary = await ensureVendoredBinary({ packageRoot, artifactName });
@@ -7,6 +7,7 @@ import {
7
7
  isExecutable,
8
8
  isSourceCheckout,
9
9
  resolveArtifactName,
10
+ resolvePlatformPackageBinary,
10
11
  run,
11
12
  supportedTargetsText,
12
13
  } from './launcher-support.js';
@@ -37,6 +38,11 @@ if (vendoredBinary && isExecutable(vendoredBinary)) {
37
38
  run(vendoredBinary, process.argv.slice(2));
38
39
  }
39
40
 
41
+ const platformPackageBinary = resolvePlatformPackageBinary('daemon', process.platform, process.arch, packageRoot);
42
+ if (platformPackageBinary) {
43
+ run(platformPackageBinary, process.argv.slice(2));
44
+ }
45
+
40
46
  if (artifactName) {
41
47
  try {
42
48
  const installedBinary = await ensureVendoredBinary({ packageRoot, artifactName });
@@ -1,10 +1,43 @@
1
1
  import { accessSync, chmodSync, constants, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
2
2
  import { createHash } from 'node:crypto';
3
+ import { createRequire } from 'node:module';
3
4
  import { spawnSync } from 'node:child_process';
4
- import { join } from 'node:path';
5
+ import { dirname, join } from 'node:path';
5
6
 
6
7
  const SUPPORTED_TARGETS = ['linux-x64', 'linux-arm64', 'darwin-x64', 'darwin-arm64'];
7
8
 
9
+ // Platform package names, mirrored from scripts/platform-packages.ts. This file
10
+ // is plain JS shipped in the tarball and cannot import that TS module; keep the
11
+ // two in sync. Keyed by `${process.platform}-${node-arch}`.
12
+ const PLATFORM_PACKAGE_NAMES = {
13
+ 'linux-x64': '@pellux/goodvibes-tui-linux-x64',
14
+ 'linux-arm64': '@pellux/goodvibes-tui-linux-arm64',
15
+ 'darwin-x64': '@pellux/goodvibes-tui-darwin-x64',
16
+ 'darwin-arm64': '@pellux/goodvibes-tui-darwin-arm64',
17
+ };
18
+
19
+ /**
20
+ * Resolve the prebuilt binary from the installed platform package
21
+ * (@pellux/goodvibes-tui-<os>-<arch>), if present. The package manager installs
22
+ * it with registry integrity and no lifecycle script, so this path needs no
23
+ * trust step and no post-install download. Returns null when the package is not
24
+ * installed (e.g. an unsupported platform, or optional-dep resolution skipped).
25
+ */
26
+ export function resolvePlatformPackageBinary(kind, platform, arch, fromDir) {
27
+ const artifactName = resolveArtifactName(kind, platform, arch);
28
+ if (!artifactName) return null;
29
+ const pkgName = PLATFORM_PACKAGE_NAMES[`${platform}-${arch}`];
30
+ if (!pkgName) return null;
31
+ try {
32
+ const require = createRequire(join(fromDir, 'package.json'));
33
+ const pkgJsonPath = require.resolve(`${pkgName}/package.json`);
34
+ const binPath = join(dirname(pkgJsonPath), 'bin', artifactName);
35
+ return isExecutable(binPath) ? binPath : null;
36
+ } catch {
37
+ return null;
38
+ }
39
+ }
40
+
8
41
  export function isExecutable(path) {
9
42
  try {
10
43
  accessSync(path, constants.X_OK);