@davidbalzan/groundwork-console 0.1.8 → 0.1.11
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/bus.js +1 -1
- package/dist/provision.js +20 -8
- package/dist/server.js +1 -1
- package/dist/tmux.js +2 -2
- package/package.json +1 -1
- package/public/assets/{abnfDiagram-N423BO3Z-oco1yJr8.js → abnfDiagram-N423BO3Z-SmC0YbkZ.js} +1 -1
- package/public/assets/{arc-D-FYRBZ0.js → arc-Bwss940w.js} +1 -1
- package/public/assets/architecture-TIHT7OUA-DxbIc2EO.js +1 -0
- package/public/assets/{architectureDiagram-T3A2C74G-CIG6iOMV.js → architectureDiagram-T3A2C74G-Cq88dj_x.js} +1 -1
- package/public/assets/{blockDiagram-VBNYF7ZC-B6dDKm7d.js → blockDiagram-VBNYF7ZC-Cr4QI7D6.js} +1 -1
- package/public/assets/{c4Diagram-5PPSVZJV-Y3UQgn94.js → c4Diagram-5PPSVZJV-C1C4eJIx.js} +1 -1
- package/public/assets/channel-q2MiI2jw.js +1 -0
- package/public/assets/{chunk-2GRJ4B5K-BoWCLegZ.js → chunk-2GRJ4B5K-Cpp7ECx6.js} +1 -1
- package/public/assets/{chunk-4I5QYGJK-DZTRMmZG.js → chunk-4I5QYGJK-Bps2fbU8.js} +1 -1
- package/public/assets/{chunk-5RXB4S5H-Dw1IdYaS.js → chunk-5RXB4S5H-3UxSwRGQ.js} +1 -1
- package/public/assets/{chunk-6Q2QTUOP-nWUr6zuz.js → chunk-6Q2QTUOP-zawcmdf9.js} +1 -1
- package/public/assets/{chunk-7Z6QIM7H-DxXQZe2t.js → chunk-7Z6QIM7H-Dc0octNy.js} +1 -1
- package/public/assets/{chunk-GF5L2VYU-DbHTRiGa.js → chunk-GF5L2VYU-RHui1NJm.js} +1 -1
- package/public/assets/{chunk-I66GZJ75-C97VIOWu.js → chunk-I66GZJ75-BlHb3oSv.js} +1 -1
- package/public/assets/{chunk-JQJVKLGR-CeOq7ul_.js → chunk-JQJVKLGR-WIlvhJ6X.js} +1 -1
- package/public/assets/{chunk-KBJHAD2P-D_xgFhfD.js → chunk-KBJHAD2P-Dr1rLwdT.js} +1 -1
- package/public/assets/{chunk-NSK5VX7P-DjNVQuCo.js → chunk-NSK5VX7P-B07rzjwZ.js} +1 -1
- package/public/assets/{chunk-QR6OTTB3-CGPHl8Ev.js → chunk-QR6OTTB3-ComyizSZ.js} +1 -1
- package/public/assets/{chunk-RYQCIY6F-Ca_NSSUq.js → chunk-RYQCIY6F-k_etiI3Q.js} +1 -1
- package/public/assets/{chunk-UBXNYLIW-BH4KEg7B.js → chunk-UBXNYLIW-DldfSHAq.js} +1 -1
- package/public/assets/{chunk-W5SLKNZC-CzSVKrQX.js → chunk-W5SLKNZC-Dn5B1pXH.js} +1 -1
- package/public/assets/{chunk-WRU74C26--qTXNfid.js → chunk-WRU74C26-D34jYzyt.js} +1 -1
- package/public/assets/{chunk-XXDRQBXY-0XJhmQM-.js → chunk-XXDRQBXY-BQXENxTm.js} +1 -1
- package/public/assets/classDiagram-JCYQIIEL-BBCC64Pk.js +1 -0
- package/public/assets/classDiagram-v2-OCEON4UE-BBCC64Pk.js +1 -0
- package/public/assets/{cose-bilkent-JH36ORCC-CeMP2vk-.js → cose-bilkent-JH36ORCC-CPGou1DN.js} +1 -1
- package/public/assets/{cynefin-VYW2F7L2-NtSbHkFO.js → cynefin-VYW2F7L2-DOI3jeNv.js} +1 -1
- package/public/assets/{cynefinDiagram-MW4NZA55-B4uWxM0-.js → cynefinDiagram-MW4NZA55-DoW8nM2s.js} +1 -1
- package/public/assets/{dagre-VZM6K2ZE-C8wHGLeh.js → dagre-VZM6K2ZE-Dq8ZHjT7.js} +1 -1
- package/public/assets/{diagram-7IWD3JNH-DKe15FkE.js → diagram-7IWD3JNH-3FSn8Agr.js} +1 -1
- package/public/assets/{diagram-B4RE2ZJO-B-pgDq0Z.js → diagram-B4RE2ZJO-BnXqbr3I.js} +1 -1
- package/public/assets/{diagram-LBJQPF4R-16bhvJKB.js → diagram-LBJQPF4R-B9WLcX1P.js} +1 -1
- package/public/assets/{diagram-Q27KOJAE-BuzXd81m.js → diagram-Q27KOJAE-Cqc0NnFi.js} +1 -1
- package/public/assets/{diagram-UB23O5K3-CZzMkkP7.js → diagram-UB23O5K3-D3DVcxz0.js} +1 -1
- package/public/assets/{dist-DoiwlY9_.js → dist-D9Nkbm8B.js} +1 -1
- package/public/assets/{ebnfDiagram-BXEA7PRR-BGUXNic-.js → ebnfDiagram-BXEA7PRR-FHf_rewb.js} +1 -1
- package/public/assets/{erDiagram-JOGREHBK--mo3pLi7.js → erDiagram-JOGREHBK-CvPTNoqX.js} +1 -1
- package/public/assets/eventmodeling-45OFAUF4-B3k39kpe.js +1 -0
- package/public/assets/flowDiagram-UKHOOZJN-J20LnFn0.js +1 -0
- package/public/assets/{ganttDiagram-PKOTCBZU-DbHv-Q1F.js → ganttDiagram-PKOTCBZU-DWUBSW9B.js} +1 -1
- package/public/assets/{gitGraph-TEB2WS4Q-CU8msIuE.js → gitGraph-TEB2WS4Q-CjymOfrj.js} +1 -1
- package/public/assets/{gitGraphDiagram-DS77QQ5N-CmVui6qG.js → gitGraphDiagram-DS77QQ5N-BZa0uJBE.js} +1 -1
- package/public/assets/index-C40rGsvd.css +2 -0
- package/public/assets/index-CS6PrVvt.js +41 -0
- package/public/assets/{info-DKCQHKI2-CcA5kzgP.js → info-DKCQHKI2-DugyQgAo.js} +1 -1
- package/public/assets/{infoDiagram-6WML65LV-Drd9lSSV.js → infoDiagram-6WML65LV-DGlBHx3m.js} +1 -1
- package/public/assets/{ishikawaDiagram-WSZJBQD7-CcnlbfwE.js → ishikawaDiagram-WSZJBQD7-BbqOG9Eg.js} +1 -1
- package/public/assets/{journeyDiagram-NVQOT4AX-CYcWG8V9.js → journeyDiagram-NVQOT4AX-Du3qH9mS.js} +1 -1
- package/public/assets/{kanban-definition-27J2QSJJ-Ca5F0ySI.js → kanban-definition-27J2QSJJ-CdVgOFzk.js} +1 -1
- package/public/assets/{line-BFnVTMoX.js → line-CvLqalqu.js} +1 -1
- package/public/assets/{linear-BVUPf0HH.js → linear-ChXKEHCZ.js} +1 -1
- package/public/assets/{mermaid-parser.core-BXY3JF8d.js → mermaid-parser.core-C7RowpcN.js} +3 -3
- package/public/assets/{mermaid.core-DqjaFy6t.js → mermaid.core-U0Q7d-gI.js} +4 -4
- package/public/assets/{mindmap-definition-FAOFIHXS-m3-vScki.js → mindmap-definition-FAOFIHXS-Dd8IqZN3.js} +1 -1
- package/public/assets/{packet-7NZHBO7P-BTm7636C.js → packet-7NZHBO7P-rnlOmuHK.js} +1 -1
- package/public/assets/{pegDiagram-VL7TDLO6-C3kirtKa.js → pegDiagram-VL7TDLO6-C61XZFPE.js} +1 -1
- package/public/assets/{pie-RZYD4A2V-BsF__qFU.js → pie-RZYD4A2V-BosRLnUR.js} +1 -1
- package/public/assets/{pieDiagram-7S7Q4E2Y-YEbSx31D.js → pieDiagram-7S7Q4E2Y-C066dHaW.js} +1 -1
- package/public/assets/{quadrantDiagram-CIZ2JOQS-qY1c3Wr-.js → quadrantDiagram-CIZ2JOQS-BiL2JG5p.js} +1 -1
- package/public/assets/{radar-I7S5WNFK-BaQRhfKS.js → radar-I7S5WNFK-VRvamsSS.js} +1 -1
- package/public/assets/{railroad-3IZDKUUU-C4riB9xs.js → railroad-3IZDKUUU-_8QphIQF.js} +1 -1
- package/public/assets/railroad-abnf-AHOZXSZD-ySvBeK5p.js +1 -0
- package/public/assets/railroad-ebnf-EBAXGLYW-B08LkBeL.js +1 -0
- package/public/assets/railroad-peg-LSFZ7HO6-CnEVYMxD.js +1 -0
- package/public/assets/{railroadDiagram-AXF67PYL-BDXHJJin.js → railroadDiagram-AXF67PYL-BO0K2FSG.js} +1 -1
- package/public/assets/{requirementDiagram-LRYGKXZP-5N_4nQH3.js → requirementDiagram-LRYGKXZP-Cs5N-_5S.js} +1 -1
- package/public/assets/{sankeyDiagram-W5VNT64P-C0zqsu_g.js → sankeyDiagram-W5VNT64P-BBadz3Xa.js} +1 -1
- package/public/assets/{sequenceDiagram-SI44F4Z6-DonYJ8_h.js → sequenceDiagram-SI44F4Z6-B1wwHKdi.js} +1 -1
- package/public/assets/{src-D5IewQLB.js → src-rNJ0obFg.js} +1 -1
- package/public/assets/{stateDiagram-OKZ733FA-CEY8i14f.js → stateDiagram-OKZ733FA-D2BPoAkk.js} +1 -1
- package/public/assets/stateDiagram-v2-UEYNNEHI-CsMDmX-c.js +1 -0
- package/public/assets/{swimlanes-SLNWSIFB-BBKzhZ8g.js → swimlanes-SLNWSIFB-CJw_VUg-.js} +1 -1
- package/public/assets/swimlanesDiagram-ULZ7WXOC-D83SR1DB.js +8 -0
- package/public/assets/{timeline-definition-Z64GVDOM-RI7P7P5y.js → timeline-definition-Z64GVDOM-8uI7Mh2Y.js} +1 -1
- package/public/assets/{treeView-QDETBFTQ-Bpw_kGf5.js → treeView-QDETBFTQ-DX9MBPTO.js} +1 -1
- package/public/assets/{treemap-6X3UGDF4-Deq82US6.js → treemap-6X3UGDF4-DqOdI7Cz.js} +1 -1
- package/public/assets/{vennDiagram-T6HMQDX7-DetRcU6h.js → vennDiagram-T6HMQDX7-Dv3hlyhI.js} +1 -1
- package/public/assets/{wardley-OPB4EBWU-Iwt8nlFq.js → wardley-OPB4EBWU-BlsdtYE0.js} +1 -1
- package/public/assets/{wardleyDiagram-T6FBY63Y-iVT5tLSy.js → wardleyDiagram-T6FBY63Y-8UP_r-p8.js} +1 -1
- package/public/assets/{xychartDiagram-ELKLHX3M-B7_cZ8Wg.js → xychartDiagram-ELKLHX3M-CqKePl1c.js} +1 -1
- package/public/index.html +2 -2
- package/public/assets/architecture-TIHT7OUA-bBJswTmy.js +0 -1
- package/public/assets/channel-BeJg4QSq.js +0 -1
- package/public/assets/classDiagram-JCYQIIEL-B6RcDz49.js +0 -1
- package/public/assets/classDiagram-v2-OCEON4UE-B6RcDz49.js +0 -1
- package/public/assets/eventmodeling-45OFAUF4-Bv0pQfuo.js +0 -1
- package/public/assets/flowDiagram-UKHOOZJN-cF6VTIV-.js +0 -1
- package/public/assets/index-BZBf_g4s.css +0 -2
- package/public/assets/index-CJ73bGme.js +0 -41
- package/public/assets/railroad-abnf-AHOZXSZD-CBcG7kXE.js +0 -1
- package/public/assets/railroad-ebnf-EBAXGLYW-EqgxHSrX.js +0 -1
- package/public/assets/railroad-peg-LSFZ7HO6-C5-qxTK4.js +0 -1
- package/public/assets/stateDiagram-v2-UEYNNEHI-C13FXtls.js +0 -1
- package/public/assets/swimlanesDiagram-ULZ7WXOC-D0VKK_TP.js +0 -8
package/dist/bus.js
CHANGED
|
@@ -33,7 +33,7 @@ export async function agentsAsync(root) {
|
|
|
33
33
|
const paneActivity = ct === undefined || ct === null ? windowActivity : ct || null; // 0 = seeded, no change observed yet → treated as unknown, not as "now"
|
|
34
34
|
const lastSeen = Math.max(a.lastSeen ?? 0, paneActivity ?? 0);
|
|
35
35
|
const age = lastSeen ? Date.now() - lastSeen : Infinity;
|
|
36
|
-
return { ...a, paneActivity, windowActivity, paneCommand: pane?.command ?? null, paneAlive: pane ? !pane.dead : null, lastSeen: lastSeen || null, heartbeatAgeMs: Number.isFinite(age) ? age : null, liveness: age < 15 * 60_000 ? "live" : age < 24 * 3_600_000 ? "idle" : "dead", active: paneActivity ? Date.now() - paneActivity < 60_000 : false };
|
|
36
|
+
return { ...a, paneActivity, windowActivity, windowName: pane?.windowName ?? null, paneCommand: pane?.command ?? null, paneAlive: pane ? !pane.dead : null, lastSeen: lastSeen || null, heartbeatAgeMs: Number.isFinite(age) ? age : null, liveness: age < 15 * 60_000 ? "live" : age < 24 * 3_600_000 ? "idle" : "dead", active: paneActivity ? Date.now() - paneActivity < 60_000 : false };
|
|
37
37
|
}).sort((a, b) => (b.lastSeen ?? 0) - (a.lastSeen ?? 0));
|
|
38
38
|
}
|
|
39
39
|
export const agents = agentsSync;
|
package/dist/provision.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
/* Spawn an agent into tmux, the playbook way (coord-claude-layout.sh pattern):
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/* Spawn an agent into tmux, the playbook way (coord-claude-layout.sh pattern), one WINDOW PER ROLE (contract 2026-08-22, amended 11:46):
|
|
2
|
+
singleton roles (coordinator/aide/qa/ci/audit) each get a named window `<project>-<role>`; all workers share `<project>-workers` (split + tiled).
|
|
3
|
+
Window reuse only when its panes are OURS (pane titles all `<project>-…`); a foreign window with a matching name is REFUSED, never adopted.
|
|
4
|
+
Empty windows need no bookkeeping: remain-on-exit is never set, so tmux closes a window natively when its last pane dies.
|
|
5
|
+
Pane flow unchanged: new pane cd'd to the repo → launch harness → wait → inject `<skill> --id=<agentId> [--lane]` + `/color` → wait for registration.
|
|
6
|
+
This IS a side effect (processes + keystrokes into a pane the console just created). It never types into an existing agent's pane.
|
|
7
|
+
Pre-contract `fleet-<project>` windows are tolerated read-only — spawns go to the new scheme only. */
|
|
4
8
|
import { execFile } from "node:child_process";
|
|
5
9
|
import { promisify } from "node:util";
|
|
6
10
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -12,17 +16,25 @@ export const HARNESS_CMD = { claude: "claude --dangerously-skip-permissions", gr
|
|
|
12
16
|
export const ROLE_SKILL = { coordinator: "/coordinator", worker: "/coord-worker", qa: "/coord-qa", ci: "/coord-ci", aide: "/coord-aide", audit: "/coord-audit" };
|
|
13
17
|
export const ROLE_COLOR = { coordinator: "green", aide: "pink", qa: "yellow", ci: "orange", worker: "blue", audit: "magenta" };
|
|
14
18
|
const CLAUDE_HARNESS_ONLY = new Set(["claude"]); // /color and slash-skills are Claude Code; other harnesses get the skill text as a plain instruction
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
/** Window name for a role: workers share one window, singleton roles get their own (exact scheme `<project>-<role>` / `<project>-workers` — cross-fleet contract, no owner infix). */
|
|
20
|
+
export const roleWindowName = (project, role) => (role === "worker" ? `${project}-workers` : `${project}-${role}`);
|
|
21
|
+
async function roleWindow(project, role, startDir, log) {
|
|
22
|
+
const win = roleWindowName(project, role);
|
|
17
23
|
const wins = (await tmux("list-windows", "-a", "-F", "#{session_name}:#{window_index}\t#{window_name}")).split("\n").filter(Boolean).map((l) => l.split("\t"));
|
|
18
24
|
const hit = wins.find(([, name]) => name === win);
|
|
19
25
|
if (hit) {
|
|
20
|
-
|
|
26
|
+
// Ownership check before reuse: every pane title in the window must be one of OUR agent ids (`<project>-…`) — pane titles are set at spawn.
|
|
27
|
+
// A name-collision with panes we did not title (someone's manual window, another tool) is REFUSED, never adopted (contract amendment 11:46).
|
|
28
|
+
const titles = (await tmux("list-panes", "-t", hit[0], "-F", "#{pane_title}")).split("\n").filter(Boolean);
|
|
29
|
+
const ours = titles.every((t) => t.startsWith(`${project}-`));
|
|
30
|
+
if (!ours)
|
|
31
|
+
throw new Error(`window "${win}" (${hit[0]}) exists but its panes are not this fleet's (titles: ${titles.join(", ") || "none"}) — rename or close it, then respawn`);
|
|
32
|
+
log(`window ${win} exists (${hit[0]}) — ${role === "worker" ? "splitting another worker pane into it" : `reusing for a second ${role} spawn (split)`}`);
|
|
21
33
|
return { target: hit[0], freshPane: null };
|
|
22
34
|
}
|
|
23
35
|
const session = (await tmux("list-sessions", "-F", "#{session_name}")).split("\n")[0];
|
|
24
36
|
const pane = await tmux("new-window", "-d", "-t", `${session}:`, "-n", win, "-c", startDir, "-P", "-F", "#{pane_id}");
|
|
25
|
-
log(`created window ${win} in session ${session} (first pane ${pane} reused for the first agent — no spare shell)`);
|
|
37
|
+
log(`created window ${win} in session ${session} (first pane ${pane} reused for the first agent — no spare shell; closes natively with its last pane)`);
|
|
26
38
|
return { target: `${session}:${win}`, freshPane: pane };
|
|
27
39
|
}
|
|
28
40
|
const PROMPT_GLYPH = { claude: /^\s*[❯>]\s?/, grok: /^\s*[❯>›]\s?/, codex: /^\s*[❯>›]\s?/, opencode: /^\s*[❯>›]\s?/ };
|
|
@@ -56,7 +68,7 @@ export async function spawnAgent(req, isRegistered, log, isAttached = () => true
|
|
|
56
68
|
throw new Error(`${req.agentId} is already registered on the bus`);
|
|
57
69
|
if (!existsSync(req.repoPath))
|
|
58
70
|
throw new Error("repo path missing");
|
|
59
|
-
const { target, freshPane } = await
|
|
71
|
+
const { target, freshPane } = await roleWindow(req.project, req.role, req.repoPath, log);
|
|
60
72
|
// reuse the fresh window's first pane; otherwise split and tile so N agents fit
|
|
61
73
|
const paneId = freshPane ?? await tmux("split-window", "-t", target, "-c", req.repoPath, "-P", "-F", "#{pane_id}");
|
|
62
74
|
if (!freshPane)
|
package/dist/server.js
CHANGED
|
@@ -1038,7 +1038,7 @@ app.get("/bus/panes", async (c) => {
|
|
|
1038
1038
|
const all = await agentsAsync(cfg.coordDir);
|
|
1039
1039
|
const scoped = all.filter((a) => a.pane && a.liveness !== "dead" && (!p || a.project === p.name || (p.room && a.project === p.room)));
|
|
1040
1040
|
const colors = c.req.query("colors") === "1";
|
|
1041
|
-
const out = await Promise.all(scoped.map(async (a) => ({ agentId: a.agentId, role: a.role ?? null, project: a.project ?? null, pane: a.pane, command: a.paneCommand, active: a.active, paneActivity: a.paneActivity, liveness: a.liveness, capture: await capturePane(a.pane, lines, colors) })));
|
|
1041
|
+
const out = await Promise.all(scoped.map(async (a) => ({ agentId: a.agentId, role: a.role ?? null, project: a.project ?? null, pane: a.pane, windowName: a.windowName ?? null, command: a.paneCommand, active: a.active, paneActivity: a.paneActivity, liveness: a.liveness, capture: await capturePane(a.pane, lines, colors) })));
|
|
1042
1042
|
return c.json(out);
|
|
1043
1043
|
});
|
|
1044
1044
|
/* Pane viewer: read-only capture of an agent's tmux pane (never sends keys). */
|
package/dist/tmux.js
CHANGED
|
@@ -7,8 +7,8 @@ export async function listPanes(ttlMs = 3_000) {
|
|
|
7
7
|
if (Date.now() - cache.at < ttlMs)
|
|
8
8
|
return cache.panes;
|
|
9
9
|
try {
|
|
10
|
-
const { stdout } = await run("tmux", ["list-panes", "-a", "-F", "#{pane_id}\t#{session_name}:#{window_index}.#{pane_index}\t#{window_activity}\t#{pane_current_command}\t#{pane_dead}"], { timeout: 3_000 });
|
|
11
|
-
cache = { at: Date.now(), panes: stdout.split("\n").filter(Boolean).map((l) => { const [paneId, target, act, command, dead] = l.split("\t"); return { paneId, target, activityTs: Number(act) * 1000, command, dead: dead === "1" }; }) };
|
|
10
|
+
const { stdout } = await run("tmux", ["list-panes", "-a", "-F", "#{pane_id}\t#{session_name}:#{window_index}.#{pane_index}\t#{window_name}\t#{window_activity}\t#{pane_current_command}\t#{pane_dead}"], { timeout: 3_000 });
|
|
11
|
+
cache = { at: Date.now(), panes: stdout.split("\n").filter(Boolean).map((l) => { const [paneId, target, windowName, act, command, dead] = l.split("\t"); return { paneId, target, windowName, activityTs: Number(act) * 1000, command, dead: dead === "1" }; }) };
|
|
12
12
|
}
|
|
13
13
|
catch {
|
|
14
14
|
cache = { at: Date.now(), panes: [] };
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-C7RowpcN.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-rNJ0obFg.js";import"./chunk-I66GZJ75-BlHb3oSv.js";import{n as i,r as a,t as o}from"./chunk-6Q2QTUOP-zawcmdf9.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-U0Q7d-gI.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./path-fybaL0A-.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-
|
|
1
|
+
import{n as e,t}from"./path-fybaL0A-.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-D9Nkbm8B.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i){if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,h,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,n(H.y11,H.x11),n(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,m,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,n(H.y11,H.x11),n(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-KEIR6QF5-BICK3FdT.js";import{M as e}from"./mermaid-parser.core-C7RowpcN.js";export{e as createArchitectureServices};
|