glimmervoid 0.48.4-next.372 → 0.48.4-next.374

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 (103) hide show
  1. package/dist/bin/glimmervoid.js +8 -8
  2. package/dist/chunks/{agent-api-cli-CdH4FPs0.js → agent-api-cli-BJS9NzHM.js} +1 -1
  3. package/dist/chunks/{agent-api-cli-_LARN_Fw.js → agent-api-cli-C5EAcLcV.js} +379 -6
  4. package/dist/chunks/{agent-api-core-Dh837S6e.js → agent-api-core-I0VUtqYU.js} +31 -7
  5. package/dist/chunks/config-store-BIr4xVth.js +1 -0
  6. package/dist/chunks/{config-store-pdqPJdAR.js → config-store-OdyfXb2W.js} +1 -1
  7. package/dist/chunks/{main-4ekC1xUK.js → main-BTgxpzRg.js} +63 -1242
  8. package/dist/chunks/{pair-cli-BrBfDhjN.js → pair-cli-BGbjIhc8.js} +2 -2
  9. package/dist/chunks/{pairings-store-Ct1E_XlV.js → pairings-store-BzA3p9oE.js} +1 -1
  10. package/dist/chunks/{settings-cli-CjILhezb.js → settings-cli-B_Fl0uRl.js} +3 -3
  11. package/dist/chunks/{settings-readout-core-B8wF5y4U.js → settings-readout-core-Cc5zwF6w.js} +1 -1
  12. package/dist/chunks/shown-files-core-nS3KPkN_.js +1439 -0
  13. package/dist/chunks/{ssh-sign-cli-9TxVwZta.js → ssh-sign-cli-CV1VA1Rp.js} +1 -1
  14. package/dist/chunks/{why-cli-COxYCd2L.js → why-cli-C_AHDxKT.js} +1 -1
  15. package/dist/client/assets/{benchmark-panel-UJIpNEO7.js → benchmark-panel-C-OXJRrA.js} +1 -1
  16. package/dist/client/assets/benchmark-panel-C-OXJRrA.js.br +0 -0
  17. package/dist/client/assets/boards-view-BeEaY6C9.js +1 -0
  18. package/dist/client/assets/boards-view-BeEaY6C9.js.br +0 -0
  19. package/dist/client/assets/{community-panel-D3d-egkg.js → community-panel-D4AA_Zns.js} +1 -1
  20. package/dist/client/assets/community-panel-D4AA_Zns.js.br +0 -0
  21. package/dist/client/assets/dialogs-CkneZ7uI.js +74 -0
  22. package/dist/client/assets/dialogs-CkneZ7uI.js.br +0 -0
  23. package/dist/client/assets/{doc-editor-ui-BWF2gHC9.js → doc-editor-ui-DWxRm4O0.js} +1 -1
  24. package/dist/client/assets/doc-editor-ui-DWxRm4O0.js.br +0 -0
  25. package/dist/client/assets/escape-markup-CKuHtFmo.js +1 -0
  26. package/dist/client/assets/{feature-hint-nHyPkN-S.js → feature-hint-DQ0b_hs0.js} +1 -1
  27. package/dist/client/assets/feature-hint-DQ0b_hs0.js.br +0 -0
  28. package/dist/client/assets/{first-run-checklist-BSkoci92.js → first-run-checklist-BX6xdYS_.js} +1 -1
  29. package/dist/client/assets/first-run-checklist-BX6xdYS_.js.br +0 -0
  30. package/dist/client/assets/{hooks-panel-Yrwybzvb.js → hooks-panel-C12PxpSE.js} +1 -1
  31. package/dist/client/assets/hooks-panel-C12PxpSE.js.br +0 -0
  32. package/dist/client/assets/index-CUbWeDtv.js +78 -0
  33. package/dist/client/assets/index-CUbWeDtv.js.br +0 -0
  34. package/dist/client/assets/issues-panel-BvjKIXB5.js +1 -0
  35. package/dist/client/assets/issues-panel-BvjKIXB5.js.br +0 -0
  36. package/dist/client/assets/{my-prs-panel-Bw_c7HtL.js → my-prs-panel-CUeDb48b.js} +1 -1
  37. package/dist/client/assets/my-prs-panel-CUeDb48b.js.br +0 -0
  38. package/dist/client/assets/{nyan-cat-D4tylwYT.js → nyan-cat-B9bWjC-E.js} +1 -1
  39. package/dist/client/assets/nyan-cat-B9bWjC-E.js.br +0 -0
  40. package/dist/client/assets/phone-shell-D3ufCox8.js +1 -0
  41. package/dist/client/assets/phone-shell-D3ufCox8.js.br +0 -0
  42. package/dist/client/assets/{plan-face-C78j3fT0.js → plan-face-mS3l9wy_.js} +1 -1
  43. package/dist/client/assets/plan-face-mS3l9wy_.js.br +0 -0
  44. package/dist/client/assets/{pr-queue-columns-CB7-jax3.js → pr-queue-columns-BcEC1DsD.js} +1 -1
  45. package/dist/client/assets/pr-queue-columns-BcEC1DsD.js.br +0 -0
  46. package/dist/client/assets/{radar-panel-KvziKbpN.js → radar-panel-B9KgQdIN.js} +1 -1
  47. package/dist/client/assets/radar-panel-B9KgQdIN.js.br +0 -0
  48. package/dist/client/assets/{repo-roots-adder-DR9Gxbvk.js → repo-roots-adder-CYO3qVCJ.js} +1 -1
  49. package/dist/client/assets/repo-roots-adder-CYO3qVCJ.js.br +0 -0
  50. package/dist/client/assets/resume-dialog-CEjf4G4s.js +1 -0
  51. package/dist/client/assets/resume-dialog-CEjf4G4s.js.br +0 -0
  52. package/dist/client/assets/{review-queue-panel-DzPBPCVF.js → review-queue-panel-CJ1TXCwt.js} +1 -1
  53. package/dist/client/assets/review-queue-panel-CJ1TXCwt.js.br +0 -0
  54. package/dist/client/assets/roving-keys-core-BDobx2It.js +1 -0
  55. package/dist/client/assets/{settings-panel-BfpMv5Bi.js → settings-panel-Bk33t3uI.js} +3 -3
  56. package/dist/client/assets/settings-panel-Bk33t3uI.js.br +0 -0
  57. package/dist/client/assets/{shown-lightbox-DpmoJvyi.js → shown-lightbox-CRgREiGD.js} +1 -1
  58. package/dist/client/assets/shown-lightbox-CRgREiGD.js.br +0 -0
  59. package/dist/client/assets/{team-review-panel-zbTQb2ed.js → team-review-panel-BQX8iKpi.js} +1 -1
  60. package/dist/client/assets/team-review-panel-BQX8iKpi.js.br +0 -0
  61. package/dist/client/assets/{trace-panel-D3EJ9Ici.js → trace-panel-B_1sI5bQ.js} +1 -1
  62. package/dist/client/assets/trace-panel-B_1sI5bQ.js.br +0 -0
  63. package/dist/client/assets/{usage-panel-LX_w7crU.js → usage-panel-CwTzRXC-.js} +1 -1
  64. package/dist/client/assets/usage-panel-CwTzRXC-.js.br +0 -0
  65. package/dist/client/assets/{your-day-tip-DtI3SbrB.js → your-day-tip-xiaEIrmf.js} +1 -1
  66. package/dist/client/assets/your-day-tip-xiaEIrmf.js.br +4 -0
  67. package/dist/client/index.html +3 -1
  68. package/dist/client/index.html.br +0 -0
  69. package/dist/server/index.js +1 -1
  70. package/package.json +1 -1
  71. package/dist/chunks/config-store-B4vUTgoX.js +0 -1
  72. package/dist/chunks/shown-files-core-B6ovU6SV.js +0 -224
  73. package/dist/client/assets/benchmark-panel-UJIpNEO7.js.br +0 -0
  74. package/dist/client/assets/boards-view-Dm2q6ifp.js +0 -1
  75. package/dist/client/assets/boards-view-Dm2q6ifp.js.br +0 -0
  76. package/dist/client/assets/community-panel-D3d-egkg.js.br +0 -0
  77. package/dist/client/assets/dialogs-PaO3ZtYa.js +0 -74
  78. package/dist/client/assets/dialogs-PaO3ZtYa.js.br +0 -0
  79. package/dist/client/assets/doc-editor-ui-BWF2gHC9.js.br +0 -0
  80. package/dist/client/assets/feature-hint-nHyPkN-S.js.br +0 -0
  81. package/dist/client/assets/first-run-checklist-BSkoci92.js.br +0 -0
  82. package/dist/client/assets/hooks-panel-Yrwybzvb.js.br +0 -0
  83. package/dist/client/assets/index-DV9XfyFg.js +0 -78
  84. package/dist/client/assets/index-DV9XfyFg.js.br +0 -0
  85. package/dist/client/assets/issues-panel-Cbv8r63_.js +0 -1
  86. package/dist/client/assets/issues-panel-Cbv8r63_.js.br +0 -0
  87. package/dist/client/assets/my-prs-panel-Bw_c7HtL.js.br +0 -0
  88. package/dist/client/assets/nyan-cat-D4tylwYT.js.br +0 -0
  89. package/dist/client/assets/phone-shell-Ck5cuGlO.js +0 -1
  90. package/dist/client/assets/phone-shell-Ck5cuGlO.js.br +0 -0
  91. package/dist/client/assets/plan-face-C78j3fT0.js.br +0 -0
  92. package/dist/client/assets/pr-queue-columns-CB7-jax3.js.br +0 -0
  93. package/dist/client/assets/radar-panel-KvziKbpN.js.br +0 -0
  94. package/dist/client/assets/repo-roots-adder-DR9Gxbvk.js.br +0 -8
  95. package/dist/client/assets/resume-dialog-BnH4tvvE.js +0 -1
  96. package/dist/client/assets/resume-dialog-BnH4tvvE.js.br +0 -0
  97. package/dist/client/assets/review-queue-panel-DzPBPCVF.js.br +0 -0
  98. package/dist/client/assets/settings-panel-BfpMv5Bi.js.br +0 -0
  99. package/dist/client/assets/shown-lightbox-DpmoJvyi.js.br +0 -0
  100. package/dist/client/assets/team-review-panel-zbTQb2ed.js.br +0 -0
  101. package/dist/client/assets/trace-panel-D3EJ9Ici.js.br +0 -0
  102. package/dist/client/assets/usage-panel-LX_w7crU.js.br +0 -0
  103. package/dist/client/assets/your-day-tip-DtI3SbrB.js.br +0 -0
