botmux 3.18.3 → 3.18.4

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 (63) hide show
  1. package/dist/.runtime-build-id +1 -1
  2. package/dist/adapters/hook-installer.d.ts.map +1 -1
  3. package/dist/adapters/hook-installer.js +75 -2
  4. package/dist/adapters/hook-installer.js.map +1 -1
  5. package/dist/cli/current-actor.d.ts.map +1 -1
  6. package/dist/cli/current-actor.js +2 -1
  7. package/dist/cli/current-actor.js.map +1 -1
  8. package/dist/cli/dashboard-endpoint.d.ts.map +1 -1
  9. package/dist/cli/dashboard-endpoint.js +5 -2
  10. package/dist/cli/dashboard-endpoint.js.map +1 -1
  11. package/dist/cli/exact-chat-grant-client.d.ts.map +1 -1
  12. package/dist/cli/exact-chat-grant-client.js +2 -1
  13. package/dist/cli/exact-chat-grant-client.js.map +1 -1
  14. package/dist/cli/vc-agent.d.ts.map +1 -1
  15. package/dist/cli/vc-agent.js +2 -1
  16. package/dist/cli/vc-agent.js.map +1 -1
  17. package/dist/cli.d.ts.map +1 -1
  18. package/dist/cli.js +7 -6
  19. package/dist/cli.js.map +1 -1
  20. package/dist/core/daemon-ipc-auth.d.ts +9 -1
  21. package/dist/core/daemon-ipc-auth.d.ts.map +1 -1
  22. package/dist/core/daemon-ipc-auth.js +14 -3
  23. package/dist/core/daemon-ipc-auth.js.map +1 -1
  24. package/dist/core/loopback-fetch.d.ts +59 -0
  25. package/dist/core/loopback-fetch.d.ts.map +1 -0
  26. package/dist/core/loopback-fetch.js +347 -0
  27. package/dist/core/loopback-fetch.js.map +1 -0
  28. package/dist/core/managed-origin-attestation.d.ts.map +1 -1
  29. package/dist/core/managed-origin-attestation.js +2 -1
  30. package/dist/core/managed-origin-attestation.js.map +1 -1
  31. package/dist/daemon.d.ts.map +1 -1
  32. package/dist/daemon.js +2 -1
  33. package/dist/daemon.js.map +1 -1
  34. package/dist/dashboard/aggregator.d.ts.map +1 -1
  35. package/dist/dashboard/aggregator.js +2 -1
  36. package/dist/dashboard/aggregator.js.map +1 -1
  37. package/dist/dashboard/daemon-internal-client.d.ts.map +1 -1
  38. package/dist/dashboard/daemon-internal-client.js +6 -1
  39. package/dist/dashboard/daemon-internal-client.js.map +1 -1
  40. package/dist/dashboard/groups-action-helpers.d.ts +0 -10
  41. package/dist/dashboard/groups-action-helpers.d.ts.map +1 -1
  42. package/dist/dashboard/groups-action-helpers.js +3 -2
  43. package/dist/dashboard/groups-action-helpers.js.map +1 -1
  44. package/dist/dashboard.js +2 -1
  45. package/dist/dashboard.js.map +1 -1
  46. package/dist/services/hook-runner.d.ts.map +1 -1
  47. package/dist/services/hook-runner.js +2 -1
  48. package/dist/services/hook-runner.js.map +1 -1
  49. package/dist/services/voice/openai.d.ts.map +1 -1
  50. package/dist/services/voice/openai.js +10 -1
  51. package/dist/services/voice/openai.js.map +1 -1
  52. package/dist/services/worktree-slug-ai.d.ts.map +1 -1
  53. package/dist/services/worktree-slug-ai.js +8 -1
  54. package/dist/services/worktree-slug-ai.js.map +1 -1
  55. package/dist/workflows/v3/daemon-ipc-client.d.ts.map +1 -1
  56. package/dist/workflows/v3/daemon-ipc-client.js +2 -1
  57. package/dist/workflows/v3/daemon-ipc-client.js.map +1 -1
  58. package/dist/workflows/v3/session-relay-client.d.ts.map +1 -1
  59. package/dist/workflows/v3/session-relay-client.js +2 -1
  60. package/dist/workflows/v3/session-relay-client.js.map +1 -1
  61. package/package.json +8 -7
  62. package/scripts/install-path-entry.mjs +263 -0
  63. package/scripts/postinstall-bin.mjs +41 -7
