frizz-server 0.15.44 → 0.15.46
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/dev-child.js +2305 -1361
- package/package.json +2 -2
- package/runtime/cc-worker/DECISIONS.md +13 -0
- package/runtime/cc-worker/hooks/session-seed.mjs +32 -9
- package/runtime/cc-worker/lib/frizz-tools.mjs +2 -2
- package/runtime/cc-worker/skills/gh/SKILL.md +26 -13
- package/web-dist/assets/{abnfDiagram-VRR7QNED-pzT4fWMK.js → abnfDiagram-VRR7QNED-dMKEjsHW.js} +1 -1
- package/web-dist/assets/{arc-BW6ZT0Zs.js → arc-rNT0YHdg.js} +1 -1
- package/web-dist/assets/architecture-TIHT7OUA-NCeuUKT3.js +1 -0
- package/web-dist/assets/{architectureDiagram-ZJ3FMSHR-DjJJlL8J.js → architectureDiagram-ZJ3FMSHR-CYD9DZA5.js} +1 -1
- package/web-dist/assets/{blockDiagram-677ZJIJ3-BFxmMqh-.js → blockDiagram-677ZJIJ3-CfxVXTmt.js} +1 -1
- package/web-dist/assets/{c4Diagram-LMCZKHZV-pPNLdLrQ.js → c4Diagram-LMCZKHZV-CURoUkcF.js} +1 -1
- package/web-dist/assets/channel-C7OqV6FU.js +1 -0
- package/web-dist/assets/{chunk-32BRIVSS-DO2QffFz.js → chunk-32BRIVSS-yHDsUxjG.js} +1 -1
- package/web-dist/assets/{chunk-52WLFC77-BCQbJBxs.js → chunk-52WLFC77-ZOa2pNRf.js} +1 -1
- package/web-dist/assets/{chunk-C7G6YPKG-CqrojpJt.js → chunk-C7G6YPKG-6kS80FwC.js} +1 -1
- package/web-dist/assets/{chunk-EX3LRPZG-ClooPSHv.js → chunk-EX3LRPZG-ChL3TCQ1.js} +1 -1
- package/web-dist/assets/{chunk-FWX5IMBZ-BRUVeEPm.js → chunk-FWX5IMBZ-CZA0PJ2q.js} +2 -2
- package/web-dist/assets/{chunk-HOUHSVGY-Daa5JPul.js → chunk-HOUHSVGY-DADpdwih.js} +1 -1
- package/web-dist/assets/{chunk-ICXQ74PX-D1EePAvT.js → chunk-ICXQ74PX-DsZXrGey.js} +1 -1
- package/web-dist/assets/{chunk-MOJQB5TN-B5dCeSWz.js → chunk-MOJQB5TN-QXPP07cw.js} +1 -1
- package/web-dist/assets/{chunk-OGEWGWER-DQZCm2QT.js → chunk-OGEWGWER-BnCPcBUr.js} +1 -1
- package/web-dist/assets/{chunk-PUDLZKDR-DS74vQXD.js → chunk-PUDLZKDR-7cwzaMKa.js} +1 -1
- package/web-dist/assets/{chunk-Q4XR5HBZ-DRapbjEK.js → chunk-Q4XR5HBZ-CfaCFnry.js} +1 -1
- package/web-dist/assets/{chunk-RYQCIY6F-Db3_N4pr.js → chunk-RYQCIY6F-Dw3inyG6.js} +1 -1
- package/web-dist/assets/{chunk-V7JOEXUC-DuoGUcxW.js → chunk-V7JOEXUC-BUGdtSDc.js} +1 -1
- package/web-dist/assets/{chunk-VAUOI2AC-IhEj8PHl.js → chunk-VAUOI2AC-BajrAZEY.js} +1 -1
- package/web-dist/assets/{chunk-VR4S4FIN-CBE53WRM.js → chunk-VR4S4FIN-CZhwOnY-.js} +1 -1
- package/web-dist/assets/{chunk-WYO6CB5R-CFzJhIFb.js → chunk-WYO6CB5R-DPplcyki.js} +1 -1
- package/web-dist/assets/{chunk-XXDRQBXY-BghDEsiV.js → chunk-XXDRQBXY-Dxvo6Aj4.js} +1 -1
- package/web-dist/assets/{chunk-ZGVPDNZ5-f1DUaopj.js → chunk-ZGVPDNZ5-D_nMWwGu.js} +1 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-C0vbHYBX.js +1 -0
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-C0vbHYBX.js +1 -0
- package/web-dist/assets/{cose-bilkent-JH36ORCC-C94dFTH0.js → cose-bilkent-JH36ORCC-EXH8BJZr.js} +1 -1
- package/web-dist/assets/{cynefin-VYW2F7L2-CD3XB9bu.js → cynefin-VYW2F7L2-BRCpSA3J.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-TSTJHNR4-DKpothpE.js → cynefinDiagram-TSTJHNR4-DT-zxoY8.js} +1 -1
- package/web-dist/assets/{dagre-VKFMJZFB-DEgXDrsI.js → dagre-VKFMJZFB-eCkdmvvX.js} +1 -1
- package/web-dist/assets/{diagram-FQU43EPY-DtNEUk_t.js → diagram-FQU43EPY-C0ERgkJs.js} +1 -1
- package/web-dist/assets/{diagram-G47NLZAW-DQqDEo1Z.js → diagram-G47NLZAW-wnblykLF.js} +1 -1
- package/web-dist/assets/{diagram-NH7WQ7WH-CWaXDOAf.js → diagram-NH7WQ7WH-DflsisJs.js} +1 -1
- package/web-dist/assets/{diagram-OA4YK3LP-BRnuMLIx.js → diagram-OA4YK3LP-Dy8tJizx.js} +1 -1
- package/web-dist/assets/{diagram-WEI45ONY-DF6OlbS6.js → diagram-WEI45ONY-C7cuTuRM.js} +1 -1
- package/web-dist/assets/{dist-D2xRtqvF.js → dist-lcrHUGwW.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-CCIWWBDH-EcDTeY-l.js → ebnfDiagram-CCIWWBDH-Be_-xy5Y.js} +1 -1
- package/web-dist/assets/{erDiagram-Q63AITRT-O3W_7L5X.js → erDiagram-Q63AITRT-Ze05Sekz.js} +1 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-3mcZ7Om7.js +1 -0
- package/web-dist/assets/flowDiagram-23GEKE2U-C1w6bUoP.js +1 -0
- package/web-dist/assets/{ganttDiagram-NO4QXBWP-DIplx6-n.js → ganttDiagram-NO4QXBWP-DXPLAeR9.js} +1 -1
- package/web-dist/assets/{gitGraph-TEB2WS4Q-fEwpElLL.js → gitGraph-TEB2WS4Q-qd8HrnTL.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-CawRNGyW.js → gitGraphDiagram-IHSO6WYX-BUlIs4PU.js} +1 -1
- package/web-dist/assets/index-CuESixAT.css +2 -0
- package/web-dist/assets/index-GV9pE9M2.js +378 -0
- package/web-dist/assets/{info-DKCQHKI2-e722xjCC.js → info-DKCQHKI2-BzkLurvw.js} +1 -1
- package/web-dist/assets/{infoDiagram-FWYZ7A6U-rQjsScen.js → infoDiagram-FWYZ7A6U-D9sZ9oDP.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-D6AaIADa.js → ishikawaDiagram-FXEZZL3T-BzF_3YFM.js} +1 -1
- package/web-dist/assets/{journeyDiagram-5HDEW3XC-Dek8lEHD.js → journeyDiagram-5HDEW3XC-DFTScR2Z.js} +1 -1
- package/web-dist/assets/{kanban-definition-HUTT4EX6-D169tPMd.js → kanban-definition-HUTT4EX6-BLzFoVGW.js} +1 -1
- package/web-dist/assets/{line-Dw47KvcS.js → line-Do8dUGBy.js} +1 -1
- package/web-dist/assets/{linear-HQnAERIY.js → linear-DuRi0RMF.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-BJDWCQPF.js → mermaid-parser.core-Cg30o9F2.js} +3 -3
- package/web-dist/assets/{mermaid.core-R9E4C3Es.js → mermaid.core-BqJlujeQ.js} +3 -3
- package/web-dist/assets/{mindmap-definition-LN4V7U3C-CV_FsJk7.js → mindmap-definition-LN4V7U3C-HQlN-9Bu.js} +1 -1
- package/web-dist/assets/{packet-7NZHBO7P-C0ayNcsr.js → packet-7NZHBO7P-U04BXIOt.js} +1 -1
- package/web-dist/assets/{pegDiagram-2B236MQR-DjnQ3Pi7.js → pegDiagram-2B236MQR-DgY7HtfT.js} +1 -1
- package/web-dist/assets/{pie-RZYD4A2V-D7lrHyQY.js → pie-RZYD4A2V-CNmbhkWK.js} +1 -1
- package/web-dist/assets/{pieDiagram-ENE6RG2P-643_YE-H.js → pieDiagram-ENE6RG2P-DZAgx8HX.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-CeBAmaJJ.js → quadrantDiagram-ABIIQ3AL-BgwkFnnW.js} +1 -1
- package/web-dist/assets/{radar-I7S5WNFK-DCmcE8Eq.js → radar-I7S5WNFK-uSk4Y1ho.js} +1 -1
- package/web-dist/assets/{railroad-3IZDKUUU-BFgc9gYw.js → railroad-3IZDKUUU-DYUKnC5s.js} +1 -1
- package/web-dist/assets/railroad-abnf-AHOZXSZD-IkzutLqe.js +1 -0
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-BxRu9OFq.js +1 -0
- package/web-dist/assets/railroad-peg-LSFZ7HO6-B_oCO_d6.js +1 -0
- package/web-dist/assets/{railroadDiagram-RFXS5EU6-ClmxWxOm.js → railroadDiagram-RFXS5EU6-D50qDJK9.js} +1 -1
- package/web-dist/assets/{requirementDiagram-TGXJPOKE-CpF-MZaV.js → requirementDiagram-TGXJPOKE-BcYVVHnq.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-HTMAVEWB-DofntocC.js → sankeyDiagram-HTMAVEWB-PzXMSHpA.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-B_qOaZbF.js → sequenceDiagram-DBY2YBRQ-mGrOXhjH.js} +1 -1
- package/web-dist/assets/{src-CeayMM0l.js → src-DgdnlNtf.js} +1 -1
- package/web-dist/assets/{stateDiagram-2N3HPSRC-D3mAgfcK.js → stateDiagram-2N3HPSRC-DVtnHF84.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-SdAGeC8G.js +1 -0
- package/web-dist/assets/{swimlanes-5IMT3BWC-CcP_7CWL.js → swimlanes-5IMT3BWC-CpFBm_uD.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-DFV8nG2S.js +8 -0
- package/web-dist/assets/{timeline-definition-FHXFAJF6-BuY243vk.js → timeline-definition-FHXFAJF6-BtulIlxh.js} +1 -1
- package/web-dist/assets/{treeView-QDETBFTQ-DWPoUOUX.js → treeView-QDETBFTQ-DvYZWcpI.js} +1 -1
- package/web-dist/assets/{treemap-6X3UGDF4-MUlKNSNq.js → treemap-6X3UGDF4-BLNXL2Uy.js} +1 -1
- package/web-dist/assets/{vennDiagram-L72KCM5P-BgdszIwK.js → vennDiagram-L72KCM5P-pRoAWpIZ.js} +1 -1
- package/web-dist/assets/{wardley-OPB4EBWU-BsmoKrjx.js → wardley-OPB4EBWU-Cs-85TFO.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-EHGQE667-Be33pA9H.js → wardleyDiagram-EHGQE667-CX1pViTS.js} +1 -1
- package/web-dist/assets/{xychartDiagram-FW5EYKEG-DtcL7ziG.js → xychartDiagram-FW5EYKEG-PscAnIL7.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/assets/architecture-TIHT7OUA-Cd4KKjcr.js +0 -1
- package/web-dist/assets/channel-BJRRpPvu.js +0 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-B0ydbnfq.js +0 -1
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-B0ydbnfq.js +0 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-DcKi0Mal.js +0 -1
- package/web-dist/assets/flowDiagram-23GEKE2U-YZDRiDvt.js +0 -1
- package/web-dist/assets/index-DGZQ7U7X.css +0 -2
- package/web-dist/assets/index-DfeNuuiA.js +0 -378
- package/web-dist/assets/railroad-abnf-AHOZXSZD-DG591qcs.js +0 -1
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-BJwrR-19.js +0 -1
- package/web-dist/assets/railroad-peg-LSFZ7HO6-C5UFkdLB.js +0 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-ppCieyPJ.js +0 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-BPdgLhxf.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.46",
|
|
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": [
|
|
@@ -1228,3 +1228,16 @@ GitHub CLI access on the maintainer's Mac moved behind Keyward: `keyward --reaso
|
|
|
1228
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
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
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.
|
|
1231
|
+
|
|
1232
|
+
## 2026-11-04, later the same day: a worker's plain `gh` reads with Frizz's credential
|
|
1233
|
+
|
|
1234
|
+
Colin's decision (question `gh-reads` on the Keyward thread): an agent's GitHub reads use Frizz's read-only credential, with no Touch ID and through a locked screen, and anything that writes goes through `keyward --reason "…" -- gh …`. That replaces the routing above, which sent every read through a Touch ID.
|
|
1235
|
+
|
|
1236
|
+
- **No shim. The worker's environment does it.** `frizzGithubWorkerEnv` points `GH_CONFIG_DIR` at a folder Frizz owns, whose `hosts.yml` holds the token and is rewritten on every renewal. A file rather than `GH_TOKEN`, so a worker outliving an 8-hour token gets the fresh one and an `env` in a transcript cannot print it. `keyward -- gh` sets `GH_TOKEN` for its run, and `gh` prefers that to `hosts.yml` (checked with `gh` 2.102.0), so a write goes out on the operator's token.
|
|
1237
|
+
- **Only with Keyward installed and Frizz signed in.** Elsewhere a worker's `gh` is its operator's own sign-in, which may be able to write, and a read-only override would leave no path for a write. So the two tiers above still stand for those machines, and the read-only block is a third, checked first.
|
|
1238
|
+
- **The hook and the scripts read a marker file, `frizz-read-only`, beside `hosts.yml`.** A `FRIZZ_` variable would not do: Codex's environment drops that whole prefix.
|
|
1239
|
+
- **The bundled monitors keep working in read-only mode.** They run plain `gh`, which can read.
|
|
1240
|
+
- **The App reads widely and holds no write permission (Colin, 2026-11-04).** It started on issues, pull requests, checks, statuses and Actions, without Contents, and that failed on the first private repo: GitHub refuses a commit's data there without Contents, which took out the watchers' PR query, a bare `gh pr view`, `gh pr checks` and `gh pr diff` (measured on pullfrog/app#1648). Colin's call: *"It's better to over-ask right now and subtract later. But it should definitely not require any write permissions."* Subtracting is one click, while adding means every install's owner has to accept again. So it also asks for read on what a thread may plausibly want next. It still leaves out the permissions whose reads expose secrets or their names: secret scanning alerts, secrets, Dependabot secrets and webhooks.
|
|
1241
|
+
- **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
|
+
- **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
|
+
- **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.
|
|
@@ -100,8 +100,16 @@ const ghBlock =
|
|
|
100
100
|
ghReadOnly +
|
|
101
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
102
|
|
|
103
|
+
const ghFrizzReadOnlyBlock =
|
|
104
|
+
'⟦gh available, read-only⟧ Plain `gh` is signed in here with Frizz\'s own READ-ONLY GitHub credential: no Touch ID, and it works while the screen is locked. Use it EAGERLY and well — it is the fastest path to issue/PR/CI/release context, and you should reach for it before guessing:\n' +
|
|
105
|
+
'• 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. Repo source is not readable through it; read the checkout.\n' +
|
|
106
|
+
'• A WRITE fails with a permission error (`Resource not accessible by integration`, HTTP 403), and so does a read that needs more than it holds, such as a private repo on an account where Frizz\'s GitHub App is not installed (it reads as not found). That is this credential, not a fault: rerun that one command as `keyward --reason "<what this command is for>" -- gh …`, `gh` the first word after `--`. One Touch ID covers this repository for 10 minutes.\n' +
|
|
107
|
+
'• 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' +
|
|
108
|
+
ghReadOnly +
|
|
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
|
+
|
|
103
111
|
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
|
|
112
|
+
'⟦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' +
|
|
105
113
|
'• 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
114
|
'• 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
115
|
'• 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' +
|
|
@@ -128,13 +136,27 @@ function onPath(name) {
|
|
|
128
136
|
return false;
|
|
129
137
|
}
|
|
130
138
|
|
|
131
|
-
/**
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
139
|
+
/** Frizz points a worker's GH_CONFIG_DIR at its own read-only credential where Keyward takes the writes.
|
|
140
|
+
* It marks that folder with a file: a FRIZZ_ variable would not reach every transport. Stats, no network. */
|
|
141
|
+
function frizzReadOnlyGh() {
|
|
142
|
+
const dir = process.env.GH_CONFIG_DIR;
|
|
143
|
+
if (!dir) return false;
|
|
144
|
+
try {
|
|
145
|
+
return statSync(join(dir, 'frizz-read-only')).isFile();
|
|
146
|
+
} catch {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** @type {'read-only' | 'plain' | 'keyward' | null} */
|
|
152
|
+
let ghMode = frizzReadOnlyGh() ? 'read-only' : null;
|
|
153
|
+
if (!ghMode) {
|
|
154
|
+
try {
|
|
155
|
+
execFileSync('gh', ['auth', 'status', '--active'], { stdio: 'ignore', timeout: 4000 });
|
|
156
|
+
ghMode = 'plain';
|
|
157
|
+
} catch {
|
|
158
|
+
/* no gh / not authed / stalled → fall through to the Keyward tier */
|
|
159
|
+
}
|
|
138
160
|
}
|
|
139
161
|
if (!ghMode) {
|
|
140
162
|
try {
|
|
@@ -146,7 +168,8 @@ if (!ghMode) {
|
|
|
146
168
|
|
|
147
169
|
const parts = [core];
|
|
148
170
|
if (input.source === 'compact') parts.push(grounding);
|
|
149
|
-
if (ghMode === '
|
|
171
|
+
if (ghMode === 'read-only') parts.push(ghFrizzReadOnlyBlock);
|
|
172
|
+
else if (ghMode === 'plain') parts.push(ghBlock);
|
|
150
173
|
else if (ghMode === 'keyward') parts.push(ghKeywardBlock);
|
|
151
174
|
|
|
152
175
|
process.stdout.write(
|
|
@@ -340,7 +340,7 @@ const WATCH_PR = {
|
|
|
340
340
|
type: "string",
|
|
341
341
|
description:
|
|
342
342
|
"Required for `add`. The pull request, as `owner/repo#123` or a GitHub PR URL. A ref that " +
|
|
343
|
-
"cannot be parsed, or a PR
|
|
343
|
+
"cannot be parsed, or a PR Frizz's own GitHub sign-in cannot read, is REFUSED rather than stored — " +
|
|
344
344
|
"a watcher that can never fire is worse than no watcher, because you would come to rest " +
|
|
345
345
|
"believing you were covered. A refusal names the reason; a transient one is worth one retry.",
|
|
346
346
|
},
|
|
@@ -407,7 +407,7 @@ const WATCH_ISSUE = {
|
|
|
407
407
|
type: "string",
|
|
408
408
|
description:
|
|
409
409
|
"Required for `add`. The issue, as `owner/repo#123` or a GitHub issue URL. A ref that cannot " +
|
|
410
|
-
"be parsed, a PR URL, or an issue
|
|
410
|
+
"be parsed, a PR URL, or an issue Frizz's own GitHub sign-in cannot read, is REFUSED rather than " +
|
|
411
411
|
"stored — a watcher that can never fire is worse than none. A refusal names the reason.",
|
|
412
412
|
},
|
|
413
413
|
for: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gh
|
|
3
|
-
description: The gh-CLI playbook for a frizz worker that can reach GitHub (invoke as frizz:gh). Load this whenever your effort touches GitHub — reading or triaging an issue or PR, reviewing a diff, checking CI/release status, or searching issues/PRs — to use `gh` eagerly and correctly,
|
|
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, whether plain `gh` is signed in, reads with Frizz's read-only credential while writes go through Keyward (`keyward --reason "…" -- gh …`), or is signed out behind Keyward: the read-vs-write boundary (never comment/label/close/merge unless the human asks), concrete read recipes, Keyward's failure lines and what to do on each, and waiting on CI and reviews with `frizzctl watch-pr add` / `watch-issue add`. The session-seed hook injects a pointer here naming the mode: `⟦gh available, read-only⟧`, `⟦gh available⟧` or `⟦gh available through Keyward⟧`.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
metadata:
|
|
6
6
|
internal: true
|
|
7
7
|
---
|
|
@@ -10,12 +10,13 @@ metadata:
|
|
|
10
10
|
|
|
11
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 block summarizes: **which of
|
|
13
|
+
This skill is the full playbook the injected block summarizes: **which of three 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
14
|
|
|
15
|
-
##
|
|
15
|
+
## Three modes: read-only, signed in, or through Keyward
|
|
16
16
|
|
|
17
17
|
The injected block names your mode.
|
|
18
18
|
|
|
19
|
+
- **`⟦gh available, read-only⟧` — plain `gh` reads with Frizz's own credential.** No Touch ID, and it works while the screen is locked. Run the read recipes below as written. A write, or a read past what the credential holds, fails; that one command then runs as `keyward --reason "…" -- gh …` (see **Reads and writes in read-only mode**).
|
|
19
20
|
- **`⟦gh available⟧` — plain `gh` is signed in.** Run the recipes below as written.
|
|
20
21
|
- **`⟦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
|
|
|
@@ -23,14 +24,26 @@ The injected block names your mode.
|
|
|
23
24
|
keyward --reason "<what this command is for, in a sentence>" -- gh issue view 123 -R OWNER/REPO --comments
|
|
24
25
|
```
|
|
25
26
|
|
|
26
|
-
`gh`
|
|
27
|
+
`gh` must be the first word after `--`: Keyward reads only that word, so `keyward -- npx gh …` is not recognised. 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.
|
|
28
|
+
|
|
29
|
+
### Reads and writes in read-only mode
|
|
30
|
+
|
|
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
|
+
|
|
33
|
+
- **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
|
+
- **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
|
+
- **Don't route reads through Keyward by default.** Each burst costs the human a touch that a plain read does not.
|
|
36
|
+
- **Scripts need nothing.** The bundled monitors and any script you run read with plain `gh`. One that writes calls `keyward --reason "…" -- gh …` itself, as this repo's do through `scripts/lib/gh-command.mjs`.
|
|
27
37
|
|
|
28
38
|
### Working under Keyward
|
|
29
39
|
|
|
40
|
+
Everything here applies to any command you run through Keyward, in read-only mode too.
|
|
41
|
+
|
|
30
42
|
- **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
43
|
- **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
|
|
33
|
-
- **
|
|
44
|
+
- **Don't check sign-in with `gh auth status`.** It describes plain `gh`, not what Keyward would release. The injected block already tells you which mode you are in; to find out whether a release works, run the command you need.
|
|
45
|
+
- **Never run `gh auth token`, with or without Keyward.** Keyward does not read the arguments, so nothing refuses it, and it prints the human's token into your transcript for good.
|
|
46
|
+
- **Only `gh` itself is signed in.** `keyward -- node script.mjs` hands the script NOTHING, and there is no form that does. A script that needs GitHub runs `keyward --reason "…" -- gh …` itself each time it calls gh; this repo's own scripts do, through `scripts/lib/gh-command.mjs`, so run those plainly. The bundled `ci-watch.mjs` / `review-watch.mjs` do not, because a poll cannot wait on a Touch ID: where plain `gh` is signed out, use `frizzctl watch-pr` for those waits.
|
|
34
47
|
|
|
35
48
|
### What a refusal looks like
|
|
36
49
|
|
|
@@ -40,7 +53,7 @@ Each of these is printed on stderr and exits 1:
|
|
|
40
53
|
| --- | --- | --- |
|
|
41
54
|
| `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
55
|
| `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
|
|
56
|
+
| `keyward: no gh sign-in …` | Keyward holds no GitHub sign-in on this Mac. | Stop and report it; the human has to make one. |
|
|
44
57
|
| a refusal naming the missing `--reason` | Nothing was asked; a reason is required. | Add `--reason "…"` and run it again. |
|
|
45
58
|
|
|
46
59
|
**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.
|
|
@@ -58,7 +71,7 @@ There is no server-side enforcement of this; the boundary is yours to hold.
|
|
|
58
71
|
|
|
59
72
|
## Read recipes
|
|
60
73
|
|
|
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
|
|
74
|
+
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`. In `⟦gh available through Keyward⟧` mode, prefix each with `keyward --reason "…" -- `, and run related ones back to back so one Touch ID covers them.
|
|
62
75
|
|
|
63
76
|
**Issues**
|
|
64
77
|
```bash
|
|
@@ -148,12 +161,12 @@ human (a ` ```question ` fence) — waiting on a person is never a park. The das
|
|
|
148
161
|
go/no-go remains a registered question. If the next check deliberately belongs at a named wall-clock
|
|
149
162
|
instant, set a durable timer with `frizzctl timer set` and park with its id in your fence's `timers:` list.
|
|
150
163
|
|
|
151
|
-
### Watching inside a turn — only where plain `gh`
|
|
164
|
+
### Watching inside a turn — only where plain `gh` can read
|
|
152
165
|
|
|
153
166
|
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
|
|
155
|
-
**
|
|
156
|
-
`frizzctl watch-pr add` and rest instead.
|
|
167
|
+
are about to read the logs of. That takes a session-bound monitor, and it needs a plain `gh` that can
|
|
168
|
+
read, which read-only mode has. **In `⟦gh available through Keyward⟧` mode, don't: the monitors and a
|
|
169
|
+
`gh run watch` loop cannot authenticate there.** Register `frizzctl watch-pr add` and rest instead.
|
|
157
170
|
|
|
158
171
|
Before launching any CI/review monitor, inspect project-local `AGENTS.md`, active skills, repository
|
|
159
172
|
docs, `package.json` scripts, and declared monitor tooling. Prefer an explicit project-local monitor
|
package/web-dist/assets/{abnfDiagram-VRR7QNED-pzT4fWMK.js → abnfDiagram-VRR7QNED-dMKEjsHW.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-Cg30o9F2.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-DgdnlNtf.js";import"./chunk-WYO6CB5R-DPplcyki.js";import"./chunk-VAUOI2AC-BajrAZEY.js";import{n as i,r as a,t as o}from"./chunk-MOJQB5TN-QXPP07cw.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-lcrHUGwW.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-Cg30o9F2.js";export{e as createArchitectureServices};
|