@@ -6,7 +6,7 @@ import { a as packageRoot } from "../chunks/runtime-paths-D_ZjJLE0.js";
6
6
  import { n as glimmervoidHomeDir, t as decideConfigPath } from "../chunks/config-path-core-DUWk0Lui.js";
7
7
  import { t as AGENT_API_VERBS } from "../chunks/session-CmkfJxzB.js";
8
8
  import { a as execSync } from "../chunks/child-process-safe-BCOoKfxG.js";
9
- import { J as isOwnedCommandName, Y as parseCommand, q as OWNED_COMMAND_SPECS, r as agentCommandHelpLines } from "../chunks/agent-api-core-Dh837S6e.js";
9
+ import { J as isOwnedCommandName, Y as parseCommand, q as OWNED_COMMAND_SPECS, r as agentCommandHelpLines } from "../chunks/agent-api-core-I0VUtqYU.js";
10
10
  import { t as renderTable } from "../chunks/ascii-figure-core-pDAwtlKO.js";
11
11
  import { i as parseCommandLine, r as gitDoctorRows, t as probeGitVersion } from "../chunks/git-version-xS1GFU8P.js";
12
12
  import { i as pnpmGlobalBinDir, n as npmGlobalBinDir, r as onPath, t as formatPathNotice } from "../chunks/path-doctor-C23VAqeu.js";