@@ -219,11 +219,45 @@ try {
219
219
  );
220
220
  }
221
221
 
222
- // ── PATH hint ─────────────────────────────────────────────────────────────────
223
- // Mirrors install.sh. Without ~/.botmux/bin on PATH the launcher we just wrote is
224
- // never the `botmux` the user's shell resolves.
225
- const pathEntries = (process.env.PATH ?? '').split(':');
226
- if (!pathEntries.includes(binDir)) {
227
- console.log(`[botmux] add ${binDir} to your PATH so this launcher is the \`botmux\` your shell finds:`);
228
- console.log(`[botmux] echo 'export PATH="${binDir}:$PATH"' >> ~/.profile && . ~/.profile`);
222
+ // ── PATH: write it, don't just suggest it ─────────────────────────────────────
223
+ // This used to only PRINT `echo 'export PATH=…' >> ~/.profile`. Two problems:
224
+ // the user had to act on it, and for zsh users the suggested file is WRONG —
225
+ // zsh never reads ~/.profile (measured), so following the hint verbatim left
226
+ // `botmux` still not found. There is no `bin` field any more, so PATH is the
227
+ // only way this launcher becomes a command; we now write the right startup file
228
+ // for the user's actual shell (bash/zsh/fish/other) and tell them what we did.
229
+ //
230
+ // ⚠️ FAIL-SOFT, and never `fail()`: the launcher is already installed and working
231
+ // at this point, so a PATH edit that cannot happen must degrade to the printed
232
+ // hint — not abort a successful install. That includes the sibling module simply
233
+ // not being there: it ships via package.json `files`, and if a future edit drops
234
+ // it (or a mirror repacks the tarball without it) the import throws. Guarding it
235
+ // keeps `npm i -g botmux` succeeding either way.
236
+ if (!(process.env.PATH ?? '').split(':').includes(binDir)) {
237
+ let ensurePathEntry = null;
238
+ try {
239
+ ({ ensurePathEntry } = await import('./install-path-entry.mjs'));
240
+ } catch (err) {
241
+ console.error(`[botmux] PATH helper unavailable (${err && err.message ? err.message : String(err)})`);
242
+ }
243
+ let written = [], skipped = [];
244
+ if (ensurePathEntry) {
245
+ try {
246
+ const r = ensurePathEntry({ installDir: binDir });
247
+ ({ written, skipped } = r);
248
+ for (const f of written) console.log(`[botmux] added ${binDir} to PATH in ${f} (${r.shell})`);
249
+ for (const f of skipped) console.log(`[botmux] ${f} already puts ${binDir} on PATH`);
250
+ for (const { file, error } of r.failed) console.error(`[botmux] could not update ${file}: ${error}`);
251
+ } catch (err) {
252
+ console.error(`[botmux] could not update your shell startup file: ${err && err.message ? err.message : String(err)}`);
253
+ }
254
+ }
255
+ if (written.length > 0) {
256
+ console.log('[botmux] open a new terminal (or re-source that file) and `botmux` will be on PATH');
257
+ } else if (skipped.length === 0) {
258
+ // Nothing written and nothing already present — fall back to telling them.
259
+ // Deliberately not naming a specific file here: the correct one depends on
260
+ // the shell, and naming the wrong one is what caused the original bug.
261
+ console.log(`[botmux] add ${binDir} to your PATH so this launcher is the \`botmux\` your shell finds`);
262
+ }
229
263
  }