opencode-swarm-plugin 0.30.5 → 0.30.7
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/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-test.log +317 -317
- package/CHANGELOG.md +13 -0
- package/dist/hive.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +134 -29
- package/dist/memory-tools.d.ts +4 -0
- package/dist/memory-tools.d.ts.map +1 -1
- package/dist/memory.d.ts +2 -0
- package/dist/memory.d.ts.map +1 -1
- package/dist/model-selection.d.ts +37 -0
- package/dist/model-selection.d.ts.map +1 -0
- package/dist/plugin.js +134 -29
- package/dist/schemas/task.d.ts +2 -0
- package/dist/schemas/task.d.ts.map +1 -1
- package/dist/swarm-prompts.d.ts +5 -1
- package/dist/swarm-prompts.d.ts.map +1 -1
- package/dist/swarm.d.ts +2 -0
- package/dist/swarm.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/hive.ts +16 -2
- package/src/memory-tools.ts +5 -1
- package/src/memory.ts +9 -0
- package/src/swarm-prompts.test.ts +176 -0
- package/src/swarm-prompts.ts +64 -20
- package/src/swarm.integration.test.ts +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# opencode-swarm-plugin
|
|
2
2
|
|
|
3
|
+
## 0.30.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`230e9aa`](https://github.com/joelhooks/swarm-tools/commit/230e9aa91708610183119680cb5f6924c1089552), [`181fdd5`](https://github.com/joelhooks/swarm-tools/commit/181fdd507b957ceb95e069ae71d527d3f7e1b940)]:
|
|
8
|
+
- swarm-mail@1.0.0
|
|
9
|
+
|
|
10
|
+
## 0.30.6
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`32a2885`](https://github.com/joelhooks/swarm-tools/commit/32a2885115cc3e574e86d8e492f60ee189627488) Thanks [@joelhooks](https://github.com/joelhooks)! - chore: verify CI publish flow works
|
|
15
|
+
|
|
3
16
|
## 0.30.5
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/hive.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hive.d.ts","sourceRoot":"","sources":["../src/hive.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"hive.d.ts","sourceRoot":"","sources":["../src/hive.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAKL,KAAK,WAAW,EAGjB,MAAM,YAAY,CAAC;AAepB;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAE/D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAGD,eAAO,MAAM,wBAAwB,gCAA0B,CAAC;AAChE,eAAO,MAAM,wBAAwB,gCAA0B,CAAC;AAuChE;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;aAGhB,OAAO,EAAE,MAAM;aACf,QAAQ,CAAC,EAAE,MAAM;aACjB,MAAM,CAAC,EAAE,MAAM;gBAH/B,OAAO,EAAE,MAAM,EACC,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,YAAA,EACjB,MAAM,CAAC,EAAE,MAAM,YAAA;CAKlC;AAGD,eAAO,MAAM,SAAS,kBAAY,CAAC;AAEnC;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;aAG1B,QAAQ,EAAE,CAAC,CAAC,QAAQ;gBADpC,OAAO,EAAE,MAAM,EACC,QAAQ,EAAE,CAAC,CAAC,QAAQ;CAKvC;AAGD,eAAO,MAAM,mBAAmB,4BAAsB,CAAC;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CAMrB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;CAM5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUtB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -146,12 +146,14 @@ export declare const allTools: {
|
|
|
146
146
|
collection: import("zod").ZodOptional<import("zod").ZodString>;
|
|
147
147
|
tags: import("zod").ZodOptional<import("zod").ZodString>;
|
|
148
148
|
metadata: import("zod").ZodOptional<import("zod").ZodString>;
|
|
149
|
+
confidence: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
149
150
|
};
|
|
150
151
|
execute(args: {
|
|
151
152
|
information: string;
|
|
152
153
|
collection?: string | undefined;
|
|
153
154
|
tags?: string | undefined;
|
|
154
155
|
metadata?: string | undefined;
|
|
156
|
+
confidence?: number | undefined;
|
|
155
157
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
156
158
|
};
|
|
157
159
|
readonly "semantic-memory_find": {
|
|
@@ -924,6 +926,7 @@ export declare const allTools: {
|
|
|
924
926
|
skills_to_load: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
925
927
|
coordinator_notes: import("zod").ZodOptional<import("zod").ZodString>;
|
|
926
928
|
}, import("zod/v4/core").$strip>>;
|
|
929
|
+
model: import("zod").ZodOptional<import("zod").ZodString>;
|
|
927
930
|
};
|
|
928
931
|
execute(args: {
|
|
929
932
|
bead_id: string;
|
|
@@ -938,6 +941,7 @@ export declare const allTools: {
|
|
|
938
941
|
skills_to_load?: string[] | undefined;
|
|
939
942
|
coordinator_notes?: string | undefined;
|
|
940
943
|
} | undefined;
|
|
944
|
+
model?: string | undefined;
|
|
941
945
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
942
946
|
};
|
|
943
947
|
readonly swarm_evaluation_prompt: {
|
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;AAqCtE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,WAAW,EAAE,MAuLzB,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;;;;;GAKG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;;GAMG;AACH,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,eAAe,GAChB,MAAM,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EAEjB,UAAU,EACV,cAAc,EACd,w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
});
|
|
27053
27053
|
|
|
27054
|
+
// src/model-selection.ts
|
|
27055
|
+
var exports_model_selection = {};
|
|
27056
|
+
__export(exports_model_selection, {
|
|
27057
|
+
selectWorkerModel: () => selectWorkerModel
|
|
27058
|
+
});
|
|
27059
|
+
function selectWorkerModel(subtask, config2) {
|
|
27060
|
+
if (subtask.model) {
|
|
27061
|
+
return subtask.model;
|
|
27062
|
+
}
|
|
27063
|
+
const files = subtask.files || [];
|
|
27064
|
+
if (files.length > 0) {
|
|
27065
|
+
const allDocs = files.every((f) => {
|
|
27066
|
+
const lower = f.toLowerCase();
|
|
27067
|
+
return lower.endsWith(".md") || lower.endsWith(".mdx");
|
|
27068
|
+
});
|
|
27069
|
+
const allTests = files.every((f) => {
|
|
27070
|
+
const lower = f.toLowerCase();
|
|
27071
|
+
return lower.includes(".test.") || lower.includes(".spec.");
|
|
27072
|
+
});
|
|
27073
|
+
if (allDocs || allTests) {
|
|
27074
|
+
return config2.liteModel || config2.primaryModel || "anthropic/claude-haiku-4-5";
|
|
27075
|
+
}
|
|
27076
|
+
}
|
|
27077
|
+
return config2.primaryModel || "anthropic/claude-haiku-4-5";
|
|
27078
|
+
}
|
|
27079
|
+
|
|
27054
27080
|
// src/hive.ts
|
|
27055
27081
|
init_dist();
|
|
27056
27082
|
import {
|
|
27057
27083
|
createHiveAdapter,
|
|
27058
27084
|
FlushManager,
|
|
27059
27085
|
importFromJSONL,
|
|
27086
|
+
syncMemories,
|
|
27060
27087
|
getSwarmMail
|
|
27061
27088
|
} from "swarm-mail";
|
|
27062
27089
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -27253,7 +27280,8 @@ var DecomposedSubtaskSchema = exports_external.object({
|
|
|
27253
27280
|
description: exports_external.string(),
|
|
27254
27281
|
files: exports_external.array(exports_external.string()),
|
|
27255
27282
|
estimated_effort: EffortLevelSchema,
|
|
27256
|
-
risks: exports_external.array(exports_external.string()).optional().default([])
|
|
27283
|
+
risks: exports_external.array(exports_external.string()).optional().default([]),
|
|
27284
|
+
model: exports_external.string().optional()
|
|
27257
27285
|
});
|
|
27258
27286
|
var SubtaskDependencySchema = exports_external.object({
|
|
27259
27287
|
from: exports_external.number().int().min(0),
|
|
@@ -28247,8 +28275,18 @@ var hive_sync = tool({
|
|
|
28247
28275
|
outputPath: `${projectKey}/.hive/issues.jsonl`
|
|
28248
28276
|
});
|
|
28249
28277
|
const flushResult = await withTimeout(flushManager.flush(), TIMEOUT_MS, "flush hive");
|
|
28250
|
-
|
|
28251
|
-
|
|
28278
|
+
const swarmMail = await getSwarmMail(projectKey);
|
|
28279
|
+
const db = await swarmMail.getDatabase();
|
|
28280
|
+
const hivePath = join(projectKey, ".hive");
|
|
28281
|
+
let memoriesSynced = 0;
|
|
28282
|
+
try {
|
|
28283
|
+
const memoryResult = await syncMemories(db, hivePath);
|
|
28284
|
+
memoriesSynced = memoryResult.exported;
|
|
28285
|
+
} catch (err) {
|
|
28286
|
+
console.warn("[hive_sync] Memory sync warning:", err);
|
|
28287
|
+
}
|
|
28288
|
+
if (flushResult.cellsExported === 0 && memoriesSynced === 0) {
|
|
28289
|
+
return "No cells or memories to sync";
|
|
28252
28290
|
}
|
|
28253
28291
|
const hiveStatusResult = await runGitCommand([
|
|
28254
28292
|
"status",
|
|
@@ -35231,18 +35269,36 @@ swarmmail_init(project_path="{project_path}", task_description="{bead_id}: {subt
|
|
|
35231
35269
|
|
|
35232
35270
|
**If you skip this step, your work will not be tracked and swarm_complete will fail.**
|
|
35233
35271
|
|
|
35234
|
-
### Step 2: Query Past Learnings (BEFORE starting work)
|
|
35272
|
+
### Step 2: \uD83E\uDDE0 Query Past Learnings (MANDATORY - BEFORE starting work)
|
|
35273
|
+
|
|
35274
|
+
**⚠️ CRITICAL: ALWAYS query semantic memory BEFORE writing ANY code.**
|
|
35275
|
+
|
|
35235
35276
|
\`\`\`
|
|
35236
|
-
semantic-memory_find(query="<keywords from your task>", limit=5)
|
|
35277
|
+
semantic-memory_find(query="<keywords from your task>", limit=5, expand=true)
|
|
35237
35278
|
\`\`\`
|
|
35238
35279
|
|
|
35239
|
-
**
|
|
35240
|
-
-
|
|
35241
|
-
-
|
|
35242
|
-
-
|
|
35243
|
-
-
|
|
35280
|
+
**Why this is MANDATORY:**
|
|
35281
|
+
- Past agents may have already solved your exact problem
|
|
35282
|
+
- Avoids repeating mistakes that wasted 30+ minutes before
|
|
35283
|
+
- Discovers project-specific patterns and gotchas
|
|
35284
|
+
- Finds known workarounds for tool/library quirks
|
|
35285
|
+
|
|
35286
|
+
**Search Query Examples by Task Type:**
|
|
35244
35287
|
|
|
35245
|
-
**
|
|
35288
|
+
- **Bug fix**: Use exact error message or "<symptom> <component>"
|
|
35289
|
+
- **New feature**: Search "<domain concept> implementation pattern"
|
|
35290
|
+
- **Refactor**: Query "<pattern name> migration approach"
|
|
35291
|
+
- **Integration**: Look for "<library name> gotchas configuration"
|
|
35292
|
+
- **Testing**: Find "testing <component type> characterization tests"
|
|
35293
|
+
- **Performance**: Search "<technology> performance optimization"
|
|
35294
|
+
|
|
35295
|
+
**BEFORE you start coding:**
|
|
35296
|
+
1. Run semantic-memory_find with keywords from your task
|
|
35297
|
+
2. Read the results with expand=true for full content
|
|
35298
|
+
3. Check if any memory solves your problem or warns of pitfalls
|
|
35299
|
+
4. Adjust your approach based on past learnings
|
|
35300
|
+
|
|
35301
|
+
**If you skip this step, you WILL waste time solving already-solved problems.**
|
|
35246
35302
|
|
|
35247
35303
|
### Step 3: Load Relevant Skills (if available)
|
|
35248
35304
|
\`\`\`
|
|
@@ -35328,21 +35384,44 @@ swarm_checkpoint(
|
|
|
35328
35384
|
|
|
35329
35385
|
**Checkpoints preserve context so you can recover if things go wrong.**
|
|
35330
35386
|
|
|
35331
|
-
### Step 8:
|
|
35387
|
+
### Step 8: \uD83D\uDCBE STORE YOUR LEARNINGS (if you discovered something)
|
|
35388
|
+
|
|
35389
|
+
**If you learned it the hard way, STORE IT so the next agent doesn't have to.**
|
|
35390
|
+
|
|
35332
35391
|
\`\`\`
|
|
35333
35392
|
semantic-memory_store(
|
|
35334
35393
|
information="<what you learned, WHY it matters, how to apply it>",
|
|
35335
|
-
|
|
35394
|
+
tags="<domain, tech-stack, pattern-type>"
|
|
35336
35395
|
)
|
|
35337
35396
|
\`\`\`
|
|
35338
35397
|
|
|
35339
|
-
**Store:**
|
|
35340
|
-
-
|
|
35341
|
-
-
|
|
35342
|
-
-
|
|
35343
|
-
-
|
|
35398
|
+
**MANDATORY Storage Triggers - Store when you:**
|
|
35399
|
+
- \uD83D\uDC1B **Solved a tricky bug** (>15min debugging) - include root cause + solution
|
|
35400
|
+
- \uD83D\uDCA1 **Discovered a project-specific pattern** - domain rules, business logic quirks
|
|
35401
|
+
- ⚠️ **Found a tool/library gotcha** - API quirks, version-specific bugs, workarounds
|
|
35402
|
+
- \uD83D\uDEAB **Tried an approach that failed** - anti-patterns to avoid, why it didn't work
|
|
35403
|
+
- \uD83C\uDFD7️ **Made an architectural decision** - reasoning, alternatives considered, tradeoffs
|
|
35344
35404
|
|
|
35345
|
-
**
|
|
35405
|
+
**What Makes a GOOD Memory:**
|
|
35406
|
+
|
|
35407
|
+
✅ **GOOD** (actionable, explains WHY):
|
|
35408
|
+
\`\`\`
|
|
35409
|
+
"OAuth refresh tokens need 5min buffer before expiry to avoid race conditions.
|
|
35410
|
+
Without buffer, token refresh can fail mid-request if expiry happens between
|
|
35411
|
+
check and use. Implemented with: if (expiresAt - Date.now() < 300000) refresh()"
|
|
35412
|
+
\`\`\`
|
|
35413
|
+
|
|
35414
|
+
❌ **BAD** (generic, no context):
|
|
35415
|
+
\`\`\`
|
|
35416
|
+
"Fixed the auth bug by adding a null check"
|
|
35417
|
+
\`\`\`
|
|
35418
|
+
|
|
35419
|
+
**What NOT to Store:**
|
|
35420
|
+
- Generic knowledge that's in official documentation
|
|
35421
|
+
- Implementation details that change frequently
|
|
35422
|
+
- Vague descriptions without context ("fixed the thing")
|
|
35423
|
+
|
|
35424
|
+
**The WHY matters more than the WHAT.** Future agents need context to apply your learning.
|
|
35346
35425
|
|
|
35347
35426
|
### Step 9: Complete (REQUIRED - releases reservations)
|
|
35348
35427
|
\`\`\`
|
|
@@ -35433,17 +35512,20 @@ Other cell operations:
|
|
|
35433
35512
|
|
|
35434
35513
|
**NON-NEGOTIABLE:**
|
|
35435
35514
|
1. Step 1 (swarmmail_init) MUST be first - do it before anything else
|
|
35436
|
-
2. Step 2 (semantic-memory_find) MUST happen
|
|
35515
|
+
2. \uD83E\uDDE0 Step 2 (semantic-memory_find) MUST happen BEFORE starting work - query first, code second
|
|
35437
35516
|
3. Step 4 (swarmmail_reserve) - YOU reserve files, not coordinator
|
|
35438
35517
|
4. Step 6 (swarm_progress) - Report at milestones, don't work silently
|
|
35439
|
-
5. Step
|
|
35518
|
+
5. \uD83D\uDCBE Step 8 (semantic-memory_store) - If you learned something hard, STORE IT
|
|
35519
|
+
6. Step 9 (swarm_complete) - Use this to close, NOT hive_close
|
|
35440
35520
|
|
|
35441
35521
|
**If you skip these steps:**
|
|
35442
35522
|
- Your work won't be tracked (swarm_complete will fail)
|
|
35443
|
-
- You'll waste time repeating solved problems (no semantic memory query)
|
|
35523
|
+
- \uD83D\uDD04 You'll waste time repeating already-solved problems (no semantic memory query)
|
|
35444
35524
|
- Edit conflicts with other agents (no file reservation)
|
|
35445
35525
|
- Lost work if you crash (no checkpoints)
|
|
35446
|
-
- Future agents repeat
|
|
35526
|
+
- \uD83D\uDD04 Future agents repeat YOUR mistakes (no learnings stored)
|
|
35527
|
+
|
|
35528
|
+
**Memory is the swarm's collective intelligence. Query it. Feed it.**
|
|
35447
35529
|
|
|
35448
35530
|
Begin now.`;
|
|
35449
35531
|
var EVALUATION_PROMPT = `Evaluate the work completed for this subtask.
|
|
@@ -35576,7 +35658,7 @@ var swarm_subtask_prompt = tool({
|
|
|
35576
35658
|
}
|
|
35577
35659
|
});
|
|
35578
35660
|
var swarm_spawn_subtask = tool({
|
|
35579
|
-
description: "Prepare a subtask for spawning. Returns prompt with Agent Mail/hive tracking instructions. IMPORTANT: Pass project_path for swarmmail_init.",
|
|
35661
|
+
description: "Prepare a subtask for spawning. Returns prompt with Agent Mail/hive tracking instructions. IMPORTANT: Pass project_path for swarmmail_init. Automatically selects appropriate model based on file types.",
|
|
35580
35662
|
args: {
|
|
35581
35663
|
bead_id: tool.schema.string().describe("Subtask bead ID"),
|
|
35582
35664
|
epic_id: tool.schema.string().describe("Parent epic bead ID"),
|
|
@@ -35589,7 +35671,8 @@ var swarm_spawn_subtask = tool({
|
|
|
35589
35671
|
shared_context: tool.schema.string().optional(),
|
|
35590
35672
|
skills_to_load: tool.schema.array(tool.schema.string()).optional(),
|
|
35591
35673
|
coordinator_notes: tool.schema.string().optional()
|
|
35592
|
-
}).optional().describe("Recovery context from checkpoint compaction")
|
|
35674
|
+
}).optional().describe("Recovery context from checkpoint compaction"),
|
|
35675
|
+
model: tool.schema.string().optional().describe("Optional explicit model override (auto-selected if not provided)")
|
|
35593
35676
|
},
|
|
35594
35677
|
async execute(args) {
|
|
35595
35678
|
const prompt = formatSubtaskPromptV2({
|
|
@@ -35602,13 +35685,28 @@ var swarm_spawn_subtask = tool({
|
|
|
35602
35685
|
project_path: args.project_path,
|
|
35603
35686
|
recovery_context: args.recovery_context
|
|
35604
35687
|
});
|
|
35688
|
+
const { selectWorkerModel: selectWorkerModel2 } = await Promise.resolve().then(() => exports_model_selection);
|
|
35689
|
+
const subtask = {
|
|
35690
|
+
title: args.subtask_title,
|
|
35691
|
+
description: args.subtask_description || "",
|
|
35692
|
+
files: args.files,
|
|
35693
|
+
estimated_effort: "medium",
|
|
35694
|
+
risks: [],
|
|
35695
|
+
model: args.model
|
|
35696
|
+
};
|
|
35697
|
+
const config2 = {
|
|
35698
|
+
primaryModel: "anthropic/claude-sonnet-4-5",
|
|
35699
|
+
liteModel: "anthropic/claude-haiku-4-5"
|
|
35700
|
+
};
|
|
35701
|
+
const selectedModel = selectWorkerModel2(subtask, config2);
|
|
35605
35702
|
return JSON.stringify({
|
|
35606
35703
|
prompt,
|
|
35607
35704
|
bead_id: args.bead_id,
|
|
35608
35705
|
epic_id: args.epic_id,
|
|
35609
35706
|
files: args.files,
|
|
35610
35707
|
project_path: args.project_path,
|
|
35611
|
-
recovery_context: args.recovery_context
|
|
35708
|
+
recovery_context: args.recovery_context,
|
|
35709
|
+
recommended_model: selectedModel
|
|
35612
35710
|
}, null, 2);
|
|
35613
35711
|
}
|
|
35614
35712
|
});
|
|
@@ -50310,12 +50408,18 @@ async function createMemoryAdapter(db) {
|
|
|
50310
50408
|
if (tags.length > 0) {
|
|
50311
50409
|
metadata.tags = tags;
|
|
50312
50410
|
}
|
|
50411
|
+
const clampConfidence = (c) => {
|
|
50412
|
+
if (c === undefined)
|
|
50413
|
+
return 0.7;
|
|
50414
|
+
return Math.max(0, Math.min(1, c));
|
|
50415
|
+
};
|
|
50313
50416
|
const memory = {
|
|
50314
50417
|
id,
|
|
50315
50418
|
content: args2.information,
|
|
50316
50419
|
metadata,
|
|
50317
50420
|
collection,
|
|
50318
|
-
createdAt: new Date
|
|
50421
|
+
createdAt: new Date,
|
|
50422
|
+
confidence: clampConfidence(args2.confidence)
|
|
50319
50423
|
};
|
|
50320
50424
|
const program = exports_Effect.gen(function* () {
|
|
50321
50425
|
const ollama = yield* Ollama;
|
|
@@ -50426,12 +50530,13 @@ function resetMemoryCache() {
|
|
|
50426
50530
|
cachedProjectPath = null;
|
|
50427
50531
|
}
|
|
50428
50532
|
var semantic_memory_store = tool({
|
|
50429
|
-
description: "Store a memory with semantic embedding. Memories are searchable by semantic similarity and can be organized into collections.",
|
|
50533
|
+
description: "Store a memory with semantic embedding. Memories are searchable by semantic similarity and can be organized into collections. Confidence affects decay rate: high confidence (1.0) = 135 day half-life, low confidence (0.0) = 45 day half-life.",
|
|
50430
50534
|
args: {
|
|
50431
50535
|
information: tool.schema.string().describe("The information to store (required)"),
|
|
50432
50536
|
collection: tool.schema.string().optional().describe("Collection name (defaults to 'default')"),
|
|
50433
50537
|
tags: tool.schema.string().optional().describe("Comma-separated tags (e.g., 'auth,tokens,oauth')"),
|
|
50434
|
-
metadata: tool.schema.string().optional().describe("JSON string with additional metadata")
|
|
50538
|
+
metadata: tool.schema.string().optional().describe("JSON string with additional metadata"),
|
|
50539
|
+
confidence: tool.schema.number().optional().describe("Confidence level (0.0-1.0) affecting decay rate. Higher = slower decay. Default 0.7")
|
|
50435
50540
|
},
|
|
50436
50541
|
async execute(args2, ctx) {
|
|
50437
50542
|
const adapter = await getMemoryAdapter();
|
package/dist/memory-tools.d.ts
CHANGED
|
@@ -29,12 +29,14 @@ export declare const semantic_memory_store: {
|
|
|
29
29
|
collection: import("zod").ZodOptional<import("zod").ZodString>;
|
|
30
30
|
tags: import("zod").ZodOptional<import("zod").ZodString>;
|
|
31
31
|
metadata: import("zod").ZodOptional<import("zod").ZodString>;
|
|
32
|
+
confidence: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
32
33
|
};
|
|
33
34
|
execute(args: {
|
|
34
35
|
information: string;
|
|
35
36
|
collection?: string | undefined;
|
|
36
37
|
tags?: string | undefined;
|
|
37
38
|
metadata?: string | undefined;
|
|
39
|
+
confidence?: number | undefined;
|
|
38
40
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
39
41
|
};
|
|
40
42
|
/**
|
|
@@ -134,12 +136,14 @@ export declare const memoryTools: {
|
|
|
134
136
|
collection: import("zod").ZodOptional<import("zod").ZodString>;
|
|
135
137
|
tags: import("zod").ZodOptional<import("zod").ZodString>;
|
|
136
138
|
metadata: import("zod").ZodOptional<import("zod").ZodString>;
|
|
139
|
+
confidence: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
137
140
|
};
|
|
138
141
|
execute(args: {
|
|
139
142
|
information: string;
|
|
140
143
|
collection?: string | undefined;
|
|
141
144
|
tags?: string | undefined;
|
|
142
145
|
metadata?: string | undefined;
|
|
146
|
+
confidence?: number | undefined;
|
|
143
147
|
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
144
148
|
};
|
|
145
149
|
readonly "semantic-memory_find": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-tools.d.ts","sourceRoot":"","sources":["../src/memory-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EACN,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,MAAM,UAAU,CAAC;AAGlB,YAAY,EACX,aAAa,EACb,SAAS,EACT,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EACZ,eAAe,GACf,CAAC;AA2CF;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAGvC;AAGD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAM/B;;GAEG;AACH,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"memory-tools.d.ts","sourceRoot":"","sources":["../src/memory-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EACN,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,MAAM,UAAU,CAAC;AAGlB,YAAY,EACX,aAAa,EACb,SAAS,EACT,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EACZ,eAAe,GACf,CAAC;AA2CF;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAGvC;AAGD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAM/B;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;CA6BhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;CA2B/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;CAU9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;CAUjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;CAWnC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;CAa/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;CAQhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;CAShC,CAAC;AAMH;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASd,CAAC"}
|
package/dist/memory.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export interface StoreArgs {
|
|
|
38
38
|
readonly collection?: string;
|
|
39
39
|
readonly tags?: string;
|
|
40
40
|
readonly metadata?: string;
|
|
41
|
+
/** Confidence level (0.0-1.0) affecting decay rate. Higher = slower decay. Default 0.7 */
|
|
42
|
+
readonly confidence?: number;
|
|
41
43
|
}
|
|
42
44
|
/** Arguments for find operation */
|
|
43
45
|
export interface FindArgs {
|
package/dist/memory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EACN,KAAK,eAAe,EAKpB,KAAK,MAAM,EAIX,MAAM,YAAY,CAAC;AAYpB;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CA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,CAAC,CAAC;IACvD,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvD,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5D,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAC9D,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC;IAC3C,QAAQ,CAAC,WAAW,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,mBAAmB,CACxC,EAAE,EAAE,eAAe,GACjB,OAAO,CAAC,aAAa,CAAC,CA4NxB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model Selection Module
|
|
3
|
+
*
|
|
4
|
+
* Determines which model a worker agent should use based on subtask
|
|
5
|
+
* characteristics like file types and complexity.
|
|
6
|
+
*
|
|
7
|
+
* Priority:
|
|
8
|
+
* 1. Explicit model field in subtask
|
|
9
|
+
* 2. File-type inference (docs/tests → lite model)
|
|
10
|
+
* 3. Default to primary model
|
|
11
|
+
*/
|
|
12
|
+
import type { DecomposedSubtask } from "./schemas/task";
|
|
13
|
+
/**
|
|
14
|
+
* Configuration interface for swarm models
|
|
15
|
+
*/
|
|
16
|
+
export interface SwarmConfig {
|
|
17
|
+
primaryModel: string;
|
|
18
|
+
liteModel?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Select the appropriate model for a worker agent based on subtask characteristics
|
|
22
|
+
*
|
|
23
|
+
* Priority order:
|
|
24
|
+
* 1. Explicit `model` field in subtask (if present)
|
|
25
|
+
* 2. File-type inference:
|
|
26
|
+
* - All .md/.mdx files → liteModel
|
|
27
|
+
* - All .test./.spec. files → liteModel
|
|
28
|
+
* 3. Mixed files or implementation → primaryModel
|
|
29
|
+
*
|
|
30
|
+
* @param subtask - The subtask to evaluate
|
|
31
|
+
* @param config - Swarm configuration with model preferences
|
|
32
|
+
* @returns Model identifier string
|
|
33
|
+
*/
|
|
34
|
+
export declare function selectWorkerModel(subtask: DecomposedSubtask & {
|
|
35
|
+
model?: string;
|
|
36
|
+
}, config: SwarmConfig): string;
|
|
37
|
+
//# sourceMappingURL=model-selection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-selection.d.ts","sourceRoot":"","sources":["../src/model-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,iBAAiB,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAC/C,MAAM,EAAE,WAAW,GAClB,MAAM,CA4BR"}
|