frizz-server 0.15.45 → 0.15.47
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 +9171 -8997
- package/dist/dev-child.js +10718 -9960
- package/package.json +2 -2
- package/runtime/cc-worker/DECISIONS.md +25 -0
- package/runtime/cc-worker/hooks/perm-policy.mjs +28 -19
- package/runtime/cc-worker/hooks/session-seed.mjs +10 -1
- package/runtime/cc-worker/skills/gh/SKILL.md +2 -0
- package/web-dist/assets/{abnfDiagram-VRR7QNED-DdcfVlSS.js → abnfDiagram-VRR7QNED-iDOCNbXO.js} +1 -1
- package/web-dist/assets/{arc-Dd-9qSR2.js → arc-BrF0Rm1i.js} +1 -1
- package/web-dist/assets/architecture-TIHT7OUA-BJ-2sVoF.js +1 -0
- package/web-dist/assets/{architectureDiagram-ZJ3FMSHR-CTtEkoUc.js → architectureDiagram-ZJ3FMSHR-COkFKHik.js} +1 -1
- package/web-dist/assets/{blockDiagram-677ZJIJ3-DZxjSFDS.js → blockDiagram-677ZJIJ3-B8jHaw9w.js} +1 -1
- package/web-dist/assets/{c4Diagram-LMCZKHZV-CLG6s2jp.js → c4Diagram-LMCZKHZV-Bk68X3s1.js} +1 -1
- package/web-dist/assets/channel-CC6hXCSg.js +1 -0
- package/web-dist/assets/{chunk-32BRIVSS-C2MZy9BN.js → chunk-32BRIVSS-D1k2xlst.js} +1 -1
- package/web-dist/assets/{chunk-52WLFC77-BOrpbDoI.js → chunk-52WLFC77-PIA7tEec.js} +1 -1
- package/web-dist/assets/{chunk-C7G6YPKG-6FSry0ha.js → chunk-C7G6YPKG-Cpq60F62.js} +1 -1
- package/web-dist/assets/{chunk-EX3LRPZG-JNDb4Sk2.js → chunk-EX3LRPZG-B8pMnMFD.js} +1 -1
- package/web-dist/assets/{chunk-FWX5IMBZ-DYu4gJrR.js → chunk-FWX5IMBZ-DiB0mfEq.js} +2 -2
- package/web-dist/assets/{chunk-HOUHSVGY-Dr0K_z9k.js → chunk-HOUHSVGY-BWPPBtYe.js} +1 -1
- package/web-dist/assets/{chunk-ICXQ74PX-CIno_8Vw.js → chunk-ICXQ74PX-Bxo3FtCY.js} +1 -1
- package/web-dist/assets/{chunk-MOJQB5TN-D_IVymB_.js → chunk-MOJQB5TN-Cn7YFv8n.js} +1 -1
- package/web-dist/assets/{chunk-OGEWGWER-CvQ5TU0U.js → chunk-OGEWGWER-D0DZsO7H.js} +1 -1
- package/web-dist/assets/{chunk-PUDLZKDR-UiJIHeOE.js → chunk-PUDLZKDR-lbu1PRL-.js} +1 -1
- package/web-dist/assets/{chunk-Q4XR5HBZ-C4rwW_5T.js → chunk-Q4XR5HBZ-DODjBb_2.js} +1 -1
- package/web-dist/assets/{chunk-RYQCIY6F-Go3cYHvE.js → chunk-RYQCIY6F-UI2ov1Gm.js} +1 -1
- package/web-dist/assets/{chunk-V7JOEXUC-B26l9uIK.js → chunk-V7JOEXUC-CoAxUYwV.js} +1 -1
- package/web-dist/assets/{chunk-VAUOI2AC-Bul-Lbfn.js → chunk-VAUOI2AC-DayQueQJ.js} +1 -1
- package/web-dist/assets/{chunk-VR4S4FIN-cgPP4htg.js → chunk-VR4S4FIN-BvE4-7uz.js} +1 -1
- package/web-dist/assets/{chunk-WYO6CB5R-l-N6lA6o.js → chunk-WYO6CB5R-C1b8f_Ha.js} +1 -1
- package/web-dist/assets/{chunk-XXDRQBXY-D0391xrR.js → chunk-XXDRQBXY-Db8h8vrX.js} +1 -1
- package/web-dist/assets/{chunk-ZGVPDNZ5-chAqCG_5.js → chunk-ZGVPDNZ5-BPvaPdjm.js} +1 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-CjYLtM5U.js +1 -0
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-CjYLtM5U.js +1 -0
- package/web-dist/assets/{cose-bilkent-JH36ORCC-DK83rOFR.js → cose-bilkent-JH36ORCC-6a5DuAKw.js} +1 -1
- package/web-dist/assets/{cynefin-VYW2F7L2-BtxZIfI6.js → cynefin-VYW2F7L2-CiaAgDBh.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-TSTJHNR4-adx624Qr.js → cynefinDiagram-TSTJHNR4-C2-bZ39g.js} +1 -1
- package/web-dist/assets/{dagre-VKFMJZFB-7S1rjvBP.js → dagre-VKFMJZFB-B9ePaZcR.js} +1 -1
- package/web-dist/assets/{diagram-FQU43EPY-YIbh14Tf.js → diagram-FQU43EPY-oBxIoUHV.js} +1 -1
- package/web-dist/assets/{diagram-G47NLZAW-CA4OeYTm.js → diagram-G47NLZAW-DUuYaukI.js} +1 -1
- package/web-dist/assets/{diagram-NH7WQ7WH-1HMUc7_6.js → diagram-NH7WQ7WH-DU4YRpGs.js} +1 -1
- package/web-dist/assets/{diagram-OA4YK3LP-DgDhda4z.js → diagram-OA4YK3LP-2ogMtbVh.js} +1 -1
- package/web-dist/assets/{diagram-WEI45ONY-SbpN5qmO.js → diagram-WEI45ONY-B3_rdnvV.js} +1 -1
- package/web-dist/assets/{dist-BfPkKz6y.js → dist-9O4kNbWa.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-CCIWWBDH-DSAMxLZS.js → ebnfDiagram-CCIWWBDH-DNJfkzp6.js} +1 -1
- package/web-dist/assets/{erDiagram-Q63AITRT-CGBvzS3i.js → erDiagram-Q63AITRT-DTazNJT3.js} +1 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-CAq-MItm.js +1 -0
- package/web-dist/assets/flowDiagram-23GEKE2U-CyeGrBNa.js +1 -0
- package/web-dist/assets/{ganttDiagram-NO4QXBWP-Bj6VO__W.js → ganttDiagram-NO4QXBWP-CAl6kamJ.js} +1 -1
- package/web-dist/assets/{gitGraph-TEB2WS4Q-DqEncJ54.js → gitGraph-TEB2WS4Q-VeGcf3-g.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-DCtJAQgP.js → gitGraphDiagram-IHSO6WYX-DGDk4E7F.js} +1 -1
- package/web-dist/assets/index-4uNIPs2R.js +378 -0
- package/web-dist/assets/index-BYeFPFV9.css +2 -0
- package/web-dist/assets/{info-DKCQHKI2-MQcHubhW.js → info-DKCQHKI2--Ysy9pf-.js} +1 -1
- package/web-dist/assets/{infoDiagram-FWYZ7A6U-CsDgtZyr.js → infoDiagram-FWYZ7A6U-Vi583nbN.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-n4npKpMz.js → ishikawaDiagram-FXEZZL3T-C9HuPQ7n.js} +1 -1
- package/web-dist/assets/{journeyDiagram-5HDEW3XC-gvFqyFBK.js → journeyDiagram-5HDEW3XC-BaG6DHpc.js} +1 -1
- package/web-dist/assets/{kanban-definition-HUTT4EX6-BwGmOtsZ.js → kanban-definition-HUTT4EX6-D2idvTZZ.js} +1 -1
- package/web-dist/assets/{line-DVHKI4UD.js → line-CHvSdfqI.js} +1 -1
- package/web-dist/assets/{linear-Bl3GAeC5.js → linear-BfMiINPG.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-CS9sXl26.js → mermaid-parser.core-BC4Qutkz.js} +3 -3
- package/web-dist/assets/{mermaid.core-BF2OWOC5.js → mermaid.core-B68W9xIp.js} +3 -3
- package/web-dist/assets/{mindmap-definition-LN4V7U3C-AO9iV-xK.js → mindmap-definition-LN4V7U3C-oAq5mEJC.js} +1 -1
- package/web-dist/assets/{packet-7NZHBO7P-DKlEG9Ea.js → packet-7NZHBO7P-B9zkni4H.js} +1 -1
- package/web-dist/assets/{pegDiagram-2B236MQR-C1dCLvv_.js → pegDiagram-2B236MQR-Bkh6geaD.js} +1 -1
- package/web-dist/assets/{pie-RZYD4A2V-D1VTnLcn.js → pie-RZYD4A2V-BBHMXf27.js} +1 -1
- package/web-dist/assets/{pieDiagram-ENE6RG2P-CQZmxKs_.js → pieDiagram-ENE6RG2P-DQ2f6w1c.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-DBGXvq5A.js → quadrantDiagram-ABIIQ3AL-BhYtyo0A.js} +1 -1
- package/web-dist/assets/{radar-I7S5WNFK-dDBNghsQ.js → radar-I7S5WNFK-CvWy-0Yr.js} +1 -1
- package/web-dist/assets/{railroad-3IZDKUUU-BATiGbM7.js → railroad-3IZDKUUU-C5xUcLo_.js} +1 -1
- package/web-dist/assets/railroad-abnf-AHOZXSZD-D7ZNn3_u.js +1 -0
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-rxkj4lNU.js +1 -0
- package/web-dist/assets/railroad-peg-LSFZ7HO6-DeZ6z_7C.js +1 -0
- package/web-dist/assets/{railroadDiagram-RFXS5EU6-CfMepKHY.js → railroadDiagram-RFXS5EU6-B_9aCfx8.js} +1 -1
- package/web-dist/assets/{requirementDiagram-TGXJPOKE-CatGfExT.js → requirementDiagram-TGXJPOKE-DmrXK4rK.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-HTMAVEWB-BJKlQgBE.js → sankeyDiagram-HTMAVEWB-D17hTJxE.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-pnjnPsTb.js → sequenceDiagram-DBY2YBRQ-DPey_smA.js} +1 -1
- package/web-dist/assets/{src-B4MKXuyl.js → src-B-KeW2DM.js} +1 -1
- package/web-dist/assets/{stateDiagram-2N3HPSRC-XHE1q90_.js → stateDiagram-2N3HPSRC-BxjJLKfe.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-DDJ14-db.js +1 -0
- package/web-dist/assets/{swimlanes-5IMT3BWC-Bi6g3R3-.js → swimlanes-5IMT3BWC-dct_dfAy.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-CLLk0x4V.js +8 -0
- package/web-dist/assets/{timeline-definition-FHXFAJF6-B9fPPKq7.js → timeline-definition-FHXFAJF6-CEYAtheb.js} +1 -1
- package/web-dist/assets/{treeView-QDETBFTQ-Dgzve3kG.js → treeView-QDETBFTQ-BCg0MbaM.js} +1 -1
- package/web-dist/assets/{treemap-6X3UGDF4-GicQSqLq.js → treemap-6X3UGDF4-ILmvrzMk.js} +1 -1
- package/web-dist/assets/{vennDiagram-L72KCM5P-YFe7_B7_.js → vennDiagram-L72KCM5P-CVz8QpMQ.js} +1 -1
- package/web-dist/assets/{wardley-OPB4EBWU-IvaK89qC.js → wardley-OPB4EBWU-9fWETCs-.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-EHGQE667-BMQBcZ-w.js → wardleyDiagram-EHGQE667-DTjemLX3.js} +1 -1
- package/web-dist/assets/{xychartDiagram-FW5EYKEG-ChKpZ3CP.js → xychartDiagram-FW5EYKEG-JtHdTmnr.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/assets/architecture-TIHT7OUA-Dp1_ME8f.js +0 -1
- package/web-dist/assets/channel-DLMVcZ_W.js +0 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-BcbTfrpO.js +0 -1
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-BcbTfrpO.js +0 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-sBAENH7C.js +0 -1
- package/web-dist/assets/flowDiagram-23GEKE2U-Beu12Qi8.js +0 -1
- package/web-dist/assets/index-B8GWzUFF.js +0 -378
- package/web-dist/assets/index-D599iquJ.css +0 -2
- package/web-dist/assets/railroad-abnf-AHOZXSZD-Bb6r2eps.js +0 -1
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-C55U6d71.js +0 -1
- package/web-dist/assets/railroad-peg-LSFZ7HO6-B55GNEiw.js +0 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-CHhLO38y.js +0 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-DAhPbYdd.js +0 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "frizz-server",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.47",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Replaceable Frizz server runtime",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dataEpoch": 1
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@parcel/watcher": "
|
|
25
|
+
"@parcel/watcher": "2.5.6"
|
|
26
26
|
},
|
|
27
27
|
"pnpm": {
|
|
28
28
|
"onlyBuiltDependencies": [
|
|
@@ -310,6 +310,23 @@ refusal also lands in the transcript, so the card is a pointer to something real
|
|
|
310
310
|
copy of it. If approval visibility is ever wanted again it needs an EXPIRY (or a per-turn scope) —
|
|
311
311
|
re-adding the sticky line is not the fix.
|
|
312
312
|
|
|
313
|
+
AUTO MODE'S HAND-BACKS GO TO A PERSON (2026-11-06). Until then `worker-autonomy` approved everything that
|
|
314
|
+
reached this hook under `auto`, on the 2026-07-25 reasoning above: nobody was at the keyboard and an
|
|
315
|
+
unanswered prompt parked a thread forever. Both premises changed. An approval card now lapses into a denial
|
|
316
|
+
after 5m, so an unanswered one costs five minutes instead of a day. And `auto` became the default, so what
|
|
317
|
+
this hook does under `auto` is what every new thread gets. The Claude Code 2.1.318 source shows the problem
|
|
318
|
+
with approving here: a classifier refusal returns a denial with no hook, but after 3 refusals in a row or
|
|
319
|
+
20 in a session the same action falls back to a prompt, and that prompt reaches this hook. Approving it
|
|
320
|
+
turned a refusal into a retry count. So `auto-escalation` defers, ahead of `worker-autonomy`, and
|
|
321
|
+
`worker-autonomy` now serves bypass. The fallback was read from the source and not reproduced with a live
|
|
322
|
+
model: in about 12 attempts the classifier allowed most of the actions, or the model stopped first. An `ask`
|
|
323
|
+
rule is the deterministic way to exercise this path. In the same version, approving an `ask` rule's request
|
|
324
|
+
here produced a bare refusal and no card, which the KNOWN LIMIT above describes from the other side.
|
|
325
|
+
|
|
326
|
+
How often this matters: on the maintainer's board, 57 threads that ran in `auto` made 11,842 tool calls with
|
|
327
|
+
24 denials, and only 1 thread's last hook marker reached `worker-autonomy`. Cards should stay rare, and each
|
|
328
|
+
one is a request the classifier would not decide.
|
|
329
|
+
|
|
313
330
|
VERIFICATION: `scripts/verify-perm-marker.mjs` runs the REAL hook the way Claude Code does and
|
|
314
331
|
asserts every branch. The allow path was additionally driven against a REAL interactive `claude` (it
|
|
315
332
|
cannot be exercised under `claude -p`, where PermissionRequest hooks do not fire).
|
|
@@ -1241,3 +1258,11 @@ Colin's decision (question `gh-reads` on the Keyward thread): an agent's GitHub
|
|
|
1241
1258
|
- **The credential is an encrypted file, with a random per-machine key in the keychain (Colin, 2026-11-05).** `github-credential-seal.ts`. It stops token scanners, accidental reads into a transcript, and a copied file or backup leaving the machine. It does not stop a program running as the same user, because any process can run `security`: a dummy item saved by `security` read back with no prompt from an unrelated process. Rejected: a key baked into Frizz, since Frizz is open source; a plain keychain item, whose 8-hourly rewrites risk the "Keychain Not Found" dialog (the key here is written once); a signed helper, since Frizz has no native code or release signing; and an in-memory keeper, which needs a new device code after every reboot. A worker's `hosts.yml` still holds the 8-hour access token in the clear, because `gh` reads it. The refresh token stays in the encrypted file.
|
|
1242
1259
|
- **Contents read can post commit comments, and Colin kept it (2026-11-05).** GitHub files `POST /repos/{owner}/{repo}/commits/{sha}/comments` under Contents read. Measured with the App's token on `colinhacks/ci-testing`: an empty request came back 422 for the missing body, where the same request to issues and to file contents came back 403. No narrower permission gives commit data on a private repo, so the exposure is accepted and stated in Settings and the README. Forks and template repos are also filed under Contents read, but they need Administration write too.
|
|
1243
1260
|
- **No organization permissions and no Administration, so a repo admin can install it.** GitHub lets a repository admin install an App on the repos they administer only if it requests neither (Colin, 2026-11-05: an org owner should not be a prerequisite for a repo-scoped install). Adding either one back turns every such install into a request to an org owner. Reads lost: classic branch protection and team member lists. Rulesets stay readable through Metadata.
|
|
1261
|
+
|
|
1262
|
+
## 2026-11-06: a worker on a machine with no Keyward and no `gh` sign-in reads with Frizz's credential too
|
|
1263
|
+
|
|
1264
|
+
Colin, on whether agents can read their own CI logs: *"Perhaps we should be providing a GitHub token to the agents, or providing a way for them to access the GitHub app token inside of their runs automatically (if they're signed in and if they're not signed into the GitHub CLI)."* The 2026-11-04 rule only moved `GH_CONFIG_DIR` where Keyward could take the writes, so that machine's worker had no GitHub at all while the server itself was signed in.
|
|
1265
|
+
|
|
1266
|
+
- **`frizzGithubWorkerEnv` now asks whether the move costs a write.** Keyward on PATH: it doesn't. No Keyward and a sign-in of the operator's own: it would, so the worker keeps that sign-in, as before. No Keyward and no sign-in: there is no write to lose.
|
|
1267
|
+
- **Whether `gh` has a sign-in comes from its token variables and `hosts.yml`, never from running it.** This runs on every worker start. `hosts.yml` names a keychain-held sign-in as well, so nothing here can raise a keychain prompt. A sign-in to any host counts, because the move would hide it just the same, and an expired one counts, which leaves that machine as it was.
|
|
1268
|
+
- **The hook's read-only block has a second form for this machine.** It tells the worker to hand a write to the human as steps. The first form names a `keyward` that isn't there.
|
|
@@ -4,17 +4,12 @@
|
|
|
4
4
|
// structured signal the tailer reads instead of scraping the worker's terminal output.
|
|
5
5
|
//
|
|
6
6
|
// WHY THIS DECIDES (it used to only observe): a frizz worker runs under a dashboard with nobody at the
|
|
7
|
-
// keyboard, so a tool-approval prompt parks the thread invisibly until a human happens to look.
|
|
8
|
-
//
|
|
9
|
-
// `auto
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
// removes the decision POINT, so nothing can ever inspect a request again. Keeping `auto` + deciding
|
|
14
|
-
// here preserves the seam — the same request that is auto-approved today can be routed to a policy,
|
|
15
|
-
// or to a human, without changing how workers launch. Claude Code labels the outcome in the
|
|
16
|
-
// transcript ("Allowed by PermissionRequest hook"), so an auto-approval stays visible rather than
|
|
17
|
-
// being indistinguishable from bypass.
|
|
7
|
+
// keyboard, so a tool-approval prompt parks the thread invisibly until a human happens to look. Under
|
|
8
|
+
// `bypassPermissions` this approves what Claude Code still asks about, because the operator chose not to
|
|
9
|
+
// be asked. Under `auto`, the default since 2026-11-06, the classifier has already allowed or refused
|
|
10
|
+
// nearly everything by the time a request gets here, and what is left goes to a person: see the
|
|
11
|
+
// `auto-escalation` rule. Claude Code labels an approval in the transcript ("Allowed by PermissionRequest
|
|
12
|
+
// hook"), so one stays visible rather than being indistinguishable from no check at all.
|
|
18
13
|
//
|
|
19
14
|
// THREE OUTCOMES:
|
|
20
15
|
// allow — auto-approve; the worker proceeds with no prompt.
|
|
@@ -26,14 +21,12 @@
|
|
|
26
21
|
// UNIVERSAL rules. Nothing repo-specific belongs here — a rule that is right for one repo (e.g. "never
|
|
27
22
|
// open a PR") is wrong for the next.
|
|
28
23
|
//
|
|
29
|
-
// KNOWN LIMIT — an explicit `ask` RULE outranks this hook
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
// settings carry `ask` rules can still park a worker, and the fix for that repo is to relax its own
|
|
36
|
-
// rule, not to change this file. Mode-driven asks (the `default`-mode prompt) ARE overridden.
|
|
24
|
+
// KNOWN LIMIT — an explicit `ask` RULE outranks this hook. A project or user settings entry like
|
|
25
|
+
// `"permissions": {"ask": ["Bash(git push:*)"]}` is not overridden by an `allow` from here. In 2.1.318
|
|
26
|
+
// that allow refuses the call outright ("Claude requested permissions to use Bash, but you haven't
|
|
27
|
+
// granted it yet", measured 2026-11-06), where 2026-07-25's build raised a prompt. An `auto` thread defers
|
|
28
|
+
// instead, so the rule gets the card it asks for; a `bypassPermissions` thread still gets the refusal.
|
|
29
|
+
// Mode-driven asks (the `default`-mode prompt) ARE overridden.
|
|
37
30
|
//
|
|
38
31
|
// GATE: inert unless FRIZZ_THREAD is set, so a foreign/non-frizz session is never affected.
|
|
39
32
|
// FAIL-SAFE: any error at all → emit nothing → the prompt is raised and the human decides. Note this
|
|
@@ -158,6 +151,22 @@ const RULES = [
|
|
|
158
151
|
decision: 'defer',
|
|
159
152
|
reason: 'FRIZZ_PERM_POLICY=review — every request is left for a human to answer.',
|
|
160
153
|
},
|
|
154
|
+
{
|
|
155
|
+
// WHAT AUTO MODE WILL NOT DECIDE GOES TO A PERSON, it is not approved here (2026-11-06). In `auto` the
|
|
156
|
+
// classifier answers first, so a request reaches this hook only when Claude Code is asking a person in
|
|
157
|
+
// the classifier's place. One of those is its denial limit: after 3 refusals in a row or 20 in a session
|
|
158
|
+
// it falls back to asking (`Abn` in 2.1.318, which leaves hooks free to allow). Approving here turned a
|
|
159
|
+
// refusal into a retry count. The others are an explicit `ask` rule, which this hook's allow turned into
|
|
160
|
+
// a bare refusal, and a conversation too long for the check. This used to fall through to
|
|
161
|
+
// `worker-autonomy` because one parked card once stalled a thread for a day, on a CLI whose classifier
|
|
162
|
+
// prompted instead of refusing; a card now lapses into a denial after 5m (claude-permission-interactions.ts
|
|
163
|
+
// CLAUDE_PERMISSION_DEADLINE_MS), so the most an unanswered one costs is 5m. Rare in practice: 1 of 57
|
|
164
|
+
// real `auto` threads on the maintainer's board had one, against 11,842 tool calls.
|
|
165
|
+
id: 'auto-escalation',
|
|
166
|
+
test: (i) => i.permission_mode === 'auto',
|
|
167
|
+
decision: 'defer',
|
|
168
|
+
reason: 'Auto mode left this request for a person to answer.',
|
|
169
|
+
},
|
|
161
170
|
{
|
|
162
171
|
id: 'worker-autonomy',
|
|
163
172
|
test: () => true,
|
|
@@ -108,6 +108,15 @@ const ghFrizzReadOnlyBlock =
|
|
|
108
108
|
ghReadOnly +
|
|
109
109
|
'To wait on CI or reviews, register `frizzctl watch-pr add` / `frizzctl watch-issue add` rather than polling. Load the `frizz:gh` skill for the full playbook.';
|
|
110
110
|
|
|
111
|
+
// The same credential on a machine with no Keyward, where `gh` had no sign-in of its own, so a write has
|
|
112
|
+
// nowhere to go from here (frizzGithubWorkerEnv).
|
|
113
|
+
const ghFrizzReadOnlyNoWritesBlock =
|
|
114
|
+
'⟦gh available, read-only⟧ Plain `gh` is signed in here with Frizz\'s own READ-ONLY GitHub credential. Use it EAGERLY and well — it is the fastest path to issue/PR/CI/release context, and you should reach for it before guessing:\n' +
|
|
115
|
+
'• READ freely: `gh issue view N -R OWNER/REPO --comments`, `gh pr view N`, `gh pr diff N`, `gh pr checks N`, `gh run list`/`gh run view`, `gh run view <id> --log-failed`, `gh api repos/OWNER/REPO/…`. Prefer `--json <fields>` over scraping human text. Repo source is not readable through it; read the checkout.\n' +
|
|
116
|
+
'• A WRITE fails with a permission error (`Resource not accessible by integration`, HTTP 403), and so does a read that needs more than it holds, such as a private repo on an account where Frizz\'s GitHub App is not installed (it reads as not found). That is this credential, not a fault, and this machine has no other GitHub sign-in: hand the write to the human as steps, with the exact command or page.\n' +
|
|
117
|
+
ghReadOnly +
|
|
118
|
+
'To wait on CI or reviews, register `frizzctl watch-pr add` / `frizzctl watch-issue add` rather than polling. Load the `frizz:gh` skill for the full playbook.';
|
|
119
|
+
|
|
111
120
|
const ghKeywardBlock =
|
|
112
121
|
'⟦gh available through Keyward⟧ Plain `gh` is signed OUT here; Keyward, the human\'s vault, signs it in for one run at a time. Run EVERY gh command as `keyward --reason "<what this command is for>" -- gh …` (`gh` must be the first word after `--`). It is still the fastest path to issue/PR/CI/release context — reach for it before guessing:\n' +
|
|
113
122
|
'• 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' +
|
|
@@ -168,7 +177,7 @@ if (!ghMode) {
|
|
|
168
177
|
|
|
169
178
|
const parts = [core];
|
|
170
179
|
if (input.source === 'compact') parts.push(grounding);
|
|
171
|
-
if (ghMode === 'read-only') parts.push(ghFrizzReadOnlyBlock);
|
|
180
|
+
if (ghMode === 'read-only') parts.push(onPath('keyward') ? ghFrizzReadOnlyBlock : ghFrizzReadOnlyNoWritesBlock);
|
|
172
181
|
else if (ghMode === 'plain') parts.push(ghBlock);
|
|
173
182
|
else if (ghMode === 'keyward') parts.push(ghKeywardBlock);
|
|
174
183
|
|
|
@@ -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-DdcfVlSS.js → abnfDiagram-VRR7QNED-iDOCNbXO.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-BC4Qutkz.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-B-KeW2DM.js";import"./chunk-WYO6CB5R-C1b8f_Ha.js";import"./chunk-VAUOI2AC-DayQueQJ.js";import{n as i,r as a,t as o}from"./chunk-MOJQB5TN-Cn7YFv8n.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-9O4kNbWa.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-BC4Qutkz.js";export{e as createArchitectureServices};
|