frizz-server 0.15.57 → 0.15.59

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 (98) hide show
  1. package/dist/claude-agent-broker.js +16317 -17283
  2. package/dist/dev-child.js +19286 -20243
  3. package/package.json +1 -1
  4. package/runtime/cc-worker/hooks/session-seed.mjs +1 -1
  5. package/runtime/cc-worker/lib/frizz-tools.mjs +50 -5
  6. package/web-dist/assets/{abnfDiagram-VCTEODGH-W_bnoArq.js → abnfDiagram-VCTEODGH-BwQAHYsL.js} +1 -1
  7. package/web-dist/assets/architecture-7GRP2DOG-DkKf0cZl.js +1 -0
  8. package/web-dist/assets/{architectureDiagram-5GKGNRK7-DejVCzpz.js → architectureDiagram-5GKGNRK7-gjqwTfQ1.js} +1 -1
  9. package/web-dist/assets/{blockDiagram-I7D4REHJ-CaD-ARu1.js → blockDiagram-I7D4REHJ-fFMe18t3.js} +1 -1
  10. package/web-dist/assets/{c4Diagram-7LVT6UL2-DzCRQLh5.js → c4Diagram-7LVT6UL2-BEqZdMzx.js} +1 -1
  11. package/web-dist/assets/channel-Daeelc8v.js +1 -0
  12. package/web-dist/assets/{chunk-2E4U76K2-CdIhAIrZ.js → chunk-2E4U76K2-TbSfuA0I.js} +1 -1
  13. package/web-dist/assets/{chunk-4HAMMTFA-lyUg_xgB.js → chunk-4HAMMTFA-CVNkWrgU.js} +1 -1
  14. package/web-dist/assets/{chunk-75Z2AOVW-CDrvlrbg.js → chunk-75Z2AOVW-Dizdh1uU.js} +1 -1
  15. package/web-dist/assets/{chunk-CLGD4ZFX-CjBfMexU.js → chunk-CLGD4ZFX-DBrOrKI3.js} +1 -1
  16. package/web-dist/assets/{chunk-DU6HZSFF-hbQrm9uQ.js → chunk-DU6HZSFF-DjCzKTaE.js} +1 -1
  17. package/web-dist/assets/{chunk-F27PBJKO-DHMImQTS.js → chunk-F27PBJKO-VCtsiMCI.js} +1 -1
  18. package/web-dist/assets/{chunk-GMAD6QVW-CCCEHpOj.js → chunk-GMAD6QVW-uzzwIr1d.js} +1 -1
  19. package/web-dist/assets/{chunk-GVQU2GXP-B7iRgUZN.js → chunk-GVQU2GXP-DQH5EZ5s.js} +1 -1
  20. package/web-dist/assets/{chunk-IMKFNOWR-DpMiFY7z.js → chunk-IMKFNOWR-COkZXqzQ.js} +1 -1
  21. package/web-dist/assets/{chunk-L3NEJ4N5-BLrmk-7S.js → chunk-L3NEJ4N5-C_q84AOx.js} +1 -1
  22. package/web-dist/assets/{chunk-OSK3NFVY-BTGda7a9.js → chunk-OSK3NFVY-U6VeVgyM.js} +1 -1
  23. package/web-dist/assets/{chunk-P2QGCYS3-Dn-Af5PY.js → chunk-P2QGCYS3-7wuYNJ3b.js} +1 -1
  24. package/web-dist/assets/{chunk-POPQ4Y6H-DkbN_CDj.js → chunk-POPQ4Y6H-DxG-N6Oe.js} +1 -1
  25. package/web-dist/assets/{chunk-PWAF6VOD-wzIjLSn0.js → chunk-PWAF6VOD-BopeAnHr.js} +1 -1
  26. package/web-dist/assets/{chunk-SHT3W25Y-B1bOQh8C.js → chunk-SHT3W25Y-DAfLIYJT.js} +1 -1
  27. package/web-dist/assets/{chunk-SVP7TREG-CPincjGF.js → chunk-SVP7TREG-NJUBCeXl.js} +1 -1
  28. package/web-dist/assets/{chunk-TICWLB2K-qpbRtCfS.js → chunk-TICWLB2K-C1rRaKxH.js} +1 -1
  29. package/web-dist/assets/{chunk-TLUHSLCS-RAg1qELI.js → chunk-TLUHSLCS-DaglE7Ch.js} +2 -2
  30. package/web-dist/assets/classDiagram-ZZMXUADV-DHw5piuQ.js +1 -0
  31. package/web-dist/assets/classDiagram-v2-VYDZK3BY-DHw5piuQ.js +1 -0
  32. package/web-dist/assets/{cynefin-OW5HDTMX-Cit3LYCl.js → cynefin-OW5HDTMX-B89A3TDp.js} +1 -1
  33. package/web-dist/assets/{cynefinDiagram-5FMLGOSQ-VsEB-KVm.js → cynefinDiagram-5FMLGOSQ-DmPIJ48s.js} +1 -1
  34. package/web-dist/assets/{dagre-GXQ25YYZ-DATsuA_V.js → dagre-GXQ25YYZ-BPkCt9-V.js} +1 -1
  35. package/web-dist/assets/{diagram-S7CK7UJ4-C1Pijc4S.js → diagram-S7CK7UJ4-BTN_VTGQ.js} +1 -1
  36. package/web-dist/assets/{diagram-UQ7AKVKN-C0HP2gGl.js → diagram-UQ7AKVKN-DTvxPveF.js} +1 -1
  37. package/web-dist/assets/{diagram-VSXAHHWV-B5jGvz58.js → diagram-VSXAHHWV-BfH1hxIh.js} +1 -1
  38. package/web-dist/assets/{diagram-VX7I27RA-DpAscDGt.js → diagram-VX7I27RA-BKB1mNd7.js} +1 -1
  39. package/web-dist/assets/{diagram-Z3DM3KII-tmBbXNyV.js → diagram-Z3DM3KII-Jc86CE2n.js} +1 -1
  40. package/web-dist/assets/{ebnfDiagram-PWID7BFC-OAjvOJI9.js → ebnfDiagram-PWID7BFC-DhwMQBQE.js} +1 -1
  41. package/web-dist/assets/{erDiagram-RLTQ6QDP-BOXkSzMl.js → erDiagram-RLTQ6QDP-xZnP9dEA.js} +1 -1
  42. package/web-dist/assets/eventmodeling-NTZA5JFV-DrRtqwWQ.js +1 -0
  43. package/web-dist/assets/flowDiagram-HODETNUW-Oc7cmpE3.js +1 -0
  44. package/web-dist/assets/{ganttDiagram-EL5Y4UJY-DBOnIvQO.js → ganttDiagram-EL5Y4UJY-C30gGDDk.js} +1 -1
  45. package/web-dist/assets/{gitGraph-4MIJSDKK-BQ5iIxdU.js → gitGraph-4MIJSDKK-DQ6JKkWt.js} +1 -1
  46. package/web-dist/assets/{gitGraphDiagram-WWUBYQGX-CIuiLvcc.js → gitGraphDiagram-WWUBYQGX-CODdenHT.js} +1 -1
  47. package/web-dist/assets/index-DRG5-nXT.js +262 -0
  48. package/web-dist/assets/index-eeejVGID.css +2 -0
  49. package/web-dist/assets/{info-A6RAGUB7-DWcVDznl.js → info-A6RAGUB7-BVM1FcDF.js} +1 -1
  50. package/web-dist/assets/{infoDiagram-27XIBGKW-GoARvMjy.js → infoDiagram-27XIBGKW-N9riiSX1.js} +1 -1
  51. package/web-dist/assets/{ishikawaDiagram-5VMMS53U-CC_RGosU.js → ishikawaDiagram-5VMMS53U-DZo-3Ren.js} +1 -1
  52. package/web-dist/assets/{journeyDiagram-3NMN7TZE-sLuBhXvM.js → journeyDiagram-3NMN7TZE-DH_xLuG3.js} +1 -1
  53. package/web-dist/assets/{kanban-definition-UXKFOSKX-Dk7gcce1.js → kanban-definition-UXKFOSKX-B0jAyaHC.js} +1 -1
  54. package/web-dist/assets/{line-fy3K3fDE.js → line-CmTICjTN.js} +1 -1
  55. package/web-dist/assets/{mermaid-parser.core-DPqZuKmB.js → mermaid-parser.core-C1daiAo7.js} +3 -3
  56. package/web-dist/assets/{mermaid.core-B5d-0K8M.js → mermaid.core-DKpwa1E9.js} +3 -3
  57. package/web-dist/assets/{mindmap-definition-YA3MSWOX-D2aXjKVN.js → mindmap-definition-YA3MSWOX-DTYSSqMy.js} +1 -1
  58. package/web-dist/assets/{packet-AYTQ26CC-CMuK6cT6.js → packet-AYTQ26CC-BzOI2NMN.js} +1 -1
  59. package/web-dist/assets/{pegDiagram-XKGWAZYB-CY47SjlQ.js → pegDiagram-XKGWAZYB-Cc2BVx67.js} +1 -1
  60. package/web-dist/assets/{pie-WAS4IAKB-BNLjSRXZ.js → pie-WAS4IAKB-G3kJB69v.js} +1 -1
  61. package/web-dist/assets/{pieDiagram-E7YTZNPT-BmpVOs5B.js → pieDiagram-E7YTZNPT-D0ekSraZ.js} +1 -1
  62. package/web-dist/assets/{quadrantDiagram-AXDQQJYC-B13oTEip.js → quadrantDiagram-AXDQQJYC-Cy26pgKX.js} +1 -1
  63. package/web-dist/assets/{radar-RG4KPBEZ-bN5qmK9V.js → radar-RG4KPBEZ-BgRupjH3.js} +1 -1
  64. package/web-dist/assets/{railroad-74A4TZTK-CyiooHlc.js → railroad-74A4TZTK-Dy4w728R.js} +1 -1
  65. package/web-dist/assets/railroad-abnf-HS5TGJTU-CutbH4o5.js +1 -0
  66. package/web-dist/assets/railroad-ebnf-LZEXJU2U-CEvKf9AQ.js +1 -0
  67. package/web-dist/assets/railroad-peg-WCYAUIDC-qd0-kaxB.js +1 -0
  68. package/web-dist/assets/{railroadDiagram-O6MQD6OU-De08-uvL.js → railroadDiagram-O6MQD6OU-BOMyv_XT.js} +1 -1
  69. package/web-dist/assets/{requirementDiagram-BXWQKSXE-BMZJnn5d.js → requirementDiagram-BXWQKSXE-CSgiwXA6.js} +1 -1
  70. package/web-dist/assets/{sankeyDiagram-P5KCCOFB-C-llLLsm.js → sankeyDiagram-P5KCCOFB-G8KOXj9r.js} +1 -1
  71. package/web-dist/assets/{sequenceDiagram-WJ2MYXX4-CYRc9Zn6.js → sequenceDiagram-WJ2MYXX4-BHNtCXMK.js} +1 -1
  72. package/web-dist/assets/{stateDiagram-D77RDMKH-Dub_wGHN.js → stateDiagram-D77RDMKH--2jCbVWi.js} +1 -1
  73. package/web-dist/assets/stateDiagram-v2-MP3YSRHH-Bt_vgX2P.js +1 -0
  74. package/web-dist/assets/{swimlanes-42K2YHIH-C8EPQG3P.js → swimlanes-42K2YHIH-CvqTpnzu.js} +1 -1
  75. package/web-dist/assets/swimlanesDiagram-VR7AAH4N-1m6qrGWm.js +8 -0
  76. package/web-dist/assets/threadSurfaces-lLUuzbLM.js +141 -0
  77. package/web-dist/assets/{timeline-definition-24CTP7MA-BTSts-qg.js → timeline-definition-24CTP7MA-DRq0OMa5.js} +1 -1
  78. package/web-dist/assets/{treeView-Q6P3EWNA-BKTP12az.js → treeView-Q6P3EWNA-B0mMNh42.js} +1 -1
  79. package/web-dist/assets/{treemap-WGGIJYW6-Byig-TnP.js → treemap-WGGIJYW6-q4XBS_CS.js} +1 -1
  80. package/web-dist/assets/{vennDiagram-4TSXK5OY-B3U8tG3A.js → vennDiagram-4TSXK5OY-DA73sSwg.js} +1 -1
  81. package/web-dist/assets/{wardley-WFR3VGLG-_zE1bYYh.js → wardley-WFR3VGLG-D96pF1Mc.js} +1 -1
  82. package/web-dist/assets/{wardleyDiagram-VM6X3IG4-tLYeQSWw.js → wardleyDiagram-VM6X3IG4-C_o0hirh.js} +1 -1
  83. package/web-dist/assets/{xychartDiagram-S5SC5T6Z-CFdeb46c.js → xychartDiagram-S5SC5T6Z-MJRy2rOZ.js} +1 -1
  84. package/web-dist/index.html +107 -50
  85. package/web-dist/assets/architecture-7GRP2DOG-B9aoJyms.js +0 -1
  86. package/web-dist/assets/channel-Ct2Dy5ty.js +0 -1
  87. package/web-dist/assets/classDiagram-ZZMXUADV-BVenfmTU.js +0 -1
  88. package/web-dist/assets/classDiagram-v2-VYDZK3BY-BVenfmTU.js +0 -1
  89. package/web-dist/assets/eventmodeling-NTZA5JFV-wkI1m032.js +0 -1
  90. package/web-dist/assets/flowDiagram-HODETNUW-HbC2CaKg.js +0 -1
  91. package/web-dist/assets/index-CSosNhI2.js +0 -242
  92. package/web-dist/assets/index-DQKT4FDS.css +0 -2
  93. package/web-dist/assets/railroad-abnf-HS5TGJTU-B0LrtHZ4.js +0 -1
  94. package/web-dist/assets/railroad-ebnf-LZEXJU2U-DlJNKIgY.js +0 -1
  95. package/web-dist/assets/railroad-peg-WCYAUIDC-el6f-nfw.js +0 -1
  96. package/web-dist/assets/stateDiagram-v2-MP3YSRHH-r3t2hP9X.js +0 -1
  97. package/web-dist/assets/swimlanesDiagram-VR7AAH4N-DLvogzqY.js +0 -8
  98. package/web-dist/assets/threadSurfaces-C5QJc_me.js +0 -155
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frizz-server",
3
- "version": "0.15.57",
3
+ "version": "0.15.59",
4
4
  "private": false,
