frizz-server 0.15.38 → 0.15.40
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 +9948 -9877
- package/dist/dev-child.js +11512 -11129
- package/package.json +1 -1
- package/runtime/cc-worker/lib/frizz-tools.mjs +83 -22
- package/web-dist/assets/{abnfDiagram-VRR7QNED-x6wleAo1.js → abnfDiagram-VRR7QNED-D_Vj8HSN.js} +1 -1
- package/web-dist/assets/{arc-CNHqQdyw.js → arc-ksAuWvb2.js} +1 -1
- package/web-dist/assets/architecture-TIHT7OUA-D3xlkVAk.js +1 -0
- package/web-dist/assets/{architectureDiagram-ZJ3FMSHR-XY4f_0s3.js → architectureDiagram-ZJ3FMSHR-Cq8fPwdu.js} +1 -1
- package/web-dist/assets/{blockDiagram-677ZJIJ3-CI27m2T3.js → blockDiagram-677ZJIJ3-qmtS8eex.js} +1 -1
- package/web-dist/assets/{c4Diagram-LMCZKHZV-CUMQ8qis.js → c4Diagram-LMCZKHZV-Dzg5ugsq.js} +1 -1
- package/web-dist/assets/channel-HefHRv96.js +1 -0
- package/web-dist/assets/{chunk-32BRIVSS-CWSIgRkq.js → chunk-32BRIVSS-Bs6wIkMa.js} +1 -1
- package/web-dist/assets/{chunk-52WLFC77-CXW1E3Kx.js → chunk-52WLFC77-CriQ9zpT.js} +1 -1
- package/web-dist/assets/{chunk-C7G6YPKG-CO7HkGPV.js → chunk-C7G6YPKG-BFr8HG3L.js} +1 -1
- package/web-dist/assets/{chunk-EX3LRPZG-Bz5PEnY7.js → chunk-EX3LRPZG-CiApIWab.js} +1 -1
- package/web-dist/assets/{chunk-FWX5IMBZ-bkMK0qZe.js → chunk-FWX5IMBZ-1rQJYI8n.js} +2 -2
- package/web-dist/assets/{chunk-HOUHSVGY-DgpoyJsY.js → chunk-HOUHSVGY-IxzCwjif.js} +1 -1
- package/web-dist/assets/{chunk-ICXQ74PX-kq1mza50.js → chunk-ICXQ74PX-BMqW9RhH.js} +1 -1
- package/web-dist/assets/{chunk-MOJQB5TN-BV2DsS4P.js → chunk-MOJQB5TN-B8SW6Tnc.js} +1 -1
- package/web-dist/assets/{chunk-OGEWGWER-H3vKN7gk.js → chunk-OGEWGWER-c8Livqs9.js} +1 -1
- package/web-dist/assets/{chunk-PUDLZKDR-daMHzswy.js → chunk-PUDLZKDR-DWDreAoy.js} +1 -1
- package/web-dist/assets/{chunk-Q4XR5HBZ-BwmsOH7P.js → chunk-Q4XR5HBZ-00dz9AnV.js} +1 -1
- package/web-dist/assets/{chunk-RYQCIY6F-D8ei5qYa.js → chunk-RYQCIY6F-HI_1poba.js} +1 -1
- package/web-dist/assets/{chunk-V7JOEXUC-DrIe9bP_.js → chunk-V7JOEXUC-CCiQyaHA.js} +1 -1
- package/web-dist/assets/{chunk-VAUOI2AC-CvshoAK-.js → chunk-VAUOI2AC-_5XHBzhx.js} +1 -1
- package/web-dist/assets/{chunk-VR4S4FIN-Bpg84Ywd.js → chunk-VR4S4FIN-D5QU1koH.js} +1 -1
- package/web-dist/assets/{chunk-WYO6CB5R-R9HfLSXE.js → chunk-WYO6CB5R-D8GZ-3Ys.js} +1 -1
- package/web-dist/assets/{chunk-XXDRQBXY-COe_ss16.js → chunk-XXDRQBXY-DDO4NEcf.js} +1 -1
- package/web-dist/assets/{chunk-ZGVPDNZ5-B5pOLr4z.js → chunk-ZGVPDNZ5-LsIe_ubC.js} +1 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-BM-47e5X.js +1 -0
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-BM-47e5X.js +1 -0
- package/web-dist/assets/{cose-bilkent-JH36ORCC-BffqzHJy.js → cose-bilkent-JH36ORCC-BYVknNiB.js} +1 -1
- package/web-dist/assets/{cynefin-VYW2F7L2-Cyg2eosI.js → cynefin-VYW2F7L2-BYBAWLpr.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-TSTJHNR4--Ehi3oTN.js → cynefinDiagram-TSTJHNR4-Bc4gUiXE.js} +1 -1
- package/web-dist/assets/{dagre-VKFMJZFB-C7GJgpSF.js → dagre-VKFMJZFB-DTriiyhE.js} +1 -1
- package/web-dist/assets/{diagram-FQU43EPY-B1VBZmCW.js → diagram-FQU43EPY-CaBdcor4.js} +1 -1
- package/web-dist/assets/{diagram-G47NLZAW-DOOlzQoT.js → diagram-G47NLZAW-Coi6w1vB.js} +1 -1
- package/web-dist/assets/{diagram-NH7WQ7WH-DYAvSerX.js → diagram-NH7WQ7WH-Bx_IQ4p5.js} +1 -1
- package/web-dist/assets/{diagram-OA4YK3LP--bS_vMjK.js → diagram-OA4YK3LP-B6yeUej2.js} +1 -1
- package/web-dist/assets/{diagram-WEI45ONY-DIcmpinl.js → diagram-WEI45ONY-DN7HYTZA.js} +1 -1
- package/web-dist/assets/{dist-BpmNVPOD.js → dist-5eO3mbi5.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-CCIWWBDH-DNhVEIWW.js → ebnfDiagram-CCIWWBDH-Dcxp8-Es.js} +1 -1
- package/web-dist/assets/{erDiagram-Q63AITRT-Bj2l82Cv.js → erDiagram-Q63AITRT-C6QaDTWW.js} +1 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-jf2JH6Im.js +1 -0
- package/web-dist/assets/flowDiagram-23GEKE2U-szDgILDk.js +1 -0
- package/web-dist/assets/{ganttDiagram-NO4QXBWP-J6XnWEf6.js → ganttDiagram-NO4QXBWP-BbCtQgon.js} +1 -1
- package/web-dist/assets/{gitGraph-TEB2WS4Q-Bn2iyUpg.js → gitGraph-TEB2WS4Q-C9bTH9h-.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-Dlt8JcWn.js → gitGraphDiagram-IHSO6WYX-BQwUm-8G.js} +1 -1
- package/web-dist/assets/index-C1KPXfJE.js +375 -0
- package/web-dist/assets/index-MI4kNBXT.css +2 -0
- package/web-dist/assets/{info-DKCQHKI2-DDQ1BQ7N.js → info-DKCQHKI2-BBXnTHKZ.js} +1 -1
- package/web-dist/assets/{infoDiagram-FWYZ7A6U-WyZFQNas.js → infoDiagram-FWYZ7A6U-CcerVnrx.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-DykxWN2H.js → ishikawaDiagram-FXEZZL3T-fqfhpig7.js} +1 -1
- package/web-dist/assets/{journeyDiagram-5HDEW3XC-DZFFV--o.js → journeyDiagram-5HDEW3XC-H7vhTxOt.js} +1 -1
- package/web-dist/assets/{kanban-definition-HUTT4EX6-B_S6rPA-.js → kanban-definition-HUTT4EX6-C_gCH0SQ.js} +1 -1
- package/web-dist/assets/{line-BjrhB9dh.js → line-BSkVnmv4.js} +1 -1
- package/web-dist/assets/{linear-Eu7hosv5.js → linear-IyQR2_a_.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-Bbjd0FBj.js → mermaid-parser.core-BcLHj8_g.js} +3 -3
- package/web-dist/assets/{mermaid.core-M8MrvBBx.js → mermaid.core-D_HNl0YG.js} +3 -3
- package/web-dist/assets/{mindmap-definition-LN4V7U3C-ChtepNH3.js → mindmap-definition-LN4V7U3C-CIDhEaGH.js} +1 -1
- package/web-dist/assets/{packet-7NZHBO7P-DKoBXImT.js → packet-7NZHBO7P-BxMa_zUc.js} +1 -1
- package/web-dist/assets/{pegDiagram-2B236MQR-DAEo8X9w.js → pegDiagram-2B236MQR-CuIFCjKX.js} +1 -1
- package/web-dist/assets/{pie-RZYD4A2V-BFnlQdvo.js → pie-RZYD4A2V-C5qaay8P.js} +1 -1
- package/web-dist/assets/{pieDiagram-ENE6RG2P-Cz_7EaQk.js → pieDiagram-ENE6RG2P-Ci14TAr_.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-C9BhXszR.js → quadrantDiagram-ABIIQ3AL-CN9AX4U5.js} +1 -1
- package/web-dist/assets/{radar-I7S5WNFK-CQBB7-bM.js → radar-I7S5WNFK-BHnfSJqi.js} +1 -1
- package/web-dist/assets/{railroad-3IZDKUUU-BlAokJJ7.js → railroad-3IZDKUUU-PKYJz4ld.js} +1 -1
- package/web-dist/assets/railroad-abnf-AHOZXSZD-B75rRvkS.js +1 -0
- package/web-dist/assets/railroad-ebnf-EBAXGLYW--7jXMsSs.js +1 -0
- package/web-dist/assets/railroad-peg-LSFZ7HO6-rmm7Nlii.js +1 -0
- package/web-dist/assets/{railroadDiagram-RFXS5EU6-xBxaP0uj.js → railroadDiagram-RFXS5EU6-CrmptZU9.js} +1 -1
- package/web-dist/assets/{requirementDiagram-TGXJPOKE-Divuldkj.js → requirementDiagram-TGXJPOKE-CEmUmgSN.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-HTMAVEWB-CofMjV2o.js → sankeyDiagram-HTMAVEWB-xbHIwRO5.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-B2ugDeEO.js → sequenceDiagram-DBY2YBRQ-CAVYxPic.js} +1 -1
- package/web-dist/assets/{src-CIZWXdhn.js → src-BK31z8T_.js} +1 -1
- package/web-dist/assets/{stateDiagram-2N3HPSRC-BIASYu2M.js → stateDiagram-2N3HPSRC-BwRB8h6Q.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-CrNpD1N2.js +1 -0
- package/web-dist/assets/{swimlanes-5IMT3BWC-DY8vOYLR.js → swimlanes-5IMT3BWC-DGClezYn.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-Cqn2yicx.js +8 -0
- package/web-dist/assets/{timeline-definition-FHXFAJF6-DBv8rojh.js → timeline-definition-FHXFAJF6-UNR9vwd4.js} +1 -1
- package/web-dist/assets/{treeView-QDETBFTQ-BVTOVsYY.js → treeView-QDETBFTQ-BNPp7-CA.js} +1 -1
- package/web-dist/assets/{treemap-6X3UGDF4-Cl4YEFYt.js → treemap-6X3UGDF4-CR2zW59K.js} +1 -1
- package/web-dist/assets/{vennDiagram-L72KCM5P-DyyHbFip.js → vennDiagram-L72KCM5P-DK3IA1_I.js} +1 -1
- package/web-dist/assets/{wardley-OPB4EBWU-CQ8RGEiP.js → wardley-OPB4EBWU-eVUHZ6Ya.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-EHGQE667-lOvMMLld.js → wardleyDiagram-EHGQE667-B50M3rtx.js} +1 -1
- package/web-dist/assets/{xychartDiagram-FW5EYKEG-DU8wyaMa.js → xychartDiagram-FW5EYKEG-Zb8fQMOZ.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/assets/architecture-TIHT7OUA-jM6TLD43.js +0 -1
- package/web-dist/assets/channel-uU4tbAvD.js +0 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-D7mmohjF.js +0 -1
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-D7mmohjF.js +0 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-BNhew43n.js +0 -1
- package/web-dist/assets/flowDiagram-23GEKE2U-CAKD6Pxo.js +0 -1
- package/web-dist/assets/index-CI2idbKe.js +0 -375
- package/web-dist/assets/index-CplNlfCI.css +0 -2
- package/web-dist/assets/railroad-abnf-AHOZXSZD-1U6KQvVY.js +0 -1
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-CRkOqqg7.js +0 -1
- package/web-dist/assets/railroad-peg-LSFZ7HO6-Cj2FGGgU.js +0 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-COiKXUDZ.js +0 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-B-KXgsxS.js +0 -8
package/package.json
CHANGED
|
@@ -59,6 +59,8 @@ const SPAWN_THREAD = {
|
|
|
59
59
|
"root cause over twenty hours. " +
|
|
60
60
|
"Spawn only when the work genuinely cannot ride on your own card: a different repo, a different long-lived " +
|
|
61
61
|
"runtime, an effort that must outlive yours. Never spawn merely to clear your own `done` fence. " +
|
|
62
|
+
"The new thread lands on YOUR project's board unless you pass `project`: then it starts on that " +
|
|
63
|
+
"project's board, in that project's checkout — the way to hand work to another repo this Frizz serves. " +
|
|
62
64
|
"You MUST deliberately choose `model` and `effort` to match the NEW thread's task complexity — they are " +
|
|
63
65
|
"required, there is NO default. Do not reflexively pick the cheapest; a hard task on a weak model/effort " +
|
|
64
66
|
"wastes the whole thread.",
|
|
@@ -96,6 +98,13 @@ const SPAWN_THREAD = {
|
|
|
96
98
|
description: "Optional agent backend (default `claude`). If `codex`, `model` must be a codex model id.",
|
|
97
99
|
},
|
|
98
100
|
title: { type: "string", description: "Optional short title for the new thread (else derived from the prompt)." },
|
|
101
|
+
project: {
|
|
102
|
+
type: "string",
|
|
103
|
+
description:
|
|
104
|
+
"Optional: start the thread on ANOTHER project's board, in that project's checkout — its slug, as " +
|
|
105
|
+
"its board URL shows it (`/project/<slug>/…`), or any link into that board. Omitted ⇒ your own " +
|
|
106
|
+
"project. The new thread is told which project you are on, so it can `steer` results back.",
|
|
107
|
+
},
|
|
99
108
|
},
|
|
100
109
|
required: ["prompt", "model", "effort"],
|
|
101
110
|
},
|
|
@@ -565,7 +574,9 @@ const SECRET = {
|
|
|
565
574
|
inputSchema: { type: "object", properties: {} },
|
|
566
575
|
}
|
|
567
576
|
|
|
568
|
-
// STEER (2026-10-09): one thread messaging ANOTHER thread of the same project
|
|
577
|
+
// STEER (2026-10-09): one thread messaging ANOTHER thread — of the same project until 2026-10-26, of any
|
|
578
|
+
// project this Frizz serves since (maintainer: "frizz threads need the ability to steer other frizz
|
|
579
|
+
// threads regardless of project"). Claude Code's own
|
|
569
580
|
// cross-session `SendMessage` reaches a session only while its process is live, so a worker told to hand
|
|
570
581
|
// its results to a resting thread had no tool for it, and went looking for the board's `followUp` route
|
|
571
582
|
// to curl by hand — sixteen tool calls to find the route, the slug and the session id. This is that
|
|
@@ -575,10 +586,10 @@ const SECRET = {
|
|
|
575
586
|
const STEER = {
|
|
576
587
|
name: "steer",
|
|
577
588
|
description:
|
|
578
|
-
"SEND A MESSAGE TO ANOTHER THREAD on this board, running or resting, and it
|
|
579
|
-
"input. A running thread reads it at its next tool boundary; a resting thread
|
|
580
|
-
"starts a turn on it; a thread marked done is reopened. The receiver sees which
|
|
581
|
-
"can answer with this same command.\n\n" +
|
|
589
|
+
"SEND A MESSAGE TO ANOTHER THREAD, on this board or another project's, running or resting, and it " +
|
|
590
|
+
"reads it as its next input. A running thread reads it at its next tool boundary; a resting thread " +
|
|
591
|
+
"is WOKEN by it and starts a turn on it; a thread marked done is reopened. The receiver sees which " +
|
|
592
|
+
"thread sent it and can answer with this same command.\n\n" +
|
|
582
593
|
"USE IT INSTEAD OF RELAYING THROUGH THE HUMAN. Whenever another thread needs what you have, send it " +
|
|
583
594
|
"there yourself: results a thread is waiting on (\"when the audit is done, send the results to " +
|
|
584
595
|
"<thread>\"), a finding that changes another thread's work (it is chasing the bug you just fixed, it " +
|
|
@@ -594,9 +605,13 @@ const STEER = {
|
|
|
594
605
|
"thread, and it is not a way to hand off work the human did not ask for. Nothing waits on a reply " +
|
|
595
606
|
"unless your message asks for one, and you do not need to rest waiting for it: a reply wakes you " +
|
|
596
607
|
"whenever it comes, even after `done`.\n\n" +
|
|
608
|
+
"ANY PROJECT ON THIS MACHINE'S FRIZZ, not only yours. A thread's full link names its project " +
|
|
609
|
+
"(`/project/<project>/thread/<slug>`), so passing the link is enough; with a bare slug, this " +
|
|
610
|
+
"project is looked in first and then every other one, and `--project <slug>` says which when " +
|
|
611
|
+
"several have a thread of that name. A message from another project names it, and so does the " +
|
|
612
|
+
"reply command it suggests.\n\n" +
|
|
597
613
|
"NOT FOR YOUR OWN SUB-AGENTS — those are inside your session; reach them with `SendMessage` to " +
|
|
598
|
-
"their agent id. Not for your own thread,
|
|
599
|
-
"project's board.",
|
|
614
|
+
"their agent id. Not for your own thread.",
|
|
600
615
|
inputSchema: {
|
|
601
616
|
type: "object",
|
|
602
617
|
properties: {
|
|
@@ -605,7 +620,15 @@ const STEER = {
|
|
|
605
620
|
description:
|
|
606
621
|
"The thread to message: its slug (`fix-queue-focus`), or any link naming it — the " +
|
|
607
622
|
"`[title](/thread/<slug>)` link `frizzctl spawn-thread` prints, or a full board URL such as " +
|
|
608
|
-
"`http://localhost:9393/project/frizz/thread/<slug>/full
|
|
623
|
+
"`http://localhost:9393/project/frizz/thread/<slug>/full`, whose `/project/<slug>/` also " +
|
|
624
|
+
"names the thread's project.",
|
|
625
|
+
},
|
|
626
|
+
project: {
|
|
627
|
+
type: "string",
|
|
628
|
+
description:
|
|
629
|
+
"The project the thread is on, when it is not yours: its slug, as its board URL shows it " +
|
|
630
|
+
"(`/project/<slug>/…`). Needed only when a bare slug is ambiguous; a link that names a " +
|
|
631
|
+
"project already says it.",
|
|
609
632
|
},
|
|
610
633
|
message: {
|
|
611
634
|
type: "string",
|
|
@@ -845,10 +868,14 @@ const HANDLERS = {
|
|
|
845
868
|
}
|
|
846
869
|
|
|
847
870
|
// The slug out of whatever a worker has in hand for a thread: the slug itself, the `[title](/thread/<slug>)`
|
|
848
|
-
// link spawn_thread returns, or a board URL (`…/project/<p>/thread/<slug>/full`)
|
|
871
|
+
// link spawn_thread returns, or a board URL (`…/project/<p>/thread/<slug>/full`) — which also names the
|
|
872
|
+
// thread's project.
|
|
849
873
|
const THREAD_LINK = /\/thread\/([^/?#)\s]+)/
|
|
874
|
+
const PROJECT_LINK = /\/project\/([^/?#)\s]+)\/thread\//
|
|
875
|
+
// The project out of any link into a board (`…/project/<p>/…`), for `spawn-thread --project`.
|
|
876
|
+
const PROJECT_SEGMENT = /\/project\/([^/?#)\s]+)/
|
|
850
877
|
|
|
851
|
-
/** The `steer` handler: deliver a message into ANOTHER thread of this project.
|
|
878
|
+
/** The `steer` handler: deliver a message into ANOTHER thread, of this project or any other.
|
|
852
879
|
* @param {Record<string, unknown>} args @returns {Promise<string>} */
|
|
853
880
|
async function steer(args) {
|
|
854
881
|
const raw = typeof args.to === "string" ? args.to.trim() : ""
|
|
@@ -856,19 +883,28 @@ async function steer(args) {
|
|
|
856
883
|
if (!raw) throw new Error("`to` is required — the slug of the thread to message, or a link naming it")
|
|
857
884
|
if (!message) throw new Error("`message` is required and must be a non-empty string")
|
|
858
885
|
const to = decodeURIComponent(THREAD_LINK.exec(raw)?.[1] ?? raw)
|
|
886
|
+
const linked = PROJECT_LINK.exec(raw)?.[1]
|
|
887
|
+
const named = typeof args.project === "string" ? args.project.trim() : ""
|
|
888
|
+
const project = named || (linked ? decodeURIComponent(linked) : "")
|
|
889
|
+
if (named && linked && decodeURIComponent(linked) !== named) {
|
|
890
|
+
throw new Error(`\`--project ${named}\` disagrees with the link, which names project \`${decodeURIComponent(linked)}\`; pass one of them`)
|
|
891
|
+
}
|
|
859
892
|
// THE SENDER IS THE ENV'S, never the model's: the receiver is told which thread sent this, and that
|
|
860
|
-
// has to be true.
|
|
861
|
-
|
|
893
|
+
// has to be true. The call goes to OUR project, which verifies the sender and finds the target
|
|
894
|
+
// wherever it lives.
|
|
895
|
+
const result = (await callRpc("steerThread", { from: threadSlug(), to, ...(project ? { project } : {}), message }))?.result
|
|
862
896
|
if (!result?.slug) throw new Error(`steerThread returned no receipt: ${JSON.stringify(result)?.slice(0, 300)}`)
|
|
863
897
|
const how = result.delivery === "running"
|
|
864
898
|
? "It is mid-turn, so it reads this at its next tool boundary."
|
|
865
899
|
: result.delivery === "reopened"
|
|
866
900
|
? "It had been marked done; this message reopened it and started a turn."
|
|
867
901
|
: "It was resting; this message woke it and started a turn."
|
|
902
|
+
const where = result.project ? ` on the \`${result.project}\` project` : ""
|
|
903
|
+
const href = result.project ? `/project/${result.project}/thread/${result.slug}` : `/thread/${result.slug}`
|
|
868
904
|
return (
|
|
869
|
-
`Delivered to «${result.title}» (\`${result.slug}\`). ${how}\n\n` +
|
|
905
|
+
`Delivered to «${result.title}» (\`${result.slug}\`)${where}. ${how}\n\n` +
|
|
870
906
|
"Its reply, if it sends one, arrives as your next input and wakes you — do not rest waiting for it. " +
|
|
871
|
-
`Link for your handoff: [${result.title}](
|
|
907
|
+
`Link for your handoff: [${result.title}](${href})`
|
|
872
908
|
)
|
|
873
909
|
}
|
|
874
910
|
|
|
@@ -1119,8 +1155,9 @@ function rpcPath(procedure) {
|
|
|
1119
1155
|
*
|
|
1120
1156
|
* There is deliberately no tool parameter for it and no way to name another project: the id comes from
|
|
1121
1157
|
* the server's stamp, or failing that from the tree we are standing in (`<root>/.frizz/.id`, the same
|
|
1122
|
-
* file project-root.ts treats as identity).
|
|
1123
|
-
*
|
|
1158
|
+
* file project-root.ts treats as identity). A command that reaches ANOTHER project (`steer`, and
|
|
1159
|
+
* `spawn-thread --project`) still lands here, on our own, which verifies the caller and then finds the
|
|
1160
|
+
* other project itself; a model can name a target, never be somebody else.
|
|
1124
1161
|
*
|
|
1125
1162
|
* The walk-up is what makes this work for a worker spawned by a server that predates the stamp, and it
|
|
1126
1163
|
* is the honest source anyway: a worker's project is wherever its cwd is, and that cannot go stale.
|
|
@@ -1170,6 +1207,18 @@ async function spawnThread(args) {
|
|
|
1170
1207
|
if (typeof args.title === "string" && args.title.trim()) body.title = args.title.trim()
|
|
1171
1208
|
if (args.backend === "claude" || args.backend === "codex") body.backend = args.backend
|
|
1172
1209
|
|
|
1210
|
+
// ANOTHER PROJECT'S BOARD goes through OUR project's `spawnThread`, as a steer does: the server checks
|
|
1211
|
+
// that we are a real thread, finds the project, and writes the footer itself, because it knows our
|
|
1212
|
+
// project's slug and we hold only its id.
|
|
1213
|
+
const rawProject = typeof args.project === "string" ? args.project.trim() : ""
|
|
1214
|
+
if (rawProject) {
|
|
1215
|
+
const project = decodeURIComponent(PROJECT_SEGMENT.exec(rawProject)?.[1] ?? rawProject)
|
|
1216
|
+
const { prompt: _withFooter, ...rest } = body
|
|
1217
|
+
const result = (await callRpc("spawnThread", { ...rest, prompt, from: threadSlug(), project }))?.result
|
|
1218
|
+
if (typeof result?.slug !== "string" || !result.slug) throw new Error(`spawnThread returned no slug: ${JSON.stringify(result)?.slice(0, 300)}`)
|
|
1219
|
+
return spawnedReceipt(result.slug, typeof body.title === "string" ? body.title : result.slug, result.project)
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1173
1222
|
const port = serverLockPort()
|
|
1174
1223
|
const controller = new AbortController()
|
|
1175
1224
|
const timer = setTimeout(() => controller.abort(), DISPATCH_TIMEOUT_MS)
|
|
@@ -1195,13 +1244,21 @@ async function spawnThread(args) {
|
|
|
1195
1244
|
const payload = await res.json().catch(() => null)
|
|
1196
1245
|
const slug = payload?.result?.slug
|
|
1197
1246
|
if (typeof slug !== "string" || !slug) throw new Error(`dispatch response missing a slug: ${JSON.stringify(payload)?.slice(0, 300)}`)
|
|
1198
|
-
|
|
1247
|
+
return spawnedReceipt(slug, typeof body.title === "string" ? body.title : slug, undefined)
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
/** What the spawner reads back. `project` is the new thread's project slug when it is not ours.
|
|
1251
|
+
* @param {string} slug @param {string} label @param {string | undefined} project @returns {string} */
|
|
1252
|
+
function spawnedReceipt(slug, label, project) {
|
|
1253
|
+
const where = project ? ` on the \`${project}\` project's board` : " on the board"
|
|
1254
|
+
const steer = project ? `frizzctl steer ${slug} --project ${project}` : `frizzctl steer ${slug}`
|
|
1255
|
+
const href = project ? `/project/${project}/thread/${slug}` : `/thread/${slug}`
|
|
1199
1256
|
return (
|
|
1200
|
-
`Spawned a new frizz thread \`${slug}\`. It is now
|
|
1257
|
+
`Spawned a new frizz thread \`${slug}\`. It is now${where} driving independently — it reports ` +
|
|
1201
1258
|
`to the human via its own final message, so do not wait on a result from it. It knows your slug: if ` +
|
|
1202
1259
|
`its prompt asked for results back, they arrive as a \`steer\` that wakes you. You can message it ` +
|
|
1203
|
-
`the same way, with
|
|
1204
|
-
`Paste this link to let the human open it in the drawer:\n\n[${label}](
|
|
1260
|
+
`the same way, with \`${steer}\`.\n\n` +
|
|
1261
|
+
`Paste this link to let the human open it in the drawer:\n\n[${label}](${href})`
|
|
1205
1262
|
)
|
|
1206
1263
|
}
|
|
1207
1264
|
|
|
@@ -2119,18 +2176,22 @@ const CLI = {
|
|
|
2119
2176
|
},
|
|
2120
2177
|
steer: {
|
|
2121
2178
|
group: "Other threads",
|
|
2122
|
-
summary: "Send a message into another thread
|
|
2179
|
+
summary: "Send a message into another thread, in any project",
|
|
2123
2180
|
positional: ["to"],
|
|
2124
2181
|
examples: [
|
|
2125
2182
|
"frizzctl steer fix-the-resolver-cache --message-file - <<'EOF'\n" +
|
|
2126
2183
|
"The audit found the same root cause: `normalizeId` drops the scope. Details in `audits/resolver.md`.\n" +
|
|
2127
2184
|
"EOF",
|
|
2185
|
+
"frizzctl steer bump-the-sdk --project nub --message-file handoff.md",
|
|
2128
2186
|
],
|
|
2129
2187
|
},
|
|
2130
2188
|
spawn_thread: {
|
|
2131
2189
|
group: "Other threads",
|
|
2132
2190
|
summary: "Dispatch a new, separate top-level thread (the last resort)",
|
|
2133
|
-
examples: [
|
|
2191
|
+
examples: [
|
|
2192
|
+
'frizzctl spawn-thread --model opus --effort high --title "Port the relay to Bun" --prompt-file prompt.md',
|
|
2193
|
+
'frizzctl spawn-thread --project nub --model opus --effort high --title "Bump the SDK pin" --prompt-file prompt.md',
|
|
2194
|
+
],
|
|
2134
2195
|
},
|
|
2135
2196
|
}
|
|
2136
2197
|
|
package/web-dist/assets/{abnfDiagram-VRR7QNED-x6wleAo1.js → abnfDiagram-VRR7QNED-D_Vj8HSN.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-BcLHj8_g.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-BK31z8T_.js";import"./chunk-WYO6CB5R-D8GZ-3Ys.js";import"./chunk-VAUOI2AC-_5XHBzhx.js";import{n as i,r as a,t as o}from"./chunk-MOJQB5TN-B8SW6Tnc.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-5eO3mbi5.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-BcLHj8_g.js";export{e as createArchitectureServices};
|