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
package/package.json
CHANGED
|
@@ -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.
|
|
@@ -196,6 +196,12 @@ export function hasEscapingBackgroundJob(raw, depth = 0) {
|
|
|
196
196
|
return false;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
+
/**
|
|
200
|
+
* The opening of every refusal below. The transcript parser reads it back out of the tool result to
|
|
201
|
+
* tell a call this hook stopped, which launched nothing, from a `&` job that really escaped.
|
|
202
|
+
*/
|
|
203
|
+
export const BACKGROUND_JOB_REFUSAL = 'Frizz blocked an untracked shell background job';
|
|
204
|
+
|
|
199
205
|
export function evaluateBashBackgroundHook(input, env = process.env) {
|
|
200
206
|
if (!String(env.FRIZZ_THREAD ?? '').trim()) return {};
|
|
201
207
|
const command = input && typeof input === 'object'
|
|
@@ -209,8 +215,8 @@ export function evaluateBashBackgroundHook(input, env = process.env) {
|
|
|
209
215
|
permissionDecision: 'deny',
|
|
210
216
|
permissionDecisionReason:
|
|
211
217
|
codex
|
|
212
|
-
?
|
|
213
|
-
:
|
|
218
|
+
? BACKGROUND_JOB_REFUSAL + ' (`&`). Shell job control can return without a Codex lifecycle handle, so Frizz cannot report completion or wake this agent. For work that must continue while you do something else, remove `&` and use the managed unified exec pattern: start `tools.exec_command(...)`, call `yield_control()`, then await and fully drain that same process. A returned `session_id` alone is only foreground continuation. For bounded parallel work inside one shell call, finish with `wait` (after `kill`, if used) or own cleanup with an EXIT trap.'
|
|
219
|
+
: BACKGROUND_JOB_REFUSAL + ' (`&`). Shell job control can return from Bash without a Claude task ID, so Frizz cannot report completion or wake this agent. For a long-running local command, remove `&` and call Bash with `run_in_background:true`. For bounded parallel work inside one Bash call, finish with `wait` (after `kill`, if used) or own cleanup with an EXIT trap.',
|
|
214
220
|
},
|
|
215
221
|
};
|
|
216
222
|
}
|
|
@@ -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
|
|