opencode-swarm-plugin 0.44.2 → 0.45.1

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.
Files changed (43) hide show
  1. package/README.md +277 -54
  2. package/bin/swarm.ts +156 -29
  3. package/dist/bin/swarm.js +125212 -0
  4. package/dist/decision-trace-integration.d.ts +204 -0
  5. package/dist/decision-trace-integration.d.ts.map +1 -0
  6. package/dist/hive.d.ts.map +1 -1
  7. package/dist/hive.js +9 -9
  8. package/dist/index.d.ts +32 -2
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +535 -27
  11. package/dist/plugin.js +295 -27
  12. package/dist/query-tools.d.ts +20 -12
  13. package/dist/query-tools.d.ts.map +1 -1
  14. package/dist/swarm-decompose.d.ts +4 -4
  15. package/dist/swarm-decompose.d.ts.map +1 -1
  16. package/dist/swarm-prompts.d.ts.map +1 -1
  17. package/dist/swarm-prompts.js +220 -22
  18. package/dist/swarm-review.d.ts.map +1 -1
  19. package/dist/swarm-signature.d.ts +106 -0
  20. package/dist/swarm-signature.d.ts.map +1 -0
  21. package/dist/swarm-strategies.d.ts +16 -3
  22. package/dist/swarm-strategies.d.ts.map +1 -1
  23. package/dist/swarm.d.ts +4 -2
  24. package/dist/swarm.d.ts.map +1 -1
  25. package/examples/commands/swarm.md +745 -0
  26. package/examples/plugin-wrapper-template.ts +2892 -0
  27. package/examples/skills/hive-workflow/SKILL.md +212 -0
  28. package/examples/skills/skill-creator/SKILL.md +223 -0
  29. package/examples/skills/swarm-coordination/SKILL.md +292 -0
  30. package/global-skills/cli-builder/SKILL.md +344 -0
  31. package/global-skills/cli-builder/references/advanced-patterns.md +244 -0
  32. package/global-skills/learning-systems/SKILL.md +644 -0
  33. package/global-skills/skill-creator/LICENSE.txt +202 -0
  34. package/global-skills/skill-creator/SKILL.md +352 -0
  35. package/global-skills/skill-creator/references/output-patterns.md +82 -0
  36. package/global-skills/skill-creator/references/workflows.md +28 -0
  37. package/global-skills/swarm-coordination/SKILL.md +995 -0
  38. package/global-skills/swarm-coordination/references/coordinator-patterns.md +235 -0
  39. package/global-skills/swarm-coordination/references/strategies.md +138 -0
  40. package/global-skills/system-design/SKILL.md +213 -0
  41. package/global-skills/testing-patterns/SKILL.md +430 -0
  42. package/global-skills/testing-patterns/references/dependency-breaking-catalog.md +586 -0
  43. package/package.json +6 -3
package/dist/plugin.js CHANGED
@@ -22560,7 +22560,7 @@ __export(exports_swarm_strategies, {
22560
22560
  NEGATIVE_MARKERS: () => NEGATIVE_MARKERS,
22561
22561
  DecompositionStrategySchema: () => DecompositionStrategySchema
22562
22562
  });
