glimmervoid 0.52.3-next.950 → 0.52.3-next.951

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 (179) hide show
  1. package/README.md +26 -3
  2. package/dist/bin/binary-main.js +35 -0
  3. package/dist/bin/glimmervoid.js +31 -26
  4. package/dist/chunks/{adapters-DugPGdiH.js → adapters-D0vKBysu.js} +1 -1
  5. package/dist/chunks/{adapters-Dmjk5IZS.js → adapters-K-tf8tYZ.js} +76 -53
  6. package/dist/chunks/{agent-api-cli-CMVn_Vut.js → agent-api-cli-ChxXRS3d.js} +1 -1
  7. package/dist/chunks/agent-api-cli-D6Ld1V9y.js +1 -0
  8. package/dist/chunks/{agent-api-core-BJ6YdYV5.js → agent-api-core-DfuQ4RDS.js} +2 -2
  9. package/dist/chunks/agent-home-Ba_VrHA0.js +1 -0
  10. package/dist/chunks/{agent-home-DcnSq2mF.js → agent-home-KhnohDHV.js} +1 -1
  11. package/dist/chunks/agent-home-core-D0DgxTT_.js +1 -0
  12. package/dist/chunks/{agent-home-core-DmcBI03O.js → agent-home-core-DxJ5_9_c.js} +5 -5
  13. package/dist/chunks/{agent-setup-cli-l2Ccyvyw.js → agent-setup-cli-CZ82pLNW.js} +3 -3
  14. package/dist/chunks/board-store-client-DNlvZvGx.js +356 -0
  15. package/dist/chunks/{child-process-safe-pP6Vf2i9.js → child-process-safe-DAaWFLd1.js} +1 -1
  16. package/dist/chunks/child-process-safe-DnDmA8Aw.js +1 -0
  17. package/dist/chunks/config-store-2h_954wK.js +1 -0
  18. package/dist/chunks/{config-store-C2jiH99C.js → config-store-BE5X4H-R.js} +4 -4
  19. package/dist/chunks/{config-B2jrRzmA.js → config-wPv6Of22.js} +1 -1
  20. package/dist/chunks/{control-messages-BpR-cN8v.js → control-messages-DkKr9vbw.js} +2 -0
  21. package/dist/chunks/{git-version-BE08x5OZ.js → git-version-Nd3lkOqC.js} +1 -1
  22. package/dist/chunks/{grok-DEzN4fF4.js → grok-BTD32YhV.js} +49 -26
  23. package/dist/chunks/hook-command-core-9E3QR9Bk.js +25 -0
  24. package/dist/chunks/{host-cli-BD8x8i6p.js → host-cli-SIyKKMs0.js} +3 -3
  25. package/dist/chunks/{host-registry-core-Bh3BRHc9.js → host-registry-core-BZJqNz7o.js} +1 -1
  26. package/dist/chunks/kimi-BsXxRPQ_.js +1 -0
  27. package/dist/chunks/{kimi-B4GYBzH-.js → kimi-bJFSfqLq.js} +9 -131
  28. package/dist/chunks/layout-cache-msy3RopJ.js +390 -0
  29. package/dist/chunks/{layout-worker-core-CI6h58eG.js → layout-worker-core-Bo1IQfa3.js} +3 -389
  30. package/dist/chunks/{main-DgtlyPow.js → main-2LINq2w0.js} +220 -430
  31. package/dist/chunks/native-probes-DwN2tSGG.js +80 -0
  32. package/dist/chunks/{node-pty-preflight-B6wME-M3.js → node-pty-preflight-D2ktjjKG.js} +2 -27
  33. package/dist/chunks/{pack-agent-B1vKR4Zy.js → pack-agent-D-Uh314s.js} +1 -1
  34. package/dist/chunks/{packs-cli-Dp-C8WKJ.js → packs-cli-CYC7S_8E.js} +3 -3
  35. package/dist/chunks/{pair-cli-BmGJRcI2.js → pair-cli-X12JQ9zW.js} +2 -2
  36. package/dist/chunks/{pr-flows-cli-CPVt8DoK.js → pr-flows-cli-BsTY76Tt.js} +4 -4
  37. package/dist/chunks/{pr-flows-external-C8YnCmmF.js → pr-flows-external-CFMQl11W.js} +1 -1
  38. package/dist/chunks/{remote-config-dS1_PoT5.js → remote-config-BPeUod_r.js} +1 -1
  39. package/dist/chunks/runtime-paths-DCVulpER.js +1 -0
  40. package/dist/chunks/runtime-paths-DrDchzfV.js +321 -0
  41. package/dist/chunks/settings-cli-CvlYk8mL.js +1 -0
  42. package/dist/chunks/{settings-cli-C54zzPAj.js → settings-cli-Dk5QXFJ2.js} +4 -4
  43. package/dist/chunks/{settings-readout-core-fBEJJwrr.js → settings-readout-core-CtpKozFQ.js} +1 -1
  44. package/dist/chunks/{ssh-sign-cli-CCme7VUf.js → ssh-sign-cli-DQkDNLZ7.js} +3 -3
  45. package/dist/chunks/{ssh-signing-core-C7Dohjcn.js → ssh-signing-core-CmYFjvrx.js} +2 -2
  46. package/dist/chunks/text-core-BECIwjCW.js +27 -0
  47. package/dist/client/assets/{action-status-CuK78Hsa.js → action-status-rETkOMJb.js} +1 -1
  48. package/dist/client/assets/action-status-rETkOMJb.js.br +0 -0
  49. package/dist/client/assets/{agent-core-dqDk36cr.js → agent-core-hnz56MUa.js} +2 -2
  50. package/dist/client/assets/agent-core-hnz56MUa.js.br +0 -0
  51. package/dist/client/assets/{agent-mark-w2lGEgBM.js → agent-mark-B0pG3qXP.js} +1 -1
  52. package/dist/client/assets/agent-mark-B0pG3qXP.js.br +0 -0
  53. package/dist/client/assets/{arena-panel-Dzs-YD4A.js → arena-panel-C8v4wRdk.js} +2 -2
  54. package/dist/client/assets/arena-panel-C8v4wRdk.js.br +0 -0
  55. package/dist/client/assets/{benchmark-panel-CFeHVIqM.js → benchmark-panel-BuvxsTcB.js} +1 -1
  56. package/dist/client/assets/benchmark-panel-BuvxsTcB.js.br +0 -0
  57. package/dist/client/assets/{boards-view-CMcK29xz.js → boards-view-B3w-n321.js} +1 -1
  58. package/dist/client/assets/boards-view-B3w-n321.js.br +0 -0
  59. package/dist/client/assets/button-CfhUK7Jn.js +1 -0
  60. package/dist/client/assets/button-CfhUK7Jn.js.br +0 -0
  61. package/dist/client/assets/{card-actions-E63CtRCm.js → card-actions-tzD2Tm0H.js} +1 -1
  62. package/dist/client/assets/{community-panel-C7a6j2_J.js → community-panel-Chdoh8lk.js} +1 -1
  63. package/dist/client/assets/community-panel-Chdoh8lk.js.br +0 -0
  64. package/dist/client/assets/{control-ws-iwqTRpoV.js → control-ws-DEfwcMni.js} +1 -1
  65. package/dist/client/assets/control-ws-DEfwcMni.js.br +0 -0
  66. package/dist/client/assets/{dialogs-DESGqrSB.js → dialogs-3TcMCHP5.js} +1 -1
  67. package/dist/client/assets/dialogs-3TcMCHP5.js.br +0 -0
  68. package/dist/client/assets/{doc-editor-ui-DLSyvTB2.js → doc-editor-ui-C8V8Xx8x.js} +1 -1
  69. package/dist/client/assets/doc-editor-ui-C8V8Xx8x.js.br +0 -0
  70. package/dist/client/assets/{feature-hint-DuwD4NCV.js → feature-hint-D6hkhJYc.js} +1 -1
  71. package/dist/client/assets/feature-hint-D6hkhJYc.js.br +0 -0
  72. package/dist/client/assets/{first-run-checklist-D8z2OaHX.js → first-run-checklist-CcH2D3Kr.js} +1 -1
  73. package/dist/client/assets/first-run-checklist-CcH2D3Kr.js.br +0 -0
  74. package/dist/client/assets/{hooks-panel-BhMLJOUv.js → hooks-panel-D23DNe1J.js} +1 -1
  75. package/dist/client/assets/hooks-panel-D23DNe1J.js.br +0 -0
  76. package/dist/client/assets/{index-C4ArDe-B.js → index-CPfGHAJ4.js} +5 -5
  77. package/dist/client/assets/index-CPfGHAJ4.js.br +0 -0
  78. package/dist/client/assets/{issues-panel-CUMW1gqQ.js → issues-panel-Cm-Qeu8a.js} +1 -1
  79. package/dist/client/assets/issues-panel-Cm-Qeu8a.js.br +0 -0
  80. package/dist/client/assets/{lane-read-token-step-CvEGyLsk.js → lane-read-token-step-3P8vTIHC.js} +1 -1
  81. package/dist/client/assets/lane-read-token-step-3P8vTIHC.js.br +0 -0
  82. package/dist/client/assets/{menu-D8BpFeNo.js → menu-DzZGGGGN.js} +1 -1
  83. package/dist/client/assets/menu-DzZGGGGN.js.br +0 -0
  84. package/dist/client/assets/{modal-BVeQuAZ9.js → modal-CjIIQMho.js} +1 -1
  85. package/dist/client/assets/modal-CjIIQMho.js.br +0 -0
  86. package/dist/client/assets/{my-prs-panel-B8_orUYb.js → my-prs-panel-wFWhjV1D.js} +1 -1
  87. package/dist/client/assets/my-prs-panel-wFWhjV1D.js.br +0 -0
  88. package/dist/client/assets/{nyan-cat-CElUDOUj.js → nyan-cat-BNbnWPTK.js} +1 -1
  89. package/dist/client/assets/nyan-cat-BNbnWPTK.js.br +0 -0
  90. package/dist/client/assets/{phone-shell-CPv7VC64.js → phone-shell-Dcl9HOom.js} +1 -1
  91. package/dist/client/assets/phone-shell-Dcl9HOom.js.br +0 -0
  92. package/dist/client/assets/{plan-face-DgbSg2lL.js → plan-face-6YCDVGZv.js} +1 -1
  93. package/dist/client/assets/plan-face-6YCDVGZv.js.br +0 -0
  94. package/dist/client/assets/{plan-render-pou6X_n4.js → plan-render-BmxGXP2c.js} +1 -1
  95. package/dist/client/assets/plan-render-BmxGXP2c.js.br +0 -0
  96. package/dist/client/assets/{pr-queue-columns-g6xSX_6e.js → pr-queue-columns-D6_CG0Qm.js} +1 -1
  97. package/dist/client/assets/pr-queue-columns-D6_CG0Qm.js.br +0 -0
  98. package/dist/client/assets/{pr-status-icon-BVaP66Xa.js → pr-status-icon-dpJOgyIo.js} +1 -1
  99. package/dist/client/assets/pr-status-icon-dpJOgyIo.js.br +0 -0
  100. package/dist/client/assets/{radar-panel-DcFuqpe0.js → radar-panel-D778OuaR.js} +1 -1
  101. package/dist/client/assets/radar-panel-D778OuaR.js.br +0 -0
  102. package/dist/client/assets/{repo-roots-adder-DghvxT64.js → repo-roots-adder-eVH-7VU2.js} +1 -1
  103. package/dist/client/assets/repo-roots-adder-eVH-7VU2.js.br +0 -0
  104. package/dist/client/assets/{resume-dialog-JJEDvHwz.js → resume-dialog-BtZE0BHF.js} +1 -1
  105. package/dist/client/assets/resume-dialog-BtZE0BHF.js.br +0 -0
  106. package/dist/client/assets/{review-queue-panel-D5vxmmCf.js → review-queue-panel-CB7hteVu.js} +1 -1
  107. package/dist/client/assets/review-queue-panel-CB7hteVu.js.br +0 -0
  108. package/dist/client/assets/{session-row-D23MhhLx.js → session-row-CGbJfZvw.js} +1 -1
  109. package/dist/client/assets/session-row-CGbJfZvw.js.br +0 -0
  110. package/dist/client/assets/{session-tick-B9JUo7rw.js → session-tick-DrUXWyvz.js} +1 -1
  111. package/dist/client/assets/session-tick-DrUXWyvz.js.br +0 -0
  112. package/dist/client/assets/{settings-panel-DWJYywdB.js → settings-panel-BVCdtDjh.js} +2 -2
  113. package/dist/client/assets/settings-panel-BVCdtDjh.js.br +0 -0
  114. package/dist/client/assets/{setup-step-CNhiAZn8.js → setup-step-B9ALtknc.js} +1 -1
  115. package/dist/client/assets/setup-step-B9ALtknc.js.br +0 -0
  116. package/dist/client/assets/{trace-panel-6TyLZ1kg.js → trace-panel-D0o4GDy6.js} +1 -1
  117. package/dist/client/assets/trace-panel-D0o4GDy6.js.br +0 -0
  118. package/dist/client/assets/{usage-panel-BXLTPEJA.js → usage-panel-Cs7PX9Oc.js} +1 -1
  119. package/dist/client/assets/usage-panel-Cs7PX9Oc.js.br +0 -0
  120. package/dist/client/assets/{whiteboard-undo-core-BgjAKRbt.js → whiteboard-undo-core-BSuUyjQJ.js} +1 -1
  121. package/dist/client/assets/whiteboard-undo-core-BSuUyjQJ.js.br +0 -0
  122. package/dist/client/assets/{your-day-tip-BsMJEYAz.js → your-day-tip-DPdFbFmo.js} +1 -1
  123. package/dist/client/assets/your-day-tip-DPdFbFmo.js.br +0 -0
  124. package/dist/client/index.html +12 -12
  125. package/dist/client/index.html.br +0 -0
  126. package/dist/server/index.js +3 -3
  127. package/dist/server/whiteboard/layout-worker.js +3 -2
  128. package/dist/session/hook-tool-relay.js +5 -3
  129. package/dist/session/statusline-relay.js +1 -1
  130. package/package.json +25 -2
  131. package/dist/chunks/agent-api-cli-Bn6prE_C.js +0 -1
  132. package/dist/chunks/agent-home-DB7dDhC0.js +0 -1
  133. package/dist/chunks/agent-home-core-B3IRzwkX.js +0 -1
  134. package/dist/chunks/child-process-safe-BrQd4i6y.js +0 -1
  135. package/dist/chunks/config-store-B8q1647B.js +0 -1
  136. package/dist/chunks/hook-command-core-Bu5xBKp3.js +0 -16
  137. package/dist/chunks/kimi-DnAl3Gci.js +0 -1
  138. package/dist/chunks/runtime-paths-5UK7AN_h.js +0 -85
  139. package/dist/chunks/runtime-paths-BI7m38Nj.js +0 -1
  140. package/dist/chunks/settings-cli-C28g1sTU.js +0 -1
  141. package/dist/client/assets/action-status-CuK78Hsa.js.br +0 -0
  142. package/dist/client/assets/agent-core-dqDk36cr.js.br +0 -0
  143. package/dist/client/assets/agent-mark-w2lGEgBM.js.br +0 -0
  144. package/dist/client/assets/arena-panel-Dzs-YD4A.js.br +0 -0
  145. package/dist/client/assets/benchmark-panel-CFeHVIqM.js.br +0 -0
  146. package/dist/client/assets/boards-view-CMcK29xz.js.br +0 -0
  147. package/dist/client/assets/button-lPlbTPdg.js +0 -1
  148. package/dist/client/assets/button-lPlbTPdg.js.br +0 -0
  149. package/dist/client/assets/community-panel-C7a6j2_J.js.br +0 -0
  150. package/dist/client/assets/control-ws-iwqTRpoV.js.br +0 -0
  151. package/dist/client/assets/dialogs-DESGqrSB.js.br +0 -0
  152. package/dist/client/assets/doc-editor-ui-DLSyvTB2.js.br +0 -0
  153. package/dist/client/assets/feature-hint-DuwD4NCV.js.br +0 -0
  154. package/dist/client/assets/first-run-checklist-D8z2OaHX.js.br +0 -0
  155. package/dist/client/assets/hooks-panel-BhMLJOUv.js.br +0 -0
  156. package/dist/client/assets/index-C4ArDe-B.js.br +0 -0
  157. package/dist/client/assets/issues-panel-CUMW1gqQ.js.br +0 -0
  158. package/dist/client/assets/lane-read-token-step-CvEGyLsk.js.br +0 -0
  159. package/dist/client/assets/menu-D8BpFeNo.js.br +0 -5
  160. package/dist/client/assets/modal-BVeQuAZ9.js.br +0 -0
  161. package/dist/client/assets/my-prs-panel-B8_orUYb.js.br +0 -0
  162. package/dist/client/assets/nyan-cat-CElUDOUj.js.br +0 -0
  163. package/dist/client/assets/phone-shell-CPv7VC64.js.br +0 -0
  164. package/dist/client/assets/plan-face-DgbSg2lL.js.br +0 -0
  165. package/dist/client/assets/plan-render-pou6X_n4.js.br +0 -0
  166. package/dist/client/assets/pr-queue-columns-g6xSX_6e.js.br +0 -0
  167. package/dist/client/assets/pr-status-icon-BVaP66Xa.js.br +0 -0
  168. package/dist/client/assets/radar-panel-DcFuqpe0.js.br +0 -0
  169. package/dist/client/assets/repo-roots-adder-DghvxT64.js.br +0 -0
  170. package/dist/client/assets/resume-dialog-JJEDvHwz.js.br +0 -0
  171. package/dist/client/assets/review-queue-panel-D5vxmmCf.js.br +0 -0
  172. package/dist/client/assets/session-row-D23MhhLx.js.br +0 -0
  173. package/dist/client/assets/session-tick-B9JUo7rw.js.br +0 -0
  174. package/dist/client/assets/settings-panel-DWJYywdB.js.br +0 -0
  175. package/dist/client/assets/setup-step-CNhiAZn8.js.br +0 -0
  176. package/dist/client/assets/trace-panel-6TyLZ1kg.js.br +0 -0
  177. package/dist/client/assets/usage-panel-BXLTPEJA.js.br +0 -0
  178. package/dist/client/assets/whiteboard-undo-core-BgjAKRbt.js.br +0 -0
  179. package/dist/client/assets/your-day-tip-BsMJEYAz.js.br +0 -0
