@pify/swarm 0.7.4 → 0.7.6
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.
- package/README.md +2 -0
- package/extensions/swarm.ts +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @pify/swarm
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@pify/swarm) [](https://www.npmjs.com/package/@pify/swarm)
|
|
4
|
+
|
|
3
5
|
Run many [pi](https://github.com/earendil-works/pi) agents in parallel. One tool call fans a list of independent items out to child agents — with per-item routing, a concurrency queue, a live widget, and one aggregated report.
|
|
4
6
|
|
|
5
7
|
Part of the [Pify suite](https://github.com/pifydev). Install with [`pify install swarm`](https://github.com/pifydev/cli) or `pi install npm:@pify/swarm`.
|
package/extensions/swarm.ts
CHANGED
|
@@ -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
|
-
|
|
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