5
5
  "description": "Replaceable Frizz server runtime",
6
6
  "license": "MIT",
@@ -71,7 +71,7 @@ const scratch = sid
71
71
  // prompt. Trimmed 2026-08-26 (maintainer: "Definitely trim the session seed hook if it's fully
72
72
  // repetitive") as part of cutting the per-session token overhead Frizz adds over a plain TUI session.
73
73
  const core =
74
- '⟦frizz worker contract⟧ You are a frizz WORKER driving EXACTLY ONE effort. Your FULL operating contract — the end-of-turn signal fences (```done / ```awaiting), the ```question fence that asks the human (a new `id:` registers a question where you write it; an `id:` alone references one you asked before), the scratch-directory rules, the sub-agent rules, the question handback and the stop criterion — lives in your SYSTEM PROMPT; follow it there. ALWAYS SIGN OFF — a fence OR a registration (`frizzctl done`, or a question you ask or reference at this rest, which is the sign-off: rest normally). A rest on running work takes the ```awaiting fence with `status: working|watching|needs_input` — `working` and `watching` are quiet parks and need no write-up.\n' +
74
+ '⟦frizz worker contract⟧ You are a frizz WORKER driving EXACTLY ONE effort. Your FULL operating contract — the end-of-turn signal fences (```done / ```awaiting), the ```question fence that asks the human (a new `id:` registers a question where you write it; an `id:` alone references one you asked before), the scratch-directory rules, the sub-agent rules, the question handback and the stop criterion — lives in your SYSTEM PROMPT; follow it there. SIGN OFF with a fence, a registration (`frizzctl done`, or a question you ask or reference at this rest, which is the sign-off: rest normally), or — when your message is itself what the human needs and nothing is running or to decide — the message alone, with no fence. A rest on running work takes the ```awaiting fence with `status: working|watching|needs_input` — `working` and `watching` are quiet parks and need no write-up.\n' +
75
75
  'SCRATCH DIRECTORY (OPTIONAL): `' + scratch + '` — a folder kept FOR YOU, nothing in it read automatically, never a substitute for doing the work. Give each sub-agent its OWN file rather than a shared one.';