@@ -63,7 +63,7 @@ var OWNED_COMMAND_RUNNERS = {
63
63
  return await runDoctor() ? 0 : 1;
64
64
  },
65
65
  pair: async ({ values }) => {
66
- const { runPairCli } = await import("../chunks/pair-cli-BrBfDhjN.js");
66
+ const { runPairCli } = await import("../chunks/pair-cli-BGbjIhc8.js");
67
67
  return runPairCli({
68
68
  isListing: values.list === true,
69
69
  revokeDeviceId: typeof values.revoke === "string" ? values.revoke : null,
@@ -75,15 +75,15 @@ var OWNED_COMMAND_RUNNERS = {
75
75
  return runAgentSetupCli();
76
76
  },
77
77
  settings: async (parsed) => {
78
- const { runParsedSettingsCli } = await import("../chunks/settings-cli-CjILhezb.js");
78
+ const { runParsedSettingsCli } = await import("../chunks/settings-cli-B_Fl0uRl.js");
79
79
  return runParsedSettingsCli(parsed);
80
80
  },
81
81
  why: async ({ positionals }) => {
82
- const { runWhyCli } = await import("../chunks/why-cli-COxYCd2L.js");
82
+ const { runWhyCli } = await import("../chunks/why-cli-C_AHDxKT.js");
83
83
  return runWhyCli({ targetArgument: positionals[0] ?? "" });
84
84
  },
85
85
  "ssh-sign": async ({ rawArgs }) => {
86
- const { runSshSignCli } = await import("../chunks/ssh-sign-cli-9TxVwZta.js");
86
+ const { runSshSignCli } = await import("../chunks/ssh-sign-cli-CV1VA1Rp.js");
87
87
  return runSshSignCli(rawArgs);
88
88
  }
89
89
  };
@@ -105,7 +105,7 @@ async function runOwnedCommand(name, subcommandArgs) {
105
105
  return OWNED_COMMAND_RUNNERS[name](parsed);
106
106
  }
107
107
  var SUBCOMMAND_RUNNERS = new Map([...Object.keys(OWNED_COMMAND_SPECS).filter(isOwnedCommandName).map((name) => [name, (subcommandArgs) => runOwnedCommand(name, subcommandArgs)]), ...AGENT_API_VERBS.filter((verb) => !isOwnedCommandName(verb)).map((verb) => [verb, async (subcommandArgs, subcommandName) => {
108
- const { runAgentApiCli } = await import("../chunks/agent-api-cli-CdH4FPs0.js");
108
+ const { runAgentApiCli } = await import("../chunks/agent-api-cli-BJS9NzHM.js");
109
109
  return runAgentApiCli([subcommandName, ...subcommandArgs]);
110
110
  }])]);
111
111
  var AGENT_INSTALL_COMMAND_BY_ID = {
@@ -119,7 +119,7 @@ function missingAgentText(agentId) {
119
119
  }
120
120
  async function printSessionLimits() {
121
121
  if (!process.env["GLIMMERVOID_AGENT_URL"]) return;
122
- const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-CdH4FPs0.js");
122
+ const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-BJS9NzHM.js");
123
123
  const limitsLines = await sessionLimitsHelpLines();
124
124
  console.log(`\n${limitsLines.join("\n")}`);
125
125
  }
@@ -176,7 +176,7 @@ async function readDeclaredCustomAgents() {
176
176
  declared: [],
177
177
  error: null
178
178
  };
179
- const { loadConfigFile } = await import("../chunks/config-store-B4vUTgoX.js");
179
+ const { loadConfigFile } = await import("../chunks/config-store-BIr4xVth.js");
180
180
  try {
181
181
  const loaded = loadConfigFile(decided.path, { exitOnError: false });
182
182
  if (!loaded.config) return {
@@ -1 +1 @@
1
- export { t as askAgentApi, r as runAgentApiCli, i as sessionLimitsHelpLines } from "./agent-api-cli-_LARN_Fw.js";
1
+ export { t as askAgentApi, r as runAgentApiCli, i as sessionLimitsHelpLines } from "./agent-api-cli-C5EAcLcV.js";
@@ -1,13 +1,290 @@
1
1
  import { X as WhiteboardAgentReply, l as AgentLimitsReply, r as AGENT_URL_ENV } from "./session-CmkfJxzB.js";
2
- import { Y as parseCommand, i as agentCommandSpec, m as isAgentApiVerb, t as AGENT_COMMAND_HELP } from "./agent-api-core-Dh837S6e.js";
2
+ import { Y as parseCommand, i as agentCommandSpec, m as isAgentApiVerb, t as AGENT_COMMAND_HELP } from "./agent-api-core-I0VUtqYU.js";
3
3
  import { i as formatSessionLimits } from "./session-routes-CgqWd0bR.js";
4
4
  import { i as resolveHookTarget } from "./hook-relay-core-DA_bz2KA.js";
5
5
  import { t as parseJsonOrNull } from "./json-core-If8h-Qgy.js";
6
- import { c as planSteps, r as describeOverCap } from "./shown-files-core-B6ovU6SV.js";
6
+ import { c as layoutBoard, r as describeOverCap, s as escapeMarkup, u as planSteps } from "./shown-files-core-nS3KPkN_.js";
7
7
  import fs from "node:fs";
8
8
  import path from "node:path";
9
9
  import http from "node:http";
10
10
  import { pipeline } from "node:stream";
11
+ //#region shared/whiteboard-svg-core.ts
12
+ var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
13
+ var BOX_TEXT_INSET = 12;
14
+ var TITLE_BASELINE = 26;
15
+ var TITLE_LINE_HEIGHT = 20;
16
+ var BODY_LINE_HEIGHT = 18;
17
+ var NOTE_LINE_HEIGHT = 17;
18
+ var MUTED_INDENT = 14;
19
+ var COLUMN_TITLE_LINE_HEIGHT = 16;
20
+ var UNIT_LABEL_BASELINE = 24;
21
+ var UNIT_LABEL_HEIGHT = 18;
22
+ var PLAN_TITLE = "Plan";
23
+ var LINKED_BOARD_TEXT = "open linked board";
24
+ var PORT_RADIUS = 5;
25
+ var STANDALONE_STYLE = `
26
+ svg { font-family: 'ComicMono', 'CommitMono', 'Cascadia Code', 'Menlo', monospace; }
27
+ .wb-backdrop { fill: #0d0b16; }
28
+ .wb-column-title { fill: #a79fc4; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
29
+ .wb-column-rule { stroke: #4a4268; stroke-width: 1; stroke-dasharray: 2 5; }
30
+ .wb-box-outline { fill: #15122a; stroke: #a79fc4; stroke-width: 1.6; }
31
+ .wb-ghost { opacity: 0.6; }
32
+ .wb-ghost .wb-box-outline { fill: transparent; stroke-dasharray: 7 5; }
33
+ .wb-box-title { fill: #e6e0f5; font-size: 16px; font-weight: 700; }
34
+ .wb-box-line { fill: #e6e0f5; font-size: 12px; }
35
+ .wb-box-line.wb-muted { fill: #a79fc4; }
36
+ .wb-lane-pill { fill: transparent; stroke-width: 1.2; }
37
+ .wb-lane-pill-text { font-size: 12px; font-weight: 700; }
38
+ .wb-unit-outline { fill: #15122a; stroke: #c084fc; stroke-width: 1.6; }
39
+ .wb-unit-label, .wb-unit-link { fill: #c084fc; font-size: 12px; font-weight: 700; }
40
+ .wb-frame-outline { fill: rgba(192, 132, 252, 0.04); stroke: #4a4268; stroke-width: 1.4; stroke-dasharray: 10 6; }
41
+ .wb-frame-title { fill: #a79fc4; font-size: 12px; font-weight: 700; }
42
+ .wb-wire-hit, .wb-port { display: none; }
43
+ .wb-wire-line { fill: none; stroke: #a79fc4; stroke-width: 1.6; }
44
+ .wb-wire-line.wb-dashed { stroke-dasharray: 7 6; }
45
+ .wb-tone-fail .wb-wire-line { stroke: #ef4444; }
46
+ .wb-tone-join .wb-wire-line { stroke: #c084fc; }
47
+ .wb-wire-dot { fill: #a79fc4; }
48
+ .wb-wire-label { fill: #e6e0f5; font-size: 12px; text-anchor: middle; paint-order: stroke; stroke: #0d0b16; stroke-width: 5; }
49
+ .wb-note-card { fill: #2a2213; stroke: #f5c26b; stroke-width: 1.2; }
50
+ .wb-note-text { fill: #f8e7c4; font-size: 12px; }
51
+ .wb-note-byline { fill: #c9a868; font-size: 12px; }
52
+ .wb-resolved { opacity: 0.5; }
53
+ .wb-legend-text { fill: #a79fc4; font-size: 12px; }
54
+ .wb-caption { fill: #a79fc4; font-size: 14px; }
55
+ `;
56
+ function attributesMarkup(attributes) {
57
+ return Object.entries(attributes).flatMap(([name, value]) => value === null ? [] : [` ${name}="${escapeMarkup(value)}"`]).join("");
58
+ }
59
+ function tag(name, attributes, children = "") {
60
+ return `<${name}${attributesMarkup(attributes)}>${children}</${name}>`;
61
+ }
62
+ function text(content, x, y, className, extra = {}) {
63
+ return tag("text", {
64
+ x,
65
+ y,
66
+ class: className,
67
+ ...extra
68
+ }, escapeMarkup(content));
69
+ }
70
+ function elementGroup(element, className, children) {
71
+ return tag("g", {
72
+ class: `wb-element ${className}`,
73
+ "data-element-id": element.id,
74
+ "data-element-kind": element.kind
75
+ }, children.join(""));
76
+ }
77
+ function laneStroke(hex) {
78
+ return hex ? `stroke:${hex}` : null;
79
+ }
80
+ function boxMarkup(box) {
81
+ const parts = [tag("rect", {
82
+ x: box.x,
83
+ y: box.y,
84
+ width: box.width,
85
+ height: box.height,
86
+ rx: 8,
87
+ class: "wb-box-outline",
88
+ style: laneStroke(box.lane?.hex)
89
+ })];
90
+ const midX = box.x + box.width / 2;
91
+ const midY = box.y + box.height / 2;
92
+ for (const [cx, cy] of [
93
+ [midX, box.y],
94
+ [box.x + box.width, midY],
95
+ [midX, box.y + box.height],
96
+ [box.x, midY]
97
+ ]) parts.push(tag("circle", {
98
+ cx,
99
+ cy,
100
+ r: PORT_RADIUS,
101
+ class: "wb-port"
102
+ }));
103
+ box.titleLines.forEach((line, index) => {
104
+ parts.push(text(line, box.x + BOX_TEXT_INSET, box.y + TITLE_BASELINE + index * TITLE_LINE_HEIGHT, "wb-box-title"));
105
+ });
106
+ const bodyTop = box.y + TITLE_BASELINE + box.titleLines.length * TITLE_LINE_HEIGHT;
107
+ box.bodyLines.forEach((line, index) => {
108
+ const x = box.x + BOX_TEXT_INSET + (line.muted ? MUTED_INDENT : 0);
109
+ parts.push(text(line.text, x, bodyTop + index * BODY_LINE_HEIGHT, line.muted ? "wb-box-line wb-muted" : "wb-box-line"));
110
+ });
111
+ if (box.lane) {
112
+ const pillY = box.y + box.height - 28;
113
+ const pillWidth = Math.min(box.width - 24, 16 + box.lane.label.length * 8);
114
+ parts.push(tag("rect", {
115
+ x: box.x + BOX_TEXT_INSET,
116
+ y: pillY,
117
+ width: pillWidth,
118
+ height: 18,
119
+ rx: 9,
120
+ class: "wb-lane-pill",
121
+ style: laneStroke(box.lane.hex)
122
+ }), text(box.lane.label, box.x + BOX_TEXT_INSET + 8, pillY + 13, "wb-lane-pill-text", { style: `fill:${box.lane.hex}` }));
123
+ }
124
+ return elementGroup(box, box.isGhost ? "wb-box wb-ghost" : "wb-box", parts);
125
+ }
126
+ function frameMarkup(frame) {
127
+ return elementGroup(frame, "wb-frame", [tag("rect", {
128
+ x: frame.x,
129
+ y: frame.y,
130
+ width: frame.width,
131
+ height: frame.height,
132
+ rx: 12,
133
+ class: "wb-frame-outline"
134
+ }), text(frame.title, frame.x + 14, frame.y + 18, "wb-frame-title")]);
135
+ }
136
+ function wireMarkup(wire) {
137
+ const parts = [
138
+ tag("path", {
139
+ d: wire.path,
140
+ class: "wb-wire-hit"
141
+ }),
142
+ tag("path", {
143
+ d: wire.path,
144
+ "marker-end": wire.hasArrowhead ? "url(#wb-arrow)" : null,
145
+ class: wire.isDashed ? "wb-wire-line wb-dashed" : "wb-wire-line",
146
+ style: laneStroke(wire.strokeHex ?? void 0)
147
+ }),
148
+ tag("circle", {
149
+ cx: wire.start.x,
150
+ cy: wire.start.y,
151
+ r: 3,
152
+ class: "wb-wire-dot"
153
+ })
154
+ ];
155
+ if (wire.joinAt) parts.push(tag("circle", {
156
+ cx: wire.joinAt.x,
157
+ cy: wire.joinAt.y,
158
+ r: 3,
159
+ class: "wb-wire-dot"
160
+ }));
161
+ if (wire.label) parts.push(text(wire.label, wire.labelAt.x, wire.labelAt.y, "wb-wire-label"));
162
+ return elementGroup(wire, `wb-wire wb-tone-${wire.tone}`, parts);
163
+ }
164
+ function noteMarkup(note) {
165
+ const parts = [tag("rect", {
166
+ x: note.x,
167
+ y: note.y,
168
+ width: note.width,
169
+ height: note.height,
170
+ rx: 4,
171
+ class: "wb-note-card"
172
+ })];
173
+ note.lines.forEach((line, index) => {
174
+ parts.push(text(line, note.x + 10, note.y + 22 + index * NOTE_LINE_HEIGHT, "wb-note-text"));
175
+ });
176
+ if (note.byline) parts.push(text(note.byline, note.x + 10, note.y + 22 + note.lines.length * NOTE_LINE_HEIGHT, "wb-note-byline"));
177
+ return elementGroup(note, note.isResolved ? "wb-note wb-resolved" : "wb-note", parts);
178
+ }
179
+ function unitMarkup(unit) {
180
+ const parts = [tag("rect", {
181
+ x: unit.x,
182
+ y: unit.y,
183
+ width: unit.width,
184
+ height: unit.height,
185
+ rx: 8,
186
+ class: "wb-unit-outline"
187
+ }), text(unit.label, unit.x + BOX_TEXT_INSET, unit.y + UNIT_LABEL_BASELINE, "wb-unit-label")];
188
+ const titleTop = unit.y + UNIT_LABEL_BASELINE + UNIT_LABEL_HEIGHT;
189
+ unit.titleLines.forEach((line, index) => {
190
+ parts.push(text(line, unit.x + BOX_TEXT_INSET, titleTop + index * TITLE_LINE_HEIGHT, "wb-box-title"));
191
+ });
192
+ const bodyTop = titleTop + unit.titleLines.length * TITLE_LINE_HEIGHT;
193
+ unit.bodyLines.forEach((line, index) => {
194
+ parts.push(text(line, unit.x + BOX_TEXT_INSET, bodyTop + index * BODY_LINE_HEIGHT, "wb-box-line"));
195
+ });
196
+ if (unit.linkedBoardId) parts.push(text(LINKED_BOARD_TEXT, unit.x + BOX_TEXT_INSET, bodyTop + unit.bodyLines.length * BODY_LINE_HEIGHT, "wb-unit-link", { "data-linked-board-id": unit.linkedBoardId }));
197
+ return elementGroup(unit, "wb-unit", parts);
198
+ }
199
+ function elementMarkup(element) {
200
+ switch (element.kind) {
201
+ case "box": return boxMarkup(element);
202
+ case "frame": return frameMarkup(element);
203
+ case "wire": return wireMarkup(element);
204
+ case "note": return noteMarkup(element);
205
+ case "unit": return unitMarkup(element);
206
+ }
207
+ }
208
+ function chromeMarkup(layout) {
209
+ const parts = [];
210
+ if (layout.plan) {
211
+ parts.push(text(PLAN_TITLE, layout.plan.titleAt.x, layout.plan.titleAt.y, "wb-column-title"));
212
+ for (const arrowPath of layout.plan.arrowPaths) parts.push(tag("path", {
213
+ d: arrowPath,
214
+ "marker-end": "url(#wb-arrow)",
215
+ class: "wb-wire-line"
216
+ }));
217
+ }
218
+ for (const column of layout.columns) {
219
+ if (column.titleLines.length === 0) continue;
220
+ column.titleLines.forEach((line, index) => {
221
+ parts.push(text(line, column.x, column.titleBaselineY + index * COLUMN_TITLE_LINE_HEIGHT, "wb-column-title"));
222
+ });
223
+ parts.push(tag("line", {
224
+ x1: column.x,
225
+ y1: column.ruleY,
226
+ x2: column.x + column.width,
227
+ y2: column.ruleY,
228
+ class: "wb-column-rule"
229
+ }));
230
+ }
231
+ for (const entry of layout.legend) parts.push(tag("rect", {
232
+ x: entry.x,
233
+ y: entry.y,
234
+ width: 14,
235
+ height: 14,
236
+ rx: 3,
237
+ class: "wb-legend-swatch",
238
+ style: `fill:${entry.hex}`
239
+ }), text(entry.label, entry.x + 22, entry.y + 12, "wb-legend-text"));
240
+ if (layout.caption) parts.push(text(layout.caption.text, layout.caption.x, layout.caption.y + 16, "wb-caption"));
241
+ return tag("g", { class: "wb-chrome" }, parts.join(""));
242
+ }
243
+ function arrowDefinitionsMarkup() {
244
+ return tag("defs", {}, tag("marker", {
245
+ id: "wb-arrow",
246
+ viewBox: "0 0 10 10",
247
+ refX: 9,
248
+ refY: 5,
249
+ markerWidth: 8,
250
+ markerHeight: 8,
251
+ orient: "auto-start-reverse"
252
+ }, tag("path", {
253
+ d: "M 0 1 L 10 5 L 0 9 z",
254
+ fill: "context-stroke"
255
+ })));
256
+ }
257
+ var LAYER_ORDER = [
258
+ "frame",
259
+ "wire",
260
+ "box",
261
+ "note",
262
+ "unit"
263
+ ];
264
+ function boardSvgDocument(layout) {
265
+ const { x, y, width, height } = layout.bounds;
266
+ const layers = LAYER_ORDER.map((kind) => tag("g", { class: "wb-layer" }, layout.elements.filter((element) => element.kind === kind).map(elementMarkup).join("")));
267
+ const body = [
268
+ tag("style", {}, STANDALONE_STYLE),
269
+ arrowDefinitionsMarkup(),
270
+ tag("rect", {
271
+ x,
272
+ y,
273
+ width,
274
+ height,
275
+ class: "wb-backdrop"
276
+ }),
277
+ chromeMarkup(layout),
278
+ ...layers
279
+ ].join("");
280
+ return `${tag("svg", {
281
+ xmlns: SVG_NAMESPACE,
282
+ viewBox: `${x} ${y} ${width} ${height}`,
283
+ width,
284
+ height
285
+ }, body)}\n`;
286
+ }
287
+ //#endregion
11
288
  //#region server/agent-api-cli.ts
12
289
  var AGENT_PATH_PREFIX = "/agent/";
13
290
  var HELP_LIMITS_TIMEOUT_MS = 2e3;
@@ -19,11 +296,19 @@ function pullRequestBody({ positionals }) {
19
296
  const pullRequest = joinedText(positionals);
20
297
  return pullRequest ? { pr: pullRequest } : null;
21
298
  }
22
- function readOpsArgument(opsText) {
299
+ function readTextFileOrEmpty(filePath) {
300
+ try {
301
+ return fs.readFileSync(path.resolve(filePath), "utf8");
302
+ } catch {
303
+ return "";
304
+ }
305
+ }
306
+ function readOpsArgument(opsText, opsFilePath) {
307
+ if (opsFilePath !== null) return opsText ? null : parseJsonOrNull(readTextFileOrEmpty(opsFilePath));
23
308
  if (opsText === "-") return parseJsonOrNull(fs.readFileSync(0, "utf8"));
24
309
  return parseJsonOrNull(opsText);
25
310
  }
26
- function whiteboardBody({ commandPath, positionals }) {
311
+ function whiteboardBody({ commandPath, positionals, values }) {
27
312
  const subcommand = commandPath[1];
28
313
  const joined = joinedText(positionals);
29
314
  if (subcommand === "list") return { sub: "list" };
@@ -36,14 +321,15 @@ function whiteboardBody({ commandPath, positionals }) {
36
321
  board: joined
37
322
  } : null;
38
323
  const [board, ...argumentWords] = positionals;
39
- if (!board || argumentWords.length === 0) return null;
324
+ const opsFilePath = typeof values.file === "string" ? values.file : null;
325
+ if (!board || argumentWords.length === 0 && opsFilePath === null) return null;
40
326
  if (subcommand === "resolve") return {
41
327
  sub: "resolve",
42
328
  board,
43
329
  note: joinedText(argumentWords)
44
330
  };
45
331
  if (subcommand !== "put") return null;
46
- const ops = readOpsArgument(argumentWords.join(" "));
332
+ const ops = readOpsArgument(argumentWords.join(" "), opsFilePath);
47
333
  if (ops === null) return null;
48
334
  return {
49
335
  sub: "put",
@@ -410,6 +696,92 @@ async function runPlanCommand(parsed) {
410
696
  console.log(reply.text);
411
697
  return 0;
412
698
  }
699
+ function pointsOfPath(pathData) {
700
+ return [...pathData.matchAll(/[ML] (-?[\d.]+) (-?[\d.]+)/g)].map((match) => ({
701
+ x: Number(match[1]),
702
+ y: Number(match[2])
703
+ }));
704
+ }
705
+ function rectOf(element) {
706
+ return {
707
+ x: element.x,
708
+ y: element.y,
709
+ width: element.width,
710
+ height: element.height
711
+ };
712
+ }
713
+ function summarizeLayout(layout) {
714
+ const placed = layout.elements.flatMap((element) => element.kind === "wire" ? [] : [{
715
+ kind: element.kind,
716
+ id: element.id,
717
+ ...rectOf(element)
718
+ }]);
719
+ const wires = layout.elements.flatMap((element) => element.kind === "wire" ? [{
720
+ id: element.id,
721
+ points: pointsOfPath(element.path),
722
+ label: element.label,
723
+ labelAt: element.label ? element.labelAt : null
724
+ }] : []);
725
+ return {
726
+ ok: true,
727
+ bounds: layout.bounds,
728
+ columns: layout.columns.map((column) => ({
729
+ id: column.id,
730
+ x: column.x,
731
+ width: column.width
732
+ })),
733
+ elements: placed,
734
+ wires,
735
+ warnings: layout.warnings
736
+ };
737
+ }
738
+ async function fetchBoard(boardRef) {
739
+ const reply = await askWhiteboard({
740
+ sub: "get",
741
+ board: boardRef
742
+ });
743
+ if (typeof reply === "string") return reply;
744
+ if (!("changes" in reply)) return "Glimmervoid did not return the board";
745
+ return reply.board;
746
+ }
747
+ async function runLayoutCommand(parsed) {
748
+ const isRender = parsed.commandPath[1] === "render";
749
+ const outPath = typeof parsed.values.out === "string" ? parsed.values.out : null;
750
+ if (isRender && outPath === null) {
751
+ console.log(JSON.stringify({
752
+ ok: false,
753
+ error: "render needs --out <path>, for example \"glimmervoid whiteboard render flow --out flow.svg\""
754
+ }));
755
+ return 1;
756
+ }
757
+ const board = await fetchBoard(joinedText(parsed.positionals));
758
+ if (typeof board === "string") {
759
+ console.log(JSON.stringify({
760
+ ok: false,
761
+ error: board
762
+ }));
763
+ return 1;
764
+ }
765
+ const layout = layoutBoard(board);
766
+ if (outPath === null) {
767
+ console.log(JSON.stringify(summarizeLayout(layout)));
768
+ return 0;
769
+ }
770
+ const absoluteOutPath = path.resolve(outPath);
771
+ await fs.promises.writeFile(absoluteOutPath, boardSvgDocument(layout));
772
+ console.log(JSON.stringify({
773
+ ok: true,
774
+ wrote: absoluteOutPath,
775
+ width: layout.bounds.width,
776
+ height: layout.bounds.height,
777
+ warnings: layout.warnings
778
+ }));
779
+ return 0;
780
+ }
781
+ function isLayoutCommand(parsed) {
782
+ const subcommand = parsed.commandPath[1];
783
+ return subcommand === "render" || subcommand === "get" && parsed.values.layout === true;
784
+ }
413
785
  async function runAgentApiCli(args) {
414
786
  const verb = args[0];
415
787
  if (!verb || !isAgentApiVerb(verb)) {
@@ -427,6 +799,7 @@ async function runAgentApiCli(args) {
427
799
  }
428
800
  if (verb === "show") return runShowCommand(parsed);
429
801
  if (verb === "whiteboard" && parsed.commandPath[1] === "plan") return runPlanCommand(parsed);
802
+ if (verb === "whiteboard" && isLayoutCommand(parsed)) return runLayoutCommand(parsed);
430
803
  const body = BODY_BUILDERS[verb](parsed);
431
804
  if (!body) {
432
805
  console.error(`glimmervoid ${parsed.commandPath.join(" ")}: ${AGENT_COMMAND_HELP[verb].missingArgumentHint ?? "those arguments are not understood"}; run it with --help for its usage`);
@@ -1162,17 +1162,41 @@ var WHITEBOARD_SUBCOMMANDS = [
1162
1162
  },
1163
1163
  {
1164
1164
  name: "get",
1165
- summary: "Read a board and the changes since this session last read it",
1166
- positionals: BOARD_REFERENCE
1165
+ summary: "Read a board and the changes since this session last read it; --layout prints where every box, wire and label landed instead",
1166
+ positionals: BOARD_REFERENCE,
1167
+ options: [{
1168
+ name: "layout",
1169
+ type: "boolean",
1170
+ summary: "Print the laid-out positions and layout warnings instead of the stored board"
1171
+ }]
1167
1172
  },
1168
1173
  {
1169
1174
  name: "put",
1170
- summary: "Apply a JSON op or array of ops to a board; - reads them from stdin",
1175
+ summary: "Apply a JSON op or array of ops to a board; - reads them from stdin and --file reads them from a file",
1171
1176
  positionals: {
1172
- usage: "<board> <ops-json|->",
1173
- min: 2,
1177
+ usage: "<board> [<ops-json|->]",
1178
+ min: 1,
1174
1179
  max: null
1175
- }
1180
+ },
1181
+ options: [{
1182
+ name: "file",
1183
+ type: "string",
1184
+ valueName: "path",
1185
+ summary: "A file holding the JSON op or array of ops"
1186
+ }],
1187
+ missingArgumentHint: "put needs a board and ops, for example \"glimmervoid whiteboard put flow --file ops.json\""
1188
+ },
1189
+ {
1190
+ name: "render",
1191
+ summary: "Draw a board as the dashboard does and write it to an SVG file",
1192
+ positionals: BOARD_REFERENCE,
1193
+ options: [{
1194
+ name: "out",
1195
+ type: "string",
1196
+ valueName: "path",
1197
+ summary: "The SVG file to write"
1198
+ }],
1199
+ missingArgumentHint: "render needs a board and --out, for example \"glimmervoid whiteboard render flow --out flow.svg\""
1176
1200
  },
1177
1201
  {
1178
1202
  name: "resolve",
@@ -1304,7 +1328,7 @@ var AGENT_COMMAND_HELP = Object.freeze({
1304
1328
  isPassthrough: true
1305
1329
  },
1306
1330
  whiteboard: {
1307
- usage: "whiteboard new|list|connect|disconnect|get|put|resolve|delete|plan",
1331
+ usage: "whiteboard new|list|connect|disconnect|get|put|render|resolve|delete|plan",
1308
1332
  subcommands: WHITEBOARD_SUBCOMMANDS,
1309
1333
  summary: "Create, connect to, read, edit, plan on and delete a shared whiteboard the operator and connected sessions edit together",
1310
1334
  missingArgumentHint: null
@@ -0,0 +1 @@
1
+ export { c as loadConfigFile } from "./config-store-OdyfXb2W.js";
@@ -2076,7 +2076,7 @@ var FILE_ONLY_SETTINGS = Object.freeze([
2076
2076
  path: "worktreeCloneDependencies",
2077
2077
  title: "Worktree dependency clone",
2078
2078
  group: "machine-detection-sessions",
2079
- description: "On macOS, clone the main checkout's node_modules into a new session worktree when it matches the worktree's lockfile.",
2079
+ description: "On macOS, clone the main checkout's node_modules into a session worktree that starts without one, when it matches the worktree's lockfile.",
2080
2080
  control: "toggle",
2081
2081
  keywords: [
2082
2082
  "node_modules",