comfyui-mcp 0.51.10 → 0.51.11
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.
|
@@ -42,6 +42,42 @@ export function noPanelTabReason(tabId) {
|
|
|
42
42
|
* BEFORE the structural no-Origin case, or it borrows a remedy that cannot help
|
|
43
43
|
* it and is told its problem is permanent.
|
|
44
44
|
*/
|
|
45
|
+
/**
|
|
46
|
+
* The remedy for "this connection has no server-observed Origin" (panel#1065).
|
|
47
|
+
*
|
|
48
|
+
* Shared, because it was NOT shared and the two copies drifted. #1077/#1240 gave
|
|
49
|
+
* the relay path the origin it already knows from COMFYUI_URL, and updated the
|
|
50
|
+
* refusal below to say so. The OTHER surface rendering this same refusal — the
|
|
51
|
+
* `rejected` branch of describeFenceRebind in panel-tools.ts — kept the pre-fix
|
|
52
|
+
* text, which told the user to abandon the relay backend and to "report it: the
|
|
53
|
+
* relay protocol has to forward the browser's handshake Origin for this path to
|
|
54
|
+
* work at all".
|
|
55
|
+
*
|
|
56
|
+
* A user on 0.50.114 — a version that HAS the fix — followed that instruction and
|
|
57
|
+
* filed panel#1065 quoting it back. The stale sentence manufactured its own bug
|
|
58
|
+
* report, and told someone to downgrade a working setup on the way.
|
|
59
|
+
*/
|
|
60
|
+
export const NO_ORIGIN_REMEDY =
|
|
61
|
+
// The gate's OWN semantics come first, because they dissolve the fear the old
|
|
62
|
+
// wording created and the reporter's stated obstacle at once. Measured, not
|
|
63
|
+
// assumed: workflowIdentityParts requires an origin to EXIST, both call sites
|
|
64
|
+
// take only `.uuid`, and `identity.origin` is never read again — so the value
|
|
65
|
+
// is a scope, not a claim to be checked against the browser.
|
|
66
|
+
`What this gate checks is PRESENCE, not agreement: the identity needs SOME origin to be ` +
|
|
67
|
+
`scoped to, and nothing ever compares it against the browser's — so the value does not have ` +
|
|
68
|
+
`to match where the panel is served from. ` +
|
|
69
|
+
// Two causes, named separately (codex review, P1). The predicate that selects this
|
|
70
|
+
// remedy is generic, and a blanket "set COMFYUI_URL" sends a direct/LAN/pairing or
|
|
71
|
+
// non-browser caller to a change that CANNOT add a handshake origin, leaving them
|
|
72
|
+
// fenced with nothing left to try.
|
|
73
|
+
`On a RELAY connection the origin is derived from COMFYUI_URL, so an unset or unparseable ` +
|
|
74
|
+
`COMFYUI_URL is the usual cause and setting it to any valid URL supplies one; you do not have ` +
|
|
75
|
+
`to leave the relay backend, which has supplied its own origin since 0.50.67. ` +
|
|
76
|
+
`On any other path the connection never presented an Origin header at all — a non-browser ` +
|
|
77
|
+
`client, or a proxy that strips it — and what fixes that is reaching the orchestrator from the ` +
|
|
78
|
+
`browser panel itself. ` +
|
|
79
|
+
`Refreshing the tab will not change either case. Reads and non-graph tools keep working ` +
|
|
80
|
+
`meanwhile — they do not need the fence.`;
|
|
45
81
|
export function identityReason(tabId, origin, workflowUuid, failure) {
|
|
46
82
|
if (!origin && failure === "ambiguous") {
|
|
47
83
|
return ambiguousTurn(tabId, "no single tab's identity could be read");
|
|
@@ -53,10 +89,9 @@ export function identityReason(tabId, origin, workflowUuid, failure) {
|
|
|
53
89
|
// like any other. Naming a fixed cause as the "known case" would send a
|
|
54
90
|
// reader to change a backend that is no longer the reason (#1077).
|
|
55
91
|
return (`this tab's connection carries no server-observed Origin, and the workflow identity is ` +
|
|
56
|
-
`bound to one — so the fence cannot be adopted for it.
|
|
57
|
-
`
|
|
58
|
-
|
|
59
|
-
`this session, setting it to the URL the panel is served from is what supplies it.`);
|
|
92
|
+
`bound to one — so the fence cannot be adopted for it. This means the connection reached ` +
|
|
93
|
+
`the orchestrator by a path that neither observed nor was told the panel's origin. ` +
|
|
94
|
+
NO_ORIGIN_REMEDY);
|
|
60
95
|
}
|
|
61
96
|
// #1255 — this used to end "a malformed uuid, or one bound to a different
|
|
62
97
|
// origin", which describes a comparison the code does not perform.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fence-refusal.js","sourceRoot":"","sources":["../../src/orchestrator/fence-refusal.ts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a,EACb,MAA0B,EAC1B,YAAqB,EACrB,OAAuB;IAEvB,IAAI,CAAC,MAAM,IAAI,OAAO,KAAK,WAAW,EAAE,CAAC;QACvC,OAAO,aAAa,CAAC,KAAK,EAAE,wCAAwC,CAAC,CAAC;IACxE,CAAC;IACD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,6EAA6E;QAC7E,8EAA8E;QAC9E,6EAA6E;QAC7E,wEAAwE;QACxE,mEAAmE;QACnE,OAAO,CACL,wFAAwF;YACxF,0FAA0F;YAC1F,oFAAoF;YACpF,gBAAgB,CACjB,CAAC;IACJ,CAAC;IACD,0EAA0E;IAC1E,mEAAmE;IACnE,+EAA+E;IAC/E,4EAA4E;IAC5E,6EAA6E;IAC7E,2EAA2E;IAC3E,0BAA0B;IAC1B,EAAE;IACF,2EAA2E;IAC3E,8EAA8E;IAC9E,0EAA0E;IAC1E,yBAAyB;IACzB,OAAO,CACL,oDAAoD,MAAM,CAAC,YAAY,CAAC,YAAY;QACpF,0CAA0C,MAAM,yCAAyC;QACzF,sFAAsF,CACvF,CAAC;AACJ,CAAC"}
|
|
@@ -38,6 +38,7 @@ import { createSdkMcpServer, tool } from "@anthropic-ai/claude-agent-sdk";
|
|
|
38
38
|
import { parse as parseYaml } from "yaml";
|
|
39
39
|
import { conversationOfScopeAddress, isScopeAddress, shortTabId } from "../services/session-scope.js";
|
|
40
40
|
import { NODE_ID_MESSAGE, NODE_ID_PATTERN, normalizeNodeId } from "./node-id.js";
|
|
41
|
+
import { NO_ORIGIN_REMEDY } from "./fence-refusal.js";
|
|
41
42
|
/** #884 — journal TICKETS (run completions #468, ask answers #486) must be
|
|
42
43
|
* keyed by the REAL tab a run/card was routed to: the panel reports back under
|
|
43
44
|
* that tab id, and a ticket keyed by the shared scope address a tool ctx is
|
|
@@ -3446,11 +3447,12 @@ panelGapNote = "") {
|
|
|
3446
3447
|
// the tab" — the reporter did that repeatedly, including closing and
|
|
3447
3448
|
// reopening it, and it could never have worked.
|
|
3448
3449
|
r.refusalReason && /no server-observed Origin/i.test(r.refusalReason)
|
|
3449
|
-
?
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3450
|
+
? // panel#1065 — SHARED with fence-refusal.ts, because this copy went stale.
|
|
3451
|
+
// It still described the world before #1240 gave the relay path its
|
|
3452
|
+
// origin: it told the user to abandon the relay backend and to report
|
|
3453
|
+
// a protocol gap that had already been closed. Someone did exactly
|
|
3454
|
+
// that, on a version that had the fix.
|
|
3455
|
+
NO_ORIGIN_REMEDY
|
|
3454
3456
|
: RELOAD_TAB_REMEDY}`,
|
|
3455
3457
|
};
|
|
3456
3458
|
case "adopt_error":
|