comfyui-mcp 0.52.204 → 0.52.205
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 +32 -14
- package/dist/orchestrator/panel-tools.js.map +1 -1
- package/dist/orchestrator/pi-backend.js +16 -26
- package/dist/orchestrator/pi-backend.js.map +1 -1
- package/dist/services/node-dev.js +16 -10
- package/dist/services/node-dev.js.map +1 -1
- package/dist/services/ui-bridge.js +13 -0
- package/dist/services/ui-bridge.js.map +1 -1
- package/package.json +1 -1
- package/plugin/hooks/open-latest-image.mjs +10 -4
|
@@ -6537,6 +6537,21 @@ function samePromotedParentRail(left, right) {
|
|
|
6537
6537
|
async function refuseKnownBadWriteBeforeDispatch(ctx, nodeId, widget) {
|
|
6538
6538
|
return refuseKnownBadWidgetWrite(ctx, nodeId, widget);
|
|
6539
6539
|
}
|
|
6540
|
+
/** Write fences need the current connection, while restart readiness needs a
|
|
6541
|
+
* browser-tab proof. Normalize the opaque incarnation into the existing private
|
|
6542
|
+
* witness shape; this helper is never used to certify a post-restart tab. Keep
|
|
6543
|
+
* the older context API as a fallback for receivers that lack the new API. */
|
|
6544
|
+
function panelWriteConnectionIdentity(ctx) {
|
|
6545
|
+
if (typeof ctx.panelConnectionIncarnationIdentity === "function") {
|
|
6546
|
+
const identity = ctx.panelConnectionIncarnationIdentity();
|
|
6547
|
+
return identity && { generation: identity.generation, tabSessionId: identity.incarnationId };
|
|
6548
|
+
}
|
|
6549
|
+
return ctx.panelConnectionIdentity?.();
|
|
6550
|
+
}
|
|
6551
|
+
function hasPanelWriteConnectionIdentity(ctx) {
|
|
6552
|
+
return typeof ctx.panelConnectionIncarnationIdentity === "function" ||
|
|
6553
|
+
typeof ctx.panelConnectionIdentity === "function";
|
|
6554
|
+
}
|
|
6540
6555
|
function outerPromotedExpectedScope(targetScope, outerNodeId) {
|
|
6541
6556
|
if (!targetScope?.graphIdentity)
|
|
6542
6557
|
return null;
|
|
@@ -6902,7 +6917,7 @@ function currentPromotedBindingError(ctx, binding) {
|
|
|
6902
6917
|
return "the panel tab was rebound";
|
|
6903
6918
|
let current;
|
|
6904
6919
|
try {
|
|
6905
|
-
current = ctx
|
|
6920
|
+
current = panelWriteConnectionIdentity(ctx);
|
|
6906
6921
|
}
|
|
6907
6922
|
catch {
|
|
6908
6923
|
return "the panel connection identity became unreadable";
|
|
@@ -6941,9 +6956,9 @@ function currentPromotedNodeIdentityFenceError(ctx, binding) {
|
|
|
6941
6956
|
return null;
|
|
6942
6957
|
}
|
|
6943
6958
|
function capturePromotedWriteBinding(ctx) {
|
|
6944
|
-
if (
|
|
6959
|
+
if (!hasPanelWriteConnectionIdentity(ctx))
|
|
6945
6960
|
return null;
|
|
6946
|
-
const identity = ctx
|
|
6961
|
+
const identity = panelWriteConnectionIdentity(ctx);
|
|
6947
6962
|
if (!isUsablePanelConnectionIdentity(identity))
|
|
6948
6963
|
return null;
|
|
6949
6964
|
let nodeIdentityFenceAdvertised = false;
|
|
@@ -7274,7 +7289,7 @@ function panelBindingDriftReason(ctx, where, hasIdentityApi, identityBefore, tab
|
|
|
7274
7289
|
return `the receiver identity was unavailable ${where}`;
|
|
7275
7290
|
let identityAfter;
|
|
7276
7291
|
try {
|
|
7277
|
-
identityAfter = ctx
|
|
7292
|
+
identityAfter = panelWriteConnectionIdentity(ctx);
|
|
7278
7293
|
}
|
|
7279
7294
|
catch {
|
|
7280
7295
|
return `the panel connection identity became unreadable ${where}`;
|
|
@@ -7332,12 +7347,12 @@ function ordinaryWritePlanFromScope(widget, scope, tabBefore, identityBefore) {
|
|
|
7332
7347
|
function currentOrdinaryWriteFenceError(ctx, plan) {
|
|
7333
7348
|
if (ctx.tabId !== plan.binding.tabId)
|
|
7334
7349
|
return "the panel tab was rebound";
|
|
7335
|
-
if (
|
|
7350
|
+
if (!hasPanelWriteConnectionIdentity(ctx)) {
|
|
7336
7351
|
return "the panel connection identity became unavailable";
|
|
7337
7352
|
}
|
|
7338
7353
|
let currentIdentity;
|
|
7339
7354
|
try {
|
|
7340
|
-
currentIdentity = ctx
|
|
7355
|
+
currentIdentity = panelWriteConnectionIdentity(ctx);
|
|
7341
7356
|
}
|
|
7342
7357
|
catch {
|
|
7343
7358
|
return "the panel connection identity became unreadable";
|
|
@@ -7411,11 +7426,11 @@ async function preparePromotedWidgetWrite(ctx, nodeId, widget) {
|
|
|
7411
7426
|
return promotedWriteRefusal(widget, "the panel node-identity write fence could not be read");
|
|
7412
7427
|
}
|
|
7413
7428
|
const tabBefore = ctx.tabId;
|
|
7414
|
-
const hasIdentityApi =
|
|
7429
|
+
const hasIdentityApi = hasPanelWriteConnectionIdentity(ctx);
|
|
7415
7430
|
let identityBefore;
|
|
7416
7431
|
if (hasIdentityApi) {
|
|
7417
7432
|
try {
|
|
7418
|
-
identityBefore = ctx
|
|
7433
|
+
identityBefore = panelWriteConnectionIdentity(ctx);
|
|
7419
7434
|
}
|
|
7420
7435
|
catch {
|
|
7421
7436
|
return promotedWriteRefusal(widget, "the panel connection identity could not be read");
|
|
@@ -7660,7 +7675,7 @@ async function preparePromotedWidgetWrite(ctx, nodeId, widget) {
|
|
|
7660
7675
|
}
|
|
7661
7676
|
let identityAfter;
|
|
7662
7677
|
try {
|
|
7663
|
-
identityAfter = ctx
|
|
7678
|
+
identityAfter = panelWriteConnectionIdentity(ctx);
|
|
7664
7679
|
}
|
|
7665
7680
|
catch {
|
|
7666
7681
|
return promotedWriteRefusal(widget, "the panel connection identity became unreadable while the mapping was read");
|
|
@@ -7988,7 +8003,7 @@ async function refuseDaSiWaStackWrite(ctx, nodeId, widget) {
|
|
|
7988
8003
|
const tabBefore = ctx.tabId;
|
|
7989
8004
|
let identityBefore;
|
|
7990
8005
|
try {
|
|
7991
|
-
identityBefore = ctx
|
|
8006
|
+
identityBefore = panelWriteConnectionIdentity(ctx);
|
|
7992
8007
|
}
|
|
7993
8008
|
catch {
|
|
7994
8009
|
return daSiWaIdentityRefusal("the bound browser-tab identity was unreadable");
|
|
@@ -8014,7 +8029,7 @@ async function refuseDaSiWaStackWrite(ctx, nodeId, widget) {
|
|
|
8014
8029
|
}
|
|
8015
8030
|
let identityAfter;
|
|
8016
8031
|
try {
|
|
8017
|
-
identityAfter = ctx
|
|
8032
|
+
identityAfter = panelWriteConnectionIdentity(ctx);
|
|
8018
8033
|
}
|
|
8019
8034
|
catch {
|
|
8020
8035
|
return daSiWaIdentityRefusal("the panel-tab identity became unreadable after the probe");
|
|
@@ -8055,7 +8070,7 @@ async function verifyDaSiWaStackWriteFence(ctx, nodeId) {
|
|
|
8055
8070
|
const tabBefore = ctx.tabId;
|
|
8056
8071
|
let identityBefore;
|
|
8057
8072
|
try {
|
|
8058
|
-
identityBefore = ctx
|
|
8073
|
+
identityBefore = panelWriteConnectionIdentity(ctx);
|
|
8059
8074
|
}
|
|
8060
8075
|
catch {
|
|
8061
8076
|
return daSiWaIdentityRefusal("the bound browser-tab identity was unreadable before dispatch");
|
|
@@ -8081,7 +8096,7 @@ async function verifyDaSiWaStackWriteFence(ctx, nodeId) {
|
|
|
8081
8096
|
}
|
|
8082
8097
|
let identityAfter;
|
|
8083
8098
|
try {
|
|
8084
|
-
identityAfter = ctx
|
|
8099
|
+
identityAfter = panelWriteConnectionIdentity(ctx);
|
|
8085
8100
|
}
|
|
8086
8101
|
catch {
|
|
8087
8102
|
return daSiWaIdentityRefusal("the panel-tab identity became unreadable before dispatch");
|
|
@@ -15344,6 +15359,9 @@ export function makePanelToolCtx(bridge, tabId, workflowTargets, onRunTicketOpen
|
|
|
15344
15359
|
ctx.ensureReachable = ensureReachable;
|
|
15345
15360
|
ctx.awaitReachable = awaitReachable;
|
|
15346
15361
|
ctx.panelConnectionIdentity = panelConnectionIdentity;
|
|
15362
|
+
if (typeof bridge.tabConnectionIncarnationIdentity === "function") {
|
|
15363
|
+
ctx.panelConnectionIncarnationIdentity = () => bridge.tabConnectionIncarnationIdentity(ctx.tabId);
|
|
15364
|
+
}
|
|
15347
15365
|
ctx.awaitPostRestartReachable = awaitPostRestartReachable;
|
|
15348
15366
|
ctx.tabCanMutateGraph = () => bridge.tabCanMutateGraph(ctx.tabId);
|
|
15349
15367
|
ctx.tabExpectedNodeTypeFenceCapability = () => bridge.tabExpectedNodeTypeFenceCapability(ctx.tabId);
|
|
@@ -18705,7 +18723,7 @@ export function buildPanelToolDefs() {
|
|
|
18705
18723
|
return appendToolResultText(first, `\n\n${textOfToolResult(promotedWritten)}`);
|
|
18706
18724
|
}
|
|
18707
18725
|
let recoveryBinding = null;
|
|
18708
|
-
if (
|
|
18726
|
+
if (hasPanelWriteConnectionIdentity(ctx)) {
|
|
18709
18727
|
try {
|
|
18710
18728
|
recoveryBinding = capturePromotedWriteBinding(ctx);
|
|
18711
18729
|
}
|