@pify/swarm 0.7.4 → 0.7.5

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.
@@ -316,7 +316,15 @@ export default function swarm(pi: ExtensionAPI) {
316
316
  try {
317
317
  const iso = createIsolationWorktree(ctx.cwd, run.runId + "-i" + (item.index + 1));
318
318
  await runItem(ctx, run.runId, def, item, context, iso.path, mailbox);
319
- if (item.result !== null) item.result = `${item.result}\n\n${isolationNote(iso)}`;
319
+ // Remove the worktree when the item changed nothing — the cleanup
320
+ // the README promised but the code never performed (removeIfUnchanged
321
+ // was imported and never called, leaking a worktree + branch per
322
+ // read-only item). Kept when there is work to merge, and only then
323
+ // is the merge note worth showing.
324
+ const removed = removeIfUnchanged(ctx.cwd, iso);
325
+ if (item.result !== null) {
326
+ item.result = `${item.result}\n\n${removed ? CLEAN_WORKTREE_NOTE : isolationNote(iso)}`;
327
+ }
320
328
  } catch (err) {
321
329
  item.status = "error";
322
330
  item.error = err instanceof Error ? err.message : String(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pify/swarm",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "description": "Coordinate multiple pi agents in parallel: swarm_run fan-out with per-item auto-routing, concurrency queue, aggregated reports",
5
5
  "keywords": [
6
6
  "pi-package",