frizz-server 0.15.63 → 0.15.65
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 +9695 -9665
- package/dist/dev-child.js +12150 -11755
- package/package.json +1 -1
- package/runtime/cc-worker/lib/frizz-tools.mjs +367 -55
- package/web-dist/assets/{abnfDiagram-VCTEODGH-CJ9DY67I.js → abnfDiagram-VCTEODGH-BiJ4o5Ds.js} +1 -1
- package/web-dist/assets/architecture-7GRP2DOG-DTQZDTlF.js +1 -0
- package/web-dist/assets/{architectureDiagram-5GKGNRK7-DRM8-zOu.js → architectureDiagram-5GKGNRK7-CsLqK0BE.js} +1 -1
- package/web-dist/assets/{blockDiagram-I7D4REHJ-DNjmHPSZ.js → blockDiagram-I7D4REHJ-DWs5aRRO.js} +1 -1
- package/web-dist/assets/{c4Diagram-7LVT6UL2-Dz9J-TTp.js → c4Diagram-7LVT6UL2-Dk9wYT5j.js} +1 -1
- package/web-dist/assets/channel-DEEIlZEQ.js +1 -0
- package/web-dist/assets/{chunk-2E4U76K2-BPsB3sRI.js → chunk-2E4U76K2-iLxD8PcN.js} +1 -1
- package/web-dist/assets/{chunk-4HAMMTFA-NHElOJMR.js → chunk-4HAMMTFA-B2bZyZs2.js} +1 -1
- package/web-dist/assets/{chunk-75Z2AOVW-Brw7EmiG.js → chunk-75Z2AOVW-DIZn8bvE.js} +1 -1
- package/web-dist/assets/{chunk-CLGD4ZFX-BNp8YhnD.js → chunk-CLGD4ZFX-DXth0YhX.js} +1 -1
- package/web-dist/assets/{chunk-DU6HZSFF-DyPlNm7J.js → chunk-DU6HZSFF-D0BZQTG5.js} +1 -1
- package/web-dist/assets/{chunk-F27PBJKO-BCONkN6p.js → chunk-F27PBJKO-BF6w8taS.js} +1 -1
- package/web-dist/assets/{chunk-GMAD6QVW-DbFBBOx6.js → chunk-GMAD6QVW-BgS1USoA.js} +1 -1
- package/web-dist/assets/{chunk-GVQU2GXP-BZL8UVk_.js → chunk-GVQU2GXP-BwmGDTq-.js} +1 -1
- package/web-dist/assets/{chunk-IMKFNOWR-DNBC3Npf.js → chunk-IMKFNOWR-C2hHnw7E.js} +1 -1
- package/web-dist/assets/{chunk-L3NEJ4N5-pTT6R-Eu.js → chunk-L3NEJ4N5-Bbg747MC.js} +1 -1
- package/web-dist/assets/{chunk-OSK3NFVY-DhJh3Vid.js → chunk-OSK3NFVY-DAQ50rcr.js} +1 -1
- package/web-dist/assets/{chunk-P2QGCYS3-CWok-LvO.js → chunk-P2QGCYS3-BObSA-cM.js} +1 -1
- package/web-dist/assets/{chunk-POPQ4Y6H-CWc6iGW-.js → chunk-POPQ4Y6H-BqmJCF6N.js} +1 -1
- package/web-dist/assets/{chunk-PWAF6VOD-DkXvdk8S.js → chunk-PWAF6VOD-CuDeijqS.js} +1 -1
- package/web-dist/assets/{chunk-SHT3W25Y-DWMGbqb_.js → chunk-SHT3W25Y-DbJTvHUA.js} +1 -1
- package/web-dist/assets/{chunk-SVP7TREG-LcbJaowy.js → chunk-SVP7TREG-BC8SdQcL.js} +1 -1
- package/web-dist/assets/{chunk-TICWLB2K-BxiaZoIt.js → chunk-TICWLB2K-DXexujNp.js} +1 -1
- package/web-dist/assets/{chunk-TLUHSLCS-bJGTUnJT.js → chunk-TLUHSLCS-0wx9EWEa.js} +2 -2
- package/web-dist/assets/classDiagram-ZZMXUADV-CS5b4mpy.js +1 -0
- package/web-dist/assets/classDiagram-v2-VYDZK3BY-CS5b4mpy.js +1 -0
- package/web-dist/assets/{cynefin-OW5HDTMX-BOKyDT0B.js → cynefin-OW5HDTMX-CGrLGBfS.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-5FMLGOSQ-BYgd80zj.js → cynefinDiagram-5FMLGOSQ-EyQdBwCu.js} +1 -1
- package/web-dist/assets/{dagre-GXQ25YYZ-UKxnfAQZ.js → dagre-GXQ25YYZ-BVqzmn7R.js} +1 -1
- package/web-dist/assets/{diagram-S7CK7UJ4-POdoYLe9.js → diagram-S7CK7UJ4-DZ1hfAmp.js} +1 -1
- package/web-dist/assets/{diagram-UQ7AKVKN-B2ervceJ.js → diagram-UQ7AKVKN-DpAP9cxe.js} +1 -1
- package/web-dist/assets/{diagram-VSXAHHWV-RV0WG_Vh.js → diagram-VSXAHHWV-CU3WPzI-.js} +1 -1
- package/web-dist/assets/{diagram-VX7I27RA-DNFAC4Mo.js → diagram-VX7I27RA-Zbw7QxDA.js} +1 -1
- package/web-dist/assets/{diagram-Z3DM3KII-DBbaSMbG.js → diagram-Z3DM3KII-B1wgPjix.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-PWID7BFC-nUP2mVRG.js → ebnfDiagram-PWID7BFC-Dv7JWtKb.js} +1 -1
- package/web-dist/assets/{erDiagram-RLTQ6QDP-CX2-ZFwk.js → erDiagram-RLTQ6QDP-C5sXCiIS.js} +1 -1
- package/web-dist/assets/eventmodeling-NTZA5JFV-Bt0Eptkc.js +1 -0
- package/web-dist/assets/flowDiagram-HODETNUW-BNRmy-JK.js +1 -0
- package/web-dist/assets/{ganttDiagram-EL5Y4UJY-CMdxpgt0.js → ganttDiagram-EL5Y4UJY-DZd_7lQ3.js} +1 -1
- package/web-dist/assets/{gitGraph-4MIJSDKK-UdI0LKxb.js → gitGraph-4MIJSDKK-B26quh1K.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-WWUBYQGX-CJLoNdf2.js → gitGraphDiagram-WWUBYQGX-BqPUII5h.js} +1 -1
- package/web-dist/assets/index-D-Pgx7jI.js +262 -0
- package/web-dist/assets/index-DjVez4iB.css +2 -0
- package/web-dist/assets/{info-A6RAGUB7-CxnQJxLm.js → info-A6RAGUB7-BtK5rNNi.js} +1 -1
- package/web-dist/assets/{infoDiagram-27XIBGKW-HVKt8WDS.js → infoDiagram-27XIBGKW-rMo0hIHa.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-5VMMS53U-DI0M5sb-.js → ishikawaDiagram-5VMMS53U-DKHMSlJD.js} +1 -1
- package/web-dist/assets/{journeyDiagram-3NMN7TZE-B2GBTQj8.js → journeyDiagram-3NMN7TZE-CZLE8Bqt.js} +1 -1
- package/web-dist/assets/{kanban-definition-UXKFOSKX-BCMomB_2.js → kanban-definition-UXKFOSKX-dqVMgmbb.js} +1 -1
- package/web-dist/assets/{line-MCY_uLZm.js → line-CrnyN3Lt.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-DTKPYi2J.js → mermaid-parser.core-Dr2z-e4o.js} +3 -3
- package/web-dist/assets/{mermaid.core-DAYSZV3J.js → mermaid.core-BXpwwhdN.js} +3 -3
- package/web-dist/assets/{mindmap-definition-YA3MSWOX-DDyg0vDb.js → mindmap-definition-YA3MSWOX-D-J1xW_j.js} +1 -1
- package/web-dist/assets/{packet-AYTQ26CC-ByyMe2pH.js → packet-AYTQ26CC-xrZeixjb.js} +1 -1
- package/web-dist/assets/{pegDiagram-XKGWAZYB-DnWoyrgK.js → pegDiagram-XKGWAZYB-BR5WwIHq.js} +1 -1
- package/web-dist/assets/{pie-WAS4IAKB-BI7-FKCx.js → pie-WAS4IAKB-dc_3hE8I.js} +1 -1
- package/web-dist/assets/{pieDiagram-E7YTZNPT-BN6SWotB.js → pieDiagram-E7YTZNPT-B84B9L5r.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-AXDQQJYC-QKDpcrgh.js → quadrantDiagram-AXDQQJYC-Bm859-6L.js} +1 -1
- package/web-dist/assets/{radar-RG4KPBEZ-B5iqAJfo.js → radar-RG4KPBEZ-DOlDnfZi.js} +1 -1
- package/web-dist/assets/{railroad-74A4TZTK-CblcgEJv.js → railroad-74A4TZTK-CB_W8mmn.js} +1 -1
- package/web-dist/assets/railroad-abnf-HS5TGJTU-DB7tPOt1.js +1 -0
- package/web-dist/assets/railroad-ebnf-LZEXJU2U-Bl0t7Ei-.js +1 -0
- package/web-dist/assets/railroad-peg-WCYAUIDC-RTQXALoT.js +1 -0
- package/web-dist/assets/{railroadDiagram-O6MQD6OU-BIaxvbGE.js → railroadDiagram-O6MQD6OU-Ce4wBI0Y.js} +1 -1
- package/web-dist/assets/{requirementDiagram-BXWQKSXE-ys-OBQpS.js → requirementDiagram-BXWQKSXE-DMfJJlOr.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-P5KCCOFB-DPLCMgnR.js → sankeyDiagram-P5KCCOFB-CWAtaK1M.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-WJ2MYXX4-DxGzvovq.js → sequenceDiagram-WJ2MYXX4-CGGVQ0p0.js} +1 -1
- package/web-dist/assets/{stateDiagram-D77RDMKH-TlJA-aW6.js → stateDiagram-D77RDMKH-Z23iP6vB.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-MP3YSRHH-Cctq6goD.js +1 -0
- package/web-dist/assets/{swimlanes-42K2YHIH-CEtwhIRy.js → swimlanes-42K2YHIH-Z1I7L9cr.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-VR7AAH4N-CkF-YA0k.js +8 -0
- package/web-dist/assets/threadSurfaces-DpQhUD3Q.js +140 -0
- package/web-dist/assets/{timeline-definition-24CTP7MA-Cgp09gy-.js → timeline-definition-24CTP7MA-B9l0F0nK.js} +1 -1
- package/web-dist/assets/{treeView-Q6P3EWNA-BtzFipdV.js → treeView-Q6P3EWNA-BDHbzVhP.js} +1 -1
- package/web-dist/assets/{treemap-WGGIJYW6-b7alBdhh.js → treemap-WGGIJYW6-DIk7J7mj.js} +1 -1
- package/web-dist/assets/{vennDiagram-4TSXK5OY-D8ap0toR.js → vennDiagram-4TSXK5OY-CXFQUhMh.js} +1 -1
- package/web-dist/assets/{wardley-WFR3VGLG-BFeDzhb0.js → wardley-WFR3VGLG-2-8sLGSL.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-VM6X3IG4-ZoCDFcAK.js → wardleyDiagram-VM6X3IG4-CQJUGn_G.js} +1 -1
- package/web-dist/assets/{xychartDiagram-S5SC5T6Z-D1bLKZ_Z.js → xychartDiagram-S5SC5T6Z-hgi3z_lr.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/assets/architecture-7GRP2DOG-CQLKjTke.js +0 -1
- package/web-dist/assets/channel-CF0ISgB3.js +0 -1
- package/web-dist/assets/classDiagram-ZZMXUADV-DN0vKKhs.js +0 -1
- package/web-dist/assets/classDiagram-v2-VYDZK3BY-DN0vKKhs.js +0 -1
- package/web-dist/assets/eventmodeling-NTZA5JFV-CsTmGcSv.js +0 -1
- package/web-dist/assets/flowDiagram-HODETNUW-C-xVGGSk.js +0 -1
- package/web-dist/assets/index-C73MQv-A.js +0 -262
- package/web-dist/assets/index-DC88IHP5.css +0 -2
- package/web-dist/assets/railroad-abnf-HS5TGJTU-Briaj5gq.js +0 -1
- package/web-dist/assets/railroad-ebnf-LZEXJU2U-vCfM8ZS4.js +0 -1
- package/web-dist/assets/railroad-peg-WCYAUIDC-BXkNOypp.js +0 -1
- package/web-dist/assets/stateDiagram-v2-MP3YSRHH-BIvvxNxn.js +0 -1
- package/web-dist/assets/swimlanesDiagram-VR7AAH4N-Dy_0ufxt.js +0 -8
- package/web-dist/assets/threadSurfaces-DXKHZ7Ci.js +0 -140
package/package.json
CHANGED
|
@@ -78,28 +78,37 @@ const SPAWN_THREAD = {
|
|
|
78
78
|
model: {
|
|
79
79
|
type: "string",
|
|
80
80
|
description:
|
|
81
|
-
"REQUIRED — pick by the NEW task's complexity; there is no default.
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
81
|
+
"REQUIRED — pick by the NEW task's complexity; there is no default. Match the model to `--backend` " +
|
|
82
|
+
"(or use a prefixed slug, which infers `--backend` automatically):\n" +
|
|
83
|
+
" - `claude` (default): `opus` (TOP tier — hardest reasoning, architecture, subtle correctness/" +
|
|
84
|
+
"security, adversarial review), `sonnet` (ordinary substantive work), `haiku` (simple mechanical " +
|
|
85
|
+
"work). Do NOT pick `fable` unless explicitly asked.\n" +
|
|
86
|
+
" - `codex`: a codex model id (e.g. `gpt-5.6-sol`/`gpt-5.6-terra`/`gpt-5.6-luna`).\n" +
|
|
87
|
+
" - `antigravity`: an Antigravity model id (e.g. `gemini-4-neon`, `gemini-3.8-flash`, or an " +
|
|
88
|
+
"orchestrator; `antigravity:<id>` is accepted too).\n" +
|
|
89
|
+
" - `opencode`: `<provider>/<id>` or `<provider>/<id>#<variant>` (or `opencode:` for OpenCode's " +
|
|
90
|
+
"default; `opencode:<provider>/<id>` is accepted too).\n" +
|
|
91
|
+
" - `acp`: `<agent>` or `<agent>@<model>` (e.g. `cursor`, `gemini`, `copilot`, `grok`, `kilo`, " +
|
|
92
|
+
"`qwen`, `kimi`, `pi`, or a custom `settings.acpAgents` id; `acp:<agent>[@<model>]` is accepted too).\n" +
|
|
93
|
+
"Run `frizzctl models` (or `frizzctl models <backend>` / `frizzctl models acp:<agent>`) to see what " +
|
|
94
|
+
"this machine actually has installed and which models/efforts each offers.",
|
|
90
95
|
},
|
|
91
96
|
effort: {
|
|
92
97
|
type: "string",
|
|
93
|
-
enum: ["low", "medium", "high", "xhigh", "max"],
|
|
94
98
|
description:
|
|
95
|
-
"
|
|
96
|
-
"`medium`
|
|
97
|
-
"
|
|
99
|
+
"Reasoning effort / thinking level, pick by complexity. REQUIRED for `claude` and `codex` (no " +
|
|
100
|
+
"default): `low`, `medium`, `high`, `xhigh`, `max` (Claude also accepts `ultracode`; Codex also " +
|
|
101
|
+
"accepts `ultra`). Optional for `antigravity` (per-model thinking level, e.g. `low`/`medium`/`high`/" +
|
|
102
|
+
"`xhigh`; omit for orchestrators or default), `opencode` (folded into `#<variant>` on the model " +
|
|
103
|
+
"slug), and `acp` (unused).",
|
|
98
104
|
},
|
|
99
105
|
backend: {
|
|
100
106
|
type: "string",
|
|
101
|
-
enum: ["claude", "codex"],
|
|
102
|
-
description:
|
|
107
|
+
enum: ["claude", "codex", "antigravity", "opencode", "acp"],
|
|
108
|
+
description:
|
|
109
|
+
"Optional agent backend (default `claude`): `claude`, `codex`, `antigravity`, `opencode`, or `acp`. " +
|
|
110
|
+
"A prefixed model (`antigravity:<id>`, `opencode:<provider>/<id>`, `acp:<agent>[@<model>]`) infers " +
|
|
111
|
+
"its backend automatically.",
|
|
103
112
|
},
|
|
104
113
|
title: { type: "string", description: "Optional short title for the new thread (else derived from the prompt)." },
|
|
105
114
|
project: {
|
|
@@ -110,7 +119,7 @@ const SPAWN_THREAD = {
|
|
|
110
119
|
"project. The new thread is told which project you are on, so it can `steer` results back.",
|
|
111
120
|
},
|
|
112
121
|
},
|
|
113
|
-
required: ["prompt", "model"
|
|
122
|
+
required: ["prompt", "model"],
|
|
114
123
|
},
|
|
115
124
|
}
|
|
116
125
|
|
|
@@ -120,20 +129,21 @@ const SPAWN_CHILD = {
|
|
|
120
129
|
name: "spawn_child",
|
|
121
130
|
description:
|
|
122
131
|
"AN EXPERIMENT, switched on in Frizz's Settings (refused, exit 2, while it is off). Start a CHILD THREAD: a " +
|
|
123
|
-
"new thread on YOUR board
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"handoff, a crash — is handed to YOU instead, as a
|
|
128
|
-
"the board rather than in the queue. Answer it, or
|
|
129
|
-
"
|
|
132
|
+
"new thread on YOUR board — on Claude Code, Codex, Antigravity, OpenCode or any installed ACP agent — that " +
|
|
133
|
+
"works for YOU. It is a full Frizz thread — its own session, scratch directory and watchers — dispatched " +
|
|
134
|
+
"like any other, so it runs on its harness's own runtime with the project's skills and instructions, and it " +
|
|
135
|
+
"can rest, own a PR watcher and be woken by it. What makes it a child: every rest of its that would have " +
|
|
136
|
+
"gone to the human's queue — its `done`, a `needs_input` handoff, a crash — is handed to YOU instead, as a " +
|
|
137
|
+
"message that wakes you, and it sits under your thread on the board rather than in the queue. Answer it, or " +
|
|
138
|
+
"give it more work, with `frizzctl steer <slug>`. Only a permission approval, a secret it needs and a " +
|
|
139
|
+
"usage-limit stop still go to the human directly. " +
|
|
130
140
|
"WHEN TO USE IT, and when not: an in-session sub-agent is still the tool for a helper that finishes inside your " +
|
|
131
141
|
"turn — a review, a research prong, a verification pass — because it is cheaper (no worker prompt, no cold " +
|
|
132
142
|
"start, no process of its own). A child thread is for work a sub-agent structurally cannot do: work that must " +
|
|
133
|
-
"REST and be woken (a pull request it opened and must shepherd through CI and review rounds), work on
|
|
134
|
-
"harness, or work that must survive your process. Rest on a
|
|
135
|
-
"```awaiting fence. A child cannot start children of its own.
|
|
136
|
-
"child's task, as for `spawn-thread`.",
|
|
143
|
+
"REST and be woken (a pull request it opened and must shepherd through CI and review rounds), work on another " +
|
|
144
|
+
"harness (Codex, Antigravity, OpenCode, or an ACP agent), or work that must survive your process. Rest on a " +
|
|
145
|
+
"running child with `threads: [<slug>]` in your ```awaiting fence. A child cannot start children of its own. " +
|
|
146
|
+
"Choose `model` (and `effort` where applicable) by the child's task, as for `spawn-thread`.",
|
|
137
147
|
inputSchema: {
|
|
138
148
|
type: "object",
|
|
139
149
|
properties: {
|
|
@@ -145,14 +155,15 @@ const SPAWN_CHILD = {
|
|
|
145
155
|
effort: SPAWN_THREAD.inputSchema.properties.effort,
|
|
146
156
|
backend: {
|
|
147
157
|
type: "string",
|
|
148
|
-
enum: ["claude", "codex"],
|
|
158
|
+
enum: ["claude", "codex", "antigravity", "opencode", "acp"],
|
|
149
159
|
description:
|
|
150
|
-
"Optional harness (default `claude`)
|
|
151
|
-
"
|
|
160
|
+
"Optional harness (default `claude`): `claude`, `codex`, `antigravity`, `opencode`, or `acp` (run " +
|
|
161
|
+
"`frizzctl models` to list available agents and models). A child on your own harness starts in your " +
|
|
162
|
+
"current permission mode; one on another starts in that harness's default.",
|
|
152
163
|
},
|
|
153
164
|
title: { type: "string", description: "Optional short title for the child (else derived from the prompt)." },
|
|
154
165
|
},
|
|
155
|
-
required: ["prompt", "model"
|
|
166
|
+
required: ["prompt", "model"],
|
|
156
167
|
},
|
|
157
168
|
}
|
|
158
169
|
|
|
@@ -1098,10 +1109,42 @@ const THREADS = {
|
|
|
1098
1109
|
},
|
|
1099
1110
|
}
|
|
1100
1111
|
|
|
1112
|
+
const MODELS = {
|
|
1113
|
+
name: "models",
|
|
1114
|
+
description:
|
|
1115
|
+
"LIST THE BACKENDS, ACP AGENTS, MODELS AND EFFORT LEVELS THIS MACHINE CAN SPAWN — for Claude Code, Codex, " +
|
|
1116
|
+
"Antigravity, OpenCode, and every installed ACP agent (`cursor`, `gemini`, `copilot`, `grok`, `kilo`, " +
|
|
1117
|
+
"`qwen`, `kimi`, `pi`, and custom `settings.acpAgents`). Use this before `frizzctl spawn-thread` or " +
|
|
1118
|
+
"`frizzctl spawn-child` whenever targeting another harness.\n\n" +
|
|
1119
|
+
"Pass a backend (`claude`, `codex`, `antigravity`, `opencode`, `acp`) or one ACP agent (`acp:<agent>`, " +
|
|
1120
|
+
"e.g. `acp:cursor`, `acp:gemini`) to inspect its models; omit it for an overview of all backends and " +
|
|
1121
|
+
"installed ACP agents. `--json` prints raw JSON for `jq`. It only reads: nothing is started on the board.",
|
|
1122
|
+
inputSchema: {
|
|
1123
|
+
type: "object",
|
|
1124
|
+
properties: {
|
|
1125
|
+
backend: {
|
|
1126
|
+
type: "string",
|
|
1127
|
+
description:
|
|
1128
|
+
"Optional target: `claude`, `codex`, `antigravity`, `opencode`, `acp`, or `acp:<agent>` (to probe " +
|
|
1129
|
+
"one ACP agent's advertised models). Omitted ⇒ overview of all backends.",
|
|
1130
|
+
},
|
|
1131
|
+
refresh: {
|
|
1132
|
+
type: "boolean",
|
|
1133
|
+
description: "Bypass the 10-minute model cache on `antigravity` or `acp:<agent>`.",
|
|
1134
|
+
},
|
|
1135
|
+
json: {
|
|
1136
|
+
type: "boolean",
|
|
1137
|
+
description: "Print the catalogue as JSON instead of text.",
|
|
1138
|
+
},
|
|
1139
|
+
},
|
|
1140
|
+
required: [],
|
|
1141
|
+
},
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1101
1144
|
// WATCH_ISSUE rides at the END (2026-09-14), and SECRET, STEER, WATCH_COMMAND, MONITOR and THREADS after it: the tool list is
|
|
1102
1145
|
// read by position in frizz-mcp.test.ts, and a worker's runtime reads it by name, so the order costs nothing and appending
|
|
1103
1146
|
// breaks nothing.
|
|
1104
|
-
const TOOLS = [SPAWN_THREAD, GOAL, TIMER, WATCH_PR, WATCH, UNWATCH, ASK, UNASK, DONE, TITLE, ACTIVITY, LINK, UNLINK, WATCH_ISSUE, SECRET, STEER, WATCH_COMMAND, MONITOR, THREADS, SPAWN_CHILD, MCP, WORKTREE]
|
|
1147
|
+
const TOOLS = [SPAWN_THREAD, GOAL, TIMER, WATCH_PR, WATCH, UNWATCH, ASK, UNASK, DONE, TITLE, ACTIVITY, LINK, UNLINK, WATCH_ISSUE, SECRET, STEER, WATCH_COMMAND, MONITOR, THREADS, SPAWN_CHILD, MCP, WORKTREE, MODELS]
|
|
1105
1148
|
|
|
1106
1149
|
/** @type {Record<string, (args: Record<string, unknown>) => Promise<string>>} */
|
|
1107
1150
|
const HANDLERS = {
|
|
@@ -1127,6 +1170,7 @@ const HANDLERS = {
|
|
|
1127
1170
|
[WATCH_COMMAND.name]: watchCommand,
|
|
1128
1171
|
[MONITOR.name]: monitor,
|
|
1129
1172
|
[THREADS.name]: threads,
|
|
1173
|
+
[MODELS.name]: models,
|
|
1130
1174
|
}
|
|
1131
1175
|
|
|
1132
1176
|
// The slug out of whatever a worker has in hand for a thread: the slug itself, the `[title](/thread/<slug>)`
|
|
@@ -1683,23 +1727,108 @@ function projectSegment() {
|
|
|
1683
1727
|
}
|
|
1684
1728
|
}
|
|
1685
1729
|
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1730
|
+
const SPAWN_BACKENDS = ["claude", "codex", "antigravity", "opencode", "acp"]
|
|
1731
|
+
const KNOWN_ACP_HINTS = new Set(["cursor", "cursor-agent", "copilot", "grok", "kilo", "qwen", "kimi", "pi"])
|
|
1732
|
+
|
|
1733
|
+
/** Validate a `--backend` value, rejecting unknown names instead of silently falling back to Claude.
|
|
1734
|
+
* @param {unknown} raw @returns {"claude" | "codex" | "antigravity" | "opencode" | "acp" | undefined} */
|
|
1735
|
+
function parseSpawnBackend(raw) {
|
|
1736
|
+
if (raw === undefined || raw === null || raw === "") return undefined
|
|
1737
|
+
const value = typeof raw === "string" ? raw.trim().toLowerCase() : ""
|
|
1738
|
+
if (value === "claude" || value === "codex" || value === "antigravity" || value === "opencode" || value === "acp") return value
|
|
1739
|
+
let hint = ""
|
|
1740
|
+
if (value === "agy" || value === "anti-gravity") {
|
|
1741
|
+
hint = " — use `--backend antigravity` for Antigravity threads"
|
|
1742
|
+
} else if (value === "gemini") {
|
|
1743
|
+
hint = " — use `--backend antigravity` for Antigravity Gemini models, or `--backend acp --model gemini` for Gemini CLI over ACP"
|
|
1744
|
+
} else if (KNOWN_ACP_HINTS.has(value)) {
|
|
1745
|
+
const id = value === "cursor-agent" ? "cursor" : value
|
|
1746
|
+
hint = ` — use \`--backend acp --model ${id}\` for ACP agents`
|
|
1747
|
+
}
|
|
1748
|
+
throw new Error(`\`backend\` must be one of ${SPAWN_BACKENDS.map((b) => `"${b}"`).join(", ")}, not ${JSON.stringify(raw)}${hint}`)
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
/** Which backend a prefixed model slug names (`antigravity:`, `opencode:`, `acp:`), if any.
|
|
1752
|
+
* @param {string} model @returns {"antigravity" | "opencode" | "acp" | undefined} */
|
|
1753
|
+
function prefixedBackendOf(model) {
|
|
1754
|
+
if (model.startsWith("antigravity:")) return "antigravity"
|
|
1755
|
+
if (model.startsWith("opencode:")) return "opencode"
|
|
1756
|
+
if (model.startsWith("acp:")) return "acp"
|
|
1757
|
+
return undefined
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
/** Validate and normalize the shared arguments of `spawn-thread` and `spawn-child`.
|
|
1761
|
+
* @param {Record<string, unknown>} args @param {"thread" | "child"} role */
|
|
1762
|
+
function parseSpawnArgs(args, role) {
|
|
1689
1763
|
const prompt = typeof args.prompt === "string" ? args.prompt.trim() : ""
|
|
1690
1764
|
if (!prompt) throw new Error("`prompt` is required and must be a non-empty string")
|
|
1691
|
-
// model + effort are REQUIRED (no default) so the caller must choose by task
|
|
1692
|
-
// model (e.g. the project's cheap default) is exactly the bug this guards.
|
|
1693
|
-
//
|
|
1694
|
-
|
|
1695
|
-
|
|
1765
|
+
// model + effort are REQUIRED (no default) for Claude/Codex so the caller must choose by task
|
|
1766
|
+
// complexity — a defaulted model (e.g. the project's cheap default) is exactly the bug this guards.
|
|
1767
|
+
// For Antigravity, OpenCode and ACP, `model` is required (run `frizzctl models` to list ids) and
|
|
1768
|
+
// `effort` is optional (thinking levels / variants are per-model and ACP has none).
|
|
1769
|
+
const rawModel = typeof args.model === "string" ? args.model.trim() : ""
|
|
1770
|
+
if (!rawModel) {
|
|
1771
|
+
const scope = role === "child" ? "the child's task" : "the new task's complexity"
|
|
1772
|
+
throw new Error(
|
|
1773
|
+
`\`model\` is required — choose one by ${scope} (claude: opus/sonnet/haiku; codex: a gpt-5.6 id; ` +
|
|
1774
|
+
"antigravity: e.g. gemini-4-neon; opencode: <provider>/<id> or opencode:; acp: <agent> or <agent>@<model>). " +
|
|
1775
|
+
"Run `frizzctl models` to list what is available. There is no default.",
|
|
1776
|
+
)
|
|
1777
|
+
}
|
|
1778
|
+
const explicitBackend = parseSpawnBackend(args.backend)
|
|
1779
|
+
const prefixed = prefixedBackendOf(rawModel)
|
|
1780
|
+
if (prefixed && explicitBackend && explicitBackend !== prefixed) {
|
|
1781
|
+
throw new Error(`\`--model ${rawModel}\` is a \`${prefixed}\` model slug, which disagrees with \`--backend ${explicitBackend}\`. Pass \`--backend ${prefixed}\` (or omit \`--backend\`).`)
|
|
1782
|
+
}
|
|
1783
|
+
const backend = explicitBackend ?? prefixed
|
|
1696
1784
|
const effort = typeof args.effort === "string" ? args.effort.trim() : ""
|
|
1697
|
-
|
|
1785
|
+
let model = rawModel
|
|
1786
|
+
let wireEffort = effort
|
|
1787
|
+
|
|
1788
|
+
if (backend === "antigravity") {
|
|
1789
|
+
if (!rawModel.startsWith("antigravity:")) model = `antigravity:${rawModel}`
|
|
1790
|
+
} else if (backend === "opencode") {
|
|
1791
|
+
if (!rawModel.startsWith("opencode:")) model = `opencode:${rawModel}`
|
|
1792
|
+
if (effort) {
|
|
1793
|
+
// OpenCode carries its variant axis in the model slug (`opencode:<provider>/<id>#<variant>`),
|
|
1794
|
+
// whose values (`minimal`, `default`, …) are outside Frizz's effort enum. Fold `--effort` into
|
|
1795
|
+
// the slug here and omit `effort` from the RPC body.
|
|
1796
|
+
const rest = model.slice("opencode:".length)
|
|
1797
|
+
const hash = rest.indexOf("#")
|
|
1798
|
+
if (hash >= 0) {
|
|
1799
|
+
const existing = rest.slice(hash + 1)
|
|
1800
|
+
if (existing && existing !== effort) {
|
|
1801
|
+
throw new Error(`\`--model ${rawModel}\` already specifies variant \`${existing}\`, which disagrees with \`--effort ${effort}\`. Give one.`)
|
|
1802
|
+
}
|
|
1803
|
+
} else if (rest.includes("/")) {
|
|
1804
|
+
model = `${model}#${effort}`
|
|
1805
|
+
}
|
|
1806
|
+
wireEffort = ""
|
|
1807
|
+
}
|
|
1808
|
+
} else if (backend === "acp") {
|
|
1809
|
+
if (!rawModel.startsWith("acp:")) model = `acp:${rawModel}`
|
|
1810
|
+
const rest = model.slice("acp:".length)
|
|
1811
|
+
const agent = rest.includes("@") ? rest.slice(0, rest.indexOf("@")) : rest
|
|
1812
|
+
if (!agent) {
|
|
1813
|
+
throw new Error("`model` must name an ACP agent (`acp:<agent>` or `acp:<agent>@<model>` — run `frizzctl models acp` to list installed agents)")
|
|
1814
|
+
}
|
|
1815
|
+
wireEffort = ""
|
|
1816
|
+
} else if (!effort) {
|
|
1817
|
+
throw new Error("`effort` is required — choose one by complexity (low/medium/high/xhigh/max). There is no default.")
|
|
1818
|
+
}
|
|
1698
1819
|
|
|
1699
1820
|
/** @type {Record<string, unknown>} */
|
|
1700
|
-
const body = { prompt, model, effort }
|
|
1701
|
-
|
|
1702
|
-
if (
|
|
1821
|
+
const body = { prompt, model, ...(wireEffort ? { effort: wireEffort } : {}) }
|
|
1822
|
+
const title = typeof args.title === "string" ? args.title.trim() : ""
|
|
1823
|
+
if (title) body.title = title
|
|
1824
|
+
if (backend) body.backend = backend
|
|
1825
|
+
return { body, title }
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
/** The `spawn_thread` handler: POST `spawnThread` as the calling thread, return the worker-facing result text.
|
|
1829
|
+
* @param {Record<string, unknown>} args @returns {Promise<string>} */
|
|
1830
|
+
async function spawnThread(args) {
|
|
1831
|
+
const { body } = parseSpawnArgs(args, "thread")
|
|
1703
1832
|
const rawProject = typeof args.project === "string" ? args.project.trim() : ""
|
|
1704
1833
|
|
|
1705
1834
|
// A THREAD'S SPAWN GOES THROUGH ITS OWN PROJECT'S `spawnThread`, for this board or another project's.
|
|
@@ -1724,17 +1853,8 @@ async function spawnThread(args) {
|
|
|
1724
1853
|
}
|
|
1725
1854
|
|
|
1726
1855
|
async function spawnChild(args) {
|
|
1727
|
-
const
|
|
1728
|
-
|
|
1729
|
-
const model = typeof args.model === "string" ? args.model.trim() : ""
|
|
1730
|
-
if (!model) throw new Error("`model` is required — choose one by the child's task (claude: opus/sonnet/haiku, opus being the top tier; codex: a gpt-5.6 model id). There is no default.")
|
|
1731
|
-
const effort = typeof args.effort === "string" ? args.effort.trim() : ""
|
|
1732
|
-
if (!effort) throw new Error("`effort` is required — choose one by complexity (low/medium/high/xhigh/max). There is no default.")
|
|
1733
|
-
/** @type {Record<string, unknown>} */
|
|
1734
|
-
const body = { prompt, model, effort, from: threadSlug() }
|
|
1735
|
-
const title = typeof args.title === "string" ? args.title.trim() : ""
|
|
1736
|
-
if (title) body.title = title
|
|
1737
|
-
if (args.backend === "claude" || args.backend === "codex") body.backend = args.backend
|
|
1856
|
+
const { body, title } = parseSpawnArgs(args, "child")
|
|
1857
|
+
body.from = threadSlug()
|
|
1738
1858
|
// The server writes the footer that tells the child it is one (shared childThreadFooter): only it can
|
|
1739
1859
|
// name this thread by its board title.
|
|
1740
1860
|
const result = (await callRpc("spawnChild", body))?.result
|
|
@@ -1749,6 +1869,153 @@ async function spawnChild(args) {
|
|
|
1749
1869
|
)
|
|
1750
1870
|
}
|
|
1751
1871
|
|
|
1872
|
+
/** Format one ACP agent's probed model list (`acpAgentModels`). @param {any} data */
|
|
1873
|
+
function formatAcpAgentModels(data) {
|
|
1874
|
+
const agentId = String(data?.agentId ?? "")
|
|
1875
|
+
const head = `ACP agent \`${agentId}\` (\`--backend acp --model acp:${agentId}@<model>\`)`
|
|
1876
|
+
const list = Array.isArray(data?.models) ? data.models : []
|
|
1877
|
+
if (data?.error && list.length === 0) return `${head}\n unavailable: ${data.error}`
|
|
1878
|
+
if (list.length === 0) {
|
|
1879
|
+
return `${head}\n (agent advertises no selectable models — spawn with \`--backend acp --model ${agentId}\` for its configured default)`
|
|
1880
|
+
}
|
|
1881
|
+
const idPad = Math.max(18, ...list.map((/** @type {any} */ m) => String(m.id ?? "").length + 2))
|
|
1882
|
+
const rows = list.map((/** @type {any} */ m) => {
|
|
1883
|
+
const name = m.name && m.name !== m.id ? String(m.name) : ""
|
|
1884
|
+
const def = data?.current && m.id === data.current ? " [default]" : ""
|
|
1885
|
+
return ` ${String(m.id).padEnd(idPad)}${name}${def}`.trimEnd()
|
|
1886
|
+
})
|
|
1887
|
+
return `${head}\n${rows.join("\n")}`
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
/** Format the OpenCode model list (`opencodeModels`). @param {any} data */
|
|
1891
|
+
function formatOpencodeModels(data) {
|
|
1892
|
+
const meta = data?.version ? `opencode ${data.version}` : ""
|
|
1893
|
+
const head = `OpenCode (\`--backend opencode\`${meta ? ` — ${meta}` : ""})`
|
|
1894
|
+
const list = Array.isArray(data?.models) ? data.models : []
|
|
1895
|
+
if (!data?.available || (data?.error && list.length === 0)) {
|
|
1896
|
+
return `${head}\n unavailable: ${data?.error ?? "OpenCode is not installed"}`
|
|
1897
|
+
}
|
|
1898
|
+
if (list.length === 0) return `${head}\n (no models listed — spawn with \`--backend opencode --model opencode:\` for its default)`
|
|
1899
|
+
const slugs = list.map((/** @type {any} */ m) => `${m.providerID}/${m.id}`)
|
|
1900
|
+
const idPad = Math.max(20, ...slugs.map((/** @type {string} */ s) => s.length + 2))
|
|
1901
|
+
const namePad = Math.max(18, ...list.map((/** @type {any} */ m) => String(m.name ?? "").length + 2))
|
|
1902
|
+
const rows = list.map((/** @type {any} */ m, /** @type {number} */ i) => {
|
|
1903
|
+
const slug = slugs[i]
|
|
1904
|
+
const variants = Array.isArray(m.variants) && m.variants.length ? `variants: ${m.variants.join(", ")}` : ""
|
|
1905
|
+
const def = data?.defaultModel === `opencode:${slug}` ? " [default]" : ""
|
|
1906
|
+
return ` ${slug.padEnd(idPad)}${String(m.name ?? "").padEnd(namePad)}${variants}${def}`.trimEnd()
|
|
1907
|
+
})
|
|
1908
|
+
return `${head}\n${rows.join("\n")}`
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
/** The `models` handler: list available backends, ACP agents, models and effort levels.
|
|
1912
|
+
* @param {Record<string, unknown>} args @returns {Promise<string>} */
|
|
1913
|
+
async function models(args) {
|
|
1914
|
+
const raw = typeof args.backend === "string" ? args.backend.trim() : ""
|
|
1915
|
+
const refresh = args.refresh === true
|
|
1916
|
+
|
|
1917
|
+
// One specific ACP agent (`acp:<agent>`): probe its advertised models.
|
|
1918
|
+
if (raw.toLowerCase().startsWith("acp:")) {
|
|
1919
|
+
const agentId = raw.slice(4).trim()
|
|
1920
|
+
if (!agentId) throw new Error("name an ACP agent after `acp:` (e.g. `frizzctl models acp:cursor`), or run `frizzctl models acp` to list agents")
|
|
1921
|
+
const data = (await queryRpc("acpAgentModels", { agentId, ...(refresh ? { refresh: true } : {}) }))?.result
|
|
1922
|
+
if (args.json === true) return JSON.stringify(data, null, 2)
|
|
1923
|
+
return `${formatAcpAgentModels(data)}\n\nSpawn with \`frizzctl spawn-thread --backend acp --model ${agentId}@<model> --prompt-file <file>\` (or \`--model ${agentId}\` for its default). \`--json\` prints raw JSON.`
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
const only = parseSpawnBackend(raw || undefined)
|
|
1927
|
+
const want = (/** @type {"claude" | "codex" | "antigravity" | "opencode" | "acp"} */ b) => !only || only === b
|
|
1928
|
+
|
|
1929
|
+
if (only === "opencode") {
|
|
1930
|
+
const data = (await queryRpc("opencodeModels"))?.result
|
|
1931
|
+
if (args.json === true) return JSON.stringify(data, null, 2)
|
|
1932
|
+
return `${formatOpencodeModels(data)}\n\nSpawn with \`frizzctl spawn-thread --backend opencode --model <provider>/<id>[#<variant>] --prompt-file <file>\` (or \`--model opencode:\` for its default). \`--json\` prints raw JSON.`
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
const [claude, codex, antigravity, acpAgents] = await Promise.all([
|
|
1936
|
+
want("claude") ? queryRpc("claudeModels").then((p) => p?.result) : Promise.resolve(undefined),
|
|
1937
|
+
want("codex") ? queryRpc("codexModels").then((p) => p?.result) : Promise.resolve(undefined),
|
|
1938
|
+
want("antigravity") ? queryRpc("antigravityModels", refresh ? { refresh: true } : undefined).then((p) => p?.result) : Promise.resolve(undefined),
|
|
1939
|
+
(want("acp") || !only) ? queryRpc("acpAgents").then((p) => p?.result) : Promise.resolve(undefined),
|
|
1940
|
+
])
|
|
1941
|
+
if (args.json === true) {
|
|
1942
|
+
const out = only === "claude" ? claude : only === "codex" ? codex : only === "antigravity" ? antigravity : only === "acp" ? acpAgents : { claude, codex, antigravity, acpAgents }
|
|
1943
|
+
return JSON.stringify(out, null, 2)
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
const sections = []
|
|
1947
|
+
if (want("claude")) {
|
|
1948
|
+
const list = Array.isArray(claude) ? claude : []
|
|
1949
|
+
const rows = list.map((/** @type {any} */ m) => {
|
|
1950
|
+
const efforts = m.alias === "haiku" ? "low, medium, high, xhigh, max" : "low, medium, high, xhigh, max, ultracode"
|
|
1951
|
+
const note = m.alias === "fable" ? " (only when explicitly asked)" : ""
|
|
1952
|
+
return ` ${String(m.alias).padEnd(10)}${String(m.label ?? m.alias).padEnd(14)}efforts: ${efforts}${note}`
|
|
1953
|
+
})
|
|
1954
|
+
sections.push(`Claude Code (\`--backend claude\`, default)\n${rows.length ? rows.join("\n") : " (none reported)"}`)
|
|
1955
|
+
}
|
|
1956
|
+
if (want("codex")) {
|
|
1957
|
+
const list = Array.isArray(codex) ? codex : []
|
|
1958
|
+
const pad = Math.max(14, ...list.map((/** @type {any} */ m) => String(m.slug ?? "").length + 2))
|
|
1959
|
+
const rows = list.map((/** @type {any} */ m) => {
|
|
1960
|
+
const efforts = Array.isArray(m.efforts) && m.efforts.length ? `efforts: ${m.efforts.join(", ")}${m.defaultEffort ? ` (default: ${m.defaultEffort})` : ""}` : ""
|
|
1961
|
+
return ` ${String(m.slug).padEnd(pad)}${String(m.displayName ?? m.slug).padEnd(20)}${efforts}`.trimEnd()
|
|
1962
|
+
})
|
|
1963
|
+
sections.push(`Codex (\`--backend codex\`)\n${rows.length ? rows.join("\n") : " (none reported)"}`)
|
|
1964
|
+
}
|
|
1965
|
+
if (want("antigravity")) {
|
|
1966
|
+
const meta = [antigravity?.tier, antigravity?.version ? `agy ${antigravity.version}` : ""].filter(Boolean).join(", ")
|
|
1967
|
+
const head = `Antigravity (\`--backend antigravity\`${meta ? ` — ${meta}` : ""})`
|
|
1968
|
+
const list = Array.isArray(antigravity?.models) ? antigravity.models : []
|
|
1969
|
+
if (!antigravity?.available || (antigravity?.error && list.length === 0)) {
|
|
1970
|
+
sections.push(`${head}\n unavailable: ${antigravity?.error ?? "Antigravity is not installed"}`)
|
|
1971
|
+
} else if (list.length === 0) {
|
|
1972
|
+
sections.push(`${head}\n (no models listed)`)
|
|
1973
|
+
} else {
|
|
1974
|
+
const idPad = Math.max(18, ...list.map((/** @type {any} */ m) => String(m.id ?? "").length + 2))
|
|
1975
|
+
const namePad = Math.max(18, ...list.map((/** @type {any} */ m) => String(m.name ?? "").length + 2))
|
|
1976
|
+
const rows = list.map((/** @type {any} */ m) => {
|
|
1977
|
+
const levels = Array.isArray(m.efforts) && m.efforts.length
|
|
1978
|
+
? `efforts: ${m.efforts.join(", ")}${m.defaultEffort ? ` (default: ${m.defaultEffort})` : ""}`
|
|
1979
|
+
: "no thinking levels (omit --effort)"
|
|
1980
|
+
const def = antigravity?.defaultModel && m.id === antigravity.defaultModel ? " [default]" : ""
|
|
1981
|
+
return ` ${String(m.id).padEnd(idPad)}${String(m.name ?? m.id).padEnd(namePad)}${levels}${def}`
|
|
1982
|
+
})
|
|
1983
|
+
sections.push(`${head}\n${rows.join("\n")}`)
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
if (want("acp") || !only) {
|
|
1987
|
+
const agents = Array.isArray(acpAgents) ? acpAgents : []
|
|
1988
|
+
const nativeOpencode = agents.find((/** @type {any} */ a) => a.id === "opencode" && a.native && a.available)
|
|
1989
|
+
if (!only) {
|
|
1990
|
+
sections.push(
|
|
1991
|
+
nativeOpencode
|
|
1992
|
+
? "OpenCode (`--backend opencode`)\n installed (native) — run `frizzctl models opencode` to list models, or spawn with `--backend opencode --model opencode:`"
|
|
1993
|
+
: "OpenCode (`--backend opencode`)\n not installed (or below native minimum version)",
|
|
1994
|
+
)
|
|
1995
|
+
}
|
|
1996
|
+
const installed = agents.filter((/** @type {any} */ a) => a.available && !a.native)
|
|
1997
|
+
const missing = agents.filter((/** @type {any} */ a) => !a.available)
|
|
1998
|
+
const lines = []
|
|
1999
|
+
if (installed.length) {
|
|
2000
|
+
const idPad = Math.max(14, ...installed.map((/** @type {any} */ a) => `acp:${a.id}`.length + 2))
|
|
2001
|
+
const labelPad = Math.max(18, ...installed.map((/** @type {any} */ a) => String(a.label ?? a.id).length + 2))
|
|
2002
|
+
for (const a of installed) {
|
|
2003
|
+
lines.push(` ${`acp:${a.id}`.padEnd(idPad)}${String(a.label ?? a.id).padEnd(labelPad)}(${a.command}) — run \`frizzctl models acp:${a.id}\` for its models`)
|
|
2004
|
+
}
|
|
2005
|
+
} else {
|
|
2006
|
+
lines.push(" (no standalone ACP agents installed on PATH)")
|
|
2007
|
+
}
|
|
2008
|
+
if (only === "acp" && nativeOpencode) {
|
|
2009
|
+
lines.push(" acp:opencode OpenCode (runs natively under `--backend opencode`; `acp:opencode` also works over ACP)")
|
|
2010
|
+
}
|
|
2011
|
+
if (missing.length) {
|
|
2012
|
+
lines.push(` not on PATH: ${missing.map((/** @type {any} */ a) => `${a.id} (${a.command})`).join(", ")}`)
|
|
2013
|
+
}
|
|
2014
|
+
sections.push(`ACP agents (\`--backend acp\`)\n${lines.join("\n")}`)
|
|
2015
|
+
}
|
|
2016
|
+
return `${sections.join("\n\n")}\n\nSpawn with \`frizzctl spawn-thread --backend <backend> --model <id> [--effort <level>] --prompt-file <file>\` (or \`frizzctl spawn-child\`). \`--json\` prints raw JSON.`
|
|
2017
|
+
}
|
|
2018
|
+
|
|
1752
2019
|
/** What the spawner reads back. `project` is the new thread's project slug when it is not ours.
|
|
1753
2020
|
* @param {string} slug @param {string} label @param {string | undefined} project @returns {string} */
|
|
1754
2021
|
function spawnedReceipt(slug, label, project) {
|
|
@@ -1800,6 +2067,34 @@ async function callRpc(procedure, body) {
|
|
|
1800
2067
|
return postRpc(await serverLockPortWaiting(), procedure, body)
|
|
1801
2068
|
}
|
|
1802
2069
|
|
|
2070
|
+
/** GET a read-only Frizz query RPC procedure (`claudeModels`, `codexModels`, `antigravityModels`).
|
|
2071
|
+
* @param {string} procedure @param {unknown} [input] @returns {Promise<any>} */
|
|
2072
|
+
async function queryRpc(procedure, input) {
|
|
2073
|
+
return getRpc(await serverLockPortWaiting(), procedure, input)
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
/** One GET to Frizz's query RPC surface, sharing `postRpc`'s timeout and error translation.
|
|
2077
|
+
* @param {number} port @param {string} procedure @param {unknown} [input] */
|
|
2078
|
+
async function getRpc(port, procedure, input) {
|
|
2079
|
+
const controller = new AbortController()
|
|
2080
|
+
const timer = setTimeout(() => controller.abort(), DISPATCH_TIMEOUT_MS)
|
|
2081
|
+
const query = input !== undefined ? `?input=${encodeURIComponent(JSON.stringify(input))}` : ""
|
|
2082
|
+
let res
|
|
2083
|
+
try {
|
|
2084
|
+
res = await fetch(`http://127.0.0.1:${port}${rpcPath(procedure)}${query}`, {
|
|
2085
|
+
method: "GET",
|
|
2086
|
+
headers: { "sec-fetch-site": "same-origin" },
|
|
2087
|
+
signal: controller.signal,
|
|
2088
|
+
})
|
|
2089
|
+
} catch (err) {
|
|
2090
|
+
throw controller.signal.aborted ? unanswered(procedure) : unreachable(procedure, err)
|
|
2091
|
+
} finally {
|
|
2092
|
+
clearTimeout(timer)
|
|
2093
|
+
}
|
|
2094
|
+
if (!res.ok) throw await notOk(procedure, res)
|
|
2095
|
+
return await res.json().catch(() => null)
|
|
2096
|
+
}
|
|
2097
|
+
|
|
1803
2098
|
/** One POST to Frizz's RPC surface, and the one place a request that went wrong is put into words.
|
|
1804
2099
|
* @param {number} port @param {string} procedure @param {unknown} body */
|
|
1805
2100
|
async function postRpc(port, procedure, body) {
|
|
@@ -2906,6 +3201,9 @@ const CLI = {
|
|
|
2906
3201
|
examples: [
|
|
2907
3202
|
'frizzctl spawn-thread --model opus --effort high --title "Port the relay to Bun" --prompt-file prompt.md',
|
|
2908
3203
|
'frizzctl spawn-thread --project nub --model opus --effort high --title "Bump the SDK pin" --prompt-file prompt.md',
|
|
3204
|
+
'frizzctl spawn-thread --backend antigravity --model gemini-4-neon --effort high --title "Audit with Gemini" --prompt-file prompt.md',
|
|
3205
|
+
'frizzctl spawn-thread --backend acp --model cursor --title "Review with Cursor" --prompt-file prompt.md',
|
|
3206
|
+
'frizzctl spawn-thread --backend opencode --model opencode: --title "Run on OpenCode" --prompt-file prompt.md',
|
|
2909
3207
|
],
|
|
2910
3208
|
},
|
|
2911
3209
|
spawn_child: {
|
|
@@ -2914,6 +3212,20 @@ const CLI = {
|
|
|
2914
3212
|
examples: [
|
|
2915
3213
|
'frizzctl spawn-child --model opus --effort high --title "Fix the resolver and shepherd its PR" --prompt-file prompt.md',
|
|
2916
3214
|
'frizzctl spawn-child --backend codex --model gpt-5.6-sol --effort high --prompt-file prompt.md',
|
|
3215
|
+
'frizzctl spawn-child --backend antigravity --model gemini-4-neon --effort high --prompt-file prompt.md',
|
|
3216
|
+
'frizzctl spawn-child --backend acp --model gemini --prompt-file prompt.md',
|
|
3217
|
+
],
|
|
3218
|
+
},
|
|
3219
|
+
models: {
|
|
3220
|
+
group: "Other threads",
|
|
3221
|
+
summary: "List available backends, ACP agents, models and effort levels for spawning threads",
|
|
3222
|
+
positional: ["backend"],
|
|
3223
|
+
examples: [
|
|
3224
|
+
"frizzctl models",
|
|
3225
|
+
"frizzctl models antigravity",
|
|
3226
|
+
"frizzctl models acp",
|
|
3227
|
+
"frizzctl models acp:cursor",
|
|
3228
|
+
"frizzctl models opencode --json",
|
|
2917
3229
|
],
|
|
2918
3230
|
},
|
|
2919
3231
|
}
|
package/web-dist/assets/{abnfDiagram-VCTEODGH-CJ9DY67I.js → abnfDiagram-VCTEODGH-BiJ4o5Ds.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-Dr2z-e4o.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-C4XfhTaE.js";import"./chunk-DU6HZSFF-D0BZQTG5.js";import"./chunk-CLGD4ZFX-DXth0YhX.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-BC8SdQcL.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-FOHPRMQF-CyTuVbu3.js";import{M as e}from"./mermaid-parser.core-Dr2z-e4o.js";export{e as createArchitectureServices};
|