frizz-server 0.15.16 → 0.15.17

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 (99) hide show
  1. package/dist/dev-child.js +1254 -779
  2. package/package.json +1 -1
  3. package/runtime/cc-worker/bin/frizz-mcp.mjs +66 -1
  4. package/web-dist/assets/{abnfDiagram-VRR7QNED-DjpPWj1n.js → abnfDiagram-VRR7QNED-BCWz80uN.js} +1 -1
  5. package/web-dist/assets/{arc-GGQPeqIn.js → arc-DDtkTWyk.js} +1 -1
  6. package/web-dist/assets/architecture-TIHT7OUA-BSM-tgTt.js +1 -0
  7. package/web-dist/assets/{architectureDiagram-ZJ3FMSHR-i9N18wLs.js → architectureDiagram-ZJ3FMSHR-BpRbm_s5.js} +1 -1
  8. package/web-dist/assets/{blockDiagram-677ZJIJ3-CIc5kmW3.js → blockDiagram-677ZJIJ3-_kGtJSW2.js} +1 -1
  9. package/web-dist/assets/{c4Diagram-LMCZKHZV-DjUgY_rv.js → c4Diagram-LMCZKHZV-D8XwDoiY.js} +1 -1
  10. package/web-dist/assets/channel-BwwaRyUv.js +1 -0
  11. package/web-dist/assets/{chunk-32BRIVSS-DdVPbS2L.js → chunk-32BRIVSS-BUGbBNz_.js} +1 -1
  12. package/web-dist/assets/{chunk-52WLFC77-k-avutEL.js → chunk-52WLFC77-Dc0eyYJe.js} +1 -1
  13. package/web-dist/assets/{chunk-C7G6YPKG-jMdA6WRB.js → chunk-C7G6YPKG-CNP8apQ_.js} +1 -1
  14. package/web-dist/assets/{chunk-EX3LRPZG-DPQFUeFc.js → chunk-EX3LRPZG-m5klG9uB.js} +1 -1
  15. package/web-dist/assets/{chunk-FWX5IMBZ-CnOUb3RH.js → chunk-FWX5IMBZ-CHO58JFl.js} +2 -2
  16. package/web-dist/assets/{chunk-HOUHSVGY-YdnK1w2S.js → chunk-HOUHSVGY-DjH-r82r.js} +1 -1
  17. package/web-dist/assets/{chunk-ICXQ74PX-hdfmNc2d.js → chunk-ICXQ74PX-DkYjEd46.js} +1 -1
  18. package/web-dist/assets/{chunk-MOJQB5TN-CsGFUAEU.js → chunk-MOJQB5TN-D89rLIxX.js} +1 -1
  19. package/web-dist/assets/{chunk-OGEWGWER-CzQY8gM0.js → chunk-OGEWGWER-Db2MBETv.js} +1 -1
  20. package/web-dist/assets/{chunk-PUDLZKDR-CquKZy9Z.js → chunk-PUDLZKDR-Dtdx_z8j.js} +1 -1
  21. package/web-dist/assets/{chunk-Q4XR5HBZ-C_1V073n.js → chunk-Q4XR5HBZ-XYvD_xYq.js} +1 -1
  22. package/web-dist/assets/{chunk-RYQCIY6F-B2Y6QBP5.js → chunk-RYQCIY6F-CZ7RTprX.js} +1 -1
  23. package/web-dist/assets/{chunk-V7JOEXUC-_NMzZcnP.js → chunk-V7JOEXUC-CoAVJiNJ.js} +1 -1
  24. package/web-dist/assets/{chunk-VAUOI2AC-D8ojVgWd.js → chunk-VAUOI2AC-DbjEHErZ.js} +1 -1
  25. package/web-dist/assets/{chunk-VR4S4FIN-CgTzyBot.js → chunk-VR4S4FIN-4BB6eLCK.js} +1 -1
  26. package/web-dist/assets/{chunk-WYO6CB5R-D0qL-eZe.js → chunk-WYO6CB5R-Cuvm_fLi.js} +1 -1
  27. package/web-dist/assets/{chunk-XXDRQBXY-CqoZQ1Er.js → chunk-XXDRQBXY-CvLzx99l.js} +1 -1
  28. package/web-dist/assets/{chunk-ZGVPDNZ5-CY3MtA1p.js → chunk-ZGVPDNZ5-BccJcRbi.js} +1 -1
  29. package/web-dist/assets/classDiagram-OUVF2IWQ-DTgWbehh.js +1 -0
  30. package/web-dist/assets/classDiagram-v2-EOCWNBFH-DTgWbehh.js +1 -0
  31. package/web-dist/assets/{cose-bilkent-JH36ORCC-CdwbTfJj.js → cose-bilkent-JH36ORCC-BfwT-16i.js} +1 -1
  32. package/web-dist/assets/{cynefin-VYW2F7L2-CpVXg7NY.js → cynefin-VYW2F7L2-DbZ1V36t.js} +1 -1
  33. package/web-dist/assets/{cynefinDiagram-TSTJHNR4-Bq8xdMaL.js → cynefinDiagram-TSTJHNR4-mFI_mDt-.js} +1 -1
  34. package/web-dist/assets/{dagre-VKFMJZFB-3LmR7haE.js → dagre-VKFMJZFB-BldEgHyl.js} +1 -1
  35. package/web-dist/assets/{diagram-FQU43EPY-Bl3VhSKJ.js → diagram-FQU43EPY-CWSdOHjN.js} +1 -1
  36. package/web-dist/assets/{diagram-G47NLZAW-Dx8wicI9.js → diagram-G47NLZAW-CohHPpmC.js} +1 -1
  37. package/web-dist/assets/{diagram-NH7WQ7WH-D-ac7oKf.js → diagram-NH7WQ7WH-CY9SIr04.js} +1 -1
  38. package/web-dist/assets/{diagram-OA4YK3LP-C3n9muDh.js → diagram-OA4YK3LP-D1ChaJcq.js} +1 -1
  39. package/web-dist/assets/{diagram-WEI45ONY-zhWZ_XKT.js → diagram-WEI45ONY-Bng85j-O.js} +1 -1
  40. package/web-dist/assets/{dist-C2WuhXSR.js → dist-Dn2m7SMF.js} +1 -1
  41. package/web-dist/assets/{ebnfDiagram-CCIWWBDH-BYXQgDLw.js → ebnfDiagram-CCIWWBDH-CcHfTwsR.js} +1 -1
  42. package/web-dist/assets/{erDiagram-Q63AITRT-DSTBG9Mp.js → erDiagram-Q63AITRT-D9XptUTi.js} +1 -1
  43. package/web-dist/assets/eventmodeling-45OFAUF4-vqzohKbi.js +1 -0
  44. package/web-dist/assets/flowDiagram-23GEKE2U-CYPLykok.js +1 -0
  45. package/web-dist/assets/{ganttDiagram-NO4QXBWP-C9RStO67.js → ganttDiagram-NO4QXBWP-CpDcHWNC.js} +1 -1
  46. package/web-dist/assets/{gitGraph-TEB2WS4Q-JFtHkb0B.js → gitGraph-TEB2WS4Q-dskxWshP.js} +1 -1
  47. package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-uVA8Zt2w.js → gitGraphDiagram-IHSO6WYX-Gm-g6rXY.js} +1 -1
  48. package/web-dist/assets/index-Bi4vNYho.css +2 -0
  49. package/web-dist/assets/index-C5sCt0eh.js +334 -0
  50. package/web-dist/assets/{info-DKCQHKI2-hrkiQZrg.js → info-DKCQHKI2-DfBWPig9.js} +1 -1
  51. package/web-dist/assets/{infoDiagram-FWYZ7A6U-BhdOdJlu.js → infoDiagram-FWYZ7A6U-RA1gm_5G.js} +1 -1
  52. package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-zdLsCb3B.js → ishikawaDiagram-FXEZZL3T-DMO4tlB7.js} +1 -1
  53. package/web-dist/assets/{journeyDiagram-5HDEW3XC-C_2hQwBD.js → journeyDiagram-5HDEW3XC-CGn0Vfft.js} +1 -1
  54. package/web-dist/assets/{kanban-definition-HUTT4EX6-o0jEXUku.js → kanban-definition-HUTT4EX6-qRxs3pxC.js} +1 -1
  55. package/web-dist/assets/{line-BI9UTuIR.js → line-BihkNjKV.js} +1 -1
  56. package/web-dist/assets/{linear-Rr0EbNoq.js → linear-CbcYjraG.js} +1 -1
  57. package/web-dist/assets/{mermaid-parser.core-yhmLALkv.js → mermaid-parser.core-CstJtBOd.js} +3 -3
  58. package/web-dist/assets/{mermaid.core-BRyxVBzn.js → mermaid.core-CAoFTj5o.js} +3 -3
  59. package/web-dist/assets/{mindmap-definition-LN4V7U3C-BA9ji-1w.js → mindmap-definition-LN4V7U3C-Dobyf2TY.js} +1 -1
  60. package/web-dist/assets/{packet-7NZHBO7P-DBhL0KIK.js → packet-7NZHBO7P-BV-_zRVl.js} +1 -1
  61. package/web-dist/assets/{pegDiagram-2B236MQR-CPxXVeZH.js → pegDiagram-2B236MQR-CoWfyvfk.js} +1 -1
  62. package/web-dist/assets/{pie-RZYD4A2V-ByCiaDbD.js → pie-RZYD4A2V-ptQFpYwJ.js} +1 -1
  63. package/web-dist/assets/{pieDiagram-ENE6RG2P-Bw8GvNiv.js → pieDiagram-ENE6RG2P-DCYSn0kJ.js} +1 -1
  64. package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-CwL8u1x5.js → quadrantDiagram-ABIIQ3AL-D-IhKJdt.js} +1 -1
  65. package/web-dist/assets/{radar-I7S5WNFK-Ds0-Pw3X.js → radar-I7S5WNFK-CqtSeYcU.js} +1 -1
  66. package/web-dist/assets/{railroad-3IZDKUUU-xwnxXT5n.js → railroad-3IZDKUUU-CejeX1m0.js} +1 -1
  67. package/web-dist/assets/railroad-abnf-AHOZXSZD-D858Ks1V.js +1 -0
  68. package/web-dist/assets/railroad-ebnf-EBAXGLYW-CnKN0qs5.js +1 -0
  69. package/web-dist/assets/railroad-peg-LSFZ7HO6-CG_oVFtv.js +1 -0
  70. package/web-dist/assets/{railroadDiagram-RFXS5EU6-B1rEgDrn.js → railroadDiagram-RFXS5EU6-CLMVsbkb.js} +1 -1
  71. package/web-dist/assets/{requirementDiagram-TGXJPOKE-CdLF-_L5.js → requirementDiagram-TGXJPOKE-J6ovU2nZ.js} +1 -1
  72. package/web-dist/assets/{sankeyDiagram-HTMAVEWB-DTmdqI7H.js → sankeyDiagram-HTMAVEWB-BN1Wcnxg.js} +1 -1
  73. package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-CKtz0A1H.js → sequenceDiagram-DBY2YBRQ-CnDSUjeE.js} +1 -1
  74. package/web-dist/assets/{src-BqbE4HyW.js → src-ie67lQl7.js} +1 -1
  75. package/web-dist/assets/{stateDiagram-2N3HPSRC-GYGYAkK2.js → stateDiagram-2N3HPSRC-CDvDw5S6.js} +1 -1
  76. package/web-dist/assets/stateDiagram-v2-6OUMAXLB-CWmRITC6.js +1 -0
  77. package/web-dist/assets/{swimlanes-5IMT3BWC-DAi3tBaQ.js → swimlanes-5IMT3BWC-BmljTUhI.js} +1 -1
  78. package/web-dist/assets/swimlanesDiagram-G3AALYLV-BTxJqUkH.js +8 -0
  79. package/web-dist/assets/{timeline-definition-FHXFAJF6-O4KNojxn.js → timeline-definition-FHXFAJF6-CjA-qR6O.js} +1 -1
  80. package/web-dist/assets/{treeView-QDETBFTQ-BbAhfX9e.js → treeView-QDETBFTQ-CHKGsZbS.js} +1 -1
  81. package/web-dist/assets/{treemap-6X3UGDF4-D3XVXTNg.js → treemap-6X3UGDF4-CqU-nL1w.js} +1 -1
  82. package/web-dist/assets/{vennDiagram-L72KCM5P-BjsVc4st.js → vennDiagram-L72KCM5P-BwQcxcel.js} +1 -1
  83. package/web-dist/assets/{wardley-OPB4EBWU-CcWQmwG4.js → wardley-OPB4EBWU-Bo8e8N-h.js} +1 -1
  84. package/web-dist/assets/{wardleyDiagram-EHGQE667-Cz-aojN7.js → wardleyDiagram-EHGQE667-ByioZC4m.js} +1 -1
  85. package/web-dist/assets/{xychartDiagram-FW5EYKEG-CASxN8z7.js → xychartDiagram-FW5EYKEG-B48Vy_EL.js} +1 -1
  86. package/web-dist/index.html +2 -2
  87. package/web-dist/assets/architecture-TIHT7OUA-qF4uSd6w.js +0 -1
  88. package/web-dist/assets/channel-KKo0nJfj.js +0 -1
  89. package/web-dist/assets/classDiagram-OUVF2IWQ-B4WEPxqA.js +0 -1
  90. package/web-dist/assets/classDiagram-v2-EOCWNBFH-B4WEPxqA.js +0 -1
  91. package/web-dist/assets/eventmodeling-45OFAUF4-Dfi1SiqN.js +0 -1
  92. package/web-dist/assets/flowDiagram-23GEKE2U-DrZ_4EiE.js +0 -1
  93. package/web-dist/assets/index-DdA4AFB7.js +0 -334
  94. package/web-dist/assets/index-J1N8yjnp.css +0 -2
  95. package/web-dist/assets/railroad-abnf-AHOZXSZD-BMLoaNxy.js +0 -1
  96. package/web-dist/assets/railroad-ebnf-EBAXGLYW-BRk3kvdr.js +0 -1
  97. package/web-dist/assets/railroad-peg-LSFZ7HO6-h9Wo00HF.js +0 -1
  98. package/web-dist/assets/stateDiagram-v2-6OUMAXLB-BmiBzOjo.js +0 -1
  99. package/web-dist/assets/swimlanesDiagram-G3AALYLV-BvIghLXt.js +0 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frizz-server",
