glimmervoid 0.49.1-next.507 → 0.49.1-next.509
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/glimmervoid.js +11 -11
- package/dist/chunks/{adapters-cjLKUasU.js → adapters-BfxRpFYw.js} +1 -1
- package/dist/chunks/{adapters-D-SMUfJi.js → adapters-Bq39QRBp.js} +6 -6
- package/dist/chunks/{agent-api-cli-B4EhNVX4.js → agent-api-cli-BzVCpGSu.js} +1 -1
- package/dist/chunks/{agent-api-cli-DExpTVWL.js → agent-api-cli-ZP54FlHn.js} +1 -448
- package/dist/chunks/{agent-home-BHtmhtJA.js → agent-home-Bq9uFynU.js} +12 -3
- package/dist/chunks/{agent-home-core-gp8KlW8i.js → agent-home-core-CIw3YqAH.js} +4 -2
- package/dist/chunks/agent-home-core-e4wxswLi.js +1 -0
- package/dist/chunks/agent-home-zydcIQ-p.js +1 -0
- package/dist/chunks/{agent-setup-cli-BvMppMtM.js → agent-setup-cli-CsmzaPAu.js} +1 -1
- package/dist/chunks/{grok-DrF9dLgS.js → grok-ChYjLvrR.js} +2 -2
- package/dist/chunks/hook-command-core-CG5D9iou.js +147 -0
- package/dist/chunks/kimi-B2tDIaSf.js +1 -0
- package/dist/chunks/{kimi-B8Yf_DIB.js → kimi-CjHEGrF1.js} +30 -5
- package/dist/chunks/{main-w4qYQZnc.js → main-3pLS90YV.js} +151 -24
- package/dist/chunks/{settings-cli-C3GFj1Ny.js → settings-cli-BuFGt4jX.js} +1 -1
- package/dist/chunks/{shown-files-core-CiEXUXvy.js → shown-files-core-Dbzn7Pyl.js} +457 -10
- package/dist/chunks/{spawn-env-CDazYoWp.js → spawn-env-xtzWf6ru.js} +2 -53
- package/dist/chunks/{ssh-sign-cli-BSgXGArF.js → ssh-sign-cli-BE7Y3PTd.js} +1 -1
- package/dist/client/assets/{benchmark-panel-BEqoWawW.js → benchmark-panel-Dn732v0a.js} +1 -1
- package/dist/client/assets/benchmark-panel-Dn732v0a.js.br +0 -0
- package/dist/client/assets/{boards-view-B5zlhqPq.js → boards-view-VfWpNyIm.js} +1 -1
- package/dist/client/assets/boards-view-VfWpNyIm.js.br +0 -0
- package/dist/client/assets/{community-panel-Tt6kivkQ.js → community-panel-pUyOGrUR.js} +1 -1
- package/dist/client/assets/community-panel-pUyOGrUR.js.br +0 -0
- package/dist/client/assets/{dialogs-CBag6vU5.js → dialogs-B2jQfTRh.js} +1 -1
- package/dist/client/assets/dialogs-B2jQfTRh.js.br +0 -0
- package/dist/client/assets/{doc-editor-ui-NfjCtcrC.js → doc-editor-ui-ULV2xreQ.js} +1 -1
- package/dist/client/assets/doc-editor-ui-ULV2xreQ.js.br +0 -0
- package/dist/client/assets/{feature-hint-BflYZVMw.js → feature-hint-3E_VeNPb.js} +1 -1
- package/dist/client/assets/feature-hint-3E_VeNPb.js.br +0 -0
- package/dist/client/assets/{first-run-checklist-B3dDH6Vq.js → first-run-checklist-BEJLzy29.js} +1 -1
- package/dist/client/assets/first-run-checklist-BEJLzy29.js.br +0 -0
- package/dist/client/assets/{hooks-panel-DAQ0BWlw.js → hooks-panel-BoiOxrxY.js} +1 -1
- package/dist/client/assets/hooks-panel-BoiOxrxY.js.br +0 -0
- package/dist/client/assets/{index-B_s3KLcn.js → index-0x2w0FO-.js} +5 -5
- package/dist/client/assets/index-0x2w0FO-.js.br +0 -0
- package/dist/client/assets/{issues-panel-CXpJlaAG.js → issues-panel-BrSKPP5C.js} +1 -1
- package/dist/client/assets/issues-panel-BrSKPP5C.js.br +0 -0
- package/dist/client/assets/{my-prs-panel-Cbs34_2c.js → my-prs-panel-UKuxBNn6.js} +1 -1
- package/dist/client/assets/my-prs-panel-UKuxBNn6.js.br +0 -0
- package/dist/client/assets/{nyan-cat-meo2tUad.js → nyan-cat-BR9G3PMX.js} +1 -1
- package/dist/client/assets/nyan-cat-BR9G3PMX.js.br +0 -0
- package/dist/client/assets/{phone-shell-czZzIUpK.js → phone-shell-iFBhy8Nz.js} +1 -1
- package/dist/client/assets/phone-shell-iFBhy8Nz.js.br +0 -0
- package/dist/client/assets/{plan-face-CwrI6EoN.js → plan-face-DYryiXbx.js} +1 -1
- package/dist/client/assets/plan-face-DYryiXbx.js.br +0 -0
- package/dist/client/assets/{plan-render-BoWpxBqk.js → plan-render-Cj3nLSRn.js} +1 -1
- package/dist/client/assets/plan-render-Cj3nLSRn.js.br +0 -0
- package/dist/client/assets/{pr-queue-columns-CgTEE4vF.js → pr-queue-columns-Dd_iIPc4.js} +1 -1
- package/dist/client/assets/pr-queue-columns-Dd_iIPc4.js.br +0 -0
- package/dist/client/assets/{radar-panel-tQ6gg3IL.js → radar-panel-BRLjLt50.js} +1 -1
- package/dist/client/assets/radar-panel-BRLjLt50.js.br +0 -0
- package/dist/client/assets/{repo-roots-adder-DeTVTMR8.js → repo-roots-adder-DVA4xzhT.js} +1 -1
- package/dist/client/assets/repo-roots-adder-DVA4xzhT.js.br +0 -0
- package/dist/client/assets/{resume-dialog-CqMwg5lD.js → resume-dialog-C4F4UCKo.js} +1 -1
- package/dist/client/assets/resume-dialog-C4F4UCKo.js.br +0 -0
- package/dist/client/assets/{review-queue-panel-TXMbPDRB.js → review-queue-panel-DZr6gIrF.js} +1 -1
- package/dist/client/assets/review-queue-panel-DZr6gIrF.js.br +0 -0
- package/dist/client/assets/{settings-panel-DN72eCIu.js → settings-panel-CNRBx_9O.js} +2 -2
- package/dist/client/assets/settings-panel-CNRBx_9O.js.br +0 -0
- package/dist/client/assets/{shown-face-CdGiglI_.js → shown-face-DpPIVpGF.js} +1 -1
- package/dist/client/assets/shown-face-DpPIVpGF.js.br +0 -0
- package/dist/client/assets/{team-review-panel-CzngC3iy.js → team-review-panel-BmeUu-bO.js} +1 -1
- package/dist/client/assets/team-review-panel-BmeUu-bO.js.br +0 -0
- package/dist/client/assets/{trace-panel-DcyTn3du.js → trace-panel-BmHltGhj.js} +1 -1
- package/dist/client/assets/trace-panel-BmHltGhj.js.br +0 -0
- package/dist/client/assets/{usage-panel-DA1LYw7p.js → usage-panel-377FVUBL.js} +1 -1
- package/dist/client/assets/usage-panel-377FVUBL.js.br +0 -0
- package/dist/client/assets/{your-day-tip-DId8pS5F.js → your-day-tip-fNFXMQ2L.js} +1 -1
- package/dist/client/assets/your-day-tip-fNFXMQ2L.js.br +3 -0
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.br +0 -0
- package/dist/server/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/agent-home-DHteh_iQ.js +0 -1
- package/dist/chunks/agent-home-core-DO3oucw-.js +0 -1
- package/dist/chunks/hook-command-core-qTNK-xMF.js +0 -17
- package/dist/chunks/kimi-BhfVJaz7.js +0 -1
- package/dist/client/assets/benchmark-panel-BEqoWawW.js.br +0 -0
- package/dist/client/assets/boards-view-B5zlhqPq.js.br +0 -0
- package/dist/client/assets/community-panel-Tt6kivkQ.js.br +0 -0
- package/dist/client/assets/dialogs-CBag6vU5.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-NfjCtcrC.js.br +0 -0
- package/dist/client/assets/feature-hint-BflYZVMw.js.br +0 -0
- package/dist/client/assets/first-run-checklist-B3dDH6Vq.js.br +0 -0
- package/dist/client/assets/hooks-panel-DAQ0BWlw.js.br +0 -0
- package/dist/client/assets/index-B_s3KLcn.js.br +0 -0
- package/dist/client/assets/issues-panel-CXpJlaAG.js.br +0 -0
- package/dist/client/assets/my-prs-panel-Cbs34_2c.js.br +0 -0
- package/dist/client/assets/nyan-cat-meo2tUad.js.br +0 -0
- package/dist/client/assets/phone-shell-czZzIUpK.js.br +0 -0
- package/dist/client/assets/plan-face-CwrI6EoN.js.br +0 -0
- package/dist/client/assets/plan-render-BoWpxBqk.js.br +0 -0
- package/dist/client/assets/pr-queue-columns-CgTEE4vF.js.br +0 -0
- package/dist/client/assets/radar-panel-tQ6gg3IL.js.br +0 -0
- package/dist/client/assets/repo-roots-adder-DeTVTMR8.js.br +0 -0
- package/dist/client/assets/resume-dialog-CqMwg5lD.js.br +0 -0
- package/dist/client/assets/review-queue-panel-TXMbPDRB.js.br +0 -0
- package/dist/client/assets/settings-panel-DN72eCIu.js.br +0 -0
- package/dist/client/assets/shown-face-CdGiglI_.js.br +0 -0
- package/dist/client/assets/team-review-panel-CzngC3iy.js.br +0 -0
- package/dist/client/assets/trace-panel-DcyTn3du.js.br +0 -0
- package/dist/client/assets/usage-panel-DA1LYw7p.js.br +0 -0
- package/dist/client/assets/your-day-tip-DId8pS5F.js.br +0 -0
package/dist/bin/glimmervoid.js
CHANGED
|
@@ -71,11 +71,11 @@ var OWNED_COMMAND_RUNNERS = {
|
|
|
71
71
|
});
|
|
72
72
|
},
|
|
73
73
|
agent: async () => {
|
|
74
|
-
const { runAgentSetupCli } = await import("../chunks/agent-setup-cli-
|
|
74
|
+
const { runAgentSetupCli } = await import("../chunks/agent-setup-cli-CsmzaPAu.js");
|
|
75
75
|
return runAgentSetupCli();
|
|
76
76
|
},
|
|
77
77
|
settings: async (parsed) => {
|
|
78
|
-
const { runParsedSettingsCli } = await import("../chunks/settings-cli-
|
|
78
|
+
const { runParsedSettingsCli } = await import("../chunks/settings-cli-BuFGt4jX.js");
|
|
79
79
|
return runParsedSettingsCli(parsed);
|
|
80
80
|
},
|
|
81
81
|
why: async ({ positionals }) => {
|
|
@@ -83,7 +83,7 @@ var OWNED_COMMAND_RUNNERS = {
|
|
|
83
83
|
return runWhyCli({ targetArgument: positionals[0] ?? "" });
|
|
84
84
|
},
|
|
85
85
|
"ssh-sign": async ({ rawArgs }) => {
|
|
86
|
-
const { runSshSignCli } = await import("../chunks/ssh-sign-cli-
|
|
86
|
+
const { runSshSignCli } = await import("../chunks/ssh-sign-cli-BE7Y3PTd.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-
|
|
108
|
+
const { runAgentApiCli } = await import("../chunks/agent-api-cli-BzVCpGSu.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-
|
|
122
|
+
const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-BzVCpGSu.js");
|
|
123
123
|
const limitsLines = await sessionLimitsHelpLines();
|
|
124
124
|
console.log(`\n${limitsLines.join("\n")}`);
|
|
125
125
|
}
|
|
@@ -252,7 +252,7 @@ async function runDoctor() {
|
|
|
252
252
|
}
|
|
253
253
|
switchSection("Agents");
|
|
254
254
|
try {
|
|
255
|
-
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-
|
|
255
|
+
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-BfxRpFYw.js");
|
|
256
256
|
const declaredCustomAgents = await readDeclaredCustomAgents();
|
|
257
257
|
if (declaredCustomAgents.error) line("config", declaredCustomAgents.error);
|
|
258
258
|
setCustomAgents(declaredCustomAgents.declared);
|
|
@@ -260,12 +260,12 @@ async function runDoctor() {
|
|
|
260
260
|
const { label, path: resolvedPath } = describeAgentResolvability(id);
|
|
261
261
|
line(`${id} (${label})`, resolvedPath ?? missingAgentText(id));
|
|
262
262
|
}
|
|
263
|
-
const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-
|
|
263
|
+
const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-CsmzaPAu.js");
|
|
264
264
|
const grokSetup = inspectGrokAgentSetup();
|
|
265
265
|
line("grok hook setup", `${grokSetup.classification}: ${grokSetup.filePath}`);
|
|
266
|
-
const { default: kimi } = await import("../chunks/kimi-
|
|
267
|
-
const { describeAgentHome } = await import("../chunks/agent-home-
|
|
268
|
-
const { KIMI_HOME_PROFILE } = await import("../chunks/agent-home-core-
|
|
266
|
+
const { default: kimi } = await import("../chunks/kimi-B2tDIaSf.js");
|
|
267
|
+
const { describeAgentHome } = await import("../chunks/agent-home-zydcIQ-p.js");
|
|
268
|
+
const { KIMI_HOME_PROFILE } = await import("../chunks/agent-home-core-e4wxswLi.js");
|
|
269
269
|
line("kimi home", describeAgentHome(KIMI_HOME_PROFILE, kimi.expectedHooksBlock()));
|
|
270
270
|
} catch (err) {
|
|
271
271
|
line("agents", `probe failed: ${firstLine(errorText(err))}`);
|
|
@@ -274,7 +274,7 @@ async function runDoctor() {
|
|
|
274
274
|
try {
|
|
275
275
|
const { resolvePackageBin } = await import("../chunks/runtime-paths-CKqE4LXP.js");
|
|
276
276
|
const { execFileSync } = await import("../chunks/child-process-safe-BKjzSEYd.js");
|
|
277
|
-
const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-
|
|
277
|
+
const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-CsmzaPAu.js");
|
|
278
278
|
const binPath = resolvePackageBin("cc-safety-net", "cc-safety-net");
|
|
279
279
|
line("Sane YOLO", binPath || "not installed");
|
|
280
280
|
if (binPath) line("cc-safety-net version", execFileSync(process.execPath, [binPath, "--version"], {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as describeAgentResolvability, l as listAgentIds, f as setCustomAgents } from "./adapters-
|
|
1
|
+
export { a as describeAgentResolvability, l as listAgentIds, f as setCustomAgents } from "./adapters-Bq39QRBp.js";
|
|
@@ -6,14 +6,14 @@ import { Ht as PLAN_TOOL_NAME, S as InstallFlavor, Vt as PLAN_RESULT_HOOK_EVENT,
|
|
|
6
6
|
import { a as rawTextOr, n as isRecord, o as textOr, r as numberOr } from "./coerce-oz_Z_6E7.js";
|
|
7
7
|
import { n as parseJsonRecord } from "./json-core-If8h-Qgy.js";
|
|
8
8
|
import { i as saneYoloEnv, r as SANE_YOLO_PATH_ENV, t as CODEX_SANE_YOLO_FLAVOR } from "./sane-yolo-BjUkqIoH.js";
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import { i as isSpinnerChar, n as classifyAgentTitle, r as isBrailleChar, t as grok } from "./grok-
|
|
9
|
+
import { n as shellQuote, t as buildHookCommand } from "./hook-command-core-CG5D9iou.js";
|
|
10
|
+
import { t as buildAgentEnv } from "./spawn-env-xtzWf6ru.js";
|
|
11
|
+
import { i as isSpinnerChar, n as classifyAgentTitle, r as isBrailleChar, t as grok } from "./grok-ChYjLvrR.js";
|
|
12
12
|
import { O as nextBackoffMs, c as loadedJsonValue, d as writeJsonAtomicSync, s as loadJsonStateFileSync, t as appendJsonLine } from "./json-file-AKRVPqG1.js";
|
|
13
13
|
import { h as isExperimentalBuild, m as compareReleaseVersions, s as glimmervoidHomeDir } from "./config-store-DdRVlBmt.js";
|
|
14
|
-
import { n as buildAgentSpawnCommand, r as resolveAgentCommand, t as kimi } from "./kimi-
|
|
15
|
-
import { c as CODEX_HOME_PROFILE, f as renderCodexHookTables, n as AGENT_HOME_CONFIG_NAME, p as renderCodexHooksBlock } from "./agent-home-core-
|
|
16
|
-
import { c as releaseAgentHome, i as holdPreparedAgentHome, n as generatedAgentHomePath, s as realAgentHome } from "./agent-home-
|
|
14
|
+
import { n as buildAgentSpawnCommand, r as resolveAgentCommand, t as kimi } from "./kimi-CjHEGrF1.js";
|
|
15
|
+
import { c as CODEX_HOME_PROFILE, f as renderCodexHookTables, n as AGENT_HOME_CONFIG_NAME, p as renderCodexHooksBlock } from "./agent-home-core-CIw3YqAH.js";
|
|
16
|
+
import { c as releaseAgentHome, i as holdPreparedAgentHome, n as generatedAgentHomePath, s as realAgentHome } from "./agent-home-Bq9uFynU.js";
|
|
17
17
|
import fs from "node:fs";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import os from "node:os";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as askAgentApi, r as runAgentApiCli, i as sessionLimitsHelpLines } from "./agent-api-cli-
|
|
1
|
+
export { t as askAgentApi, r as runAgentApiCli, i as sessionLimitsHelpLines } from "./agent-api-cli-ZP54FlHn.js";
|
|
@@ -2,458 +2,11 @@ import { Z as UNIT_STATUSES, et as WhiteboardAgentReply, l as AgentLimitsReply,
|
|
|
2
2
|
import { J as formatSessionLimits, i as agentCommandSpec, m as isAgentApiVerb, rt as parseCommand, t as AGENT_COMMAND_HELP } from "./agent-api-core-BCRpZ3sc.js";
|
|
3
3
|
import { i as resolveHookTarget } from "./hook-relay-core-DA_bz2KA.js";
|
|
4
4
|
import { t as parseJsonOrNull } from "./json-core-If8h-Qgy.js";
|
|
5
|
-
import {
|
|
5
|
+
import { h as layoutBoard, i as describeOverCap, p as boardSvgDocument, v as planSteps } from "./shown-files-core-Dbzn7Pyl.js";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import http from "node:http";
|
|
9
9
|
import { pipeline } from "node:stream";
|
|
10
|
-
//#region shared/whiteboard-svg-core.ts
|
|
11
|
-
var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
12
|
-
var BOX_TEXT_INSET = 12;
|
|
13
|
-
var TITLE_BASELINE = 26;
|
|
14
|
-
var TITLE_LINE_HEIGHT = 20;
|
|
15
|
-
var BODY_LINE_HEIGHT = 18;
|
|
16
|
-
var NOTE_LINE_HEIGHT = 17;
|
|
17
|
-
var MUTED_INDENT = 14;
|
|
18
|
-
var COLUMN_TITLE_LINE_HEIGHT = 16;
|
|
19
|
-
var UNIT_LABEL_BASELINE = 24;
|
|
20
|
-
var UNIT_LABEL_HEIGHT = 18;
|
|
21
|
-
var PLAN_TITLE = "Plan";
|
|
22
|
-
var LINKED_BOARD_TEXT = "open linked board";
|
|
23
|
-
var PORT_RADIUS = 5;
|
|
24
|
-
var BAND_LABEL_BASELINE = 17;
|
|
25
|
-
var LOOP_BADGE_RADIUS = 6;
|
|
26
|
-
var LOOP_BADGE_INSET = 20;
|
|
27
|
-
var DECISION_POINT_INSET = 12;
|
|
28
|
-
var OUTPUT_LABEL_BASELINE_OFFSET = 4;
|
|
29
|
-
var OUTPUT_DOT_RADIUS = 3;
|
|
30
|
-
var MONO_CHAR_WIDTH = 7.2;
|
|
31
|
-
var CODE_BAND_RISE = 13;
|
|
32
|
-
var CODE_BAND_HEIGHT = 17;
|
|
33
|
-
var ITEM_DOT_RADIUS = 2.2;
|
|
34
|
-
var LEGEND_SAMPLE_WIDTH = 28;
|
|
35
|
-
var STANDALONE_STYLE = `
|
|
36
|
-
svg { font-family: 'ComicMono', 'CommitMono', 'Cascadia Code', 'Menlo', monospace; }
|
|
37
|
-
.wb-backdrop { fill: #0d0b16; }
|
|
38
|
-
.wb-column-title { fill: #a79fc4; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
|
|
39
|
-
.wb-column-rule { stroke: #4a4268; stroke-width: 1; stroke-dasharray: 2 5; }
|
|
40
|
-
.wb-band-rule { stroke: #2a2440; stroke-width: 1; }
|
|
41
|
-
.wb-band-label { font-size: 12px; font-weight: 700; }
|
|
42
|
-
.wb-box-outline { fill: #15122a; stroke: #a79fc4; stroke-width: 1.6; }
|
|
43
|
-
.wb-change-added .wb-box-outline { stroke: #22c55e; stroke-dasharray: 7 5; }
|
|
44
|
-
.wb-change-removed { opacity: 0.6; }
|
|
45
|
-
.wb-change-removed .wb-box-outline { fill: transparent; stroke: #ef4444; stroke-dasharray: 7 5; }
|
|
46
|
-
.wb-change-removed .wb-box-title { text-decoration: line-through; }
|
|
47
|
-
.wb-change-relabeled .wb-box-outline { stroke: #f5c26b; }
|
|
48
|
-
.wb-box-was { fill: #a79fc4; font-size: 16px; text-decoration: line-through; }
|
|
49
|
-
.wb-legend-swatch.wb-box-outline { stroke-width: 1.6; }
|
|
50
|
-
.wb-box-title { fill: #e6e0f5; font-size: 16px; font-weight: 700; }
|
|
51
|
-
.wb-box-line { fill: #e6e0f5; font-size: 12px; }
|
|
52
|
-
.wb-box-line.wb-muted { fill: #a79fc4; }
|
|
53
|
-
.wb-line-code { fill: #c4b5fd; }
|
|
54
|
-
.wb-code-band { fill: #221d3a; }
|
|
55
|
-
.wb-line-marker { fill: #a79fc4; font-size: 12px; }
|
|
56
|
-
.wb-line-key { fill: #a79fc4; font-size: 12px; font-weight: 700; }
|
|
57
|
-
.wb-item-dot { fill: #a79fc4; }
|
|
58
|
-
.wb-panel-outline { fill: #110f20; stroke: #4a4268; stroke-width: 1.4; }
|
|
59
|
-
.wb-panel-rule { stroke: #4a4268; stroke-width: 1; }
|
|
60
|
-
.wb-output-divider { stroke: #4a4268; stroke-width: 1; }
|
|
61
|
-
.wb-output-label { fill: #e6e0f5; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
|
|
62
|
-
.wb-output-dot { fill: #a79fc4; }
|
|
63
|
-
.wb-lane-pill { fill: transparent; stroke-width: 1.2; }
|
|
64
|
-
.wb-lane-pill-text { font-size: 12px; font-weight: 700; }
|
|
65
|
-
.wb-unit-outline { fill: #15122a; stroke: #c084fc; stroke-width: 1.6; }
|
|
66
|
-
.wb-unit-label, .wb-unit-link { fill: #c084fc; font-size: 12px; font-weight: 700; }
|
|
67
|
-
.wb-unit-status { fill: #a79fc4; font-size: 11px; }
|
|
68
|
-
.wb-unit-building { fill: #f59e0b; }
|
|
69
|
-
.wb-unit-landed { fill: #22c55e; }
|
|
70
|
-
.wb-frame-outline { fill: rgba(192, 132, 252, 0.04); stroke: #4a4268; stroke-width: 1.4; stroke-dasharray: 10 6; }
|
|
71
|
-
.wb-frame-title { fill: #a79fc4; font-size: 12px; font-weight: 700; }
|
|
72
|
-
.wb-loop .wb-frame-outline { stroke: #c084fc; }
|
|
73
|
-
.wb-loop-badge { fill: none; stroke: #c084fc; stroke-width: 1.6; }
|
|
74
|
-
.wb-back .wb-wire-line { stroke: #c084fc; }
|
|
75
|
-
.wb-wire-hit, .wb-port { display: none; }
|
|
76
|
-
.wb-wire-line { fill: none; stroke: #a79fc4; stroke-width: 1.6; }
|
|
77
|
-
.wb-wire-line.wb-dashed { stroke-dasharray: 7 6; }
|
|
78
|
-
.wb-tone-fail .wb-wire-line { stroke: #ef4444; }
|
|
79
|
-
.wb-tone-join .wb-wire-line { stroke: #c084fc; }
|
|
80
|
-
.wb-wire-dot { fill: #a79fc4; }
|
|
81
|
-
.wb-wire-label { fill: #e6e0f5; font-size: 12px; text-anchor: middle; paint-order: stroke; stroke: #0d0b16; stroke-width: 5; }
|
|
82
|
-
.wb-note-card { fill: #2a2213; stroke: #f5c26b; stroke-width: 1.2; }
|
|
83
|
-
.wb-note-text { fill: #f8e7c4; font-size: 12px; }
|
|
84
|
-
.wb-note-byline { fill: #c9a868; font-size: 12px; }
|
|
85
|
-
.wb-resolved { opacity: 0.5; }
|
|
86
|
-
.wb-legend-text { fill: #a79fc4; font-size: 12px; }
|
|
87
|
-
.wb-caption { fill: #a79fc4; font-size: 14px; }
|
|
88
|
-
`;
|
|
89
|
-
function attributesMarkup(attributes) {
|
|
90
|
-
return Object.entries(attributes).flatMap(([name, value]) => value === null ? [] : [` ${name}="${escapeMarkup(value)}"`]).join("");
|
|
91
|
-
}
|
|
92
|
-
function tag(name, attributes, children = "") {
|
|
93
|
-
return `<${name}${attributesMarkup(attributes)}>${children}</${name}>`;
|
|
94
|
-
}
|
|
95
|
-
function text(content, x, y, className, extra = {}) {
|
|
96
|
-
return tag("text", {
|
|
97
|
-
x,
|
|
98
|
-
y,
|
|
99
|
-
class: className,
|
|
100
|
-
...extra
|
|
101
|
-
}, escapeMarkup(content));
|
|
102
|
-
}
|
|
103
|
-
function elementGroup(element, className, children) {
|
|
104
|
-
return tag("g", {
|
|
105
|
-
class: `wb-element ${className}`,
|
|
106
|
-
"data-element-id": element.id,
|
|
107
|
-
"data-element-kind": element.kind
|
|
108
|
-
}, children.join(""));
|
|
109
|
-
}
|
|
110
|
-
function laneStroke(hex) {
|
|
111
|
-
return hex ? `stroke:${hex}` : null;
|
|
112
|
-
}
|
|
113
|
-
function decisionOutlinePath(box) {
|
|
114
|
-
const right = box.x + box.width;
|
|
115
|
-
const headerMidY = box.y + box.headerHeight / 2;
|
|
116
|
-
const top = `M${box.x + DECISION_POINT_INSET},${box.y} H${right - DECISION_POINT_INSET} L${right},${headerMidY}`;
|
|
117
|
-
if (box.outputs.length === 0) return `${top} L${right - DECISION_POINT_INSET},${box.y + box.height} H${box.x + DECISION_POINT_INSET} L${box.x},${headerMidY} Z`;
|
|
118
|
-
return `${top} V${box.y + box.height} H${box.x} V${headerMidY} Z`;
|
|
119
|
-
}
|
|
120
|
-
function outputRowsMarkup(box) {
|
|
121
|
-
return box.outputs.flatMap((output) => {
|
|
122
|
-
const rowHalfHeight = (box.height - box.headerHeight) / box.outputs.length / 2;
|
|
123
|
-
const rowTop = output.port.y - rowHalfHeight;
|
|
124
|
-
return [
|
|
125
|
-
tag("line", {
|
|
126
|
-
x1: box.x,
|
|
127
|
-
y1: rowTop,
|
|
128
|
-
x2: box.x + box.width,
|
|
129
|
-
y2: rowTop,
|
|
130
|
-
class: "wb-output-divider"
|
|
131
|
-
}),
|
|
132
|
-
text(output.label, box.x + BOX_TEXT_INSET, output.port.y + OUTPUT_LABEL_BASELINE_OFFSET, "wb-output-label"),
|
|
133
|
-
tag("circle", {
|
|
134
|
-
cx: output.port.x,
|
|
135
|
-
cy: output.port.y,
|
|
136
|
-
r: OUTPUT_DOT_RADIUS,
|
|
137
|
-
class: "wb-output-dot"
|
|
138
|
-
})
|
|
139
|
-
];
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
function lineClassOf(line) {
|
|
143
|
-
if (line.style === "code") return "wb-box-line wb-line-code";
|
|
144
|
-
return line.muted ? "wb-box-line wb-muted" : "wb-box-line";
|
|
145
|
-
}
|
|
146
|
-
function lineRowMarkup(line, left, width, baseline) {
|
|
147
|
-
const rowLeft = left + BOX_TEXT_INSET + (line.muted ? MUTED_INDENT : 0);
|
|
148
|
-
const parts = [];
|
|
149
|
-
if (line.style === "code") parts.push(tag("rect", {
|
|
150
|
-
x: rowLeft - 4,
|
|
151
|
-
y: baseline - CODE_BAND_RISE,
|
|
152
|
-
width: left + width - BOX_TEXT_INSET + 4 - rowLeft + 4,
|
|
153
|
-
height: CODE_BAND_HEIGHT,
|
|
154
|
-
rx: 3,
|
|
155
|
-
class: "wb-code-band"
|
|
156
|
-
}));
|
|
157
|
-
if (line.style === "item" && line.isFirstRow) parts.push(tag("circle", {
|
|
158
|
-
cx: rowLeft + 4,
|
|
159
|
-
cy: baseline - 4,
|
|
160
|
-
r: ITEM_DOT_RADIUS,
|
|
161
|
-
class: "wb-item-dot"
|
|
162
|
-
}));
|
|
163
|
-
if (line.marker !== null) parts.push(text(line.marker, rowLeft, baseline, line.style === "kv" ? "wb-line-key" : "wb-line-marker"));
|
|
164
|
-
if (line.text) parts.push(text(line.text, rowLeft + line.indentChars * MONO_CHAR_WIDTH, baseline, lineClassOf(line)));
|
|
165
|
-
return parts;
|
|
166
|
-
}
|
|
167
|
-
function bodyLinesMarkup(lines, left, width, top) {
|
|
168
|
-
return lines.flatMap((line, index) => lineRowMarkup(line, left, width, top + index * BODY_LINE_HEIGHT));
|
|
169
|
-
}
|
|
170
|
-
function panelMarkup(panel) {
|
|
171
|
-
const parts = [tag("rect", {
|
|
172
|
-
x: panel.x,
|
|
173
|
-
y: panel.y,
|
|
174
|
-
width: panel.width,
|
|
175
|
-
height: panel.height,
|
|
176
|
-
rx: 6,
|
|
177
|
-
class: "wb-panel-outline"
|
|
178
|
-
})];
|
|
179
|
-
panel.titleLines.forEach((line, index) => {
|
|
180
|
-
parts.push(text(line, panel.x + BOX_TEXT_INSET, panel.y + TITLE_BASELINE + index * TITLE_LINE_HEIGHT, "wb-box-title"));
|
|
181
|
-
});
|
|
182
|
-
const bodyTop = panel.y + TITLE_BASELINE + panel.titleLines.length * TITLE_LINE_HEIGHT;
|
|
183
|
-
if (panel.bodyLines.length > 0) parts.push(tag("line", {
|
|
184
|
-
x1: panel.x + BOX_TEXT_INSET,
|
|
185
|
-
y1: bodyTop - 12,
|
|
186
|
-
x2: panel.x + panel.width - BOX_TEXT_INSET,
|
|
187
|
-
y2: bodyTop - 12,
|
|
188
|
-
class: "wb-panel-rule"
|
|
189
|
-
}));
|
|
190
|
-
parts.push(...bodyLinesMarkup(panel.bodyLines, panel.x, panel.width, bodyTop));
|
|
191
|
-
return elementGroup(panel, "wb-panel", parts);
|
|
192
|
-
}
|
|
193
|
-
function boxOutlineMarkup(box) {
|
|
194
|
-
if (box.shape === "decision") return tag("path", {
|
|
195
|
-
d: decisionOutlinePath(box),
|
|
196
|
-
class: "wb-box-outline",
|
|
197
|
-
style: laneStroke(box.lane?.hex)
|
|
198
|
-
});
|
|
199
|
-
return tag("rect", {
|
|
200
|
-
x: box.x,
|
|
201
|
-
y: box.y,
|
|
202
|
-
width: box.width,
|
|
203
|
-
height: box.height,
|
|
204
|
-
rx: 8,
|
|
205
|
-
class: "wb-box-outline",
|
|
206
|
-
style: laneStroke(box.lane?.hex)
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
function boxMarkup(box) {
|
|
210
|
-
const parts = [boxOutlineMarkup(box), ...outputRowsMarkup(box)];
|
|
211
|
-
const midX = box.x + box.width / 2;
|
|
212
|
-
const midY = box.y + box.height / 2;
|
|
213
|
-
for (const [cx, cy] of [
|
|
214
|
-
[midX, box.y],
|
|
215
|
-
[box.x + box.width, midY],
|
|
216
|
-
[midX, box.y + box.height],
|
|
217
|
-
[box.x, midY]
|
|
218
|
-
]) parts.push(tag("circle", {
|
|
219
|
-
cx,
|
|
220
|
-
cy,
|
|
221
|
-
r: PORT_RADIUS,
|
|
222
|
-
class: "wb-port"
|
|
223
|
-
}));
|
|
224
|
-
box.wasLines.forEach((line, index) => {
|
|
225
|
-
parts.push(text(line, box.x + BOX_TEXT_INSET, box.y + TITLE_BASELINE + index * TITLE_LINE_HEIGHT, "wb-box-was"));
|
|
226
|
-
});
|
|
227
|
-
const titleTop = box.y + TITLE_BASELINE + box.wasLines.length * TITLE_LINE_HEIGHT;
|
|
228
|
-
box.titleLines.forEach((line, index) => {
|
|
229
|
-
parts.push(text(line, box.x + BOX_TEXT_INSET, titleTop + index * TITLE_LINE_HEIGHT, "wb-box-title"));
|
|
230
|
-
});
|
|
231
|
-
const bodyTop = titleTop + box.titleLines.length * TITLE_LINE_HEIGHT;
|
|
232
|
-
parts.push(...bodyLinesMarkup(box.bodyLines, box.x, box.width, bodyTop));
|
|
233
|
-
if (box.lane && box.showsLanePill) {
|
|
234
|
-
const pillY = box.y + box.headerHeight - 28;
|
|
235
|
-
const pillWidth = Math.min(box.width - 24, 16 + box.lane.label.length * 8);
|
|
236
|
-
parts.push(tag("rect", {
|
|
237
|
-
x: box.x + BOX_TEXT_INSET,
|
|
238
|
-
y: pillY,
|
|
239
|
-
width: pillWidth,
|
|
240
|
-
height: 18,
|
|
241
|
-
rx: 9,
|
|
242
|
-
class: "wb-lane-pill",
|
|
243
|
-
style: laneStroke(box.lane.hex)
|
|
244
|
-
}), text(box.lane.label, box.x + BOX_TEXT_INSET + 8, pillY + 13, "wb-lane-pill-text", { style: `fill:${box.lane.hex}` }));
|
|
245
|
-
}
|
|
246
|
-
return elementGroup(box, box.change === "none" ? "wb-box" : `wb-box wb-change-${box.change}`, parts);
|
|
247
|
-
}
|
|
248
|
-
function loopBadgeMarkup(frame) {
|
|
249
|
-
const centerX = frame.x + frame.width - LOOP_BADGE_INSET;
|
|
250
|
-
const centerY = frame.y + LOOP_BADGE_RADIUS + 6;
|
|
251
|
-
return tag("path", {
|
|
252
|
-
d: `M ${centerX + LOOP_BADGE_RADIUS} ${centerY} A ${LOOP_BADGE_RADIUS} ${LOOP_BADGE_RADIUS} 0 1 1 ${centerX} ${centerY - LOOP_BADGE_RADIUS}`,
|
|
253
|
-
"marker-end": "url(#wb-arrow)",
|
|
254
|
-
class: "wb-loop-badge"
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
function frameMarkup(frame) {
|
|
258
|
-
const parts = [tag("rect", {
|
|
259
|
-
x: frame.x,
|
|
260
|
-
y: frame.y,
|
|
261
|
-
width: frame.width,
|
|
262
|
-
height: frame.height,
|
|
263
|
-
rx: 12,
|
|
264
|
-
class: "wb-frame-outline"
|
|
265
|
-
}), text(frame.title, frame.x + 14, frame.y + 18, "wb-frame-title")];
|
|
266
|
-
if (frame.isLoop) parts.push(loopBadgeMarkup(frame));
|
|
267
|
-
return elementGroup(frame, frame.isLoop ? "wb-frame wb-loop" : "wb-frame", parts);
|
|
268
|
-
}
|
|
269
|
-
function wireMarkup(wire) {
|
|
270
|
-
const parts = [
|
|
271
|
-
tag("path", {
|
|
272
|
-
d: wire.path,
|
|
273
|
-
class: "wb-wire-hit"
|
|
274
|
-
}),
|
|
275
|
-
tag("path", {
|
|
276
|
-
d: wire.path,
|
|
277
|
-
"marker-end": wire.hasArrowhead ? "url(#wb-arrow)" : null,
|
|
278
|
-
class: wire.isDashed ? "wb-wire-line wb-dashed" : "wb-wire-line",
|
|
279
|
-
style: laneStroke(wire.strokeHex ?? void 0)
|
|
280
|
-
}),
|
|
281
|
-
tag("circle", {
|
|
282
|
-
cx: wire.start.x,
|
|
283
|
-
cy: wire.start.y,
|
|
284
|
-
r: 3,
|
|
285
|
-
class: "wb-wire-dot"
|
|
286
|
-
})
|
|
287
|
-
];
|
|
288
|
-
if (wire.joinAt) parts.push(tag("circle", {
|
|
289
|
-
cx: wire.joinAt.x,
|
|
290
|
-
cy: wire.joinAt.y,
|
|
291
|
-
r: 3,
|
|
292
|
-
class: "wb-wire-dot"
|
|
293
|
-
}));
|
|
294
|
-
if (wire.label) parts.push(text(wire.label, wire.labelAt.x, wire.labelAt.y, "wb-wire-label"));
|
|
295
|
-
return elementGroup(wire, wire.isBack ? `wb-wire wb-back wb-tone-${wire.tone}` : `wb-wire wb-tone-${wire.tone}`, parts);
|
|
296
|
-
}
|
|
297
|
-
function noteMarkup(note) {
|
|
298
|
-
const parts = [tag("rect", {
|
|
299
|
-
x: note.x,
|
|
300
|
-
y: note.y,
|
|
301
|
-
width: note.width,
|
|
302
|
-
height: note.height,
|
|
303
|
-
rx: 4,
|
|
304
|
-
class: "wb-note-card"
|
|
305
|
-
})];
|
|
306
|
-
note.lines.forEach((line, index) => {
|
|
307
|
-
parts.push(text(line, note.x + 10, note.y + 22 + index * NOTE_LINE_HEIGHT, "wb-note-text"));
|
|
308
|
-
});
|
|
309
|
-
if (note.byline) parts.push(text(note.byline, note.x + 10, note.y + 22 + note.lines.length * NOTE_LINE_HEIGHT, "wb-note-byline"));
|
|
310
|
-
return elementGroup(note, note.isResolved ? "wb-note wb-resolved" : "wb-note", parts);
|
|
311
|
-
}
|
|
312
|
-
function unitMarkup(unit) {
|
|
313
|
-
const parts = [
|
|
314
|
-
tag("rect", {
|
|
315
|
-
x: unit.x,
|
|
316
|
-
y: unit.y,
|
|
317
|
-
width: unit.width,
|
|
318
|
-
height: unit.height,
|
|
319
|
-
rx: 8,
|
|
320
|
-
class: "wb-unit-outline"
|
|
321
|
-
}),
|
|
322
|
-
text(unit.label, unit.x + BOX_TEXT_INSET, unit.y + UNIT_LABEL_BASELINE, "wb-unit-label"),
|
|
323
|
-
text(unit.status, unit.x + unit.width - BOX_TEXT_INSET, unit.y + UNIT_LABEL_BASELINE, `wb-unit-status wb-unit-${unit.status}`, { "text-anchor": "end" })
|
|
324
|
-
];
|
|
325
|
-
const titleTop = unit.y + UNIT_LABEL_BASELINE + UNIT_LABEL_HEIGHT;
|
|
326
|
-
unit.titleLines.forEach((line, index) => {
|
|
327
|
-
parts.push(text(line, unit.x + BOX_TEXT_INSET, titleTop + index * TITLE_LINE_HEIGHT, "wb-box-title"));
|
|
328
|
-
});
|
|
329
|
-
const bodyTop = titleTop + unit.titleLines.length * TITLE_LINE_HEIGHT;
|
|
330
|
-
parts.push(...bodyLinesMarkup(unit.bodyLines, unit.x, unit.width, bodyTop));
|
|
331
|
-
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 }));
|
|
332
|
-
return elementGroup(unit, "wb-unit", parts);
|
|
333
|
-
}
|
|
334
|
-
function elementMarkup(element) {
|
|
335
|
-
switch (element.kind) {
|
|
336
|
-
case "box": return boxMarkup(element);
|
|
337
|
-
case "frame": return frameMarkup(element);
|
|
338
|
-
case "wire": return wireMarkup(element);
|
|
339
|
-
case "note": return noteMarkup(element);
|
|
340
|
-
case "unit": return unitMarkup(element);
|
|
341
|
-
case "panel": return panelMarkup(element);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
function chromeMarkup(layout) {
|
|
345
|
-
const parts = [];
|
|
346
|
-
if (layout.plan) {
|
|
347
|
-
parts.push(text(PLAN_TITLE, layout.plan.titleAt.x, layout.plan.titleAt.y, "wb-column-title"));
|
|
348
|
-
for (const arrowPath of layout.plan.arrowPaths) parts.push(tag("path", {
|
|
349
|
-
d: arrowPath,
|
|
350
|
-
"marker-end": "url(#wb-arrow)",
|
|
351
|
-
class: "wb-wire-line"
|
|
352
|
-
}));
|
|
353
|
-
}
|
|
354
|
-
for (const band of layout.bands) {
|
|
355
|
-
parts.push(tag("line", {
|
|
356
|
-
x1: band.x,
|
|
357
|
-
y1: band.y,
|
|
358
|
-
x2: band.x + band.width,
|
|
359
|
-
y2: band.y,
|
|
360
|
-
class: "wb-band-rule"
|
|
361
|
-
}));
|
|
362
|
-
if (band.label) parts.push(text(band.label, band.x, band.y + BAND_LABEL_BASELINE, "wb-band-label", { style: `fill:${band.hex}` }));
|
|
363
|
-
}
|
|
364
|
-
for (const column of layout.columns) {
|
|
365
|
-
if (column.titleLines.length === 0) continue;
|
|
366
|
-
column.titleLines.forEach((line, index) => {
|
|
367
|
-
parts.push(text(line, column.x, column.titleBaselineY + index * COLUMN_TITLE_LINE_HEIGHT, "wb-column-title"));
|
|
368
|
-
});
|
|
369
|
-
parts.push(tag("line", {
|
|
370
|
-
x1: column.x,
|
|
371
|
-
y1: column.ruleY,
|
|
372
|
-
x2: column.x + column.width,
|
|
373
|
-
y2: column.ruleY,
|
|
374
|
-
class: "wb-column-rule"
|
|
375
|
-
}));
|
|
376
|
-
}
|
|
377
|
-
for (const entry of layout.legend) parts.push(legendRowMarkup(entry));
|
|
378
|
-
if (layout.caption) parts.push(text(layout.caption.text, layout.caption.x, layout.caption.y + 16, "wb-caption"));
|
|
379
|
-
return tag("g", { class: "wb-chrome" }, parts.join(""));
|
|
380
|
-
}
|
|
381
|
-
function legendSwatchMarkup(entry) {
|
|
382
|
-
const { swatch } = entry;
|
|
383
|
-
if (swatch.kind === "lane") return tag("rect", {
|
|
384
|
-
x: entry.x,
|
|
385
|
-
y: entry.y,
|
|
386
|
-
width: 14,
|
|
387
|
-
height: 14,
|
|
388
|
-
rx: 3,
|
|
389
|
-
class: "wb-legend-swatch",
|
|
390
|
-
style: `fill:${swatch.hex}`
|
|
391
|
-
});
|
|
392
|
-
if (swatch.kind === "change") return tag("g", { class: `wb-change-${swatch.change}` }, tag("rect", {
|
|
393
|
-
x: entry.x,
|
|
394
|
-
y: entry.y,
|
|
395
|
-
width: LEGEND_SAMPLE_WIDTH,
|
|
396
|
-
height: 14,
|
|
397
|
-
rx: 3,
|
|
398
|
-
class: "wb-legend-swatch wb-box-outline"
|
|
399
|
-
}));
|
|
400
|
-
const sample = tag("path", {
|
|
401
|
-
d: `M${entry.x},${entry.y + 7} H${entry.x + LEGEND_SAMPLE_WIDTH}`,
|
|
402
|
-
"marker-end": "url(#wb-arrow)",
|
|
403
|
-
class: swatch.isDashed ? "wb-wire-line wb-dashed" : "wb-wire-line"
|
|
404
|
-
});
|
|
405
|
-
return tag("g", { class: swatch.isBack ? `wb-back wb-tone-${swatch.tone}` : `wb-tone-${swatch.tone}` }, sample);
|
|
406
|
-
}
|
|
407
|
-
function legendRowMarkup(entry) {
|
|
408
|
-
const labelX = entry.x + (entry.swatch.kind === "lane" ? 22 : 40);
|
|
409
|
-
return legendSwatchMarkup(entry) + text(entry.label, labelX, entry.y + 12, "wb-legend-text");
|
|
410
|
-
}
|
|
411
|
-
function arrowDefinitionsMarkup() {
|
|
412
|
-
return tag("defs", {}, tag("marker", {
|
|
413
|
-
id: "wb-arrow",
|
|
414
|
-
viewBox: "0 0 10 10",
|
|
415
|
-
refX: 9,
|
|
416
|
-
refY: 5,
|
|
417
|
-
markerWidth: 8,
|
|
418
|
-
markerHeight: 8,
|
|
419
|
-
orient: "auto-start-reverse"
|
|
420
|
-
}, tag("path", {
|
|
421
|
-
d: "M 0 1 L 10 5 L 0 9 z",
|
|
422
|
-
fill: "context-stroke"
|
|
423
|
-
})));
|
|
424
|
-
}
|
|
425
|
-
var LAYER_ORDER = [
|
|
426
|
-
"frame",
|
|
427
|
-
"wire",
|
|
428
|
-
"box",
|
|
429
|
-
"panel",
|
|
430
|
-
"note",
|
|
431
|
-
"unit"
|
|
432
|
-
];
|
|
433
|
-
function boardSvgDocument(layout) {
|
|
434
|
-
const { x, y, width, height } = layout.bounds;
|
|
435
|
-
const layers = LAYER_ORDER.map((kind) => tag("g", { class: "wb-layer" }, layout.elements.filter((element) => element.kind === kind).map(elementMarkup).join("")));
|
|
436
|
-
const body = [
|
|
437
|
-
tag("style", {}, STANDALONE_STYLE),
|
|
438
|
-
arrowDefinitionsMarkup(),
|
|
439
|
-
tag("rect", {
|
|
440
|
-
x,
|
|
441
|
-
y,
|
|
442
|
-
width,
|
|
443
|
-
height,
|
|
444
|
-
class: "wb-backdrop"
|
|
445
|
-
}),
|
|
446
|
-
chromeMarkup(layout),
|
|
447
|
-
...layers
|
|
448
|
-
].join("");
|
|
449
|
-
return `${tag("svg", {
|
|
450
|
-
xmlns: SVG_NAMESPACE,
|
|
451
|
-
viewBox: `${x} ${y} ${width} ${height}`,
|
|
452
|
-
width,
|
|
453
|
-
height
|
|
454
|
-
}, body)}\n`;
|
|
455
|
-
}
|
|
456
|
-
//#endregion
|
|
457
10
|
//#region server/agent-api-cli.ts
|
|
458
11
|
var AGENT_PATH_PREFIX = "/agent/";
|
|
459
12
|
var HELP_LIMITS_TIMEOUT_MS = 2e3;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as isMissingFileError, r as errorMessage } from "./text-DoirglWV.js";
|
|
2
2
|
import { n as glimmervoidHomeDir } from "./config-path-core-DUWk0Lui.js";
|
|
3
3
|
import { p as writeTextAtomicSync } from "./json-file-AKRVPqG1.js";
|
|
4
|
-
import { a as AGENT_HOME_SOURCES_NAME, d as planAgentHome, i as AGENT_HOME_IN_USE_LOCK_NAME, n as AGENT_HOME_CONFIG_NAME, r as AGENT_HOME_CONFLICTS_NAME, t as AGENT_HOME_BASE_NAME, u as fileStampKey } from "./agent-home-core-
|
|
4
|
+
import { a as AGENT_HOME_SOURCES_NAME, d as planAgentHome, i as AGENT_HOME_IN_USE_LOCK_NAME, n as AGENT_HOME_CONFIG_NAME, r as AGENT_HOME_CONFLICTS_NAME, t as AGENT_HOME_BASE_NAME, u as fileStampKey } from "./agent-home-core-CIw3YqAH.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import fs, { closeSync, mkdirSync, openSync, readdirSync, renameSync, rmSync, unlinkSync } from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
@@ -448,6 +448,14 @@ function prepareAgentHome(profile, options) {
|
|
|
448
448
|
keptPrivateNames.add(step.name);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
+
for (const [name, text] of Object.entries(options.generatedFiles ?? {})) try {
|
|
452
|
+
writeTextAtomicSync(path.join(generatedHome, name), text, {
|
|
453
|
+
mode: GENERATED_FILE_MODE,
|
|
454
|
+
enforceMode: true
|
|
455
|
+
});
|
|
456
|
+
} catch (error) {
|
|
457
|
+
return { refusal: `${path.join(generatedHome, name)} cannot be written: ${errorMessage(error)}` };
|
|
458
|
+
}
|
|
451
459
|
const realHome = realAgentHome(profile, options.env, options.homeDir);
|
|
452
460
|
try {
|
|
453
461
|
writeTextAtomicSync(path.join(generatedHome, AGENT_HOME_SOURCES_NAME), `${JSON.stringify(realFileStamps(realHome), null, 2)}\n`, { mode: GENERATED_FILE_MODE });
|
|
@@ -456,7 +464,7 @@ function prepareAgentHome(profile, options) {
|
|
|
456
464
|
}
|
|
457
465
|
return { home: generatedHome };
|
|
458
466
|
}
|
|
459
|
-
function holdPreparedAgentHome(profile, env, renderBlock) {
|
|
467
|
+
function holdPreparedAgentHome(profile, env, renderBlock, renderGeneratedFiles = () => ({})) {
|
|
460
468
|
const generatedHome = generatedAgentHomePath(profile, env);
|
|
461
469
|
if (path.resolve(realAgentHome(profile, env)) === path.resolve(generatedHome)) return { refusal: `${profile.homeEnvName} already points at the generated home ${generatedHome}` };
|
|
462
470
|
const linkRefusal = agentHomeLinkRefusal(generatedHome);
|
|
@@ -464,7 +472,8 @@ function holdPreparedAgentHome(profile, env, renderBlock) {
|
|
|
464
472
|
holdAgentHome(generatedHome);
|
|
465
473
|
const prepared = prepareAgentHome(profile, {
|
|
466
474
|
env,
|
|
467
|
-
renderBlock
|
|
475
|
+
renderBlock,
|
|
476
|
+
generatedFiles: renderGeneratedFiles()
|
|
468
477
|
});
|
|
469
478
|
if ("refusal" in prepared) releaseAgentHome(generatedHome);
|
|
470
479
|
return prepared;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as buildHookCommand } from "./hook-command-core-
|
|
1
|
+
import { i as KIMI_MCP_CONFIG_NAME, r as KIMI_MCP_BASE_NAME, t as buildHookCommand } from "./hook-command-core-CG5D9iou.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
//#region session/core/agent-home-core.ts
|
|
4
4
|
var BLOCK_START = "# >>> glimmervoid hooks (managed, inert outside Glimmervoid) >>>";
|
|
@@ -294,7 +294,7 @@ function planEntryLink(real, generated, inputs) {
|
|
|
294
294
|
return adoption === "private" ? adoption : [adoption, link];
|
|
295
295
|
}
|
|
296
296
|
function isKeptOutOfLinks(name, inputs) {
|
|
297
|
-
return GENERATED_ONLY_NAMES.has(name) || inputs.profile.isPrivateEntryName(name, inputs.platform);
|
|
297
|
+
return GENERATED_ONLY_NAMES.has(name) || inputs.profile.generatedFileNames.includes(name) || inputs.profile.isPrivateEntryName(name, inputs.platform);
|
|
298
298
|
}
|
|
299
299
|
function planAgentHome(inputs) {
|
|
300
300
|
const config = generatedAgentConfig(inputs);
|
|
@@ -341,6 +341,7 @@ var KIMI_HOME_PROFILE = Object.freeze({
|
|
|
341
341
|
defaultHomeFolderName: ".kimi-code",
|
|
342
342
|
hooksConflict: (operatorText) => definesHooksOutsideArrayTables(operatorText) ? "it defines hooks as a key or [hooks] table, which a [[hooks]] block cannot extend" : null,
|
|
343
343
|
sessionOnlyTablePrefixes: Object.freeze(["[[hooks#"]),
|
|
344
|
+
generatedFileNames: Object.freeze([KIMI_MCP_CONFIG_NAME, KIMI_MCP_BASE_NAME]),
|
|
344
345
|
isPrivateEntryName: () => false
|
|
345
346
|
});
|
|
346
347
|
var CODEX_HOOK_HANDLER_TABLE_HEADER_PATTERN = /^\s*\[(?!\[)\s*hooks\s*(?:\]|\.(?!\s*state\s*[\].]))/;
|
|
@@ -360,6 +361,7 @@ var CODEX_HOME_PROFILE = Object.freeze({
|
|
|
360
361
|
defaultHomeFolderName: ".codex",
|
|
361
362
|
hooksConflict: (operatorText) => definesCodexHooksOutsideArrayTables(operatorText) ? "it defines hooks as a key or a [hooks] table other than [hooks.state], which [[hooks.<event>]] tables cannot extend" : null,
|
|
362
363
|
sessionOnlyTablePrefixes: Object.freeze(["[[hooks.", "[hooks.state."]),
|
|
364
|
+
generatedFileNames: Object.freeze([]),
|
|
363
365
|
isPrivateEntryName: (name, platform) => platform === "win32" && CODEX_SQLITE_NAME_PATTERN.test(name)
|
|
364
366
|
});
|
|
365
367
|
function codexHookTables(hook) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { l as KIMI_HOME_PROFILE } from "./agent-home-core-CIw3YqAH.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as describeAgentHome } from "./agent-home-Bq9uFynU.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as isMissingFileError, r as errorMessage } from "./text-DoirglWV.js";
|
|
2
|
-
import { a as classifyGrokHooksFile, o as renderGrokHooksFile, t as grok } from "./grok-
|
|
2
|
+
import { a as classifyGrokHooksFile, o as renderGrokHooksFile, t as grok } from "./grok-ChYjLvrR.js";
|
|
3
3
|
import { p as writeTextAtomicSync } from "./json-file-AKRVPqG1.js";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as errorMessage } from "./text-DoirglWV.js";
|
|
2
2
|
import { o as relayPath } from "./runtime-paths-CYwF658V.js";
|
|
3
3
|
import { n as isRecord } from "./coerce-oz_Z_6E7.js";
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
4
|
+
import { t as buildHookCommand } from "./hook-command-core-CG5D9iou.js";
|
|
5
|
+
import { t as buildAgentEnv } from "./spawn-env-xtzWf6ru.js";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import os from "node:os";
|