comfyui-mcp 0.50.32 → 0.50.33
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/orchestrator/panel-tools.js +44 -11
- package/dist/orchestrator/panel-tools.js.map +1 -1
- package/dist/tools/install-comfyui.js +7 -0
- package/dist/tools/install-comfyui.js.map +1 -1
- package/dist/tools/model-management.js +7 -0
- package/dist/tools/model-management.js.map +1 -1
- package/dist/tools/runpod.js +10 -0
- package/dist/tools/runpod.js.map +1 -1
- package/package.json +1 -1
|
@@ -2258,6 +2258,33 @@ function corroborateActiveForFence(parsed) {
|
|
|
2258
2258
|
* NEVER throws and NEVER fabricates: every failure mode gets its own status, and
|
|
2259
2259
|
* the caller — not this function — decides what that means for its own report.
|
|
2260
2260
|
*/
|
|
2261
|
+
/**
|
|
2262
|
+
* A refused read may have REPAIRED the fence on its way out (#1043/#932).
|
|
2263
|
+
*
|
|
2264
|
+
* The panel answers a workflow-instance mismatch by re-advertising its current
|
|
2265
|
+
* identity (noteWorkflowInstanceMismatch → sendHello), and the orchestrator's
|
|
2266
|
+
* hello handler adopts a validated identity into the tab's command stamp. That
|
|
2267
|
+
* budget is per-identity and RESETS when the live uuid changes — so right after a
|
|
2268
|
+
* workflow_new, the very refusal we just collected is what buys the re-hello that
|
|
2269
|
+
* fixes the fence.
|
|
2270
|
+
*
|
|
2271
|
+
* It lands asynchronously, though, so reporting the reading we took BEFORE the
|
|
2272
|
+
* call describes a state that may no longer exist by the time the caller sees it:
|
|
2273
|
+
* "NOT recovered" about a session that is, by then, fine. Wait one settle and
|
|
2274
|
+
* re-read before saying so.
|
|
2275
|
+
*
|
|
2276
|
+
* Only claims a repair when BOTH reads are known and the uuid actually CHANGED —
|
|
2277
|
+
* an unreadable fence proves nothing, and #770/#803 exist precisely because a
|
|
2278
|
+
* failed read used to render as a definite answer.
|
|
2279
|
+
*/
|
|
2280
|
+
async function unreadableOrHealed(ctx, before, detail) {
|
|
2281
|
+
await sleep(retrySettleMs());
|
|
2282
|
+
const now = currentWorkflowFence(ctx);
|
|
2283
|
+
if (before.known && now.known && now.uuid && now.uuid !== before.uuid) {
|
|
2284
|
+
return { status: "healed_by_panel", uuid: now.uuid, before };
|
|
2285
|
+
}
|
|
2286
|
+
return { status: "unreadable", before, detail };
|
|
2287
|
+
}
|
|
2261
2288
|
async function rebindWorkflowFence(ctx) {
|
|
2262
2289
|
const tabAtStart = ctx.tabId;
|
|
2263
2290
|
let before = currentWorkflowFence(ctx);
|
|
@@ -2276,24 +2303,16 @@ async function rebindWorkflowFence(ctx) {
|
|
|
2276
2303
|
const res = await ctx.call({ cmd: "workflow_list" }, 6000);
|
|
2277
2304
|
syncFenceToCurrentTab();
|
|
2278
2305
|
if (res?.isError) {
|
|
2279
|
-
return
|
|
2306
|
+
return await unreadableOrHealed(ctx, before, toolResultText(res));
|
|
2280
2307
|
}
|
|
2281
2308
|
parsed = parseToolResultJson(res);
|
|
2282
2309
|
}
|
|
2283
2310
|
catch (err) {
|
|
2284
2311
|
syncFenceToCurrentTab();
|
|
2285
|
-
return
|
|
2286
|
-
status: "unreadable",
|
|
2287
|
-
before,
|
|
2288
|
-
detail: err instanceof Error ? err.message : String(err ?? "unknown error"),
|
|
2289
|
-
};
|
|
2312
|
+
return await unreadableOrHealed(ctx, before, err instanceof Error ? err.message : String(err ?? "unknown error"));
|
|
2290
2313
|
}
|
|
2291
2314
|
if (!parsed) {
|
|
2292
|
-
return
|
|
2293
|
-
status: "unreadable",
|
|
2294
|
-
before,
|
|
2295
|
-
detail: "the panel's workflow_list reply was not readable as JSON",
|
|
2296
|
-
};
|
|
2315
|
+
return await unreadableOrHealed(ctx, before, "the panel's workflow_list reply was not readable as JSON");
|
|
2297
2316
|
}
|
|
2298
2317
|
// CORROBORATE before adopting. The uuid must come from a record the panel's own
|
|
2299
2318
|
// open-workflow list agrees is the live canvas — otherwise a stale or mixed
|
|
@@ -2485,6 +2504,20 @@ refusalCause) {
|
|
|
2485
2504
|
`mismatch SURVIVES that repeat, this session and the panel agree on the target ` +
|
|
2486
2505
|
`and the disagreement is inside the panel — ${RELOAD_TAB_REMEDY}`),
|
|
2487
2506
|
};
|
|
2507
|
+
case "healed_by_panel":
|
|
2508
|
+
// Reported as BOUND, and the provenance said out loud: the stamp came from
|
|
2509
|
+
// the panel's own re-advertised identity through the hello handler's
|
|
2510
|
+
// validator — the same path that sets it normally — not from a reading we
|
|
2511
|
+
// took. Calling this "not recovered" because OUR read failed would report a
|
|
2512
|
+
// wedge that no longer exists.
|
|
2513
|
+
return {
|
|
2514
|
+
binding: "bound",
|
|
2515
|
+
note: ` The read was refused, but this session's fence CHANGED while it ran: the panel ` +
|
|
2516
|
+
`re-advertised its live identity (${r.uuid}) and it was adopted, replacing ` +
|
|
2517
|
+
`${r.before.known && r.before.uuid ? r.before.uuid : "the previous stamp"}. Graph tools ` +
|
|
2518
|
+
`should work now — the repair came from the panel, not from this call, so treat the ` +
|
|
2519
|
+
`next graph command as the confirmation.`,
|
|
2520
|
+
};
|
|
2488
2521
|
case "rejected":
|
|
2489
2522
|
return {
|
|
2490
2523
|
binding: "not_recovered",
|