22563
- function selectStrategy(task) {
22563
+ async function selectStrategy(task, projectKey) {
22564
22564
  const taskLower = task.toLowerCase();
22565
22565
  const scores = {
22566
22566
  "file-based": 0,
@@ -22588,7 +22588,8 @@ function selectStrategy(task) {
22588
22588
  const [winner, winnerScore] = entries[0];
22589
22589
  const [, runnerUpScore] = entries[1] || [null, 0];
22590
22590
  const totalScore = entries.reduce((sum, [, score]) => sum + score, 0);
22591
- const confidence = totalScore > 0 ? Math.min(0.95, 0.5 + (winnerScore - runnerUpScore) / totalScore) : 0.5;
22591
+ let confidence = totalScore > 0 ? Math.min(0.95, 0.5 + (winnerScore - runnerUpScore) / totalScore) : 0.5;
22592
+ const finalStrategy = winnerScore === 0 ? "feature-based" : winner;
22592
22593
  let reasoning;
22593
22594
  if (winnerScore === 0) {
22594
22595
  reasoning = `No strong keyword signals. Defaulting to feature-based as it's most versatile.`;
@@ -22596,12 +22597,73 @@ function selectStrategy(task) {
22596
22597
  const matchedKeywords = STRATEGIES[winner].keywords.filter((k) => taskLower.includes(k));
22597
22598
  reasoning = `Matched keywords: ${matchedKeywords.join(", ")}. ${STRATEGIES[winner].description}`;
22598
22599
  }
22599
- const finalStrategy = winnerScore === 0 ? "feature-based" : winner;
22600
+ let precedent;
22601
+ if (projectKey) {
22602
+ try {
22603
+ const {
22604
+ createLibSQLAdapter,
22605
+ getDatabasePath,
22606
+ findSimilarDecisions,
22607
+ getStrategySuccessRates
22608
+ } = await import("swarm-mail");
22609
+ const dbPath = getDatabasePath(projectKey);
22610
+ const db = await createLibSQLAdapter({ url: `file:${dbPath}` });
22611
+ const similarDecisions = await findSimilarDecisions(db, task, 5);
22612
+ const successRates = await getStrategySuccessRates(db);
22613
+ precedent = {
22614
+ similar_decisions: similarDecisions.length
22615
+ };
22616
+ if (similarDecisions.length > 0) {
22617
+ const epicIds = [];
22618
+ for (const decision of similarDecisions) {
22619
+ try {
22620
+ const decisionData = typeof decision.decision === "string" ? JSON.parse(decision.decision) : decision.decision;
22621
+ if (decisionData.epic_id) {
22622
+ epicIds.push(decisionData.epic_id);
22623
+ }
22624
+ } catch {}
22625
+ }
22626
+ if (epicIds.length > 0) {
22627
+ precedent.cited_epics = epicIds;
22628
+ }
22629
+ const precedentStrategies = similarDecisions.map((d) => {
22630
+ try {
22631
+ const data = typeof d.decision === "string" ? JSON.parse(d.decision) : d.decision;
22632
+ return data.strategy;
22633
+ } catch {
22634
+ return null;
22635
+ }
22636
+ }).filter(Boolean);
22637
+ const agreesWithKeywords = precedentStrategies.includes(finalStrategy);
22638
+ if (agreesWithKeywords) {
22639
+ confidence = Math.min(0.95, confidence + 0.1);
22640
+ reasoning += ` Precedent confirms: ${precedent.similar_decisions} similar decision(s) also chose ${finalStrategy}.`;
22641
+ }
22642
+ }
22643
+ const strategyRate = successRates.find((r) => r.strategy === finalStrategy);
22644
+ if (strategyRate) {
22645
+ precedent.strategy_success_rate = strategyRate.success_rate;
22646
+ if (strategyRate.success_rate >= 0.7) {
22647
+ confidence = Math.min(0.95, confidence + 0.05);
22648
+ reasoning += ` ${finalStrategy} has ${Math.round(strategyRate.success_rate * 100)}% success rate.`;
22649
+ } else if (strategyRate.success_rate < 0.3) {
22650
+ confidence = Math.max(0.1, confidence - 0.1);
22651
+ reasoning += ` Warning: ${finalStrategy} has low success rate (${Math.round(strategyRate.success_rate * 100)}%).`;
22652
+ }
22653
+ }
22654
+ if (db.close) {
22655
+ await db.close();
22656
+ }
22657
+ } catch (error45) {
22658
+ console.warn("Failed to query precedent data:", error45);
22659
+ }
22660
+ }
22600
22661
  return {
22601
22662
  strategy: finalStrategy,
22602
22663
  confidence,
22603
22664
  reasoning,
22604
- alternatives: entries.filter(([s]) => s !== finalStrategy).map(([strategy, score]) => ({ strategy, score }))
22665
+ alternatives: entries.filter(([s]) => s !== finalStrategy).map(([strategy, score]) => ({ strategy, score })),
22666
+ precedent
22605
22667
  };
22606
22668
  }
22607
22669
  function formatStrategyGuidelines(strategy) {
@@ -22810,13 +22872,14 @@ var init_swarm_strategies = __esm(() => {
22810
22872
  }
22811
22873
  };
22812
22874
  swarm_select_strategy = tool({
22813
- description: "Analyze task and recommend decomposition strategy (file-based, feature-based, or risk-based)",
22875
+ description: "Analyze task and recommend decomposition strategy (file-based, feature-based, or risk-based) with optional precedent data",
22814
22876
  args: {
22815
22877
  task: tool.schema.string().min(1).describe("Task description to analyze"),
22816
- codebase_context: tool.schema.string().optional().describe("Optional codebase context (file structure, tech stack, etc.)")
22878
+ codebase_context: tool.schema.string().optional().describe("Optional codebase context (file structure, tech stack, etc.)"),
22879
+ projectKey: tool.schema.string().optional().describe("Optional project path for precedent-aware strategy selection")
22817
22880
  },
22818
22881
  async execute(args) {
22819
- const result = selectStrategy(args.task);
22882
+ const result = await selectStrategy(args.task, args.projectKey);
22820
22883
  let enhancedReasoning = result.reasoning;
22821
22884
  if (args.codebase_context) {
22822
22885
  enhancedReasoning += `
@@ -22834,7 +22897,8 @@ Codebase context considered: ${args.codebase_context.slice(0, 200)}...`;
22834
22897
  strategy: alt.strategy,
22835
22898
  description: STRATEGIES[alt.strategy].description,
22836
22899
  score: alt.score
22837
- }))
22900
+ })),
22901
+ precedent: result.precedent
22838
22902
  }, null, 2);
22839
22903
  }
