opencode-swarm-plugin 0.56.0 → 0.57.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.
Files changed (186) hide show
  1. package/README.md +21 -0
  2. package/claude-plugin/.claude-plugin/plugin.json +1 -4
  3. package/claude-plugin/agents/background-worker.md +1 -0
  4. package/claude-plugin/agents/coordinator.md +1 -0
  5. package/claude-plugin/agents/worker.md +1 -0
  6. package/claude-plugin/bin/swarm-mcp-server.ts +47 -8
  7. package/claude-plugin/commands/hive.md +1 -1
  8. package/claude-plugin/commands/swarm.md +5 -1
  9. package/claude-plugin/dist/agent-mail.d.ts +480 -0
  10. package/claude-plugin/dist/agent-mail.d.ts.map +1 -0
  11. package/claude-plugin/dist/anti-patterns.d.ts +257 -0
  12. package/claude-plugin/dist/anti-patterns.d.ts.map +1 -0
  13. package/claude-plugin/dist/bin/swarm.js +373128 -0
  14. package/claude-plugin/dist/cass-tools.d.ts +74 -0
  15. package/claude-plugin/dist/cass-tools.d.ts.map +1 -0
  16. package/claude-plugin/dist/claude-plugin/claude-plugin-assets.d.ts +10 -0
  17. package/claude-plugin/dist/claude-plugin/claude-plugin-assets.d.ts.map +1 -0
  18. package/claude-plugin/dist/compaction-hook.d.ts +178 -0
  19. package/claude-plugin/dist/compaction-hook.d.ts.map +1 -0
  20. package/claude-plugin/dist/compaction-observability.d.ts +173 -0
  21. package/claude-plugin/dist/compaction-observability.d.ts.map +1 -0
  22. package/claude-plugin/dist/compaction-prompt-scoring.d.ts +125 -0
  23. package/claude-plugin/dist/compaction-prompt-scoring.d.ts.map +1 -0
  24. package/claude-plugin/dist/compaction-prompt-scoring.js +139 -0
  25. package/claude-plugin/dist/contributor-tools.d.ts +42 -0
  26. package/claude-plugin/dist/contributor-tools.d.ts.map +1 -0
  27. package/claude-plugin/dist/coordinator-guard.d.ts +79 -0
  28. package/claude-plugin/dist/coordinator-guard.d.ts.map +1 -0
  29. package/claude-plugin/dist/dashboard.d.ts +82 -0
  30. package/claude-plugin/dist/dashboard.d.ts.map +1 -0
  31. package/claude-plugin/dist/decision-trace-integration.d.ts +204 -0
  32. package/claude-plugin/dist/decision-trace-integration.d.ts.map +1 -0
  33. package/claude-plugin/dist/error-enrichment.d.ts +49 -0
  34. package/claude-plugin/dist/error-enrichment.d.ts.map +1 -0
  35. package/claude-plugin/dist/eval-capture.d.ts +494 -0
  36. package/claude-plugin/dist/eval-capture.d.ts.map +1 -0
  37. package/claude-plugin/dist/eval-capture.js +12844 -0
  38. package/claude-plugin/dist/eval-gates.d.ts +84 -0
  39. package/claude-plugin/dist/eval-gates.d.ts.map +1 -0
  40. package/claude-plugin/dist/eval-history.d.ts +117 -0
  41. package/claude-plugin/dist/eval-history.d.ts.map +1 -0
  42. package/claude-plugin/dist/eval-learning.d.ts +216 -0
  43. package/claude-plugin/dist/eval-learning.d.ts.map +1 -0
  44. package/claude-plugin/dist/eval-runner.d.ts +134 -0
  45. package/claude-plugin/dist/eval-runner.d.ts.map +1 -0
  46. package/claude-plugin/dist/examples/plugin-wrapper-template.ts +3341 -0
  47. package/claude-plugin/dist/export-tools.d.ts +76 -0
  48. package/claude-plugin/dist/export-tools.d.ts.map +1 -0
  49. package/claude-plugin/dist/hive.d.ts +949 -0
  50. package/claude-plugin/dist/hive.d.ts.map +1 -0
  51. package/claude-plugin/dist/hive.js +15009 -0
  52. package/claude-plugin/dist/hivemind-tools.d.ts +479 -0
  53. package/claude-plugin/dist/hivemind-tools.d.ts.map +1 -0
  54. package/claude-plugin/dist/hooks/atomic-write.d.ts +21 -0
  55. package/claude-plugin/dist/hooks/atomic-write.d.ts.map +1 -0
  56. package/claude-plugin/dist/hooks/constants.d.ts +28 -0
  57. package/claude-plugin/dist/hooks/constants.d.ts.map +1 -0
  58. package/claude-plugin/dist/hooks/index.d.ts +16 -0
  59. package/claude-plugin/dist/hooks/index.d.ts.map +1 -0
  60. package/claude-plugin/dist/hooks/session-start.d.ts +30 -0
  61. package/claude-plugin/dist/hooks/session-start.d.ts.map +1 -0
  62. package/claude-plugin/dist/hooks/tool-complete.d.ts +54 -0
  63. package/claude-plugin/dist/hooks/tool-complete.d.ts.map +1 -0
  64. package/claude-plugin/dist/index.d.ts +2017 -0
  65. package/claude-plugin/dist/index.d.ts.map +1 -0
  66. package/claude-plugin/dist/index.js +73453 -0
  67. package/claude-plugin/dist/learning.d.ts +700 -0
  68. package/claude-plugin/dist/learning.d.ts.map +1 -0
  69. package/claude-plugin/dist/logger.d.ts +38 -0
  70. package/claude-plugin/dist/logger.d.ts.map +1 -0
  71. package/claude-plugin/dist/mandate-promotion.d.ts +93 -0
  72. package/claude-plugin/dist/mandate-promotion.d.ts.map +1 -0
  73. package/claude-plugin/dist/mandate-storage.d.ts +209 -0
  74. package/claude-plugin/dist/mandate-storage.d.ts.map +1 -0
  75. package/claude-plugin/dist/mandates.d.ts +230 -0
  76. package/claude-plugin/dist/mandates.d.ts.map +1 -0
  77. package/claude-plugin/dist/memory-tools.d.ts +281 -0
  78. package/claude-plugin/dist/memory-tools.d.ts.map +1 -0
  79. package/claude-plugin/dist/memory.d.ts +164 -0
  80. package/claude-plugin/dist/memory.d.ts.map +1 -0
  81. package/claude-plugin/dist/model-selection.d.ts +37 -0
  82. package/claude-plugin/dist/model-selection.d.ts.map +1 -0
  83. package/claude-plugin/dist/observability-health.d.ts +87 -0
  84. package/claude-plugin/dist/observability-health.d.ts.map +1 -0
  85. package/claude-plugin/dist/observability-tools.d.ts +184 -0
  86. package/claude-plugin/dist/observability-tools.d.ts.map +1 -0
  87. package/claude-plugin/dist/output-guardrails.d.ts +125 -0
  88. package/claude-plugin/dist/output-guardrails.d.ts.map +1 -0
  89. package/claude-plugin/dist/pattern-maturity.d.ts +246 -0
  90. package/claude-plugin/dist/pattern-maturity.d.ts.map +1 -0
  91. package/claude-plugin/dist/planning-guardrails.d.ts +183 -0
  92. package/claude-plugin/dist/planning-guardrails.d.ts.map +1 -0
  93. package/claude-plugin/dist/plugin.d.ts +22 -0
  94. package/claude-plugin/dist/plugin.d.ts.map +1 -0
  95. package/claude-plugin/dist/plugin.js +72295 -0
  96. package/claude-plugin/dist/post-compaction-tracker.d.ts +133 -0
  97. package/claude-plugin/dist/post-compaction-tracker.d.ts.map +1 -0
  98. package/claude-plugin/dist/query-tools.d.ts +90 -0
  99. package/claude-plugin/dist/query-tools.d.ts.map +1 -0
  100. package/claude-plugin/dist/rate-limiter.d.ts +218 -0
  101. package/claude-plugin/dist/rate-limiter.d.ts.map +1 -0
  102. package/claude-plugin/dist/regression-detection.d.ts +58 -0
  103. package/claude-plugin/dist/regression-detection.d.ts.map +1 -0
  104. package/claude-plugin/dist/replay-tools.d.ts +28 -0
  105. package/claude-plugin/dist/replay-tools.d.ts.map +1 -0
  106. package/claude-plugin/dist/repo-crawl.d.ts +146 -0
  107. package/claude-plugin/dist/repo-crawl.d.ts.map +1 -0
  108. package/claude-plugin/dist/schemas/cell-events.d.ts +1352 -0
  109. package/claude-plugin/dist/schemas/cell-events.d.ts.map +1 -0
  110. package/claude-plugin/dist/schemas/cell.d.ts +413 -0
  111. package/claude-plugin/dist/schemas/cell.d.ts.map +1 -0
  112. package/claude-plugin/dist/schemas/evaluation.d.ts +161 -0
  113. package/claude-plugin/dist/schemas/evaluation.d.ts.map +1 -0
  114. package/claude-plugin/dist/schemas/index.d.ts +46 -0
  115. package/claude-plugin/dist/schemas/index.d.ts.map +1 -0
  116. package/claude-plugin/dist/schemas/mandate.d.ts +336 -0
  117. package/claude-plugin/dist/schemas/mandate.d.ts.map +1 -0
  118. package/claude-plugin/dist/schemas/swarm-context.d.ts +131 -0
  119. package/claude-plugin/dist/schemas/swarm-context.d.ts.map +1 -0
  120. package/claude-plugin/dist/schemas/task.d.ts +189 -0
  121. package/claude-plugin/dist/schemas/task.d.ts.map +1 -0
  122. package/claude-plugin/dist/schemas/worker-handoff.d.ts +78 -0
  123. package/claude-plugin/dist/schemas/worker-handoff.d.ts.map +1 -0
  124. package/claude-plugin/dist/sessions/agent-discovery.d.ts +59 -0
  125. package/claude-plugin/dist/sessions/agent-discovery.d.ts.map +1 -0
  126. package/claude-plugin/dist/sessions/index.d.ts +10 -0
  127. package/claude-plugin/dist/sessions/index.d.ts.map +1 -0
  128. package/claude-plugin/dist/skills.d.ts +490 -0
  129. package/claude-plugin/dist/skills.d.ts.map +1 -0
  130. package/claude-plugin/dist/storage.d.ts +260 -0
  131. package/claude-plugin/dist/storage.d.ts.map +1 -0
  132. package/claude-plugin/dist/structured.d.ts +206 -0
  133. package/claude-plugin/dist/structured.d.ts.map +1 -0
  134. package/claude-plugin/dist/swarm-adversarial-review.d.ts +104 -0
  135. package/claude-plugin/dist/swarm-adversarial-review.d.ts.map +1 -0
  136. package/claude-plugin/dist/swarm-decompose.d.ts +297 -0
  137. package/claude-plugin/dist/swarm-decompose.d.ts.map +1 -0
  138. package/claude-plugin/dist/swarm-insights.d.ts +390 -0
  139. package/claude-plugin/dist/swarm-insights.d.ts.map +1 -0
  140. package/claude-plugin/dist/swarm-mail.d.ts +274 -0
  141. package/claude-plugin/dist/swarm-mail.d.ts.map +1 -0
  142. package/claude-plugin/dist/swarm-orchestrate.d.ts +924 -0
  143. package/claude-plugin/dist/swarm-orchestrate.d.ts.map +1 -0
  144. package/claude-plugin/dist/swarm-prompts.d.ts +467 -0
  145. package/claude-plugin/dist/swarm-prompts.d.ts.map +1 -0
  146. package/claude-plugin/dist/swarm-prompts.js +45283 -0
  147. package/claude-plugin/dist/swarm-research.d.ts +125 -0
  148. package/claude-plugin/dist/swarm-research.d.ts.map +1 -0
  149. package/claude-plugin/dist/swarm-review.d.ts +214 -0
  150. package/claude-plugin/dist/swarm-review.d.ts.map +1 -0
  151. package/claude-plugin/dist/swarm-signature.d.ts +106 -0
  152. package/claude-plugin/dist/swarm-signature.d.ts.map +1 -0
  153. package/claude-plugin/dist/swarm-strategies.d.ts +113 -0
  154. package/claude-plugin/dist/swarm-strategies.d.ts.map +1 -0
  155. package/claude-plugin/dist/swarm-validation.d.ts +127 -0
  156. package/claude-plugin/dist/swarm-validation.d.ts.map +1 -0
  157. package/claude-plugin/dist/swarm-worktree.d.ts +185 -0
  158. package/claude-plugin/dist/swarm-worktree.d.ts.map +1 -0
  159. package/claude-plugin/dist/swarm.d.ts +590 -0
  160. package/claude-plugin/dist/swarm.d.ts.map +1 -0
  161. package/claude-plugin/dist/tool-availability.d.ts +91 -0
  162. package/claude-plugin/dist/tool-availability.d.ts.map +1 -0
  163. package/claude-plugin/dist/utils/tree-renderer.d.ts +61 -0
  164. package/claude-plugin/dist/utils/tree-renderer.d.ts.map +1 -0
  165. package/claude-plugin/dist/validators/index.d.ts +7 -0
  166. package/claude-plugin/dist/validators/index.d.ts.map +1 -0
  167. package/claude-plugin/dist/validators/schema-validator.d.ts +58 -0
  168. package/claude-plugin/dist/validators/schema-validator.d.ts.map +1 -0
  169. package/claude-plugin/skills/always-on-guidance/SKILL.md +44 -0
  170. package/dist/agent-mail.d.ts +4 -4
  171. package/dist/agent-mail.d.ts.map +1 -1
  172. package/dist/bin/swarm.js +477 -22
  173. package/dist/claude-plugin/claude-plugin-assets.d.ts +10 -0
  174. package/dist/claude-plugin/claude-plugin-assets.d.ts.map +1 -0
  175. package/dist/compaction-hook.d.ts +1 -1
  176. package/dist/compaction-hook.d.ts.map +1 -1
  177. package/dist/index.js +375 -265
  178. package/dist/plugin.js +374 -264
  179. package/dist/skills.d.ts +15 -0
  180. package/dist/skills.d.ts.map +1 -1
  181. package/dist/swarm-mail.d.ts.map +1 -1
  182. package/dist/swarm-prompts.d.ts +4 -2
  183. package/dist/swarm-prompts.d.ts.map +1 -1
  184. package/dist/swarm-prompts.js +84 -7
  185. package/global-skills/swarm-coordination/SKILL.md +21 -20
  186. package/package.json +2 -1
