opencode-swarm-plugin 0.33.0 → 0.34.0
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/.hive/issues.jsonl +12 -0
- package/.hive/memories.jsonl +255 -1
- package/.turbo/turbo-build.log +4 -4
- package/.turbo/turbo-test.log +289 -289
- package/CHANGELOG.md +98 -0
- package/README.md +29 -1
- package/bin/swarm.test.ts +272 -1
- package/bin/swarm.ts +226 -4
- package/dist/compaction-hook.d.ts +1 -1
- package/dist/compaction-hook.d.ts.map +1 -1
- package/dist/index.d.ts +95 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11848 -124
- package/dist/logger.d.ts +34 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/plugin.js +11722 -112
- package/dist/swarm-orchestrate.d.ts +105 -0
- package/dist/swarm-orchestrate.d.ts.map +1 -1
- package/dist/swarm-prompts.d.ts +54 -2
- package/dist/swarm-prompts.d.ts.map +1 -1
- package/dist/swarm-research.d.ts +127 -0
- package/dist/swarm-research.d.ts.map +1 -0
- package/dist/swarm-review.d.ts.map +1 -1
- package/dist/swarm.d.ts +56 -1
- package/dist/swarm.d.ts.map +1 -1
- package/evals/compaction-resumption.eval.ts +289 -0
- package/evals/coordinator-behavior.eval.ts +307 -0
- package/evals/fixtures/compaction-cases.ts +350 -0
- package/evals/scorers/compaction-scorers.ts +305 -0
- package/evals/scorers/index.ts +12 -0
- package/package.json +5 -2
- package/src/compaction-hook.test.ts +617 -1
- package/src/compaction-hook.ts +291 -18
- package/src/index.ts +29 -0
- package/src/logger.test.ts +189 -0
- package/src/logger.ts +135 -0
- package/src/swarm-prompts.test.ts +164 -1
- package/src/swarm-prompts.ts +178 -4
- package/src/swarm-review.test.ts +177 -0
- package/src/swarm-review.ts +12 -47
package/src/swarm-review.ts
CHANGED
|
@@ -551,23 +551,8 @@ You may now complete the task with \`swarm_complete\`.`,
|
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
|
|
554
|
-
//
|
|
555
|
-
|
|
556
|
-
projectPath: args.project_key,
|
|
557
|
-
fromAgent: "coordinator",
|
|
558
|
-
toAgents: [args.worker_id],
|
|
559
|
-
subject: `FAILED: ${args.task_id} - max review attempts reached`,
|
|
560
|
-
body: `## Task Failed ✗
|
|
561
|
-
|
|
562
|
-
Maximum review attempts (${MAX_REVIEW_ATTEMPTS}) reached.
|
|
563
|
-
|
|
564
|
-
**Last Issues:**
|
|
565
|
-
${parsedIssues.map((i: ReviewIssue) => `- ${i.file}${i.line ? `:${i.line}` : ""}: ${i.issue}`).join("\n")}
|
|
566
|
-
|
|
567
|
-
The task has been marked as blocked. A human or different approach is needed.`,
|
|
568
|
-
threadId: epicId,
|
|
569
|
-
importance: "urgent",
|
|
570
|
-
});
|
|
554
|
+
// NO sendSwarmMessage - worker is dead, can't read it
|
|
555
|
+
// Coordinator handles retry or escalation
|
|
571
556
|
|
|
572
557
|
return JSON.stringify(
|
|
573
558
|
{
|
|
@@ -584,35 +569,8 @@ The task has been marked as blocked. A human or different approach is needed.`,
|
|
|
584
569
|
);
|
|
585
570
|
}
|
|
586
571
|
|
|
587
|
-
//
|
|
588
|
-
|
|
589
|
-
.map((i: ReviewIssue) => {
|
|
590
|
-
let line = `- **${i.file}**`;
|
|
591
|
-
if (i.line) line += `:${i.line}`;
|
|
592
|
-
line += `: ${i.issue}`;
|
|
593
|
-
if (i.suggestion) line += `\n → ${i.suggestion}`;
|
|
594
|
-
return line;
|
|
595
|
-
})
|
|
596
|
-
.join("\n");
|
|
597
|
-
|
|
598
|
-
await sendSwarmMessage({
|
|
599
|
-
projectPath: args.project_key,
|
|
600
|
-
fromAgent: "coordinator",
|
|
601
|
-
toAgents: [args.worker_id],
|
|
602
|
-
subject: `NEEDS CHANGES: ${args.task_id} (attempt ${attemptNumber}/${MAX_REVIEW_ATTEMPTS})`,
|
|
603
|
-
body: `## Review: Changes Needed
|
|
604
|
-
|
|
605
|
-
${args.summary || "Please address the following issues:"}
|
|
606
|
-
|
|
607
|
-
**Issues:**
|
|
608
|
-
${issuesList}
|
|
609
|
-
|
|
610
|
-
**Remaining attempts:** ${remaining}
|
|
611
|
-
|
|
612
|
-
Please fix these issues and request another review.`,
|
|
613
|
-
threadId: epicId,
|
|
614
|
-
importance: "high",
|
|
615
|
-
});
|
|
572
|
+
// NO sendSwarmMessage for needs_changes - worker is dead
|
|
573
|
+
// Instead, return retry_context for coordinator to use with swarm_spawn_retry
|
|
616
574
|
|
|
617
575
|
return JSON.stringify(
|
|
618
576
|
{
|
|
@@ -622,7 +580,14 @@ Please fix these issues and request another review.`,
|
|
|
622
580
|
attempt: attemptNumber,
|
|
623
581
|
remaining_attempts: remaining,
|
|
624
582
|
issues: parsedIssues,
|
|
625
|
-
message: `
|
|
583
|
+
message: `Review feedback ready. ${remaining} attempt(s) remaining.`,
|
|
584
|
+
retry_context: {
|
|
585
|
+
task_id: args.task_id,
|
|
586
|
+
attempt: attemptNumber,
|
|
587
|
+
max_attempts: MAX_REVIEW_ATTEMPTS,
|
|
588
|
+
issues: parsedIssues,
|
|
589
|
+
next_action: "Use swarm_spawn_retry to spawn new worker with these issues",
|
|
590
|
+
},
|
|
626
591
|
},
|
|
627
592
|
null,
|
|
628
593
|
2
|