@davidbalzan/groundwork-console 0.1.13 → 0.1.14

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 (94) hide show
  1. package/dist/bus.js +4 -4
  2. package/dist/gitinfo.js +31 -17
  3. package/package.json +5 -4
  4. package/public/assets/{abnfDiagram-N423BO3Z-2g9UHdfw.js → abnfDiagram-N423BO3Z-BSvB33qO.js} +1 -1
  5. package/public/assets/{arc-EEINoaIY.js → arc-zFmco7vQ.js} +1 -1
  6. package/public/assets/architecture-TIHT7OUA-BQFAhsKM.js +1 -0
  7. package/public/assets/{architectureDiagram-T3A2C74G-D4F9rIiu.js → architectureDiagram-T3A2C74G-Dq8B7QSd.js} +1 -1
  8. package/public/assets/{blockDiagram-VBNYF7ZC-CQZAhVXz.js → blockDiagram-VBNYF7ZC-Dyx-2MxL.js} +1 -1
  9. package/public/assets/{c4Diagram-5PPSVZJV-BlBzSIXs.js → c4Diagram-5PPSVZJV-BcQgTpcV.js} +1 -1
  10. package/public/assets/channel-BBOBumsc.js +1 -0
  11. package/public/assets/{chunk-2GRJ4B5K-ZVZxINuZ.js → chunk-2GRJ4B5K-0LJiHhVt.js} +1 -1
  12. package/public/assets/{chunk-4I5QYGJK-8hqVPXHL.js → chunk-4I5QYGJK-DU9jcgy8.js} +1 -1
  13. package/public/assets/{chunk-5RXB4S5H-D1s6L_89.js → chunk-5RXB4S5H-Dbb9fQEh.js} +1 -1
  14. package/public/assets/{chunk-6Q2QTUOP-BWLeyKxS.js → chunk-6Q2QTUOP-BEP7PF5q.js} +1 -1
  15. package/public/assets/{chunk-7Z6QIM7H-DjvOr6wh.js → chunk-7Z6QIM7H-BDULl8ao.js} +1 -1
  16. package/public/assets/{chunk-GF5L2VYU-BCFrJAqb.js → chunk-GF5L2VYU-CKmEMSg9.js} +1 -1
  17. package/public/assets/{chunk-I66GZJ75-XdTCBJhL.js → chunk-I66GZJ75-C8VZHfLH.js} +1 -1
  18. package/public/assets/{chunk-JQJVKLGR-BwEUHZBv.js → chunk-JQJVKLGR-DM2yoV15.js} +1 -1
  19. package/public/assets/{chunk-KBJHAD2P-HjBUqR8F.js → chunk-KBJHAD2P-BRAKI2QY.js} +1 -1
  20. package/public/assets/{chunk-NSK5VX7P-DkHwHrKE.js → chunk-NSK5VX7P-DV7uo6bZ.js} +1 -1
  21. package/public/assets/{chunk-QR6OTTB3-DF1_EWFH.js → chunk-QR6OTTB3-CIKpM1Nr.js} +1 -1
  22. package/public/assets/{chunk-RYQCIY6F-BaBhRLGF.js → chunk-RYQCIY6F-DrSpjyPL.js} +1 -1
  23. package/public/assets/{chunk-UBXNYLIW-BNV3VrZA.js → chunk-UBXNYLIW-CKJQ1y-l.js} +1 -1
  24. package/public/assets/{chunk-W5SLKNZC-5ymyg6B_.js → chunk-W5SLKNZC-BrvtgZ7x.js} +1 -1
  25. package/public/assets/{chunk-WRU74C26-oznLCI2s.js → chunk-WRU74C26-D5OxzQZ_.js} +1 -1
  26. package/public/assets/{chunk-XXDRQBXY-sauNIYLc.js → chunk-XXDRQBXY-B7N0mEcW.js} +1 -1
  27. package/public/assets/classDiagram-JCYQIIEL-g9vVH4Bz.js +1 -0
  28. package/public/assets/classDiagram-v2-OCEON4UE-g9vVH4Bz.js +1 -0
  29. package/public/assets/{cose-bilkent-JH36ORCC-B0A4Je-o.js → cose-bilkent-JH36ORCC-B4AeOPAc.js} +1 -1
  30. package/public/assets/{cynefin-VYW2F7L2-BtmksekA.js → cynefin-VYW2F7L2-DzOwlGVY.js} +1 -1
  31. package/public/assets/{cynefinDiagram-MW4NZA55-DxlB0XWy.js → cynefinDiagram-MW4NZA55-SA4aXkpc.js} +1 -1
  32. package/public/assets/{dagre-VZM6K2ZE-BwX2jQEP.js → dagre-VZM6K2ZE-C5ltS5m2.js} +1 -1
  33. package/public/assets/{diagram-7IWD3JNH-CRw4eKmV.js → diagram-7IWD3JNH-TU7uqjDX.js} +1 -1
  34. package/public/assets/{diagram-B4RE2ZJO-BhSHl_HC.js → diagram-B4RE2ZJO-HCe8Z_RD.js} +1 -1
  35. package/public/assets/{diagram-LBJQPF4R-BLNDbOa-.js → diagram-LBJQPF4R-9kRxXqkG.js} +1 -1
  36. package/public/assets/{diagram-Q27KOJAE-OI-WVr2z.js → diagram-Q27KOJAE-DfLFPFvB.js} +1 -1
  37. package/public/assets/{diagram-UB23O5K3-Dw4v-DRV.js → diagram-UB23O5K3-BUpWSI8L.js} +1 -1
  38. package/public/assets/{dist-CkCHUIyI.js → dist-By9Jxne0.js} +1 -1
  39. package/public/assets/{ebnfDiagram-BXEA7PRR-_CCtytYQ.js → ebnfDiagram-BXEA7PRR-Dz83w-0Y.js} +1 -1
  40. package/public/assets/{erDiagram-JOGREHBK-DPwktZ67.js → erDiagram-JOGREHBK-DHZjXCza.js} +1 -1
  41. package/public/assets/eventmodeling-45OFAUF4-UQEvaa-G.js +1 -0
  42. package/public/assets/flowDiagram-UKHOOZJN-D3oCUrRO.js +1 -0
  43. package/public/assets/{ganttDiagram-PKOTCBZU-ChHOAX0R.js → ganttDiagram-PKOTCBZU-B3tcBB-9.js} +1 -1
  44. package/public/assets/{gitGraph-TEB2WS4Q-DTKjAplS.js → gitGraph-TEB2WS4Q-BQKfiZNh.js} +1 -1
  45. package/public/assets/{gitGraphDiagram-DS77QQ5N-CetQtIP1.js → gitGraphDiagram-DS77QQ5N-BM480xTb.js} +1 -1
  46. package/public/assets/{index-CMeHHiB8.js → index-Crr1PM3T.js} +4 -4
  47. package/public/assets/{info-DKCQHKI2-CEZZoshL.js → info-DKCQHKI2-DW33_uuk.js} +1 -1
  48. package/public/assets/{infoDiagram-6WML65LV-Dn0Ci1fh.js → infoDiagram-6WML65LV-BeewbX8V.js} +1 -1
  49. package/public/assets/{ishikawaDiagram-WSZJBQD7-C0yvCWyv.js → ishikawaDiagram-WSZJBQD7-DcWSwP2B.js} +1 -1
  50. package/public/assets/{journeyDiagram-NVQOT4AX-CpTSt3oh.js → journeyDiagram-NVQOT4AX-BxT4Ea_S.js} +1 -1
  51. package/public/assets/{kanban-definition-27J2QSJJ-Co4MhtWb.js → kanban-definition-27J2QSJJ-CEvqnKgz.js} +1 -1
  52. package/public/assets/{line-CKdpDvRy.js → line-DrJMZj-O.js} +1 -1
  53. package/public/assets/{linear-BAY9SBNB.js → linear-cUeO7N7d.js} +1 -1
  54. package/public/assets/{mermaid-parser.core-B-yKcreq.js → mermaid-parser.core-CIHTTkEa.js} +3 -3
  55. package/public/assets/{mermaid.core-CW_jKbCL.js → mermaid.core-Cc5OhPpa.js} +4 -4
  56. package/public/assets/{mindmap-definition-FAOFIHXS-CejNgzQn.js → mindmap-definition-FAOFIHXS-DsHkrrK_.js} +1 -1
  57. package/public/assets/{packet-7NZHBO7P-B53cyWv4.js → packet-7NZHBO7P-C_T3uLvX.js} +1 -1
  58. package/public/assets/{pegDiagram-VL7TDLO6-DAh-rohm.js → pegDiagram-VL7TDLO6-CBdlvXSc.js} +1 -1
  59. package/public/assets/{pie-RZYD4A2V-Bbl6CzP-.js → pie-RZYD4A2V-CpetmYJU.js} +1 -1
  60. package/public/assets/{pieDiagram-7S7Q4E2Y-BoiaUX85.js → pieDiagram-7S7Q4E2Y-CT3wi9zO.js} +1 -1
  61. package/public/assets/{quadrantDiagram-CIZ2JOQS-2EgkGrDN.js → quadrantDiagram-CIZ2JOQS-Vuywai3l.js} +1 -1
  62. package/public/assets/{radar-I7S5WNFK-1Piyk_Oc.js → radar-I7S5WNFK-rNDTWylh.js} +1 -1
  63. package/public/assets/{railroad-3IZDKUUU-DcQG7hTA.js → railroad-3IZDKUUU-B09wa8N5.js} +1 -1
  64. package/public/assets/railroad-abnf-AHOZXSZD-DPdRoDGL.js +1 -0
  65. package/public/assets/railroad-ebnf-EBAXGLYW-BWVVmeh0.js +1 -0
  66. package/public/assets/railroad-peg-LSFZ7HO6-CFlw0fDo.js +1 -0
  67. package/public/assets/{railroadDiagram-AXF67PYL-kPPDLWet.js → railroadDiagram-AXF67PYL-DxwqeTls.js} +1 -1
  68. package/public/assets/{requirementDiagram-LRYGKXZP-B0wNE6wF.js → requirementDiagram-LRYGKXZP-UGxNbVIj.js} +1 -1
  69. package/public/assets/{sankeyDiagram-W5VNT64P-CyKEUx9w.js → sankeyDiagram-W5VNT64P-DpR73q2C.js} +1 -1
  70. package/public/assets/{sequenceDiagram-SI44F4Z6-DT7UmiRF.js → sequenceDiagram-SI44F4Z6-xvxxzFmu.js} +1 -1
  71. package/public/assets/{src-EbLSa_z9.js → src-eh414mKr.js} +1 -1
  72. package/public/assets/{stateDiagram-OKZ733FA-BNk8YOH4.js → stateDiagram-OKZ733FA-Cqt3c052.js} +1 -1
  73. package/public/assets/stateDiagram-v2-UEYNNEHI-toMIf4-z.js +1 -0
  74. package/public/assets/{swimlanes-SLNWSIFB-B7eUL04h.js → swimlanes-SLNWSIFB-BJknsAAA.js} +1 -1
  75. package/public/assets/swimlanesDiagram-ULZ7WXOC-BF4o5mrv.js +8 -0
  76. package/public/assets/{timeline-definition-Z64GVDOM-CDLh-h94.js → timeline-definition-Z64GVDOM-Dkcqv4tL.js} +1 -1
  77. package/public/assets/{treeView-QDETBFTQ-BAscBSG9.js → treeView-QDETBFTQ-C1uzwCFh.js} +1 -1
  78. package/public/assets/{treemap-6X3UGDF4-B2ahLgfF.js → treemap-6X3UGDF4-C59GIx2E.js} +1 -1
  79. package/public/assets/{vennDiagram-T6HMQDX7-62WQ_264.js → vennDiagram-T6HMQDX7-Cd3Zvctp.js} +1 -1
  80. package/public/assets/{wardley-OPB4EBWU-DUrXideD.js → wardley-OPB4EBWU-D3P85e8V.js} +1 -1
  81. package/public/assets/{wardleyDiagram-T6FBY63Y-Ci4DF612.js → wardleyDiagram-T6FBY63Y-BLX8xtsj.js} +1 -1
  82. package/public/assets/{xychartDiagram-ELKLHX3M-D--O5thj.js → xychartDiagram-ELKLHX3M-CUfF0x4C.js} +1 -1
  83. package/public/index.html +1 -1
  84. package/public/assets/architecture-TIHT7OUA-CFm6TN4T.js +0 -1
  85. package/public/assets/channel-CHLtdsMA.js +0 -1
  86. package/public/assets/classDiagram-JCYQIIEL-Wf8lPn9O.js +0 -1
  87. package/public/assets/classDiagram-v2-OCEON4UE-Wf8lPn9O.js +0 -1
  88. package/public/assets/eventmodeling-45OFAUF4-COOjM2XZ.js +0 -1
  89. package/public/assets/flowDiagram-UKHOOZJN-ipIqOWay.js +0 -1
  90. package/public/assets/railroad-abnf-AHOZXSZD-CaviTNom.js +0 -1
  91. package/public/assets/railroad-ebnf-EBAXGLYW-K7l-WN0j.js +0 -1
  92. package/public/assets/railroad-peg-LSFZ7HO6-Bu22X3mO.js +0 -1
  93. package/public/assets/stateDiagram-v2-UEYNNEHI-8Oafa2Rm.js +0 -1
  94. package/public/assets/swimlanesDiagram-ULZ7WXOC-BT5Ebr7W.js +0 -8