@@ -0,0 +1,924 @@
1
+ /**
2
+ * Swarm Orchestrate Module - Status tracking and completion handling
3
+ *
4
+ * Handles swarm execution lifecycle:
5
+ * - Initialization and tool availability
6
+ * - Status tracking and progress reporting
7
+ * - Completion verification and gates
8
+ * - Error accumulation and 3-strike detection
9
+ * - Learning from outcomes
10
+ *
11
+ * Key responsibilities:
12
+ * - swarm_init - Check tools and discover skills
13
+ * - swarm_status - Query epic progress
14
+ * - swarm_progress - Report agent progress
15
+ * - swarm_complete - Verification gate and completion
16
+ * - swarm_record_outcome - Learning signals
17
+ * - swarm_broadcast - Mid-task context sharing
18
+ * - Error accumulation tools
19
+ * - 3-strike detection for architectural problems
20
+ */
21
+ import { z } from "zod";
22
+ import { type WorkerHandoff } from "./schemas/worker-handoff";
23
+ /**
24
+ * Generate a WorkerHandoff object from subtask parameters
25
+ *
26
+ * Creates a machine-readable contract that replaces prose instructions in SUBTASK_PROMPT_V2.
27
+ * Workers receive typed handoffs with explicit files, criteria, and escalation paths.
28
+ *
29
+ * @param params - Subtask parameters
30
+ * @returns WorkerHandoff object validated against schema
31
+ */
32
+ export declare function generateWorkerHandoff(params: {
33
+ task_id: string;
34
+ files_owned: string[];
35
+ files_readonly?: string[];
36
+ dependencies_completed?: string[];
37
+ success_criteria?: string[];
38
+ epic_summary: string;
39
+ your_role: string;
40
+ what_others_did?: string;
41
+ what_comes_next?: string;
42
+ }): WorkerHandoff;
43
+ /**
44
+ * Validate that files_touched is a subset of files_owned (supports globs)
45
+ *
46
+ * Checks contract compliance - workers should only modify files they own.
47
+ * Glob patterns in files_owned are matched against files_touched paths.
48
+ *
49
+ * @param files_touched - Actual files modified by the worker
50
+ * @param files_owned - Files the worker is allowed to modify (may include globs)
51
+ * @returns Validation result with violations list
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * // Exact match - passes
56
+ * validateContract(["src/a.ts"], ["src/a.ts", "src/b.ts"])
57
+ * // => { valid: true, violations: [] }
58
+ *
59
+ * // Glob match - passes
60
+ * validateContract(["src/auth/service.ts"], ["src/auth/**"])
61
+ * // => { valid: true, violations: [] }
62
+ *
63
+ * // Violation - fails
64
+ * validateContract(["src/other.ts"], ["src/auth/**"])
65
+ * // => { valid: false, violations: ["src/other.ts"] }
66
+ * ```
67
+ */
68
+ export declare function validateContract(files_touched: string[], files_owned: string[]): {
69
+ valid: boolean;
70
+ violations: string[];
71
+ };
72
+ /**
73
+ * Initialize swarm and check tool availability
74
+ *
75
+ * Call this at the start of a swarm session to see what tools are available,
76
+ * what skills exist in the project, and what features will be degraded.
77
+ *
78
+ * Skills are automatically discovered from:
79
+ * - .opencode/skills/
80
+ * - .claude/skills/
81
+ * - skills/
82
+ */
83
+ export declare const swarm_init: {
84
+ description: string;
85
+ args: {
86
+ project_path: z.ZodOptional<z.ZodString>;
87
+ isolation: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
88
+ reservation: "reservation";
89
+ worktree: "worktree";
90
+ }>>>;
91
+ };
92
+ execute(args: {
93
+ isolation: "reservation" | "worktree";
94
+ project_path?: string | undefined;
95
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
96
+ };
97
+ /**
98
+ * Get status of a swarm by epic ID
99
+ *
100
+ * Requires project_key to query Agent Mail for message counts.
101
+ */
102
+ export declare const swarm_status: {
103
+ description: string;
104
+ args: {
105
+ epic_id: z.ZodString;
106
+ project_key: z.ZodString;
107
+ };
108
+ execute(args: {
109
+ epic_id: string;
110
+ project_key: string;
111
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
112
+ };
113
+ /**
114
+ * Report progress on a subtask
115
+ *
116
+ * Takes explicit agent identity since tools don't have persistent state.
117
+ */
118
+ export declare const swarm_progress: {
119
+ description: string;
120
+ args: {
121
+ project_key: z.ZodString;
122
+ agent_name: z.ZodString;
123
+ bead_id: z.ZodString;
124
+ status: z.ZodEnum<{
125
+ in_progress: "in_progress";
126
+ blocked: "blocked";
127
+ failed: "failed";
128
+ completed: "completed";
129
+ }>;
130
+ message: z.ZodOptional<z.ZodString>;
131
+ progress_percent: z.ZodOptional<z.ZodNumber>;
132
+ files_touched: z.ZodOptional<z.ZodArray<z.ZodString>>;
133
+ };
134
+ execute(args: {
135
+ project_key: string;
136
+ agent_name: string;
137
+ bead_id: string;
138
+ status: "in_progress" | "blocked" | "failed" | "completed";
139
+ message?: string | undefined;
140
+ progress_percent?: number | undefined;
141
+ files_touched?: string[] | undefined;
142
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
143
+ };
144
+ /**
145
+ * Broadcast context updates to all agents in the epic
146
+ *
147
+ * Enables mid-task coordination by sharing discoveries, warnings, or blockers
148
+ * with all agents working on the same epic. Agents can broadcast without
149
+ * waiting for task completion.
150
+ *
151
+ * Based on "Patterns for Building AI Agents" p.31: "Ensure subagents can share context along the way"
152
+ */
153
+ export declare const swarm_broadcast: {
154
+ description: string;
155
+ args: {
156
+ project_path: z.ZodString;
157
+ agent_name: z.ZodString;
158
+ epic_id: z.ZodString;
159
+ message: z.ZodString;
160
+ importance: z.ZodDefault<z.ZodEnum<{
161
+ info: "info";
162
+ warning: "warning";
163
+ blocker: "blocker";
164
+ }>>;
165
+ files_affected: z.ZodOptional<z.ZodArray<z.ZodString>>;
166
+ };
167
+ execute(args: {
168
+ project_path: string;
169
+ agent_name: string;
170
+ epic_id: string;
171
+ message: string;
172
+ importance: "info" | "warning" | "blocker";
173
+ files_affected?: string[] | undefined;
174
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
175
+ };
176
+ /**
177
+ * Mark a subtask as complete
178
+ *
179
+ * Implements the Verification Gate (from superpowers):
180
+ * 1. IDENTIFY: What commands prove this claim?
181
+ * 2. RUN: Execute verification (typecheck, tests)
182
+ * 3. READ: Check exit codes and output
183
+ * 4. VERIFY: All checks must pass
184
+ * 5. ONLY THEN: Close the cell
185
+ *
186
+ * Closes cell, releases reservations, notifies coordinator, and resolves
187
+ * a DurableDeferred keyed by bead_id for cross-agent task completion signaling.
188
+ *
189
+ * ## DurableDeferred Integration
190
+ *
191
+ * When a coordinator spawns workers, it can create a deferred BEFORE spawning:
192
+ *
193
+ * ```typescript
194
+ * const swarmMail = await getSwarmMailLibSQL(projectPath);
195
+ * const db = await swarmMail.getDatabase();
196
+ *
197
+ * // Create deferred keyed by bead_id
198
+ * const deferredUrl = `deferred:${beadId}`;
199
+ * await db.query(
200
+ * `INSERT INTO deferred (url, resolved, expires_at, created_at) VALUES (?, 0, ?, ?)`,
201
+ * [deferredUrl, Date.now() + 3600000, Date.now()]
202
+ * );
203
+ *
204
+ * // Spawn worker (swarm_spawn_subtask...)
205
+ *
206
+ * // Await completion
207
+ * const result = await db.query<{ value: string }>(
208
+ * `SELECT value FROM deferred WHERE url = ? AND resolved = 1`,
209
+ * [deferredUrl]
210
+ * );
211
+ * ```
212
+ *
213
+ * When the worker calls swarm_complete, it resolves the deferred automatically.
214
+ * Coordinator can await without polling.
215
+ */
216
+ export declare const swarm_complete: {
217
+ description: string;
218
+ args: {
219
+ project_key: z.ZodString;
220
+ agent_name: z.ZodString;
221
+ bead_id: z.ZodString;
222
+ summary: z.ZodString;
223
+ evaluation: z.ZodOptional<z.ZodString>;
224
+ files_touched: z.ZodOptional<z.ZodArray<z.ZodString>>;
225
+ skip_verification: z.ZodOptional<z.ZodBoolean>;
226
+ planned_files: z.ZodOptional<z.ZodArray<z.ZodString>>;
227
+ start_time: z.ZodNumber;
228
+ error_count: z.ZodOptional<z.ZodNumber>;
229
+ retry_count: z.ZodOptional<z.ZodNumber>;
230
+ skip_review: z.ZodOptional<z.ZodBoolean>;
231
+ };
232
+ execute(args: {
233
+ project_key: string;
234
+ agent_name: string;
235
+ bead_id: string;
236
+ summary: string;
237
+ start_time: number;
238
+ evaluation?: string | undefined;
239
+ files_touched?: string[] | undefined;
240
+ skip_verification?: boolean | undefined;
241
+ planned_files?: string[] | undefined;
242
+ error_count?: number | undefined;
243
+ retry_count?: number | undefined;
244
+ skip_review?: boolean | undefined;
245
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
246
+ };
247
+ /**
248
+ * Record outcome signals from a completed subtask
249
+ *
250
+ * Tracks implicit feedback (duration, errors, retries) to score
251
+ * decomposition quality over time. This data feeds into criterion
252
+ * weight calculations.
253
+ *
254
+ * Strategy tracking enables learning about which decomposition strategies
255
+ * work best for different task types.
256
+ *
257
+ * @see src/learning.ts for scoring logic
258
+ */
259
+ export declare const swarm_record_outcome: {
260
+ description: string;
261
+ args: {
262
+ bead_id: z.ZodString;
263
+ duration_ms: z.ZodNumber;
264
+ error_count: z.ZodDefault<z.ZodNumber>;
265
+ retry_count: z.ZodDefault<z.ZodNumber>;
266
+ success: z.ZodBoolean;
267
+ files_touched: z.ZodOptional<z.ZodArray<z.ZodString>>;
268
+ criteria: z.ZodOptional<z.ZodArray<z.ZodString>>;
269
+ strategy: z.ZodOptional<z.ZodEnum<{
270
+ "file-based": "file-based";
271
+ "feature-based": "feature-based";
272
+ "risk-based": "risk-based";
273
+ "research-based": "research-based";
274
+ }>>;
275
+ failure_mode: z.ZodOptional<z.ZodEnum<{
276
+ timeout: "timeout";
277
+ unknown: "unknown";
278
+ conflict: "conflict";
279
+ validation: "validation";
280
+ tool_failure: "tool_failure";
281
+ context_overflow: "context_overflow";
282
+ dependency_blocked: "dependency_blocked";
283
+ user_cancelled: "user_cancelled";
284
+ }>>;
285
+ failure_details: z.ZodOptional<z.ZodString>;
286
+ project_path: z.ZodOptional<z.ZodString>;
287
+ epic_id: z.ZodOptional<z.ZodString>;
288
+ };
289
+ execute(args: {
290
+ bead_id: string;
291
+ duration_ms: number;
292
+ error_count: number;
293
+ retry_count: number;
294
+ success: boolean;
295
+ files_touched?: string[] | undefined;
296
+ criteria?: string[] | undefined;
297
+ strategy?: "file-based" | "feature-based" | "risk-based" | "research-based" | undefined;
298
+ failure_mode?: "timeout" | "unknown" | "conflict" | "validation" | "tool_failure" | "context_overflow" | "dependency_blocked" | "user_cancelled" | undefined;
299
+ failure_details?: string | undefined;
300
+ project_path?: string | undefined;
301
+ epic_id?: string | undefined;
302
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
303
+ };
304
+ /**
305
+ * Extract technology stack from task description
306
+ *
307
+ * Searches for common framework/library mentions and returns
308
+ * a deduplicated array of normalized names.
309
+ *
310
+ * @param task - Task description
311
+ * @returns Array of detected technology names (normalized, lowercase)
312
+ *
313
+ * @example
314
+ * ```typescript
315
+ * extractTechStack("Add Next.js API routes with Zod validation")
316
+ * // => ["next", "zod"]
317
+ * ```
318
+ */
319
+ export declare function extractTechStack(task: string): string[];
320
+ /**
321
+ * Spawn instruction for a researcher worker
322
+ */
323
+ export interface ResearchSpawnInstruction {
324
+ /** Unique ID for this research task */
325
+ research_id: string;
326
+ /** Technology being researched */
327
+ tech: string;
328
+ /** Full prompt for the researcher agent */
329
+ prompt: string;
330
+ /** Agent type for the Task tool */
331
+ subagent_type: "swarm-researcher";
332
+ }
333
+ /**
334
+ * Research result from documentation discovery phase
335
+ */
336
+ export interface ResearchResult {
337
+ /** Technologies identified and researched */
338
+ tech_stack: string[];
339
+ /** Spawn instructions for researcher workers */
340
+ spawn_instructions: ResearchSpawnInstruction[];
341
+ /** Summaries keyed by technology name */
342
+ summaries: Record<string, string>;
343
+ /** Hivemind IDs where research is stored */
344
+ memory_ids: string[];
345
+ }
346
+ /**
347
+ * Run research phase before task decomposition
348
+ *
349
+ * This is the INTEGRATION point that:
350
+ * 1. Analyzes task to identify technologies
351
+ * 2. Spawns researcher agents for each technology (parallel)
352
+ * 3. Waits for researchers to complete
353
+ * 4. Collects summaries from hivemind
354
+ * 5. Returns combined context for shared_context
355
+ *
356
+ * Flow:
357
+ * ```
358
+ * Task received
359
+ * ↓
360
+ * extractTechStack(task) → ["next", "zod"]
361
+ * ↓
362
+ * For each tech: swarm_spawn_researcher(tech_stack=[tech])
363
+ * ↓
364
+ * Spawn Task agents in parallel
365
+ * ↓
366
+ * Wait for all to complete
367
+ * ↓
368
+ * Collect summaries from swarm mail
369
+ * ↓
370
+ * Return ResearchResult → inject into shared_context
371
+ * ```
372
+ *
373
+ * @param task - Task description to analyze
374
+ * @param projectPath - Absolute path to project root
375
+ * @param options - Optional configuration
376
+ * @returns Research results with summaries and memory IDs
377
+ *
378
+ * @example
379
+ * ```typescript
380
+ * const result = await runResearchPhase(
381
+ * "Add Next.js API routes with Zod validation",
382
+ * "/path/to/project"
383
+ * );
384
+ * // result.tech_stack => ["next", "zod"]
385
+ * // result.summaries => { next: "...", zod: "..." }
386
+ * // Use result as shared_context for decomposition
387
+ * ```
388
+ */
389
+ export declare function runResearchPhase(task: string, projectPath: string, options?: {
390
+ checkUpgrades?: boolean;
391
+ }): Promise<ResearchResult>;
392
+ /**
393
+ * Plugin tool for running research phase
394
+ *
395
+ * Exposes research phase as a tool for manual triggering or
396
+ * integration into orchestration flows.
397
+ */
398
+ export declare const swarm_research_phase: {
399
+ description: string;
400
+ args: {
401
+ task: z.ZodString;
402
+ project_path: z.ZodString;
403
+ check_upgrades: z.ZodOptional<z.ZodBoolean>;
404
+ };
405
+ execute(args: {
406
+ task: string;
407
+ project_path: string;
408
+ check_upgrades?: boolean | undefined;
409
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
410
+ };
411
+ /**
412
+ * Record an error during subtask execution
413
+ *
414
+ * Implements pattern from "Patterns for Building AI Agents" p.40:
415
+ * "Good agents examine and correct errors when something goes wrong"
416
+ *
417
+ * Errors are accumulated and can be fed into retry prompts to help
418
+ * agents learn from past failures.
419
+ */
420
+ export declare const swarm_accumulate_error: {
421
+ description: string;
422
+ args: {
423
+ bead_id: z.ZodString;
424
+ error_type: z.ZodEnum<{
425
+ timeout: "timeout";
426
+ unknown: "unknown";
427
+ conflict: "conflict";
428
+ validation: "validation";
429
+ tool_failure: "tool_failure";
430
+ }>;
431
+ message: z.ZodString;
432
+ stack_trace: z.ZodOptional<z.ZodString>;
433
+ tool_name: z.ZodOptional<z.ZodString>;
434
+ context: z.ZodOptional<z.ZodString>;
435
+ };
436
+ execute(args: {
437
+ bead_id: string;
438
+ error_type: "timeout" | "unknown" | "conflict" | "validation" | "tool_failure";
439
+ message: string;
440
+ stack_trace?: string | undefined;
441
+ tool_name?: string | undefined;
442
+ context?: string | undefined;
443
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
444
+ };
445
+ /**
446
+ * Get accumulated errors for a bead to feed into retry prompts
447
+ *
448
+ * Returns formatted error context that can be injected into retry prompts
449
+ * to help agents learn from past failures.
450
+ */
451
+ export declare const swarm_get_error_context: {
452
+ description: string;
453
+ args: {
454
+ bead_id: z.ZodString;
455
+ include_resolved: z.ZodOptional<z.ZodBoolean>;
456
+ };
457
+ execute(args: {
458
+ bead_id: string;
459
+ include_resolved?: boolean | undefined;
460
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
461
+ };
462
+ /**
463
+ * Mark an error as resolved
464
+ *
465
+ * Call this after an agent successfully addresses an error to update
466
+ * the accumulator state.
467
+ */
468
+ export declare const swarm_resolve_error: {
469
+ description: string;
470
+ args: {
471
+ error_id: z.ZodString;
472
+ };
473
+ execute(args: {
474
+ error_id: string;
475
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
476
+ };
477
+ /**
478
+ * Check if a bead has struck out (3 consecutive failures)
479
+ *
480
+ * The 3-Strike Rule:
481
+ * IF 3+ fixes have failed:
482
+ * STOP → Question the architecture
483
+ * DON'T attempt Fix #4
484
+ * Discuss with human partner
485
+ *
486
+ * This is NOT a failed hypothesis.
487
+ * This is a WRONG ARCHITECTURE.
488
+ *
489
+ * Use this tool to:
490
+ * - Check strike count before attempting a fix
491
+ * - Get architecture review prompt if struck out
492
+ * - Record a strike when a fix fails
493
+ * - Clear strikes when a fix succeeds
494
+ */
495
+ export declare const swarm_check_strikes: {
496
+ description: string;
497
+ args: {
498
+ bead_id: z.ZodString;
499
+ action: z.ZodEnum<{
500
+ check: "check";
501
+ add_strike: "add_strike";
502
+ clear: "clear";
503
+ get_prompt: "get_prompt";
504
+ }>;
505
+ attempt: z.ZodOptional<z.ZodString>;
506
+ reason: z.ZodOptional<z.ZodString>;
507
+ };
508
+ execute(args: {
509
+ bead_id: string;
510
+ action: "check" | "add_strike" | "clear" | "get_prompt";
511
+ attempt?: string | undefined;
512
+ reason?: string | undefined;
513
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
514
+ };
515
+ /**
516
+ * Checkpoint swarm context for recovery
517
+ *
518
+ * Records the current state of a subtask to enable recovery after crashes,
519
+ * context overflows, or agent restarts. Non-fatal errors - logs warnings
520
+ * and continues if checkpoint fails.
521
+ *
522
+ * Integration:
523
+ * - Called automatically by swarm_progress at milestone thresholds (25%, 50%, 75%)
524
+ * - Can be called manually by agents at critical points
525
+ * - Emits SwarmCheckpointedEvent for audit trail
526
+ * - Updates swarm_contexts table for fast recovery queries
527
+ */
528
+ export declare const swarm_checkpoint: {
529
+ description: string;
530
+ args: {
531
+ project_key: z.ZodString;
532
+ agent_name: z.ZodString;
533
+ bead_id: z.ZodString;
534
+ epic_id: z.ZodString;
535
+ files_modified: z.ZodArray<z.ZodString>;
536
+ progress_percent: z.ZodNumber;
537
+ directives: z.ZodOptional<z.ZodObject<{
538
+ shared_context: z.ZodOptional<z.ZodString>;
539
+ skills_to_load: z.ZodOptional<z.ZodArray<z.ZodString>>;
540
+ coordinator_notes: z.ZodOptional<z.ZodString>;
541
+ }, z.core.$strip>>;
542
+ error_context: z.ZodOptional<z.ZodString>;
543
+ };
544
+ execute(args: {
545
+ project_key: string;
546
+ agent_name: string;
547
+ bead_id: string;
548
+ epic_id: string;
549
+ files_modified: string[];
550
+ progress_percent: number;
551
+ directives?: {
552
+ shared_context?: string | undefined;
553
+ skills_to_load?: string[] | undefined;
554
+ coordinator_notes?: string | undefined;
555
+ } | undefined;
556
+ error_context?: string | undefined;
557
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
558
+ };
559
+ /**
560
+ * Recover swarm context from last checkpoint
561
+ *
562
+ * Queries swarm_contexts table for the most recent checkpoint of an epic.
563
+ * Returns the full context including files, progress, and recovery state.
564
+ * Emits SwarmRecoveredEvent for audit trail.
565
+ *
566
+ * Graceful fallback: Returns { found: false } if no checkpoint exists.
567
+ */
568
+ export declare const swarm_recover: {
569
+ description: string;
570
+ args: {
571
+ project_key: z.ZodString;
572
+ epic_id: z.ZodString;
573
+ };
574
+ execute(args: {
575
+ project_key: string;
576
+ epic_id: string;
577
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
578
+ };
579
+ /**
580
+ * Learn from completed work and optionally create a skill
581
+ *
582
+ * This tool helps agents reflect on patterns, best practices, or domain
583
+ * knowledge discovered during task execution and codify them into reusable
584
+ * skills for future swarms.
585
+ *
586
+ * Implements the "learning swarm" pattern where swarms get smarter over time.
587
+ */
588
+ export declare const swarm_learn: {
589
+ description: string;
590
+ args: {
591
+ summary: z.ZodString;
592
+ pattern_type: z.ZodEnum<{
593
+ "code-pattern": "code-pattern";
594
+ "best-practice": "best-practice";
595
+ gotcha: "gotcha";
596
+ "tool-usage": "tool-usage";
597
+ "domain-knowledge": "domain-knowledge";
598
+ workflow: "workflow";
599
+ }>;
600
+ details: z.ZodString;
601
+ example: z.ZodOptional<z.ZodString>;
602
+ when_to_use: z.ZodString;
603
+ files_context: z.ZodOptional<z.ZodArray<z.ZodString>>;
604
+ create_skill: z.ZodOptional<z.ZodBoolean>;
605
+ skill_name: z.ZodOptional<z.ZodString>;
606
+ skill_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
607
+ };
608
+ execute(args: {
609
+ summary: string;
610
+ pattern_type: "code-pattern" | "best-practice" | "gotcha" | "tool-usage" | "domain-knowledge" | "workflow";
611
+ details: string;
612
+ when_to_use: string;
613
+ example?: string | undefined;
614
+ files_context?: string[] | undefined;
615
+ create_skill?: boolean | undefined;
616
+ skill_name?: string | undefined;
617
+ skill_tags?: string[] | undefined;
618
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
619
+ };
620
+ export declare const orchestrateTools: {
621
+ swarm_init: {
622
+ description: string;
623
+ args: {
624
+ project_path: z.ZodOptional<z.ZodString>;
625
+ isolation: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
626
+ reservation: "reservation";
627
+ worktree: "worktree";
628
+ }>>>;
629
+ };
630
+ execute(args: {
631
+ isolation: "reservation" | "worktree";
632
+ project_path?: string | undefined;
633
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
634
+ };
635
+ swarm_status: {
636
+ description: string;
637
+ args: {
638
+ epic_id: z.ZodString;
639
+ project_key: z.ZodString;
640
+ };
641
+ execute(args: {
642
+ epic_id: string;
643
+ project_key: string;
644
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
645
+ };
646
+ swarm_progress: {
647
+ description: string;
648
+ args: {
649
+ project_key: z.ZodString;
650
+ agent_name: z.ZodString;
651
+ bead_id: z.ZodString;
652
+ status: z.ZodEnum<{
653
+ in_progress: "in_progress";
654
+ blocked: "blocked";
655
+ failed: "failed";
656
+ completed: "completed";
657
+ }>;
658
+ message: z.ZodOptional<z.ZodString>;
659
+ progress_percent: z.ZodOptional<z.ZodNumber>;
660
+ files_touched: z.ZodOptional<z.ZodArray<z.ZodString>>;
661
+ };
662
+ execute(args: {
663
+ project_key: string;
664
+ agent_name: string;
665
+ bead_id: string;
666
+ status: "in_progress" | "blocked" | "failed" | "completed";
667
+ message?: string | undefined;
668
+ progress_percent?: number | undefined;
669
+ files_touched?: string[] | undefined;
670
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
671
+ };
672
+ swarm_broadcast: {
673
+ description: string;
674
+ args: {
675
+ project_path: z.ZodString;
676
+ agent_name: z.ZodString;
677
+ epic_id: z.ZodString;
678
+ message: z.ZodString;
679
+ importance: z.ZodDefault<z.ZodEnum<{
680
+ info: "info";
681
+ warning: "warning";
682
+ blocker: "blocker";
683
+ }>>;
684
+ files_affected: z.ZodOptional<z.ZodArray<z.ZodString>>;
685
+ };
686
+ execute(args: {
687
+ project_path: string;
688
+ agent_name: string;
689
+ epic_id: string;
690
+ message: string;
691
+ importance: "info" | "warning" | "blocker";
692
+ files_affected?: string[] | undefined;
693
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
694
+ };
695
+ swarm_complete: {
696
+ description: string;
697
+ args: {
698
+ project_key: z.ZodString;
699
+ agent_name: z.ZodString;
700
+ bead_id: z.ZodString;
701
+ summary: z.ZodString;
702
+ evaluation: z.ZodOptional<z.ZodString>;
703
+ files_touched: z.ZodOptional<z.ZodArray<z.ZodString>>;
704
+ skip_verification: z.ZodOptional<z.ZodBoolean>;
705
+ planned_files: z.ZodOptional<z.ZodArray<z.ZodString>>;
706
+ start_time: z.ZodNumber;
707
+ error_count: z.ZodOptional<z.ZodNumber>;
708
+ retry_count: z.ZodOptional<z.ZodNumber>;
709
+ skip_review: z.ZodOptional<z.ZodBoolean>;
710
+ };
711
+ execute(args: {
712
+ project_key: string;
713
+ agent_name: string;
714
+ bead_id: string;
715
+ summary: string;
716
+ start_time: number;
717
+ evaluation?: string | undefined;
718
+ files_touched?: string[] | undefined;
719
+ skip_verification?: boolean | undefined;
720
+ planned_files?: string[] | undefined;
721
+ error_count?: number | undefined;
722
+ retry_count?: number | undefined;
723
+ skip_review?: boolean | undefined;
724
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
725
+ };
726
+ swarm_record_outcome: {
727
+ description: string;
728
+ args: {
729
+ bead_id: z.ZodString;
730
+ duration_ms: z.ZodNumber;
731
+ error_count: z.ZodDefault<z.ZodNumber>;
732
+ retry_count: z.ZodDefault<z.ZodNumber>;
733
+ success: z.ZodBoolean;
734
+ files_touched: z.ZodOptional<z.ZodArray<z.ZodString>>;
735
+ criteria: z.ZodOptional<z.ZodArray<z.ZodString>>;
736
+ strategy: z.ZodOptional<z.ZodEnum<{
737
+ "file-based": "file-based";
738
+ "feature-based": "feature-based";
739
+ "risk-based": "risk-based";
740
+ "research-based": "research-based";
741
+ }>>;
742
+ failure_mode: z.ZodOptional<z.ZodEnum<{
743
+ timeout: "timeout";
744
+ unknown: "unknown";
745
+ conflict: "conflict";
746
+ validation: "validation";
747
+ tool_failure: "tool_failure";
748
+ context_overflow: "context_overflow";
749
+ dependency_blocked: "dependency_blocked";
750
+ user_cancelled: "user_cancelled";
751
+ }>>;
752
+ failure_details: z.ZodOptional<z.ZodString>;
753
+ project_path: z.ZodOptional<z.ZodString>;
754
+ epic_id: z.ZodOptional<z.ZodString>;
755
+ };
756
+ execute(args: {
757
+ bead_id: string;
758
+ duration_ms: number;
759
+ error_count: number;
760
+ retry_count: number;
761
+ success: boolean;
762
+ files_touched?: string[] | undefined;
763
+ criteria?: string[] | undefined;
764
+ strategy?: "file-based" | "feature-based" | "risk-based" | "research-based" | undefined;
765
+ failure_mode?: "timeout" | "unknown" | "conflict" | "validation" | "tool_failure" | "context_overflow" | "dependency_blocked" | "user_cancelled" | undefined;
766
+ failure_details?: string | undefined;
767
+ project_path?: string | undefined;
768
+ epic_id?: string | undefined;
769
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
770
+ };
771
+ swarm_research_phase: {
772
+ description: string;
773
+ args: {
774
+ task: z.ZodString;
775
+ project_path: z.ZodString;
776
+ check_upgrades: z.ZodOptional<z.ZodBoolean>;
777
+ };
778
+ execute(args: {
779
+ task: string;
780
+ project_path: string;
781
+ check_upgrades?: boolean | undefined;
782
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
783
+ };
784
+ swarm_accumulate_error: {
785
+ description: string;
786
+ args: {
787
+ bead_id: z.ZodString;
788
+ error_type: z.ZodEnum<{
789
+ timeout: "timeout";
790
+ unknown: "unknown";
791
+ conflict: "conflict";
792
+ validation: "validation";
793
+ tool_failure: "tool_failure";
794
+ }>;
795
+ message: z.ZodString;
796
+ stack_trace: z.ZodOptional<z.ZodString>;
797
+ tool_name: z.ZodOptional<z.ZodString>;
798
+ context: z.ZodOptional<z.ZodString>;
799
+ };
800
+ execute(args: {
801
+ bead_id: string;
802
+ error_type: "timeout" | "unknown" | "conflict" | "validation" | "tool_failure";
803
+ message: string;
804
+ stack_trace?: string | undefined;
805
+ tool_name?: string | undefined;
806
+ context?: string | undefined;
807
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
808
+ };
809
+ swarm_get_error_context: {
810
+ description: string;
811
+ args: {
812
+ bead_id: z.ZodString;
813
+ include_resolved: z.ZodOptional<z.ZodBoolean>;
814
+ };
815
+ execute(args: {
816
+ bead_id: string;
817
+ include_resolved?: boolean | undefined;
818
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
819
+ };
820
+ swarm_resolve_error: {
821
+ description: string;
822
+ args: {
823
+ error_id: z.ZodString;
824
+ };
825
+ execute(args: {
826
+ error_id: string;
827
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
828
+ };
829
+ swarm_check_strikes: {
830
+ description: string;
831
+ args: {
832
+ bead_id: z.ZodString;
833
+ action: z.ZodEnum<{
834
+ check: "check";
835
+ add_strike: "add_strike";
836
+ clear: "clear";
837
+ get_prompt: "get_prompt";
838
+ }>;
839
+ attempt: z.ZodOptional<z.ZodString>;
840
+ reason: z.ZodOptional<z.ZodString>;
841
+ };
842
+ execute(args: {
843
+ bead_id: string;
844
+ action: "check" | "add_strike" | "clear" | "get_prompt";
845
+ attempt?: string | undefined;
846
+ reason?: string | undefined;
847
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
848
+ };
849
+ swarm_checkpoint: {
850
+ description: string;
851
+ args: {
852
+ project_key: z.ZodString;
853
+ agent_name: z.ZodString;
854
+ bead_id: z.ZodString;
855
+ epic_id: z.ZodString;
856
+ files_modified: z.ZodArray<z.ZodString>;
857
+ progress_percent: z.ZodNumber;
858
+ directives: z.ZodOptional<z.ZodObject<{
859
+ shared_context: z.ZodOptional<z.ZodString>;
860
+ skills_to_load: z.ZodOptional<z.ZodArray<z.ZodString>>;
861
+ coordinator_notes: z.ZodOptional<z.ZodString>;
862
+ }, z.core.$strip>>;
863
+ error_context: z.ZodOptional<z.ZodString>;
864
+ };
865
+ execute(args: {
866
+ project_key: string;
867
+ agent_name: string;
868
+ bead_id: string;
869
+ epic_id: string;
870
+ files_modified: string[];
871
+ progress_percent: number;
872
+ directives?: {
873
+ shared_context?: string | undefined;
874
+ skills_to_load?: string[] | undefined;
875
+ coordinator_notes?: string | undefined;
876
+ } | undefined;
877
+ error_context?: string | undefined;
878
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
879
+ };
880
+ swarm_recover: {
881
+ description: string;
882
+ args: {
883
+ project_key: z.ZodString;
884
+ epic_id: z.ZodString;
885
+ };
886
+ execute(args: {
887
+ project_key: string;
888
+ epic_id: string;
889
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
890
+ };
891
+ swarm_learn: {
892
+ description: string;
893
+ args: {
894
+ summary: z.ZodString;
895
+ pattern_type: z.ZodEnum<{
896
+ "code-pattern": "code-pattern";
897
+ "best-practice": "best-practice";
898
+ gotcha: "gotcha";
899
+ "tool-usage": "tool-usage";
900
+ "domain-knowledge": "domain-knowledge";
901
+ workflow: "workflow";
902
+ }>;
903
+ details: z.ZodString;
904
+ example: z.ZodOptional<z.ZodString>;
905
+ when_to_use: z.ZodString;
906
+ files_context: z.ZodOptional<z.ZodArray<z.ZodString>>;
907
+ create_skill: z.ZodOptional<z.ZodBoolean>;
908
+ skill_name: z.ZodOptional<z.ZodString>;
909
+ skill_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
910
+ };
911
+ execute(args: {
912
+ summary: string;
913
+ pattern_type: "code-pattern" | "best-practice" | "gotcha" | "tool-usage" | "domain-knowledge" | "workflow";
914
+ details: string;
915
+ when_to_use: string;
916
+ example?: string | undefined;
917
+ files_context?: string[] | undefined;
918
+ create_skill?: boolean | undefined;
919
+ skill_name?: string | undefined;
920
+ skill_tags?: string[] | undefined;
921
+ }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
922
+ };
923
+ };
924
+ //# sourceMappingURL=swarm-orchestrate.d.ts.map