comfyui-mcp 0.50.44 → 0.50.45

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.
@@ -76,7 +76,7 @@ import { RunCompletions, describe as describeCorrelation, } from "./run-completi
76
76
  import { AskAnswers, preview as previewQuestion } from "./ask-answer-journal.js";
77
77
  import { initRunpodWatcher, getRunpodWatcher } from "../services/runpod-watch.js";
78
78
  import { getPod } from "../services/runpod-client.js";
79
- import { listTargetChangeRequests, consumeTargetChange, ackTargetChange, setProgressDir, CONTROL_PREFIX, newestAttemptEpochs, isSupersededAttempt, downloadAttemptKey, markSupersededByLive } from "../services/download-progress.js";
79
+ import { listTargetChangeRequests, consumeTargetChange, ackTargetChange, setProgressDir, CONTROL_PREFIX, newestAttemptEpochs, isSupersededAttempt, downloadAttemptKey, markSupersededByLive, migrateInFlightJobs } from "../services/download-progress.js";
80
80
  import { hasActiveTrainingJob, reconcileStaleTrainingJobs } from "../services/training-jobs.js";
81
81
  import { buildQueueStatusFrame, createQueueStatusBroadcaster, } from "../services/queue-status-broadcast.js";
82
82
  import { unloadAllOllama, warmOllama, resolveOllamaHost } from "../services/ollama-vram.js";
@@ -1160,6 +1160,30 @@ export async function runPanelOrchestrator() {
1160
1160
  try {
1161
1161
  for (const d of readdirSync(tmpdir())) {
1162
1162
  if (d.startsWith(`comfyui-mcp-progress-${bridgePort}-`) && join(tmpdir(), d) !== progressDir) {
1163
+ // #1148 — carry any IN-FLIGHT download records forward before deleting.
1164
+ //
1165
+ // The persisted store exists so a reconnecting session can still resolve
1166
+ // an in-flight download by id (#529), and download_model's status text
1167
+ // promises exactly that. This reap deleted the store that promise rests
1168
+ // on: a reporter's 12GB transfer answered "No download matching id" and
1169
+ // "No downloads are being tracked", with no file, no partial, and no
1170
+ // error event — 40 minutes lost invisibly while the documented contract
1171
+ // told their agent to wait rather than re-issue.
1172
+ //
1173
+ // The transfer IS dead (it streamed inside the exited process), so this
1174
+ // resurrects nothing. It replaces the silence with a terminal record
1175
+ // saying the download was interrupted, which status can find by the id
1176
+ // the caller already holds. Runs BEFORE the delete, and its failure is
1177
+ // never allowed to skip the delete.
1178
+ try {
1179
+ mkdirSync(progressDir, { recursive: true, mode: 0o700 });
1180
+ const n = migrateInFlightJobs(join(tmpdir(), d), progressDir);
1181
+ if (n > 0)
1182
+ logger.info(`Carried ${n} interrupted download record(s) forward`);
1183
+ }
1184
+ catch {
1185
+ /* best-effort */
1186
+ }
1163
1187
  rmSync(join(tmpdir(), d), { recursive: true, force: true });
1164
1188
  }
1165
1189
  }