@@ -0,0 +1,80 @@
1
+ import { r as execFileAsync } from "./child-process-safe-DAaWFLd1.js";
2
+ import { n as glimmervoidHomeDir } from "./config-path-core-qUZH9-0F.js";
3
+ import { t as firstLine } from "./text-core-BECIwjCW.js";
4
+ import { f as resolveFfmpegPath } from "./runtime-paths-DrDchzfV.js";
5
+ import { n as createLayoutClient, t as createBoardStore } from "./board-store-client-DNlvZvGx.js";
6
+ import { k as createBoard } from "./board-store-core-uF82zqRK.js";
7
+ import { i as errorText } from "./text-BDF4aFhQ.js";
8
+ import { createRequire } from "node:module";
9
+ import fs from "node:fs";
10
+ import path from "node:path";
11
+ import os from "node:os";
12
+ // server/native-probes.ts
13
+ var LOADS_OK = "loads OK";
14
+ function isEveryProbeLoading(rows) {
15
+ return rows.every(([, outcome]) => outcome === LOADS_OK);
16
+ }
17
+ var FFMPEG_PROBE_TIMEOUT_MS = 1e4;
18
+ async function outcomeOf(probe) {
19
+ try {
20
+ await probe();
21
+ return LOADS_OK;
22
+ } catch (failure) {
23
+ return `FAILED: ${firstLine(errorText(failure))}`;
24
+ }
25
+ }
26
+ async function renderWebpWithSharp() {
27
+ const { default: sharp } = await import("sharp");
28
+ await sharp({ create: {
29
+ width: 1,
30
+ height: 1,
31
+ channels: 3,
32
+ background: "#000000"
33
+ } }).webp().toBuffer();
34
+ }
35
+ async function lockFileWithNativeExtensions(scratchDir) {
36
+ const fileLocks = createRequire(import.meta.url)("fs-native-extensions");
37
+ const lockDescriptor = fs.openSync(path.join(scratchDir, "probe.lock"), "w");
38
+ try {
39
+ if (!fileLocks.tryLock(lockDescriptor)) throw new Error("tryLock refused an unheld file");
40
+ fileLocks.unlock(lockDescriptor);
41
+ } finally {
42
+ fs.closeSync(lockDescriptor);
43
+ }
44
+ }
45
+ async function openSqliteInBoardStoreWorker() {
46
+ await createBoardStore(path.join(glimmervoidHomeDir(os.homedir(), process.env), "doctor-probe", "boards")).boardIds();
47
+ }
48
+ async function layOutBoardInLayoutWorker() {
49
+ await createLayoutClient({
50
+ cachePath: null,
51
+ onSavedLayoutWritten: () => {}
52
+ }).refresh(createBoard({
53
+ id: "doctor-probe",
54
+ title: "Doctor probe",
55
+ nowMs: Date.now()
56
+ }), []);
57
+ }
58
+ async function runFfmpeg() {
59
+ const ffmpegPath = resolveFfmpegPath();
60
+ if (!ffmpegPath) throw new Error("no ffmpeg binary found");
61
+ await execFileAsync(ffmpegPath, ["-version"], { timeout: FFMPEG_PROBE_TIMEOUT_MS });
62
+ }
63
+ async function probeNativeModules() {
64
+ const scratchDir = fs.mkdtempSync(path.join(os.tmpdir(), "glimmervoid-doctor-"));
65
+ try {
66
+ return [
67
+ ["sharp", await outcomeOf(renderWebpWithSharp)],
68
+ ["fs-native-extensions", await outcomeOf(() => lockFileWithNativeExtensions(scratchDir))],
69
+ ["node:sqlite worker", await outcomeOf(openSqliteInBoardStoreWorker)],
70
+ ["layout worker", await outcomeOf(layOutBoardInLayoutWorker)],
71
+ ["ffmpeg", await outcomeOf(runFfmpeg)]
72
+ ];
73
+ } finally {
74
+ fs.rmSync(scratchDir, {
75
+ recursive: true,
76
+ force: true
77
+ });
78
+ }
79
+ }
80
+ export { isEveryProbeLoading, probeNativeModules };
@@ -1,3 +1,4 @@
1
+ import { t as firstLine } from "./text-core-BECIwjCW.js";
1
2
  import { r as errorMessage } from "./text-BDF4aFhQ.js";
