comfyui-mcp 0.50.34 → 0.50.35

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.
@@ -913,6 +913,20 @@ export async function runPanelOrchestrator() {
913
913
  let pairToken = envPairToken;
914
914
  let pairListenerStarted = false;
915
915
  let pairTunnel = null;
916
+ /**
917
+ * #875 — is a phone paired over a TUNNEL right now?
918
+ *
919
+ * Gates the self-restarter (see its allIdle below). A tunnel URL cannot survive
920
+ * a restart: cloudflared mints a fresh quick-tunnel hostname per run and there
921
+ * is no way to pin it, so restarting under a live tunnel breaks a phone that is
922
+ * connected at that moment. A LAN URL is fine — the token persists now — which
923
+ * is why this is narrowed to the tunnel rather than to pairing in general.
924
+ */
925
+ // Requires BOTH: a tunnel exists AND a client is connected through it right
926
+ // now. `pairTunnel` alone is not liveness — nothing stops the tunnel until the
927
+ // process exits, so gating on it would postpone every future update after a
928
+ // single pairing, rather than deferring to the next disconnect as intended.
929
+ const tunnelPairingLive = () => pairTunnel !== null && bridge.hasLiveHeadlessClient();
916
930
  // #875 — the token is PERSISTED, not per-session. It used to be minted fresh on
917
931
  // every run, so a self-restart (on by default, hourly npm check) invalidated the
918
932
  // URL the phone had saved. The reporter experienced that as "updating the npm
@@ -5555,7 +5569,20 @@ export async function runPanelOrchestrator() {
5555
5569
  // …and the same for an ask answer the user actually gave that has not
5556
5570
  // reached the agent yet (#486). Restarting would destroy it silently.
5557
5571
  !AskAnswers.hasOutstanding() &&
5558
- !QueueMonitor.isBusy(),
5572
+ !QueueMonitor.isBusy() &&
5573
+ // #875 — a LIVE TUNNEL PAIRING SESSION defers the restart to the next
5574
+ // disconnect. The token now persists, so a LAN URL survives a restart; a
5575
+ // tunnel URL cannot, because cloudflared mints a fresh quick-tunnel
5576
+ // hostname every run and there is no way to pin it. Restarting under a live
5577
+ // tunnel therefore breaks a phone that is connected RIGHT NOW, to install
5578
+ // an update nobody asked for at that moment — which is what the reporter
5579
+ // experienced and (reasonably) blamed on the npm version.
5580
+ //
5581
+ // Deferral, not cancellation: the update check still runs and the restart
5582
+ // stays armed, so it fires as soon as the tunnel goes away. The cost is
5583
+ // that a tunnel left up indefinitely postpones updates indefinitely, which
5584
+ // is why noteTunnelDeferral announces it rather than doing it silently.
5585
+ !tunnelPairingLive(),
5559
5586
  announce: (text) => void bridge.push({ type: "say", text }),
5560
5587
  teardown: teardownCore,
5561
5588
  });