comfyui-mcp 0.51.47 → 0.51.48
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 +17 -1
- package/dist/orchestrator/panel-tools.js.map +1 -1
- package/dist/services/panel-refusal.js +123 -0
- package/dist/services/panel-refusal.js.map +1 -0
- package/dist/services/ui-bridge.js +21 -1
- package/dist/services/ui-bridge.js.map +1 -1
- package/package.json +1 -1
|
@@ -34,6 +34,7 @@ import { fileURLToPath } from "node:url";
|
|
|
34
34
|
import { comfyuiFetch } from "../comfyui/fetch.js";
|
|
35
35
|
import { assertPanelNotTargetedUnverifiable } from "../services/panel-pin-guard.js";
|
|
36
36
|
import { nodesInstallCommandArgs } from "../services/node-management.js";
|
|
37
|
+
import { isPreExecutorRefusal } from "../services/panel-refusal.js";
|
|
37
38
|
import { createSdkMcpServer, tool } from "@anthropic-ai/claude-agent-sdk";
|
|
38
39
|
import { parse as parseYaml } from "yaml";
|
|
39
40
|
import { conversationOfScopeAddress, isScopeAddress, shortTabId } from "../services/session-scope.js";
|
|
@@ -5725,7 +5726,22 @@ export function makePanelToolCtx(bridge, tabId, workflowTargets) {
|
|
|
5725
5726
|
// for a retry in a moment; the section lasts a fraction of a second, which
|
|
5726
5727
|
// is what retrySettleMs already waits. Still gated on RETRY-SAFE commands,
|
|
5727
5728
|
// so a mutation is never re-issued on our own initiative.
|
|
5728
|
-
|
|
5729
|
+
// #1529 — a PRE-EXECUTOR refusal is retryable even for a MUTATION.
|
|
5730
|
+
//
|
|
5731
|
+
// Every other branch here is gated on RETRY_SAFE_CMDS precisely because a
|
|
5732
|
+
// mutation might have landed before the failure, and re-issuing it would
|
|
5733
|
+
// double-apply. That reasoning does not hold for this one: the panel's
|
|
5734
|
+
// reconnect gate runs BEFORE its executor, and says so in a structured field
|
|
5735
|
+
// (`applied:false, stage:"pre-executor"`) rather than in prose. Nothing ran,
|
|
5736
|
+
// so there is nothing to double-apply — which is the entire point of the
|
|
5737
|
+
// channel, and why it is keyed on the FIELD and never on the message text.
|
|
5738
|
+
//
|
|
5739
|
+
// The refusal is the panel's own claim about its own execution, validated on
|
|
5740
|
+
// arrival; an older panel sends no field, `preExecutorRefusal` is null, and
|
|
5741
|
+
// this branch simply never fires.
|
|
5742
|
+
const preExecutorRefusal = isPreExecutorRefusal(err);
|
|
5743
|
+
if (preExecutorRefusal ||
|
|
5744
|
+
(isRetrySafeCmd(cmd) && (isTransientReconnectError(err) || isWorkflowSwitchGuardRefusal(err)))) {
|
|
5729
5745
|
// panel#1097 — declared out here so the refusal branch below can see it,
|
|
5730
5746
|
// and REASSIGNED after ensureReachable so it names the tab the command is
|
|
5731
5747
|
// actually dispatched on. Reading it before the rebind attributed a refusal
|