frizz-server 0.14.0 → 0.14.1
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 +10859 -10590
- package/dist/dev-child.js +81 -42
- package/package.json +1 -1
- package/web-dist/assets/{TerminalPane-DcNJcvz9.js → TerminalPane-C0ndNP2R.js} +1 -1
- package/web-dist/assets/{abnfDiagram-VRR7QNED-BFKPkR0J.js → abnfDiagram-VRR7QNED-Cnsh1t8G.js} +1 -1
- package/web-dist/assets/architecture-TIHT7OUA-BFTL2lQD.js +1 -0
- package/web-dist/assets/{architectureDiagram-ZJ3FMSHR-BugbGvF7.js → architectureDiagram-ZJ3FMSHR-DnVeuKCI.js} +1 -1
- package/web-dist/assets/{blockDiagram-677ZJIJ3-B1drPHOm.js → blockDiagram-677ZJIJ3-DqKYXGJI.js} +1 -1
- package/web-dist/assets/{c4Diagram-LMCZKHZV-jA8etf56.js → c4Diagram-LMCZKHZV-DRNawTpl.js} +1 -1
- package/web-dist/assets/channel-Nm8jIZOi.js +1 -0
- package/web-dist/assets/{chunk-32BRIVSS-BfMUf_Yy.js → chunk-32BRIVSS-BKqSe_nC.js} +1 -1
- package/web-dist/assets/{chunk-52WLFC77-Fo52YmmC.js → chunk-52WLFC77-BCaLFglM.js} +1 -1
- package/web-dist/assets/{chunk-C7G6YPKG-CPiVGUnC.js → chunk-C7G6YPKG-vlAetigo.js} +1 -1
- package/web-dist/assets/{chunk-EX3LRPZG-DllbzsPn.js → chunk-EX3LRPZG-C1O5APJY.js} +1 -1
- package/web-dist/assets/{chunk-FWX5IMBZ-Cr7SCNOQ.js → chunk-FWX5IMBZ-DRBYKkzP.js} +2 -2
- package/web-dist/assets/{chunk-HOUHSVGY-D2qjbRMK.js → chunk-HOUHSVGY-C7BVwG9_.js} +1 -1
- package/web-dist/assets/{chunk-ICXQ74PX-Dl8ZZqX4.js → chunk-ICXQ74PX-DVwDQwtI.js} +1 -1
- package/web-dist/assets/{chunk-MOJQB5TN-C7X9x33F.js → chunk-MOJQB5TN-5DhQ9vKC.js} +1 -1
- package/web-dist/assets/{chunk-OGEWGWER-DrlPoLRT.js → chunk-OGEWGWER-Bgg5ovNG.js} +1 -1
- package/web-dist/assets/{chunk-PUDLZKDR-C1WS3qVH.js → chunk-PUDLZKDR-B-hJsSaU.js} +1 -1
- package/web-dist/assets/{chunk-Q4XR5HBZ-CNhqnN4i.js → chunk-Q4XR5HBZ-BRKTCm77.js} +1 -1
- package/web-dist/assets/{chunk-V7JOEXUC-BQsiP60Y.js → chunk-V7JOEXUC-DLg_AuLv.js} +1 -1
- package/web-dist/assets/{chunk-VAUOI2AC-DeQswo6G.js → chunk-VAUOI2AC-CRKn6Hdz.js} +1 -1
- package/web-dist/assets/{chunk-VR4S4FIN-QCzpzy3F.js → chunk-VR4S4FIN-C3tBNXjB.js} +1 -1
- package/web-dist/assets/{chunk-WYO6CB5R-DYEAXxaM.js → chunk-WYO6CB5R-LRVUOcLK.js} +1 -1
- package/web-dist/assets/{chunk-ZGVPDNZ5-BRwJsVqD.js → chunk-ZGVPDNZ5-BbjZAQf3.js} +1 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-C8nDRy2s.js +1 -0
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-C8nDRy2s.js +1 -0
- package/web-dist/assets/{cynefin-VYW2F7L2-DFY4wScy.js → cynefin-VYW2F7L2-BiFACRL6.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-TSTJHNR4-BFd6vF05.js → cynefinDiagram-TSTJHNR4-Ba2A7L8f.js} +1 -1
- package/web-dist/assets/{dagre-VKFMJZFB-BTSZ-kNz.js → dagre-VKFMJZFB-B1gwugR0.js} +1 -1
- package/web-dist/assets/{diagram-FQU43EPY-CM5L_Teo.js → diagram-FQU43EPY-D3yeDptD.js} +1 -1
- package/web-dist/assets/{diagram-G47NLZAW-DMEMjhev.js → diagram-G47NLZAW-C3ckNGcW.js} +1 -1
- package/web-dist/assets/{diagram-NH7WQ7WH-BINXDe2x.js → diagram-NH7WQ7WH-Be2tn4YY.js} +1 -1
- package/web-dist/assets/{diagram-OA4YK3LP-DhKBXS5G.js → diagram-OA4YK3LP-Dwj1ohx-.js} +1 -1
- package/web-dist/assets/{diagram-WEI45ONY-QaICPLa1.js → diagram-WEI45ONY-Dt-jAW5B.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-CCIWWBDH-DDQ6NAEt.js → ebnfDiagram-CCIWWBDH-Bz3-UuRU.js} +1 -1
- package/web-dist/assets/{erDiagram-Q63AITRT-eftnFvxT.js → erDiagram-Q63AITRT-BaCr3-Qz.js} +1 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-CD9TITDK.js +1 -0
- package/web-dist/assets/flowDiagram-23GEKE2U-Womg_Wqj.js +1 -0
- package/web-dist/assets/{ganttDiagram-NO4QXBWP-CBUUxbvO.js → ganttDiagram-NO4QXBWP-BvCR51Ob.js} +1 -1
- package/web-dist/assets/{gitGraph-TEB2WS4Q-B4j6N6bC.js → gitGraph-TEB2WS4Q-ClGknGDf.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-mrIlQ6c3.js → gitGraphDiagram-IHSO6WYX-D9a31pAE.js} +1 -1
- package/web-dist/assets/{index-BI0k4RW8.js → index-CTcjL-eO.js} +79 -79
- package/web-dist/assets/{info-DKCQHKI2-Dj4G-7Y8.js → info-DKCQHKI2-BGPJKOjY.js} +1 -1
- package/web-dist/assets/{infoDiagram-FWYZ7A6U-Baz07f6h.js → infoDiagram-FWYZ7A6U-B9toNDZt.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-C4og8CF4.js → ishikawaDiagram-FXEZZL3T-COi6cP-a.js} +1 -1
- package/web-dist/assets/{journeyDiagram-5HDEW3XC-B0WV30vH.js → journeyDiagram-5HDEW3XC-jDqNUKQG.js} +1 -1
- package/web-dist/assets/{kanban-definition-HUTT4EX6-BgDiY6B1.js → kanban-definition-HUTT4EX6-CtxeJlFi.js} +1 -1
- package/web-dist/assets/{line-D0SxxXfr.js → line-uNWy2FRa.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-CWj7pjCH.js → mermaid-parser.core-Cfuj8tio.js} +3 -3
- package/web-dist/assets/{mermaid.core-Dpi4Z-WK.js → mermaid.core-BtNCexa9.js} +3 -3
- package/web-dist/assets/{mindmap-definition-LN4V7U3C-DLmQQ7LC.js → mindmap-definition-LN4V7U3C-B2u_kZ9E.js} +1 -1
- package/web-dist/assets/{packet-7NZHBO7P-T7pVIfFz.js → packet-7NZHBO7P-DNfwFIg5.js} +1 -1
- package/web-dist/assets/{pegDiagram-2B236MQR-BvVxzZmj.js → pegDiagram-2B236MQR-Cm9NTz0P.js} +1 -1
- package/web-dist/assets/{pie-RZYD4A2V-BGz-hjIz.js → pie-RZYD4A2V-CMjAC3_C.js} +1 -1
- package/web-dist/assets/{pieDiagram-ENE6RG2P-pdOHyNTd.js → pieDiagram-ENE6RG2P-DZegJin2.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-fLy3coW3.js → quadrantDiagram-ABIIQ3AL-Cr1P0TiT.js} +1 -1
- package/web-dist/assets/{radar-I7S5WNFK-C-VKX4OE.js → radar-I7S5WNFK-D_BiHAza.js} +1 -1
- package/web-dist/assets/{railroad-3IZDKUUU-BwC-mtji.js → railroad-3IZDKUUU-Kx4om6Pi.js} +1 -1
- package/web-dist/assets/railroad-abnf-AHOZXSZD-pLt2-q5a.js +1 -0
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-BvNkqSim.js +1 -0
- package/web-dist/assets/railroad-peg-LSFZ7HO6-g9R2pEue.js +1 -0
- package/web-dist/assets/{railroadDiagram-RFXS5EU6-BxPp9neb.js → railroadDiagram-RFXS5EU6-CGiAkwN0.js} +1 -1
- package/web-dist/assets/{requirementDiagram-TGXJPOKE-P_BvOjKp.js → requirementDiagram-TGXJPOKE-Uh5FVpIq.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-HTMAVEWB-DUv1nZCv.js → sankeyDiagram-HTMAVEWB-CMBZWUwb.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-DWNx793M.js → sequenceDiagram-DBY2YBRQ-CL7uvgun.js} +1 -1
- package/web-dist/assets/{stateDiagram-2N3HPSRC-CaOUtkvy.js → stateDiagram-2N3HPSRC-CSU2s89c.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-BjWfwAZ4.js +1 -0
- package/web-dist/assets/{swimlanes-5IMT3BWC-D764GMah.js → swimlanes-5IMT3BWC-sfLI2FY3.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-B5co78bI.js +8 -0
- package/web-dist/assets/{timeline-definition-FHXFAJF6-DeKz_jJG.js → timeline-definition-FHXFAJF6-Dl3Dx33l.js} +1 -1
- package/web-dist/assets/{treeView-QDETBFTQ-D3UnDOk3.js → treeView-QDETBFTQ-C6i-QhBd.js} +1 -1
- package/web-dist/assets/{treemap-6X3UGDF4-VItEAzU3.js → treemap-6X3UGDF4-kjzleK2t.js} +1 -1
- package/web-dist/assets/{vennDiagram-L72KCM5P-DuzNjZFZ.js → vennDiagram-L72KCM5P-BVYuCdzD.js} +1 -1
- package/web-dist/assets/{wardley-OPB4EBWU-B1uIoPVb.js → wardley-OPB4EBWU-Dd-gYK7z.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-EHGQE667-H60TjU5y.js → wardleyDiagram-EHGQE667-BkLQ_w49.js} +1 -1
- package/web-dist/assets/{xychartDiagram-FW5EYKEG-BqTqYEwv.js → xychartDiagram-FW5EYKEG-Cm4pNjto.js} +1 -1
- package/web-dist/index.html +1 -1
- package/web-dist/assets/architecture-TIHT7OUA-3cEHc0mh.js +0 -1
- package/web-dist/assets/channel-BYQQkw21.js +0 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-BgM58S9B.js +0 -1
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-BgM58S9B.js +0 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-KZNoVoEu.js +0 -1
- package/web-dist/assets/flowDiagram-23GEKE2U-m4sDfmpP.js +0 -1
- package/web-dist/assets/railroad-abnf-AHOZXSZD-CNsCN0k6.js +0 -1
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-Bjabtkan.js +0 -1
- package/web-dist/assets/railroad-peg-LSFZ7HO6-DjPlt8Lc.js +0 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-CbgDxwEv.js +0 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-QPzvJba6.js +0 -8
package/dist/dev-child.js
CHANGED
|
@@ -31822,6 +31822,7 @@ var init_codex_execution_health = __esm({
|
|
|
31822
31822
|
|
|
31823
31823
|
// packages/server/src/backend/codex-app-server.ts
|
|
31824
31824
|
import { createHash as createHash10, randomUUID as randomUUID11 } from "node:crypto";
|
|
31825
|
+
import { existsSync as existsSync8 } from "node:fs";
|
|
31825
31826
|
import { StringDecoder as StringDecoder3 } from "node:string_decoder";
|
|
31826
31827
|
function selectCodexHostKind(flagValue, platform3, hasSpawn) {
|
|
31827
31828
|
if (hasSpawn) return "direct";
|
|
@@ -32486,11 +32487,11 @@ var init_codex_app_server = __esm({
|
|
|
32486
32487
|
init_logging();
|
|
32487
32488
|
CODEX_APP_SERVER_PROVIDER = "codex-app-server";
|
|
32488
32489
|
CODEX_NATIVE_LISTEN_FLAG = "FRIZZ_CODEX_NATIVE_LISTEN";
|
|
32489
|
-
CODEX_APP_SERVER_SUPPORTED_VERSION = "0.155.
|
|
32490
|
+
CODEX_APP_SERVER_SUPPORTED_VERSION = "0.155.1";
|
|
32490
32491
|
CODEX_APP_SERVER_PROTOCOL_REVISION = Object.freeze({
|
|
32491
32492
|
packageVersion: CODEX_APP_SERVER_SUPPORTED_VERSION,
|
|
32492
|
-
sourceTag: "rust-v0.155.
|
|
32493
|
-
sourceCommit: "
|
|
32493
|
+
sourceTag: "rust-v0.155.1",
|
|
32494
|
+
sourceCommit: "be2951ea34f0d295ed0becf97079f92fa5f6950e"
|
|
32494
32495
|
});
|
|
32495
32496
|
PROTOCOL_FINGERPRINT = [
|
|
32496
32497
|
CODEX_APP_SERVER_PROTOCOL_REVISION.sourceTag,
|
|
@@ -33194,11 +33195,13 @@ var init_codex_app_server = __esm({
|
|
|
33194
33195
|
}
|
|
33195
33196
|
if (binding.state === "active" && binding.connection_epoch === this.connectionEpoch) return bindingFromRow(binding);
|
|
33196
33197
|
if (binding.ephemeral === 1) throw new Error("disposable Codex app-server session is detached");
|
|
33198
|
+
const cwdOverride = this.resumeCwdOverride(binding);
|
|
33197
33199
|
const rawResponse = await connection.request("thread/resume", {
|
|
33198
33200
|
threadId: binding.codex_thread_id,
|
|
33199
33201
|
excludeTurns: true,
|
|
33200
33202
|
approvalsReviewer: "user",
|
|
33201
33203
|
...this.resumeSandboxOverride(binding),
|
|
33204
|
+
...cwdOverride,
|
|
33202
33205
|
// A resume by an app-server that ALREADY holds this thread keeps the MCP child it started
|
|
33203
33206
|
// with, so this changes nothing there. It matters on a resume by a FRESH app-server — the
|
|
33204
33207
|
// one after a daemon death or a frizz restart — which is exactly when the thread would
|
|
@@ -33210,6 +33213,7 @@ var init_codex_app_server = __esm({
|
|
|
33210
33213
|
throw new Error("Codex app-server resumed a different or disposable thread");
|
|
33211
33214
|
}
|
|
33212
33215
|
this.updateResumedBinding(binding, response.thread.sessionId, effectiveResumeSandbox(rawResponse));
|
|
33216
|
+
this.recordResumedCwd(binding, cwdOverride);
|
|
33213
33217
|
return bindingFromRow(this.bindingForScope(threadSlug, sessionId));
|
|
33214
33218
|
} finally {
|
|
33215
33219
|
releaseOperation();
|
|
@@ -34024,14 +34028,26 @@ var init_codex_app_server = __esm({
|
|
|
34024
34028
|
continue;
|
|
34025
34029
|
}
|
|
34026
34030
|
try {
|
|
34031
|
+
const cwdOverride = this.resumeCwdOverride(row);
|
|
34027
34032
|
const rawResponse = await connection.request("thread/resume", {
|
|
34028
34033
|
threadId: row.codex_thread_id,
|
|
34029
34034
|
excludeTurns: true,
|
|
34030
34035
|
approvalsReviewer: "user",
|
|
34031
|
-
...this.resumeSandboxOverride(row)
|
|
34036
|
+
...this.resumeSandboxOverride(row),
|
|
34037
|
+
...cwdOverride,
|
|
34038
|
+
// The per-thread frizz MCP mount, exactly as resumeOwnedSession sends it. THIS is the resume a
|
|
34039
|
+
// Frizz restart issues for every thread that was mid-turn when the app-server died, and it
|
|
34040
|
+
// was the one resume that did not carry it (2026-09-18, hypergres/this-is-a-fresh-project-i:
|
|
34041
|
+
// the 0.13.9 restart replaced the daemon, this path resumed the thread with no mount, and the
|
|
34042
|
+
// worker's next registry probe listed no `mcp__frizz__*` at all — "The restart removed
|
|
34043
|
+
// Frizz's question-registration tool"). The argv mount is not a fallback here: a thread
|
|
34044
|
+
// resumed onto a FRESH app-server gets its MCP children from this call, so without the
|
|
34045
|
+
// override it keeps neither its identity nor, in practice, the tools.
|
|
34046
|
+
...this.threadConfig(row.thread_slug)
|
|
34032
34047
|
});
|
|
34033
34048
|
const response = ThreadResponse.parse(rawResponse);
|
|
34034
34049
|
if (response.thread.id !== row.codex_thread_id || response.thread.ephemeral) throw new Error("resume ownership mismatch");
|
|
34050
|
+
this.recordResumedCwd(row, cwdOverride);
|
|
34035
34051
|
const interruptedTurn = row.current_turn_id;
|
|
34036
34052
|
if (interruptedTurn && row.capability_revision === this.capabilityRevision && resumedThreadHasLiveTurn(rawResponse)) {
|
|
34037
34053
|
this.scope.prepare(`
|
|
@@ -34197,6 +34213,29 @@ var init_codex_app_server = __esm({
|
|
|
34197
34213
|
const intent = (isCodexSandboxMode(row.intended_sandbox) ? row.intended_sandbox : void 0) ?? this.options.sandboxFor?.(row.thread_slug, row.frizz_session_id) ?? CODEX_DEFAULT_SANDBOX;
|
|
34198
34214
|
return { sandbox: intent, approvalPolicy: CODEX_APPROVAL_POLICY };
|
|
34199
34215
|
}
|
|
34216
|
+
/**
|
|
34217
|
+
* The `cwd` to attach to a `thread/resume` — and only when the recorded one is GONE.
|
|
34218
|
+
*
|
|
34219
|
+
* A thread's cwd is fixed at thread/start and every resume reads it back from the rollout. A project
|
|
34220
|
+
* directory rename (3baa6371 reopens the project at its new path) leaves every existing codex thread
|
|
34221
|
+
* recorded at a path that no longer exists, and codex does not merely fail the thread's next command:
|
|
34222
|
+
* it spawns NO stdio MCP child for the thread at all, so the worker's registry lists no
|
|
34223
|
+
* `mcp__frizz__*` and it cannot ask, sign off or name itself. Measured 2026-09-18 with
|
|
34224
|
+
* `_live_codex_resume_mcp.mts` (`STALE_CWD=1`: no child spawned, the model answers NOTOOL) after
|
|
34225
|
+
* hypergres → porg took `this-is-a-fresh-project-i` down exactly that way. `thread/resume` takes a
|
|
34226
|
+
* `cwd` override, so a resume whose recorded cwd is missing retargets the thread at the project's
|
|
34227
|
+
* CURRENT directory — the only path a frizz worker was ever dispatched into — and the binding is
|
|
34228
|
+
* re-recorded on success (recordResumedCwd). A cwd that still exists is left alone: an adopted
|
|
34229
|
+
* external rollout may legitimately live somewhere else.
|
|
34230
|
+
*/
|
|
34231
|
+
resumeCwdOverride(row) {
|
|
34232
|
+
if (existsSync8(row.cwd)) return {};
|
|
34233
|
+
return { cwd: this.options.projectDir };
|
|
34234
|
+
}
|
|
34235
|
+
recordResumedCwd(row, override) {
|
|
34236
|
+
if (!override.cwd) return;
|
|
34237
|
+
this.scope.prepare("UPDATE codex_app_server_session SET cwd = ?, updated_at = ? WHERE project_id = @project_id AND frizz_session_id = ?").run(override.cwd, this.now().toISOString(), row.frizz_session_id);
|
|
34238
|
+
}
|
|
34200
34239
|
/**
|
|
34201
34240
|
* Change a LIVE thread's sandbox, eagerly, without waiting for a resume.
|
|
34202
34241
|
*
|
|
@@ -35251,7 +35290,7 @@ var init_local_path = __esm({
|
|
|
35251
35290
|
|
|
35252
35291
|
// packages/server/src/local-file.ts
|
|
35253
35292
|
import { spawn as spawn5 } from "node:child_process";
|
|
35254
|
-
import { existsSync as
|
|
35293
|
+
import { existsSync as existsSync9, readFileSync as readFileSync18, realpathSync as realpathSync6, statSync as statSync13 } from "node:fs";
|
|
35255
35294
|
import { homedir as homedir11 } from "node:os";
|
|
35256
35295
|
import { dirname as dirname10, isAbsolute as isAbsolute4, join as join26, resolve as resolve5, sep as sep2 } from "node:path";
|
|
35257
35296
|
function isUnder(real, root) {
|
|
@@ -35354,7 +35393,7 @@ function localFileOpenCommand(path3, selected, options = {}) {
|
|
|
35354
35393
|
if (selected === "finder") return { command: "explorer.exe", args: [`/select,${path3}`] };
|
|
35355
35394
|
const editor = WINDOWS_EDITOR_EXE[selected];
|
|
35356
35395
|
const env = options.env ?? process.env;
|
|
35357
|
-
const exists = options.exists ??
|
|
35396
|
+
const exists = options.exists ?? existsSync9;
|
|
35358
35397
|
const localAppData = env.LOCALAPPDATA;
|
|
35359
35398
|
if (localAppData) {
|
|
35360
35399
|
const exe = join26(localAppData, ...editor.exe);
|
|
@@ -35716,17 +35755,17 @@ var init_project_mcp_servers = __esm({
|
|
|
35716
35755
|
});
|
|
35717
35756
|
|
|
35718
35757
|
// packages/server/src/worker-plugin-dir.ts
|
|
35719
|
-
import { existsSync as
|
|
35758
|
+
import { existsSync as existsSync10 } from "node:fs";
|
|
35720
35759
|
import { dirname as dirname12, join as join29 } from "node:path";
|
|
35721
35760
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
35722
35761
|
function resolveWorkerPluginDir(moduleUrl = import.meta.url, env = process.env) {
|
|
35723
35762
|
const override = env.FRIZZ_WORKER_PLUGIN_DIR;
|
|
35724
|
-
if (override &&
|
|
35763
|
+
if (override && existsSync10(join29(override, ".claude-plugin", "plugin.json")))
|
|
35725
35764
|
return override;
|
|
35726
35765
|
let current = dirname12(fileURLToPath3(moduleUrl));
|
|
35727
35766
|
for (; ; ) {
|
|
35728
35767
|
const candidate = join29(current, "cc-worker");
|
|
35729
|
-
if (
|
|
35768
|
+
if (existsSync10(join29(candidate, ".claude-plugin", "plugin.json"))) return candidate;
|
|
35730
35769
|
const parent = dirname12(current);
|
|
35731
35770
|
if (parent === current) return void 0;
|
|
35732
35771
|
current = parent;
|
|
@@ -37699,7 +37738,7 @@ var init_claude_agent_broker_bridge = __esm({
|
|
|
37699
37738
|
});
|
|
37700
37739
|
|
|
37701
37740
|
// packages/server/src/dispatch.ts
|
|
37702
|
-
import { closeSync as closeSync12, constants as constants2, existsSync as
|
|
37741
|
+
import { closeSync as closeSync12, constants as constants2, existsSync as existsSync11, fstatSync as fstatSync2, lstatSync as lstatSync3, openSync as openSync13, readFileSync as readFileSync20, realpathSync as realpathSync8, statSync as statSync15, writeFileSync as writeFileSync10, mkdirSync as mkdirSync13, rmSync as rmSync9 } from "node:fs";
|
|
37703
37742
|
import { basename as basename6, join as join31, dirname as dirname13 } from "node:path";
|
|
37704
37743
|
import { createHash as createHash11, randomUUID as randomUUID13 } from "node:crypto";
|
|
37705
37744
|
function fallbackTitle(prompt) {
|
|
@@ -37719,7 +37758,7 @@ function fallbackTitle(prompt) {
|
|
|
37719
37758
|
}
|
|
37720
37759
|
function resolveSlug(frizzDir, base, taken) {
|
|
37721
37760
|
base = ThreadSlug.parse(base);
|
|
37722
|
-
const isTaken = (slug) =>
|
|
37761
|
+
const isTaken = (slug) => existsSync11(join31(frizzDir, `${slug}.md`)) || (taken?.(slug) ?? false);
|
|
37723
37762
|
if (!isTaken(base)) return base;
|
|
37724
37763
|
for (let n = 2; ; n++) {
|
|
37725
37764
|
const suffix = `-${n}`;
|
|
@@ -37816,7 +37855,7 @@ function monitorScriptsDir() {
|
|
|
37816
37855
|
const plugin = workerPluginDir();
|
|
37817
37856
|
if (!plugin) return void 0;
|
|
37818
37857
|
const dir = join31(plugin, "skills", "gh", "scripts");
|
|
37819
|
-
return
|
|
37858
|
+
return existsSync11(join31(dir, "ci-watch.mjs")) ? dir : void 0;
|
|
37820
37859
|
}
|
|
37821
37860
|
function codexScratchpadHookConfig(hookScript, sessionId) {
|
|
37822
37861
|
if (!hookScript || !sessionId) return {};
|
|
@@ -37915,7 +37954,7 @@ function resolveFrizzMcp(target, moduleUrl = import.meta.url, env = process.env,
|
|
|
37915
37954
|
const pluginDir = resolveWorkerPluginDir(moduleUrl, env);
|
|
37916
37955
|
if (!pluginDir) return void 0;
|
|
37917
37956
|
const scriptPath = join31(pluginDir, "bin", FRIZZ_MCP.script);
|
|
37918
|
-
if (!
|
|
37957
|
+
if (!existsSync11(scriptPath)) return void 0;
|
|
37919
37958
|
return {
|
|
37920
37959
|
scriptPath,
|
|
37921
37960
|
stateDir,
|
|
@@ -42368,7 +42407,7 @@ var init_claude = __esm({
|
|
|
42368
42407
|
});
|
|
42369
42408
|
|
|
42370
42409
|
// packages/server/src/backend/acp-transcript.ts
|
|
42371
|
-
import { appendFileSync as appendFileSync3, existsSync as
|
|
42410
|
+
import { appendFileSync as appendFileSync3, existsSync as existsSync13, mkdirSync as mkdirSync14, readFileSync as readFileSync21 } from "node:fs";
|
|
42372
42411
|
import { dirname as dirname15, join as join34 } from "node:path";
|
|
42373
42412
|
function acpTranscriptPath(stateDir, sessionId) {
|
|
42374
42413
|
return join34(stateDir, ACP_TRANSCRIPT_DIR, `${sessionId}.jsonl`);
|
|
@@ -42573,7 +42612,7 @@ var init_acp_transcript = __esm({
|
|
|
42573
42612
|
constructor(path3) {
|
|
42574
42613
|
this.path = path3;
|
|
42575
42614
|
mkdirSync14(dirname15(path3), { recursive: true });
|
|
42576
|
-
if (!
|
|
42615
|
+
if (!existsSync13(path3)) appendFileSync3(path3, "");
|
|
42577
42616
|
}
|
|
42578
42617
|
append(record) {
|
|
42579
42618
|
appendFileSync3(this.path, JSON.stringify(record) + "\n");
|
|
@@ -47500,7 +47539,7 @@ var init_server = __esm({
|
|
|
47500
47539
|
});
|
|
47501
47540
|
|
|
47502
47541
|
// packages/server/src/repair.ts
|
|
47503
|
-
import { existsSync as
|
|
47542
|
+
import { existsSync as existsSync14, readFileSync as readFileSync23, writeFileSync as writeFileSync11 } from "node:fs";
|
|
47504
47543
|
import { basename as basename7, dirname as dirname17, resolve as resolve8 } from "node:path";
|
|
47505
47544
|
function quoteValue(v) {
|
|
47506
47545
|
if (/^[\w./#:+-]+$/.test(v)) return v;
|
|
@@ -47515,7 +47554,7 @@ function repairThreadFile(frizzDir, file) {
|
|
|
47515
47554
|
const abs = resolve8(root, file);
|
|
47516
47555
|
if (dirname17(abs) !== root) throw new RepairError(`refusing to repair "${file}": not directly under .frizz/`);
|
|
47517
47556
|
if (!abs.endsWith(".md")) throw new RepairError(`refusing to repair "${file}": not a .md thread file`);
|
|
47518
|
-
if (!
|
|
47557
|
+
if (!existsSync14(abs)) throw new RepairError(`no thread file to repair: ${basename7(abs)}`);
|
|
47519
47558
|
const content = readFileSync23(abs, "utf8");
|
|
47520
47559
|
const firstLine2 = content.replace(/^/, "").split(/\r?\n/).find((l) => l.trim() !== "");
|
|
47521
47560
|
if (firstLine2?.trim() === "---") {
|
|
@@ -47873,7 +47912,7 @@ var init_bash_background = __esm({
|
|
|
47873
47912
|
});
|
|
47874
47913
|
|
|
47875
47914
|
// packages/server/src/transcript.ts
|
|
47876
|
-
import { closeSync as closeSync13, existsSync as
|
|
47915
|
+
import { closeSync as closeSync13, existsSync as existsSync15, fstatSync as fstatSync3, mkdirSync as mkdirSync16, openSync as openSync14, readdirSync as readdirSync9, readFileSync as readFileSync25, readSync as readSync7, renameSync as renameSync9, statSync as statSync17, unlinkSync as unlinkSync5, writeFileSync as writeFileSync12 } from "node:fs";
|
|
47877
47916
|
import { createHash as createHash13 } from "node:crypto";
|
|
47878
47917
|
import { StringDecoder as StringDecoder5 } from "node:string_decoder";
|
|
47879
47918
|
import { join as join38 } from "node:path";
|
|
@@ -48495,7 +48534,7 @@ function persistBase64Image(mediaType, data, idKey) {
|
|
|
48495
48534
|
const name = createHash13("sha256").update(idKey).digest("hex").slice(0, 32);
|
|
48496
48535
|
const path3 = join38(SCREENSHOT_CACHE_DIR, `${name}.${ext}`);
|
|
48497
48536
|
try {
|
|
48498
|
-
if (
|
|
48537
|
+
if (existsSync15(path3)) return path3;
|
|
48499
48538
|
if (data.length > SCREENSHOT_MAX_BASE64) return void 0;
|
|
48500
48539
|
const buf = Buffer.from(data, "base64");
|
|
48501
48540
|
if (buf.length === 0 || !looksLikeImage(buf, ext)) return void 0;
|
|
@@ -48516,7 +48555,7 @@ function persistSentFile(srcPath, idKey) {
|
|
|
48516
48555
|
try {
|
|
48517
48556
|
const name = createHash13("sha256").update(idKey).digest("hex").slice(0, 32);
|
|
48518
48557
|
const dest = join38(SCREENSHOT_CACHE_DIR, `${name}.${outExt}`);
|
|
48519
|
-
if (
|
|
48558
|
+
if (existsSync15(dest)) return dest;
|
|
48520
48559
|
const size = statSync17(srcPath).size;
|
|
48521
48560
|
if (size === 0 || size > SENT_IMAGE_MAX_BYTES) return void 0;
|
|
48522
48561
|
const buf = readFileSync25(srcPath);
|
|
@@ -50057,7 +50096,7 @@ function sourceForThread(project, storage, slug, backendFor) {
|
|
|
50057
50096
|
}
|
|
50058
50097
|
if (!FOREIGN_SESSION_ID_RE.test(slug)) return void 0;
|
|
50059
50098
|
const claudePath = resolveTranscriptPath(project, slug);
|
|
50060
|
-
if (
|
|
50099
|
+
if (existsSync15(claudePath)) {
|
|
50061
50100
|
return { slug, sessionId: slug, nativeId: slug, backend: "claude", runtimeGeneration: 0, path: claudePath };
|
|
50062
50101
|
}
|
|
50063
50102
|
const rollout = (backendFor?.("codex") ?? defaultCodexBackend()).transcriptPath(slug);
|
|
@@ -51195,7 +51234,7 @@ import { readFileSync as readFileSync26, statSync as statSync19 } from "node:fs"
|
|
|
51195
51234
|
import { join as join39, resolve as resolve9 } from "node:path";
|
|
51196
51235
|
import { randomUUID as randomUUID16 } from "node:crypto";
|
|
51197
51236
|
import { basename as basename9, dirname as dirname18 } from "node:path";
|
|
51198
|
-
import { existsSync as
|
|
51237
|
+
import { existsSync as existsSync16, mkdirSync as mkdirSync17, rmSync as rmSync10, writeFileSync as writeFileSync13 } from "node:fs";
|
|
51199
51238
|
import { homedir as homedir17 } from "node:os";
|
|
51200
51239
|
function validateGithubDispatchProfile(input) {
|
|
51201
51240
|
if (input.backend === "acp") return;
|
|
@@ -53497,7 +53536,7 @@ Say which way you went and why in your write-up, so the human can course-correct
|
|
|
53497
53536
|
}
|
|
53498
53537
|
const updated = clearProjectIcon(input.id);
|
|
53499
53538
|
if (!updated) throw new Error("No such project.");
|
|
53500
|
-
return projectCard(updated, !
|
|
53539
|
+
return projectCard(updated, !existsSync16(updated.path));
|
|
53501
53540
|
}
|
|
53502
53541
|
}),
|
|
53503
53542
|
/**
|
|
@@ -53538,7 +53577,7 @@ Say which way you went and why in your write-up, so the human can course-correct
|
|
|
53538
53577
|
}
|
|
53539
53578
|
const updated = renameProject(entry.id, { name: name === basename9(path3) ? null : name, slug: name });
|
|
53540
53579
|
if (!updated) throw new Error("No such project.");
|
|
53541
|
-
return projectCard(updated, !
|
|
53580
|
+
return projectCard(updated, !existsSync16(updated.path));
|
|
53542
53581
|
}
|
|
53543
53582
|
}),
|
|
53544
53583
|
/**
|
|
@@ -55962,12 +56001,12 @@ var init_boot_progress = __esm({
|
|
|
55962
56001
|
});
|
|
55963
56002
|
|
|
55964
56003
|
// packages/server/src/runtime-lease.ts
|
|
55965
|
-
import { existsSync as
|
|
56004
|
+
import { existsSync as existsSync17, mkdirSync as mkdirSync20, readdirSync as readdirSync12, readFileSync as readFileSync31, unlinkSync as unlinkSync6, writeFileSync as writeFileSync16 } from "node:fs";
|
|
55966
56005
|
import { dirname as dirname22, join as join44 } from "node:path";
|
|
55967
56006
|
function runtimeVersionDir(bin) {
|
|
55968
56007
|
let dir = dirname22(bin);
|
|
55969
56008
|
for (let step = 0; step < MAX_ASCENT; step++) {
|
|
55970
|
-
if (
|
|
56009
|
+
if (existsSync17(join44(dir, PROVISIONED_MARKER))) return dir;
|
|
55971
56010
|
const parent = dirname22(dir);
|
|
55972
56011
|
if (parent === dir) return void 0;
|
|
55973
56012
|
dir = parent;
|
|
@@ -56047,7 +56086,7 @@ import { createHash as createHash15 } from "node:crypto";
|
|
|
56047
56086
|
import {
|
|
56048
56087
|
chmodSync as chmodSync2,
|
|
56049
56088
|
closeSync as closeSync16,
|
|
56050
|
-
existsSync as
|
|
56089
|
+
existsSync as existsSync18,
|
|
56051
56090
|
mkdirSync as mkdirSync21,
|
|
56052
56091
|
openSync as openSync17,
|
|
56053
56092
|
readFileSync as readFileSync32,
|
|
@@ -56091,7 +56130,7 @@ function provisionedBinary(backend, root, label) {
|
|
|
56091
56130
|
}
|
|
56092
56131
|
if (typeof marker.binary !== "string" || marker.label !== label) return void 0;
|
|
56093
56132
|
const bin = join45(dir, marker.binary);
|
|
56094
|
-
return
|
|
56133
|
+
return existsSync18(bin) ? bin : void 0;
|
|
56095
56134
|
}
|
|
56096
56135
|
function octal(buffer, offset, length) {
|
|
56097
56136
|
const text2 = buffer.toString("latin1", offset, offset + length).replace(/\0.*$/su, "").trim();
|
|
@@ -56113,7 +56152,7 @@ function safeEntryPath(dest, name) {
|
|
|
56113
56152
|
function locateBinary(dir, backend, binary) {
|
|
56114
56153
|
if (backend === "claude") {
|
|
56115
56154
|
const direct = join45(dir, binary);
|
|
56116
|
-
return
|
|
56155
|
+
return existsSync18(direct) ? direct : void 0;
|
|
56117
56156
|
}
|
|
56118
56157
|
const vendor = join45(dir, "vendor");
|
|
56119
56158
|
let triples;
|
|
@@ -56124,7 +56163,7 @@ function locateBinary(dir, backend, binary) {
|
|
|
56124
56163
|
}
|
|
56125
56164
|
for (const triple of triples) {
|
|
56126
56165
|
const candidate = join45(vendor, triple, "bin", binary);
|
|
56127
|
-
if (
|
|
56166
|
+
if (existsSync18(candidate)) return candidate;
|
|
56128
56167
|
}
|
|
56129
56168
|
return void 0;
|
|
56130
56169
|
}
|
|
@@ -56197,7 +56236,7 @@ async function provisionRuntime(backend, options) {
|
|
|
56197
56236
|
rename2(partial, finalDir);
|
|
56198
56237
|
break;
|
|
56199
56238
|
} catch (err) {
|
|
56200
|
-
if (attempt >= RENAME_ATTEMPTS || !TRANSIENT_HANDLE_CODES.has(errorCode4(err) ?? "") ||
|
|
56239
|
+
if (attempt >= RENAME_ATTEMPTS || !TRANSIENT_HANDLE_CODES.has(errorCode4(err) ?? "") || existsSync18(finalDir)) throw err;
|
|
56201
56240
|
await new Promise((resolve12) => setTimeout(resolve12, options.retryDelayMs ?? RENAME_RETRY_DELAY_MS));
|
|
56202
56241
|
}
|
|
56203
56242
|
}
|
|
@@ -56319,8 +56358,8 @@ var init_runtimes = __esm({
|
|
|
56319
56358
|
init_codex_app_server();
|
|
56320
56359
|
init_frizz_paths();
|
|
56321
56360
|
init_runtime_lease();
|
|
56322
|
-
CLAUDE_AGENT_SDK_VERSION = "0.3.
|
|
56323
|
-
CLAUDE_CODE_VERSION = "2.1.
|
|
56361
|
+
CLAUDE_AGENT_SDK_VERSION = "0.3.277";
|
|
56362
|
+
CLAUDE_CODE_VERSION = "2.1.277";
|
|
56324
56363
|
CODEX_VERSION = CODEX_APP_SERVER_SUPPORTED_VERSION;
|
|
56325
56364
|
RUNTIMES_MODE_ENV = "FRIZZ_RUNTIMES";
|
|
56326
56365
|
RUNTIMES_DIR_ENV = "FRIZZ_RUNTIMES_DIR";
|
|
@@ -56998,7 +57037,7 @@ var init_legacy_project_db = __esm({
|
|
|
56998
57037
|
});
|
|
56999
57038
|
|
|
57000
57039
|
// packages/server/src/frizz-db.ts
|
|
57001
|
-
import { existsSync as
|
|
57040
|
+
import { existsSync as existsSync19, mkdirSync as mkdirSync22, readdirSync as readdirSync14, renameSync as renameSync12, statSync as statSync25 } from "node:fs";
|
|
57002
57041
|
import { basename as basename13, dirname as dirname24, join as join46 } from "node:path";
|
|
57003
57042
|
function frizzDatabaseLocation(options) {
|
|
57004
57043
|
if (options.stateDir !== void 0) {
|
|
@@ -57083,7 +57122,7 @@ function openFrizzDatabase(options = {}) {
|
|
|
57083
57122
|
};
|
|
57084
57123
|
}
|
|
57085
57124
|
function projectIdsWithFile(projectsDir, file) {
|
|
57086
|
-
if (!
|
|
57125
|
+
if (!existsSync19(projectsDir)) return [];
|
|
57087
57126
|
return readdirSync14(projectsDir).filter((name) => {
|
|
57088
57127
|
try {
|
|
57089
57128
|
return statSync25(join46(projectsDir, name, file)).isFile();
|
|
@@ -57096,7 +57135,7 @@ function legacyProjectIds(projectsDir) {
|
|
|
57096
57135
|
return projectIdsWithFile(projectsDir, "ui.db");
|
|
57097
57136
|
}
|
|
57098
57137
|
function retiredLegacyProjectIds(projectsDir) {
|
|
57099
|
-
return projectIdsWithFile(projectsDir, "ui.db.imported").filter((id) => !
|
|
57138
|
+
return projectIdsWithFile(projectsDir, "ui.db.imported").filter((id) => !existsSync19(join46(projectsDir, id, "ui.db")));
|
|
57100
57139
|
}
|
|
57101
57140
|
function tableColumns(db, schema, table) {
|
|
57102
57141
|
return db.prepare(`PRAGMA ${schema}.table_info(${table})`).all().map((c) => c.name);
|
|
@@ -57301,7 +57340,7 @@ __export(index_exports, {
|
|
|
57301
57340
|
unknownProjectPage: () => unknownProjectPage
|
|
57302
57341
|
});
|
|
57303
57342
|
import { createServer } from "node:http";
|
|
57304
|
-
import { readFileSync as readFileSync33, existsSync as
|
|
57343
|
+
import { readFileSync as readFileSync33, existsSync as existsSync20, statSync as statSync26 } from "node:fs";
|
|
57305
57344
|
import { dirname as dirname26, join as join47, resolve as resolve11, extname as extname4, posix as posix2, sep as sep6 } from "node:path";
|
|
57306
57345
|
function readServerAddressHolder(path3) {
|
|
57307
57346
|
try {
|
|
@@ -57432,7 +57471,7 @@ function serveStatic(distDir, req, res) {
|
|
|
57432
57471
|
const rel = posix2.normalize((req.url ?? "/").split("?")[0].replace(/\\/g, "/")).replace(/^(\.\.[/\\])+/, "");
|
|
57433
57472
|
let file = join47(distDir, rel === "/" ? "index.html" : rel);
|
|
57434
57473
|
if (!file.startsWith(distDir + sep6)) file = join47(distDir, "index.html");
|
|
57435
|
-
if (!
|
|
57474
|
+
if (!existsSync20(file)) file = join47(distDir, "index.html");
|
|
57436
57475
|
try {
|
|
57437
57476
|
const stats = statSync26(file);
|
|
57438
57477
|
const cacheControl = file.startsWith(join47(distDir, "assets") + sep6) ? STATIC_CACHE_IMMUTABLE : STATIC_CACHE_REVALIDATE;
|
|
@@ -57941,7 +57980,7 @@ async function startServer(opts = {}) {
|
|
|
57941
57980
|
});
|
|
57942
57981
|
return;
|
|
57943
57982
|
}
|
|
57944
|
-
if (
|
|
57983
|
+
if (existsSync20(distDir)) {
|
|
57945
57984
|
serveStatic(distDir, req, res);
|
|
57946
57985
|
return;
|
|
57947
57986
|
}
|
|
@@ -58162,7 +58201,7 @@ init_project();
|
|
|
58162
58201
|
init_project_launch();
|
|
58163
58202
|
init_shutdown();
|
|
58164
58203
|
init_logging();
|
|
58165
|
-
import { existsSync as
|
|
58204
|
+
import { existsSync as existsSync21 } from "node:fs";
|
|
58166
58205
|
import { join as join48 } from "node:path";
|
|
58167
58206
|
|
|
58168
58207
|
// packages/server/src/native-helper.ts
|
|
@@ -58240,9 +58279,9 @@ try {
|
|
|
58240
58279
|
["FRIZZ_SCRIPTS_DIR", process.env.FRIZZ_SCRIPTS_DIR, "index.mjs"],
|
|
58241
58280
|
["FRIZZ_WORKER_PLUGIN_DIR", process.env.FRIZZ_WORKER_PLUGIN_DIR, ".claude-plugin/plugin.json"]
|
|
58242
58281
|
];
|
|
58243
|
-
if (!
|
|
58282
|
+
if (!existsSync21(stableWebDist)) throw new Error("stable artifact launch is missing its verified web directory");
|
|
58244
58283
|
for (const [name, directory, requiredFile] of required) {
|
|
58245
|
-
if (!directory || !
|
|
58284
|
+
if (!directory || !existsSync21(join48(directory, requiredFile)))
|
|
58246
58285
|
throw new Error(`stable artifact launch is missing verified ${name}`);
|
|
58247
58286
|
}
|
|
58248
58287
|
}
|