frizz-server 0.15.49 → 0.15.50
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/acp-daemon.js +39 -5
- package/dist/claude-agent-broker.js +55 -17
- package/dist/codex-app-server-daemon.js +43 -9
- package/dist/dev-child.js +7015 -3069
- package/package.json +15 -8
- package/runtime/board/agent-status.mjs +3 -3
- package/runtime/cc-worker/DECISIONS.md +19 -0
- package/runtime/cc-worker/bin/frizz-mcp.mjs +4 -2
- package/runtime/cc-worker/bin/frizzctl.mjs +26 -3
- package/runtime/cc-worker/hooks/deny-plan.mjs +4 -3
- package/runtime/cc-worker/hooks/hooks.json +18 -18
- package/runtime/cc-worker/hooks/scratchpad.mjs +10 -6
- package/runtime/cc-worker/lib/frizz-tools.mjs +156 -77
- package/web-dist/assets/{abnfDiagram-VRR7QNED-J7b3ICAw.js → abnfDiagram-VCTEODGH-CSl-iUaD.js} +1 -1
- package/web-dist/assets/{arc-D0znEGMI.js → arc-BSyeo0Gb.js} +1 -1
- package/web-dist/assets/architecture-7GRP2DOG-jYpGgJVJ.js +1 -0
- package/web-dist/assets/architectureDiagram-5GKGNRK7-Bo_gyMVC.js +36 -0
- package/web-dist/assets/blockDiagram-I7D4REHJ-9EtOS1Y1.js +129 -0
- package/web-dist/assets/c4Diagram-7LVT6UL2-CE1hW3oj.js +38 -0
- package/web-dist/assets/channel-CC-n29cI.js +1 -0
- package/web-dist/assets/chunk-2E4U76K2-QqOdoNOR.js +2 -0
- package/web-dist/assets/chunk-4HAMMTFA-Df2uLm9r.js +62 -0
- package/web-dist/assets/{chunk-ICXQ74PX-Cj1B4Mt1.js → chunk-75Z2AOVW-DF1G6d8q.js} +1 -1
- package/web-dist/assets/{chunk-VAUOI2AC-DYUbCOm7.js → chunk-CLGD4ZFX-CMAQm7EJ.js} +1 -1
- package/web-dist/assets/chunk-DU6HZSFF-UWY5hXXp.js +127 -0
- package/web-dist/assets/{chunk-32BRIVSS-DrQoYPLw.js → chunk-F27PBJKO-C59uYSbj.js} +1 -1
- package/web-dist/assets/{chunk-KEIR6QF5-BfrZ3jm6.js → chunk-FOHPRMQF-CyTuVbu3.js} +2 -2
- package/web-dist/assets/chunk-GMAD6QVW-BsJsQjY4.js +72 -0
- package/web-dist/assets/chunk-GVQU2GXP-BuITwr9r.js +1 -0
- package/web-dist/assets/{chunk-EX3LRPZG-CInw3Q3F.js → chunk-IMKFNOWR-5Ui4f5l4.js} +2 -2
- package/web-dist/assets/chunk-L3NEJ4N5-BISBblwX.js +1 -0
- package/web-dist/assets/chunk-LNGE3PJU-DNNNwF8Y.js +34 -0
- package/web-dist/assets/chunk-OSK3NFVY-CZl3XlkY.js +10 -0
- package/web-dist/assets/chunk-P2QGCYS3-DoytbW1J.js +1 -0
- package/web-dist/assets/{chunk-VR4S4FIN-WE1RlWzZ.js → chunk-POPQ4Y6H-D28hnSIy.js} +1 -1
- package/web-dist/assets/{chunk-HOUHSVGY-DozQYa90.js → chunk-PWAF6VOD-CbZvnkji.js} +1 -1
- package/web-dist/assets/chunk-SHT3W25Y-DM4ozJwj.js +168 -0
- package/web-dist/assets/{chunk-MOJQB5TN-dwysbljv.js → chunk-SVP7TREG-m6oapxSg.js} +1 -1
- package/web-dist/assets/{chunk-V7JOEXUC-PEaKX4p_.js → chunk-TICWLB2K-Ochfyos9.js} +1 -1
- package/web-dist/assets/chunk-TLUHSLCS-iM7uiuAo.js +2 -0
- package/web-dist/assets/{chunk-XXDRQBXY-CuNd86yu.js → chunk-XXDRQBXY-DYlTP5J-.js} +1 -1
- package/web-dist/assets/classDiagram-ZZMXUADV-CXJ9OBBD.js +1 -0
- package/web-dist/assets/classDiagram-v2-VYDZK3BY-CXJ9OBBD.js +1 -0
- package/web-dist/assets/cose-bilkent-JH36ORCC-BUIsLrGc.js +1 -0
- package/web-dist/assets/cynefin-OW5HDTMX-XtTYGcIH.js +1 -0
- package/web-dist/assets/{cynefinDiagram-TSTJHNR4-BlQjapzH.js → cynefinDiagram-5FMLGOSQ--ClxINOZ.js} +1 -1
- package/web-dist/assets/dagre-BJJUWK_n.js +1 -0
- package/web-dist/assets/dagre-GXQ25YYZ-CupZ_9Gq.js +4 -0
- package/web-dist/assets/{diagram-OA4YK3LP-CaTIfXcU.js → diagram-S7CK7UJ4-BlF7gkGi.js} +4 -4
- package/web-dist/assets/diagram-UQ7AKVKN-BMXRmU5D.js +41 -0
- package/web-dist/assets/{diagram-FQU43EPY-BOlJtvyz.js → diagram-VSXAHHWV-r5DJsSB3.js} +1 -1
- package/web-dist/assets/{diagram-G47NLZAW-DPbXRY-S.js → diagram-VX7I27RA-DxGq7Ln7.js} +1 -1
- package/web-dist/assets/{diagram-NH7WQ7WH-B1Nl4A7D.js → diagram-Z3DM3KII-DqXtb_id.js} +1 -1
- package/web-dist/assets/dist-DoH_9pyS.js +1 -0
- package/web-dist/assets/{ebnfDiagram-CCIWWBDH-BIW4rAiN.js → ebnfDiagram-PWID7BFC-BV_AT7TD.js} +1 -1
- package/web-dist/assets/erDiagram-RLTQ6QDP-BV70EqG9.js +99 -0
- package/web-dist/assets/eventmodeling-NTZA5JFV-Cw8GwV1a.js +1 -0
- package/web-dist/assets/flowDiagram-HODETNUW-B0Q6ZSg0.js +1 -0
- package/web-dist/assets/ganttDiagram-EL5Y4UJY-Cvkf14ib.js +292 -0
- package/web-dist/assets/gitGraph-4MIJSDKK-XBlZCz1U.js +1 -0
- package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-CpPGTKWr.js → gitGraphDiagram-WWUBYQGX-vDyL82tj.js} +1 -1
- package/web-dist/assets/index-D-pcMA7P.js +242 -0
- package/web-dist/assets/index-DqckQXcp.css +2 -0
- package/web-dist/assets/info-A6RAGUB7-DfR7iRgc.js +1 -0
- package/web-dist/assets/{infoDiagram-FWYZ7A6U-DUZecEP8.js → infoDiagram-27XIBGKW-BT4k6N6o.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-XAAQSfxB.js → ishikawaDiagram-5VMMS53U-BJIdMG0T.js} +1 -1
- package/web-dist/assets/{journeyDiagram-5HDEW3XC-BzWg86Rn.js → journeyDiagram-3NMN7TZE-CUGzIF61.js} +2 -2
- package/web-dist/assets/{kanban-definition-HUTT4EX6-B_OPyRDu.js → kanban-definition-UXKFOSKX-DIPC4kv7.js} +2 -2
- package/web-dist/assets/{line-MIBXaWt1.js → line-CJKCWj73.js} +1 -1
- package/web-dist/assets/{linear-uglE5t1T.js → linear-z2V0wJk9.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-J0F3kyQU.js → mermaid-parser.core-BH-fcjsB.js} +3 -3
- package/web-dist/assets/mermaid.core-BSdNmJCs.js +11 -0
- package/web-dist/assets/{mindmap-definition-LN4V7U3C-C6t1sDuH.js → mindmap-definition-YA3MSWOX-CJC3zMDF.js} +1 -1
- package/web-dist/assets/packet-AYTQ26CC-BET157L_.js +1 -0
- package/web-dist/assets/{pegDiagram-2B236MQR-DUx_k0xu.js → pegDiagram-XKGWAZYB-Du8ALEoR.js} +1 -1
- package/web-dist/assets/pie-WAS4IAKB-CDs5cIGi.js +1 -0
- package/web-dist/assets/{pieDiagram-ENE6RG2P-44mApnR1.js → pieDiagram-E7YTZNPT-BX88bIIM.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-Bt2Yzr6E.js → quadrantDiagram-AXDQQJYC-BkGxldmI.js} +1 -1
- package/web-dist/assets/radar-RG4KPBEZ-FMcFyhAF.js +1 -0
- package/web-dist/assets/railroad-74A4TZTK-Du0SbLQI.js +1 -0
- package/web-dist/assets/railroad-abnf-HS5TGJTU-DRi4RhLb.js +1 -0
- package/web-dist/assets/railroad-ebnf-LZEXJU2U-BmBkdsnK.js +1 -0
- package/web-dist/assets/railroad-peg-WCYAUIDC-CydTrmQm.js +1 -0
- package/web-dist/assets/{railroadDiagram-RFXS5EU6-d8BSz3zX.js → railroadDiagram-O6MQD6OU-CYqN0dL6.js} +1 -1
- package/web-dist/assets/{requirementDiagram-TGXJPOKE-DNAaYt1Y.js → requirementDiagram-BXWQKSXE-ClpQ_sLR.js} +2 -2
- package/web-dist/assets/rolldown-runtime-Bh1tDfsg.js +1 -0
- package/web-dist/assets/{sankeyDiagram-HTMAVEWB-R_lnknB4.js → sankeyDiagram-P5KCCOFB-CEJUF8o9.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-Ba-X-mCo.js → sequenceDiagram-WJ2MYXX4-BpJYUJhB.js} +1 -1
- package/web-dist/assets/src-C4XfhTaE.js +1 -0
- package/web-dist/assets/{stateDiagram-2N3HPSRC-C51RHuJf.js → stateDiagram-D77RDMKH-BmKLEj9Q.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-MP3YSRHH-D_c6vvvW.js +1 -0
- package/web-dist/assets/swimlanes-42K2YHIH-CyJxVets.js +1 -0
- package/web-dist/assets/swimlanesDiagram-VR7AAH4N-BcVx8rdP.js +8 -0
- package/web-dist/assets/threadSurfaces-CYpFDk_e.js +143 -0
- package/web-dist/assets/{timeline-definition-FHXFAJF6-DnfNzZjg.js → timeline-definition-24CTP7MA-ChEqw_62.js} +1 -1
- package/web-dist/assets/treeView-Q6P3EWNA-l1PaAwLT.js +1 -0
- package/web-dist/assets/treemap-WGGIJYW6-CxvHcEiT.js +1 -0
- package/web-dist/assets/{vennDiagram-L72KCM5P-b9DhO8LT.js → vennDiagram-4TSXK5OY-DF-yXPNP.js} +1 -1
- package/web-dist/assets/wardley-WFR3VGLG-BqkX6NQy.js +1 -0
- package/web-dist/assets/{wardleyDiagram-EHGQE667-cCbiyTUT.js → wardleyDiagram-VM6X3IG4-B9LU1bxh.js} +1 -1
- package/web-dist/assets/{xychartDiagram-FW5EYKEG-BO5JrKdd.js → xychartDiagram-S5SC5T6Z-Zt_ZqCWS.js} +3 -3
- package/web-dist/index.html +3 -2
- package/runtime/board/agent-liveness.mjs +0 -367
- package/runtime/board/notify-shared.mjs +0 -90
- package/runtime/board/notify.mjs +0 -81
- package/runtime/board/rest-detect.mjs +0 -213
- package/runtime/board/thread-excerpt.mjs +0 -162
- package/web-dist/assets/architecture-TIHT7OUA-BZjpcwN0.js +0 -1
- package/web-dist/assets/architectureDiagram-ZJ3FMSHR-BLoL7eps.js +0 -36
- package/web-dist/assets/blockDiagram-677ZJIJ3-BOiZIgfH.js +0 -132
- package/web-dist/assets/c4Diagram-LMCZKHZV-DaL-micl.js +0 -10
- package/web-dist/assets/channel-BOY_EM0_.js +0 -1
- package/web-dist/assets/chunk-52WLFC77-Bl9DYslI.js +0 -10
- package/web-dist/assets/chunk-7BUUIJ7U-Bb538aSH.js +0 -1
- package/web-dist/assets/chunk-C7G6YPKG-C8ZxUisf.js +0 -1
- package/web-dist/assets/chunk-FWX5IMBZ-Bb3cN9tF.js +0 -2
- package/web-dist/assets/chunk-OGEWGWER-BIXFK2Kz.js +0 -1
- package/web-dist/assets/chunk-PUDLZKDR-zTbgLDMj.js +0 -156
- package/web-dist/assets/chunk-Q4XR5HBZ-BPeZU3L1.js +0 -70
- package/web-dist/assets/chunk-RYQCIY6F-B2AmSBtU.js +0 -1
- package/web-dist/assets/chunk-WYO6CB5R-Cptxef_j.js +0 -127
- package/web-dist/assets/chunk-ZGVPDNZ5-nKibxQuS.js +0 -62
- package/web-dist/assets/chunk-ZIRB5QZD-C6fEPe3t.js +0 -32
- package/web-dist/assets/classDiagram-OUVF2IWQ-rW3mcevY.js +0 -1
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-rW3mcevY.js +0 -1
- package/web-dist/assets/cose-bilkent-JH36ORCC-BHapvkAQ.js +0 -1
- package/web-dist/assets/cynefin-VYW2F7L2-BefSX6Er.js +0 -1
- package/web-dist/assets/dagre-CXRCoUWR.js +0 -1
- package/web-dist/assets/dagre-VKFMJZFB-BnFClfBQ.js +0 -4
- package/web-dist/assets/diagram-WEI45ONY-CcXbcxic.js +0 -41
- package/web-dist/assets/dist-Bsb4JJAO.js +0 -1
- package/web-dist/assets/erDiagram-Q63AITRT-BpObPW4X.js +0 -85
- package/web-dist/assets/eventmodeling-45OFAUF4-BBdu_FMe.js +0 -1
- package/web-dist/assets/flowDiagram-23GEKE2U-JCnBd218.js +0 -1
- package/web-dist/assets/ganttDiagram-NO4QXBWP-D6POggnD.js +0 -292
- package/web-dist/assets/gitGraph-TEB2WS4Q-YCEfMCFc.js +0 -1
- package/web-dist/assets/index-CFXWSXTQ.css +0 -2
- package/web-dist/assets/index-CjwFZh5G.js +0 -380
- package/web-dist/assets/info-DKCQHKI2-SyitzjWc.js +0 -1
- package/web-dist/assets/map-DsCK-0Cs.js +0 -1
- package/web-dist/assets/mermaid.core-CJriGaX1.js +0 -11
- package/web-dist/assets/packet-7NZHBO7P-BP5kC3mk.js +0 -1
- package/web-dist/assets/pie-RZYD4A2V-ehviwJKF.js +0 -1
- package/web-dist/assets/radar-I7S5WNFK-DW4R66e1.js +0 -1
- package/web-dist/assets/railroad-3IZDKUUU-D08S7ovl.js +0 -1
- package/web-dist/assets/railroad-abnf-AHOZXSZD-C9qettXj.js +0 -1
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-DJWltGwI.js +0 -1
- package/web-dist/assets/railroad-peg-LSFZ7HO6-tqNP6Nvp.js +0 -1
- package/web-dist/assets/src-_ShgCKEo.js +0 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-BdAiMi1e.js +0 -1
- package/web-dist/assets/swimlanes-5IMT3BWC-6s8xokkg.js +0 -2
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-CXOHMq1K.js +0 -8
- package/web-dist/assets/treeView-QDETBFTQ-vUI6BtZi.js +0 -1
- package/web-dist/assets/treemap-6X3UGDF4-DXAQ9FfS.js +0 -1
- package/web-dist/assets/wardley-OPB4EBWU-DcnZYvgN.js +0 -1
- /package/web-dist/assets/{sizeCapture-X5ZJPWSS-B0uUizjq.js → sizeCapture-INFHLROL-B0uUizjq.js} +0 -0
|
@@ -32,7 +32,11 @@ import { basename, dirname, join } from "node:path"
|
|
|
32
32
|
// Comfortably above a codex dispatch's bounded rollout-discovery wait (~15s) so a legitimate slow
|
|
33
33
|
// dispatch is never aborted client-side (which would make the worker think it failed and retry,
|
|
34
34
|
// double-spawning). The server completes regardless; this is only the client's patience.
|
|
35
|
-
|
|
35
|
+
// (FRIZZ_RPC_TIMEOUT_MS shortens it for the tests that wait one out.)
|
|
36
|
+
const DISPATCH_TIMEOUT_MS = (() => {
|
|
37
|
+
const n = parseInt(String(process.env.FRIZZ_RPC_TIMEOUT_MS ?? ""), 10)
|
|
38
|
+
return Number.isFinite(n) && n > 0 ? n : 30_000
|
|
39
|
+
})()
|
|
36
40
|
|
|
37
41
|
const SPAWN_THREAD = {
|
|
38
42
|
name: "spawn_thread",
|
|
@@ -168,11 +172,6 @@ const GOAL = {
|
|
|
168
172
|
"you keep notes in your scratch directory, a prompt that LINKS them comes back at the exact moment " +
|
|
169
173
|
"you have lost everything else. Also mid-turn — a compaction happens while you are working.\n\n" +
|
|
170
174
|
"Set at least one; any combination is fine.\n\n" +
|
|
171
|
-
"USE THIS RATHER THAN `CronCreate` or `ScheduleWakeup`. Those are Claude Code's own in-session " +
|
|
172
|
-
"schedulers and they CANNOT fire in the runtime frizz runs you in: their gate stays shut for as long " +
|
|
173
|
-
"as ANY background task of yours is outstanding, so the moment you are parked behind a background " +
|
|
174
|
-
"shell or a sub-agent — exactly when you most need waking — they go silent. This one is delivered by " +
|
|
175
|
-
"frizz itself and is unaffected.\n\n" +
|
|
176
175
|
"READ IT BACK WITH `frizzctl goal get` — and do that BEFORE any `start` that is not a fresh arming. A " +
|
|
177
176
|
"thread has AT MOST ONE goal, so a `start` REPLACES whatever is there, triggers and all, " +
|
|
178
177
|
"and the text you are about to destroy may not be yours: the HUMAN can edit it in the thread footer, " +
|
|
@@ -252,14 +251,13 @@ const TIMER = {
|
|
|
252
251
|
"independent, unlike the single goal this thread can hold.\n\n" +
|
|
253
252
|
"USE IT for anything you want to come back to at a specific time: re-check a deploy in ten minutes, " +
|
|
254
253
|
"re-read a slow log at the top of the hour, revisit a decision after a build finishes. USE " +
|
|
255
|
-
"`goal` instead when the thing must repeat
|
|
256
|
-
"`CronCreate`/`ScheduleWakeup` cannot fire in the runtime frizz runs you in.\n\n" +
|
|
254
|
+
"`goal` instead when the thing must repeat.\n\n" +
|
|
257
255
|
"IT IS NOT A WAY TO POLL SOMETHING YOU COULD WAIT ON. If a background shell, a sub-agent or a " +
|
|
258
256
|
"monitor can tell you the moment a thing happens, use that — an alarm every N seconds asking \"is it " +
|
|
259
257
|
"done yet\" is strictly worse than being woken when it is.\n\n" +
|
|
260
258
|
"The text arrives VERBATIM as an ordinary user turn, so write it as an instruction to your future " +
|
|
261
259
|
"self — self-contained and actionable, because you may receive it with none of the context you have " +
|
|
262
|
-
"now. Give exactly one of `--in-seconds` or `--at`. You can only ever set a timer on your OWN thread.",
|
|
260
|
+
"now. Give exactly one of `--in`, `--in-seconds` or `--at`. You can only ever set a timer on your OWN thread.",
|
|
263
261
|
inputSchema: {
|
|
264
262
|
type: "object",
|
|
265
263
|
properties: {
|
|
@@ -275,18 +273,24 @@ const TIMER = {
|
|
|
275
273
|
type: "string",
|
|
276
274
|
description: "Required for `set`. The text delivered to you when it fires, verbatim, as a user turn.",
|
|
277
275
|
},
|
|
276
|
+
in: {
|
|
277
|
+
type: "string",
|
|
278
|
+
description:
|
|
279
|
+
"For `set`: fire after this long, as a duration with its unit: `90s`, `10m`, `2h`, `3d` (the " +
|
|
280
|
+
"grammar `--for` takes; at least 10s, at most 30d). Give exactly one of this, `--in-seconds` and " +
|
|
281
|
+
"`--at`. Sub-minute precision is not real: the delivery is read at your next tool boundary.",
|
|
282
|
+
},
|
|
278
283
|
in_seconds: {
|
|
279
284
|
type: "integer",
|
|
280
285
|
description:
|
|
281
|
-
`For \`set\`:
|
|
282
|
-
`${TIMER_MAX_DELAY_SECONDS} — thirty days)
|
|
283
|
-
"is not real: the delivery is read at your next tool boundary.",
|
|
286
|
+
`For \`set\`: the same delay as a bare number of seconds (minimum ${TIMER_MIN_DELAY_SECONDS}, maximum ` +
|
|
287
|
+
`${TIMER_MAX_DELAY_SECONDS} — thirty days).`,
|
|
284
288
|
},
|
|
285
289
|
at: {
|
|
286
290
|
type: "string",
|
|
287
291
|
description:
|
|
288
292
|
"For `set`: fire at this exact instant, as an ISO-8601 timestamp (e.g. `2026-08-04T15:00:00Z`). " +
|
|
289
|
-
"
|
|
293
|
+
"Must be in the future and within thirty days.",
|
|
290
294
|
},
|
|
291
295
|
id: {
|
|
292
296
|
type: "string",
|
|
@@ -548,7 +552,8 @@ const ASK_RETIRED =
|
|
|
548
552
|
"---\n" +
|
|
549
553
|
"Optional context, in any Markdown: a table, a diff, a callout, a <details> section.\n" +
|
|
550
554
|
"```\n\n" +
|
|
551
|
-
"- `id:` is yours to choose:
|
|
555
|
+
"- `id:` is yours to choose: lowercase letters, digits, `-`, `_` and `.`. One open question per id; an " +
|
|
556
|
+
"id is free again once its question is answered, withdrawn or dismissed.\n" +
|
|
552
557
|
"- `kind:` is `choice` (pick one), `multi` (pick several), `text` (free text) or `secret` (one masked " +
|
|
553
558
|
"box, for a token or a one-time code).\n" +
|
|
554
559
|
"- `question:` is one line. Each option takes `label:`, `description:` (one line, in sentence case), `recommended: true` " +
|
|
@@ -594,8 +599,8 @@ const UNASK = {
|
|
|
594
599
|
"open question also blocks `frizzctl done` until it is answered or withdrawn.\n\n" +
|
|
595
600
|
"You do NOT need this for a question that gets answered; that settles itself and wakes you. Nor for " +
|
|
596
601
|
"one a later rest simply does not mention: an older question stays answerable where it was asked. " +
|
|
597
|
-
"Withdrawing is YOUR move and is never reported back to you as news.
|
|
598
|
-
"
|
|
602
|
+
"Withdrawing is YOUR move and is never reported back to you as news. Its id is free from then on: a " +
|
|
603
|
+
"later fence asking under it registers a new question.",
|
|
599
604
|
inputSchema: {
|
|
600
605
|
type: "object",
|
|
601
606
|
properties: {
|
|
@@ -687,8 +692,9 @@ const DONE = {
|
|
|
687
692
|
name: "done",
|
|
688
693
|
description:
|
|
689
694
|
"DECLARE THIS EFFORT FINISHED, with the write-up the human reads. Your thread cards as a checked " +
|
|
690
|
-
"success in their queue and stays there until they archive it
|
|
691
|
-
"it
|
|
695
|
+
"success in their queue and stays there until they archive it. The command itself closes, archives " +
|
|
696
|
+
"and hides nothing, but the card is a DISMISSAL: it files the thread away for the human, and nobody " +
|
|
697
|
+
"is meant to open it again.\n\n" +
|
|
692
698
|
"FRIZZ CAN REFUSE THIS, which is the whole reason it is a command rather than a fence. An OPEN " +
|
|
693
699
|
"QUESTION or an ARMED REGISTRATION blocks it, and the refusal names each one by id: a question " +
|
|
694
700
|
"nobody answered dies with the card, and a live wait means the thing you were waiting for has not " +
|
|
@@ -1442,7 +1448,7 @@ function projectSegment() {
|
|
|
1442
1448
|
}
|
|
1443
1449
|
}
|
|
1444
1450
|
|
|
1445
|
-
/** The `spawn_thread` handler: POST
|
|
1451
|
+
/** The `spawn_thread` handler: POST `spawnThread` as the calling thread, return the worker-facing result text.
|
|
1446
1452
|
* @param {Record<string, unknown>} args @returns {Promise<string>} */
|
|
1447
1453
|
async function spawnThread(args) {
|
|
1448
1454
|
const prompt = typeof args.prompt === "string" ? args.prompt.trim() : ""
|
|
@@ -1455,53 +1461,28 @@ async function spawnThread(args) {
|
|
|
1455
1461
|
const effort = typeof args.effort === "string" ? args.effort.trim() : ""
|
|
1456
1462
|
if (!effort) throw new Error("`effort` is required — choose one by complexity (low/medium/high/xhigh/max). There is no default.")
|
|
1457
1463
|
|
|
1458
|
-
// THE WAY BACK. A spawned thread starts with nothing but this prompt, so without its spawner's slug it
|
|
1459
|
-
// could not `steer` anything back even when asked to — the footer names it, once, at the end.
|
|
1460
|
-
const parent = process.env.FRIZZ_THREAD_SLUG || process.env.FRIZZ_THREAD
|
|
1461
|
-
const footer = parent
|
|
1462
|
-
? `\n\n---\nSpawned by the Frizz thread \`${parent}\`. If this prompt asks for results back, or you find ` +
|
|
1463
|
-
`something that thread must know, send it there with \`frizzctl steer ${parent} --message-file <file|->\`.`
|
|
1464
|
-
: ""
|
|
1465
1464
|
/** @type {Record<string, unknown>} */
|
|
1466
|
-
const body = { prompt
|
|
1465
|
+
const body = { prompt, model, effort }
|
|
1467
1466
|
if (typeof args.title === "string" && args.title.trim()) body.title = args.title.trim()
|
|
1468
1467
|
if (args.backend === "claude" || args.backend === "codex") body.backend = args.backend
|
|
1469
|
-
|
|
1470
|
-
// ANOTHER PROJECT'S BOARD goes through OUR project's `spawnThread`, as a steer does: the server checks
|
|
1471
|
-
// that we are a real thread, finds the project, and writes the footer itself, because it knows our
|
|
1472
|
-
// project's slug and we hold only its id.
|
|
1473
1468
|
const rawProject = typeof args.project === "string" ? args.project.trim() : ""
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1469
|
+
|
|
1470
|
+
// A THREAD'S SPAWN GOES THROUGH ITS OWN PROJECT'S `spawnThread`, for this board or another project's.
|
|
1471
|
+
// The server checks that we are a real thread, starts the new one no looser than we run, records who
|
|
1472
|
+
// asked for it, and writes the footer that tells it how to steer back (it knows our project's slug and
|
|
1473
|
+
// we hold only its id). Until 2026-11-10 a same-project spawn posted `dispatch` itself, which knows no
|
|
1474
|
+
// caller: the new thread took the Settings default whatever this thread's own permission mode was.
|
|
1475
|
+
const parent = process.env.FRIZZ_THREAD_SLUG || process.env.FRIZZ_THREAD
|
|
1476
|
+
if (parent || rawProject) {
|
|
1477
|
+
const project = rawProject ? decodeURIComponent(PROJECT_SEGMENT.exec(rawProject)?.[1] ?? rawProject) : undefined
|
|
1478
|
+
const result = (await callRpc("spawnThread", { ...body, from: threadSlug(), ...(project ? { project } : {}) }))?.result
|
|
1478
1479
|
if (typeof result?.slug !== "string" || !result.slug) throw new Error(`spawnThread returned no slug: ${JSON.stringify(result)?.slice(0, 300)}`)
|
|
1479
1480
|
return spawnedReceipt(result.slug, typeof body.title === "string" ? body.title : result.slug, result.project)
|
|
1480
1481
|
}
|
|
1481
1482
|
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
const
|
|
1485
|
-
let res
|
|
1486
|
-
try {
|
|
1487
|
-
res = await fetch(`http://127.0.0.1:${port}${rpcPath("dispatch")}`, {
|
|
1488
|
-
method: "POST",
|
|
1489
|
-
// No Origin header (undici omits it for non-browser fetch); `sec-fetch-site: same-origin`
|
|
1490
|
-
// satisfies the server's loopback-origin gate (app.ts isTrustedLocalHttpRequest).
|
|
1491
|
-
headers: { "content-type": "application/json", "sec-fetch-site": "same-origin" },
|
|
1492
|
-
body: JSON.stringify(body),
|
|
1493
|
-
signal: controller.signal,
|
|
1494
|
-
})
|
|
1495
|
-
} catch (err) {
|
|
1496
|
-
throw unreachable("dispatch", err)
|
|
1497
|
-
} finally {
|
|
1498
|
-
clearTimeout(timer)
|
|
1499
|
-
}
|
|
1500
|
-
if (!res.ok) {
|
|
1501
|
-
const detail = await res.text().catch(() => "")
|
|
1502
|
-
throw new Error(`dispatch returned HTTP ${res.status}${detail ? `: ${detail.slice(0, 500)}` : ""}`)
|
|
1503
|
-
}
|
|
1504
|
-
const payload = await res.json().catch(() => null)
|
|
1483
|
+
// NO THREAD IS CALLING (the command run from a person's own terminal): a plain dispatch to the board
|
|
1484
|
+
// this checkout belongs to, at the Settings default, with nobody to steer back to.
|
|
1485
|
+
const payload = await postRpc(serverLockPort(), "dispatch", body)
|
|
1505
1486
|
const slug = payload?.result?.slug
|
|
1506
1487
|
if (typeof slug !== "string" || !slug) throw new Error(`dispatch response missing a slug: ${JSON.stringify(payload)?.slice(0, 300)}`)
|
|
1507
1488
|
return spawnedReceipt(slug, typeof body.title === "string" ? body.title : slug, undefined)
|
|
@@ -1581,29 +1562,91 @@ async function serverLockPortWaiting() {
|
|
|
1581
1562
|
}
|
|
1582
1563
|
|
|
1583
1564
|
async function callRpc(procedure, body) {
|
|
1584
|
-
|
|
1565
|
+
return postRpc(await serverLockPortWaiting(), procedure, body)
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
/** One POST to Frizz's RPC surface, and the one place a request that went wrong is put into words.
|
|
1569
|
+
* @param {number} port @param {string} procedure @param {unknown} body */
|
|
1570
|
+
async function postRpc(port, procedure, body) {
|
|
1585
1571
|
const controller = new AbortController()
|
|
1586
1572
|
const timer = setTimeout(() => controller.abort(), DISPATCH_TIMEOUT_MS)
|
|
1587
1573
|
let res
|
|
1588
1574
|
try {
|
|
1589
1575
|
res = await fetch(`http://127.0.0.1:${port}${rpcPath(procedure)}`, {
|
|
1590
1576
|
method: "POST",
|
|
1577
|
+
// No Origin header (undici omits it for non-browser fetch); `sec-fetch-site: same-origin`
|
|
1578
|
+
// satisfies the server's loopback-origin gate (app.ts isTrustedLocalHttpRequest).
|
|
1591
1579
|
headers: { "content-type": "application/json", "sec-fetch-site": "same-origin" },
|
|
1592
1580
|
body: JSON.stringify(body),
|
|
1593
1581
|
signal: controller.signal,
|
|
1594
1582
|
})
|
|
1595
1583
|
} catch (err) {
|
|
1596
|
-
throw unreachable(procedure, err)
|
|
1584
|
+
throw controller.signal.aborted ? unanswered(procedure) : unreachable(procedure, err)
|
|
1597
1585
|
} finally {
|
|
1598
1586
|
clearTimeout(timer)
|
|
1599
1587
|
}
|
|
1600
|
-
if (!res.ok)
|
|
1601
|
-
const detail = await res.text().catch(() => "")
|
|
1602
|
-
throw new Error(`${procedure} returned HTTP ${res.status}${detail ? `: ${detail.slice(0, 500)}` : ""}`)
|
|
1603
|
-
}
|
|
1588
|
+
if (!res.ok) throw await notOk(procedure, res)
|
|
1604
1589
|
return await res.json().catch(() => null)
|
|
1605
1590
|
}
|
|
1606
1591
|
|
|
1592
|
+
/** A "no" the server wrote for the worker, answered HTTP 409 (packages/rpc/src/server.ts RpcRefusal): an
|
|
1593
|
+
* unknown thread, a dead handle, a limit reached. Its message is the server's sentence and nothing
|
|
1594
|
+
* else. The command line prints it and exits 2, as it does for a `Refused` answer; the MCP front end
|
|
1595
|
+
* returns it as the call's error. */
|
|
1596
|
+
class ServerRefusal extends Error {}
|
|
1597
|
+
|
|
1598
|
+
/**
|
|
1599
|
+
* The procedures where a second run does the thing a second time. Everything else a worker calls reads,
|
|
1600
|
+
* replaces, or registers something the server already de-duplicates (a watch on the same handle, the
|
|
1601
|
+
* same pull request, the same command), so after a request that got no answer the same command can
|
|
1602
|
+
* simply be run again.
|
|
1603
|
+
* @type {Record<string, string>}
|
|
1604
|
+
*/
|
|
1605
|
+
const UNANSWERED_NOT_REPEATABLE = {
|
|
1606
|
+
steerThread: "Whether the message was delivered is not known, and sending it again can deliver it twice.",
|
|
1607
|
+
spawnThread: "Whether the thread was started is not known: run `frizzctl threads`, and start it again only if it is not listed.",
|
|
1608
|
+
spawnChild: "Whether the child thread was started is not known: run `frizzctl activity`, and start it again only if it is not listed.",
|
|
1609
|
+
dispatch: "Whether the thread was started is not known: look at the board before starting it again.",
|
|
1610
|
+
setOwnThreadTimer: "Whether the timer was set is not known: run `frizzctl timer list`, and set it again only if it is not listed.",
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
/**
|
|
1614
|
+
* A request Frizz accepted and never answered, as the error the caller reads. It read "addOwnPrWatch
|
|
1615
|
+
* request failed: This operation was aborted", which says neither what happened nor whether running
|
|
1616
|
+
* the command again is safe, and a worker has to decide exactly that.
|
|
1617
|
+
* @param {string} procedure
|
|
1618
|
+
*/
|
|
1619
|
+
function unanswered(procedure) {
|
|
1620
|
+
const waited = DISPATCH_TIMEOUT_MS >= 1000 ? `${Math.round(DISPATCH_TIMEOUT_MS / 1000)}s` : `${DISPATCH_TIMEOUT_MS}ms`
|
|
1621
|
+
return new Error(
|
|
1622
|
+
`Frizz did not answer within ${waited} (\`${procedure}\`). ` +
|
|
1623
|
+
(UNANSWERED_NOT_REPEATABLE[procedure] ??
|
|
1624
|
+
"Whether it took effect is not known, and running the same command again is safe: a second run changes nothing the first already did."),
|
|
1625
|
+
)
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
/**
|
|
1629
|
+
* An answer that is not a success, as the error the caller reads. The server's own sentence leads,
|
|
1630
|
+
* because it was written for the worker; the procedure and the status follow it only where they help
|
|
1631
|
+
* someone work out what failed. It read `steerThread returned HTTP 500: {"error":"no thread …"}`.
|
|
1632
|
+
* @param {string} procedure @param {Response} res
|
|
1633
|
+
*/
|
|
1634
|
+
async function notOk(procedure, res) {
|
|
1635
|
+
const text = await res.text().catch(() => "")
|
|
1636
|
+
let sentence = ""
|
|
1637
|
+
try {
|
|
1638
|
+
const error = JSON.parse(text)?.error
|
|
1639
|
+
if (typeof error === "string") sentence = error.trim()
|
|
1640
|
+
} catch {
|
|
1641
|
+
/* not the RPC envelope: something other than a handler answered */
|
|
1642
|
+
}
|
|
1643
|
+
if (!sentence) return new Error(`${procedure} returned HTTP ${res.status}${text ? `: ${text.slice(0, 500)}` : ""}`)
|
|
1644
|
+
if (res.status === 409) return new ServerRefusal(sentence)
|
|
1645
|
+
// A 400 is the input validator's, and its words name a field of the request, not a flag.
|
|
1646
|
+
if (res.status === 400) return new Error(`Frizz did not accept this command's arguments (${sentence}). Run it with --help for what it takes.`)
|
|
1647
|
+
return new Error(`${sentence} (Frizz's \`${procedure}\`, HTTP ${res.status})`)
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1607
1650
|
/**
|
|
1608
1651
|
* A request that never reached the server, as the error the caller reads.
|
|
1609
1652
|
*
|
|
@@ -1662,6 +1705,29 @@ class Refused {
|
|
|
1662
1705
|
constructor(text) { this.text = text }
|
|
1663
1706
|
}
|
|
1664
1707
|
|
|
1708
|
+
/**
|
|
1709
|
+
* The action a worker named, as the one its command knows it by. Each command withdraws a registration
|
|
1710
|
+
* under its own verb (`watch-pr drop`, `timer cancel`, `goal stop`), and a worker that reaches for a
|
|
1711
|
+
* neighbour's meant the obvious thing: `watch-pr remove` and `goal status` were both tried and refused.
|
|
1712
|
+
* The aliases are the CLI registry's (`alias`), which the command line reads too, to know that a bare
|
|
1713
|
+
* argument after `remove` is the id.
|
|
1714
|
+
* @param {string} tool @param {unknown} raw
|
|
1715
|
+
*/
|
|
1716
|
+
function actionOf(tool, raw) {
|
|
1717
|
+
const action = typeof raw === "string" ? raw.trim() : ""
|
|
1718
|
+
return /** @type {Record<string, any>} */ (CLI)[tool]?.alias?.[action.toLowerCase()] ?? action
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
/** A duration written with its unit, as whole seconds: `90s`, `10m`, `2h`, `3d`, the grammar `--for` and
|
|
1722
|
+
* `--every` take (the server parses those; a timer's instant is worked out here). Null when it is not one.
|
|
1723
|
+
* @param {string} raw */
|
|
1724
|
+
function durationSeconds(raw) {
|
|
1725
|
+
// The same pattern as the server's AWAITING_DURATION_RE (packages/shared), so one spelling works everywhere.
|
|
1726
|
+
const m = /^(\d{1,5})(s|m|h|d)$/.exec(raw.trim())
|
|
1727
|
+
if (!m) return null
|
|
1728
|
+
return Number(m[1]) * { s: 1, m: 60, h: 3600, d: 86400 }[/** @type {"s"|"m"|"h"|"d"} */ (m[2])]
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1665
1731
|
/** How a heartbeat cadence reads back to the worker. ONE formatter, because `start` and `get` describe
|
|
1666
1732
|
* the same stored number and a worker that saw "every 15m" armed must not read "every 900s" back.
|
|
1667
1733
|
*
|
|
@@ -1705,7 +1771,7 @@ function goalReport(rp) {
|
|
|
1705
1771
|
* @param {Record<string, unknown>} args @returns {Promise<string>} */
|
|
1706
1772
|
async function goal(args) {
|
|
1707
1773
|
const slug = threadSlug()
|
|
1708
|
-
const action =
|
|
1774
|
+
const action = actionOf("goal", args.action)
|
|
1709
1775
|
if (action !== "start" && action !== "stop" && action !== "get") {
|
|
1710
1776
|
throw new Error("`action` must be one of \"start\", \"stop\" or \"get\"")
|
|
1711
1777
|
}
|
|
@@ -1822,7 +1888,7 @@ function armedList(payload) {
|
|
|
1822
1888
|
* @param {Record<string, unknown>} args @returns {Promise<string>} */
|
|
1823
1889
|
async function timer(args) {
|
|
1824
1890
|
const slug = threadSlug()
|
|
1825
|
-
const action =
|
|
1891
|
+
const action = actionOf("timer", args.action)
|
|
1826
1892
|
if (action !== "set" && action !== "cancel" && action !== "list") {
|
|
1827
1893
|
throw new Error("`action` must be one of \"set\", \"cancel\" or \"list\"")
|
|
1828
1894
|
}
|
|
@@ -1846,18 +1912,22 @@ async function timer(args) {
|
|
|
1846
1912
|
|
|
1847
1913
|
// Exactly one of the two ways to name the instant. Accepting both would mean silently preferring one,
|
|
1848
1914
|
// and a worker that gave two different times meant something by each of them.
|
|
1915
|
+
const hasFor = typeof args.in === "string" && args.in.trim() !== ""
|
|
1849
1916
|
const hasIn = args.in_seconds !== undefined && args.in_seconds !== null
|
|
1850
1917
|
const hasAt = typeof args.at === "string" && args.at.trim() !== ""
|
|
1851
|
-
if (hasIn
|
|
1852
|
-
if (!hasIn && !hasAt) throw new Error("give
|
|
1918
|
+
if (Number(hasFor) + Number(hasIn) + Number(hasAt) > 1) throw new Error("give ONE of `--in`, `--in-seconds` and `--at`, not several")
|
|
1919
|
+
if (!hasFor && !hasIn && !hasAt) throw new Error("give `--in` (a duration from now, like `10m`), `--in-seconds` (a number of seconds) or `--at` (an ISO-8601 instant)")
|
|
1853
1920
|
|
|
1854
1921
|
const nowMs = Date.now()
|
|
1855
1922
|
let fireMs
|
|
1856
|
-
if (hasIn) {
|
|
1857
|
-
const seconds = typeof args.in_seconds === "number" ? Math.round(args.in_seconds) : NaN
|
|
1923
|
+
if (hasFor || hasIn) {
|
|
1924
|
+
const seconds = hasFor ? durationSeconds(String(args.in)) : typeof args.in_seconds === "number" ? Math.round(args.in_seconds) : NaN
|
|
1925
|
+
if (seconds === null) throw new Error(`\`--in ${String(args.in).trim()}\` is not a duration — give a number with its unit, like \`90s\`, \`10m\`, \`2h\` or \`3d\` (\`--in-seconds\` takes a bare number)`)
|
|
1858
1926
|
if (!Number.isFinite(seconds)) throw new Error("`in_seconds` must be a number of seconds")
|
|
1859
1927
|
if (seconds < TIMER_MIN_DELAY_SECONDS || seconds > TIMER_MAX_DELAY_SECONDS) {
|
|
1860
|
-
throw new Error(
|
|
1928
|
+
throw new Error(hasFor
|
|
1929
|
+
? `\`--in\` must be between ${TIMER_MIN_DELAY_SECONDS}s and 30d`
|
|
1930
|
+
: `\`in_seconds\` must be between ${TIMER_MIN_DELAY_SECONDS} and ${TIMER_MAX_DELAY_SECONDS} (thirty days)`)
|
|
1861
1931
|
}
|
|
1862
1932
|
fireMs = nowMs + seconds * 1000
|
|
1863
1933
|
} else {
|
|
@@ -2141,7 +2211,7 @@ async function done(args) {
|
|
|
2141
2211
|
* @param {Record<string, unknown>} args @returns {Promise<string>} */
|
|
2142
2212
|
async function watchPr(args) {
|
|
2143
2213
|
const slug = threadSlug()
|
|
2144
|
-
const action =
|
|
2214
|
+
const action = actionOf("watch_pr", args.action)
|
|
2145
2215
|
if (action !== "add" && action !== "list" && action !== "drop") {
|
|
2146
2216
|
throw new Error("`action` must be one of \"add\", \"list\" or \"drop\"")
|
|
2147
2217
|
}
|
|
@@ -2164,7 +2234,11 @@ async function watchPr(args) {
|
|
|
2164
2234
|
|
|
2165
2235
|
const target = typeof args.target === "string" ? args.target.trim() : ""
|
|
2166
2236
|
if (!target) throw new Error("`target` is required — the pull request, as `owner/repo#123` or a PR URL")
|
|
2167
|
-
|
|
2237
|
+
// Checked HERE, as `watch` and `watch-issue` check theirs: sent empty, it came back as the input
|
|
2238
|
+
// validator's `for: String must contain at least 1 character(s)`.
|
|
2239
|
+
const forValue = typeof args.for === "string" ? args.for.trim() : ""
|
|
2240
|
+
if (!forValue) throw new Error("`for` is required — a DURATION like `2h`, `3d` or `180d` (max 365d), never an instant")
|
|
2241
|
+
const result = (await callRpc("addOwnPrWatch", { slug, target, for: forValue }))?.result
|
|
2168
2242
|
const id = result?.id ?? "(unknown)"
|
|
2169
2243
|
const ref = result?.target ?? target
|
|
2170
2244
|
const until = result?.expiresAt ? ` until ${result.expiresAt}` : ""
|
|
@@ -2190,7 +2264,7 @@ async function watchPr(args) {
|
|
|
2190
2264
|
* @param {Record<string, unknown>} args @returns {Promise<string>} */
|
|
2191
2265
|
async function watchIssue(args) {
|
|
2192
2266
|
const slug = threadSlug()
|
|
2193
|
-
const action =
|
|
2267
|
+
const action = actionOf("watch_issue", args.action)
|
|
2194
2268
|
if (action !== "add" && action !== "list" && action !== "drop") {
|
|
2195
2269
|
throw new Error("`action` must be one of \"add\", \"list\" or \"drop\"")
|
|
2196
2270
|
}
|
|
@@ -2278,7 +2352,7 @@ function outputTail(output) {
|
|
|
2278
2352
|
* @param {Record<string, unknown>} args @returns {Promise<string|Refused>} */
|
|
2279
2353
|
async function monitor(args) {
|
|
2280
2354
|
const slug = threadSlug()
|
|
2281
|
-
const action =
|
|
2355
|
+
const action = actionOf("monitor", args.action)
|
|
2282
2356
|
if (action !== "add" && action !== "list" && action !== "drop") {
|
|
2283
2357
|
throw new Error("`action` must be one of \"add\", \"list\" or \"drop\"")
|
|
2284
2358
|
}
|
|
@@ -2473,6 +2547,7 @@ const CLI = {
|
|
|
2473
2547
|
group: "Waiting",
|
|
2474
2548
|
summary: "Wake on a pull request's CI, reviews, comments and labels",
|
|
2475
2549
|
positional: ["action"],
|
|
2550
|
+
alias: { remove: "drop", rm: "drop", cancel: "drop" },
|
|
2476
2551
|
then: { add: ["target"], drop: ["id"] },
|
|
2477
2552
|
examples: ["frizzctl watch-pr add acme/app#391 --for 180d", "frizzctl watch-pr list", "frizzctl watch-pr drop prw_ab12cd34"],
|
|
2478
2553
|
},
|
|
@@ -2480,6 +2555,7 @@ const CLI = {
|
|
|
2480
2555
|
group: "Waiting",
|
|
2481
2556
|
summary: "Wake on a GitHub issue's comments, labels, assignees and close",
|
|
2482
2557
|
positional: ["action"],
|
|
2558
|
+
alias: { remove: "drop", rm: "drop", cancel: "drop" },
|
|
2483
2559
|
then: { add: ["target"], drop: ["id"] },
|
|
2484
2560
|
examples: ["frizzctl watch-issue add acme/app#482 --for 30d", "frizzctl watch-issue list", "frizzctl watch-issue drop isw_ab12cd34"],
|
|
2485
2561
|
},
|
|
@@ -2487,6 +2563,7 @@ const CLI = {
|
|
|
2487
2563
|
group: "Waiting",
|
|
2488
2564
|
summary: "Wake when a command the server re-runs exits 0, or with --persistent on every line a script prints",
|
|
2489
2565
|
positional: ["action"],
|
|
2566
|
+
alias: { remove: "drop", rm: "drop", cancel: "drop" },
|
|
2490
2567
|
then: { add: ["command"], drop: ["id"] },
|
|
2491
2568
|
examples: [
|
|
2492
2569
|
'frizzctl monitor add "npm view frizz@0.13.12 version" --every 5m --for 6h',
|
|
@@ -2505,9 +2582,10 @@ const CLI = {
|
|
|
2505
2582
|
group: "Waiting",
|
|
2506
2583
|
summary: "Set, list or cancel one-off timed prompts to yourself",
|
|
2507
2584
|
positional: ["action"],
|
|
2585
|
+
alias: { drop: "cancel", remove: "cancel", rm: "cancel" },
|
|
2508
2586
|
then: { cancel: ["id"] },
|
|
2509
2587
|
examples: [
|
|
2510
|
-
'frizzctl timer set --in
|
|
2588
|
+
'frizzctl timer set --in 10m --prompt "Re-check the deploy and report its status"',
|
|
2511
2589
|
"frizzctl timer list",
|
|
2512
2590
|
"frizzctl timer cancel tmr_a1b2c3d4e5f6",
|
|
2513
2591
|
],
|
|
@@ -2516,6 +2594,7 @@ const CLI = {
|
|
|
2516
2594
|
group: "Waiting",
|
|
2517
2595
|
summary: "Arm, read back or stop the text Frizz re-sends this thread",
|
|
2518
2596
|
positional: ["action"],
|
|
2597
|
+
alias: { drop: "stop", remove: "stop", rm: "stop", cancel: "stop", status: "get" },
|
|
2519
2598
|
examples: [
|
|
2520
2599
|
"frizzctl goal get",
|
|
2521
2600
|
"frizzctl goal start --post-compaction --no-stop-hook --prompt-file resume-prompt.md",
|
|
@@ -2575,4 +2654,4 @@ const CLI = {
|
|
|
2575
2654
|
},
|
|
2576
2655
|
}
|
|
2577
2656
|
|
|
2578
|
-
export { TOOLS, HANDLERS, CLI, Refused, doneOpenQuestionsRefusal }
|
|
2657
|
+
export { TOOLS, HANDLERS, CLI, Refused, ServerRefusal, doneOpenQuestionsRefusal }
|
package/web-dist/assets/{abnfDiagram-VRR7QNED-J7b3ICAw.js → abnfDiagram-VCTEODGH-CSl-iUaD.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-BH-fcjsB.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-C4XfhTaE.js";import"./chunk-DU6HZSFF-UWY5hXXp.js";import"./chunk-CLGD4ZFX-CMAQm7EJ.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-m6oapxSg.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-DoH_9pyS.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-FOHPRMQF-CyTuVbu3.js";import{M as e}from"./mermaid-parser.core-BH-fcjsB.js";export{e as createArchitectureServices};
|