opencode-swarm-plugin 0.36.0 → 0.36.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.
- package/.hive/issues.jsonl +4 -4
- package/.hive/memories.jsonl +274 -1
- package/.turbo/turbo-build.log +4 -4
- package/.turbo/turbo-test.log +307 -307
- package/CHANGELOG.md +71 -0
- package/bin/swarm.ts +234 -179
- package/dist/compaction-hook.d.ts +54 -4
- package/dist/compaction-hook.d.ts.map +1 -1
- package/dist/eval-capture.d.ts +122 -17
- package/dist/eval-capture.d.ts.map +1 -1
- package/dist/index.d.ts +1 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1278 -619
- package/dist/planning-guardrails.d.ts +121 -0
- package/dist/planning-guardrails.d.ts.map +1 -1
- package/dist/plugin.d.ts +9 -9
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +1283 -329
- package/dist/schemas/task.d.ts +0 -1
- package/dist/schemas/task.d.ts.map +1 -1
- package/dist/swarm-decompose.d.ts +0 -8
- package/dist/swarm-decompose.d.ts.map +1 -1
- package/dist/swarm-orchestrate.d.ts.map +1 -1
- package/dist/swarm-prompts.d.ts +0 -4
- package/dist/swarm-prompts.d.ts.map +1 -1
- package/dist/swarm-review.d.ts.map +1 -1
- package/dist/swarm.d.ts +0 -6
- package/dist/swarm.d.ts.map +1 -1
- package/evals/README.md +38 -0
- package/evals/coordinator-session.eval.ts +154 -0
- package/evals/fixtures/coordinator-sessions.ts +328 -0
- package/evals/lib/data-loader.ts +69 -0
- package/evals/scorers/coordinator-discipline.evalite-test.ts +536 -0
- package/evals/scorers/coordinator-discipline.ts +315 -0
- package/evals/scorers/index.ts +12 -0
- package/examples/plugin-wrapper-template.ts +303 -4
- package/package.json +2 -2
- package/src/compaction-hook.test.ts +8 -1
- package/src/compaction-hook.ts +31 -21
- package/src/eval-capture.test.ts +390 -0
- package/src/eval-capture.ts +163 -4
- package/src/index.ts +68 -1
- package/src/planning-guardrails.test.ts +387 -2
- package/src/planning-guardrails.ts +289 -0
- package/src/plugin.ts +10 -10
- package/src/swarm-decompose.ts +20 -0
- package/src/swarm-orchestrate.ts +44 -0
- package/src/swarm-prompts.ts +20 -0
- package/src/swarm-review.ts +41 -0
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* This is NOT about preserving state for a human - it's about the swarm continuing
|
|
39
39
|
* autonomously after context compression.
|
|
40
40
|
*/
|
|
41
|
-
export declare const SWARM_COMPACTION_CONTEXT = "## \uD83D\uDC1D SWARM ACTIVE -
|
|
41
|
+
export declare const SWARM_COMPACTION_CONTEXT = "## \uD83D\uDC1D SWARM ACTIVE - You Are The COORDINATOR\n\nContext was compacted but the swarm is still running. You are the **COORDINATOR**.\n\n### \u26D4 NEVER DO THESE (Coordinator Anti-Patterns)\n\n**CRITICAL: Coordinators NEVER do implementation work. ALWAYS spawn workers.**\n\n- \u274C **NEVER** use `edit` or `write` tools - SPAWN A WORKER\n- \u274C **NEVER** run tests with `bash` - SPAWN A WORKER \n- \u274C **NEVER** implement features yourself - SPAWN A WORKER\n- \u274C **NEVER** \"just do it myself to save time\" - NO. SPAWN A WORKER.\n- \u274C **NEVER** reserve files with `swarmmail_reserve` - Workers reserve files\n\n**If you catch yourself about to edit a file, STOP. Use `swarm_spawn_subtask` instead.**\n\n### \u2705 ALWAYS DO THESE (Coordinator Checklist)\n\nOn resume, execute this checklist IN ORDER:\n\n1. `swarm_status(epic_id=\"<epic>\", project_key=\"<path>\")` - Get current state\n2. `swarmmail_inbox(limit=5)` - Check for agent messages\n3. For completed work: `swarm_review` \u2192 `swarm_review_feedback`\n4. For open subtasks: `swarm_spawn_subtask` (NOT \"do it yourself\")\n5. For blocked work: Investigate, unblock, reassign\n\n### Preserve in Summary\n\nExtract from session context:\n\n1. **Epic & Subtasks** - IDs, titles, status, file assignments\n2. **What's Running** - Which agents are active, what they're working on \n3. **What's Blocked** - Blockers and what's needed to unblock\n4. **What's Done** - Completed work and any follow-ups needed\n5. **What's Next** - Pending subtasks ready to spawn\n\n### Summary Format\n\n```\n## \uD83D\uDC1D Swarm State\n\n**Epic:** <cell-xxx> - <title>\n**Project:** <path>\n**Progress:** X/Y subtasks complete\n\n**Active:**\n- <cell-xxx>: <title> [in_progress] \u2192 <agent> working on <files>\n\n**Blocked:**\n- <cell-xxx>: <title> - BLOCKED: <reason>\n\n**Completed:**\n- <cell-xxx>: <title> \u2713\n\n**Ready to Spawn:**\n- <cell-xxx>: <title> (files: <...>)\n```\n\n### Your Role\n\n- **Spawn aggressively** - If a subtask is ready and unblocked, spawn an agent\n- **Monitor actively** - Check status, read messages, respond to blockers\n- **Review work** - Use `swarm_review` and `swarm_review_feedback` for completed work\n- **Close the loop** - When all subtasks done, verify and close the epic\n\n**You are the COORDINATOR. You orchestrate. You do NOT implement. Spawn workers.**\n";
|
|
42
42
|
/**
|
|
43
43
|
* Fallback detection prompt - tells the compactor what to look for
|
|
44
44
|
*
|
|
@@ -46,6 +46,52 @@ export declare const SWARM_COMPACTION_CONTEXT = "## \uD83D\uDC1D SWARM ACTIVE -
|
|
|
46
46
|
* The compactor can check the conversation context for these patterns.
|
|
47
47
|
*/
|
|
48
48
|
export declare const SWARM_DETECTION_FALLBACK = "## \uD83D\uDC1D Swarm Detection - Check Your Context\n\n**IMPORTANT:** Before summarizing, check if this session involves an active swarm.\n\nLook for ANY of these patterns in the conversation:\n\n### Tool Calls (definite swarm sign)\n- `swarm_decompose`, `swarm_spawn_subtask`, `swarm_status`, `swarm_complete`\n- `swarmmail_init`, `swarmmail_reserve`, `swarmmail_send`\n- `hive_create_epic`, `hive_start`, `hive_close`\n\n### IDs and Names\n- Cell IDs: `bd-xxx`, `bd-xxx.N` (subtask format)\n- Agent names: BlueLake, RedMountain, GreenValley, etc.\n- Epic references: \"epic\", \"subtask\", \"parent\"\n\n### Coordination Language\n- \"spawn\", \"worker\", \"coordinator\"\n- \"reserve\", \"reservation\", \"files\"\n- \"blocked\", \"unblock\", \"dependency\"\n- \"progress\", \"complete\", \"in_progress\"\n\n### If You Find Swarm Evidence\n\nInclude this in your summary:\n1. Epic ID and title\n2. Project path\n3. Subtask status (running/blocked/done/pending)\n4. Any blockers or issues\n5. What should happen next\n\n**Then tell the resumed session:**\n\"This is an active swarm. Check swarm_status and swarmmail_inbox immediately.\"\n";
|
|
49
|
+
/**
|
|
50
|
+
* SDK Client type (minimal interface for scanSessionMessages)
|
|
51
|
+
*
|
|
52
|
+
* The actual SDK client uses a more complex Options-based API:
|
|
53
|
+
* client.session.messages({ path: { id: sessionID }, query: { limit } })
|
|
54
|
+
*
|
|
55
|
+
* We accept `unknown` and handle the type internally to avoid
|
|
56
|
+
* tight coupling to SDK internals.
|
|
57
|
+
*/
|
|
58
|
+
export type OpencodeClient = unknown;
|
|
59
|
+
/**
|
|
60
|
+
* Scanned swarm state extracted from session messages
|
|
61
|
+
*/
|
|
62
|
+
export interface ScannedSwarmState {
|
|
63
|
+
epicId?: string;
|
|
64
|
+
epicTitle?: string;
|
|
65
|
+
projectPath?: string;
|
|
66
|
+
agentName?: string;
|
|
67
|
+
subtasks: Map<string, {
|
|
68
|
+
title: string;
|
|
69
|
+
status: string;
|
|
70
|
+
worker?: string;
|
|
71
|
+
files?: string[];
|
|
72
|
+
}>;
|
|
73
|
+
lastAction?: {
|
|
74
|
+
tool: string;
|
|
75
|
+
args: unknown;
|
|
76
|
+
timestamp: number;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Scan session messages for swarm state using SDK client
|
|
81
|
+
*
|
|
82
|
+
* Extracts swarm coordination state from actual tool calls:
|
|
83
|
+
* - swarm_spawn_subtask → subtask tracking
|
|
84
|
+
* - swarmmail_init → agent name, project path
|
|
85
|
+
* - hive_create_epic → epic ID and title
|
|
86
|
+
* - swarm_status → epic reference
|
|
87
|
+
* - swarm_complete → subtask completion
|
|
88
|
+
*
|
|
89
|
+
* @param client - OpenCode SDK client (undefined if not available)
|
|
90
|
+
* @param sessionID - Session to scan
|
|
91
|
+
* @param limit - Max messages to fetch (default 100)
|
|
92
|
+
* @returns Extracted swarm state
|
|
93
|
+
*/
|
|
94
|
+
export declare function scanSessionMessages(client: OpencodeClient, sessionID: string, limit?: number): Promise<ScannedSwarmState>;
|
|
49
95
|
/**
|
|
50
96
|
* Create the compaction hook for use in plugin registration
|
|
51
97
|
*
|
|
@@ -57,17 +103,21 @@ export declare const SWARM_DETECTION_FALLBACK = "## \uD83D\uDC1D Swarm Detection
|
|
|
57
103
|
* Philosophy: Err on the side of continuation. A false positive costs
|
|
58
104
|
* a bit of context space. A false negative loses the swarm.
|
|
59
105
|
*
|
|
106
|
+
* @param client - Optional OpenCode SDK client for scanning session messages.
|
|
107
|
+
* When provided, extracts PRECISE swarm state from actual tool calls.
|
|
108
|
+
* When undefined, falls back to hive/swarm-mail heuristic detection.
|
|
109
|
+
*
|
|
60
110
|
* @example
|
|
61
111
|
* ```typescript
|
|
62
112
|
* import { createCompactionHook } from "opencode-swarm-plugin";
|
|
63
113
|
*
|
|
64
|
-
* export const SwarmPlugin: Plugin = async () => ({
|
|
114
|
+
* export const SwarmPlugin: Plugin = async (input) => ({
|
|
65
115
|
* tool: { ... },
|
|
66
|
-
* "experimental.session.compacting": createCompactionHook(),
|
|
116
|
+
* "experimental.session.compacting": createCompactionHook(input.client),
|
|
67
117
|
* });
|
|
68
118
|
* ```
|
|
69
119
|
*/
|
|
70
|
-
export declare function createCompactionHook(): (input: {
|
|
120
|
+
export declare function createCompactionHook(client?: OpencodeClient): (input: {
|
|
71
121
|
sessionID: string;
|
|
72
122
|
}, output: {
|
|
73
123
|
context: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compaction-hook.d.ts","sourceRoot":"","sources":["../src/compaction-hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AA+BH;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"compaction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
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Eval Data Capture - Captures real swarm execution data for evals
|
|
3
|
-
*
|
|
4
|
-
* Records decomposition inputs, outputs, and outcomes to JSONL files
|
|
5
|
-
* that can be used as ground truth for Evalite evals.
|
|
6
|
-
*
|
|
7
|
-
* Data flow:
|
|
8
|
-
* 1. swarm_decompose captures: task, context, generated decomposition
|
|
9
|
-
* 2. swarm_complete captures: outcome signals per subtask
|
|
10
|
-
* 3. swarm_record_outcome captures: learning signals
|
|
11
|
-
* 4. Human feedback (optional): accept/reject/modify
|
|
12
|
-
*
|
|
13
|
-
* @module eval-capture
|
|
14
|
-
*/
|
|
15
1
|
import { z } from "zod";
|
|
16
2
|
/**
|
|
17
3
|
* Subtask outcome - what actually happened
|
|
@@ -43,7 +29,7 @@ export declare const EvalRecordSchema: z.ZodObject<{
|
|
|
43
29
|
"risk-based": "risk-based";
|
|
44
30
|
auto: "auto";
|
|
45
31
|
}>;
|
|
46
|
-
|
|
32
|
+
subtask_count: z.ZodNumber;
|
|
47
33
|
epic_title: z.ZodString;
|
|
48
34
|
epic_description: z.ZodOptional<z.ZodString>;
|
|
49
35
|
subtasks: z.ZodArray<z.ZodObject<{
|
|
@@ -83,6 +69,94 @@ export type PartialEvalRecord = Partial<EvalRecord> & {
|
|
|
83
69
|
timestamp: string;
|
|
84
70
|
task: string;
|
|
85
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* Coordinator Event - captures coordinator decisions, violations, and outcomes
|
|
74
|
+
*/
|
|
75
|
+
export declare const CoordinatorEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
76
|
+
session_id: z.ZodString;
|
|
77
|
+
epic_id: z.ZodString;
|
|
78
|
+
timestamp: z.ZodString;
|
|
79
|
+
event_type: z.ZodLiteral<"DECISION">;
|
|
80
|
+
decision_type: z.ZodEnum<{
|
|
81
|
+
strategy_selected: "strategy_selected";
|
|
82
|
+
worker_spawned: "worker_spawned";
|
|
83
|
+
review_completed: "review_completed";
|
|
84
|
+
decomposition_complete: "decomposition_complete";
|
|
85
|
+
}>;
|
|
86
|
+
payload: z.ZodAny;
|
|
87
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
88
|
+
session_id: z.ZodString;
|
|
89
|
+
epic_id: z.ZodString;
|
|
90
|
+
timestamp: z.ZodString;
|
|
91
|
+
event_type: z.ZodLiteral<"VIOLATION">;
|
|
92
|
+
violation_type: z.ZodEnum<{
|
|
93
|
+
coordinator_edited_file: "coordinator_edited_file";
|
|
94
|
+
coordinator_ran_tests: "coordinator_ran_tests";
|
|
95
|
+
coordinator_reserved_files: "coordinator_reserved_files";
|
|
96
|
+
no_worker_spawned: "no_worker_spawned";
|
|
97
|
+
}>;
|
|
98
|
+
payload: z.ZodAny;
|
|
99
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
100
|
+
session_id: z.ZodString;
|
|
101
|
+
epic_id: z.ZodString;
|
|
102
|
+
timestamp: z.ZodString;
|
|
103
|
+
event_type: z.ZodLiteral<"OUTCOME">;
|
|
104
|
+
outcome_type: z.ZodEnum<{
|
|
105
|
+
subtask_success: "subtask_success";
|
|
106
|
+
subtask_retry: "subtask_retry";
|
|
107
|
+
subtask_failed: "subtask_failed";
|
|
108
|
+
epic_complete: "epic_complete";
|
|
109
|
+
}>;
|
|
110
|
+
payload: z.ZodAny;
|
|
111
|
+
}, z.core.$strip>], "event_type">;
|
|
112
|
+
export type CoordinatorEvent = z.infer<typeof CoordinatorEventSchema>;
|
|
113
|
+
/**
|
|
114
|
+
* Coordinator Session - wraps a full coordinator session
|
|
115
|
+
*/
|
|
116
|
+
export declare const CoordinatorSessionSchema: z.ZodObject<{
|
|
117
|
+
session_id: z.ZodString;
|
|
118
|
+
epic_id: z.ZodString;
|
|
119
|
+
start_time: z.ZodString;
|
|
120
|
+
end_time: z.ZodOptional<z.ZodString>;
|
|
121
|
+
events: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
122
|
+
session_id: z.ZodString;
|
|
123
|
+
epic_id: z.ZodString;
|
|
124
|
+
timestamp: z.ZodString;
|
|
125
|
+
event_type: z.ZodLiteral<"DECISION">;
|
|
126
|
+
decision_type: z.ZodEnum<{
|
|
127
|
+
strategy_selected: "strategy_selected";
|
|
128
|
+
worker_spawned: "worker_spawned";
|
|
129
|
+
review_completed: "review_completed";
|
|
130
|
+
decomposition_complete: "decomposition_complete";
|
|
131
|
+
}>;
|
|
132
|
+
payload: z.ZodAny;
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
+
session_id: z.ZodString;
|
|
135
|
+
epic_id: z.ZodString;
|
|
136
|
+
timestamp: z.ZodString;
|
|
137
|
+
event_type: z.ZodLiteral<"VIOLATION">;
|
|
138
|
+
violation_type: z.ZodEnum<{
|
|
139
|
+
coordinator_edited_file: "coordinator_edited_file";
|
|
140
|
+
coordinator_ran_tests: "coordinator_ran_tests";
|
|
141
|
+
coordinator_reserved_files: "coordinator_reserved_files";
|
|
142
|
+
no_worker_spawned: "no_worker_spawned";
|
|
143
|
+
}>;
|
|
144
|
+
payload: z.ZodAny;
|
|
145
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
146
|
+
session_id: z.ZodString;
|
|
147
|
+
epic_id: z.ZodString;
|
|
148
|
+
timestamp: z.ZodString;
|
|
149
|
+
event_type: z.ZodLiteral<"OUTCOME">;
|
|
150
|
+
outcome_type: z.ZodEnum<{
|
|
151
|
+
subtask_success: "subtask_success";
|
|
152
|
+
subtask_retry: "subtask_retry";
|
|
153
|
+
subtask_failed: "subtask_failed";
|
|
154
|
+
epic_complete: "epic_complete";
|
|
155
|
+
}>;
|
|
156
|
+
payload: z.ZodAny;
|
|
157
|
+
}, z.core.$strip>], "event_type">>;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
export type CoordinatorSession = z.infer<typeof CoordinatorSessionSchema>;
|
|
86
160
|
/**
|
|
87
161
|
* Default path for eval data
|
|
88
162
|
*/
|
|
@@ -123,7 +197,6 @@ export declare function captureDecomposition(params: {
|
|
|
123
197
|
task: string;
|
|
124
198
|
context?: string;
|
|
125
199
|
strategy: "file-based" | "feature-based" | "risk-based" | "auto";
|
|
126
|
-
maxSubtasks: number;
|
|
127
200
|
epicTitle: string;
|
|
128
201
|
epicDescription?: string;
|
|
129
202
|
subtasks: Array<{
|
|
@@ -185,7 +258,7 @@ export declare function exportForEvalite(projectPath: string): Array<{
|
|
|
185
258
|
};
|
|
186
259
|
expected: {
|
|
187
260
|
minSubtasks: number;
|
|
188
|
-
|
|
261
|
+
subtaskCount: number;
|
|
189
262
|
requiredFiles?: string[];
|
|
190
263
|
overallSuccess?: boolean;
|
|
191
264
|
};
|
|
@@ -203,4 +276,36 @@ export declare function getEvalDataStats(projectPath: string): {
|
|
|
203
276
|
avgScopeAccuracy: number;
|
|
204
277
|
avgTimeBalance: number;
|
|
205
278
|
};
|
|
279
|
+
/**
|
|
280
|
+
* Get the session directory path
|
|
281
|
+
*/
|
|
282
|
+
export declare function getSessionDir(): string;
|
|
283
|
+
/**
|
|
284
|
+
* Get the session file path for a session ID
|
|
285
|
+
*/
|
|
286
|
+
export declare function getSessionPath(sessionId: string): string;
|
|
287
|
+
/**
|
|
288
|
+
* Ensure the session directory exists
|
|
289
|
+
*/
|
|
290
|
+
export declare function ensureSessionDir(): void;
|
|
291
|
+
/**
|
|
292
|
+
* Capture a coordinator event to the session file
|
|
293
|
+
*
|
|
294
|
+
* Appends the event as a JSONL line to ~/.config/swarm-tools/sessions/{session_id}.jsonl
|
|
295
|
+
*/
|
|
296
|
+
export declare function captureCoordinatorEvent(event: CoordinatorEvent): void;
|
|
297
|
+
/**
|
|
298
|
+
* Read all events from a session file
|
|
299
|
+
*/
|
|
300
|
+
export declare function readSessionEvents(sessionId: string): CoordinatorEvent[];
|
|
301
|
+
/**
|
|
302
|
+
* Save a session - wraps all events in a CoordinatorSession structure
|
|
303
|
+
*
|
|
304
|
+
* Reads all events from the session file and wraps them in a session object.
|
|
305
|
+
* Returns null if the session file doesn't exist.
|
|
306
|
+
*/
|
|
307
|
+
export declare function saveSession(params: {
|
|
308
|
+
session_id: string;
|
|
309
|
+
epic_id: string;
|
|
310
|
+
}): CoordinatorSession | null;
|
|
206
311
|
//# sourceMappingURL=eval-capture.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eval-capture.d.ts","sourceRoot":"","sources":["../src/eval-capture.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"eval-capture.d.ts","sourceRoot":"","sources":["../src/eval-capture.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;iBAmB/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2D3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA2CjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAA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AkBD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB,CAuCA;AAMD;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAWrE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAavE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,kBAAkB,GAAG,IAAI,CAoB5B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ import type { Plugin } from "@opencode-ai/plugin";
|
|
|
39
39
|
* @param input - Plugin context from OpenCode
|
|
40
40
|
* @returns Plugin hooks including tools, events, and tool execution hooks
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
declare const SwarmPlugin: Plugin;
|
|
43
43
|
/**
|
|
44
44
|
* Default export for OpenCode plugin loading
|
|
45
45
|
*
|
|
@@ -1036,7 +1036,6 @@ export declare const allTools: {
|
|
|
1036
1036
|
"risk-based": "risk-based";
|
|
1037
1037
|
auto: "auto";
|
|
1038
1038
|
}>>;
|
|
1039
|
-
max_subtasks: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1040
1039
|
context: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1041
1040
|
query_cass: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1042
1041
|
cass_limit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -1045,7 +1044,6 @@ export declare const allTools: {
|
|
|
1045
1044
|
execute(args: {
|
|
1046
1045
|
task: string;
|
|
1047
1046
|
strategy?: "file-based" | "feature-based" | "risk-based" | "auto" | undefined;
|
|
1048
|
-
max_subtasks?: number | undefined;
|
|
1049
1047
|
context?: string | undefined;
|
|
1050
1048
|
query_cass?: boolean | undefined;
|
|
1051
1049
|
cass_limit?: number | undefined;
|
|
@@ -1056,14 +1054,12 @@ export declare const allTools: {
|
|
|
1056
1054
|
description: string;
|
|
1057
1055
|
args: {
|
|
1058
1056
|
task: import("zod").ZodString;
|
|
1059
|
-
max_subtasks: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1060
1057
|
context: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1061
1058
|
query_cass: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1062
1059
|
cass_limit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1063
1060
|
};
|
|
1064
1061
|
execute(args: {
|
|
1065
1062
|
task: string;
|
|
1066
|
-
max_subtasks?: number | undefined;
|
|
1067
1063
|
context?: string | undefined;
|
|
1068
1064
|
query_cass?: boolean | undefined;
|
|
1069
1065
|
cass_limit?: number | undefined;
|
|
@@ -1083,7 +1079,6 @@ export declare const allTools: {
|
|
|
1083
1079
|
args: {
|
|
1084
1080
|
task: import("zod").ZodString;
|
|
1085
1081
|
context: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1086
|
-
max_subtasks: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1087
1082
|
strategy: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1088
1083
|
"file-based": "file-based";
|
|
1089
1084
|
"feature-based": "feature-based";
|
|
@@ -1097,7 +1092,6 @@ export declare const allTools: {
|
|
|
1097
1092
|
strategy: "file-based" | "feature-based" | "risk-based" | "auto";
|
|
1098
1093
|
query_cass: boolean;
|
|
1099
1094
|
context?: string | undefined;
|
|
1100
|
-
max_subtasks?: number | undefined;
|
|
1101
1095
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
1102
1096
|
};
|
|
1103
1097
|
readonly swarm_plan_interactive: {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAsB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAsB,MAAM,qBAAqB,CAAC;AA6CtE;;;;;;;;;;;;;;;;;GAiBG;AACH,QAAA,MAAM,WAAW,EAAE,MA0QlB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAe,WAAW,CAAC;AAM3B;;GAEG;AACH,cAAc,WAAW,CAAC;AAE1B;;;;;;;;;;;GAWG;AACH,cAAc,QAAQ,CAAC;AAEvB;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,cAAc,EACd,cAAc,EACd,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC5B,4BAA4B,EAC5B,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,cAAc,EACd,4BAA4B,EAC5B,4BAA4B,EAC5B,iBAAiB,EACjB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AAEtB;;;;;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