frizz-server 0.15.46 → 0.15.48
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 +11065 -10434
- package/dist/dev-child.js +13715 -12488
- package/package.json +1 -1
- package/runtime/cc-worker/DECISIONS.md +25 -0
- package/runtime/cc-worker/hooks/bash-background.d.mts +1 -0
- package/runtime/cc-worker/hooks/bash-background.mjs +8 -2
- package/runtime/cc-worker/hooks/perm-policy.mjs +28 -19
- package/runtime/cc-worker/hooks/session-seed.mjs +10 -1
- package/runtime/cc-worker/lib/frizz-tools.mjs +155 -157
- package/runtime/cc-worker/skills/gh/SKILL.md +2 -0
- package/web-dist/assets/{abnfDiagram-VRR7QNED-dMKEjsHW.js → abnfDiagram-VRR7QNED-B13Nf5uG.js} +1 -1
- package/web-dist/assets/{arc-rNT0YHdg.js → arc-tjQgP-a1.js} +1 -1
- package/web-dist/assets/architecture-TIHT7OUA-cscbyVpp.js +1 -0
- package/web-dist/assets/{architectureDiagram-ZJ3FMSHR-CYD9DZA5.js → architectureDiagram-ZJ3FMSHR-Bse2UXVn.js} +1 -1
- package/web-dist/assets/{blockDiagram-677ZJIJ3-CfxVXTmt.js → blockDiagram-677ZJIJ3-BLJZnqTz.js} +1 -1
- package/web-dist/assets/{c4Diagram-LMCZKHZV-CURoUkcF.js → c4Diagram-LMCZKHZV-DO7oo4h9.js} +1 -1
- package/web-dist/assets/channel-ChsreyIE.js +1 -0
- package/web-dist/assets/{chunk-32BRIVSS-yHDsUxjG.js → chunk-32BRIVSS-DCVxFWaV.js} +1 -1
- package/web-dist/assets/{chunk-52WLFC77-ZOa2pNRf.js → chunk-52WLFC77-Cg3jpJ_e.js} +1 -1
- package/web-dist/assets/{chunk-C7G6YPKG-6kS80FwC.js → chunk-C7G6YPKG-Cb_zdGzQ.js} +1 -1
- package/web-dist/assets/{chunk-EX3LRPZG-ChL3TCQ1.js → chunk-EX3LRPZG-C57JKsUG.js} +1 -1
- package/web-dist/assets/{chunk-FWX5IMBZ-CZA0PJ2q.js → chunk-FWX5IMBZ-2PvmKNIs.js} +2 -2
- package/web-dist/assets/{chunk-HOUHSVGY-DADpdwih.js → chunk-HOUHSVGY-rlZvVAjI.js} +1 -1
- package/web-dist/assets/{chunk-ICXQ74PX-DsZXrGey.js → chunk-ICXQ74PX-CUDlgeXU.js} +1 -1
- package/web-dist/assets/{chunk-MOJQB5TN-QXPP07cw.js → chunk-MOJQB5TN-BGaw_67a.js} +1 -1
- package/web-dist/assets/{chunk-OGEWGWER-BnCPcBUr.js → chunk-OGEWGWER-CEeg8UMh.js} +1 -1
- package/web-dist/assets/{chunk-PUDLZKDR-7cwzaMKa.js → chunk-PUDLZKDR-xwNSwwyn.js} +1 -1
- package/web-dist/assets/{chunk-Q4XR5HBZ-CfaCFnry.js → chunk-Q4XR5HBZ-msU0GK4L.js} +1 -1
- package/web-dist/assets/{chunk-RYQCIY6F-Dw3inyG6.js → chunk-RYQCIY6F-BBiFFmSH.js} +1 -1
- package/web-dist/assets/{chunk-V7JOEXUC-BUGdtSDc.js → chunk-V7JOEXUC-kdk1Kj1f.js} +1 -1
- package/web-dist/assets/{chunk-VAUOI2AC-BajrAZEY.js → chunk-VAUOI2AC-DpbSQ-0T.js} +1 -1
- package/web-dist/assets/{chunk-VR4S4FIN-CZhwOnY-.js → chunk-VR4S4FIN-BW2QJzbp.js} +1 -1
- package/web-dist/assets/{chunk-WYO6CB5R-DPplcyki.js → chunk-WYO6CB5R-BouXl6Ea.js} +1 -1
- package/web-dist/assets/{chunk-XXDRQBXY-Dxvo6Aj4.js → chunk-XXDRQBXY-DISoSt1F.js} +1 -1
- package/web-dist/assets/{chunk-ZGVPDNZ5-D_nMWwGu.js → chunk-ZGVPDNZ5-C7QT30bj.js} +1 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-DzRcM19r.js +1 -0
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-DzRcM19r.js +1 -0
- package/web-dist/assets/{cose-bilkent-JH36ORCC-EXH8BJZr.js → cose-bilkent-JH36ORCC-B4uC0Pku.js} +1 -1
- package/web-dist/assets/{cynefin-VYW2F7L2-BRCpSA3J.js → cynefin-VYW2F7L2-KGwY_f6i.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-TSTJHNR4-DT-zxoY8.js → cynefinDiagram-TSTJHNR4-D1KgH5Uh.js} +1 -1
- package/web-dist/assets/{dagre-VKFMJZFB-eCkdmvvX.js → dagre-VKFMJZFB-CpBkJUGX.js} +1 -1
- package/web-dist/assets/{diagram-FQU43EPY-C0ERgkJs.js → diagram-FQU43EPY-DJLjwc2E.js} +1 -1
- package/web-dist/assets/{diagram-G47NLZAW-wnblykLF.js → diagram-G47NLZAW-R_nxXPm1.js} +1 -1
- package/web-dist/assets/{diagram-NH7WQ7WH-DflsisJs.js → diagram-NH7WQ7WH-BgEKOFUU.js} +1 -1
- package/web-dist/assets/{diagram-OA4YK3LP-Dy8tJizx.js → diagram-OA4YK3LP-DQZYQQmQ.js} +1 -1
- package/web-dist/assets/{diagram-WEI45ONY-C7cuTuRM.js → diagram-WEI45ONY-BPJydYC6.js} +1 -1
- package/web-dist/assets/{dist-lcrHUGwW.js → dist-KklTF2b-.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-CCIWWBDH-Be_-xy5Y.js → ebnfDiagram-CCIWWBDH-DwgS-ruz.js} +1 -1
- package/web-dist/assets/{erDiagram-Q63AITRT-Ze05Sekz.js → erDiagram-Q63AITRT-CpxSzpX_.js} +1 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-pAxX2kmp.js +1 -0
- package/web-dist/assets/flowDiagram-23GEKE2U-CNUJOYgE.js +1 -0
- package/web-dist/assets/{ganttDiagram-NO4QXBWP-DXPLAeR9.js → ganttDiagram-NO4QXBWP-DKV9dDLx.js} +1 -1
- package/web-dist/assets/{gitGraph-TEB2WS4Q-qd8HrnTL.js → gitGraph-TEB2WS4Q-Di3-VfYF.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-BUlIs4PU.js → gitGraphDiagram-IHSO6WYX-CZd5jqgf.js} +1 -1
- package/web-dist/assets/index-CnoKcjA-.css +2 -0
- package/web-dist/assets/index-dgMYbeEx.js +378 -0
- package/web-dist/assets/{info-DKCQHKI2-BzkLurvw.js → info-DKCQHKI2-zUEOPGRX.js} +1 -1
- package/web-dist/assets/{infoDiagram-FWYZ7A6U-D9sZ9oDP.js → infoDiagram-FWYZ7A6U-C2fsvj8W.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-BzF_3YFM.js → ishikawaDiagram-FXEZZL3T-DDputQI8.js} +1 -1
- package/web-dist/assets/{journeyDiagram-5HDEW3XC-DFTScR2Z.js → journeyDiagram-5HDEW3XC-CiwOnh1u.js} +1 -1
- package/web-dist/assets/{kanban-definition-HUTT4EX6-BLzFoVGW.js → kanban-definition-HUTT4EX6-P8OTxob-.js} +1 -1
- package/web-dist/assets/{line-Do8dUGBy.js → line-Kk41edHq.js} +1 -1
- package/web-dist/assets/{linear-DuRi0RMF.js → linear-CCCAZbB0.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-Cg30o9F2.js → mermaid-parser.core-BIyJ5CJF.js} +3 -3
- package/web-dist/assets/{mermaid.core-BqJlujeQ.js → mermaid.core-CrqCm1sE.js} +3 -3
- package/web-dist/assets/{mindmap-definition-LN4V7U3C-HQlN-9Bu.js → mindmap-definition-LN4V7U3C-CbKVoOZ5.js} +1 -1
- package/web-dist/assets/{packet-7NZHBO7P-U04BXIOt.js → packet-7NZHBO7P-Dk5Sv2nR.js} +1 -1
- package/web-dist/assets/{pegDiagram-2B236MQR-DgY7HtfT.js → pegDiagram-2B236MQR-DImDz479.js} +1 -1
- package/web-dist/assets/{pie-RZYD4A2V-CNmbhkWK.js → pie-RZYD4A2V-D4HndtMy.js} +1 -1
- package/web-dist/assets/{pieDiagram-ENE6RG2P-DZAgx8HX.js → pieDiagram-ENE6RG2P-C2e3M1_h.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-BgwkFnnW.js → quadrantDiagram-ABIIQ3AL-Dt3f_lrO.js} +1 -1
- package/web-dist/assets/{radar-I7S5WNFK-uSk4Y1ho.js → radar-I7S5WNFK-Bgms7oi0.js} +1 -1
- package/web-dist/assets/{railroad-3IZDKUUU-DYUKnC5s.js → railroad-3IZDKUUU-BZvaJJq3.js} +1 -1
- package/web-dist/assets/railroad-abnf-AHOZXSZD-BaE30t8x.js +1 -0
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-Cuetb6tx.js +1 -0
- package/web-dist/assets/railroad-peg-LSFZ7HO6-DDs0AouG.js +1 -0
- package/web-dist/assets/{railroadDiagram-RFXS5EU6-D50qDJK9.js → railroadDiagram-RFXS5EU6-CBZHt0Mo.js} +1 -1
- package/web-dist/assets/{requirementDiagram-TGXJPOKE-BcYVVHnq.js → requirementDiagram-TGXJPOKE-BxSs_q3D.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-HTMAVEWB-PzXMSHpA.js → sankeyDiagram-HTMAVEWB-DeJR64nI.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-mGrOXhjH.js → sequenceDiagram-DBY2YBRQ-oOI0fQW_.js} +1 -1
- package/web-dist/assets/{src-DgdnlNtf.js → src-DLhDEMjC.js} +1 -1
- package/web-dist/assets/{stateDiagram-2N3HPSRC-DVtnHF84.js → stateDiagram-2N3HPSRC-C0geqCc2.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-l7nncg_Z.js +1 -0
- package/web-dist/assets/{swimlanes-5IMT3BWC-CpFBm_uD.js → swimlanes-5IMT3BWC-BABUQ-Hv.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-BAhikHjx.js +8 -0
- package/web-dist/assets/{timeline-definition-FHXFAJF6-BtulIlxh.js → timeline-definition-FHXFAJF6-CCY_OuVM.js} +1 -1
- package/web-dist/assets/{treeView-QDETBFTQ-DvYZWcpI.js → treeView-QDETBFTQ-CjszFvr3.js} +1 -1
- package/web-dist/assets/{treemap-6X3UGDF4-BLNXL2Uy.js → treemap-6X3UGDF4-BbdOWC-4.js} +1 -1
- package/web-dist/assets/{vennDiagram-L72KCM5P-pRoAWpIZ.js → vennDiagram-L72KCM5P-OGzW7d1w.js} +1 -1
- package/web-dist/assets/{wardley-OPB4EBWU-Cs-85TFO.js → wardley-OPB4EBWU-GgVEIZwC.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-EHGQE667-CX1pViTS.js → wardleyDiagram-EHGQE667-CJKRWMOx.js} +1 -1
- package/web-dist/assets/{xychartDiagram-FW5EYKEG-PscAnIL7.js → xychartDiagram-FW5EYKEG-biGPRYAN.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/assets/architecture-TIHT7OUA-NCeuUKT3.js +0 -1
- package/web-dist/assets/channel-C7OqV6FU.js +0 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-C0vbHYBX.js +0 -1
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-C0vbHYBX.js +0 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-3mcZ7Om7.js +0 -1
- package/web-dist/assets/flowDiagram-23GEKE2U-C1w6bUoP.js +0 -1
- package/web-dist/assets/index-CuESixAT.css +0 -2
- package/web-dist/assets/index-GV9pE9M2.js +0 -378
- package/web-dist/assets/railroad-abnf-AHOZXSZD-IkzutLqe.js +0 -1
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-BxRu9OFq.js +0 -1
- package/web-dist/assets/railroad-peg-LSFZ7HO6-B_oCO_d6.js +0 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-SdAGeC8G.js +0 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-DFV8nG2S.js +0 -8
|
@@ -501,7 +501,7 @@ const UNWATCH = {
|
|
|
501
501
|
"it blocks `done` until it is withdrawn.\n\n" +
|
|
502
502
|
"You do NOT need this when the work simply finishes: frizz settles the row itself and wakes you. " +
|
|
503
503
|
"`frizzctl activity` prints the id of everything you hold. A `watch-pr` / `watch-issue` id (`prw_…` / " +
|
|
504
|
-
"`isw_…`), a `timer` id (`tmr_…`) or a `
|
|
504
|
+
"`isw_…`), a `timer` id (`tmr_…`) or a `monitor` id (`cmw_…`) is withdrawn here too.",
|
|
505
505
|
inputSchema: {
|
|
506
506
|
type: "object",
|
|
507
507
|
properties: {
|
|
@@ -662,7 +662,7 @@ const STEER = {
|
|
|
662
662
|
description:
|
|
663
663
|
"The thread to message: its slug (`fix-queue-focus`), or any link naming it — the " +
|
|
664
664
|
"`[title](/thread/<slug>)` link `frizzctl spawn-thread` prints, or a full board URL such as " +
|
|
665
|
-
"`http://localhost:9393/project/frizz/thread/<slug
|
|
665
|
+
"`http://localhost:9393/project/frizz/thread/<slug>`, whose `/project/<slug>/` also " +
|
|
666
666
|
"names the thread's project.",
|
|
667
667
|
},
|
|
668
668
|
project: {
|
|
@@ -819,129 +819,123 @@ const UNLINK = {
|
|
|
819
819
|
},
|
|
820
820
|
}
|
|
821
821
|
|
|
822
|
-
//
|
|
823
|
-
//
|
|
824
|
-
//
|
|
822
|
+
// RETIRED (2026-11-06): `frizzctl watch-command` is `frizzctl monitor` now. The two shared a table, an id and
|
|
823
|
+
// a fence key, and for an hour on 2026-11-06 they were one command under this name with `--persistent`;
|
|
824
|
+
// then the maintainer named it: "I want them to be called monitors. That's a better name." It stays in the
|
|
825
|
+
// tool list, in its place, as `ask` and `secret` do: a resumed worker keeps the contract it started with,
|
|
826
|
+
// so it may still call this, and the refusal is the command to run instead.
|
|
827
|
+
const WATCH_COMMAND_RETIRED =
|
|
828
|
+
"NOT registered — `frizzctl watch-command` is retired (2026-11-06), and nothing was armed or dropped. It is " +
|
|
829
|
+
"`frizzctl monitor` now, with the same arguments:\n\n" +
|
|
830
|
+
" frizzctl monitor add \"<check that exits 0 once it holds>\" --every 5m --for 6h\n" +
|
|
831
|
+
" frizzctl monitor add \"<script>\" --persistent --description \"<what it watches>\" --for 1d\n" +
|
|
832
|
+
" frizzctl monitor list\n" +
|
|
833
|
+
" frizzctl monitor drop <id>\n\n" +
|
|
834
|
+
"Anything you already registered keeps running under the same `cmw_…` id. Rest on it with " +
|
|
835
|
+
"`monitors: [cmw_…]`. `frizzctl monitor --help` has the rest."
|
|
825
836
|
const WATCH_COMMAND = {
|
|
826
837
|
name: "watch_command",
|
|
827
|
-
description:
|
|
828
|
-
|
|
829
|
-
"the thing you are waiting for is true — a package version npm serves, a release run that finished, a " +
|
|
830
|
-
"URL that answers — and the SERVER runs it every `--every` until it does, then wakes you ONCE with " +
|
|
831
|
-
"the command and the end of its output. Nothing of yours runs meanwhile, so your thread can be " +
|
|
832
|
-
"hibernated while it rests. A polling loop in a background shell (`until …; do sleep 300; done`) pins " +
|
|
833
|
-
"your whole process tree, ~250 MB, for as long as it loops; this is that loop without the cost.\n\n" +
|
|
834
|
-
"THE CONDITION IS EXIT STATUS 0, and nothing else. Write the check so it FAILS until the condition " +
|
|
835
|
-
"holds: `npm view frizz@0.13.12 version` (non-zero while npm does not serve it), `gh run view 123 " +
|
|
836
|
-
"--json conclusion -q .conclusion | grep -qx success`, `curl -fsS http://localhost:5173/health`.\n\n" +
|
|
837
|
-
"IT RUNS ON THE SERVER, NOT IN YOUR SHELL: `/bin/sh -c` in the project root, with the server's " +
|
|
838
|
-
"environment and PATH, stdin closed, killed after 2m. Nothing your session exported, no aliases, no " +
|
|
839
|
-
"functions. A first check runs at registration: exit 0 means the condition already holds and nothing " +
|
|
840
|
-
"is armed, and a command the server cannot run at all (`command not found`) is refused.\n\n" +
|
|
841
|
-
"ONLY ON A THREAD WITH NO PERMISSION CHECKS. The server runs the command with no permission prompt and " +
|
|
842
|
-
"outside any sandbox, so Frizz refuses it unless this thread runs in `bypassPermissions` mode with " +
|
|
843
|
-
"Claude Code's sandbox off, and refuses it on Codex. The refusal says why; wait in a background shell " +
|
|
844
|
-
"then.\n\n" +
|
|
845
|
-
"ONE-SHOT: the first passing check settles it. When `--for` runs out it is cancelled and you are woken " +
|
|
846
|
-
"to re-decide. Name its id in your ```awaiting fence — `commands: [cmw_…]` with `status: watching`. " +
|
|
847
|
-
"Registering is idempotent on the exact command text. `list` reads back what is armed, with each " +
|
|
848
|
-
"watch's last check; `drop` withdraws one (so does `frizzctl unwatch <id>`). Only ever your OWN thread's.",
|
|
849
|
-
inputSchema: {
|
|
850
|
-
type: "object",
|
|
851
|
-
properties: {
|
|
852
|
-
action: {
|
|
853
|
-
type: "string",
|
|
854
|
-
enum: ["add", "list", "drop"],
|
|
855
|
-
description:
|
|
856
|
-
"`add` registers a watch (idempotent per command); `drop` withdraws one by id; `list` reads back " +
|
|
857
|
-
"every watch armed on this thread, with its last check, without changing anything.",
|
|
858
|
-
},
|
|
859
|
-
command: {
|
|
860
|
-
type: "string",
|
|
861
|
-
description:
|
|
862
|
-
"Required for `add`. The check, as one shell command line run with `/bin/sh -c` in the project " +
|
|
863
|
-
"root. Exit 0 means the condition holds. Use absolute paths for anything not on a plain PATH.",
|
|
864
|
-
},
|
|
865
|
-
every: {
|
|
866
|
-
type: "string",
|
|
867
|
-
description:
|
|
868
|
-
"Required for `add`. How often to check, as a DURATION — `1m`, `5m`, `1h` (min 1m, max 24h). " +
|
|
869
|
-
"Pick it for how soon you need to know: a release in npm's review is minutes to hours, so `5m`.",
|
|
870
|
-
},
|
|
871
|
-
for: {
|
|
872
|
-
type: "string",
|
|
873
|
-
description:
|
|
874
|
-
"Required for `add`. How long to keep checking, as a DURATION — `2h`, `1d`, `7d` (max 7d). When it " +
|
|
875
|
-
"runs out the watch is cancelled and you are woken to decide what the silence means.",
|
|
876
|
-
},
|
|
877
|
-
id: {
|
|
878
|
-
type: "string",
|
|
879
|
-
description: "Required for `drop`. The `cmw_…` id `add` printed (or that `list` and `frizzctl activity` show).",
|
|
880
|
-
},
|
|
881
|
-
},
|
|
882
|
-
required: ["action"],
|
|
883
|
-
},
|
|
838
|
+
description: "RETIRED (2026-11-06): `watch_command` is `monitor` now, with the same arguments. This only refuses, and the refusal shows the command.",
|
|
839
|
+
inputSchema: { type: "object", properties: {} },
|
|
884
840
|
}
|
|
885
841
|
|
|
886
|
-
//
|
|
887
|
-
//
|
|
888
|
-
//
|
|
842
|
+
// A MONITOR (2026-10-11 as `watch-command`; one command with `--persistent` since 2026-11-06): a wait on
|
|
843
|
+
// something outside the thread, run by the SERVER. It exists because the alternative was a polling loop or
|
|
844
|
+
// Claude Code's own Monitor tool in the worker's session, either of which pins the thread's whole process
|
|
845
|
+
// tree: hibernation refuses a thread holding one. See packages/server/src/command-watch.ts, where the rows
|
|
846
|
+
// are still called command watches.
|
|
889
847
|
const MONITOR = {
|
|
890
848
|
name: "monitor",
|
|
891
849
|
description:
|
|
892
|
-
"
|
|
893
|
-
"
|
|
894
|
-
"
|
|
895
|
-
"
|
|
896
|
-
"
|
|
897
|
-
"
|
|
898
|
-
"
|
|
899
|
-
"
|
|
900
|
-
"
|
|
850
|
+
"A MONITOR: WAIT ON SOMETHING OUTSIDE THE THREAD WITHOUT HOLDING A PROCESS. The SERVER runs a shell " +
|
|
851
|
+
"command for you, so nothing of yours runs meanwhile and your thread can be hibernated while it rests. A polling " +
|
|
852
|
+
"loop in a background shell (`until …; do sleep 300; done`) pins your whole process tree, ~250 MB, for " +
|
|
853
|
+
"as long as it loops; this is that loop without the cost. `--persistent` picks between two shapes, and " +
|
|
854
|
+
"it changes what the command has to be: a check that finishes, or a script that keeps running.\n\n" +
|
|
855
|
+
"BY DEFAULT, A CHECK THAT WAKES YOU ONCE. Give it a command that exits 0 once the thing you are waiting " +
|
|
856
|
+
"for is true — a package version npm serves, a release run that finished, a URL that answers. Frizz " +
|
|
857
|
+
"runs it every `--every` until it does, then wakes you with the command and the end of its output. EXIT " +
|
|
858
|
+
"STATUS 0 IS THE CONDITION, and nothing else, so write the check to FAIL until it holds: `npm view " +
|
|
859
|
+
"frizz@0.13.12 version` (non-zero while npm does not serve it), `gh run view 123 --json conclusion -q " +
|
|
860
|
+
".conclusion | grep -qx success`, `curl -fsS http://localhost:5173/health`. Each run is killed after " +
|
|
861
|
+
"2m. A first check runs at registration: exit 0 means the condition already holds and nothing is armed, " +
|
|
862
|
+
"and a command the server cannot run at all (`command not found`) is refused. The first passing check " +
|
|
863
|
+
"settles it.\n\n" +
|
|
864
|
+
"WITH `--persistent`, A SCRIPT THAT WAKES YOU ON EVERY LINE. Give it a script that keeps running and " +
|
|
865
|
+
"prints a line each time something happens — a log tail filtered to the lines you would act on, a poll " +
|
|
866
|
+
"loop that prints each new row a query returns, a listener on a socket — with a `--description` and no " +
|
|
867
|
+
"`--every`. Register once, woken many times. Claude Code's own Monitor tool lives in your session, pins " +
|
|
868
|
+
"your process tree while it runs, and dies with it; this does none of that. A pull request or an issue " +
|
|
869
|
+
"needs neither shape: `watch-pr` and `watch-issue` already wake you on each comment, review and check.\n\n" +
|
|
870
|
+
"ITS STDOUT IS THE EVENT STREAM. Lines printed within 200ms of each other are one event; blank lines are " +
|
|
901
871
|
"nothing. Stderr is never an event, but its tail is reported when the script exits — merge it with " +
|
|
902
872
|
"`2>&1` into a filter if its failures are what you watch for. Every stage of a pipe must flush per line " +
|
|
903
873
|
"(`grep --line-buffered`, `awk` with `fflush()`), or lines sit in a buffer unseen.\n\n" +
|
|
904
874
|
"EVERY EVENT IS A TURN OF YOURS, so print only what you would act on — never raw logs. Events are " +
|
|
905
|
-
"merged while you work and for 5m after each wake, so a burst costs one turn; but a
|
|
875
|
+
"merged while you work and for 5m after each wake, so a burst costs one turn; but a script that prints " +
|
|
906
876
|
"30 events inside 10m is stopped, and you are told to tighten its filter. Cover the failure signals as " +
|
|
907
877
|
"well as the success one: silence reads exactly like \"still running\".\n\n" +
|
|
908
|
-
"
|
|
909
|
-
"environment and PATH, stdin closed. Nothing your session exported, no aliases, no functions; use " +
|
|
910
|
-
"absolute paths. Registration watches it for 2s: anything it prints by then, or its exit, is in the " +
|
|
878
|
+
"Registration watches a persistent script for 2s: anything it prints by then, or its exit, is in the " +
|
|
911
879
|
"reply instead of a wake. If Frizz restarts, the script is started again from the top — so make its " +
|
|
912
880
|
"first lines harmless to repeat (baseline silently, then print only what is new: `tail -n0 -F` starts " +
|
|
913
|
-
"at the end of the file). What happened while it was down is the script's to catch up on, or missed
|
|
914
|
-
"
|
|
881
|
+
"at the end of the file). What happened while it was down is the script's to catch up on, or missed. " +
|
|
882
|
+
"It ends when the script exits (you are woken once with the exit code and its last output), when " +
|
|
915
883
|
"`--for` runs out, or when you drop it. A poll loop that should stop on a known end — a CI run " +
|
|
916
|
-
"finishing — exits itself
|
|
917
|
-
"
|
|
918
|
-
"
|
|
919
|
-
"
|
|
920
|
-
"
|
|
884
|
+
"finishing — exits itself.\n\n" +
|
|
885
|
+
"BOTH RUN ON THE SERVER, NOT IN YOUR SHELL: `/bin/sh -c` in the project root, with the server's " +
|
|
886
|
+
"environment and PATH, stdin closed. Nothing your session exported, no aliases, no functions; use " +
|
|
887
|
+
"absolute paths.\n\n" +
|
|
888
|
+
"BOTH ONLY ON A THREAD WITH NO PERMISSION CHECKS. The server runs the command with no permission prompt " +
|
|
889
|
+
"and outside any sandbox, so Frizz refuses it unless this thread runs in `bypassPermissions` mode with " +
|
|
890
|
+
"Claude Code's sandbox off, and refuses it on Codex. The refusal says why; wait in a background shell " +
|
|
891
|
+
"then.\n\n" +
|
|
892
|
+
"When `--for` runs out either one is stopped and you are woken to re-decide. Name its id in your " +
|
|
893
|
+
"```awaiting fence — `monitors: [cmw_…]` with `status: watching`. Registering is idempotent on the " +
|
|
894
|
+
"exact command text. `list` reads back what is armed; `drop` withdraws one and kills a running script " +
|
|
895
|
+
"(so does `frizzctl unwatch <id>`). Only ever your OWN thread's.",
|
|
921
896
|
inputSchema: {
|
|
922
897
|
type: "object",
|
|
923
898
|
properties: {
|
|
924
899
|
action: {
|
|
925
900
|
type: "string",
|
|
926
901
|
enum: ["add", "list", "drop"],
|
|
927
|
-
description:
|
|
902
|
+
description:
|
|
903
|
+
"`add` registers a monitor (idempotent per command); `drop` withdraws one by id; `list` reads back " +
|
|
904
|
+
"every monitor armed on this thread, with its last check or its events, without changing anything.",
|
|
928
905
|
},
|
|
929
906
|
command: {
|
|
930
907
|
type: "string",
|
|
931
908
|
description:
|
|
932
|
-
"Required for `add`.
|
|
933
|
-
"
|
|
909
|
+
"Required for `add`. One shell command line run with `/bin/sh -c` in the project root: the check, " +
|
|
910
|
+
"whose exit 0 means the condition holds, or with `--persistent` the script, each line of whose " +
|
|
911
|
+
"stdout is an event. A longer script belongs in a file this line runs. Use absolute paths for " +
|
|
912
|
+
"anything not on a plain PATH.",
|
|
934
913
|
},
|
|
935
|
-
|
|
914
|
+
every: {
|
|
936
915
|
type: "string",
|
|
937
916
|
description:
|
|
938
|
-
"Required for `add
|
|
939
|
-
"
|
|
940
|
-
"
|
|
917
|
+
"Required for `add`, and refused with `--persistent`. How often to check, as a DURATION — `1m`, " +
|
|
918
|
+
"`5m`, `1h` (min 1m, max 24h). Pick it for how soon you need to know: a release in npm's review is " +
|
|
919
|
+
"minutes to hours, so `5m`.",
|
|
941
920
|
},
|
|
942
921
|
for: {
|
|
943
922
|
type: "string",
|
|
944
|
-
description:
|
|
923
|
+
description:
|
|
924
|
+
"Required for `add`. How long to keep it going, as a DURATION — `2h`, `1d`, `7d` (max 7d). When it " +
|
|
925
|
+
"runs out the monitor is stopped and you are woken to decide what the silence means.",
|
|
926
|
+
},
|
|
927
|
+
persistent: {
|
|
928
|
+
type: "boolean",
|
|
929
|
+
description:
|
|
930
|
+
"Run the command as a script that keeps running, and wake on every line it prints, instead of " +
|
|
931
|
+
"re-running it until it exits 0. Takes `--description` in place of `--every`.",
|
|
932
|
+
},
|
|
933
|
+
description: {
|
|
934
|
+
type: "string",
|
|
935
|
+
description:
|
|
936
|
+
"Required with `--persistent`, and refused without it. What it watches, in a few words, sentence " +
|
|
937
|
+
"case (\"Errors in deploy.log\", \"Failed jobs in jobs.ndjson\"): the name the human sees on its row " +
|
|
938
|
+
"and its drawer, and the label on every wake. Never the script itself.",
|
|
945
939
|
},
|
|
946
940
|
id: {
|
|
947
941
|
type: "string",
|
|
@@ -1024,10 +1018,13 @@ const HANDLERS = {
|
|
|
1024
1018
|
}
|
|
1025
1019
|
|
|
1026
1020
|
// The slug out of whatever a worker has in hand for a thread: the slug itself, the `[title](/thread/<slug>)`
|
|
1027
|
-
// link spawn_thread returns, or a
|
|
1028
|
-
// thread
|
|
1029
|
-
|
|
1030
|
-
const
|
|
1021
|
+
// link spawn_thread returns, or a URL the human copied out of the address bar — the thread's full-screen
|
|
1022
|
+
// page (`…/project/<p>/thread/<slug>`, `/full` on one minted before 2026-11-07) or a board with it open in
|
|
1023
|
+
// the drawer (`…/project/<p>?thread=<slug>`). Both also name the thread's project.
|
|
1024
|
+
const THREAD_LINK = /\/thread\/([^/?#)\s]+)|[?&]thread=([^&#)\s]+)/
|
|
1025
|
+
const PROJECT_LINK = /\/project\/([^/?#)\s]+)(?:\/thread\/|[^?#)\s]*\?(?:[^#)\s]*&)?thread=)/
|
|
1026
|
+
// The Console's drawer names a thread by key, `<project>~<slug>` (`/console?thread=billing~retry`).
|
|
1027
|
+
const THREAD_KEY = /^([^~]+)~(.+)$/
|
|
1031
1028
|
// The project out of any link into a board (`…/project/<p>/…`), for `spawn-thread --project`.
|
|
1032
1029
|
const PROJECT_SEGMENT = /\/project\/([^/?#)\s]+)/
|
|
1033
1030
|
|
|
@@ -1038,8 +1035,11 @@ async function steer(args) {
|
|
|
1038
1035
|
const message = typeof args.message === "string" ? args.message.trim() : ""
|
|
1039
1036
|
if (!raw) throw new Error("`to` is required — the slug of the thread to message, or a link naming it")
|
|
1040
1037
|
if (!message) throw new Error("`message` is required and must be a non-empty string")
|
|
1041
|
-
const
|
|
1042
|
-
const
|
|
1038
|
+
const linkedThread = THREAD_LINK.exec(raw)
|
|
1039
|
+
const linkedSlug = decodeURIComponent(linkedThread?.[1] ?? linkedThread?.[2] ?? raw)
|
|
1040
|
+
const keyed = linkedThread ? THREAD_KEY.exec(linkedSlug) : null
|
|
1041
|
+
const to = keyed ? keyed[2] : linkedSlug
|
|
1042
|
+
const linked = PROJECT_LINK.exec(raw)?.[1] ?? (keyed ? encodeURIComponent(keyed[1]) : undefined)
|
|
1043
1043
|
const named = typeof args.project === "string" ? args.project.trim() : ""
|
|
1044
1044
|
const project = named || (linked ? decodeURIComponent(linked) : "")
|
|
1045
1045
|
if (named && linked && decodeURIComponent(linked) !== named) {
|
|
@@ -1986,8 +1986,8 @@ async function unwatch(args) {
|
|
|
1986
1986
|
if (id.startsWith("cmw_")) {
|
|
1987
1987
|
const dropped = (await callRpc("dropOwnCommandWatch", { slug, id }))?.result
|
|
1988
1988
|
const head = dropped?.dropped
|
|
1989
|
-
? `
|
|
1990
|
-
: `No ARMED
|
|
1989
|
+
? `Monitor ${id} dropped. Frizz will not run it again, and it will not wake you.`
|
|
1990
|
+
: `No ARMED monitor ${id} on this thread — it already ended, expired or was cancelled, or the id is not one of yours.`
|
|
1991
1991
|
return `${head}\n\n${armedCommandWatchList(dropped)}`
|
|
1992
1992
|
}
|
|
1993
1993
|
if (id.startsWith("tmr_")) {
|
|
@@ -2130,7 +2130,7 @@ async function done(args) {
|
|
|
2130
2130
|
parts.push(
|
|
2131
2131
|
`${watches.length} registration${watches.length === 1 ? "" : "s"} still armed:\n${watches.join("\n")}\n` +
|
|
2132
2132
|
"A live wait means the thing you were waiting for has not happened. Wait for it, or drop the ones " +
|
|
2133
|
-
"that stopped mattering (`frizzctl unwatch <id>` takes a watch, a PR or issue watcher, a timer, or a
|
|
2133
|
+
"that stopped mattering (`frizzctl unwatch <id>` takes a watch, a PR or issue watcher, a timer, or a monitor).",
|
|
2134
2134
|
)
|
|
2135
2135
|
}
|
|
2136
2136
|
parts.push("There is no force flag. Resolve them and run `frizzctl done` again.")
|
|
@@ -2232,24 +2232,24 @@ async function watchIssue(args) {
|
|
|
2232
2232
|
)
|
|
2233
2233
|
}
|
|
2234
2234
|
|
|
2235
|
-
/** The
|
|
2235
|
+
/** The monitors armed on this thread, as every `monitor` action reads them back.
|
|
2236
2236
|
* @param {{ watches?: Array<{id: string, command: string, every: string, expiresAt: string, runs: number, lastRun?: {outcome: string, exitCode: number|null}}> }|undefined} result */
|
|
2237
2237
|
function armedCommandWatchList(result) {
|
|
2238
2238
|
const watches = Array.isArray(result?.watches) ? result.watches : []
|
|
2239
|
-
if (!watches.length) return "No
|
|
2239
|
+
if (!watches.length) return "No monitors are armed on this thread — none will wake you."
|
|
2240
2240
|
const lines = watches.map((w) => {
|
|
2241
2241
|
if (w.monitor) {
|
|
2242
2242
|
const events = `${w.monitor.events} event${w.monitor.events === 1 ? "" : "s"} so far`
|
|
2243
2243
|
const latest = w.monitor.lastEvent ? `, the latest at ${w.monitor.lastEvent.at}: ${firstLine(w.monitor.lastEvent.text)}` : ""
|
|
2244
2244
|
const label = w.monitor.description ? ` "${w.monitor.description}"` : ""
|
|
2245
|
-
return ` ${w.id}
|
|
2245
|
+
return ` ${w.id} persistent${label}, running until ${w.expiresAt} — ${events}${latest}\n $ ${w.command}`
|
|
2246
2246
|
}
|
|
2247
2247
|
const last = !w.lastRun
|
|
2248
2248
|
? "no check finished yet"
|
|
2249
2249
|
: `last check ${commandRunClause(w.lastRun)}`
|
|
2250
2250
|
return ` ${w.id} every ${w.every}, until ${w.expiresAt} — ${w.runs} check${w.runs === 1 ? "" : "s"}, ${last}\n $ ${w.command}`
|
|
2251
2251
|
})
|
|
2252
|
-
return `
|
|
2252
|
+
return `Monitors on this thread now:\n${lines.join("\n")}`
|
|
2253
2253
|
}
|
|
2254
2254
|
|
|
2255
2255
|
/** One line of an event, short enough for a list. @param {string} text */
|
|
@@ -2274,9 +2274,9 @@ function outputTail(output) {
|
|
|
2274
2274
|
return `Its output ended:\n${tail.split("\n").map((l) => ` ${l}`).join("\n")}`
|
|
2275
2275
|
}
|
|
2276
2276
|
|
|
2277
|
-
/** The `
|
|
2277
|
+
/** The `monitor` handler: register, withdraw, or read back this thread's monitors.
|
|
2278
2278
|
* @param {Record<string, unknown>} args @returns {Promise<string|Refused>} */
|
|
2279
|
-
async function
|
|
2279
|
+
async function monitor(args) {
|
|
2280
2280
|
const slug = threadSlug()
|
|
2281
2281
|
const action = typeof args.action === "string" ? args.action.trim() : ""
|
|
2282
2282
|
if (action !== "add" && action !== "list" && action !== "drop") {
|
|
@@ -2289,20 +2289,38 @@ async function watchCommand(args) {
|
|
|
2289
2289
|
|
|
2290
2290
|
if (action === "drop") {
|
|
2291
2291
|
const id = typeof args.id === "string" ? args.id.trim() : ""
|
|
2292
|
-
if (!id) throw new Error("`id` is required to drop a
|
|
2292
|
+
if (!id) throw new Error("`id` is required to drop a monitor — take it from `add` or from `list`")
|
|
2293
2293
|
const result = (await callRpc("dropOwnCommandWatch", { slug, id }))?.result
|
|
2294
2294
|
const head = result?.dropped
|
|
2295
|
-
? `
|
|
2296
|
-
: `No ARMED
|
|
2295
|
+
? `Monitor ${id} dropped. Frizz will not run it again, and it will not wake you.`
|
|
2296
|
+
: `No ARMED monitor ${id} on this thread — it already ended, expired or was cancelled, or the id is not one of yours.`
|
|
2297
2297
|
return `${head}\n\n${armedCommandWatchList(result)}`
|
|
2298
2298
|
}
|
|
2299
2299
|
|
|
2300
|
+
const persistent = args.persistent === true
|
|
2300
2301
|
const command = typeof args.command === "string" ? args.command.trim() : ""
|
|
2301
|
-
if (!command)
|
|
2302
|
+
if (!command) {
|
|
2303
|
+
throw new Error(`\`command\` is required — ${persistent ? "a script that keeps running and prints a line per event" : "a shell command that exits 0 once the condition holds"}`)
|
|
2304
|
+
}
|
|
2302
2305
|
const every = typeof args.every === "string" ? args.every.trim() : ""
|
|
2303
|
-
|
|
2306
|
+
const description = typeof args.description === "string" ? args.description.trim() : ""
|
|
2307
|
+
// THE FLAG CHANGES WHAT THE COMMAND HAS TO BE, so neither shape quietly accepts the other's argument: a
|
|
2308
|
+
// cadence on a script would read as if Frizz re-ran it, and a name on a check would go nowhere.
|
|
2309
|
+
if (persistent && every) {
|
|
2310
|
+
throw new Error("`every` does not go with `persistent`: a persistent monitor is one script that keeps running, not a check Frizz re-runs. Drop `every`, or drop `persistent` for a check that exits 0 once the condition holds")
|
|
2311
|
+
}
|
|
2312
|
+
if (!persistent && description) {
|
|
2313
|
+
throw new Error("`description` goes with `persistent`: a check is named by its command. Drop `description`, or add `persistent` for a script that keeps running")
|
|
2314
|
+
}
|
|
2315
|
+
if (!persistent && !every) {
|
|
2316
|
+
throw new Error("`every` is required — how often to check, a DURATION like `5m` (min 1m, max 24h). A script that keeps running and wakes you on every line takes `persistent` instead")
|
|
2317
|
+
}
|
|
2304
2318
|
const forValue = typeof args.for === "string" ? args.for.trim() : ""
|
|
2305
|
-
if (!forValue) throw new Error("`for` is required — how long to keep
|
|
2319
|
+
if (!forValue) throw new Error("`for` is required — how long to keep it going, a DURATION like `6h` or `3d` (max 7d)")
|
|
2320
|
+
if (persistent) {
|
|
2321
|
+
if (!description) throw new Error("`description` is required with `persistent` — what it watches in a few words (\"Errors in deploy.log\"), the name the human sees on its row")
|
|
2322
|
+
return addPersistentWatch(slug, command, forValue, description)
|
|
2323
|
+
}
|
|
2306
2324
|
const result = (await callRpc("addOwnCommandWatch", { slug, command, every, for: forValue }))?.result
|
|
2307
2325
|
// A REFUSAL is the gate doing its job, not a fault: exit 2, with the reason and the background-shell
|
|
2308
2326
|
// fallback in the server's own words.
|
|
@@ -2325,7 +2343,7 @@ async function watchCommand(args) {
|
|
|
2325
2343
|
}
|
|
2326
2344
|
const first = result?.firstRun
|
|
2327
2345
|
? result.firstRun.outcome === "timeout"
|
|
2328
|
-
? "Its first check did not finish in time, so Frizz runs it again now with the full 2m."
|
|
2346
|
+
? "Its first check did not finish in time, so Frizz runs it again now with the full 2m. A script that never exits cannot pass a check: it takes `--persistent`."
|
|
2329
2347
|
: `Its first check ${commandRunClause(result.firstRun)}. ${outputTail(result.firstRun.output)}`
|
|
2330
2348
|
: "Frizz runs its first check within the next minute."
|
|
2331
2349
|
// A CLAMP IS NEWS, as on every other `for` — a worker told nothing rests on coverage it does not have.
|
|
@@ -2334,40 +2352,23 @@ async function watchCommand(args) {
|
|
|
2334
2352
|
if (result?.clamped?.for) clamps.push(`\`--for ${result.clamped.for}\` was capped at the 7d ceiling`)
|
|
2335
2353
|
const clamped = clamps.length ? `\n\nYOUR ${clamps.join(", and ")} — what is listed below is what you hold.` : ""
|
|
2336
2354
|
return (
|
|
2337
|
-
`
|
|
2355
|
+
`Monitoring as ${id}: Frizz runs it every ${result?.every} until it exits 0, or until ${result?.expiresAt}, and ` +
|
|
2338
2356
|
`then wakes you once with its output. Nothing of yours runs meanwhile.\n\n${first}${clamped}\n\n` +
|
|
2339
|
-
`NAME IT IN YOUR \`\`\`awaiting FENCE (\`
|
|
2340
|
-
`when it stops mattering (\`frizzctl
|
|
2357
|
+
`NAME IT IN YOUR \`\`\`awaiting FENCE (\`monitors: [${id}]\`, \`status: watching\`) and come to rest. DROP IT ` +
|
|
2358
|
+
`when it stops mattering (\`frizzctl monitor drop ${id}\`).\n\n${armedCommandWatchList(result)}`
|
|
2341
2359
|
)
|
|
2342
2360
|
}
|
|
2343
2361
|
|
|
2344
|
-
/** The `
|
|
2345
|
-
* @
|
|
2346
|
-
async function
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
if (action !== "add" && action !== "list" && action !== "drop") {
|
|
2350
|
-
throw new Error("`action` must be one of \"add\", \"list\" or \"drop\"")
|
|
2351
|
-
}
|
|
2352
|
-
if (action === "list") {
|
|
2353
|
-
return armedCommandWatchList((await callRpc("listOwnCommandWatches", { slug }))?.result)
|
|
2354
|
-
}
|
|
2355
|
-
if (action === "drop") {
|
|
2356
|
-
const id = typeof args.id === "string" ? args.id.trim() : ""
|
|
2357
|
-
if (!id) throw new Error("`id` is required to drop a monitor — take it from `add` or from `list`")
|
|
2358
|
-
const result = (await callRpc("dropOwnCommandWatch", { slug, id }))?.result
|
|
2359
|
-
const head = result?.dropped
|
|
2360
|
-
? `Monitor ${id} stopped. Its script was killed, and it will not wake you again.`
|
|
2361
|
-
: `No ARMED monitor ${id} on this thread — its script already ended, its \`for\` ran out or Frizz stopped it, or the id is not one of yours.`
|
|
2362
|
-
return `${head}\n\n${armedCommandWatchList(result)}`
|
|
2363
|
-
}
|
|
2362
|
+
/** The `watch_command` handler: RETIRED (2026-11-06). It refuses without calling Frizz, and the refusal is the command.
|
|
2363
|
+
* @returns {Promise<Refused>} */
|
|
2364
|
+
async function watchCommand() {
|
|
2365
|
+
return new Refused(WATCH_COMMAND_RETIRED)
|
|
2366
|
+
}
|
|
2364
2367
|
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
const description = typeof args.description === "string" ? args.description.trim() : ""
|
|
2370
|
-
if (!description) throw new Error("`description` is required — what it watches in a few words (\"Errors in deploy.log\"), the name the human sees on its row")
|
|
2368
|
+
/** `monitor add` with `persistent`: start a script the server keeps running.
|
|
2369
|
+
* @param {string} slug @param {string} command @param {string} forValue @param {string} description
|
|
2370
|
+
* @returns {Promise<string|Refused>} */
|
|
2371
|
+
async function addPersistentWatch(slug, command, forValue, description) {
|
|
2371
2372
|
const result = (await callRpc("addOwnMonitor", { slug, command, for: forValue, description }))?.result
|
|
2372
2373
|
const printed = Array.isArray(result?.events) && result.events.length
|
|
2373
2374
|
? `\n\nIt printed in its first 2s (handed to you here, not as a wake):\n${result.events.map((e) => e.split("\n").map((l) => ` ${l}`).join("\n")).join("\n")}`
|
|
@@ -2379,7 +2380,8 @@ async function monitor(args) {
|
|
|
2379
2380
|
if (result?.exited) {
|
|
2380
2381
|
return (
|
|
2381
2382
|
`NOTHING IS RUNNING: your script ${commandRunClause(result.exited)} within its first 2s, so the monitor ended ` +
|
|
2382
|
-
`as soon as it started.
|
|
2383
|
+
`as soon as it started. With \`--persistent\` the script must keep running — loop, tail, or listen. A check ` +
|
|
2384
|
+
`that finishes takes \`--every\` instead.${printed}\n\n${outputTail(result.exited.output)}`
|
|
2383
2385
|
)
|
|
2384
2386
|
}
|
|
2385
2387
|
const id = result?.id ?? "(unknown)"
|
|
@@ -2395,7 +2397,7 @@ async function monitor(args) {
|
|
|
2395
2397
|
return (
|
|
2396
2398
|
`Monitoring as ${id}: Frizz keeps your script running until ${result?.expiresAt}, and every line it prints wakes ` +
|
|
2397
2399
|
`you with that line. Nothing of yours runs meanwhile.${printed}${clamped}\n\n` +
|
|
2398
|
-
`NAME IT IN YOUR \`\`\`awaiting FENCE (\`
|
|
2400
|
+
`NAME IT IN YOUR \`\`\`awaiting FENCE (\`monitors: [${id}]\`, \`status: watching\`) and come to rest. DROP IT ` +
|
|
2399
2401
|
`when it stops mattering (\`frizzctl monitor drop ${id}\`).\n\n${armedCommandWatchList(result)}`
|
|
2400
2402
|
)
|
|
2401
2403
|
}
|
|
@@ -2483,25 +2485,21 @@ const CLI = {
|
|
|
2483
2485
|
},
|
|
2484
2486
|
monitor: {
|
|
2485
2487
|
group: "Waiting",
|
|
2486
|
-
summary: "Wake
|
|
2488
|
+
summary: "Wake when a command the server re-runs exits 0, or with --persistent on every line a script prints",
|
|
2487
2489
|
positional: ["action"],
|
|
2488
2490
|
then: { add: ["command"], drop: ["id"] },
|
|
2489
2491
|
examples: [
|
|
2490
|
-
'frizzctl monitor add "
|
|
2492
|
+
'frizzctl monitor add "npm view frizz@0.13.12 version" --every 5m --for 6h',
|
|
2493
|
+
'frizzctl monitor add "tail -n0 -F /var/log/app.log | grep --line-buffered -E \'ERROR|FATAL\'" --persistent --description "Errors in app.log" --for 1d',
|
|
2491
2494
|
"frizzctl monitor list",
|
|
2492
2495
|
"frizzctl monitor drop cmw_ab12cd34ef56",
|
|
2493
2496
|
],
|
|
2494
2497
|
},
|
|
2498
|
+
// RETIRED (2026-11-06): `watch-command` is `monitor` now.
|
|
2495
2499
|
watch_command: {
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
then: { add: ["command"], drop: ["id"] },
|
|
2500
|
-
examples: [
|
|
2501
|
-
'frizzctl watch-command add "npm view frizz@0.13.12 version" --every 5m --for 6h',
|
|
2502
|
-
"frizzctl watch-command list",
|
|
2503
|
-
"frizzctl watch-command drop cmw_ab12cd34ef56",
|
|
2504
|
-
],
|
|
2500
|
+
summary: "Retired: it is `frizzctl monitor` now, with the same arguments",
|
|
2501
|
+
retired: WATCH_COMMAND_RETIRED,
|
|
2502
|
+
examples: [],
|
|
2505
2503
|
},
|
|
2506
2504
|
timer: {
|
|
2507
2505
|
group: "Waiting",
|
|
@@ -30,6 +30,8 @@ The injected block names your mode.
|
|
|
30
30
|
|
|
31
31
|
The credential is a user token from Frizz's GitHub App, whose permissions are all read-only: issues, pull requests, checks, commit statuses, workflow runs and repo metadata. It can never exceed them, whatever the human can do.
|
|
32
32
|
|
|
33
|
+
A machine with no `keyward` on PATH can be in this mode too, when `gh` had no sign-in of its own. A write has nowhere to go there: hand it to the human as steps, with the exact command or page.
|
|
34
|
+
|
|
33
35
|
- **A write fails with GitHub's own error**: `Resource not accessible by integration`, HTTP 403. That is this credential doing its job. Once the human has asked for the write, rerun that one command through Keyward. The one write that does not fail is a commit comment, which GitHub allows with read access to code, so never treat a successful command as proof it was read-only.
|
|
34
36
|
- **A read can fail the same way, so try Keyward before you conclude anything.** Source through the API (`gh api repos/…/contents/…`) is not covered; read the checkout where you can. A private repo on an account where Frizz's App is not installed reads as `Could not resolve to a Repository` or HTTP 404, exactly as if it did not exist.
|
|
35
37
|
- **Don't route reads through Keyward by default.** Each burst costs the human a touch that a plain read does not.
|
package/web-dist/assets/{abnfDiagram-VRR7QNED-dMKEjsHW.js → abnfDiagram-VRR7QNED-B13Nf5uG.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-BIyJ5CJF.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-DLhDEMjC.js";import"./chunk-WYO6CB5R-BouXl6Ea.js";import"./chunk-VAUOI2AC-DpbSQ-0T.js";import{n as i,r as a,t as o}from"./chunk-MOJQB5TN-BGaw_67a.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-
|
|
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-KklTF2b-.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-BIyJ5CJF.js";export{e as createArchitectureServices};
|