frizz-server 0.15.43 → 0.15.44
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 +9432 -9079
- package/dist/codex-app-server-daemon.js +5 -2
- package/dist/dev-child.js +38291 -37032
- package/package.json +1 -1
- package/runtime/cc-worker/DECISIONS.md +9 -0
- package/runtime/cc-worker/hooks/scratchpad.mjs +8 -1
- package/runtime/cc-worker/hooks/session-seed.mjs +64 -14
- package/runtime/cc-worker/lib/frizz-tools.mjs +86 -4
- package/runtime/cc-worker/skills/gh/SKILL.md +72 -19
- package/web-dist/assets/{abnfDiagram-VRR7QNED-DZb1taeh.js → abnfDiagram-VRR7QNED-pzT4fWMK.js} +1 -1
- package/web-dist/assets/{arc-hn35k2HI.js → arc-BW6ZT0Zs.js} +1 -1
- package/web-dist/assets/architecture-TIHT7OUA-Cd4KKjcr.js +1 -0
- package/web-dist/assets/{architectureDiagram-ZJ3FMSHR-6QyzD8O3.js → architectureDiagram-ZJ3FMSHR-DjJJlL8J.js} +1 -1
- package/web-dist/assets/{blockDiagram-677ZJIJ3-DV1zPeBU.js → blockDiagram-677ZJIJ3-BFxmMqh-.js} +1 -1
- package/web-dist/assets/{c4Diagram-LMCZKHZV-DovAqz12.js → c4Diagram-LMCZKHZV-pPNLdLrQ.js} +1 -1
- package/web-dist/assets/channel-BJRRpPvu.js +1 -0
- package/web-dist/assets/{chunk-32BRIVSS-DvtR4j-C.js → chunk-32BRIVSS-DO2QffFz.js} +1 -1
- package/web-dist/assets/{chunk-52WLFC77-DniKgsIc.js → chunk-52WLFC77-BCQbJBxs.js} +1 -1
- package/web-dist/assets/{chunk-C7G6YPKG-BLfDXTkp.js → chunk-C7G6YPKG-CqrojpJt.js} +1 -1
- package/web-dist/assets/{chunk-EX3LRPZG-B6AnFQUN.js → chunk-EX3LRPZG-ClooPSHv.js} +1 -1
- package/web-dist/assets/{chunk-FWX5IMBZ-CucljzDo.js → chunk-FWX5IMBZ-BRUVeEPm.js} +2 -2
- package/web-dist/assets/{chunk-HOUHSVGY-Eii_EemL.js → chunk-HOUHSVGY-Daa5JPul.js} +1 -1
- package/web-dist/assets/{chunk-ICXQ74PX-COVzp5Xd.js → chunk-ICXQ74PX-D1EePAvT.js} +1 -1
- package/web-dist/assets/{chunk-MOJQB5TN-juE3sXKe.js → chunk-MOJQB5TN-B5dCeSWz.js} +1 -1
- package/web-dist/assets/{chunk-OGEWGWER-Ctnj7hjO.js → chunk-OGEWGWER-DQZCm2QT.js} +1 -1
- package/web-dist/assets/{chunk-PUDLZKDR-DieALR_4.js → chunk-PUDLZKDR-DS74vQXD.js} +1 -1
- package/web-dist/assets/{chunk-Q4XR5HBZ-CdURCgLS.js → chunk-Q4XR5HBZ-DRapbjEK.js} +1 -1
- package/web-dist/assets/{chunk-RYQCIY6F-BnZg3wIp.js → chunk-RYQCIY6F-Db3_N4pr.js} +1 -1
- package/web-dist/assets/{chunk-V7JOEXUC-uO2fUZzm.js → chunk-V7JOEXUC-DuoGUcxW.js} +1 -1
- package/web-dist/assets/{chunk-VAUOI2AC-CofEt-CQ.js → chunk-VAUOI2AC-IhEj8PHl.js} +1 -1
- package/web-dist/assets/{chunk-VR4S4FIN-9mIXe6Du.js → chunk-VR4S4FIN-CBE53WRM.js} +1 -1
- package/web-dist/assets/{chunk-WYO6CB5R-DX8qax_q.js → chunk-WYO6CB5R-CFzJhIFb.js} +1 -1
- package/web-dist/assets/{chunk-XXDRQBXY-C28sBueC.js → chunk-XXDRQBXY-BghDEsiV.js} +1 -1
- package/web-dist/assets/{chunk-ZGVPDNZ5-BOCPG79n.js → chunk-ZGVPDNZ5-f1DUaopj.js} +1 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-B0ydbnfq.js +1 -0
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-B0ydbnfq.js +1 -0
- package/web-dist/assets/{cose-bilkent-JH36ORCC-CPCiZ8I_.js → cose-bilkent-JH36ORCC-C94dFTH0.js} +1 -1
- package/web-dist/assets/{cynefin-VYW2F7L2-8xgXFX87.js → cynefin-VYW2F7L2-CD3XB9bu.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-TSTJHNR4-DwVrmsMT.js → cynefinDiagram-TSTJHNR4-DKpothpE.js} +1 -1
- package/web-dist/assets/{dagre-VKFMJZFB-VfKIjOrh.js → dagre-VKFMJZFB-DEgXDrsI.js} +1 -1
- package/web-dist/assets/{diagram-FQU43EPY-CfRYwsX4.js → diagram-FQU43EPY-DtNEUk_t.js} +1 -1
- package/web-dist/assets/{diagram-G47NLZAW-LZDctC2c.js → diagram-G47NLZAW-DQqDEo1Z.js} +1 -1
- package/web-dist/assets/{diagram-NH7WQ7WH-B9I9O4q2.js → diagram-NH7WQ7WH-CWaXDOAf.js} +1 -1
- package/web-dist/assets/{diagram-OA4YK3LP-DyLtLmXq.js → diagram-OA4YK3LP-BRnuMLIx.js} +1 -1
- package/web-dist/assets/{diagram-WEI45ONY-Cq4XlICY.js → diagram-WEI45ONY-DF6OlbS6.js} +1 -1
- package/web-dist/assets/{dist-BVACuJBo.js → dist-D2xRtqvF.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-CCIWWBDH-CXiLLBrP.js → ebnfDiagram-CCIWWBDH-EcDTeY-l.js} +1 -1
- package/web-dist/assets/{erDiagram-Q63AITRT-E4Tq-3uJ.js → erDiagram-Q63AITRT-O3W_7L5X.js} +1 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-DcKi0Mal.js +1 -0
- package/web-dist/assets/flowDiagram-23GEKE2U-YZDRiDvt.js +1 -0
- package/web-dist/assets/{ganttDiagram-NO4QXBWP-CV5w3HxN.js → ganttDiagram-NO4QXBWP-DIplx6-n.js} +1 -1
- package/web-dist/assets/{gitGraph-TEB2WS4Q-Ca8Dwhcu.js → gitGraph-TEB2WS4Q-fEwpElLL.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-1S-rnkir.js → gitGraphDiagram-IHSO6WYX-CawRNGyW.js} +1 -1
- package/web-dist/assets/{index-BWHvfz4p.css → index-DGZQ7U7X.css} +1 -1
- package/web-dist/assets/index-DfeNuuiA.js +378 -0
- package/web-dist/assets/{info-DKCQHKI2-CAprcrba.js → info-DKCQHKI2-e722xjCC.js} +1 -1
- package/web-dist/assets/{infoDiagram-FWYZ7A6U-BVskYXDu.js → infoDiagram-FWYZ7A6U-rQjsScen.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-GLwxlM0Z.js → ishikawaDiagram-FXEZZL3T-D6AaIADa.js} +1 -1
- package/web-dist/assets/{journeyDiagram-5HDEW3XC-CFs0KY4W.js → journeyDiagram-5HDEW3XC-Dek8lEHD.js} +1 -1
- package/web-dist/assets/{kanban-definition-HUTT4EX6-B1mrGDh-.js → kanban-definition-HUTT4EX6-D169tPMd.js} +1 -1
- package/web-dist/assets/{line-CH8_t-Bl.js → line-Dw47KvcS.js} +1 -1
- package/web-dist/assets/{linear-B-zmv10o.js → linear-HQnAERIY.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-C4jXIK12.js → mermaid-parser.core-BJDWCQPF.js} +3 -3
- package/web-dist/assets/{mermaid.core-D-5-wAck.js → mermaid.core-R9E4C3Es.js} +3 -3
- package/web-dist/assets/{mindmap-definition-LN4V7U3C-BYpjdopv.js → mindmap-definition-LN4V7U3C-CV_FsJk7.js} +1 -1
- package/web-dist/assets/{packet-7NZHBO7P-Cjna6hCg.js → packet-7NZHBO7P-C0ayNcsr.js} +1 -1
- package/web-dist/assets/{pegDiagram-2B236MQR-DCpSFktT.js → pegDiagram-2B236MQR-DjnQ3Pi7.js} +1 -1
- package/web-dist/assets/{pie-RZYD4A2V-AOgScQVR.js → pie-RZYD4A2V-D7lrHyQY.js} +1 -1
- package/web-dist/assets/{pieDiagram-ENE6RG2P-B3a0v6zL.js → pieDiagram-ENE6RG2P-643_YE-H.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-CcqK-NK6.js → quadrantDiagram-ABIIQ3AL-CeBAmaJJ.js} +1 -1
- package/web-dist/assets/{radar-I7S5WNFK-DtuvXtCm.js → radar-I7S5WNFK-DCmcE8Eq.js} +1 -1
- package/web-dist/assets/{railroad-3IZDKUUU-BkqKVzRX.js → railroad-3IZDKUUU-BFgc9gYw.js} +1 -1
- package/web-dist/assets/railroad-abnf-AHOZXSZD-DG591qcs.js +1 -0
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-BJwrR-19.js +1 -0
- package/web-dist/assets/railroad-peg-LSFZ7HO6-C5UFkdLB.js +1 -0
- package/web-dist/assets/{railroadDiagram-RFXS5EU6-DDHj4uDb.js → railroadDiagram-RFXS5EU6-ClmxWxOm.js} +1 -1
- package/web-dist/assets/{requirementDiagram-TGXJPOKE-B54HzGZC.js → requirementDiagram-TGXJPOKE-CpF-MZaV.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-HTMAVEWB-3E6dsZaw.js → sankeyDiagram-HTMAVEWB-DofntocC.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-CVpuzOAQ.js → sequenceDiagram-DBY2YBRQ-B_qOaZbF.js} +1 -1
- package/web-dist/assets/{src-pgycCSL8.js → src-CeayMM0l.js} +1 -1
- package/web-dist/assets/{stateDiagram-2N3HPSRC-Cgfbv4Jj.js → stateDiagram-2N3HPSRC-D3mAgfcK.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-ppCieyPJ.js +1 -0
- package/web-dist/assets/{swimlanes-5IMT3BWC-DjH7BeS7.js → swimlanes-5IMT3BWC-CcP_7CWL.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-BPdgLhxf.js +8 -0
- package/web-dist/assets/{timeline-definition-FHXFAJF6-BiHrEvsn.js → timeline-definition-FHXFAJF6-BuY243vk.js} +1 -1
- package/web-dist/assets/{treeView-QDETBFTQ-BsXOB7X1.js → treeView-QDETBFTQ-DWPoUOUX.js} +1 -1
- package/web-dist/assets/{treemap-6X3UGDF4-CEPOvdmd.js → treemap-6X3UGDF4-MUlKNSNq.js} +1 -1
- package/web-dist/assets/{vennDiagram-L72KCM5P-CmM7sjoE.js → vennDiagram-L72KCM5P-BgdszIwK.js} +1 -1
- package/web-dist/assets/{wardley-OPB4EBWU-v6d2b-Ee.js → wardley-OPB4EBWU-BsmoKrjx.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-EHGQE667-B8zMQrbQ.js → wardleyDiagram-EHGQE667-Be33pA9H.js} +1 -1
- package/web-dist/assets/{xychartDiagram-FW5EYKEG-BxfsO5vO.js → xychartDiagram-FW5EYKEG-DtcL7ziG.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/assets/architecture-TIHT7OUA-BHGj5CkN.js +0 -1
- package/web-dist/assets/channel-DXI8lxvm.js +0 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-D-3vUl4W.js +0 -1
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-D-3vUl4W.js +0 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-BAy8PeSd.js +0 -1
- package/web-dist/assets/flowDiagram-23GEKE2U-D9aeK_Sz.js +0 -1
- package/web-dist/assets/index-EVfoZw3n.js +0 -377
- package/web-dist/assets/railroad-abnf-AHOZXSZD-CHn7rlun.js +0 -1
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-y-9egy8E.js +0 -1
- package/web-dist/assets/railroad-peg-LSFZ7HO6-CcjaBCCD.js +0 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-ROcJdvkR.js +0 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-45yhNrvo.js +0 -8
package/package.json
CHANGED
|
@@ -1219,3 +1219,12 @@ The sixteen worker capabilities (`ask`, `unask`, `secret`, `done`, `activity`, `
|
|
|
1219
1219
|
- **Exit 2 is a refusal, not a failure.** `frizzctl done` with a question open or a watch armed prints what blocks it and exits 2; a fault or a misuse exits 1.
|
|
1220
1220
|
- **A worker's own command never becomes an approval card.** Dispatch pre-approves `Bash(frizzctl:*)`, the promise the MCP server's own pre-approval made: on a thread a human moved to `default`, the worker can still ask, register and sign off unasked. Measured against a real worker on Claude Code 2.1.296, the rule carries every form the contract teaches except a quoted heredoc whose body is a JSON object, which Claude Code's own command checks send to a prompt — and that is the form `frizzctl ask` needs. `hooks/perm-policy.mjs` approves exactly that shape itself (`own-frizzctl`: `frizzctl`, words the shell does not interpret, `<<'WORD'`, a literal body, nothing after the terminator) and nothing wider.
|
|
1221
1221
|
- **Which threads still get the MCP server.** A Claude worker is handed the contract at every fork, so a daemon forked now never gets it. A Codex thread's contract is its base instructions and an ACP thread's is its first prompt, both fixed when the thread started, so the session row records which surface the thread was taught (`worker_surface`) and only a thread taught MCP is still handed the server, on its own thread config. Every thread, old or new, gets `frizzctl` on its shell's PATH.
|
|
1222
|
+
|
|
1223
|
+
## 2026-11-04: the gh pointer has two tiers — signed-in `gh`, or `gh` through Keyward
|
|
1224
|
+
|
|
1225
|
+
GitHub CLI access on the maintainer's Mac moved behind Keyward: `keyward --reason "…" -- gh …` hands `gh` his token in `GH_TOKEN` for that run, one Touch ID covers a repository's runs for 10 minutes, and the keychain token is logged out. Plain `gh auth status --active` then fails, so the old gate would have stopped teaching `gh` at all, on exactly the machine Frizz is built on.
|
|
1226
|
+
|
|
1227
|
+
- **`hooks/session-seed.mjs` checks two tiers, in order.** A signed-in plain `gh` still gets `⟦gh available⟧`: that is every other Frizz user, who has no Keyward, and this machine until the logout. Otherwise a `keyward` executable on PATH gets `⟦gh available through Keyward⟧`, which teaches the prefix, batching reads under one touch, and stopping on `keyward: not released:` without a retry (a locked screen does not clear by asking again, and a decline was the human's answer). Neither gets nothing, as before, and the gate still fails closed and never throws.
|
|
1228
|
+
- **Keyward is found by walking PATH for the file, never by running it.** Any `keyward` invocation that releases raises a Touch ID sheet, and a SessionStart hook fires on every start, resume, clear and compact.
|
|
1229
|
+
- **Waits moved to the server in both modes.** `frizzctl watch-pr add` / `watch-issue add` run on Frizz's own read-only GitHub credential, unattended and while the screen is locked, so both blocks, the `frizz:gh` skill and the Codex contract name them first. The bundled `ci-watch.mjs` / `review-watch.mjs` stay as the in-turn fallback where plain `gh` is signed in: Keyward releases to `gh` alone, so a script that runs `gh` itself gets no token under it.
|
|
1230
|
+
- **Rejected: running `keyward` to learn whether a release would work.** It is the one check that is accurate, and the one that puts a sheet on the screen at every session start.
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
// tried and REMOVED on 2026-07-02 (maintainer's call): the block-until-file-edited nag forced even
|
|
55
55
|
// trivial workers into Read/Edit dances that render as noise in the chat UI. This nudges; it never
|
|
56
56
|
// blocks.
|
|
57
|
-
import { readFileSync, writeFileSync, mkdirSync, statSync, readdirSync, openSync, readSync, closeSync } from 'node:fs';
|
|
57
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync, statSync, readdirSync, openSync, readSync, closeSync } from 'node:fs';
|
|
58
58
|
import { join } from 'node:path';
|
|
59
59
|
import { currentSessionId } from '../scripts/frizz/config.mjs';
|
|
60
60
|
|
|
@@ -160,6 +160,13 @@ if (mode === 'subagent-start') {
|
|
|
160
160
|
process.exit(0);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
// Claude Code fixes CLAUDE_PROJECT_DIR when the session starts, so it still names the old path after
|
|
164
|
+
// the project's folder is renamed. Writing there would `mkdir -p` an empty stub of the old folder, and
|
|
165
|
+
// Claude Code then moves the session's working directory into that stub. A folder that has gone gets
|
|
166
|
+
// nothing: Frizz leaves a link at the old path while a worker from before the rename runs, and retires
|
|
167
|
+
// the worker into the new folder at its next rest (packages/server/src/project-relocation.ts).
|
|
168
|
+
if (!existsSync(projectDir)) process.exit(0);
|
|
169
|
+
|
|
163
170
|
// Ensure the directory exists so a first Write lands. frizz's dispatcher already provisions this for
|
|
164
171
|
// a real thread; this only covers a session that started outside a dispatch.
|
|
165
172
|
try {
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
// A fresh worker never runs `frizz on`, so such a cc is already dormant; we write cc's own per-session
|
|
24
24
|
// `off` sentinel anyway via the shared config API (board survives as cc-worker's board
|
|
25
25
|
// implementation) so a stale install is guaranteed inert. Cheap belt-and-suspenders. See DECISIONS.md.
|
|
26
|
-
import { readFileSync } from 'node:fs';
|
|
26
|
+
import { accessSync, constants, existsSync, readFileSync, statSync } from 'node:fs';
|
|
27
|
+
import { delimiter, join } from 'node:path';
|
|
27
28
|
import { execFileSync } from 'node:child_process';
|
|
28
29
|
import { setSessionOverride, currentSessionId } from '../scripts/frizz/config.mjs';
|
|
29
30
|
|
|
@@ -48,7 +49,9 @@ const dir = process.env.CLAUDE_PROJECT_DIR ?? '.';
|
|
|
48
49
|
let sid = null;
|
|
49
50
|
try {
|
|
50
51
|
sid = currentSessionId(input.session_id);
|
|
51
|
-
|
|
52
|
+
// Never into a project folder that has gone: CLAUDE_PROJECT_DIR keeps the old path after a rename,
|
|
53
|
+
// and the sentinel's `mkdir -p` would recreate it as an empty stub (see scratchpad.mjs).
|
|
54
|
+
if (sid && existsSync(dir)) setSessionOverride(dir, sid, 'off');
|
|
52
55
|
} catch {
|
|
53
56
|
/* best-effort — a failed sentinel write just leaves cc at its dormant default */
|
|
54
57
|
}
|
|
@@ -74,30 +77,77 @@ const core =
|
|
|
74
77
|
const grounding =
|
|
75
78
|
'⟦frizz worker re-grounding (post-compaction)⟧ Context was just compacted. You are still the frizz worker for effort `' + thread + '` — read whatever you left yourself in `' + scratch + '` NOW to recover your working state and to-do list before asserting anything, and re-read any code before claiming how it is structured. Your system prompt still carries the full contract; sign off as it says.';
|
|
76
79
|
|
|
77
|
-
// AUTH-GATED gh guidance — teach the worker to use `gh` well, but ONLY when
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
81
|
-
//
|
|
82
|
-
//
|
|
80
|
+
// AUTH-GATED gh guidance — teach the worker to use `gh` well, but ONLY when it can actually reach GitHub.
|
|
81
|
+
// TWO TIERS, checked in order (2026-11-04, see DECISIONS.md):
|
|
82
|
+
// 1. Plain `gh auth status --active` exits 0 — an active gh account is signed in, as on any machine
|
|
83
|
+
// that never adopted Keyward. Inject the plain block.
|
|
84
|
+
// 2. Otherwise, a `keyward` executable on PATH — the maintainer's Secure Enclave vault, which hands gh
|
|
85
|
+
// its token in `GH_TOKEN` for one run at a time, so plain gh is signed OUT by design. Inject the
|
|
86
|
+
// Keyward block: every gh command goes through `keyward --reason "…" -- gh …`.
|
|
87
|
+
// Neither → inject nothing. Tier 2 is found by walking PATH for the file, NEVER by running `keyward`:
|
|
88
|
+
// a release raises a Touch ID sheet, and a SessionStart hook must not put one on the maintainer's screen.
|
|
89
|
+
// The whole gate is wrapped so it can NEVER throw into SessionStart, and it fails CLOSED — no gh
|
|
90
|
+
// binary, a stall past the timeout, an unreadable PATH entry, or any other error → that tier is absent
|
|
91
|
+
// (guidance missing, not stale/wrong). It re-evaluates on every start/resume/clear/compact, so a later
|
|
92
|
+
// `gh auth login` or `gh auth logout` changes the block at the next turn boundary.
|
|
93
|
+
const ghReadOnly =
|
|
94
|
+
'• READ-ONLY BOUNDARY: never comment, label, assign, close, review, approve, or merge — no mutation of any kind — UNLESS the human explicitly asks in this session. Default to producing your findings/review as your final message, not as a GitHub post.\n';
|
|
95
|
+
|
|
83
96
|
const ghBlock =
|
|
84
97
|
'⟦gh available⟧ You are signed into the `gh` CLI and in a GitHub repo. Use `gh` EAGERLY and well — it is the fastest path to issue/PR/CI/release context, and you should reach for it before guessing:\n' +
|
|
85
98
|
'• 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' +
|
|
86
99
|
'• SEARCH across the repo (and GitHub) with `gh search issues`/`gh search prs` when hunting related work, duplicates, or prior art.\n' +
|
|
87
|
-
|
|
88
|
-
'Load the `frizz:gh` skill for the full playbook (recipes
|
|
100
|
+
ghReadOnly +
|
|
101
|
+
'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
|
+
|
|
103
|
+
const ghKeywardBlock =
|
|
104
|
+
'⟦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 first after `--`, or right after a package runner such as `npx`). It is still the fastest path to issue/PR/CI/release context — reach for it before guessing:\n' +
|
|
105
|
+
'• 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' +
|
|
106
|
+
'• 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' +
|
|
107
|
+
'• 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' +
|
|
108
|
+
ghReadOnly +
|
|
109
|
+
'Load the `frizz:gh` skill for the full playbook (recipes and the exact Keyward failures).';
|
|
89
110
|
|
|
90
|
-
|
|
111
|
+
/** Whether `name` is an executable file in some PATH directory. Stats files only, runs nothing. */
|
|
112
|
+
function onPath(name) {
|
|
113
|
+
const win = process.platform === 'win32';
|
|
114
|
+
const exts = win ? (process.env.PATHEXT ?? '.EXE;.CMD;.BAT').split(';').filter(Boolean) : [''];
|
|
115
|
+
for (const d of (process.env.PATH ?? '').split(delimiter)) {
|
|
116
|
+
if (!d) continue;
|
|
117
|
+
for (const ext of exts) {
|
|
118
|
+
try {
|
|
119
|
+
const file = join(d, name + ext);
|
|
120
|
+
if (!statSync(file).isFile()) continue;
|
|
121
|
+
if (!win) accessSync(file, constants.X_OK);
|
|
122
|
+
return true;
|
|
123
|
+
} catch {
|
|
124
|
+
/* absent, unreadable or not executable → keep looking */
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** @type {'plain' | 'keyward' | null} */
|
|
132
|
+
let ghMode = null;
|
|
91
133
|
try {
|
|
92
134
|
execFileSync('gh', ['auth', 'status', '--active'], { stdio: 'ignore', timeout: 4000 });
|
|
93
|
-
|
|
135
|
+
ghMode = 'plain';
|
|
94
136
|
} catch {
|
|
95
|
-
/* no gh / not authed / stalled →
|
|
137
|
+
/* no gh / not authed / stalled → fall through to the Keyward tier */
|
|
138
|
+
}
|
|
139
|
+
if (!ghMode) {
|
|
140
|
+
try {
|
|
141
|
+
if (onPath('keyward')) ghMode = 'keyward';
|
|
142
|
+
} catch {
|
|
143
|
+
/* fail CLOSED: inject nothing */
|
|
144
|
+
}
|
|
96
145
|
}
|
|
97
146
|
|
|
98
147
|
const parts = [core];
|
|
99
148
|
if (input.source === 'compact') parts.push(grounding);
|
|
100
|
-
if (
|
|
149
|
+
if (ghMode === 'plain') parts.push(ghBlock);
|
|
150
|
+
else if (ghMode === 'keyward') parts.push(ghKeywardBlock);
|
|
101
151
|
|
|
102
152
|
process.stdout.write(
|
|
103
153
|
JSON.stringify({
|
|
@@ -110,6 +110,48 @@ const SPAWN_THREAD = {
|
|
|
110
110
|
},
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
// CHILD THREADS (an experiment behind Settings → Child threads, 2026-11-04). The server's `spawnChild`
|
|
114
|
+
// (router.ts) is the whole of it; this is its spelling.
|
|
115
|
+
const SPAWN_CHILD = {
|
|
116
|
+
name: "spawn_child",
|
|
117
|
+
description:
|
|
118
|
+
"AN EXPERIMENT, switched on in Frizz's Settings (refused, exit 2, while it is off). Start a CHILD THREAD: a " +
|
|
119
|
+
"new thread on YOUR board, on Claude Code or Codex, that works for YOU. It is a full Frizz thread — its own " +
|
|
120
|
+
"session, scratch directory and watchers — dispatched like any other, so it runs on its harness's own runtime " +
|
|
121
|
+
"with the project's skills and instructions, and it can rest, own a PR watcher and be woken by it. What makes " +
|
|
122
|
+
"it a child: every rest of its that would have gone to the human's queue — its `done`, a `needs_input` " +
|
|
123
|
+
"handoff, a crash — is handed to YOU instead, as a message that wakes you, and it sits under your thread on " +
|
|
124
|
+
"the board rather than in the queue. Answer it, or give it more work, with `frizzctl steer <slug>`. Only a " +
|
|
125
|
+
"permission approval, a secret it needs and a usage-limit stop still go to the human directly. " +
|
|
126
|
+
"WHEN TO USE IT, and when not: an in-session sub-agent is still the tool for a helper that finishes inside your " +
|
|
127
|
+
"turn — a review, a research prong, a verification pass — because it is cheaper (no worker prompt, no cold " +
|
|
128
|
+
"start, no process of its own). A child thread is for work a sub-agent structurally cannot do: work that must " +
|
|
129
|
+
"REST and be woken (a pull request it opened and must shepherd through CI and review rounds), work on the OTHER " +
|
|
130
|
+
"harness, or work that must survive your process. Rest on a running child with `threads: [<slug>]` in your " +
|
|
131
|
+
"```awaiting fence. A child cannot start children of its own. You MUST choose `model` and `effort` by the " +
|
|
132
|
+
"child's task, as for `spawn-thread`.",
|
|
133
|
+
inputSchema: {
|
|
134
|
+
type: "object",
|
|
135
|
+
properties: {
|
|
136
|
+
prompt: {
|
|
137
|
+
type: "string",
|
|
138
|
+
description: "The full task for the child. Be self-contained — it starts with empty context, and is told it is your child.",
|
|
139
|
+
},
|
|
140
|
+
model: SPAWN_THREAD.inputSchema.properties.model,
|
|
141
|
+
effort: SPAWN_THREAD.inputSchema.properties.effort,
|
|
142
|
+
backend: {
|
|
143
|
+
type: "string",
|
|
144
|
+
enum: ["claude", "codex"],
|
|
145
|
+
description:
|
|
146
|
+
"Optional harness (default `claude`). If `codex`, `model` must be a codex model id. A child on your own " +
|
|
147
|
+
"harness starts in your current permission mode; one on the other starts in that harness's default.",
|
|
148
|
+
},
|
|
149
|
+
title: { type: "string", description: "Optional short title for the child (else derived from the prompt)." },
|
|
150
|
+
},
|
|
151
|
+
required: ["prompt", "model", "effort"],
|
|
152
|
+
},
|
|
153
|
+
}
|
|
154
|
+
|
|
113
155
|
const GOAL = {
|
|
114
156
|
name: "goal",
|
|
115
157
|
description:
|
|
@@ -955,11 +997,12 @@ const THREADS = {
|
|
|
955
997
|
// WATCH_ISSUE rides at the END (2026-09-14), and SECRET, STEER, WATCH_COMMAND, MONITOR and THREADS after it: the tool list is
|
|
956
998
|
// read by position in frizz-mcp.test.ts, and a worker's runtime reads it by name, so the order costs nothing and appending
|
|
957
999
|
// breaks nothing.
|
|
958
|
-
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]
|
|
1000
|
+
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]
|
|
959
1001
|
|
|
960
1002
|
/** @type {Record<string, (args: Record<string, unknown>) => Promise<string>>} */
|
|
961
1003
|
const HANDLERS = {
|
|
962
1004
|
[SPAWN_THREAD.name]: spawnThread,
|
|
1005
|
+
[SPAWN_CHILD.name]: spawnChild,
|
|
963
1006
|
[GOAL.name]: goal,
|
|
964
1007
|
[TIMER.name]: timer,
|
|
965
1008
|
[WATCH_PR.name]: watchPr,
|
|
@@ -1075,6 +1118,11 @@ function threadFacts(t, nowMs) {
|
|
|
1075
1118
|
if (t.questions > 0) facts.push(`${plural(t.questions, "question")} open`)
|
|
1076
1119
|
if (t.subAgents > 0) facts.push(`${plural(t.subAgents, "sub-agent")} running`)
|
|
1077
1120
|
if (t.shells > 0) facts.push(`${plural(t.shells, "shell")} running`)
|
|
1121
|
+
// Its child threads have no row of their own (they report to it, not to the human), so they are named here.
|
|
1122
|
+
if (Array.isArray(t.children) && t.children.length) {
|
|
1123
|
+
const busy = (/** @type {any} */ c) => c.runtime === "running" || c.runtime === "spawning"
|
|
1124
|
+
facts.push(`child threads: ${t.children.map((/** @type {any} */ c) => `${c.slug}${busy(c) ? " (turn in flight)" : ""}`).join(", ")}`)
|
|
1125
|
+
}
|
|
1078
1126
|
for (const w of t.watches ?? []) facts.push(`watching ${w}`)
|
|
1079
1127
|
if (t.limited) facts.push("stopped by a usage limit")
|
|
1080
1128
|
else if (t.crashed) facts.push("crashed mid-turn")
|
|
@@ -1207,14 +1255,14 @@ async function activity() {
|
|
|
1207
1255
|
// keys are PLURAL sequences, so an id printed on its own line is no longer something a worker can copy
|
|
1208
1256
|
// into a fence — it has to see the shape. This command is where the contract sends a worker that has lost
|
|
1209
1257
|
// an id, so printing the retired one-line-per-item form would teach the very grammar frizz refuses.
|
|
1210
|
-
const byKind = { shell: [], agent: [], timer: [], pr: [], issue: [], command: [] }
|
|
1258
|
+
const byKind = { shell: [], agent: [], timer: [], pr: [], issue: [], command: [], thread: [] }
|
|
1211
1259
|
for (const i of items) if (byKind[i.kind] && i.id) byKind[i.kind].push(i.id)
|
|
1212
|
-
const block = Object.entries({ shells: byKind.shell, agents: byKind.agent, timers: byKind.timer, prs: byKind.pr, issues: byKind.issue, commands: byKind.command })
|
|
1260
|
+
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 })
|
|
1213
1261
|
.filter(([, ids]) => ids.length > 0)
|
|
1214
1262
|
.map(([key, ids]) => ` ${key}: [${ids.join(", ")}]`)
|
|
1215
1263
|
// The template guesses `status:` from the kinds — a shell or a sub-agent is usually work that finishes
|
|
1216
1264
|
// by itself, a PR, an issue or a timer a watch — and the prose tells the worker to correct it.
|
|
1217
|
-
const status = byKind.shell.length + byKind.agent.length > 0 ? "working" : "watching"
|
|
1265
|
+
const status = byKind.shell.length + byKind.agent.length + byKind.thread.length > 0 ? "working" : "watching"
|
|
1218
1266
|
return (
|
|
1219
1267
|
`${items.length} thing${items.length === 1 ? "" : "s"} running on this thread:\n\n${lines.join("\n")}\n\n` +
|
|
1220
1268
|
"Name the ones you are ACTUALLY waiting on in your ```awaiting fence. The frontmatter is YAML — one " +
|
|
@@ -1459,6 +1507,32 @@ async function spawnThread(args) {
|
|
|
1459
1507
|
return spawnedReceipt(slug, typeof body.title === "string" ? body.title : slug, undefined)
|
|
1460
1508
|
}
|
|
1461
1509
|
|
|
1510
|
+
async function spawnChild(args) {
|
|
1511
|
+
const prompt = typeof args.prompt === "string" ? args.prompt.trim() : ""
|
|
1512
|
+
if (!prompt) throw new Error("`prompt` is required and must be a non-empty string")
|
|
1513
|
+
const model = typeof args.model === "string" ? args.model.trim() : ""
|
|
1514
|
+
if (!model) throw new Error("`model` is required — choose one by the child's task (claude: opus/sonnet/haiku, opus being the top tier; codex: a gpt-5.6 model id). There is no default.")
|
|
1515
|
+
const effort = typeof args.effort === "string" ? args.effort.trim() : ""
|
|
1516
|
+
if (!effort) throw new Error("`effort` is required — choose one by complexity (low/medium/high/xhigh/max). There is no default.")
|
|
1517
|
+
/** @type {Record<string, unknown>} */
|
|
1518
|
+
const body = { prompt, model, effort, from: threadSlug() }
|
|
1519
|
+
const title = typeof args.title === "string" ? args.title.trim() : ""
|
|
1520
|
+
if (title) body.title = title
|
|
1521
|
+
if (args.backend === "claude" || args.backend === "codex") body.backend = args.backend
|
|
1522
|
+
// The server writes the footer that tells the child it is one (shared childThreadFooter): only it can
|
|
1523
|
+
// name this thread by its board title.
|
|
1524
|
+
const result = (await callRpc("spawnChild", body))?.result
|
|
1525
|
+
if (result?.refused) return new Refused(`NO CHILD WAS STARTED: ${result.refused}.`)
|
|
1526
|
+
if (typeof result?.slug !== "string" || !result.slug) throw new Error(`spawnChild returned no slug: ${JSON.stringify(result)?.slice(0, 300)}`)
|
|
1527
|
+
return (
|
|
1528
|
+
`Started child thread \`${result.slug}\`. It works for you: when it rests with a handoff — done, needing ` +
|
|
1529
|
+
`input, or stopped — Frizz hands it to you as a message that wakes you. Send it more with ` +
|
|
1530
|
+
`\`frizzctl steer ${result.slug} --message-file <file|->\`. To rest while it works, name it in your fence: ` +
|
|
1531
|
+
`\`threads: [${result.slug}]\`.\n\nIt sits under your thread on the board; this link opens it:\n\n` +
|
|
1532
|
+
`[${title || result.slug}](/thread/${result.slug})`
|
|
1533
|
+
)
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1462
1536
|
/** What the spawner reads back. `project` is the new thread's project slug when it is not ours.
|
|
1463
1537
|
* @param {string} slug @param {string} label @param {string | undefined} project @returns {string} */
|
|
1464
1538
|
function spawnedReceipt(slug, label, project) {
|
|
@@ -2493,6 +2567,14 @@ const CLI = {
|
|
|
2493
2567
|
'frizzctl spawn-thread --project nub --model opus --effort high --title "Bump the SDK pin" --prompt-file prompt.md',
|
|
2494
2568
|
],
|
|
2495
2569
|
},
|
|
2570
|
+
spawn_child: {
|
|
2571
|
+
group: "Other threads",
|
|
2572
|
+
summary: "Start a child thread that reports to this one (an experiment, off by default)",
|
|
2573
|
+
examples: [
|
|
2574
|
+
'frizzctl spawn-child --model opus --effort high --title "Fix the resolver and shepherd its PR" --prompt-file prompt.md',
|
|
2575
|
+
'frizzctl spawn-child --backend codex --model gpt-5.6-sol --effort high --prompt-file prompt.md',
|
|
2576
|
+
],
|
|
2577
|
+
},
|
|
2496
2578
|
}
|
|
2497
2579
|
|
|
2498
2580
|
export { TOOLS, HANDLERS, CLI, Refused, doneOpenQuestionsRefusal }
|
|
@@ -1,16 +1,49 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gh
|
|
3
|
-
description: The gh-CLI playbook for a frizz worker
|
|
4
|
-
version: 0.
|
|
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, either signed in directly or through Keyward (`keyward --reason "…" -- gh …`): 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 reviews with `frizzctl watch-pr add` / `watch-issue add`. The session-seed hook injects a pointer here when plain `gh` is signed in (`⟦gh available⟧`) or when it is signed out and `keyward` is on PATH (`⟦gh available through Keyward⟧`).
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
metadata:
|
|
6
6
|
internal: true
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# frizz:gh — the gh-CLI playbook
|
|
10
10
|
|
|
11
|
-
You are a **frizz worker
|
|
11
|
+
You are a **frizz worker in a GitHub repo, and `gh` can reach GitHub** — the session-seed hook checked before pointing you here. `gh` is the fastest path to issue / PR / CI / release context — reach for it before guessing, and prefer it over scraping the web UI or reasoning from memory.
|
|
12
12
|
|
|
13
|
-
This skill is the full playbook the injected
|
|
13
|
+
This skill is the full playbook the injected block summarizes: **which of two modes you are in**, the **read-vs-write boundary**, concrete **read recipes**, and how to **wait on CI and reviews** until the next actionable event.
|
|
14
|
+
|
|
15
|
+
## Two modes: signed in, or through Keyward
|
|
16
|
+
|
|
17
|
+
The injected block names your mode.
|
|
18
|
+
|
|
19
|
+
- **`⟦gh available⟧` — plain `gh` is signed in.** Run the recipes below as written.
|
|
20
|
+
- **`⟦gh available through Keyward⟧` — plain `gh` is signed OUT, by design.** Keyward is the human's Secure Enclave vault. It hands `gh` their token in `GH_TOKEN` for one run, and only for that run. Run **every** recipe below with this prefix:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
keyward --reason "<what this command is for, in a sentence>" -- gh issue view 123 -R OWNER/REPO --comments
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`gh` comes first after `--`, or right after a package runner (`npx`, `pnpm exec`, `nub exec`, `nubx`, `bunx`, `yarn dlx`, `npm exec`). The reason is shown on the human's Touch ID sheet, so write what they need to recognise the job; a run without `--reason` is refused before anything is asked. Otherwise the exit code is gh's own.
|
|
27
|
+
|
|
28
|
+
### Working under Keyward
|
|
29
|
+
|
|
30
|
+
- **One Touch ID covers this repository's gh runs for 10 minutes**, ending early when the screen locks or the Mac sleeps. Batch your gh reads into one burst (the issue, its comments, the linked PR, its checks) rather than spreading them across the task, so each burst costs the human one touch.
|
|
31
|
+
- **Nothing is released while the screen is locked.** That includes the first run of a burst.
|
|
32
|
+
- **Don't check sign-in with `gh auth status` or `gh auth token`.** Plain `gh` is signed out here, so `gh auth status` reports no account even when Keyward would release, and `gh auth token` / `gh auth login` outside Keyward are refused. The injected block already tells you which mode you are in; to find out whether a release works, run the read you need.
|
|
33
|
+
- **Only `gh` itself is signed in.** `keyward -- node script.mjs` hands the script NOTHING, so a script that runs `gh` itself will not authenticate under Keyward. That includes the bundled `ci-watch.mjs` / `review-watch.mjs`. A form that hands a script the token, `keyward --reason "…" --token gh -- node <script>`, is PROVISIONAL and may change, and it asks for Touch ID on every run; use it only to run a repo script that has to call gh itself, never as a way to keep a monitor running.
|
|
34
|
+
|
|
35
|
+
### What a refusal looks like
|
|
36
|
+
|
|
37
|
+
Each of these is printed on stderr and exits 1:
|
|
38
|
+
|
|
39
|
+
| stderr | What it means | What to do |
|
|
40
|
+
| --- | --- | --- |
|
|
41
|
+
| `keyward: not released: screen locked` (also `not at the console`, `screen state unreadable`) | Nobody is at the Mac to approve. | **Stop and report it to the human.** |
|
|
42
|
+
| `keyward: not released: declined or authentication failed` | The human said no, or Touch ID failed. | **Stop and report it to the human.** |
|
|
43
|
+
| `keyward: no gh sign-in for <repo> or globally: …` | Keyward holds no GitHub token for this repo. | Stop and report it; the human has to store one. |
|
|
44
|
+
| a refusal naming the missing `--reason` | Nothing was asked; a reason is required. | Add `--reason "…"` and run it again. |
|
|
45
|
+
|
|
46
|
+
**On any stderr line starting `keyward: not released:`, stop and report it to the human. Never retry.** A locked screen does not clear because you asked again, and a decline was the human's answer. Say which command you were trying to run and why, then carry on with whatever does not need GitHub, or come to rest saying what is blocked on it.
|
|
14
47
|
|
|
15
48
|
## The one hard rule — READ freely, WRITE only when asked
|
|
16
49
|
|
|
@@ -25,7 +58,7 @@ There is no server-side enforcement of this; the boundary is yours to hold.
|
|
|
25
58
|
|
|
26
59
|
## Read recipes
|
|
27
60
|
|
|
28
|
-
Always scope with `-R OWNER/REPO` so a command is dir-independent, and prefer `--json <fields>` (+ `-q <jq>`) so you pull exactly what you need.
|
|
61
|
+
Always scope with `-R OWNER/REPO` so a command is dir-independent, and prefer `--json <fields>` (+ `-q <jq>`) so you pull exactly what you need. The recipes are written as plain `gh`; under Keyward, prefix each with `keyward --reason "…" -- `, and run related ones back to back so one Touch ID covers them.
|
|
29
62
|
|
|
30
63
|
**Issues**
|
|
31
64
|
```bash
|
|
@@ -89,10 +122,38 @@ gh api "repos/OWNER/REPO/issues?state=open&labels=bug&per_page=50" --jq '.[] | {
|
|
|
89
122
|
## Keep GitHub automation active
|
|
90
123
|
|
|
91
124
|
CI, automated review, releases, merge queues, and already-authorized merge progression are work you
|
|
92
|
-
can observe
|
|
93
|
-
|
|
125
|
+
can observe; they do not earn a blind `awaiting` fence. Keep a live wait attached to the thread and
|
|
126
|
+
continue when it reports.
|
|
127
|
+
|
|
128
|
+
### Wait on a PR or an issue with `frizzctl watch-pr` / `watch-issue`
|
|
129
|
+
|
|
130
|
+
This is the way to wait on CI and reviews, in both modes:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
frizzctl watch-pr add OWNER/REPO#NUMBER --for 6h # your own PR; MONTHS (180d) for someone else's
|
|
134
|
+
frizzctl watch-issue add OWNER/REPO#NUMBER --for 30d
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Frizz's SERVER runs these watches on its own read-only GitHub credential. They need no `gh` sign-in
|
|
138
|
+
from you, keep running while the screen is locked and across restarts, and cost no Touch ID. Register
|
|
139
|
+
the PR, then rest with it in the fence's `prs:` list (`prs: [OWNER/REPO#NUMBER]`) and the same long
|
|
140
|
+
`for:`: Frizz baselines current reviews/comments and wakes you on CI turning green or red and on ANY
|
|
141
|
+
new review or comment after registration — bot or human. The registration creates the wait; the fence
|
|
142
|
+
only declares it. A GitHub ISSUE — a reporter you asked for a reproduction, a maintainer you asked to
|
|
143
|
+
triage — is `frizzctl watch-issue add`, named in the fence's `issues:` list: it wakes you on every later
|
|
144
|
+
comment, on a label or assignee change, and when the issue closes. `frizzctl watch-pr --help` has the rest.
|
|
145
|
+
|
|
146
|
+
If a specific external human reviewer/approver is the only remaining gate, that is a question for the
|
|
147
|
+
human (a ` ```question ` fence) — waiting on a person is never a park. The dashboard operator's own
|
|
148
|
+
go/no-go remains a registered question. If the next check deliberately belongs at a named wall-clock
|
|
149
|
+
instant, set a durable timer with `frizzctl timer set` and park with its id in your fence's `timers:` list.
|
|
150
|
+
|
|
151
|
+
### Watching inside a turn — only where plain `gh` is signed in
|
|
94
152
|
|
|
95
|
-
|
|
153
|
+
Sometimes you want the verdict inside the turn you are in, not as a wake after a rest: a CI run you
|
|
154
|
+
are about to read the logs of. That takes a session-bound monitor, and it needs a signed-in plain `gh`.
|
|
155
|
+
**Under Keyward, don't: the monitors and a `gh run watch` loop cannot authenticate there.** Register
|
|
156
|
+
`frizzctl watch-pr add` and rest instead.
|
|
96
157
|
|
|
97
158
|
Before launching any CI/review monitor, inspect project-local `AGENTS.md`, active skills, repository
|
|
98
159
|
docs, `package.json` scripts, and declared monitor tooling. Prefer an explicit project-local monitor
|
|
@@ -103,7 +164,7 @@ never execute a monitor merely because its filename looks plausible.
|
|
|
103
164
|
|
|
104
165
|
When no project monitor is declared, the bundled fallback scripts are
|
|
105
166
|
`<this-skill-dir>/scripts/ci-watch.mjs` and `review-watch.mjs`. They are generated byte-for-byte from
|
|
106
|
-
Frizz's canonical `monitors/` source and require only Node plus
|
|
167
|
+
Frizz's canonical `monitors/` source and require only Node plus a signed-in plain `gh`. Their stdout is
|
|
107
168
|
`frizz.github-monitor/v1` NDJSON: `status` means keep waiting; `terminal` is a verdict. They join
|
|
108
169
|
exact-head workflow runs with PR checks, keeping `ACTION_REQUIRED` pending, and baseline every review
|
|
109
170
|
and comment so any new one wakes — bot or human, with no actor
|
|
@@ -124,16 +185,8 @@ such as `push` and `pull_request` both contribute to the aggregate verdict.
|
|
|
124
185
|
- A background Bash launch exposes an output-file path. Use `Read` on that path only for diagnostics;
|
|
125
186
|
`TaskOutput` is deprecated. Do not fake waiting with `echo waiting` or sleep-only Bash calls.
|
|
126
187
|
|
|
127
|
-
Both mechanisms are session-bound
|
|
128
|
-
|
|
129
|
-
list. If a specific external human reviewer/approver is the only remaining gate, that is a
|
|
130
|
-
question for the human (a ` ```question ` fence) — waiting on a person is never a park. For a GitHub PR, register it with
|
|
131
|
-
`frizzctl watch-pr add` and name it in the fence's `prs:` list (`prs: [OWNER/REPO#NUMBER]`): frizz
|
|
132
|
-
baselines current reviews/comments and wakes on ANY new activity after registration — bot or human —
|
|
133
|
-
durably across restarts. The registration creates the wait; the fence only declares it. For a GitHub ISSUE — a
|
|
134
|
-
reporter you asked for a reproduction, a maintainer you asked to triage — register it with `frizzctl watch-issue add` and
|
|
135
|
-
name it in the fence's `issues:` list (`issues: [OWNER/REPO#NUMBER]`): frizz wakes you on every later comment, on a label
|
|
136
|
-
or assignee change, and when the issue closes. The dashboard operator's own go/no-go remains a registered question.
|
|
188
|
+
Both mechanisms are session-bound: they die with the session, and a rest does not wait on them. A wait
|
|
189
|
+
you rest on is `frizzctl watch-pr` / `watch-issue`.
|
|
137
190
|
|
|
138
191
|
## Fitting gh work into your thread type
|
|
139
192
|
|
package/web-dist/assets/{abnfDiagram-VRR7QNED-DZb1taeh.js → abnfDiagram-VRR7QNED-pzT4fWMK.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-BJDWCQPF.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-CeayMM0l.js";import"./chunk-WYO6CB5R-CFzJhIFb.js";import"./chunk-VAUOI2AC-IhEj8PHl.js";import{n as i,r as a,t as o}from"./chunk-MOJQB5TN-B5dCeSWz.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-D2xRtqvF.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-BJDWCQPF.js";export{e as createArchitectureServices};
|