comfyui-mcp 0.52.163 → 0.52.165

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.
@@ -6407,6 +6407,21 @@ function promotedHostAppliedNote(plan) {
6407
6407
  `"${plan.hostWidget}". The promoted inner mapping node ${plan.inner.innerNodeId} ` +
6408
6408
  `"${plan.inner.widget}" is synchronized from that host rail.)`);
6409
6409
  }
6410
+ /** #2514 — an enclosing-subgraph host write is the parent-authoritative
6411
+ * receipt. Advertise parent_widget_synced even when we never entered the
6412
+ * inner scope (#2500/#2533 host-first), matching the remapped-inner path. */
6413
+ function promotedHostWriteReceipt(res, plan) {
6414
+ const payload = parseToolResultJson(res);
6415
+ const note = promotedHostAppliedNote(plan);
6416
+ if (!payload)
6417
+ return appendToolResultText(res, note);
6418
+ const shaped = shapeParentAuthoritativePromotedWrite(payload, {
6419
+ nodeId: plan.outerNodeId,
6420
+ widget: plan.hostWidget,
6421
+ synced: true,
6422
+ });
6423
+ return appendToolResultText(rewriteToolResultJson(res, shaped), note);
6424
+ }
6410
6425
  const PROMOTED_PRIMITIVE_INNER_TYPES = new Set([
6411
6426
  "PrimitiveInt",
6412
6427
  "PrimitiveFloat",
@@ -6419,7 +6434,9 @@ const PROMOTED_PRIMITIVE_INNER_TYPES = new Set([
6419
6434
  * Same-name proxyWidgets promotions keep the inner write so #2314's known-bad
6420
6435
  * live probe still runs before any container mutation.
6421
6436
  * #2500 — a Primitive* `value` that exists as a live input is driven by the
6422
- * promoted rail even when the parent-rail witness is missing; write the host. */
6437
+ * promoted rail even when the parent-rail witness is missing; write the host.
6438
+ * #2533 — an authoritative parent rail whose inner widget is a live input
6439
+ * (unet_name, clip_name, labelled prompt) is the same store; write the host. */
6423
6440
  function shouldWritePromotedHostFirst(plan) {
6424
6441
  if (plan.innerLinkDriven)
6425
6442
  return true;
@@ -6924,7 +6941,7 @@ async function preparePromotedWidgetWrite(ctx, nodeId, widget) {
6924
6941
  ...(outerNodeIdentity ? { outerNodeIdentity } : {}),
6925
6942
  inner,
6926
6943
  innerNodeType,
6927
- innerLinkDriven: promotedInnerWidgetIsLinkDriven(innerNode, inner.widget, inner.terminal),
6944
+ innerLinkDriven: promotedInnerWidgetIsLinkDriven(innerNode, inner.widget, inner.terminal, inner.parentRail),
6928
6945
  ...(inner.terminal ? { terminal: inner.terminal } : {}),
6929
6946
  scope,
6930
6947
  binding: {
@@ -16979,11 +16996,12 @@ export function buildPanelToolDefs() {
16979
16996
  const afterMappingError = currentPromotedBindingError(ctx, plan.binding);
16980
16997
  if (afterMappingError)
16981
16998
  return promotedWriteRefusal(args.widget, afterMappingError);
16982
- // #2500 — a link-driven inner Primitive (duration/value_2, fps/value_3)
16983
- // accepts a write and warns that rendering still reads the enclosing
16984
- // subgraph widget. Write that container first, at the caller's current
16985
- // graph, and do not enter the inner scope. This is the #1655 fallback
16986
- // path when the #2488 host-rail write already contradicted.
16999
+ // #2500/#2533 — a link-driven inner (Primitive value, or a same-name
17000
+ // COMBO/STRING live input with an authoritative parent rail) accepts
17001
+ // a write and warns that rendering still reads the enclosing subgraph
17002
+ // widget. Write that container first, at the caller's current graph,
17003
+ // and do not enter the inner scope. This is the #1655 fallback path
17004
+ // when the #2488 host-rail write already contradicted.
16987
17005
  if (plan.innerLinkDriven) {
16988
17006
  if (plan.terminal) {
16989
17007
  const terminalBlocked = refuseKnownBadPromotedTerminal(plan.terminal);
@@ -17011,7 +17029,7 @@ export function buildPanelToolDefs() {
17011
17029
  }
17012
17030
  markPanelSchemaReady(panelSchemaKey(ctx));
17013
17031
  const persisted = await persistUnpromotedControlAfterGenerate(written, ctx, plan.outerNodeId);
17014
- return appendToolResultText(persisted, promotedHostAppliedNote(plan));
17032
+ return promotedHostWriteReceipt(persisted, plan);
17015
17033
  }
17016
17034
  const enter = await ctx.call({ cmd: "graph_enter_subgraph", node_id: plan.outerNodeId }, 15000);
17017
17035
  if (enter.isError) {
@@ -17188,7 +17206,7 @@ export function buildPanelToolDefs() {
17188
17206
  if (!hostWritten.isError) {
17189
17207
  markPanelSchemaReady(panelSchemaKey(ctx));
17190
17208
  const persisted = await persistUnpromotedControlAfterGenerate(hostWritten, ctx, promotedPlan.outerNodeId);
17191
- return appendToolResultText(persisted, promotedHostAppliedNote(promotedPlan));
17209
+ return promotedHostWriteReceipt(persisted, promotedPlan);
17192
17210
  }
17193
17211
  const hostRefusal = parseContradictoryPromotedWidgetRefusal(textOfToolResult(hostWritten), hostWidget);
17194
17212
  if (!hostRefusal || String(hostRefusal.nodeId) !== String(promotedPlan.outerNodeId)) {
@@ -17209,7 +17227,7 @@ export function buildPanelToolDefs() {
17209
17227
  if (!remappedHost.isError) {
17210
17228
  markPanelSchemaReady(panelSchemaKey(ctx));
17211
17229
  const persisted = await persistUnpromotedControlAfterGenerate(remappedHost, ctx, promotedPlan.outerNodeId);
17212
- return appendToolResultText(persisted, promotedHostAppliedNote(remapPlan));
17230
+ return promotedHostWriteReceipt(persisted, remapPlan);
17213
17231
  }
17214
17232
  if (!parseContradictoryPromotedWidgetRefusal(textOfToolResult(remappedHost), hostRefusal.widget)) {
17215
17233
  return remappedHost;