comfyui-mcp 0.50.109 → 0.50.110

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.
@@ -27,7 +27,7 @@ import { isPanelAutoInstallDisabled } from "../services/panel-installer.js";
27
27
  import { SelfRestarter, canSelfRestart } from "../services/self-restart.js";
28
28
  import { pairUrlDurability } from "./pair-durability.js";
29
29
  import { loadOrCreatePairToken } from "./pair-token-store.js";
30
- import { SessionStore, workflowIdentityParts } from "./session-store.js";
30
+ import { SessionStore, workflowIdentityParts, carryWorkflowCommandStamp } from "./session-store.js";
31
31
  import { unreachableReason, noPanelTabReason, identityReason } from "./fence-refusal.js";
32
32
  import { SHARED_SESSION_SCOPE, isScopeAddress, conversationTabs, shouldRetireSharedAgent, messageOrigin, normalizeHelloBackend, workflowOriginNote, } from "../services/session-scope.js";
33
33
  import { TurnOriginTracker, makeScopeRepinHandler, makeScopeTargetResolver, } from "./turn-origins.js";
@@ -3266,11 +3266,39 @@ export async function runPanelOrchestrator() {
3266
3266
  AskAnswers.moveKey(migratedFrom, panelTab);
3267
3267
  flushRunCompletions(panelTab);
3268
3268
  flushAskAnswers(panelTab);
3269
- // The OLD id's command stamp dies with it: a straggler command issued
3270
- // for the old workflow must keep failing the panel's fence rather than
3271
- // mutate the newly-shown one. The new id is stamped from THIS hello
3272
- // just below.
3273
- tabCommandWorkflowUuid.delete(migratedFrom);
3269
+ // The stamp MOVES to the new id, like every other piece of routing state
3270
+ // above it (#1331). It used to be deleted here, and the justification —
3271
+ // "a straggler command issued for the old workflow must keep failing the
3272
+ // panel's fence" — is satisfied either way, because the OLD id ceases to
3273
+ // resolve at all once the socket re-helloes under the new one.
3274
+ //
3275
+ // A REGRESSION, and one this file already knew about. #436 added
3276
+ // `carryWorkflowCommandStamp` for exactly this, recording that deleting it
3277
+ // "flapped sessions"; the #884 refactor rewrote this block and left a bare
3278
+ // delete in its place. Thirty lines below, the surviving comment still
3279
+ // argues the case and even names the scenario: "A reconnect hello that
3280
+ // lands before the canvas identity is readable carries no uuid, which is
3281
+ // enough to erase the stamp and wedge the tab for the rest of the session."
3282
+ // That is #1331 verbatim — reported after a save/rename, which is one of
3283
+ // the three events that mints a new tab id.
3284
+ //
3285
+ // Carrying cannot widen authorization. The panel authorizes a fenced
3286
+ // command IFF stamp === the LIVE active workflow uuid, so a carried-but-
3287
+ // stale stamp permits nothing a correct one would not; it simply mismatches
3288
+ // and is refused, exactly as before. An ABSENT stamp is the asymmetric
3289
+ // case: UiBridge then sends frames with no `workflow_uuid`, which the panel
3290
+ // also counts as a mismatch, so every fenced command is refused. NOT
3291
+ // `workflow_list`, which the panel deliberately exempts as its recovery probe
3292
+ // (commandIsCanvasTargetless) — I claimed otherwise in the first version of this
3293
+ // comment, an hour after reading the #1337 code that says so. The panel's
3294
+ // re-advertise repair is
3295
+ // capped at MISMATCH_REHELLO_MAX_PER_IDENTITY (3). Once those are spent the
3296
+ // tab is wedged for the session, which is what cost the reporter four calls
3297
+ // to recover a state the panel already believed it was in.
3298
+ //
3299
+ // If THIS hello does resolve an identity, the `set` below overwrites what
3300
+ // we carried — new evidence always wins over old.
3301
+ carryWorkflowCommandStamp(tabCommandWorkflowUuid, migratedFrom, panelTab);
3274
3302
  logger.info(`[panel-orchestrator] same-socket re-hello ${migratedFrom.slice(0, 12)} → ${panelTab.slice(0, 12)} — routing state carried; the shared session continues (#884)`);
3275
3303
  }
3276
3304
  // Record this tab's trusted per-workflow COMMAND STAMP (#570 P0c — a