22840
22904
  });
@@ -39017,7 +39081,8 @@ import {
39017
39081
  importFromJSONL,
39018
39082
  syncMemories,
39019
39083
  getSwarmMailLibSQL,
39020
- resolvePartialId
39084
+ resolvePartialId,
39085
+ findCellsByPartialId
39021
39086
  } from "swarm-mail";
39022
39087
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
39023
39088
  import { join as join2 } from "node:path";
@@ -40164,13 +40229,12 @@ PREFER THIS OVER hive_query when you need to:
40164
40229
  const adapter = await getHiveAdapter(projectKey);
40165
40230
  try {
40166
40231
  if (args.id) {
40167
- const fullId = await resolvePartialId(adapter, projectKey, args.id) || args.id;
40168
- const cell = await adapter.getCell(projectKey, fullId);
40169
- if (!cell) {
40232
+ const matchingCells = await findCellsByPartialId(adapter, projectKey, args.id);
40233
+ if (matchingCells.length === 0) {
40170
40234
  throw new HiveError(`No cell found matching ID '${args.id}'`, "hive_cells");
40171
40235
  }
40172
- const formatted2 = formatCellForOutput(cell);
40173
- return JSON.stringify([formatted2], null, 2);
40236
+ const formatted2 = matchingCells.map((c) => formatCellForOutput(c));
40237
+ return JSON.stringify(formatted2, null, 2);
40174
40238
  }
40175
40239
  if (args.ready) {
40176
40240
  const ready = await adapter.getNextReadyCell(projectKey);
@@ -40189,10 +40253,10 @@ PREFER THIS OVER hive_query when you need to:
40189
40253
  const formatted = cells.map((c) => formatCellForOutput(c));
40190
40254
  return JSON.stringify(formatted, null, 2);
40191
40255
  } catch (error45) {
40192
- const message = error45 instanceof Error ? error45.message : String(error45);
40193
- if (message.includes("Ambiguous hash")) {
40194
- throw new HiveError(`Ambiguous ID '${args.id}': multiple cells match. Please provide more characters.`, "hive_cells");
40256
+ if (error45 instanceof HiveError) {
40257
+ throw error45;
40195
40258
  }
40259
+ const message = error45 instanceof Error ? error45.message : String(error45);
40196
40260
  if (message.includes("Bead not found") || message.includes("Cell not found")) {
40197
40261
  throw new HiveError(`No cell found matching ID '${args.id || "unknown"}'`, "hive_cells");
40198
40262
  }
@@ -42501,6 +42565,139 @@ init_dist();
42501
42565
  init_zod();
42502
42566
  init_swarm_strategies();
42503
42567
  init_eval_capture();
42568
+
42569
+ // src/decision-trace-integration.ts
42570
+ import {
42571
+ createDecisionTrace,
42572
+ createEntityLink
42573
+ } from "swarm-mail";
42574
+ import { createLibSQLAdapter } from "swarm-mail";
42575
+ import { getDatabasePath } from "swarm-mail";
42576
+ async function getTraceDb(projectPath) {
42577
+ const dbPath = getDatabasePath(projectPath);
42578
+ return createLibSQLAdapter({ url: `file:${dbPath}` });
42579
+ }
42580
+ function extractMemoryIds(precedentCited) {
42581
+ if (!precedentCited) {
42582
+ return [];
42583
+ }
42584
+ if (precedentCited.memoryIds && Array.isArray(precedentCited.memoryIds)) {
42585
+ return precedentCited.memoryIds;
42586
+ }
42587
+ if (precedentCited.memoryId) {
42588
+ return [precedentCited.memoryId];
42589
+ }
42590
+ return [];
42591
+ }
42592
+ async function traceStrategySelection(input) {
42593
+ try {
42594
+ const db = await getTraceDb(input.projectKey);
42595
+ const trace = await createDecisionTrace(db, {
42596
+ decision_type: "strategy_selection",
42597
+ epic_id: input.epicId,
42598
+ bead_id: input.beadId,
42599
+ agent_name: input.agentName,
42600
+ project_key: input.projectKey,
42601
+ decision: {
42602
+ strategy: input.strategy,
42603
+ confidence: input.confidence,
42604
+ task_preview: input.taskPreview
42605
+ },
42606
+ rationale: input.reasoning,
42607
+ inputs_gathered: input.inputsGathered,
42608
+ alternatives: input.alternatives,
42609
+ precedent_cited: input.precedentCited
42610
+ });
42611
+ const memoryIds = extractMemoryIds(input.precedentCited);
42612
+ for (const memoryId of memoryIds) {
42613
+ await createEntityLink(db, {
42614
+ source_decision_id: trace.id,
42615
+ target_entity_type: "memory",
42616
+ target_entity_id: memoryId,
42617
+ link_type: "cites_precedent",
42618
+ strength: input.precedentCited?.similarity ?? 1,
42619
+ context: "Cited as precedent for strategy selection"
42620
+ });
42621
+ }
42622
+ await db.close?.();
42623
+ return trace.id;
42624
+ } catch (error45) {
42625
+ console.warn("[decision-trace] Failed to trace strategy_selection:", error45);
42626
+ return "";
42627
+ }
42628
+ }
42629
+ async function traceWorkerSpawn(input) {
42630
+ try {
42631
+ const db = await getTraceDb(input.projectKey);
42632
+ const trace = await createDecisionTrace(db, {
42633
+ decision_type: "worker_spawn",
42634
+ epic_id: input.epicId,
42635
+ bead_id: input.beadId,
42636
+ agent_name: input.agentName,
42637
+ project_key: input.projectKey,
42638
+ decision: {
42639
+ worker: input.workerName || "worker",
42640
+ subtask_title: input.subtaskTitle,
42641
+ files: input.files,
42642
+ model: input.model,
42643
+ spawn_order: input.spawnOrder,
42644
+ is_parallel: input.isParallel
42645
+ },
42646
+ rationale: input.rationale || `Spawning worker for: ${input.subtaskTitle}`
42647
+ });
42648
+ for (const file2 of input.files) {
42649
+ await createEntityLink(db, {
42650
+ source_decision_id: trace.id,
42651
+ target_entity_type: "file",
42652
+ target_entity_id: file2,
42653
+ link_type: "assigns_file",
42654
+ strength: 1,
42655
+ context: `File assigned to worker ${input.workerName || "worker"}`
42656
+ });
42657
+ }
42658
+ await db.close?.();
42659
+ return trace.id;
42660
+ } catch (error45) {
42661
+ console.warn("[decision-trace] Failed to trace worker_spawn:", error45);
42662
+ return "";
42663
+ }
42664
+ }
42665
+ async function traceReviewDecision(input) {
42666
+ try {
42667
+ const db = await getTraceDb(input.projectKey);
42668
+ const trace = await createDecisionTrace(db, {
42669
+ decision_type: "review_decision",
42670
+ epic_id: input.epicId,
42671
+ bead_id: input.beadId,
42672
+ agent_name: input.agentName,
42673
+ project_key: input.projectKey,
42674
+ decision: {
42675
+ status: input.status,
42676
+ worker_id: input.workerId,
42677
+ issues_count: input.issues?.length || 0,
42678
+ attempt_number: input.attemptNumber,
42679
+ remaining_attempts: input.remainingAttempts
42680
+ },
42681
+ rationale: input.rationale || input.summary || `Review ${input.status}`,
42682
+ inputs_gathered: input.issues ? [{ source: "code_review", issues: input.issues }] : undefined
42683
+ });
42684
+ await createEntityLink(db, {
42685
+ source_decision_id: trace.id,
42686
+ target_entity_type: "agent",
42687
+ target_entity_id: input.workerId,
42688
+ link_type: "reviewed_work_by",
42689
+ strength: 1,
42690
+ context: `Review ${input.status} for ${input.workerId}`
42691
+ });
42692
+ await db.close?.();
42693
+ return trace.id;
42694
+ } catch (error45) {
42695
+ console.warn("[decision-trace] Failed to trace review_decision:", error45);
42696
+ return "";
42697
+ }
42698
+ }
42699
+
42700
+ // src/swarm-decompose.ts
42504
42701
  var DECOMPOSITION_PROMPT = `You are decomposing a task into parallelizable subtasks for a swarm of agents.
42505
42702
 
42506
42703
  ## Task
@@ -42932,7 +43129,7 @@ var swarm_delegate_planning = tool({
42932
43129
  selectedStrategy = args.strategy;
42933
43130
  strategyReasoning = `User-specified strategy: ${selectedStrategy}`;
42934
43131
  } else {
42935
- const selection = selectStrategy2(args.task);
43132
+ const selection = await selectStrategy2(args.task);
42936
43133
  selectedStrategy = selection.strategy;
42937
43134
  strategyReasoning = selection.reasoning;
42938
43135
  }
@@ -42974,6 +43171,27 @@ var swarm_delegate_planning = tool({
42974
43171
  } else {
42975
43172
  cassResultInfo = { queried: false, reason: "disabled" };
42976
43173
  }
43174
+ try {
43175
+ await traceStrategySelection({
43176
+ projectKey: args.context?.includes("/") ? args.context.split(" ")[0] : process.cwd(),
43177
+ agentName: "coordinator",
43178
+ epicId: undefined,
43179
+ strategy: selectedStrategy,
43180
+ reasoning: strategyReasoning,
43181
+ confidence: undefined,
43182
+ taskPreview: args.task.slice(0, 200),
43183
+ inputsGathered: cassResultInfo.queried ? [
43184
+ {
43185
+ source: "cass",
43186
+ query: args.task,
43187
+ results: cassResultInfo.results_found ?? 0
43188
+ }
43189
+ ] : undefined,
43190
+ alternatives: undefined
43191
+ });
43192
+ } catch (error45) {
43193
+ console.warn("[swarm_delegate_planning] Failed to trace strategy_selection:", error45);
43194
+ }
42977
43195
  let skillsContext = "";
42978
43196
  let skillsInfo = {
42979
43197
  included: false
@@ -43092,7 +43310,7 @@ Limit: ${memoryQuery.limit}`;
43092
43310
  }
43093
43311
  } catch (error45) {}
43094
43312
  if (mode === "fast") {
43095
- const strategyResult = selectStrategy2(args.task);
43313
+ const strategyResult = await selectStrategy2(args.task);
43096
43314
  const guidelines = formatStrategyGuidelines2(strategyResult.strategy);
43097
43315
  const output = {
43098
43316
  mode: "fast",
@@ -43111,7 +43329,7 @@ ${guidelines}`
43111
43329
  return JSON.stringify(output, null, 2);
43112
43330
  }
43113
43331
  if (mode === "auto") {
43114
- const strategyResult = selectStrategy2(args.task);
43332
+ const strategyResult = await selectStrategy2(args.task);
43115
43333
  const output = {
43116
43334
  mode: "auto",
43117
43335
  phase: "ready",
@@ -43206,7 +43424,7 @@ ${guidelines}`
43206
43424
  return JSON.stringify(output, null, 2);
43207
43425
  }
43208
43426
  if (currentPhase === "alternatives") {
43209
- const strategyResult = selectStrategy2(args.task);
43427
+ const strategyResult = await selectStrategy2(args.task);
43210
43428
  const alternatives = [];
43211
43429
  alternatives.push({
43212
43430
  name: strategyResult.strategy,
@@ -43233,7 +43451,7 @@ ${guidelines}`
43233
43451
  return JSON.stringify(output, null, 2);
43234
43452
  }
43235
43453
  if (currentPhase === "recommendation") {
43236
- const strategyResult = selectStrategy2(args.task);
43454
+ const strategyResult = await selectStrategy2(args.task);
43237
43455
  const guidelines = formatStrategyGuidelines2(strategyResult.strategy);
43238
43456
  const output = {
43239
43457
  mode: "socratic",
@@ -45304,6 +45522,22 @@ var swarm_review_feedback = tool({
45304
45522
  } catch (error45) {
45305
45523
  console.warn("[swarm_review_feedback] Failed to capture review_completed:", error45);
45306
45524
  }
45525
+ try {
45526
+ await traceReviewDecision({
45527
+ projectKey: args.project_key,
45528
+ agentName: "coordinator",
45529
+ epicId,
45530
+ beadId: args.task_id,
45531
+ workerId: args.worker_id,
45532
+ status: "approved",
45533
+ summary: args.summary,
45534
+ attemptNumber: 1,
45535
+ remainingAttempts: MAX_REVIEW_ATTEMPTS,
45536
+ rationale: args.summary || "Review approved"
45537
+ });
45538
+ } catch (error45) {
45539
+ console.warn("[swarm_review_feedback] Failed to trace review_decision:", error45);
45540
+ }
45307
45541
  try {
45308
45542
  const { createEvent: createEvent2, appendEvent: appendEvent2 } = await import("swarm-mail");
45309
45543
  const attempt = getReviewStatus(args.task_id).attempt_count || 1;
@@ -45358,6 +45592,23 @@ You may now complete the task with \`swarm_complete\`.`,
45358
45592
  } catch (error45) {
45359
45593
  console.warn("[swarm_review_feedback] Failed to capture review_completed:", error45);
45360
45594
  }
45595
+ try {
45596
+ await traceReviewDecision({
45597
+ projectKey: args.project_key,
45598
+ agentName: "coordinator",
45599
+ epicId,
45600
+ beadId: args.task_id,
45601
+ workerId: args.worker_id,
45602
+ status: "needs_changes",
45603
+ summary: args.summary,
45604
+ issues: parsedIssues,
45605
+ attemptNumber,
45606
+ remainingAttempts: remaining,
45607
+ rationale: args.summary || `Review rejected: ${parsedIssues.length} issue(s) found`
45608
+ });
45609
+ } catch (error45) {
45610
+ console.warn("[swarm_review_feedback] Failed to trace review_decision:", error45);
45611
+ }
45361
45612
  try {
45362
45613
  const { createEvent: createEvent2, appendEvent: appendEvent2 } = await import("swarm-mail");
45363
45614
  const status = remaining <= 0 ? "blocked" : "needs_changes";
@@ -61534,9 +61785,9 @@ async function getPromptInsights(options2) {
61534
61785
  }
61535
61786
  async function getCoordinatorInsights(project_key) {
61536
61787
  try {
61537
- const { createLibSQLAdapter, createSwarmMailAdapter: createSwarmMailAdapter2 } = await import("swarm-mail");
61788
+ const { createLibSQLAdapter: createLibSQLAdapter2, createSwarmMailAdapter: createSwarmMailAdapter2 } = await import("swarm-mail");
61538
61789
  const { getStrategyInsights: getStrategyInsights2, getPatternInsights: getPatternInsights2, formatInsightsForPrompt: formatInsightsForPrompt2 } = await Promise.resolve().then(() => (init_swarm_insights(), exports_swarm_insights));
61539
- const dbAdapter = await createLibSQLAdapter({ url: "file:./.swarm-mail/streams.db" });
61790
+ const dbAdapter = await createLibSQLAdapter2({ url: "file:./.swarm-mail/streams.db" });
61540
61791
  const adapter = createSwarmMailAdapter2(dbAdapter, project_key || "default");
61541
61792
  const [strategies, patterns] = await Promise.all([
61542
61793
  getStrategyInsights2(adapter, ""),
@@ -61564,7 +61815,7 @@ ${formatted}
61564
61815
  }
61565
61816
  async function getWorkerInsights(files, domain2) {
61566
61817
  try {
61567
- const { createLibSQLAdapter, createSwarmMailAdapter: createSwarmMailAdapter2 } = await import("swarm-mail");
61818
+ const { createLibSQLAdapter: createLibSQLAdapter2, createSwarmMailAdapter: createSwarmMailAdapter2 } = await import("swarm-mail");
61568
61819
  const { getFileInsights: getFileInsights2, formatInsightsForPrompt: formatInsightsForPrompt2 } = await Promise.resolve().then(() => (init_swarm_insights(), exports_swarm_insights));
61569
61820
  const memoryAdapter = await getMemoryAdapter();
61570
61821
  let query = "";
@@ -61581,7 +61832,7 @@ async function getWorkerInsights(files, domain2) {
61581
61832
  if (!files || files.length === 0)
61582
61833
  return [];
61583
61834
  try {
61584
- const dbAdapter = await createLibSQLAdapter({ url: "file:./.swarm-mail/streams.db" });
61835
+ const dbAdapter = await createLibSQLAdapter2({ url: "file:./.swarm-mail/streams.db" });
61585
61836
  const swarmMail = createSwarmMailAdapter2(dbAdapter, "default");
61586
61837
  return await getFileInsights2(swarmMail, files);
61587
61838
  } catch (e) {
@@ -61790,6 +62041,23 @@ var swarm_spawn_subtask = tool({
61790
62041
  } catch (error45) {
61791
62042
  console.warn("[swarm_spawn_subtask] Failed to capture worker_spawned:", error45);
61792
62043
  }
62044
+ try {
62045
+ await traceWorkerSpawn({
62046
+ projectKey: args2.project_path || process.cwd(),
62047
+ agentName: "coordinator",
62048
+ epicId: args2.epic_id,
62049
+ beadId: args2.bead_id,
62050
+ workerName: "worker",
62051
+ subtaskTitle: args2.subtask_title,
62052
+ files: args2.files,
62053
+ model: selectedModel,
62054
+ spawnOrder: 0,
62055
+ isParallel: false,
62056
+ rationale: args2.subtask_description || `Spawning worker for: ${args2.subtask_title}`
62057
+ });
62058
+ } catch (error45) {
62059
+ console.warn("[swarm_spawn_subtask] Failed to trace worker_spawn:", error45);
62060
+ }
61793
62061
  if (args2.project_path) {
61794
62062
  try {
61795
62063
  const { createEvent: createEvent3, appendEvent: appendEvent3 } = await import("swarm-mail");
@@ -62019,7 +62287,7 @@ var swarm_plan_prompt = tool({
62019
62287
  selectedStrategy = args2.strategy;
62020
62288
  strategyReasoning = `User-specified strategy: ${selectedStrategy}`;
62021
62289
  } else {
62022
- const selection = selectStrategy2(args2.task);
62290
+ const selection = await selectStrategy2(args2.task);
62023
62291
  selectedStrategy = selection.strategy;
62024
62292
  strategyReasoning = selection.reasoning;
62025
62293
  }
@@ -2,12 +2,11 @@
2
2
  * GREEN PHASE: SQL Query Tools Implementation
3
3
  *
4
4
  * Provides:
5
- * - 10 preset queries for observability insights
5
+ * - 13 preset queries for observability insights (10 base + 3 decision trace)
6
6
  * - Custom SQL execution with timing
7
7
  * - 3 output formats: Table (box-drawing), CSV, JSON
8
8
  */
9
- import type { DatabaseAdapter } from "swarm-mail";
10
- export type PresetQueryName = "failed_decompositions" | "duration_by_strategy" | "file_conflicts" | "worker_success_rate" | "review_rejections" | "blocked_tasks" | "agent_activity" | "event_frequency" | "error_patterns" | "compaction_stats";
9
+ export type PresetQueryName = "failed_decompositions" | "duration_by_strategy" | "file_conflicts" | "worker_success_rate" | "review_rejections" | "blocked_tasks" | "agent_activity" | "event_frequency" | "error_patterns" | "compaction_stats" | "decision_quality" | "strategy_success_rates" | "decisions_by_pattern";
11
10
  export interface QueryResult {
12
11
  columns: string[];
13
12
  rows: Record<string, unknown>[];
@@ -16,14 +15,23 @@ export interface QueryResult {
16
15
  }
17
16
  export declare const presetQueries: Record<PresetQueryName, string>;
18
17
  /**
19
- * Execute custom SQL against the events table.
18
+ * Execute custom SQL query (CLI wrapper).
19
+ * Creates database adapter automatically.
20
20
  *
21
- * @param db - DatabaseAdapter instance
21
+ * @param projectPath - Project path (unused, queries global database)
22
22
  * @param sql - SQL query string
23
- * @param params - Optional parameterized query values
24
- * @returns QueryResult with rows, columns, timing
23
+ * @returns Raw rows array for CLI formatting
25
24
  */
26
- export declare function executeQuery(db: DatabaseAdapter, sql: string, params?: unknown[]): Promise<QueryResult>;
25
+ export declare function executeQuery(projectPath: string, sql: string): Promise<any[]>;
26
+ /**
27
+ * Execute a preset query by name (CLI wrapper).
28
+ * Creates database adapter automatically.
29
+ *
30
+ * @param projectPath - Project path (unused, queries global database)
31
+ * @param presetName - Name of the preset query
32
+ * @returns Raw rows array for CLI formatting
33
+ */
34
+ export declare function executePreset(projectPath: string, presetName: string): Promise<any[]>;
27
35
  /**
28
36
  * Format query result as aligned table with box-drawing characters.
29
37
  *
@@ -34,9 +42,9 @@ export declare function executeQuery(db: DatabaseAdapter, sql: string, params?:
34
42
  * │ AgentA │ 5 │
35
43
  * │ AgentB │ 3 │
36
44
  * └──────────┴───────┘
37
- * 2 rows in 5.2ms
45
+ * 2 rows
38
46
  */
39
- export declare function formatAsTable(result: QueryResult): string;
47
+ export declare function formatAsTable(rows: Record<string, unknown>[]): string;
40
48
  /**
41
49
  * Format query result as CSV with proper escaping.
42
50
  *
@@ -45,7 +53,7 @@ export declare function formatAsTable(result: QueryResult): string;
45
53
  * - Quotes → double them
46
54
  * - Newlines → wrap in quotes
47
55
  */
48
- export declare function formatAsCSV(result: QueryResult): string;
56
+ export declare function formatAsCSV(rows: Record<string, unknown>[]): string;
49
57
  /**
50
58
  * Format query result as pretty-printed JSON array.
51
59
  *
@@ -55,5 +63,5 @@ export declare function formatAsCSV(result: QueryResult): string;
55
63
  * { "name": "AgentB", "count": 3 }
56
64
  * ]
57
65
  */
58
- export declare function formatAsJSON(result: QueryResult): string;
66
+ export declare function formatAsJSON(rows: Record<string, unknown>[]): string;
59
67
  //# sourceMappingURL=query-tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-tools.d.ts","sourceRoot":"","sources":["../src/query-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAMlD,MAAM,MAAM,eAAe,GACxB,uBAAuB,GACvB,sBAAsB,GACtB,gBAAgB,GAChB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AE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;CACxB;AAMD,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAgKzD,CAAC;AAgFF;;;;;;;GAOG;AACH,wBAAsB,YAAY,CACjC,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,GAAG,EAAE,CAAC,CAIhB;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAClC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,EAAE,CAAC,CAIhB;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,MAAM,CAmErE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,MAAM,CA2BnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,MAAM,CAEpE"}
@@ -193,8 +193,8 @@ export declare const swarm_plan_interactive: {
193
193
  user_response: z.ZodOptional<z.ZodString>;
194
194
  phase: z.ZodOptional<z.ZodEnum<{
195
195
  ready: "ready";
196
- questioning: "questioning";
197
196
  alternatives: "alternatives";
197
+ questioning: "questioning";
198
198
  recommendation: "recommendation";
199
199
  }>>;
200
200
  };
@@ -203,7 +203,7 @@ export declare const swarm_plan_interactive: {
203
203
  mode: "auto" | "socratic" | "fast" | "confirm-only";
204
204
  context?: string | undefined;
205
205
  user_response?: string | undefined;
206
- phase?: "ready" | "questioning" | "alternatives" | "recommendation" | undefined;
206
+ phase?: "ready" | "alternatives" | "questioning" | "recommendation" | undefined;
207
207
  }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
208
208
  };
209
209
  export declare const decomposeTools: {
@@ -280,8 +280,8 @@ export declare const decomposeTools: {
280
280
  user_response: z.ZodOptional<z.ZodString>;
281
281
  phase: z.ZodOptional<z.ZodEnum<{
282
282
  ready: "ready";
283
- questioning: "questioning";
284
283
  alternatives: "alternatives";
284
+ questioning: "questioning";
285
285
  recommendation: "recommendation";
286
286
  }>>;
287
287
  };
@@ -290,7 +290,7 @@ export declare const decomposeTools: {
290
290
  mode: "auto" | "socratic" | "fast" | "confirm-only";
291
291
  context?: string | undefined;
292
292
  user_response?: string | undefined;
293
- phase?: "ready" | "questioning" | "alternatives" | "recommendation" | undefined;
293
+ phase?: "ready" | "alternatives" | "questioning" | "recommendation" | undefined;
294
294
  }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
295
295
  };
296
296
  };
@@ -1 +1 @@
1
- {"version":3,"file":"swarm-decompose.d.ts","sourceRoot":"","sources":["../src/swarm-decompose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyJxB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,mBAAmB,GAAG,eAAe,CAAC;IACrD,WAAW,EAAE,MAAM,CAAC;CACrB;AA8CD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GACvD,mBAAmB,EAAE,CAmDvB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,GACnC,MAAM,EAAE,CAgBV;AA+GD;;;;;;;G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