opencode-swarm-plugin 0.12.8 → 0.12.9
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/.beads/issues.jsonl +2 -0
- package/dist/index.js +47 -5
- package/dist/plugin.js +47 -5
- package/package.json +1 -1
- package/src/learning.ts +1 -0
- package/src/swarm.ts +45 -2
package/.beads/issues.jsonl
CHANGED
|
@@ -305,6 +305,7 @@
|
|
|
305
305
|
{"id":"opencode-swarm-plugin-5ukv1","title":"Bead to start","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T09:06:07.140527-08:00","updated_at":"2025-12-10T09:06:10.259329-08:00","closed_at":"2025-12-10T09:06:10.259329-08:00"}
|
|
306
306
|
{"id":"opencode-swarm-plugin-5uvt","title":"Limit test bead 3","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T07:46:49.108567-08:00","updated_at":"2025-12-08T07:46:51.736011-08:00","closed_at":"2025-12-08T07:46:51.736011-08:00"}
|
|
307
307
|
{"id":"opencode-swarm-plugin-5x8v","title":"Bead to start","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T11:10:53.928154-08:00","updated_at":"2025-12-08T11:10:56.008815-08:00","closed_at":"2025-12-08T11:10:56.008815-08:00"}
|
|
308
|
+
{"id":"opencode-swarm-plugin-5xy17","title":"Swarm should support research task decomposition with pdf-brain","description":"Currently swarm coordinator treats \"research\" tasks as single-agent work. Should decompose research into parallel agents that:\n\n1. Search different sources (pdf-brain, repo-crawl, cass, web)\n2. Focus on different aspects of the question\n3. Synthesize findings into coherent answer\n\nExample decomposition for \"debug levers for agent mail\":\n- Agent 1: Search pdf-brain for \"agent debugging\", \"MCP server configuration\"\n- Agent 2: Crawl the repo README, .env.example, config.py\n- Agent 3: Search cass for past sessions dealing with agent-mail errors\n- Agent 4: Synthesize findings from other agents\n\nStrategy selection should recognize research keywords:\n- research, investigate, explore, find, discover, understand, learn, analyze\n\nTool availability check:\n- If pdf-brain available, include PDF search subtask\n- If repo-crawl available, include repo exploration subtask\n- If cass available, include history search subtask\n\nFiles: src/swarm.ts (add research strategy), src/tool-availability.ts","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-10T10:59:41.26917-08:00","updated_at":"2025-12-10T11:01:35.90704-08:00","closed_at":"2025-12-10T11:01:35.90704-08:00"}
|
|
308
309
|
{"id":"opencode-swarm-plugin-5ztv","title":"New feature request","description":"","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-08T11:12:40.764593-08:00","updated_at":"2025-12-08T11:12:43.52524-08:00","closed_at":"2025-12-08T11:12:43.52524-08:00"}
|
|
309
310
|
{"id":"opencode-swarm-plugin-61t","title":"Single subtask epic","description":"","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-07T19:36:07.443401-08:00","updated_at":"2025-12-07T19:36:09.031886-08:00","closed_at":"2025-12-07T19:36:09.031886-08:00"}
|
|
310
311
|
{"id":"opencode-swarm-plugin-62da","title":"Update test bead","description":"Updated description","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T11:11:38.733772-08:00","updated_at":"2025-12-08T11:11:41.037318-08:00","closed_at":"2025-12-08T11:11:41.037318-08:00"}
|
|
@@ -947,6 +948,7 @@
|
|
|
947
948
|
{"id":"opencode-swarm-plugin-jbdj","title":"Thread link test bead","description":"[thread:test-thread-456]","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T11:10:54.731569-08:00","updated_at":"2025-12-08T11:10:56.43993-08:00","closed_at":"2025-12-08T11:10:56.43993-08:00"}
|
|
948
949
|
{"id":"opencode-swarm-plugin-jc9y","title":"Query test bead","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-07T19:39:29.328372-08:00","updated_at":"2025-12-07T19:39:31.358211-08:00","closed_at":"2025-12-07T19:39:31.358211-08:00"}
|
|
949
950
|
{"id":"opencode-swarm-plugin-jdj","title":"Update test bead","description":"Updated description","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-07T19:39:10.007126-08:00","updated_at":"2025-12-07T19:39:11.999539-08:00","closed_at":"2025-12-07T19:39:11.999539-08:00"}
|
|
951
|
+
{"id":"opencode-swarm-plugin-jf6gz","title":"Add repo-crawl tools to swarm plugin","description":"repo-crawl is essential for research tasks. Should be part of the plugin rather than a separate MCP server.\n\nTools to add:\n- repo_readme(repo) - Get README content\n- repo_structure(repo) - Get repo structure and tech stack\n- repo_tree(repo, path?) - Get directory tree\n- repo_file(repo, path) - Get file content\n- repo_search(repo, query) - Search code in repo\n\nImplementation:\n- Use GitHub API (unauthenticated for public repos, GITHUB_TOKEN for private)\n- Add to tool-availability.ts checks\n- Integrate with research-based strategy\n\nFiles: src/repo-crawl.ts (new), src/index.ts, src/tool-availability.ts","status":"open","priority":2,"issue_type":"feature","created_at":"2025-12-10T11:01:29.213791-08:00","updated_at":"2025-12-10T11:01:29.213791-08:00"}
|
|
950
952
|
{"id":"opencode-swarm-plugin-jg4c","title":"Thread link test bead","description":"[thread:test-thread-123]","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T08:22:18.157665-08:00","updated_at":"2025-12-08T08:22:19.932643-08:00","closed_at":"2025-12-08T08:22:19.932643-08:00"}
|
|
951
953
|
{"id":"opencode-swarm-plugin-jhk","title":"Limit test bead 2","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-07T19:39:18.330876-08:00","updated_at":"2025-12-07T19:39:20.45981-08:00","closed_at":"2025-12-07T19:39:20.45981-08:00"}
|
|
952
954
|
{"id":"opencode-swarm-plugin-jiqn","title":"Single subtask epic","description":"","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-07T19:57:07.022149-08:00","updated_at":"2025-12-07T19:57:08.738869-08:00","closed_at":"2025-12-07T19:57:08.738869-08:00"}
|
package/dist/index.js
CHANGED
|
@@ -23774,7 +23774,8 @@ var ErrorEntrySchema = exports_external.object({
|
|
|
23774
23774
|
var DecompositionStrategySchema = exports_external.enum([
|
|
23775
23775
|
"file-based",
|
|
23776
23776
|
"feature-based",
|
|
23777
|
-
"risk-based"
|
|
23777
|
+
"risk-based",
|
|
23778
|
+
"research-based"
|
|
23778
23779
|
]);
|
|
23779
23780
|
var OutcomeSignalsSchema = exports_external.object({
|
|
23780
23781
|
bead_id: exports_external.string(),
|
|
@@ -24138,8 +24139,7 @@ var STRATEGIES = {
|
|
|
24138
24139
|
"hotfix",
|
|
24139
24140
|
"patch",
|
|
24140
24141
|
"audit",
|
|
24141
|
-
"review"
|
|
24142
|
-
"investigate"
|
|
24142
|
+
"review"
|
|
24143
24143
|
],
|
|
24144
24144
|
guidelines: [
|
|
24145
24145
|
"Write tests FIRST to capture expected behavior",
|
|
@@ -24158,6 +24158,47 @@ var STRATEGIES = {
|
|
|
24158
24158
|
"Fix race condition \u2192 [Add test reproducing issue, Implement fix, Add concurrency tests]",
|
|
24159
24159
|
"Security audit \u2192 [Scan for vulnerabilities, Fix critical issues, Document remaining risks]"
|
|
24160
24160
|
]
|
|
24161
|
+
},
|
|
24162
|
+
"research-based": {
|
|
24163
|
+
name: "research-based",
|
|
24164
|
+
description: "Parallel search across multiple sources, then synthesize. Best for investigation, learning, and discovery tasks.",
|
|
24165
|
+
keywords: [
|
|
24166
|
+
"research",
|
|
24167
|
+
"investigate",
|
|
24168
|
+
"explore",
|
|
24169
|
+
"find",
|
|
24170
|
+
"discover",
|
|
24171
|
+
"understand",
|
|
24172
|
+
"learn",
|
|
24173
|
+
"analyze",
|
|
24174
|
+
"what",
|
|
24175
|
+
"how",
|
|
24176
|
+
"why",
|
|
24177
|
+
"compare",
|
|
24178
|
+
"evaluate",
|
|
24179
|
+
"study",
|
|
24180
|
+
"look up",
|
|
24181
|
+
"search"
|
|
24182
|
+
],
|
|
24183
|
+
guidelines: [
|
|
24184
|
+
"Split by information source (PDFs, repos, history, web)",
|
|
24185
|
+
"Each agent searches with different query angles",
|
|
24186
|
+
"Include a synthesis subtask that depends on all search subtasks",
|
|
24187
|
+
"Use pdf-brain for documentation/books if available",
|
|
24188
|
+
"Use repo-crawl for GitHub repos if URL provided",
|
|
24189
|
+
"Use cass for past agent session history",
|
|
24190
|
+
"Assign NO files to research subtasks (read-only)"
|
|
24191
|
+
],
|
|
24192
|
+
antiPatterns: [
|
|
24193
|
+
"Don't have one agent search everything sequentially",
|
|
24194
|
+
"Don't skip synthesis - raw search results need consolidation",
|
|
24195
|
+
"Don't forget to check tool availability before assigning sources"
|
|
24196
|
+
],
|
|
24197
|
+
examples: [
|
|
24198
|
+
"Research auth patterns \u2192 [Search PDFs, Search repos, Search history, Synthesize]",
|
|
24199
|
+
"Investigate error \u2192 [Search cass for similar errors, Search repo for error handling, Synthesize]",
|
|
24200
|
+
"Learn about library \u2192 [Search docs, Search examples, Search issues, Synthesize findings]"
|
|
24201
|
+
]
|
|
24161
24202
|
}
|
|
24162
24203
|
};
|
|
24163
24204
|
function selectStrategy(task) {
|
|
@@ -24165,7 +24206,8 @@ function selectStrategy(task) {
|
|
|
24165
24206
|
const scores = {
|
|
24166
24207
|
"file-based": 0,
|
|
24167
24208
|
"feature-based": 0,
|
|
24168
|
-
"risk-based": 0
|
|
24209
|
+
"risk-based": 0,
|
|
24210
|
+
"research-based": 0
|
|
24169
24211
|
};
|
|
24170
24212
|
for (const [strategyName, definition] of Object.entries(STRATEGIES)) {
|
|
24171
24213
|
const name = strategyName;
|
|
@@ -25112,7 +25154,7 @@ var swarm_record_outcome = tool({
|
|
|
25112
25154
|
success: tool.schema.boolean().describe("Whether the subtask succeeded"),
|
|
25113
25155
|
files_touched: tool.schema.array(tool.schema.string()).optional().describe("Files that were modified"),
|
|
25114
25156
|
criteria: tool.schema.array(tool.schema.string()).optional().describe("Criteria to generate feedback for (default: all default criteria)"),
|
|
25115
|
-
strategy: tool.schema.enum(["file-based", "feature-based", "risk-based"]).optional().describe("Decomposition strategy used for this task")
|
|
25157
|
+
strategy: tool.schema.enum(["file-based", "feature-based", "risk-based", "research-based"]).optional().describe("Decomposition strategy used for this task")
|
|
25116
25158
|
},
|
|
25117
25159
|
async execute(args) {
|
|
25118
25160
|
const signals = {
|
package/dist/plugin.js
CHANGED
|
@@ -23748,7 +23748,8 @@ var ErrorEntrySchema = exports_external.object({
|
|
|
23748
23748
|
var DecompositionStrategySchema = exports_external.enum([
|
|
23749
23749
|
"file-based",
|
|
23750
23750
|
"feature-based",
|
|
23751
|
-
"risk-based"
|
|
23751
|
+
"risk-based",
|
|
23752
|
+
"research-based"
|
|
23752
23753
|
]);
|
|
23753
23754
|
var OutcomeSignalsSchema = exports_external.object({
|
|
23754
23755
|
bead_id: exports_external.string(),
|
|
@@ -24096,8 +24097,7 @@ var STRATEGIES = {
|
|
|
24096
24097
|
"hotfix",
|
|
24097
24098
|
"patch",
|
|
24098
24099
|
"audit",
|
|
24099
|
-
"review"
|
|
24100
|
-
"investigate"
|
|
24100
|
+
"review"
|
|
24101
24101
|
],
|
|
24102
24102
|
guidelines: [
|
|
24103
24103
|
"Write tests FIRST to capture expected behavior",
|
|
@@ -24116,6 +24116,47 @@ var STRATEGIES = {
|
|
|
24116
24116
|
"Fix race condition \u2192 [Add test reproducing issue, Implement fix, Add concurrency tests]",
|
|
24117
24117
|
"Security audit \u2192 [Scan for vulnerabilities, Fix critical issues, Document remaining risks]"
|
|
24118
24118
|
]
|
|
24119
|
+
},
|
|
24120
|
+
"research-based": {
|
|
24121
|
+
name: "research-based",
|
|
24122
|
+
description: "Parallel search across multiple sources, then synthesize. Best for investigation, learning, and discovery tasks.",
|
|
24123
|
+
keywords: [
|
|
24124
|
+
"research",
|
|
24125
|
+
"investigate",
|
|
24126
|
+
"explore",
|
|
24127
|
+
"find",
|
|
24128
|
+
"discover",
|
|
24129
|
+
"understand",
|
|
24130
|
+
"learn",
|
|
24131
|
+
"analyze",
|
|
24132
|
+
"what",
|
|
24133
|
+
"how",
|
|
24134
|
+
"why",
|
|
24135
|
+
"compare",
|
|
24136
|
+
"evaluate",
|
|
24137
|
+
"study",
|
|
24138
|
+
"look up",
|
|
24139
|
+
"search"
|
|
24140
|
+
],
|
|
24141
|
+
guidelines: [
|
|
24142
|
+
"Split by information source (PDFs, repos, history, web)",
|
|
24143
|
+
"Each agent searches with different query angles",
|
|
24144
|
+
"Include a synthesis subtask that depends on all search subtasks",
|
|
24145
|
+
"Use pdf-brain for documentation/books if available",
|
|
24146
|
+
"Use repo-crawl for GitHub repos if URL provided",
|
|
24147
|
+
"Use cass for past agent session history",
|
|
24148
|
+
"Assign NO files to research subtasks (read-only)"
|
|
24149
|
+
],
|
|
24150
|
+
antiPatterns: [
|
|
24151
|
+
"Don't have one agent search everything sequentially",
|
|
24152
|
+
"Don't skip synthesis - raw search results need consolidation",
|
|
24153
|
+
"Don't forget to check tool availability before assigning sources"
|
|
24154
|
+
],
|
|
24155
|
+
examples: [
|
|
24156
|
+
"Research auth patterns \u2192 [Search PDFs, Search repos, Search history, Synthesize]",
|
|
24157
|
+
"Investigate error \u2192 [Search cass for similar errors, Search repo for error handling, Synthesize]",
|
|
24158
|
+
"Learn about library \u2192 [Search docs, Search examples, Search issues, Synthesize findings]"
|
|
24159
|
+
]
|
|
24119
24160
|
}
|
|
24120
24161
|
};
|
|
24121
24162
|
function selectStrategy(task) {
|
|
@@ -24123,7 +24164,8 @@ function selectStrategy(task) {
|
|
|
24123
24164
|
const scores = {
|
|
24124
24165
|
"file-based": 0,
|
|
24125
24166
|
"feature-based": 0,
|
|
24126
|
-
"risk-based": 0
|
|
24167
|
+
"risk-based": 0,
|
|
24168
|
+
"research-based": 0
|
|
24127
24169
|
};
|
|
24128
24170
|
for (const [strategyName, definition] of Object.entries(STRATEGIES)) {
|
|
24129
24171
|
const name = strategyName;
|
|
@@ -25062,7 +25104,7 @@ var swarm_record_outcome = tool({
|
|
|
25062
25104
|
success: tool.schema.boolean().describe("Whether the subtask succeeded"),
|
|
25063
25105
|
files_touched: tool.schema.array(tool.schema.string()).optional().describe("Files that were modified"),
|
|
25064
25106
|
criteria: tool.schema.array(tool.schema.string()).optional().describe("Criteria to generate feedback for (default: all default criteria)"),
|
|
25065
|
-
strategy: tool.schema.enum(["file-based", "feature-based", "risk-based"]).optional().describe("Decomposition strategy used for this task")
|
|
25107
|
+
strategy: tool.schema.enum(["file-based", "feature-based", "risk-based", "research-based"]).optional().describe("Decomposition strategy used for this task")
|
|
25066
25108
|
},
|
|
25067
25109
|
async execute(args) {
|
|
25068
25110
|
const signals = {
|
package/package.json
CHANGED
package/src/learning.ts
CHANGED
package/src/swarm.ts
CHANGED
|
@@ -210,6 +210,7 @@ export type DecompositionStrategy =
|
|
|
210
210
|
| "file-based"
|
|
211
211
|
| "feature-based"
|
|
212
212
|
| "risk-based"
|
|
213
|
+
| "research-based"
|
|
213
214
|
| "auto";
|
|
214
215
|
|
|
215
216
|
/**
|
|
@@ -316,7 +317,6 @@ export const STRATEGIES: Record<
|
|
|
316
317
|
"patch",
|
|
317
318
|
"audit",
|
|
318
319
|
"review",
|
|
319
|
-
"investigate",
|
|
320
320
|
],
|
|
321
321
|
guidelines: [
|
|
322
322
|
"Write tests FIRST to capture expected behavior",
|
|
@@ -336,6 +336,48 @@ export const STRATEGIES: Record<
|
|
|
336
336
|
"Security audit → [Scan for vulnerabilities, Fix critical issues, Document remaining risks]",
|
|
337
337
|
],
|
|
338
338
|
},
|
|
339
|
+
"research-based": {
|
|
340
|
+
name: "research-based",
|
|
341
|
+
description:
|
|
342
|
+
"Parallel search across multiple sources, then synthesize. Best for investigation, learning, and discovery tasks.",
|
|
343
|
+
keywords: [
|
|
344
|
+
"research",
|
|
345
|
+
"investigate",
|
|
346
|
+
"explore",
|
|
347
|
+
"find",
|
|
348
|
+
"discover",
|
|
349
|
+
"understand",
|
|
350
|
+
"learn",
|
|
351
|
+
"analyze",
|
|
352
|
+
"what",
|
|
353
|
+
"how",
|
|
354
|
+
"why",
|
|
355
|
+
"compare",
|
|
356
|
+
"evaluate",
|
|
357
|
+
"study",
|
|
358
|
+
"look up",
|
|
359
|
+
"search",
|
|
360
|
+
],
|
|
361
|
+
guidelines: [
|
|
362
|
+
"Split by information source (PDFs, repos, history, web)",
|
|
363
|
+
"Each agent searches with different query angles",
|
|
364
|
+
"Include a synthesis subtask that depends on all search subtasks",
|
|
365
|
+
"Use pdf-brain for documentation/books if available",
|
|
366
|
+
"Use repo-crawl for GitHub repos if URL provided",
|
|
367
|
+
"Use cass for past agent session history",
|
|
368
|
+
"Assign NO files to research subtasks (read-only)",
|
|
369
|
+
],
|
|
370
|
+
antiPatterns: [
|
|
371
|
+
"Don't have one agent search everything sequentially",
|
|
372
|
+
"Don't skip synthesis - raw search results need consolidation",
|
|
373
|
+
"Don't forget to check tool availability before assigning sources",
|
|
374
|
+
],
|
|
375
|
+
examples: [
|
|
376
|
+
"Research auth patterns → [Search PDFs, Search repos, Search history, Synthesize]",
|
|
377
|
+
"Investigate error → [Search cass for similar errors, Search repo for error handling, Synthesize]",
|
|
378
|
+
"Learn about library → [Search docs, Search examples, Search issues, Synthesize findings]",
|
|
379
|
+
],
|
|
380
|
+
},
|
|
339
381
|
};
|
|
340
382
|
|
|
341
383
|
/**
|
|
@@ -360,6 +402,7 @@ export function selectStrategy(task: string): {
|
|
|
360
402
|
"file-based": 0,
|
|
361
403
|
"feature-based": 0,
|
|
362
404
|
"risk-based": 0,
|
|
405
|
+
"research-based": 0,
|
|
363
406
|
};
|
|
364
407
|
|
|
365
408
|
for (const [strategyName, definition] of Object.entries(STRATEGIES)) {
|
|
@@ -1900,7 +1943,7 @@ export const swarm_record_outcome = tool({
|
|
|
1900
1943
|
"Criteria to generate feedback for (default: all default criteria)",
|
|
1901
1944
|
),
|
|
1902
1945
|
strategy: tool.schema
|
|
1903
|
-
.enum(["file-based", "feature-based", "risk-based"])
|
|
1946
|
+
.enum(["file-based", "feature-based", "risk-based", "research-based"])
|
|
1904
1947
|
.optional()
|
|
1905
1948
|
.describe("Decomposition strategy used for this task"),
|
|
1906
1949
|
},
|