2
3
  import { createRequire } from "node:module";
3
4
  import fs from "node:fs";
@@ -46,32 +47,6 @@ function formatNodePtyBootRefusal({ platform, packageDir, reason }) {
46
47
  " Run \"glimmervoid doctor\" for the same check plus the rest of your install."
47
48
  ].join("\n");
48
49
  }
49
- // server/core/text-core.ts
50
- var OTHER_CATEGORY_RE = /\p{C}+/gu;
51
- function firstLine(text) {
52
- return String(text ?? "").split(/\r?\n/)[0].trim();
53
- }
54
- function sanitizeOneLine(raw, maxChars) {
55
- return String(raw ?? "").replace(OTHER_CATEGORY_RE, " ").replace(/\s+/g, " ").trim().slice(0, maxChars).trim();
56
- }
57
- var MIN_CUT_HOME_PREFIX_CHARS = 2;
58
- function comparableText(text) {
59
- return text.replaceAll("\\", "/").toLowerCase();
60
- }
61
- function homeFolderPattern(homeDir) {
62
- const escapedParts = homeDir.split(/[\\/]/).map((part) => part.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
63
- return new RegExp(escapedParts.join("[\\\\/]"), "gi");
64
- }
65
- function replaceCutHomePrefixAtEnd(text, homeDir) {
66
- const longestCandidate = Math.min(homeDir.length - 1, text.length);
67
- for (let prefixLength = longestCandidate; prefixLength >= MIN_CUT_HOME_PREFIX_CHARS; prefixLength -= 1) if (comparableText(text.slice(-prefixLength)) === comparableText(homeDir.slice(0, prefixLength))) return `${text.slice(0, -prefixLength)}~`;
68
- return text;
69
- }
70
- function showHomeAsTilde(text, homeDir) {
71
- const trimmedHomeDir = homeDir.replace(/[\\/]+$/, "");
72
- if (!trimmedHomeDir) return text;
73
- return replaceCutHomePrefixAtEnd(text.replace(homeFolderPattern(trimmedHomeDir), "~"), trimmedHomeDir);
74
- }
75
50
  // server/node-pty-preflight.ts
76
51
  function hostScope() {
77
52
  return {
@@ -172,4 +147,4 @@ function requireExecutableSpawnHelper(packageDir = null, scope = hostScope()) {
172
147
  const helper = ensureSpawnHelperExecutable(resolved.packageDir, scope);
173
148
  if (!helper.ok) throw new Error(helper.reason);
174
149
  }
175
- export { showHomeAsTilde as a, sanitizeOneLine as i, requireExecutableSpawnHelper as n, formatNodePtyBootRefusal as o, firstLine as r, nodePtyRebuildHint as s, probeNodePty as t };
150
+ export { nodePtyRebuildHint as i, requireExecutableSpawnHelper as n, formatNodePtyBootRefusal as r, probeNodePty as t };
@@ -1,5 +1,5 @@
1
1
  import { en as PR_FLOW_PLACEHOLDERS_BY_KIND } from "./session-BygOlxkV.js";
2
- import { t as ClientMessage } from "./control-messages-BpR-cN8v.js";
2
+ import { t as ClientMessage } from "./control-messages-DkKr9vbw.js";
3
3
  import { c as PanelActionRequest, l as packBridgeJsonSchemaText, p as REVIEW_ACTION_TYPES, t as PACK_DATA_MAX_BYTES } from "./pack-bridge-LK2GtXo2.js";
4
4
  import { n as parseJsonRecord, t as parseJsonOrNull } from "./json-core-B1ov-SNz.js";
5
5
  import { C as packRuleErrors, L as unknownPlaceholderMessage, c as PackHeader, k as prFlowsPacksOf, m as expandPlaceholders, n as declaredPanels, o as readPackDir, s as PACK_FILE_NAME, t as PACKS_DIR_NAME, u as packJsonSchemaText, x as packApproval } from "./pack-files-DggkYpgV.js";
@@ -1,9 +1,9 @@
1
1
  import { r as errorMessage } from "./text-BDF4aFhQ.js";
2
- import { _ as decideHostAllowed, a as packReportText, g as readCappedBody, i as packCheckHasProblem, o as panelActionDecision, r as checkPack, s as panelActionsJsonSchemaText, t as packGuideText, u as packFileHeaders } from "./pack-agent-B1vKR4Zy.js";
2
+ import { _ as decideHostAllowed, a as packReportText, g as readCappedBody, i as packCheckHasProblem, o as panelActionDecision, r as checkPack, s as panelActionsJsonSchemaText, t as packGuideText, u as packFileHeaders } from "./pack-agent-D-Uh314s.js";
3
3
  import { n as parseJsonRecord } from "./json-core-B1ov-SNz.js";
4
4
  import { En as prFlowsOutputJsonSchemaText, Hn as STATES, n as AGENT_REPLY_SCHEMAS } from "./session-BygOlxkV.js";
5
5
  import { n as glimmervoidHomeDir } from "./config-path-core-qUZH9-0F.js";
6
- import { o as examplePacksDir } from "./runtime-paths-5UK7AN_h.js";
6
+ import { a as examplePacksDir } from "./runtime-paths-DrDchzfV.js";
7
7
  import { l as packBridgeJsonSchemaText, m as THEME_STATE_NAMES, n as PackBridgeTopic, t as PACK_DATA_MAX_BYTES } from "./pack-bridge-LK2GtXo2.js";
8
8
  import { a as readApprovedPackFingerprints, o as readPackDir, u as packJsonSchemaText } from "./pack-files-DggkYpgV.js";
9
9
  import path from "node:path";
@@ -559,7 +559,7 @@ async function runList() {
559
559
  process.stderr.write("glimmervoid packs list reads the running Glimmervoid, so it works inside a Glimmervoid session; the operator sees the same list in Settings, Packs\n");
560
560
  return 1;
561
561
  }
562
- const { askAgentApi } = await import("./agent-api-cli-Bn6prE_C.js");
562
+ const { askAgentApi } = await import("./agent-api-cli-D6Ld1V9y.js");
563
563
  const reply = AGENT_REPLY_SCHEMAS.packs.safeParse(await askAgentApi("packs", { command: "list" }));
564
564
  if (!reply.success) {
565
565
  process.stderr.write("glimmervoid packs list: Glimmervoid did not answer with a pack list\n");
@@ -1,5 +1,5 @@
1
- import { c as resolveConfigPath } from "./config-store-C2jiH99C.js";
2
- import { c as defaultPairingsPath, l as defaultSeenPath, o as createPairingsStore, r as normalizeRemoteConfig, s as createSeenStore } from "./remote-config-dS1_PoT5.js";
1
+ import { c as resolveConfigPath } from "./config-store-BE5X4H-R.js";
2
+ import { c as defaultPairingsPath, l as defaultSeenPath, o as createPairingsStore, r as normalizeRemoteConfig, s as createSeenStore } from "./remote-config-BPeUod_r.js";
3
3
  import { r as errorMessage } from "./text-BDF4aFhQ.js";
4
4
  import fs from "node:fs";
5
5
  // server/text-format.ts
@@ -1,10 +1,10 @@
1
1
  import { $t as PR_ACTION_TOKEN_ENV, Qt as PR_ACTION_REPORT_URL_ENV, _ as AgentSettingsReply, en as PR_FLOW_PLACEHOLDERS_BY_KIND, nn as PrActionReportBody, vn as PrFlowsState } from "./session-BygOlxkV.js";
2
2
  import { r as errorMessage } from "./text-BDF4aFhQ.js";
3
- import { c as runCommandSafely } from "./child-process-safe-pP6Vf2i9.js";
3
+ import { c as runCommandSafely } from "./child-process-safe-DAaWFLd1.js";
4
4
  import { n as glimmervoidHomeDir, t as decideConfigPath } from "./config-path-core-qUZH9-0F.js";
5
5
  import { t as parseJsonOrNull } from "./json-core-B1ov-SNz.js";
6
6
  import { D as prFlowSetup, L as unknownPlaceholderMessage, O as prFlowsConfig, S as packPathsOf, a as readApprovedPackFingerprints, j as scopedToRepo, m as expandPlaceholders, o as readPackDir, p as commandFingerprint, r as packDirsUnder } from "./pack-files-DggkYpgV.js";
7
- import { t as createPrFlowsExternal } from "./pr-flows-external-C8YnCmmF.js";
7
+ import { t as createPrFlowsExternal } from "./pr-flows-external-CFMQl11W.js";
8
8
  import fs from "node:fs";
9
9
  import path from "node:path";
10
10
  import os from "node:os";
@@ -121,7 +121,7 @@ async function readServerConfig(askSetting) {
121
121
  };
122
122
  }
123
123
  async function readConfigFromServer() {
124
- const { askAgentApi } = await import("./agent-api-cli-Bn6prE_C.js");
124
+ const { askAgentApi } = await import("./agent-api-cli-D6Ld1V9y.js");
125
125
  return readServerConfig((settingPath) => askAgentApi("settings", {
126
126
  command: "get",
127
127
  path: settingPath
@@ -267,7 +267,7 @@ async function runPrActionReport({ outcome, message, env }, io) {
267
267
  io.writeError("--outcome must be started, done, failed or refused, and --message at most 500 characters\n");
268
268
  return 1;
269
269
  }
270
- const { postToAgentIngress } = await import("./agent-api-cli-Bn6prE_C.js");
270
+ const { postToAgentIngress } = await import("./agent-api-cli-D6Ld1V9y.js");
271
271
  const reply = await postToAgentIngress({
272
272
  endpoint: new URL(reportUrl),
273
273
  token,
@@ -1,4 +1,4 @@
1
- import { c as runCommandSafely } from "./child-process-safe-pP6Vf2i9.js";
1
+ import { c as runCommandSafely } from "./child-process-safe-DAaWFLd1.js";
2
2
  import { r as withoutGlimmervoidSecrets } from "./spawn-env-VKivL0Ed.js";
3
3
  import { Cn as ReportedPrFlowActionOutcome, gn as PrFlowSourceOutput } from "./session-BygOlxkV.js";
4
4
  import { t as parseJsonOrNull } from "./json-core-B1ov-SNz.js";
@@ -2,7 +2,7 @@ import { n as errorLabel, r as errorMessage } from "./text-BDF4aFhQ.js";
2
2
  import { n as equalsIgnoringCaseOnWindows } from "./paths-C2u2R_6l.js";
3
3
  import { n as isRecord } from "./coerce-D6vRlIGO.js";
4
4
  import { a as jsonStateLoadError, d as writeJsonAtomic, f as writeJsonAtomicSync, l as sleepSync, s as loadJsonStateFileSync } from "./json-file-BmnDu2ZM.js";
5
- import { b as DEFAULT_TIMER_FNS, o as glimmervoidHomeDir, x as unrefTimer, yt as canonicalizePath } from "./config-store-C2jiH99C.js";
5
+ import { b as DEFAULT_TIMER_FNS, o as glimmervoidHomeDir, x as unrefTimer, yt as canonicalizePath } from "./config-store-BE5X4H-R.js";
6
6
  import fs from "node:fs";
7
7
  import path from "node:path";
8
8
  import crypto from "node:crypto";
@@ -0,0 +1 @@
1
+ export { d as relayPath, p as resolvePackageBin, m as scriptLaunch } from "./runtime-paths-DrDchzfV.js";
@@ -0,0 +1,321 @@
1
+ import { i as execFileSync, r as execFileAsync, s as refuseLaunchesOf } from "./child-process-safe-DAaWFLd1.js";
2
+ import { n as glimmervoidHomeDir } from "./config-path-core-qUZH9-0F.js";
3
+ import { r as isPathInside } from "./paths-C2u2R_6l.js";
4
+ import { createRequire } from "node:module";
5
+ import fs from "node:fs";
6
+ import path from "node:path";
7
+ import { fileURLToPath } from "node:url";
8
+ import os from "node:os";
9
+ import { isSea } from "node:sea";
10
+ // server/core/runtime-paths.ts
11
+ function findPackageRoot(startDirectory, hasPackageJson) {
12
+ let directory = startDirectory;
13
+ for (;;) {
14
+ if (hasPackageJson(directory)) return directory;
15
+ const parent = path.dirname(directory);
16
+ if (parent === directory) return path.resolve(startDirectory, "..");
17
+ directory = parent;
18
+ }
19
+ }
20
+ var ENTRY_EXTENSION_BY_MODE = {
21
+ source: ".ts",
22
+ bundled: ".js",
23
+ binary: ".mjs"
24
+ };
25
+ function decideRuntimeMode(isBundled, isBinary) {
26
+ if (isBinary) return "binary";
27
+ return isBundled ? "bundled" : "source";
28
+ }
29
+ function computeRuntimePaths({ moduleFile, hasPackageJson, isBinary }) {
30
+ const packageRoot = findPackageRoot(path.dirname(path.resolve(moduleFile)), hasPackageJson);
31
+ const distDir = path.join(packageRoot, "dist");
32
+ const bundled = isPathInside(distDir, path.resolve(moduleFile), { allowEqual: false });
33
+ const mode = decideRuntimeMode(bundled, isBinary);
34
+ const assetRoot = bundled ? distDir : packageRoot;
35
+ const sourceExtension = ENTRY_EXTENSION_BY_MODE[mode];
36
+ const cliPath = path.join(assetRoot, "bin", `glimmervoid${sourceExtension}`);
37
+ const relayPath = (relayName) => path.join(assetRoot, "session", `${relayName}${sourceExtension}`);
38
+ const selfLaunch = (entry, launcherPath) => {
39
+ if (mode === "binary") return entry === "cli" ? [launcherPath] : [
40
+ launcherPath,
41
+ "__run",
42
+ entry
43
+ ];
44
+ return [launcherPath, entry === "cli" ? cliPath : relayPath(entry)];
45
+ };
46
+ return {
47
+ packageRoot,
48
+ mode,
49
+ bundled,
50
+ assetRoot,
51
+ clientDir: path.join(distDir, "client"),
52
+ cliPath,
53
+ examplePacksDir: path.join(assetRoot, "examples", "packs"),
54
+ relayPath,
55
+ boardStoreWorkerPath: path.join(assetRoot, "server", "whiteboard", `board-store-worker${sourceExtension}`),
56
+ layoutWorkerPath: path.join(assetRoot, "server", "whiteboard", `layout-worker${sourceExtension}`),
57
+ selfLaunch
58
+ };
59
+ }
60
+ // session/core/spawn-command.ts
61
+ function classifyCommandKind(resolvedPath) {
62
+ if (!resolvedPath) return "unresolved";
63
+ const ext = (resolvedPath.match(/\.[^.\\/]+$/) || [""])[0].toLowerCase();
64
+ return ext === ".exe" || ext === ".com" ? "exe" : "shim";
65
+ }
66
+ function dedupePathMatches(matches, platform = process.platform) {
67
+ const pathApi = platform === "win32" ? path.win32 : path.posix;
68
+ const seen = /* @__PURE__ */ new Set();
69
+ const unique = [];
70
+ for (const candidate of matches) {
71
+ let normalized = pathApi.normalize(candidate.trim());
72
+ if (normalized.length > 1) normalized = normalized.replace(/[\\/]+$/, "");
73
+ const key = platform === "win32" ? normalized.toLowerCase() : normalized;
74
+ if (seen.has(key)) continue;
75
+ seen.add(key);
76
+ unique.push(normalized);
77
+ }
78
+ return unique;
79
+ }
80
+ var PATH_PROBE_OPTIONS = {
81
+ encoding: "utf8",
82
+ stdio: [
83
+ "ignore",
84
+ "pipe",
85
+ "ignore"
86
+ ],
87
+ timeout: 2e3
88
+ };
89
+ function pathProbesFor(name, platform) {
90
+ if (platform === "win32") return [{
91
+ file: "where",
92
+ args: [name]
93
+ }];
94
+ return [{
95
+ file: "which",
96
+ args: ["-a", name]
97
+ }, {
98
+ file: "sh",
99
+ args: [
100
+ "-c",
101
+ "command -v \"$1\"",
102
+ "sh",
103
+ name
104
+ ]
105
+ }];
106
+ }
107
+ function resolveCommandMatches(name, { platform, runProbe }) {
108
+ for (const probe of pathProbesFor(name, platform)) {
109
+ let matches = [];
110
+ try {
111
+ matches = dedupePathMatches(runProbe(probe).split(/\r?\n/).filter((line) => line.trim()), platform);
112
+ } catch {
113
+ matches = [];
114
+ }
115
+ if (matches.length > 0) return matches;
116
+ }
117
+ return [];
118
+ }
119
+ function resolveArgvCommandMatches(name, { platform, execFile }) {
120
+ return resolveCommandMatches(name, {
121
+ platform,
122
+ runProbe: (probe) => execFile(probe.file, probe.args, PATH_PROBE_OPTIONS)
123
+ });
124
+ }
125
+ async function resolveArgvCommandMatchesAsync(name, { platform, execFileAsync }) {
126
+ for (const probe of pathProbesFor(name, platform)) {
127
+ const matches = dedupePathMatches((await execFileAsync(probe.file, probe.args, PATH_PROBE_OPTIONS).catch(() => "")).split(/\r?\n/).filter((line) => line.trim()), platform);
128
+ if (matches.length > 0) return matches;
129
+ }
130
+ return [];
131
+ }
132
+ function isAbsoluteCommandPath(name, platform) {
133
+ return (platform === "win32" ? path.win32 : path.posix).isAbsolute(name);
134
+ }
135
+ function resolveAgentCommand({ name, platform = process.platform, execFile, pathExists }) {
136
+ if (isAbsoluteCommandPath(name, platform)) {
137
+ if (typeof pathExists !== "function") throw new TypeError("resolveAgentCommand requires a pathExists probe for an absolute command");
138
+ if (pathExists(name)) return {
139
+ path: name,
140
+ kind: classifyCommandKind(name)
141
+ };
142
+ console.warn(`[glimmervoid] could not resolve '${name}'`);
143
+ return {
144
+ path: null,
145
+ kind: "unresolved"
146
+ };
147
+ }
148
+ if (typeof execFile !== "function") throw new TypeError("resolveAgentCommand requires an execFile function");
149
+ const matches = resolveArgvCommandMatches(name, {
150
+ platform,
151
+ execFile
152
+ });
153
+ if (matches.length === 0) {
154
+ console.warn(`[glimmervoid] could not resolve '${name}'`);
155
+ return {
156
+ path: null,
157
+ kind: "unresolved"
158
+ };
159
+ }
160
+ const resolvedPath = matches[0];
161
+ if (process.env.GLIMMERVOID_DEBUG_SPAWN) console.log(`[glimmervoid] resolved '${name}' (first match wins): ${resolvedPath}`);
162
+ if (matches.length > 1) console.warn(`[glimmervoid] multiple '${name}' on PATH (Bun shim risk):\n ${matches.join("\n ")}`);
163
+ const kind = classifyCommandKind(resolvedPath);
164
+ if (platform === "win32") console.log(`[glimmervoid] ${name} spawn strategy: ${kind === "exe" ? "direct exe" : "cmd.exe shim fallback"}`);
165
+ return {
166
+ path: resolvedPath,
167
+ kind
168
+ };
169
+ }
170
+ function buildAgentSpawnCommand({ name, platform, resolved, argGroups = [] }) {
171
+ const childArgs = argGroups.flatMap((group) => group || []);
172
+ if (platform !== "win32") return {
173
+ file: name,
174
+ args: childArgs
175
+ };
176
+ if (resolved && resolved.kind === "exe" && resolved.path) return {
177
+ file: resolved.path,
178
+ args: childArgs
179
+ };
180
+ return {
181
+ file: "cmd.exe",
182
+ args: [
183
+ "/c",
184
+ name,
185
+ ...childArgs
186
+ ]
187
+ };
188
+ }
189
+ // server/stable-node-path.ts
190
+ function realpathOrNull(candidate) {
191
+ try {
192
+ return fs.realpathSync(candidate);
193
+ } catch {
194
+ return null;
195
+ }
196
+ }
197
+ function findStableLauncherPath(commandName) {
198
+ const runningExecutableRealpath = realpathOrNull(process.execPath);
199
+ if (runningExecutableRealpath === null) return process.execPath;
200
+ return resolveArgvCommandMatches(commandName, {
201
+ platform: process.platform,
202
+ execFile: execFileSync
203
+ }).find((candidate) => realpathOrNull(candidate) === runningExecutableRealpath) ?? process.execPath;
204
+ }
205
+ var stableLauncherPathByCommand = /* @__PURE__ */ new Map();
206
+ function stableLauncherPathFor(commandName) {
207
+ const knownPath = stableLauncherPathByCommand.get(commandName);
208
+ if (knownPath !== void 0) return knownPath;
209
+ const foundPath = findStableLauncherPath(commandName);
210
+ stableLauncherPathByCommand.set(commandName, foundPath);
211
+ return foundPath;
212
+ }
213
+ async function firstCommandOnPath(commandName) {
214
+ const [firstMatch = null] = await resolveArgvCommandMatchesAsync(commandName, {
215
+ platform: process.platform,
216
+ execFileAsync: async (file, args, options) => String((await execFileAsync(file, [...args], options)).stdout)
217
+ });
218
+ return firstMatch;
219
+ }
220
+ // server/runtime-paths.ts
221
+ function hasPackageManifest(directory) {
222
+ try {
223
+ const doc = JSON.parse(fs.readFileSync(path.join(directory, "package.json"), "utf8"));
224
+ if (typeof doc !== "object" || doc === null || !("name" in doc)) return false;
225
+ return typeof doc.name === "string";
226
+ } catch {
227
+ return false;
228
+ }
229
+ }
230
+ var runtimePaths = computeRuntimePaths({
231
+ moduleFile: fileURLToPath(import.meta.url),
232
+ hasPackageJson: hasPackageManifest,
233
+ isBinary: isSea()
234
+ });
235
+ var { assetRoot, boardStoreWorkerPath, bundled, cliPath, clientDir, examplePacksDir, layoutWorkerPath, mode, packageRoot, relayPath } = runtimePaths;
236
+ var BINARY_RUN_SUBCOMMAND = "__run";
237
+ var SELF_LAUNCHER_COMMAND = mode === "binary" ? "glimmervoid" : "node";
238
+ var BINARY_ARGV_PREFIX_LENGTH = 2;
239
+ var SCRIPT_ARGV_PREFIX_LENGTH = 1;
240
+ function stableLauncherPath() {
241
+ return stableLauncherPathFor(SELF_LAUNCHER_COMMAND);
242
+ }
243
+ async function findNodeLauncherPath() {
244
+ if (mode === "binary") return firstCommandOnPath("node");
245
+ return stableLauncherPath();
246
+ }
247
+ function hookLauncherPath() {
248
+ return mode === "binary" ? stableLauncherPath() : "node";
249
+ }
250
+ function hookLaunch(entry) {
251
+ return runtimePaths.selfLaunch(entry, hookLauncherPath());
252
+ }
253
+ function selfLaunch(entry) {
254
+ return runtimePaths.selfLaunch(entry, stableLauncherPath());
255
+ }
256
+ function selfRelaunch(runningArgv) {
257
+ const keptArgumentsFrom = mode === "binary" ? BINARY_ARGV_PREFIX_LENGTH : SCRIPT_ARGV_PREFIX_LENGTH;
258
+ return [stableLauncherPath(), ...runningArgv.slice(keptArgumentsFrom)];
259
+ }
260
+ function scriptLaunch(scriptPath, runEntry, launcherPath = hookLauncherPath()) {
261
+ if (mode === "binary") return [
262
+ launcherPath,
263
+ BINARY_RUN_SUBCOMMAND,
264
+ runEntry
265
+ ];
266
+ return [launcherPath, scriptPath];
267
+ }
268
+ function refuseUnstableSelfLaunches() {
269
+ if (stableLauncherPath() === process.execPath) return;
270
+ refuseLaunchesOf(process.execPath);
271
+ }
272
+ var packageBins = /* @__PURE__ */ new Map();
273
+ function resolvePackageBin(packageName, binName) {
274
+ const cacheKey = `${packageName}:${binName}`;
275
+ if (packageBins.has(cacheKey)) return packageBins.get(cacheKey) ?? null;
276
+ const resolvedBin = readPackageBin(packageName, binName);
277
+ packageBins.set(cacheKey, resolvedBin);
278
+ return resolvedBin;
279
+ }
280
+ function readPackageBin(packageName, binName) {
281
+ try {
282
+ const manifestPath = createRequire(path.join(packageRoot, "package.json")).resolve(`${packageName}/package.json`);
283
+ const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
284
+ if (!manifest || typeof manifest !== "object" || !("bin" in manifest)) return null;
285
+ const bins = manifest.bin;
286
+ const relativeBin = typeof bins === "string" ? bins : bins && typeof bins === "object" ? Reflect.get(bins, binName) : null;
287
+ if (typeof relativeBin !== "string") return null;
288
+ const binPath = path.join(path.dirname(manifestPath), relativeBin);
289
+ return fs.statSync(binPath).isFile() ? binPath : null;
290
+ } catch {
291
+ return null;
292
+ }
293
+ }
294
+ var ffmpegPath = null;
295
+ function resolveFfmpegPath() {
296
+ if (ffmpegPath) return ffmpegPath;
297
+ ffmpegPath = readFfmpegPath();
298
+ return ffmpegPath;
299
+ }
300
+ function readFfmpegPath() {
301
+ try {
302
+ const exported = createRequire(path.join(packageRoot, "package.json"))("ffmpeg-static");
303
+ if (typeof exported !== "string") return null;
304
+ if (!fs.statSync(exported).isFile()) return null;
305
+ if (mode !== "binary") return exported;
306
+ return extractExecutableFromBinary(exported);
307
+ } catch {
308
+ return null;
309
+ }
310
+ }
311
+ function extractExecutableFromBinary(snapshotPath) {
312
+ const { version } = JSON.parse(fs.readFileSync(path.join(packageRoot, "package.json"), "utf8"));
313
+ const extractedPath = path.join(glimmervoidHomeDir(os.homedir(), process.env), "runtime", version, path.basename(snapshotPath));
314
+ if (fs.existsSync(extractedPath)) return extractedPath;
315
+ fs.mkdirSync(path.dirname(extractedPath), { recursive: true });
316
+ const partialPath = `${extractedPath}.${process.pid}.partial`;
317
+ fs.writeFileSync(partialPath, fs.readFileSync(snapshotPath), { mode: 493 });
318
+ fs.renameSync(partialPath, extractedPath);
319
+ return extractedPath;
320
+ }
321
+ export { stableLauncherPath as _, examplePacksDir as a, resolveAgentCommand as b, layoutWorkerPath as c, relayPath as d, resolveFfmpegPath as f, selfRelaunch as g, selfLaunch as h, clientDir as i, packageRoot as l, scriptLaunch as m, boardStoreWorkerPath as n, findNodeLauncherPath as o, resolvePackageBin as p, bundled as r, hookLaunch as s, assetRoot as t, refuseUnstableSelfLaunches as u, stableLauncherPathFor as v, buildAgentSpawnCommand as y };
@@ -0,0 +1 @@
1
+ export { r as runParsedSettingsCli } from "./settings-cli-Dk5QXFJ2.js";
@@ -1,12 +1,12 @@
1
1
  import { n as isRecord } from "./coerce-D6vRlIGO.js";
2
- import { r as BrowserConfig } from "./config-B2jrRzmA.js";
2
+ import { r as BrowserConfig } from "./config-wPv6Of22.js";
3
3
  import { _ as AgentSettingsReply } from "./session-BygOlxkV.js";
4
- import { A as cloneValue, F as scoreSettingsSearch, I as setValueAtPath, P as parsePosthogProjectSelection, V as SETTINGS_REGISTRY, j as deleteValueAtPath, l as saveConfigFileOnce, s as loadConfigFile, t as IS_EXPERIMENTAL_BUILD, u as validateConfig, w as isSettingAvailable, z as valueAtPath } from "./config-store-C2jiH99C.js";
4
+ import { A as cloneValue, F as scoreSettingsSearch, I as setValueAtPath, P as parsePosthogProjectSelection, V as SETTINGS_REGISTRY, j as deleteValueAtPath, l as saveConfigFileOnce, s as loadConfigFile, t as IS_EXPERIMENTAL_BUILD, u as validateConfig, w as isSettingAvailable, z as valueAtPath } from "./config-store-BE5X4H-R.js";
5
5
  import { r as errorMessage, t as errorCode } from "./text-BDF4aFhQ.js";
6
6
  import { t as renderTable } from "./ascii-figure-core-BegIbndz.js";
7
7
  import { n as glimmervoidHomeDir, t as decideConfigPath } from "./config-path-core-qUZH9-0F.js";
8
8
  import { i as withEnvSecrets, n as readEnvSecrets, t as ENV_SECRET_BINDINGS } from "./config-secrets-core-Dl2-_qLd.js";
9
- import { a as fail, c as listSettings, d as renderSectionTables, f as requireConfigFileSetting, g as valueText, h as succeed, i as describeSetting, l as readSetting, m as settingsRequestForServer, n as configFileViewOf, o as fitColumn, p as sectionOf, r as defaultText, s as getSetting, t as availableSettings } from "./settings-readout-core-fBEJJwrr.js";
9
+ import { a as fail, c as listSettings, d as renderSectionTables, f as requireConfigFileSetting, g as valueText, h as succeed, i as describeSetting, l as readSetting, m as settingsRequestForServer, n as configFileViewOf, o as fitColumn, p as sectionOf, r as defaultText, s as getSetting, t as availableSettings } from "./settings-readout-core-CtpKozFQ.js";
10
10
  import fs from "node:fs";
11
11
  import os from "node:os";
12
12
  // server/settings-cli.ts
@@ -322,7 +322,7 @@ function runParsedSettingsCommand(parsed, io) {
322
322
  async function runParsedSettingsCli(parsed, io = processIo()) {
323
323
  const serverRequest = settingsRequestForServer(parsed, process.env);
324
324
  if (!serverRequest) return runParsedSettingsCommand(parsed, io);
325
- const { askAgentApi } = await import("./agent-api-cli-Bn6prE_C.js");
325
+ const { askAgentApi } = await import("./agent-api-cli-D6Ld1V9y.js");
326
326
  const reply = AgentSettingsReply.safeParse(await askAgentApi("settings", serverRequest).catch((error) => ({
327
327
  ok: false,
328
328
  error: errorMessage(error)
@@ -1,5 +1,5 @@
1
1
  import { v as AgentSettingsRequest } from "./session-BygOlxkV.js";
2
- import { A as cloneValue, B as FILE_ONLY_GROUPS, L as settingsGroupOf, M as displayText, N as hasScaledUnit, R as settingsOf, V as SETTINGS_REGISTRY, k as SETTINGS_INDEX, w as isSettingAvailable, z as valueAtPath } from "./config-store-C2jiH99C.js";
2
+ import { A as cloneValue, B as FILE_ONLY_GROUPS, L as settingsGroupOf, M as displayText, N as hasScaledUnit, R as settingsOf, V as SETTINGS_REGISTRY, k as SETTINGS_INDEX, w as isSettingAvailable, z as valueAtPath } from "./config-store-BE5X4H-R.js";
3
3
  import { t as renderTable } from "./ascii-figure-core-BegIbndz.js";
4
4
  import { n as readEnvSecrets } from "./config-secrets-core-Dl2-_qLd.js";
5
5
  // server/core/settings-readout-core.ts
@@ -1,6 +1,6 @@
1
- import { l as spawn, r as execFileAsync } from "./child-process-safe-pP6Vf2i9.js";
2
- import { n as postToAgentIngress } from "./agent-api-cli-CMVn_Vut.js";
3
- import { l as parseSshPublicKey } from "./ssh-signing-core-C7Dohjcn.js";
1
+ import { l as spawn, r as execFileAsync } from "./child-process-safe-DAaWFLd1.js";
2
+ import { n as postToAgentIngress } from "./agent-api-cli-ChxXRS3d.js";
3
+ import { l as parseSshPublicKey } from "./ssh-signing-core-CmYFjvrx.js";
4
4
  import { t as isLoopbackHostname } from "./loopback-hosts-L-YKCy4U.js";
5
5
  import { W as SshSignReply, z as SIGN_URL_ENV } from "./session-BygOlxkV.js";
6
6
  import { r as errorMessage } from "./text-BDF4aFhQ.js";
@@ -58,8 +58,8 @@ var COMMIT_SIGNING_SHIM_NAME = "glimmervoid-ssh-sign";
58
58
  function posixSingleQuote(text) {
59
59
  return `'${text.replace(/'/g, `'\\''`)}'`;
60
60
  }
61
- function commitSigningShimText({ nodePath, cliPath }) {
62
- return `#!/bin/sh\nexec ${posixSingleQuote(nodePath)} ${posixSingleQuote(cliPath)} ssh-sign "$@"\n`;
61
+ function commitSigningShimText(cliLaunch) {
62
+ return `#!/bin/sh\nexec ${cliLaunch.map(posixSingleQuote).join(" ")} ssh-sign "$@"\n`;
63
63
  }
64
64
  var NO_AGENT_HOLDS_KEY = "no reachable ssh agent holds the signing key; connect to this machine with agent forwarding (ssh -A, or ForwardAgent yes from coder config-ssh) and commit again";
65
65
  export { formatSshPublicKey as a, orderAgentSockets as c, commitSigningShimText as i, parseSshPublicKey as l, NO_AGENT_HOLDS_KEY as n, isForwardedAgentDirName as o, agentListsKey as r, isSignableGitObject as s, COMMIT_SIGNING_SHIM_NAME as t, wellKnownAgentSocketPaths as u };
@@ -0,0 +1,27 @@
1
+ // server/core/text-core.ts
2
+ var OTHER_CATEGORY_RE = /\p{C}+/gu;
3
+ function firstLine(text) {
4
+ return String(text ?? "").split(/\r?\n/)[0].trim();
5
+ }
6
+ function sanitizeOneLine(raw, maxChars) {
7
+ return String(raw ?? "").replace(OTHER_CATEGORY_RE, " ").replace(/\s+/g, " ").trim().slice(0, maxChars).trim();
8
+ }
9
+ var MIN_CUT_HOME_PREFIX_CHARS = 2;
10
+ function comparableText(text) {
11
+ return text.replaceAll("\\", "/").toLowerCase();
12
+ }
13
+ function homeFolderPattern(homeDir) {
14
+ const escapedParts = homeDir.split(/[\\/]/).map((part) => part.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
15
+ return new RegExp(escapedParts.join("[\\\\/]"), "gi");
16
+ }
17
+ function replaceCutHomePrefixAtEnd(text, homeDir) {
18
+ const longestCandidate = Math.min(homeDir.length - 1, text.length);
19
+ for (let prefixLength = longestCandidate; prefixLength >= MIN_CUT_HOME_PREFIX_CHARS; prefixLength -= 1) if (comparableText(text.slice(-prefixLength)) === comparableText(homeDir.slice(0, prefixLength))) return `${text.slice(0, -prefixLength)}~`;
20
+ return text;
21
+ }
22
+ function showHomeAsTilde(text, homeDir) {
23
+ const trimmedHomeDir = homeDir.replace(/[\\/]+$/, "");
24
+ if (!trimmedHomeDir) return text;
25
+ return replaceCutHomePrefixAtEnd(text.replace(homeFolderPattern(trimmedHomeDir), "~"), trimmedHomeDir);
26
+ }
27
+ export { sanitizeOneLine as n, showHomeAsTilde as r, firstLine as t };