76
76
 
77
77
  const grounding =
@@ -678,7 +678,8 @@ const STEER = {
678
678
  "The thread to message: its slug (`fix-queue-focus`), or any link naming it — the " +
679
679
  "`[title](/thread/<slug>)` link `frizzctl spawn-thread` prints, or a full board URL such as " +
680
680
  "`http://localhost:9393/project/frizz/thread/<slug>`, whose `/project/<slug>/` also " +
681
- "names the thread's project.",
681
+ "names the thread's project. Not its title: a name is refused, sending nothing, with the " +
682
+ "threads it matches (`frizzctl threads --find <words>` searches the same way).",
682
683
  },
683
684
  project: {
684
685
  type: "string",
@@ -1068,6 +1069,11 @@ const THREADS = {
1068
1069
  "USE IT BEFORE YOU DUPLICATE SOMEONE'S WORK, AND TO FIND WHO TO TELL. Another thread may already be on " +
1069
1070
  "the bug you just found, or waiting on the commit you just landed; the slug in the first column is " +
1070
1071
  "what `frizzctl steer` takes (with `--project` for a thread on another board).\n\n" +
1072
+ "FIND ONE BY ITS NAME WITH `--find`. Told about a thread by name (\"tell the releaser\", \"the resolver " +
1073
+ "cache thread\"), search for it: `frizzctl threads --find releaser`. It looks at every project this Frizz " +
1074
+ "has open and every band, Done included, matching each word against the start of a word in the title " +
1075
+ "the human sees, the slug, and the other names it has had, best match first. The slug comes from the " +
1076
+ "thread's first prompt and never changes, so it often reads nothing like the name.\n\n" +
1071
1077
  "`--json` prints the whole listing — every field, ISO timestamps — for `jq`. It only reads: nothing is " +
1072
1078
  "changed, and no thread is woken by being listed.",
1073
1079
  inputSchema: {
@@ -1080,6 +1086,12 @@ const THREADS = {
1080
1086
  "into that board. Omitted ⇒ your own project.",
1081
1087
  },
1082
1088
  all: { type: "boolean", description: "Also list the Done band — every archived thread, newest first." },
1089
+ find: {
1090
+ type: "string",
1091
+ description:
1092
+ "Words from a thread's name (`releaser`, `resolver cache`): list the threads they match on EVERY " +
1093
+ "project and in every band, Done included, instead of one board. Not combined with `project` or `all`.",
1094
+ },
1083
1095
  json: { type: "boolean", description: "Print the listing as JSON instead of text." },
1084
1096
  },
1085
1097
  required: [],
@@ -1170,6 +1182,14 @@ async function steer(args) {
1170
1182
  async function threads(args) {
1171
1183
  const raw = typeof args.project === "string" ? args.project.trim() : ""
1172
1184
  const project = raw ? decodeURIComponent(PROJECT_SEGMENT.exec(raw)?.[1] ?? raw) : ""
1185
+ const find = typeof args.find === "string" ? args.find.trim() : ""
1186
+ if (find) {
1187
+ if (project || args.all === true) throw new Error("`--find` already searches every project and every band, Done included; drop `--project` and `--all`")
1188
+ const found = (await callRpc("findThreads", { query: find }))?.result
1189
+ if (!Array.isArray(found?.matches)) throw new Error(`findThreads returned no matches: ${JSON.stringify(found)?.slice(0, 300)}`)
1190
+ if (args.json === true) return JSON.stringify(found, null, 2)
1191
+ return foundReport(found, { caller: process.env.FRIZZ_THREAD_SLUG || process.env.FRIZZ_THREAD || "", nowMs: Date.now() })
1192
+ }
1173
1193
  const result = (await callRpc("listThreads", { ...(project ? { project } : {}), ...(args.all === true ? { all: true } : {}) }))?.result
1174
1194
  if (!result?.project || !Array.isArray(result.threads) || !result.counts) {
1175
1195
  throw new Error(`listThreads returned no listing: ${JSON.stringify(result)?.slice(0, 300)}`)
@@ -1268,6 +1288,31 @@ function threadsReport(result, { caller, all, nowMs }) {
1268
1288
  return `${head}\n\n${blocks.join("\n\n")}\n\n${steerHint} \`--json\` prints every field.`
1269
1289
  }
1270
1290
 
1291
+ /** The `--find` readout: the matches, best first, each with its project and band and the facts a listing row
1292
+ * carries. @param {any} found @param {{ caller: string, nowMs: number }} opts */
1293
+ function foundReport(found, { caller, nowMs }) {
1294
+ const boards = plural(found.projects, "project")
1295
+ if (found.matches.length === 0) {
1296
+ return `No thread on ${boards} has a name matching “${found.query}”, in any band. \`frizzctl threads --all\` lists one ` +
1297
+ "board's threads, Done included, if the name the human used is not one the thread has."
1298
+ }
1299
+ const shown = found.total > found.matches.length ? `the best ${found.matches.length} of ${found.total} threads` : plural(found.total, "thread")
1300
+ const own = projectSegment()
1301
+ const lines = found.matches.map((/** @type {any} */ t) => {
1302
+ const here = t.project.id === own
1303
+ const where = [here ? "this project" : `project \`${t.project.slug}\``, t.band, here && t.slug === caller ? "this thread" : "", t.pinned ? "pinned" : ""]
1304
+ const out = [` ${t.slug} ${t.title} (${where.filter(Boolean).join(", ")})`]
1305
+ if (t.matchedName) out.push(` matched its other name «${t.matchedName}»`)
1306
+ const facts = threadFacts(t, nowMs)
1307
+ if (facts) out.push(` ${facts}`)
1308
+ if (t.lastLine) out.push(` > ${t.lastLine.replace(/\s+/g, " ").slice(0, 160)}`)
1309
+ return out.join("\n")
1310
+ })
1311
+ const verb = found.total === 1 ? "matches" : "match"
1312
+ return `${shown[0].toUpperCase()}${shown.slice(1)} on ${boards} ${verb} “${found.query}”, best first:\n\n${lines.join("\n")}\n\n` +
1313
+ "Message one with `frizzctl steer <slug>`, adding `--project <slug>` for a thread on another project. `--json` prints every field."
1314
+ }
1315
+
1271
1316
  /** @param {Record<string, unknown>} args @returns {Promise<string>} */
1272
1317
  async function link(args) {
1273
1318
  const label = typeof args.label === "string" ? args.label.trim() : ""
@@ -1436,8 +1481,8 @@ async function activity() {
1436
1481
  return (
1437
1482
  "Nothing is running on this thread — no background shells, no sub-agents, no armed timers, no " +
1438
1483
  "registered PRs, and no open questions.\n\nSo there is nothing to wait on: an ```awaiting fence " +
1439
- "would have nothing to name, and a fence naming nothing is not a park. End with ```done, or " +
1440
- "ask a ```question if you need the human." + linksBlock
1484
+ "would have nothing to name. End finished work with ```done, ask a ```question if you need the " +
1485
+ "human's decision, or rest on your reply with no fence if your message is what they need." + linksBlock
1441
1486
  )
1442
1487
  }
1443
1488
  const lines = items.map((i) => {
@@ -2840,9 +2885,9 @@ const CLI = {
2840
2885
  },
2841
2886
  threads: {
2842
2887
  group: "Other threads",
2843
- summary: "List a project's threads: each one's slug, title and where it sits on the board",
2888
+ summary: "List a project's threads, or find one by name on every project: slug, title and where it sits",
2844
2889
  positional: ["project"],
2845
- examples: ["frizzctl threads", "frizzctl threads nub", "frizzctl threads --all --json"],
2890
+ examples: ["frizzctl threads", "frizzctl threads nub", "frizzctl threads --all --json", "frizzctl threads --find releaser"],
2846
2891
  },
2847
2892
  steer: {
2848
2893
  group: "Other threads",
@@ -1 +1 @@
1
- import{m as e,t}from"./mermaid-parser.core-DPqZuKmB.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-C4XfhTaE.js";import"./chunk-DU6HZSFF-hbQrm9uQ.js";import"./chunk-CLGD4ZFX-CjBfMexU.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-CPincjGF.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.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-C1daiAo7.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-C4XfhTaE.js";import"./chunk-DU6HZSFF-DjCzKTaE.js";import"./chunk-CLGD4ZFX-DBrOrKI3.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-NJUBCeXl.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.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};
@@ -0,0 +1 @@
1
+ import"./chunk-FOHPRMQF-CyTuVbu3.js";import{M as e}from"./mermaid-parser.core-C1daiAo7.js";export{e as createArchitectureServices};