3
- "version": "0.15.16",
3
+ "version": "0.15.17",
4
4
  "private": false,
5
5
  "description": "Replaceable Frizz server runtime",
6
6
  "license": "MIT",
@@ -653,6 +653,43 @@ const UNASK = {
653
653
  },
654
654
  }
655
655
 
656
+ const SECRET = {
657
+ name: "secret",
658
+ description:
659
+ "ASK THE HUMAN FOR A SECRET VALUE — a one-time 2FA code, an API token, a password — that a command " +
660
+ "needs and you must never see. The human may be on a phone, far from this machine: this is how a " +
661
+ "code reaches a command without anyone typing into a terminal here.\n\n" +
662
+ "It registers a question like `ask`, drawn as a card with ONE MASKED BOX. What the human pastes is " +
663
+ "held in Frizz's memory — never on disk — and served through a private named pipe whose path this " +
664
+ "tool returns NOW. It never enters the transcript, the database or your context: the answer you are " +
665
+ "woken with names the path, not the value.\n\n" +
666
+ "THE PATH CAN BE READ ONCE, within 15 minutes of the answer; then it is gone. So read it INSIDE the " +
667
+ "command that uses it: `npm publish --otp \"$(cat '<path>')\"`, `<cmd> < '<path>'`. A value several " +
668
+ "commands need goes into a variable at the start of ONE Bash call: " +
669
+ "`T=\"$(cat '<path>')\"; cmd1 --token \"$T\"; cmd2 --token \"$T\"`. Never `cat` it bare, echo it, " +
670
+ "copy it into a file, or paste it into a message — any of those spends the one read and puts the " +
671
+ "value in the transcript. To discard an unread value, `rm` the path.\n\n" +
672
+ "A one-time code expires in about thirty seconds, so have the command ready BEFORE you rest: when the " +
673
+ "answer wakes you, run it at once.\n\n" +
674
+ "Like a question, it is your rest's sign-off and it gates `done` until answered; name it under " +
675
+ "`questions:` at later rests, withdraw it with `unask`. It is allowed on an autonomous thread — a " +
676
+ "credential is not something you can decide.",
677
+ inputSchema: {
678
+ type: "object",
679
+ properties: {
680
+ question: {
681
+ type: "string",
682
+ description:
683
+ "What to paste, said so the human can answer cold: which account or service, which kind of " +
684
+ "value, and what it unlocks — \"The npm one-time code for the maintainer account, to publish " +
685
+ "frizz 0.16.0.\" NO \"I\" AND NO \"you\": name the actor outright.",
686
+ },
687
+ header: { type: "string", description: "A very short chip label for the card, 12 characters or so — \"npm OTP\", \"API token\"." },
688
+ },
689
+ required: ["question"],
690
+ },
691
+ }
692
+
656
693
  const DONE = {
657
694
  name: "done",
658
695
  description:
@@ -783,7 +820,7 @@ const UNLINK = {
783
820
 
784
821
  // WATCH_ISSUE rides at the END (2026-09-14): the tool list is read by position in frizz-mcp.test.ts, and a
785
822
  // worker's runtime reads it by name, so the order costs nothing and appending breaks nothing.
786
- const TOOLS = [SPAWN_THREAD, GOAL, TIMER, WATCH_PR, WATCH, UNWATCH, ASK, UNASK, DONE, TITLE, ACTIVITY, LINK, UNLINK, WATCH_ISSUE]
823
+ const TOOLS = [SPAWN_THREAD, GOAL, TIMER, WATCH_PR, WATCH, UNWATCH, ASK, UNASK, DONE, TITLE, ACTIVITY, LINK, UNLINK, WATCH_ISSUE, SECRET]
787
824
 
788
825
  /** @type {Record<string, (args: Record<string, unknown>) => Promise<string>>} */
789
826
  const HANDLERS = {
@@ -795,6 +832,7 @@ const HANDLERS = {
795
832
  [WATCH.name]: watch,
796
833
  [ASK.name]: ask,
797
834
  [UNASK.name]: unask,
835
+ [SECRET.name]: secret,
798
836
  [DONE.name]: done,
799
837
  [TITLE.name]: title,
800
838
  [UNWATCH.name]: unwatch,
@@ -1565,6 +1603,33 @@ async function ask(args) {
1565
1603
  )
1566
1604
  }
1567
1605
 
1606
+ /** The `secret` handler: register ONE masked question, and hand back the pipe its value will be read from.
1607
+ * It rides the `ask` RPC with `secret: true` — the card, the wake, the `done` gate and the `questions:`
1608
+ * naming are all a question's — and the server is what keeps the value out of every one of them.
1609
+ * @param {Record<string, unknown>} args @returns {Promise<string>} */
1610
+ async function secret(args) {
1611
+ const slug = threadSlug()
1612
+ const question = typeof args.question === "string" ? args.question.trim() : ""
1613
+ if (!question) throw new Error("`question` is required — say what the human should paste, and for what")
1614
+ const header = typeof args.header === "string" && args.header.trim() ? args.header.trim() : undefined
1615
+ const result = (await callRpc("ask", { slug, questions: [{ question, kind: "question", secret: true, ...(header ? { header } : {}) }] }))?.result
1616
+ const registered = Array.isArray(result?.registered) ? result.registered[0] : undefined
1617
+ const path = typeof registered?.secretPath === "string" ? registered.secretPath : ""
1618
+ if (!registered?.id || !path) throw new Error("Frizz did not return the secret's file — this server predates `secret`; restart Frizz and retry")
1619
+ // Quoted, because the macOS state dir is `~/Library/Application Support/…` and an unquoted path
1620
+ // splits at the space.
1621
+ const quoted = `'${path.replace(/'/g, `'\\''`)}'`
1622
+ return (
1623
+ `Registered secret request ${registered.id}. The human sees a masked box on the board.\n\n` +
1624
+ `Once answered, the value can be read ONCE, within 15 minutes, at:\n ${path}\n\n` +
1625
+ `Read it INSIDE the command that uses it — \`--otp "$(cat ${quoted})"\` — and never cat, echo or copy ` +
1626
+ "it on its own: that spends the one read. Several commands share it through a variable set at the " +
1627
+ "start of ONE Bash call. Get the command ready now: the answer wakes you, and a one-time code expires " +
1628
+ "within a minute.\n\n" +
1629
+ `${openQuestionList(result)}`
1630
+ )
1631
+ }
1632
+
1568
1633
  /** The `unask` handler: withdraw one registered question by id.
1569
1634
  * @param {Record<string, unknown>} args @returns {Promise<string>} */
1570
1635
  async function unask(args) {
@@ -1 +1 @@
1
- import{m as e,t}from"./mermaid-parser.core-yhmLALkv.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-BqbE4HyW.js";import"./chunk-WYO6CB5R-D0qL-eZe.js";import"./chunk-VAUOI2AC-D8ojVgWd.js";import{n as i,r as a,t as o}from"./chunk-MOJQB5TN-CsGFUAEU.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-CstJtBOd.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-ie67lQl7.js";import"./chunk-WYO6CB5R-Cuvm_fLi.js";import"./chunk-VAUOI2AC-DbjEHErZ.js";import{n as i,r as a,t as o}from"./chunk-MOJQB5TN-D89rLIxX.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 +1 @@
1
- import{n as e,t}from"./path-BWPyau1x.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-C2WuhXSR.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-BWPyau1x.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-Dn2m7SMF.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-BfrZ3jm6.js";import{M as e}from"./mermaid-parser.core-CstJtBOd.js";export{e as createArchitectureServices};