frizz-server 0.15.58 → 0.15.60
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/claude-agent-broker.js +10912 -12022
- package/dist/dev-child.js +13312 -14495
- package/package.json +1 -1
- package/runtime/cc-worker/hooks/session-seed.mjs +1 -1
- package/runtime/cc-worker/lib/frizz-tools.mjs +50 -5
- package/web-dist/assets/{abnfDiagram-VCTEODGH-CwVYWreG.js → abnfDiagram-VCTEODGH-BwQAHYsL.js} +1 -1
- package/web-dist/assets/architecture-7GRP2DOG-DkKf0cZl.js +1 -0
- package/web-dist/assets/{architectureDiagram-5GKGNRK7-DBMWqMOL.js → architectureDiagram-5GKGNRK7-gjqwTfQ1.js} +1 -1
- package/web-dist/assets/{blockDiagram-I7D4REHJ-icLVoZr7.js → blockDiagram-I7D4REHJ-fFMe18t3.js} +1 -1
- package/web-dist/assets/{c4Diagram-7LVT6UL2-X4nLIpue.js → c4Diagram-7LVT6UL2-BEqZdMzx.js} +1 -1
- package/web-dist/assets/channel-Daeelc8v.js +1 -0
- package/web-dist/assets/{chunk-2E4U76K2-CIxXSodE.js → chunk-2E4U76K2-TbSfuA0I.js} +1 -1
- package/web-dist/assets/{chunk-4HAMMTFA-BrX4103a.js → chunk-4HAMMTFA-CVNkWrgU.js} +1 -1
- package/web-dist/assets/{chunk-75Z2AOVW-C_nFjEU2.js → chunk-75Z2AOVW-Dizdh1uU.js} +1 -1
- package/web-dist/assets/{chunk-CLGD4ZFX-Dnwurm7K.js → chunk-CLGD4ZFX-DBrOrKI3.js} +1 -1
- package/web-dist/assets/{chunk-DU6HZSFF-LJ7kdEBt.js → chunk-DU6HZSFF-DjCzKTaE.js} +1 -1
- package/web-dist/assets/{chunk-F27PBJKO-j4G8LUgD.js → chunk-F27PBJKO-VCtsiMCI.js} +1 -1
- package/web-dist/assets/{chunk-GMAD6QVW-DO0F-Its.js → chunk-GMAD6QVW-uzzwIr1d.js} +1 -1
- package/web-dist/assets/{chunk-GVQU2GXP-GVjUdY17.js → chunk-GVQU2GXP-DQH5EZ5s.js} +1 -1
- package/web-dist/assets/{chunk-IMKFNOWR-WLH8YtvM.js → chunk-IMKFNOWR-COkZXqzQ.js} +1 -1
- package/web-dist/assets/{chunk-L3NEJ4N5-DH_LOXD6.js → chunk-L3NEJ4N5-C_q84AOx.js} +1 -1
- package/web-dist/assets/{chunk-OSK3NFVY-B543zWnJ.js → chunk-OSK3NFVY-U6VeVgyM.js} +1 -1
- package/web-dist/assets/{chunk-P2QGCYS3-BI2hUyHo.js → chunk-P2QGCYS3-7wuYNJ3b.js} +1 -1
- package/web-dist/assets/{chunk-POPQ4Y6H-DIMzmwXn.js → chunk-POPQ4Y6H-DxG-N6Oe.js} +1 -1
- package/web-dist/assets/{chunk-PWAF6VOD-DqSYmNTH.js → chunk-PWAF6VOD-BopeAnHr.js} +1 -1
- package/web-dist/assets/{chunk-SHT3W25Y-CauMBoKe.js → chunk-SHT3W25Y-DAfLIYJT.js} +1 -1
- package/web-dist/assets/{chunk-SVP7TREG-BdlERIwe.js → chunk-SVP7TREG-NJUBCeXl.js} +1 -1
- package/web-dist/assets/{chunk-TICWLB2K-DMSHUECl.js → chunk-TICWLB2K-C1rRaKxH.js} +1 -1
- package/web-dist/assets/{chunk-TLUHSLCS-DgCDed4N.js → chunk-TLUHSLCS-DaglE7Ch.js} +2 -2
- package/web-dist/assets/classDiagram-ZZMXUADV-DHw5piuQ.js +1 -0
- package/web-dist/assets/classDiagram-v2-VYDZK3BY-DHw5piuQ.js +1 -0
- package/web-dist/assets/{cynefin-OW5HDTMX-Dvj4ePJ6.js → cynefin-OW5HDTMX-B89A3TDp.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-5FMLGOSQ-BwzNj_vd.js → cynefinDiagram-5FMLGOSQ-DmPIJ48s.js} +1 -1
- package/web-dist/assets/{dagre-GXQ25YYZ-B0y0-0Ch.js → dagre-GXQ25YYZ-BPkCt9-V.js} +1 -1
- package/web-dist/assets/{diagram-S7CK7UJ4-pASx7YvH.js → diagram-S7CK7UJ4-BTN_VTGQ.js} +1 -1
- package/web-dist/assets/{diagram-UQ7AKVKN-saDKrwbT.js → diagram-UQ7AKVKN-DTvxPveF.js} +1 -1
- package/web-dist/assets/{diagram-VSXAHHWV-mWnAoPpv.js → diagram-VSXAHHWV-BfH1hxIh.js} +1 -1
- package/web-dist/assets/{diagram-VX7I27RA-DDixLIUJ.js → diagram-VX7I27RA-BKB1mNd7.js} +1 -1
- package/web-dist/assets/{diagram-Z3DM3KII-Db1PVHrl.js → diagram-Z3DM3KII-Jc86CE2n.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-PWID7BFC-CgV1Jc_u.js → ebnfDiagram-PWID7BFC-DhwMQBQE.js} +1 -1
- package/web-dist/assets/{erDiagram-RLTQ6QDP-B71UcVzi.js → erDiagram-RLTQ6QDP-xZnP9dEA.js} +1 -1
- package/web-dist/assets/eventmodeling-NTZA5JFV-DrRtqwWQ.js +1 -0
- package/web-dist/assets/flowDiagram-HODETNUW-Oc7cmpE3.js +1 -0
- package/web-dist/assets/{ganttDiagram-EL5Y4UJY-CqDomDip.js → ganttDiagram-EL5Y4UJY-C30gGDDk.js} +1 -1
- package/web-dist/assets/{gitGraph-4MIJSDKK-CkhitIKc.js → gitGraph-4MIJSDKK-DQ6JKkWt.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-WWUBYQGX-D_FpZqeI.js → gitGraphDiagram-WWUBYQGX-CODdenHT.js} +1 -1
- package/web-dist/assets/index-DRG5-nXT.js +262 -0
- package/web-dist/assets/index-eeejVGID.css +2 -0
- package/web-dist/assets/{info-A6RAGUB7-CBeAPBzY.js → info-A6RAGUB7-BVM1FcDF.js} +1 -1
- package/web-dist/assets/{infoDiagram-27XIBGKW-IY2xLb1F.js → infoDiagram-27XIBGKW-N9riiSX1.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-5VMMS53U-B9D2fMMz.js → ishikawaDiagram-5VMMS53U-DZo-3Ren.js} +1 -1
- package/web-dist/assets/{journeyDiagram-3NMN7TZE-D_0gZmqP.js → journeyDiagram-3NMN7TZE-DH_xLuG3.js} +1 -1
- package/web-dist/assets/{kanban-definition-UXKFOSKX-DJd6Cc-4.js → kanban-definition-UXKFOSKX-B0jAyaHC.js} +1 -1
- package/web-dist/assets/{line-rKAu1spT.js → line-CmTICjTN.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-BtVMkYgB.js → mermaid-parser.core-C1daiAo7.js} +3 -3
- package/web-dist/assets/{mermaid.core-BgOqjBOZ.js → mermaid.core-DKpwa1E9.js} +3 -3
- package/web-dist/assets/{mindmap-definition-YA3MSWOX-BFSu5K2h.js → mindmap-definition-YA3MSWOX-DTYSSqMy.js} +1 -1
- package/web-dist/assets/{packet-AYTQ26CC-Ba6YwMfl.js → packet-AYTQ26CC-BzOI2NMN.js} +1 -1
- package/web-dist/assets/{pegDiagram-XKGWAZYB-CmVBPWKo.js → pegDiagram-XKGWAZYB-Cc2BVx67.js} +1 -1
- package/web-dist/assets/{pie-WAS4IAKB-BmPa_h83.js → pie-WAS4IAKB-G3kJB69v.js} +1 -1
- package/web-dist/assets/{pieDiagram-E7YTZNPT-Bx-qcq6_.js → pieDiagram-E7YTZNPT-D0ekSraZ.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-AXDQQJYC-wvb56gEJ.js → quadrantDiagram-AXDQQJYC-Cy26pgKX.js} +1 -1
- package/web-dist/assets/{radar-RG4KPBEZ-CKgqdTBT.js → radar-RG4KPBEZ-BgRupjH3.js} +1 -1
- package/web-dist/assets/{railroad-74A4TZTK-BpwP8w7-.js → railroad-74A4TZTK-Dy4w728R.js} +1 -1
- package/web-dist/assets/railroad-abnf-HS5TGJTU-CutbH4o5.js +1 -0
- package/web-dist/assets/railroad-ebnf-LZEXJU2U-CEvKf9AQ.js +1 -0
- package/web-dist/assets/railroad-peg-WCYAUIDC-qd0-kaxB.js +1 -0
- package/web-dist/assets/{railroadDiagram-O6MQD6OU-DjaZaEOP.js → railroadDiagram-O6MQD6OU-BOMyv_XT.js} +1 -1
- package/web-dist/assets/{requirementDiagram-BXWQKSXE-C3RWCoeW.js → requirementDiagram-BXWQKSXE-CSgiwXA6.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-P5KCCOFB-BIPcnQxg.js → sankeyDiagram-P5KCCOFB-G8KOXj9r.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-WJ2MYXX4-BWBL22zo.js → sequenceDiagram-WJ2MYXX4-BHNtCXMK.js} +1 -1
- package/web-dist/assets/{stateDiagram-D77RDMKH-DNpu4FFL.js → stateDiagram-D77RDMKH--2jCbVWi.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-MP3YSRHH-Bt_vgX2P.js +1 -0
- package/web-dist/assets/{swimlanes-42K2YHIH-CnPNdCIT.js → swimlanes-42K2YHIH-CvqTpnzu.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-VR7AAH4N-1m6qrGWm.js +8 -0
- package/web-dist/assets/threadSurfaces-lLUuzbLM.js +141 -0
- package/web-dist/assets/{timeline-definition-24CTP7MA-3-wnd14F.js → timeline-definition-24CTP7MA-DRq0OMa5.js} +1 -1
- package/web-dist/assets/{treeView-Q6P3EWNA-DH8p3siZ.js → treeView-Q6P3EWNA-B0mMNh42.js} +1 -1
- package/web-dist/assets/{treemap-WGGIJYW6-D5B3z-7-.js → treemap-WGGIJYW6-q4XBS_CS.js} +1 -1
- package/web-dist/assets/{vennDiagram-4TSXK5OY-DPkRUzsS.js → vennDiagram-4TSXK5OY-DA73sSwg.js} +1 -1
- package/web-dist/assets/{wardley-WFR3VGLG-ByfcLa16.js → wardley-WFR3VGLG-D96pF1Mc.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-VM6X3IG4-D93-LSQI.js → wardleyDiagram-VM6X3IG4-C_o0hirh.js} +1 -1
- package/web-dist/assets/{xychartDiagram-S5SC5T6Z-KMBe-bGH.js → xychartDiagram-S5SC5T6Z-MJRy2rOZ.js} +1 -1
- package/web-dist/index.html +107 -50
- package/web-dist/assets/architecture-7GRP2DOG-B-3QLW3U.js +0 -1
- package/web-dist/assets/channel-CjStiXsx.js +0 -1
- package/web-dist/assets/classDiagram-ZZMXUADV-vSru66_n.js +0 -1
- package/web-dist/assets/classDiagram-v2-VYDZK3BY-vSru66_n.js +0 -1
- package/web-dist/assets/eventmodeling-NTZA5JFV-HKfqwxIw.js +0 -1
- package/web-dist/assets/flowDiagram-HODETNUW-Cu9vhePt.js +0 -1
- package/web-dist/assets/index-CfY9LkDX.js +0 -246
- package/web-dist/assets/index-DQKT4FDS.css +0 -2
- package/web-dist/assets/railroad-abnf-HS5TGJTU-CZwS3ROk.js +0 -1
- package/web-dist/assets/railroad-ebnf-LZEXJU2U-Ce61Vw1U.js +0 -1
- package/web-dist/assets/railroad-peg-WCYAUIDC-B8CgA3FV.js +0 -1
- package/web-dist/assets/stateDiagram-v2-MP3YSRHH-flVj8eFg.js +0 -1
- package/web-dist/assets/swimlanesDiagram-VR7AAH4N-BgGml0tx.js +0 -8
- package/web-dist/assets/threadSurfaces-B29VyEQW.js +0 -157
package/package.json
CHANGED
|
@@ -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.
|
|
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
|
|
1440
|
-
"
|
|
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
|
|
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",
|
package/web-dist/assets/{abnfDiagram-VCTEODGH-CwVYWreG.js → abnfDiagram-VCTEODGH-BwQAHYsL.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
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};
|