frizz-server 0.15.64 → 0.15.66
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 +9695 -9665
- package/dist/dev-child.js +12750 -11645
- package/package.json +1 -1
- package/runtime/cc-worker/hooks/session-seed.mjs +4 -4
- package/runtime/cc-worker/lib/frizz-tools.mjs +167 -11
- package/runtime/cc-worker/skills/gh/SKILL.md +16 -2
- package/web-dist/assets/{abnfDiagram-VCTEODGH-D5EqHQdx.js → abnfDiagram-VCTEODGH-CnmzOcow.js} +1 -1
- package/web-dist/assets/architecture-7GRP2DOG-CnM-e-E8.js +1 -0
- package/web-dist/assets/{architectureDiagram-5GKGNRK7-gq825RUa.js → architectureDiagram-5GKGNRK7-CAXL719y.js} +1 -1
- package/web-dist/assets/{blockDiagram-I7D4REHJ-C3kbcova.js → blockDiagram-I7D4REHJ-BQzG6o7g.js} +1 -1
- package/web-dist/assets/{c4Diagram-7LVT6UL2-DSdiPLXk.js → c4Diagram-7LVT6UL2-CdasYbB9.js} +1 -1
- package/web-dist/assets/channel-Df-yP_fy.js +1 -0
- package/web-dist/assets/{chunk-2E4U76K2-BVgft5ii.js → chunk-2E4U76K2-CVwqmTfo.js} +1 -1
- package/web-dist/assets/{chunk-4HAMMTFA-zVCpOazU.js → chunk-4HAMMTFA-9XUFh8iW.js} +1 -1
- package/web-dist/assets/{chunk-75Z2AOVW-KVNTSyn6.js → chunk-75Z2AOVW-CREHsMZR.js} +1 -1
- package/web-dist/assets/{chunk-CLGD4ZFX-DaCd56Bs.js → chunk-CLGD4ZFX-CAZl_sMf.js} +1 -1
- package/web-dist/assets/{chunk-DU6HZSFF-Dltf3cFo.js → chunk-DU6HZSFF-DqlwHUqE.js} +1 -1
- package/web-dist/assets/{chunk-F27PBJKO-HNYY-fg6.js → chunk-F27PBJKO-UjuynGyM.js} +1 -1
- package/web-dist/assets/{chunk-GMAD6QVW-B1qwCavq.js → chunk-GMAD6QVW-BSHkruVH.js} +1 -1
- package/web-dist/assets/{chunk-GVQU2GXP-0tGYVw7V.js → chunk-GVQU2GXP-DaxKzMUz.js} +1 -1
- package/web-dist/assets/{chunk-IMKFNOWR-xV54i1G0.js → chunk-IMKFNOWR-B7ZJ5BgQ.js} +1 -1
- package/web-dist/assets/{chunk-L3NEJ4N5-DeTgpeAQ.js → chunk-L3NEJ4N5-BN1lIkwL.js} +1 -1
- package/web-dist/assets/{chunk-OSK3NFVY-CDvPPEY9.js → chunk-OSK3NFVY-3maCyMz-.js} +1 -1
- package/web-dist/assets/{chunk-P2QGCYS3-BFxT0iW2.js → chunk-P2QGCYS3-_1r7nLEO.js} +1 -1
- package/web-dist/assets/{chunk-POPQ4Y6H-g4jad-CP.js → chunk-POPQ4Y6H-3WdNTnoR.js} +1 -1
- package/web-dist/assets/{chunk-PWAF6VOD-DxDAJOIK.js → chunk-PWAF6VOD-CGTu0qqE.js} +1 -1
- package/web-dist/assets/{chunk-SHT3W25Y-CWehUFxT.js → chunk-SHT3W25Y-DgbGWu3x.js} +1 -1
- package/web-dist/assets/{chunk-SVP7TREG-6Wvgv7qH.js → chunk-SVP7TREG-NKnLeN2y.js} +1 -1
- package/web-dist/assets/{chunk-TICWLB2K-hqgNuTQA.js → chunk-TICWLB2K-Bn-Uz8zX.js} +1 -1
- package/web-dist/assets/{chunk-TLUHSLCS-CwXYeqEB.js → chunk-TLUHSLCS-Ted8oIft.js} +2 -2
- package/web-dist/assets/classDiagram-ZZMXUADV-Dg3f5DFX.js +1 -0
- package/web-dist/assets/classDiagram-v2-VYDZK3BY-Dg3f5DFX.js +1 -0
- package/web-dist/assets/{cynefin-OW5HDTMX-XWQcd7FR.js → cynefin-OW5HDTMX-CCRF_ybb.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-5FMLGOSQ-BhLkDCGl.js → cynefinDiagram-5FMLGOSQ-D6rvhh-N.js} +1 -1
- package/web-dist/assets/{dagre-GXQ25YYZ-CEoBRa9n.js → dagre-GXQ25YYZ-DImmEyGA.js} +1 -1
- package/web-dist/assets/{diagram-S7CK7UJ4-DHk02-f8.js → diagram-S7CK7UJ4-ty-OQ116.js} +1 -1
- package/web-dist/assets/{diagram-UQ7AKVKN-CrtOBX4M.js → diagram-UQ7AKVKN-CerxGyX7.js} +1 -1
- package/web-dist/assets/{diagram-VSXAHHWV-BQlVmaCU.js → diagram-VSXAHHWV-BcLOBn-L.js} +1 -1
- package/web-dist/assets/{diagram-VX7I27RA-Br3LNVAh.js → diagram-VX7I27RA-Bhgjh6hM.js} +1 -1
- package/web-dist/assets/{diagram-Z3DM3KII-DO8RnVJu.js → diagram-Z3DM3KII-JMZ6ukL1.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-PWID7BFC-DPJHGedI.js → ebnfDiagram-PWID7BFC-tvEhrlys.js} +1 -1
- package/web-dist/assets/{erDiagram-RLTQ6QDP-aVp1cHLr.js → erDiagram-RLTQ6QDP-CEt1rREE.js} +1 -1
- package/web-dist/assets/eventmodeling-NTZA5JFV-C75CP-gt.js +1 -0
- package/web-dist/assets/flowDiagram-HODETNUW-Bu0OgrwI.js +1 -0
- package/web-dist/assets/{ganttDiagram-EL5Y4UJY-hGh2T28b.js → ganttDiagram-EL5Y4UJY-DJTHJ8v3.js} +1 -1
- package/web-dist/assets/{gitGraph-4MIJSDKK-BP-Alggb.js → gitGraph-4MIJSDKK-rQizWXPN.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-WWUBYQGX-BEPvlTMD.js → gitGraphDiagram-WWUBYQGX-BGyeamfF.js} +1 -1
- package/web-dist/assets/index-B3hJal2M.js +263 -0
- package/web-dist/assets/index-Dss-vmKc.css +2 -0
- package/web-dist/assets/{info-A6RAGUB7--TsjfXti.js → info-A6RAGUB7-DAFbBLlf.js} +1 -1
- package/web-dist/assets/{infoDiagram-27XIBGKW-B_gxNeQz.js → infoDiagram-27XIBGKW-BKrix0pJ.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-5VMMS53U-CsBNJzZc.js → ishikawaDiagram-5VMMS53U-BxptiH0R.js} +1 -1
- package/web-dist/assets/{journeyDiagram-3NMN7TZE-CbaAx84c.js → journeyDiagram-3NMN7TZE-BIjMg4r-.js} +1 -1
- package/web-dist/assets/{kanban-definition-UXKFOSKX-Qnp78nfx.js → kanban-definition-UXKFOSKX-DVZmrqen.js} +1 -1
- package/web-dist/assets/{line-BJrSvIrG.js → line-Ceb-IItU.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-CpqT4SIU.js → mermaid-parser.core-KkCejDNC.js} +3 -3
- package/web-dist/assets/{mermaid.core-B1c_wthC.js → mermaid.core-DyJvp_Ez.js} +3 -3
- package/web-dist/assets/{mindmap-definition-YA3MSWOX-DVVk9yW1.js → mindmap-definition-YA3MSWOX-PTo3gqjQ.js} +1 -1
- package/web-dist/assets/{packet-AYTQ26CC-iZErOx2H.js → packet-AYTQ26CC-Dr47iOXY.js} +1 -1
- package/web-dist/assets/{pegDiagram-XKGWAZYB-Da5p8rFF.js → pegDiagram-XKGWAZYB-9tqLnb8c.js} +1 -1
- package/web-dist/assets/{pie-WAS4IAKB-DA7GELw3.js → pie-WAS4IAKB-DXIQOsCL.js} +1 -1
- package/web-dist/assets/{pieDiagram-E7YTZNPT-BZ9ObHqc.js → pieDiagram-E7YTZNPT-DPoRo3Zn.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-AXDQQJYC-9azv0gR1.js → quadrantDiagram-AXDQQJYC-ByGBaqxi.js} +1 -1
- package/web-dist/assets/{radar-RG4KPBEZ-BX9sHDPS.js → radar-RG4KPBEZ-Bj_-qng4.js} +1 -1
- package/web-dist/assets/{railroad-74A4TZTK-Brs7_Tyl.js → railroad-74A4TZTK-BuCmRpxC.js} +1 -1
- package/web-dist/assets/railroad-abnf-HS5TGJTU-B3jvgOfi.js +1 -0
- package/web-dist/assets/railroad-ebnf-LZEXJU2U-C1Uftq5X.js +1 -0
- package/web-dist/assets/railroad-peg-WCYAUIDC-BLUFwpTM.js +1 -0
- package/web-dist/assets/{railroadDiagram-O6MQD6OU-DRhzaWFO.js → railroadDiagram-O6MQD6OU-DQHQnzjm.js} +1 -1
- package/web-dist/assets/{requirementDiagram-BXWQKSXE-CQcrIknF.js → requirementDiagram-BXWQKSXE-DJJKhVpd.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-P5KCCOFB-DkUbT70z.js → sankeyDiagram-P5KCCOFB-DIBozOMw.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-WJ2MYXX4-BqKV7sY4.js → sequenceDiagram-WJ2MYXX4-wnp4YLHJ.js} +1 -1
- package/web-dist/assets/{stateDiagram-D77RDMKH-CPiwkHGu.js → stateDiagram-D77RDMKH-B_wVLjRp.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-MP3YSRHH-BHuFcv1t.js +1 -0
- package/web-dist/assets/{swimlanes-42K2YHIH-CP-V5WFz.js → swimlanes-42K2YHIH-DmANfD2b.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-VR7AAH4N-CpmUrS01.js +8 -0
- package/web-dist/assets/threadSurfaces-YwwW7VVL.js +141 -0
- package/web-dist/assets/{timeline-definition-24CTP7MA-DKY-PWS4.js → timeline-definition-24CTP7MA-CSi_JQwA.js} +1 -1
- package/web-dist/assets/{treeView-Q6P3EWNA-Gk9FLh78.js → treeView-Q6P3EWNA-CC7W1CDc.js} +1 -1
- package/web-dist/assets/{treemap-WGGIJYW6-BYnxP1dg.js → treemap-WGGIJYW6-fALAp3pw.js} +1 -1
- package/web-dist/assets/{vennDiagram-4TSXK5OY-CQCcg6lv.js → vennDiagram-4TSXK5OY-CHcotWhX.js} +1 -1
- package/web-dist/assets/{wardley-WFR3VGLG-m7RO5npi.js → wardley-WFR3VGLG-BTc0JH7l.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-VM6X3IG4-f0WZbMup.js → wardleyDiagram-VM6X3IG4-DAC-lbDU.js} +1 -1
- package/web-dist/assets/{xychartDiagram-S5SC5T6Z-C4OuY-EY.js → xychartDiagram-S5SC5T6Z-CbFQ6lx1.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/assets/architecture-7GRP2DOG-CPrgjw61.js +0 -1
- package/web-dist/assets/channel-c26qxF0z.js +0 -1
- package/web-dist/assets/classDiagram-ZZMXUADV-CW3HOlqk.js +0 -1
- package/web-dist/assets/classDiagram-v2-VYDZK3BY-CW3HOlqk.js +0 -1
- package/web-dist/assets/eventmodeling-NTZA5JFV-BPWcI0I_.js +0 -1
- package/web-dist/assets/flowDiagram-HODETNUW-yGIuO3Wj.js +0 -1
- package/web-dist/assets/index-D4bBjzdK.js +0 -262
- package/web-dist/assets/index-DjVez4iB.css +0 -2
- package/web-dist/assets/railroad-abnf-HS5TGJTU-BeJB0nBn.js +0 -1
- package/web-dist/assets/railroad-ebnf-LZEXJU2U-BpiILSS0.js +0 -1
- package/web-dist/assets/railroad-peg-WCYAUIDC-Bm6eAoYO.js +0 -1
- package/web-dist/assets/stateDiagram-v2-MP3YSRHH-Cg2HXf9n.js +0 -1
- package/web-dist/assets/swimlanesDiagram-VR7AAH4N-DGdb-xhi.js +0 -8
- package/web-dist/assets/threadSurfaces-dttA_8fg.js +0 -140
package/package.json
CHANGED
|
@@ -99,7 +99,7 @@ const ghBlock =
|
|
|
99
99
|
'• READ freely: `gh issue view N -R OWNER/REPO --comments`, `gh pr view N`, `gh pr diff N`, `gh pr checks N`, `gh run list`/`gh run view`, `gh api repos/OWNER/REPO/…`. Prefer `--json <fields>` over scraping human text.\n' +
|
|
100
100
|
'• SEARCH across the repo (and GitHub) with `gh search issues`/`gh search prs` when hunting related work, duplicates, or prior art.\n' +
|
|
101
101
|
ghReadOnly +
|
|
102
|
-
'To wait on CI or reviews, register `frizzctl watch-pr add` / `frizzctl watch-issue add` rather than polling. Load the `frizz:gh` skill for the full playbook (recipes, waits, and the bundled monitors as a fallback).';
|
|
102
|
+
'To wait on CI or reviews, register `frizzctl watch-pr add` / `frizzctl watch-issue add` / `frizzctl watch-run add` rather than polling. Load the `frizz:gh` skill for the full playbook (recipes, waits, and the bundled monitors as a fallback).';
|
|
103
103
|
|
|
104
104
|
const ghFrizzReadOnlyBlock =
|
|
105
105
|
'⟦gh available, read-only⟧ Plain `gh` is signed in here with Frizz\'s own READ-ONLY GitHub credential: no Touch ID, and it works while the screen is locked. Use it EAGERLY and well — it is the fastest path to issue/PR/CI/release context, and you should reach for it before guessing:\n' +
|
|
@@ -107,7 +107,7 @@ const ghFrizzReadOnlyBlock =
|
|
|
107
107
|
'• A WRITE fails with a permission error (`Resource not accessible by integration`, HTTP 403), and so does a read that needs more than it holds, such as a private repo on an account where Frizz\'s GitHub App is not installed (it reads as not found). That is this credential, not a fault: rerun that one command as `keyward --reason "<what this command is for>" -- gh …`, `gh` the first word after `--`. One Touch ID covers this repository for 10 minutes.\n' +
|
|
108
108
|
'• On any stderr line starting `keyward: not released:` (screen locked, declined), STOP and report it to the human; NEVER retry. A locked screen does not clear by retrying, and a decline was their answer.\n' +
|
|
109
109
|
ghReadOnly +
|
|
110
|
-
'To wait on CI or reviews, register `frizzctl watch-pr add` / `frizzctl watch-issue add` rather than polling. Load the `frizz:gh` skill for the full playbook.';
|
|
110
|
+
'To wait on CI or reviews, register `frizzctl watch-pr add` / `frizzctl watch-issue add` / `frizzctl watch-run add` rather than polling. Load the `frizz:gh` skill for the full playbook.';
|
|
111
111
|
|
|
112
112
|
// The same credential on a machine with no Keyward, where `gh` had no sign-in of its own, so a write has
|
|
113
113
|
// nowhere to go from here (frizzGithubWorkerEnv).
|
|
@@ -116,13 +116,13 @@ const ghFrizzReadOnlyNoWritesBlock =
|
|
|
116
116
|
'• READ freely: `gh issue view N -R OWNER/REPO --comments`, `gh pr view N`, `gh pr diff N`, `gh pr checks N`, `gh run list`/`gh run view`, `gh run view <id> --log-failed`, `gh api repos/OWNER/REPO/…`. Prefer `--json <fields>` over scraping human text. Repo source is not readable through it; read the checkout.\n' +
|
|
117
117
|
'• A WRITE fails with a permission error (`Resource not accessible by integration`, HTTP 403), and so does a read that needs more than it holds, such as a private repo on an account where Frizz\'s GitHub App is not installed (it reads as not found). That is this credential, not a fault, and this machine has no other GitHub sign-in: hand the write to the human as steps, with the exact command or page.\n' +
|
|
118
118
|
ghReadOnly +
|
|
119
|
-
'To wait on CI or reviews, register `frizzctl watch-pr add` / `frizzctl watch-issue add` rather than polling. Load the `frizz:gh` skill for the full playbook.';
|
|
119
|
+
'To wait on CI or reviews, register `frizzctl watch-pr add` / `frizzctl watch-issue add` / `frizzctl watch-run add` rather than polling. Load the `frizz:gh` skill for the full playbook.';
|
|
120
120
|
|
|
121
121
|
const ghKeywardBlock =
|
|
122
122
|
'⟦gh available through Keyward⟧ Plain `gh` is signed OUT here; Keyward, the human\'s vault, signs it in for one run at a time. Run EVERY gh command as `keyward --reason "<what this command is for>" -- gh …` (`gh` must be the first word after `--`). It is still the fastest path to issue/PR/CI/release context — reach for it before guessing:\n' +
|
|
123
123
|
'• One Touch ID covers this repository\'s gh runs for 10 minutes (less if the screen locks), so BATCH your gh reads together rather than spreading them out. Prefer `--json <fields>`.\n' +
|
|
124
124
|
'• On any stderr line starting `keyward: not released:` (screen locked, declined), STOP and report it to the human; NEVER retry. A locked screen does not clear by retrying, and a decline was their answer.\n' +
|
|
125
|
-
'• WAITS: register `frizzctl watch-pr add` / `frizzctl watch-issue add` for CI and reviews — Frizz\'s server watches on its own credential, even while the screen is locked. Never poll gh; the bundled ci-watch/review-watch monitors cannot sign in under Keyward.\n' +
|
|
125
|
+
'• WAITS: register `frizzctl watch-pr add` / `frizzctl watch-issue add` / `frizzctl watch-run add` for CI and reviews — Frizz\'s server watches on its own credential, even while the screen is locked. Never poll gh; the bundled ci-watch/review-watch monitors cannot sign in under Keyward.\n' +
|
|
126
126
|
ghReadOnly +
|
|
127
127
|
'Load the `frizz:gh` skill for the full playbook (recipes and the exact Keyward failures).';
|
|
128
128
|
|
|
@@ -451,6 +451,68 @@ const WATCH_ISSUE = {
|
|
|
451
451
|
},
|
|
452
452
|
}
|
|
453
453
|
|
|
454
|
+
const WATCH_RUN = {
|
|
455
|
+
name: "watch_run",
|
|
456
|
+
description:
|
|
457
|
+
"REGISTER A GITHUB ACTIONS WORKFLOW RUN and Frizz brings you back when it needs you — a job going red " +
|
|
458
|
+
"while the run is still going, the run holding on an environment that needs a reviewer's approval, and " +
|
|
459
|
+
"the run ending. Register it, come to rest, and you are woken. This is how you wait on a release run, " +
|
|
460
|
+
"main's CI after a merge, or a deploy: Frizz's server polls GitHub with its own read-only sign-in, so " +
|
|
461
|
+
"nothing of yours keeps running and your thread can rest.\n\n" +
|
|
462
|
+
"NAME THE RUN, OR THE COMMIT AND ITS WORKFLOW. `owner/repo/actions/runs/<id>` or the run's URL follows " +
|
|
463
|
+
"that run. `owner/repo@<sha> --workflow test.yml` follows that workflow's run on that commit, and the run " +
|
|
464
|
+
"need not exist yet: a merge commit's CI starts seconds later, and Frizz finds it. If none has started " +
|
|
465
|
+
"after 15m, you are told once (a path filter or an `if:` may have skipped it).\n\n" +
|
|
466
|
+
"A HOLD ON AN ENVIRONMENT WAKES YOU, with its reviewers, whether the account Frizz reads GitHub with can " +
|
|
467
|
+
"approve it, and the approve command with the id filled in. That command needs a credential that can " +
|
|
468
|
+
"write; if you cannot approve it, ask a reviewer.\n\n" +
|
|
469
|
+
"IT FOLLOWS RE-RUNS. A pass settles it. A red end (failed, cancelled, timed out) leaves it ARMED until its " +
|
|
470
|
+
"`--for` runs out, so re-running the failed jobs is followed with no new registration; drop it when nobody " +
|
|
471
|
+
"will re-run. A run that has already passed is refused: there is nothing left to wait for.\n\n" +
|
|
472
|
+
"NAME IT IN YOUR ```awaiting FENCE TOO, under `runs:` (the same string you registered), with `status: " +
|
|
473
|
+
"working` while the run is going. REGISTERING IS IDEMPOTENT per run (and per commit and workflow), so " +
|
|
474
|
+
"re-registering after a compaction is safe. `frizzctl watch-run list` reads back what you hold, with each " +
|
|
475
|
+
"run's state. You can only ever watch a run on your OWN thread.",
|
|
476
|
+
inputSchema: {
|
|
477
|
+
type: "object",
|
|
478
|
+
properties: {
|
|
479
|
+
action: {
|
|
480
|
+
type: "string",
|
|
481
|
+
enum: ["add", "list", "drop"],
|
|
482
|
+
description:
|
|
483
|
+
"`add` registers a watcher (idempotent per run); `drop` withdraws one by id; `list` reads back every " +
|
|
484
|
+
"run watched on this thread, with its latest state, without changing anything.",
|
|
485
|
+
},
|
|
486
|
+
target: {
|
|
487
|
+
type: "string",
|
|
488
|
+
description:
|
|
489
|
+
"Required for `add`. The run, as `owner/repo/actions/runs/<id>` or a run URL, or a commit as " +
|
|
490
|
+
"`owner/repo@<sha>` (full or at least 7 characters) together with `workflow`. A target that cannot be " +
|
|
491
|
+
"parsed, or a run Frizz's own GitHub sign-in cannot read, is REFUSED rather than stored, with the reason.",
|
|
492
|
+
},
|
|
493
|
+
workflow: {
|
|
494
|
+
type: "string",
|
|
495
|
+
description:
|
|
496
|
+
"Required with an `owner/repo@<sha>` target, and only there. The workflow whose run on that commit to " +
|
|
497
|
+
"follow, by file name (`test.yml`) or by its `name:` (`Test Linux`).",
|
|
498
|
+
},
|
|
499
|
+
for: {
|
|
500
|
+
type: "string",
|
|
501
|
+
description:
|
|
502
|
+
"REQUIRED for `add`. How long to watch, as a DURATION — `30m`, `6h`, `3d` (max 30d, after which GitHub " +
|
|
503
|
+
"cancels a run still waiting on an environment). The watcher settles itself when this runs out and " +
|
|
504
|
+
"tells you. Give it the run's length plus slack: a CI run, an hour or two; a release that waits on a " +
|
|
505
|
+
"human's approval, a day or more.",
|
|
506
|
+
},
|
|
507
|
+
id: {
|
|
508
|
+
type: "string",
|
|
509
|
+
description: "Required for `drop`. The watcher id returned by `add` (or listed by `list`).",
|
|
510
|
+
},
|
|
511
|
+
},
|
|
512
|
+
required: ["action"],
|
|
513
|
+
},
|
|
514
|
+
}
|
|
515
|
+
|
|
454
516
|
// The registry that replaces a ```awaiting fence's `shells:` line: a wait the worker CREATES rather
|
|
455
517
|
// than one it restates at every rest. Two commands rather than one action-switch, because they are two
|
|
456
518
|
// verbs and a worker reaching for `unwatch` should find `unwatch`. See plans/rest-by-registration.md.
|
|
@@ -525,8 +587,8 @@ const UNWATCH = {
|
|
|
525
587
|
"you are about to end the thread. A watch you no longer care about still wakes you for nothing, and " +
|
|
526
588
|
"it blocks `done` until it is withdrawn.\n\n" +
|
|
527
589
|
"You do NOT need this when the work simply finishes: frizz settles the row itself and wakes you. " +
|
|
528
|
-
"`frizzctl activity` prints the id of everything you hold. A `watch-pr` / `watch-issue`
|
|
529
|
-
"`isw_…`), a `timer` id (`tmr_…`) or a `monitor` id (`cmw_…`) is withdrawn here too.",
|
|
590
|
+
"`frizzctl activity` prints the id of everything you hold. A `watch-pr` / `watch-issue` / `watch-run` id " +
|
|
591
|
+
"(`prw_…` / `isw_…` / `rnw_…`), a `timer` id (`tmr_…`) or a `monitor` id (`cmw_…`) is withdrawn here too.",
|
|
530
592
|
inputSchema: {
|
|
531
593
|
type: "object",
|
|
532
594
|
properties: {
|
|
@@ -1144,7 +1206,7 @@ const MODELS = {
|
|
|
1144
1206
|
// WATCH_ISSUE rides at the END (2026-09-14), and SECRET, STEER, WATCH_COMMAND, MONITOR and THREADS after it: the tool list is
|
|
1145
1207
|
// read by position in frizz-mcp.test.ts, and a worker's runtime reads it by name, so the order costs nothing and appending
|
|
1146
1208
|
// breaks nothing.
|
|
1147
|
-
const TOOLS = [SPAWN_THREAD, GOAL, TIMER, WATCH_PR, WATCH, UNWATCH, ASK, UNASK, DONE, TITLE, ACTIVITY, LINK, UNLINK, WATCH_ISSUE, SECRET, STEER, WATCH_COMMAND, MONITOR, THREADS, SPAWN_CHILD, MCP, WORKTREE, MODELS]
|
|
1209
|
+
const TOOLS = [SPAWN_THREAD, GOAL, TIMER, WATCH_PR, WATCH, UNWATCH, ASK, UNASK, DONE, TITLE, ACTIVITY, LINK, UNLINK, WATCH_ISSUE, SECRET, STEER, WATCH_COMMAND, MONITOR, THREADS, SPAWN_CHILD, MCP, WORKTREE, MODELS, WATCH_RUN]
|
|
1148
1210
|
|
|
1149
1211
|
/** @type {Record<string, (args: Record<string, unknown>) => Promise<string>>} */
|
|
1150
1212
|
const HANDLERS = {
|
|
@@ -1154,6 +1216,7 @@ const HANDLERS = {
|
|
|
1154
1216
|
[TIMER.name]: timer,
|
|
1155
1217
|
[WATCH_PR.name]: watchPr,
|
|
1156
1218
|
[WATCH_ISSUE.name]: watchIssue,
|
|
1219
|
+
[WATCH_RUN.name]: watchRun,
|
|
1157
1220
|
[WATCH.name]: watch,
|
|
1158
1221
|
[ASK.name]: ask,
|
|
1159
1222
|
[UNASK.name]: unask,
|
|
@@ -1540,14 +1603,15 @@ async function activity() {
|
|
|
1540
1603
|
// keys are PLURAL sequences, so an id printed on its own line is no longer something a worker can copy
|
|
1541
1604
|
// into a fence — it has to see the shape. This command is where the contract sends a worker that has lost
|
|
1542
1605
|
// an id, so printing the retired one-line-per-item form would teach the very grammar frizz refuses.
|
|
1543
|
-
const byKind = { shell: [], agent: [], timer: [], pr: [], issue: [], command: [], thread: [] }
|
|
1606
|
+
const byKind = { shell: [], agent: [], timer: [], pr: [], issue: [], run: [], command: [], thread: [] }
|
|
1544
1607
|
for (const i of items) if (byKind[i.kind] && i.id) byKind[i.kind].push(i.id)
|
|
1545
|
-
const block = Object.entries({ shells: byKind.shell, agents: byKind.agent, timers: byKind.timer, prs: byKind.pr, issues: byKind.issue, commands: byKind.command, threads: byKind.thread })
|
|
1608
|
+
const block = Object.entries({ shells: byKind.shell, agents: byKind.agent, timers: byKind.timer, prs: byKind.pr, issues: byKind.issue, runs: byKind.run, commands: byKind.command, threads: byKind.thread })
|
|
1546
1609
|
.filter(([, ids]) => ids.length > 0)
|
|
1547
1610
|
.map(([key, ids]) => ` ${key}: [${ids.join(", ")}]`)
|
|
1548
1611
|
// The template guesses `status:` from the kinds — a shell or a sub-agent is usually work that finishes
|
|
1549
1612
|
// by itself, a PR, an issue or a timer a watch — and the prose tells the worker to correct it.
|
|
1550
|
-
|
|
1613
|
+
// A workflow run finishes by itself too, so it guesses `working`.
|
|
1614
|
+
const status = byKind.shell.length + byKind.agent.length + byKind.thread.length + byKind.run.length > 0 ? "working" : "watching"
|
|
1551
1615
|
return (
|
|
1552
1616
|
`${items.length} thing${items.length === 1 ? "" : "s"} running on this thread:\n\n${lines.join("\n")}\n\n` +
|
|
1553
1617
|
"Name the ones you are ACTUALLY waiting on in your ```awaiting fence. The frontmatter is YAML — one " +
|
|
@@ -2494,7 +2558,8 @@ async function timer(args) {
|
|
|
2494
2558
|
function armedPrWatchList(result) {
|
|
2495
2559
|
// Only the PULL REQUESTS: the registry holds issues too (`watch_issue`), and each command reads back its
|
|
2496
2560
|
// own kind so a worker asking where its PRs stand is not told about an issue it registered elsewhere.
|
|
2497
|
-
|
|
2561
|
+
// `kind` absent is a server from before issues, whose every row is a pull request.
|
|
2562
|
+
const watches = (Array.isArray(result?.watches) ? result.watches : []).filter((w) => (w.kind ?? "pull") === "pull")
|
|
2498
2563
|
if (!watches.length) return "No pull requests are watched on this thread — nothing will wake you."
|
|
2499
2564
|
const lines = watches.map((w) => {
|
|
2500
2565
|
const g = w.github
|
|
@@ -2530,6 +2595,27 @@ function armedIssueWatchList(result) {
|
|
|
2530
2595
|
return `Issues watched on this thread now:\n${lines.join("\n")}`
|
|
2531
2596
|
}
|
|
2532
2597
|
|
|
2598
|
+
/** The run twin of armedPrWatchList: the WORKFLOW RUNS watched on this thread, with each one's last-polled state.
|
|
2599
|
+
* @param {{ watches?: Array<{id: string, kind?: string, target: string, workflow?: string, expiresAt?: string, run?: {status: string, conclusion?: string, workflow?: string, runNumber?: number, attempt?: number, jobs: number, done: number, failing: string[], held: string[]}}> }|undefined} result */
|
|
2600
|
+
function armedRunWatchList(result) {
|
|
2601
|
+
const watches = (Array.isArray(result?.watches) ? result.watches : []).filter((w) => w.kind === "run")
|
|
2602
|
+
if (!watches.length) return "No workflow runs are watched on this thread — nothing will wake you."
|
|
2603
|
+
const lines = watches.map((w) => {
|
|
2604
|
+
const r = w.run
|
|
2605
|
+
const name = r?.workflow ? `${r.workflow}${r.runNumber ? ` #${r.runNumber}` : ""}${r.attempt && r.attempt > 1 ? ` (attempt ${r.attempt})` : ""}` : w.workflow ? `${w.workflow}, run not started yet` : ""
|
|
2606
|
+
const jobs = r && r.jobs > 0 ? `, ${r.done}/${r.jobs} jobs done` : ""
|
|
2607
|
+
const state = !r
|
|
2608
|
+
? (w.workflow ? "waiting for its run to start" : "not polled yet")
|
|
2609
|
+
: r.status === "completed"
|
|
2610
|
+
? `ended: ${r.conclusion ?? "unknown"}${r.failing.length ? ` (red: ${r.failing.join(", ")})` : ""}`
|
|
2611
|
+
: r.status === "waiting"
|
|
2612
|
+
? `waiting${r.held.length ? ` on the ${r.held.join(", ")} environment${r.held.length === 1 ? "" : "s"}` : ""}${jobs}`
|
|
2613
|
+
: `${r.status === "queued" ? "queued" : "running"}${jobs}${r.failing.length ? `, red: ${r.failing.join(", ")}` : ""}`
|
|
2614
|
+
return ` ${w.id} ${w.target}${name ? ` "${name}"` : ""} — ${state}${w.expiresAt ? ` (until ${w.expiresAt})` : ""}`
|
|
2615
|
+
})
|
|
2616
|
+
return `Workflow runs watched on this thread now:\n${lines.join("\n")}`
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2533
2619
|
/** The armed watches on this thread, as the read-back prints them. */
|
|
2534
2620
|
function armedWatchList(result) {
|
|
2535
2621
|
const watches = Array.isArray(result?.watches) ? result.watches : []
|
|
@@ -2581,13 +2667,14 @@ async function unwatch(args) {
|
|
|
2581
2667
|
// A PR, issue or timer id is not a `watch` row, and dropOwnWatch would report it "already settled"
|
|
2582
2668
|
// while it stayed armed. The id prefix names its kind, so the one verb a worker reaches for routes it
|
|
2583
2669
|
// to the call that really withdraws it.
|
|
2584
|
-
if (id.startsWith("prw_") || id.startsWith("isw_")) {
|
|
2670
|
+
if (id.startsWith("prw_") || id.startsWith("isw_") || id.startsWith("rnw_")) {
|
|
2585
2671
|
const dropped = (await callRpc("dropOwnPrWatch", { slug, id }))?.result
|
|
2586
|
-
const kind = id.startsWith("isw_") ? "issue" : "pull request"
|
|
2672
|
+
const kind = id.startsWith("isw_") ? "issue" : id.startsWith("rnw_") ? "workflow run" : "pull request"
|
|
2587
2673
|
const head = dropped?.dropped
|
|
2588
2674
|
? `Watcher ${id} dropped. It will not wake you.`
|
|
2589
2675
|
: `No ARMED ${kind} watcher ${id} on this thread — it was already settled, or the id is not one of yours.`
|
|
2590
|
-
|
|
2676
|
+
const list = id.startsWith("isw_") ? armedIssueWatchList(dropped) : id.startsWith("rnw_") ? armedRunWatchList(dropped) : armedPrWatchList(dropped)
|
|
2677
|
+
return `${head}\n\n${list}`
|
|
2591
2678
|
}
|
|
2592
2679
|
if (id.startsWith("cmw_")) {
|
|
2593
2680
|
const dropped = (await callRpc("dropOwnCommandWatch", { slug, id }))?.result
|
|
@@ -2736,7 +2823,7 @@ async function done(args) {
|
|
|
2736
2823
|
parts.push(
|
|
2737
2824
|
`${watches.length} registration${watches.length === 1 ? "" : "s"} still armed:\n${watches.join("\n")}\n` +
|
|
2738
2825
|
"A live wait means the thing you were waiting for has not happened. Wait for it, or drop the ones " +
|
|
2739
|
-
"that stopped mattering (`frizzctl unwatch <id>` takes a watch, a PR or
|
|
2826
|
+
"that stopped mattering (`frizzctl unwatch <id>` takes a watch, a PR, issue or run watcher, a timer, or a monitor).",
|
|
2740
2827
|
)
|
|
2741
2828
|
}
|
|
2742
2829
|
parts.push("There is no force flag. Resolve them and run `frizzctl done` again.")
|
|
@@ -2842,6 +2929,62 @@ async function watchIssue(args) {
|
|
|
2842
2929
|
)
|
|
2843
2930
|
}
|
|
2844
2931
|
|
|
2932
|
+
/** The `watch_run` handler: register, withdraw, or read back this thread's workflow run watchers. The same
|
|
2933
|
+
* three RPCs as `watchPr` — one registry — with `kind: "run"` (and `workflow`, for a commit target) on the add.
|
|
2934
|
+
* @param {Record<string, unknown>} args @returns {Promise<string>} */
|
|
2935
|
+
async function watchRun(args) {
|
|
2936
|
+
const slug = threadSlug()
|
|
2937
|
+
const action = actionOf("watch_run", args.action)
|
|
2938
|
+
if (action !== "add" && action !== "list" && action !== "drop") {
|
|
2939
|
+
throw new Error("`action` must be one of \"add\", \"list\" or \"drop\"")
|
|
2940
|
+
}
|
|
2941
|
+
if (action === "list") {
|
|
2942
|
+
return armedRunWatchList((await callRpc("listOwnPrWatches", { slug }))?.result)
|
|
2943
|
+
}
|
|
2944
|
+
if (action === "drop") {
|
|
2945
|
+
const id = typeof args.id === "string" ? args.id.trim() : ""
|
|
2946
|
+
if (!id) throw new Error("`id` is required to drop a watcher — take it from `add` or from `list`")
|
|
2947
|
+
const result = (await callRpc("dropOwnPrWatch", { slug, id }))?.result
|
|
2948
|
+
const head = result?.dropped
|
|
2949
|
+
? `Watcher ${id} dropped. It will not wake you.`
|
|
2950
|
+
: `No ARMED watcher ${id} on this thread — it was already settled, or the id is not one of yours.`
|
|
2951
|
+
return `${head}\n\n${armedRunWatchList(result)}`
|
|
2952
|
+
}
|
|
2953
|
+
const target = typeof args.target === "string" ? args.target.trim() : ""
|
|
2954
|
+
if (!target) throw new Error("`target` is required — the run, as `owner/repo/actions/runs/<id>` or a run URL, or `owner/repo@<sha>` with `--workflow`")
|
|
2955
|
+
const forValue = typeof args.for === "string" ? args.for.trim() : ""
|
|
2956
|
+
if (!forValue) throw new Error("`for` is required — a DURATION like `30m`, `6h` or `3d` (max 30d), never an instant")
|
|
2957
|
+
const workflow = typeof args.workflow === "string" && args.workflow.trim() ? args.workflow.trim() : undefined
|
|
2958
|
+
const result = (await callRpc("addOwnPrWatch", { slug, target, for: forValue, kind: "run", ...(workflow ? { workflow } : {}) }))?.result
|
|
2959
|
+
const id = result?.id ?? "(unknown)"
|
|
2960
|
+
const ref = result?.target ?? target
|
|
2961
|
+
const until = result?.expiresAt ? ` until ${result.expiresAt}` : ""
|
|
2962
|
+
const view = (Array.isArray(result?.watches) ? result.watches : []).find((w) => w.id === id)
|
|
2963
|
+
const r = view?.run
|
|
2964
|
+
// WHERE THE RUN STANDS NOW, from GitHub's own answer at registration — above all a run that has already
|
|
2965
|
+
// ended red, which is armed (a re-run may follow) and would otherwise read as one still going.
|
|
2966
|
+
const now = !r
|
|
2967
|
+
? (view?.workflow ? ` No ${view.workflow} run has started on that commit yet; Frizz looks for it every minute.` : "")
|
|
2968
|
+
: r.status === "completed"
|
|
2969
|
+
? ` It has ALREADY ENDED: ${r.conclusion ?? "unknown"}. The watcher stays armed in case its failed jobs are re-run; drop it if they will not be.`
|
|
2970
|
+
: ` It is ${r.status === "in_progress" ? "running" : r.status === "waiting" ? "waiting on an environment" : "queued"} now.`
|
|
2971
|
+
const head = result?.alreadyArmed
|
|
2972
|
+
? `Already watching ${ref} as ${id}${until} — nothing new was registered, and its original expiry stands.`
|
|
2973
|
+
: `Watching ${ref} as ${id}${until}.${now} Frizz wakes you when a job goes red, when the run waits on an ` +
|
|
2974
|
+
"environment's approval, and when it ends; the registration survives your turn ending, a compaction and a frizz restart."
|
|
2975
|
+
const clamped = result?.clampedFrom
|
|
2976
|
+
? `\n\nYOUR \`--for ${result.clampedFrom}\` WAS CAPPED at the 30d ceiling — the expiry above is what you actually hold.`
|
|
2977
|
+
: ""
|
|
2978
|
+
// The fence names the run as the tool's own target, so a URL the worker pasted is shortened to
|
|
2979
|
+
// `owner/repo/actions/runs/N`. A commit-form watch keeps `owner/repo@<sha>`, the string it was registered by.
|
|
2980
|
+
const fenceName = /^https?:\/\//i.test(target) && result?.target ? result.target : target
|
|
2981
|
+
return (
|
|
2982
|
+
`${head}${clamped}\n\nNAME IT IN YOUR \`\`\`awaiting FENCE TOO (\`runs: [${fenceName}]\`) — the watcher does the ` +
|
|
2983
|
+
`waking, the fence is what lets you come to rest and shows the human what you are waiting for.\n\n` +
|
|
2984
|
+
`DROP IT when it stops mattering (\`frizzctl watch-run drop ${id}\`).\n\n${armedRunWatchList(result)}`
|
|
2985
|
+
)
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2845
2988
|
/** The monitors armed on this thread, as every `monitor` action reads them back.
|
|
2846
2989
|
* @param {{ watches?: Array<{id: string, command: string, every: string, expiresAt: string, runs: number, lastRun?: {outcome: string, exitCode: number|null}}> }|undefined} result */
|
|
2847
2990
|
function armedCommandWatchList(result) {
|
|
@@ -3099,6 +3242,19 @@ const CLI = {
|
|
|
3099
3242
|
then: { add: ["target"], drop: ["id"] },
|
|
3100
3243
|
examples: ["frizzctl watch-issue add acme/app#482 --for 30d", "frizzctl watch-issue list", "frizzctl watch-issue drop isw_ab12cd34"],
|
|
3101
3244
|
},
|
|
3245
|
+
watch_run: {
|
|
3246
|
+
group: "Waiting",
|
|
3247
|
+
summary: "Wake on a GitHub Actions run: a job going red, an environment's approval, the run ending",
|
|
3248
|
+
positional: ["action"],
|
|
3249
|
+
alias: { remove: "drop", rm: "drop", cancel: "drop" },
|
|
3250
|
+
then: { add: ["target"], drop: ["id"] },
|
|
3251
|
+
examples: [
|
|
3252
|
+
"frizzctl watch-run add reylosql/reylo/actions/runs/45656829814 --for 6h",
|
|
3253
|
+
"frizzctl watch-run add acme/app@3f9e2c1 --workflow test.yml --for 2h",
|
|
3254
|
+
"frizzctl watch-run list",
|
|
3255
|
+
"frizzctl watch-run drop rnw_ab12cd34ef56",
|
|
3256
|
+
],
|
|
3257
|
+
},
|
|
3102
3258
|
monitor: {
|
|
3103
3259
|
group: "Waiting",
|
|
3104
3260
|
summary: "Wake when a command the server re-runs exits 0, or with --persistent on every line a script prints",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gh
|
|
3
|
-
description: The gh-CLI playbook for a frizz worker that can reach GitHub (invoke as frizz:gh). Load this whenever your effort touches GitHub — reading or triaging an issue or PR, reviewing a diff, checking CI/release status, or searching issues/PRs — to use `gh` eagerly and correctly, whether plain `gh` is signed in, reads with Frizz's read-only credential while writes go through Keyward (`keyward --reason "…" -- gh …`), or is signed out behind Keyward: the read-vs-write boundary (never comment/label/close/merge unless the human asks), concrete read recipes, Keyward's failure lines and what to do on each, and waiting on CI and
|
|
3
|
+
description: The gh-CLI playbook for a frizz worker that can reach GitHub (invoke as frizz:gh). Load this whenever your effort touches GitHub — reading or triaging an issue or PR, reviewing a diff, checking CI/release status, or searching issues/PRs — to use `gh` eagerly and correctly, whether plain `gh` is signed in, reads with Frizz's read-only credential while writes go through Keyward (`keyward --reason "…" -- gh …`), or is signed out behind Keyward: the read-vs-write boundary (never comment/label/close/merge unless the human asks), concrete read recipes, Keyward's failure lines and what to do on each, and waiting on CI, reviews and workflow runs with `frizzctl watch-pr add` / `watch-issue add` / `watch-run add`. The session-seed hook injects a pointer here naming the mode: `⟦gh available, read-only⟧`, `⟦gh available⟧` or `⟦gh available through Keyward⟧`.
|
|
4
4
|
version: 0.3.0
|
|
5
5
|
metadata:
|
|
6
6
|
internal: true
|
|
@@ -163,6 +163,20 @@ human (a ` ```question ` fence) — waiting on a person is never a park. The das
|
|
|
163
163
|
go/no-go remains a registered question. If the next check deliberately belongs at a named wall-clock
|
|
164
164
|
instant, set a durable timer with `frizzctl timer set` and park with its id in your fence's `timers:` list.
|
|
165
165
|
|
|
166
|
+
### Wait on a GitHub Actions run with `frizzctl watch-run`
|
|
167
|
+
|
|
168
|
+
A release run, main's CI after a merge, a deploy:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
frizzctl watch-run add OWNER/REPO/actions/runs/RUN_ID --for 6h
|
|
172
|
+
frizzctl watch-run add OWNER/REPO@SHA --workflow test.yml --for 2h # the run may not have started yet
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Rest on it with `runs: [OWNER/REPO/actions/runs/RUN_ID]` (or the `OWNER/REPO@SHA` you registered) and
|
|
176
|
+
`status: working`. It wakes you when a job goes red, when the run waits on an environment's approval
|
|
177
|
+
(with the approve command filled in, which needs a credential that can write), and when the run ends. A
|
|
178
|
+
pass settles it; a red end stays armed so a re-run of the failed jobs is followed.
|
|
179
|
+
|
|
166
180
|
### Watching inside a turn — only where plain `gh` can read
|
|
167
181
|
|
|
168
182
|
Sometimes you want the verdict inside the turn you are in, not as a wake after a rest: a CI run you
|
|
@@ -201,7 +215,7 @@ such as `push` and `pull_request` both contribute to the aggregate verdict.
|
|
|
201
215
|
`TaskOutput` is deprecated. Do not fake waiting with `echo waiting` or sleep-only Bash calls.
|
|
202
216
|
|
|
203
217
|
Both mechanisms are session-bound: they die with the session, and a rest does not wait on them. A wait
|
|
204
|
-
you rest on is `frizzctl watch-pr` / `watch-issue`.
|
|
218
|
+
you rest on is `frizzctl watch-pr` / `watch-issue` / `watch-run`.
|
|
205
219
|
|
|
206
220
|
## Fitting gh work into your thread type
|
|
207
221
|
|
package/web-dist/assets/{abnfDiagram-VCTEODGH-D5EqHQdx.js → abnfDiagram-VCTEODGH-CnmzOcow.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-KkCejDNC.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-C4XfhTaE.js";import"./chunk-DU6HZSFF-DqlwHUqE.js";import"./chunk-CLGD4ZFX-CAZl_sMf.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-NKnLeN2y.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-KkCejDNC.js";export{e as createArchitectureServices};
|