package/dist/bus.js CHANGED
@@ -22,8 +22,8 @@ const tailJsonl = (p, limit) => {
22
22
  /* Thresholds are judgement, not measurement, and are stated here rather than buried: "producing"
23
23
  is the working cadence, and >8h is the shape of an overnight stall. The 2h boundary exists
24
24
  because the previous model put a coffee break and a seventeen-hour stall in one bucket. */
25
- const PRODUCING_MS = 2 * 3_600_000;
26
- const STALLED_MS = 8 * 3_600_000;
25
+ const EMITTING_MS = 2 * 3_600_000;
26
+ const SILENT_MS = 8 * 3_600_000;
27
27
  const SCAN_LINES = 4000;
28
28
  /** Newest emission per agent, from the room logs and the status stream. */
29
29
  export function outputIndex(root, scanLines = SCAN_LINES) {
@@ -60,9 +60,9 @@ export function outputIndex(root, scanLines = SCAN_LINES) {
60
60
  so a caller can tell the two apart. Collapsing them would be the same defect one level down. */
61
61
  const progressOf = (hit, now, scanLines) => {
62
62
  if (!hit)
63
- return { lastOutputAt: null, ageMs: null, state: "unknown", basis: null, scannedLines: scanLines };
63
+ return { lastOutputAt: null, ageMs: null, state: "unknown", basis: null, scannedLines: scanLines, measures: "bus-emissions" };
64
64
  const ageMs = now - hit.ts;
65
- return { lastOutputAt: hit.ts, ageMs, state: ageMs < PRODUCING_MS ? "producing" : ageMs < STALLED_MS ? "quiet" : "stalled", basis: hit.basis, scannedLines: scanLines };
65
+ return { lastOutputAt: hit.ts, ageMs, state: ageMs < EMITTING_MS ? "emitting" : ageMs < SILENT_MS ? "quiet-on-bus" : "silent-on-bus", basis: hit.basis, scannedLines: scanLines, measures: "bus-emissions" };
66
66
  };
67
67
  /* Reachability buckets. `idle` used to span 15 MINUTES to 24 HOURS, so a coffee break and an
68
68
  overnight stall rendered identically; `dormant` splits that. */
package/dist/gitinfo.js CHANGED
@@ -3,6 +3,7 @@ import { execFile } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import { existsSync } from "node:fs";
5
5
  import path from "node:path";
6
+ import { refsIn, refsMatch } from "@davidbalzan/groundwork-seam";
6
7
  const run = promisify(execFile);
7
8
  async function git(cwd, args) { try {
8
9
  const r = await run("git", args, { cwd, maxBuffer: 8 << 20 });
@@ -150,35 +151,48 @@ async function ghPrs(projectPath) {
150
151
 
151
152
  Same defect the kit found in queue-done-loop the same afternoon: a ref MENTIONED in a row is a
152
153
  different fact from the ref that IDENTIFIES it. */
153
- export const prCellNumber = (cell) => {
154
- const m = /#(\d+)\b/.exec(cell ?? "");
155
- return m ? Number(m[1]) : null;
156
- };
157
- /* `owner/name` from a remote URL, ssh or https. null when there is no origin — in which case the
158
- repo check below is SKIPPED rather than guessed, and matching falls back to the pr cell alone. */
154
+ /* `owner/name` from a remote URL, ssh or https. null when there is no origin. */
159
155
  export const slugFromRemoteUrl = (url) => {
160
156
  const m = url ? /(?:[:/])([^/:]+\/[^/]+?)(?:\.git)?$/.exec(url.trim()) : null;
161
157
  return m ? m[1] : null;
162
158
  };
163
159
  const originSlug = async (projectPath) => slugFromRemoteUrl(await git(projectPath, ["remote", "get-url", "origin"]));
164
- /* A row's repo, when it states one. Boards legitimately carry several repos the kit's own board
165
- lists `kit#11` beside console PRs so a bare number is ambiguous across them. Only rows that
166
- name a DIFFERENT repo are rejected; a row with no repo cell is accepted, because absence is not
167
- a claim. */
160
+ /* The ref a board row is ABOUT: its `pr` CELL, qualified by its `repo` CELL when it has one.
161
+ Never a `#ref` occurring anywhere else in the row a Status reading "blocked by #39" used to
162
+ make that row answer for PR 39, and `find` returns the first hit, so a mention beat the row that
163
+ actually was that PR.
164
+
165
+ Ref parsing and comparison now come from the seam (0.1.8) instead of the local pair this file
166
+ used to carry. That pair was a re-derivation of a primitive the seam did not yet export; it does
167
+ now, and keeping our own would be a fifth matcher of the class the kit spent a day removing.
168
+
169
+ ONE DELIBERATE BEHAVIOUR CHANGE, adopted rather than worked around: with NO origin remote
170
+ (`contextRepo` null) and a row that names a repo, the local version ACCEPTED — it could not
171
+ establish a difference, so it declined to assert one. `refsMatch` returns false: an unresolvable
172
+ tie is not a tie. The seam's direction is the conservative one for this caller too — showing no
173
+ merge gate is better than showing another repo's — so the console takes the primitive's
174
+ semantics rather than keeping a private exception. */
175
+ const rowRef = (row) => {
176
+ const cell = (row.pr ?? "").trim();
177
+ const repo = (row.repo ?? "").trim();
178
+ /* Qualify with the repo column only when the cell is not ALREADY qualified. The test is a `/`,
179
+ not a `#`: an earlier draft checked for `#` and every pr cell contains one, so qualification
180
+ silently never happened and a cross-repo collision resolved to the first row. Caught by the
181
+ two-repos fixture, which is why that fixture exists. */
182
+ const [ref] = refsIn(repo && !cell.includes("/") ? `${repo}#${cell.replace(/^#/, "")}` : cell);
183
+ return ref ?? null;
184
+ };
168
185
  /* The gate a board reports for PR `n` in THIS repo, or undefined. Exported and used by
169
186
  gitBranches directly, so the test exercises this function rather than a copy of it — a test that
170
187
  re-implements the matcher pins the fixture, not the code. */
171
188
  export const gateForPr = (rows, n, slug) => {
172
- const row = rows?.find((r) => prCellNumber(r.pr) === n && repoMatches(r.repo, slug));
189
+ const [target] = refsIn(slug ? `${slug}#${n}` : `#${n}`);
190
+ if (!target)
191
+ return undefined;
192
+ const row = rows?.find((r) => { const ref = rowRef(r); return ref ? refsMatch(target, ref, { contextRepo: slug }) : false; });
173
193
  const qa = row?.mergeGate ?? row?.status;
174
194
  return qa ? String(qa) : undefined;
175
195
  };
176
- export const repoMatches = (rowRepo, slug) => {
177
- const cell = (rowRepo ?? "").trim();
178
- if (!cell || !slug)
179
- return true;
180
- return cell === slug || cell.endsWith(`/${slug.split("/").pop()}`) || slug.endsWith(`/${cell}`) || cell === slug.split("/").pop();
181
- };
182
196
  export function gitBranches(projectPath, hints = {}) {
183
197
  return cached(`branches:${projectPath}:${(hints.agentIds ?? []).join(",")}`, async () => {
184
198
  const defaultBranch = "main";
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@davidbalzan/groundwork-console",
3
3
  "private": false,
4
- "version": "0.1.13",
4
+ "version": "0.1.14",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@davidbalzan/groundwork-seam": "0.1.7",
7
+ "@davidbalzan/groundwork-seam": "0.1.8",
8
8
  "@hono/node-server": "^2.1.1",
9
9
  "@modelcontextprotocol/sdk": "^1.30.0",
10
10
  "hono": "^4.13.2",
@@ -48,11 +48,12 @@
48
48
  "publish-check": "node scripts/publish-check.mjs",
49
49
  "test:inject": "tsx test/inject.test.mts",
50
50
  "test:skills": "tsx test/skills.test.mts",
51
- "test": "pnpm run test:inject && pnpm run test:skills && pnpm run test:board && pnpm run test:panes && pnpm run test:seam-contract && pnpm run test:prref && pnpm run test:progress",
51
+ "test": "pnpm run test:inject && pnpm run test:skills && pnpm run test:board && pnpm run test:panes && pnpm run test:seam-contract && pnpm run test:prref && pnpm run test:progress && pnpm run test:publish-check",
52
52
  "test:board": "tsx test/board.test.mts",
53
53
  "test:panes": "tsx test/panes.test.mts",
54
54
  "test:seam-contract": "tsx test/seam-contract.test.mts",
55
55
  "test:prref": "tsx test/prref.test.mts",
56
- "test:progress": "tsx test/progress.test.mts"
56
+ "test:progress": "tsx test/progress.test.mts",
57
+ "test:publish-check": "tsx test/publish-check.test.mts"
57
58
  }
58
59
  }
@@ -1 +1 @@
1
- import{m as e,t}from"./mermaid-parser.core-B-yKcreq.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-EbLSa_z9.js";import"./chunk-I66GZJ75-XdTCBJhL.js";import{n as i,r as a,t as o}from"./chunk-6Q2QTUOP-BWLeyKxS.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-CW_jKbCL.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
+ import{m as e,t}from"./mermaid-parser.core-CIHTTkEa.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-eh414mKr.js";import"./chunk-I66GZJ75-C8VZHfLH.js";import{n as i,r as a,t as o}from"./chunk-6Q2QTUOP-BEP7PF5q.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-Cc5OhPpa.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-CkCHUIyI.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};
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-By9Jxne0.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-CIHTTkEa.js";export{e as createArchitectureServices};