opencode-swarm-plugin 0.25.1 → 0.25.3
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/CHANGELOG.md +28 -0
- package/dist/beads.d.ts +6 -0
- package/dist/beads.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +213 -289
- package/dist/plugin.js +212 -294
- package/dist/rate-limiter.d.ts.map +1 -1
- package/dist/storage.d.ts.map +1 -1
- package/dist/swarm-orchestrate.d.ts.map +1 -1
- package/dist/swarm-prompts.d.ts +1 -1
- package/dist/swarm-prompts.d.ts.map +1 -1
- package/docs/swarm-mail-architecture.md +1 -1
- package/package.json +2 -2
- package/src/beads.integration.test.ts +55 -61
- package/src/beads.ts +239 -410
- package/src/index.ts +1 -15
- package/src/rate-limiter.ts +0 -5
- package/src/storage.ts +0 -9
- package/src/swarm-mail.integration.test.ts +5 -1
- package/src/swarm-orchestrate.ts +24 -14
- package/src/swarm-prompts.ts +21 -2
- package/src/swarm.integration.test.ts +94 -246
- package/src/agent-mail.integration.test.ts +0 -1429
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rate-limiter.d.ts","sourceRoot":"","sources":["../src/rate-limiter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,MAAM,SAAS,CAAC;AA0C5B;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,qCAAqC;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;OAOG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAE1E;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EH;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;CAsGxB,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgMtB,CAAC;AAMH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAc5B,CAAC"}
|
package/dist/swarm-prompts.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare const SUBTASK_PROMPT = "You are a swarm agent working on a subtas
|
|
|
37
37
|
*
|
|
38
38
|
* Supports {error_context} placeholder for retry prompts.
|
|
39
39
|
*/
|
|
40
|
-
export declare const SUBTASK_PROMPT_V2 = "You are a swarm agent working on: **{subtask_title}**\n\n## [IDENTITY]\nAgent: (assigned at spawn)\nBead: {bead_id}\nEpic: {epic_id}\n\n## [TASK]\n{subtask_description}\n\n## [FILES]\nReserved (exclusive):\n{file_list}\n\nOnly modify these files. Need others? Message the coordinator.\n\n## [CONTEXT]\n{shared_context}\n\n{compressed_context}\n\n{error_context}\n\n## [MANDATORY SURVIVAL CHECKLIST]\n\n**CRITICAL: Follow this checklist IN ORDER. Each step builds on the previous.**\n\n### Step 1: Initialize Coordination (REQUIRED - DO THIS FIRST)\n```\nswarmmail_init(project_path=\"{project_path}\", task_description=\"{bead_id}: {subtask_title}\")\n```\n\n**This registers you with the coordination system and enables:**\n- File reservation tracking\n- Inter-agent communication\n- Progress monitoring\n- Conflict detection\n\n**If you skip this step, your work will not be tracked and swarm_complete will fail.**\n\n### Step 2: Query Past Learnings (BEFORE starting work)\n```\nsemantic-memory_find(query=\"<keywords from your task>\", limit=5)\n```\n\n**Check if past agents solved similar problems.** Search for:\n- Error messages if debugging\n- Domain concepts (e.g., \"authentication\", \"caching\")\n- Technology stack (e.g., \"Next.js\", \"React\")\n- Patterns (e.g., \"event sourcing\", \"validation\")\n\n**Past learnings save time and prevent repeating mistakes.**\n\n### Step 3: Load Relevant Skills (if available)\n```\nskills_list() # See what skills exist\nskills_use(name=\"<relevant-skill>\", context=\"<your task>\") # Load skill\n```\n\n**Common skill triggers:**\n- Writing tests? \u2192 `skills_use(name=\"testing-patterns\")`\n- Breaking dependencies? \u2192 `skills_use(name=\"testing-patterns\")`\n- Multi-agent coordination? \u2192 `skills_use(name=\"swarm-coordination\")`\n- Building a CLI? \u2192 `skills_use(name=\"cli-builder\")`\n\n### Step 4: Reserve Your Files (YOU reserve, not coordinator)\n```\nswarmmail_reserve(\n paths=[{file_list}],\n reason=\"{bead_id}: {subtask_title}\",\n exclusive=true\n)\n```\n\n**Workers reserve their own files.** This prevents edit conflicts with other agents.\n\n### Step 5: Do the Work\n- Read your assigned files\n- Implement changes\n- Verify (typecheck if applicable)\n\n### Step 6: Report Progress at Milestones\n```\nswarm_progress(\n project_key=\"{project_path}\",\n agent_name=\"<your-agent-name>\",\n bead_id=\"{bead_id}\",\n status=\"in_progress\",\n progress_percent=25, # or 50, 75\n message=\"<what you just completed>\"\n)\n```\n\n**Report at 25%, 50%, 75% completion.** This:\n- Triggers auto-checkpoint (saves context)\n- Keeps coordinator informed\n- Prevents silent failures\n\n### Step 7: Manual Checkpoint BEFORE Risky Operations\n```\nswarm_checkpoint(\n project_key=\"{project_path}\",\n agent_name=\"<your-agent-name>\",\n bead_id=\"{bead_id}\"\n)\n```\n\n**Call BEFORE:**\n- Large refactors\n- File deletions\n- Breaking API changes\n- Anything that might fail catastrophically\n\n**Checkpoints preserve context so you can recover if things go wrong.**\n\n### Step 8: Store Learnings (if you discovered something)\n```\nsemantic-memory_store(\n information=\"<what you learned, WHY it matters, how to apply it>\",\n metadata=\"<tags: domain, tech-stack, pattern-type>\"\n)\n```\n\n**Store:**\n- Tricky bugs you solved (root cause + solution)\n- Project-specific patterns or domain rules\n- Tool/library gotchas and workarounds\n- Failed approaches (anti-patterns to avoid)\n\n**Don't store generic knowledge.** Store the WHY, not just the WHAT.\n\n### Step 9: Complete (REQUIRED - releases reservations)\n```\nswarm_complete(\n project_key=\"{project_path}\",\n agent_name=\"<your-agent-name>\",\n bead_id=\"{bead_id}\",\n summary=\"<what you accomplished>\",\n files_touched=[\"list\", \"of\", \"files\"]\n)\n```\n\n**This automatically:**\n- Runs UBS bug scan\n- Releases file reservations\n- Records learning signals\n- Notifies coordinator\n\n**DO NOT manually close the bead with beads_close.** Use swarm_complete.\n\n## [SWARM MAIL COMMUNICATION]\n\n### Check Inbox Regularly\n```\nswarmmail_inbox() # Check for coordinator messages\nswarmmail_read_message(message_id=N) # Read specific message\n```\n\n### When Blocked\n```\nswarmmail_send(\n to=[\"coordinator\"],\n subject=\"BLOCKED: {bead_id}\",\n body=\"<blocker description, what you need>\",\n importance=\"high\",\n thread_id=\"{epic_id}\"\n)\nbeads_update(id=\"{bead_id}\", status=\"blocked\")\n```\n\n### Report Issues to Other Agents\n```\nswarmmail_send(\n to=[\"OtherAgent\", \"coordinator\"],\n subject=\"Issue in {bead_id}\",\n body=\"<describe problem, don't fix their code>\",\n thread_id=\"{epic_id}\"\n)\n```\n\n### Manual Release (if needed)\n```\nswarmmail_release() # Manually release reservations\n```\n\n**Note:** `swarm_complete` automatically releases reservations. Only use manual release if aborting work.\n\n## [OTHER TOOLS]\n### Beads\n- beads_update(id, status) - Mark blocked if stuck\n-
|
|
40
|
+
export declare const SUBTASK_PROMPT_V2 = "You are a swarm agent working on: **{subtask_title}**\n\n## [IDENTITY]\nAgent: (assigned at spawn)\nBead: {bead_id}\nEpic: {epic_id}\n\n## [TASK]\n{subtask_description}\n\n## [FILES]\nReserved (exclusive):\n{file_list}\n\nOnly modify these files. Need others? Message the coordinator.\n\n## [CONTEXT]\n{shared_context}\n\n{compressed_context}\n\n{error_context}\n\n## [MANDATORY SURVIVAL CHECKLIST]\n\n**CRITICAL: Follow this checklist IN ORDER. Each step builds on the previous.**\n\n### Step 1: Initialize Coordination (REQUIRED - DO THIS FIRST)\n```\nswarmmail_init(project_path=\"{project_path}\", task_description=\"{bead_id}: {subtask_title}\")\n```\n\n**This registers you with the coordination system and enables:**\n- File reservation tracking\n- Inter-agent communication\n- Progress monitoring\n- Conflict detection\n\n**If you skip this step, your work will not be tracked and swarm_complete will fail.**\n\n### Step 2: Query Past Learnings (BEFORE starting work)\n```\nsemantic-memory_find(query=\"<keywords from your task>\", limit=5)\n```\n\n**Check if past agents solved similar problems.** Search for:\n- Error messages if debugging\n- Domain concepts (e.g., \"authentication\", \"caching\")\n- Technology stack (e.g., \"Next.js\", \"React\")\n- Patterns (e.g., \"event sourcing\", \"validation\")\n\n**Past learnings save time and prevent repeating mistakes.**\n\n### Step 3: Load Relevant Skills (if available)\n```\nskills_list() # See what skills exist\nskills_use(name=\"<relevant-skill>\", context=\"<your task>\") # Load skill\n```\n\n**Common skill triggers:**\n- Writing tests? \u2192 `skills_use(name=\"testing-patterns\")`\n- Breaking dependencies? \u2192 `skills_use(name=\"testing-patterns\")`\n- Multi-agent coordination? \u2192 `skills_use(name=\"swarm-coordination\")`\n- Building a CLI? \u2192 `skills_use(name=\"cli-builder\")`\n\n### Step 4: Reserve Your Files (YOU reserve, not coordinator)\n```\nswarmmail_reserve(\n paths=[{file_list}],\n reason=\"{bead_id}: {subtask_title}\",\n exclusive=true\n)\n```\n\n**Workers reserve their own files.** This prevents edit conflicts with other agents.\n\n### Step 5: Do the Work\n- Read your assigned files\n- Implement changes\n- Verify (typecheck if applicable)\n\n### Step 6: Report Progress at Milestones\n```\nswarm_progress(\n project_key=\"{project_path}\",\n agent_name=\"<your-agent-name>\",\n bead_id=\"{bead_id}\",\n status=\"in_progress\",\n progress_percent=25, # or 50, 75\n message=\"<what you just completed>\"\n)\n```\n\n**Report at 25%, 50%, 75% completion.** This:\n- Triggers auto-checkpoint (saves context)\n- Keeps coordinator informed\n- Prevents silent failures\n\n### Step 7: Manual Checkpoint BEFORE Risky Operations\n```\nswarm_checkpoint(\n project_key=\"{project_path}\",\n agent_name=\"<your-agent-name>\",\n bead_id=\"{bead_id}\"\n)\n```\n\n**Call BEFORE:**\n- Large refactors\n- File deletions\n- Breaking API changes\n- Anything that might fail catastrophically\n\n**Checkpoints preserve context so you can recover if things go wrong.**\n\n### Step 8: Store Learnings (if you discovered something)\n```\nsemantic-memory_store(\n information=\"<what you learned, WHY it matters, how to apply it>\",\n metadata=\"<tags: domain, tech-stack, pattern-type>\"\n)\n```\n\n**Store:**\n- Tricky bugs you solved (root cause + solution)\n- Project-specific patterns or domain rules\n- Tool/library gotchas and workarounds\n- Failed approaches (anti-patterns to avoid)\n\n**Don't store generic knowledge.** Store the WHY, not just the WHAT.\n\n### Step 9: Complete (REQUIRED - releases reservations)\n```\nswarm_complete(\n project_key=\"{project_path}\",\n agent_name=\"<your-agent-name>\",\n bead_id=\"{bead_id}\",\n summary=\"<what you accomplished>\",\n files_touched=[\"list\", \"of\", \"files\"]\n)\n```\n\n**This automatically:**\n- Runs UBS bug scan\n- Releases file reservations\n- Records learning signals\n- Notifies coordinator\n\n**DO NOT manually close the bead with beads_close.** Use swarm_complete.\n\n## [SWARM MAIL COMMUNICATION]\n\n### Check Inbox Regularly\n```\nswarmmail_inbox() # Check for coordinator messages\nswarmmail_read_message(message_id=N) # Read specific message\n```\n\n### When Blocked\n```\nswarmmail_send(\n to=[\"coordinator\"],\n subject=\"BLOCKED: {bead_id}\",\n body=\"<blocker description, what you need>\",\n importance=\"high\",\n thread_id=\"{epic_id}\"\n)\nbeads_update(id=\"{bead_id}\", status=\"blocked\")\n```\n\n### Report Issues to Other Agents\n```\nswarmmail_send(\n to=[\"OtherAgent\", \"coordinator\"],\n subject=\"Issue in {bead_id}\",\n body=\"<describe problem, don't fix their code>\",\n thread_id=\"{epic_id}\"\n)\n```\n\n### Manual Release (if needed)\n```\nswarmmail_release() # Manually release reservations\n```\n\n**Note:** `swarm_complete` automatically releases reservations. Only use manual release if aborting work.\n\n## [OTHER TOOLS]\n### Beads - You Have Autonomy to File Issues\nYou can create new beads against this epic when you discover:\n- **Bugs**: Found a bug while working? File it.\n- **Tech debt**: Spotted something that needs cleanup? File it.\n- **Follow-up work**: Task needs more work than scoped? File a follow-up.\n- **Dependencies**: Need something from another agent? File and link it.\n\n```\nbeads_create(\n title=\"<descriptive title>\",\n type=\"bug\", # or \"task\", \"chore\"\n priority=2,\n parent_id=\"{epic_id}\", # Links to this epic\n description=\"Found while working on {bead_id}: <details>\"\n)\n```\n\n**Don't silently ignore issues.** File them so they get tracked and addressed.\n\nOther bead operations:\n- beads_update(id, status) - Mark blocked if stuck\n- beads_query(status=\"open\") - See what else needs work\n\n### Skills\n- skills_list() - Discover available skills\n- skills_use(name) - Activate skill for specialized guidance\n- skills_create(name) - Create new skill (if you found a reusable pattern)\n\n## [CRITICAL REQUIREMENTS]\n\n**NON-NEGOTIABLE:**\n1. Step 1 (swarmmail_init) MUST be first - do it before anything else\n2. Step 2 (semantic-memory_find) MUST happen before starting work\n3. Step 4 (swarmmail_reserve) - YOU reserve files, not coordinator\n4. Step 6 (swarm_progress) - Report at milestones, don't work silently\n5. Step 9 (swarm_complete) - Use this to close, NOT beads_close\n\n**If you skip these steps:**\n- Your work won't be tracked (swarm_complete will fail)\n- You'll waste time repeating solved problems (no semantic memory query)\n- Edit conflicts with other agents (no file reservation)\n- Lost work if you crash (no checkpoints)\n- Future agents repeat your mistakes (no learnings stored)\n\nBegin now.";
|
|
41
41
|
/**
|
|
42
42
|
* Prompt for self-evaluation before completing a subtask.
|
|
43
43
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swarm-prompts.d.ts","sourceRoot":"","sources":["../src/swarm-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,q6EAkET,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,6BAA6B,kxDAyDlB,CAAC;AAEzB;;;;;GAKG;AACH,eAAO,MAAM,cAAc,gkFAgFK,CAAC;AAEjC;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"swarm-prompts.d.ts","sourceRoot":"","sources":["../src/swarm-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,q6EAkET,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,6BAA6B,kxDAyDlB,CAAC;AAEzB;;;;;GAKG;AACH,eAAO,MAAM,cAAc,gkFAgFK,CAAC;AAEjC;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,4iNAwOnB,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,8jCAmCU,CAAC;AAMzC;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE;QACjB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B,CAAC;CACH,GAAG,MAAM,CAuDT;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,MAAM,CAUT;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,GAAG,MAAM,CAMT;AAMD;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;CAoC/B,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;CAoClC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;CA0I5B,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKvB,CAAC"}
|
|
@@ -516,7 +516,7 @@ Swarm Mail is **inspired by** [Agent Mail](https://github.com/sst/opencode) (SST
|
|
|
516
516
|
| Aspect | Agent Mail (SST) | Swarm Mail (This Plugin) |
|
|
517
517
|
| ------------------------ | ----------------------------- | -------------------------------------- |
|
|
518
518
|
| **Architecture** | MCP server (external process) | Embedded (PGLite in-process) |
|
|
519
|
-
| **Storage** |
|
|
519
|
+
| **Storage** | PGLite (embedded Postgres) | PGLite (WASM Postgres) |
|
|
520
520
|
| **Dependencies** | Requires MCP server running | Zero external deps, just npm install |
|
|
521
521
|
| **Effect-TS** | No | Yes (full Effect integration) |
|
|
522
522
|
| **Event Sourcing** | No (CRUD operations) | Yes (append-only event log) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm-plugin",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.3",
|
|
4
4
|
"description": "Multi-agent swarm coordination for OpenCode with learning capabilities, beads integration, and Agent Mail",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@opencode-ai/plugin": "^1.0.134",
|
|
34
34
|
"gray-matter": "^4.0.3",
|
|
35
35
|
"ioredis": "^5.4.1",
|
|
36
|
-
"swarm-mail": "0.1.
|
|
36
|
+
"swarm-mail": "0.1.4",
|
|
37
37
|
"zod": "4.1.8"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Beads Integration Tests
|
|
3
3
|
*
|
|
4
|
-
* These tests exercise the
|
|
4
|
+
* These tests exercise the BeadsAdapter-based tools directly.
|
|
5
5
|
* They validate the tool wrappers work correctly with actual beads operations.
|
|
6
6
|
*
|
|
7
|
-
* Run with: bun
|
|
7
|
+
* Run with: bun test src/beads.integration.test.ts
|
|
8
8
|
*/
|
|
9
9
|
import { describe, it, expect, beforeAll, beforeEach, afterAll } from "vitest";
|
|
10
10
|
import {
|
|
@@ -17,8 +17,11 @@ import {
|
|
|
17
17
|
beads_ready,
|
|
18
18
|
beads_link_thread,
|
|
19
19
|
BeadError,
|
|
20
|
+
getBeadsAdapter,
|
|
21
|
+
setBeadsWorkingDirectory,
|
|
20
22
|
} from "./beads";
|
|
21
23
|
import type { Bead, EpicCreateResult } from "./schemas";
|
|
24
|
+
import type { BeadsAdapter } from "swarm-mail";
|
|
22
25
|
|
|
23
26
|
/**
|
|
24
27
|
* Mock tool context for execute functions
|
|
@@ -43,6 +46,16 @@ function parseResponse<T>(response: string): T {
|
|
|
43
46
|
*/
|
|
44
47
|
const createdBeadIds: string[] = [];
|
|
45
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Test project key - use temp directory to isolate tests
|
|
51
|
+
*/
|
|
52
|
+
const TEST_PROJECT_KEY = `/tmp/beads-integration-test-${Date.now()}`;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Adapter instance for verification
|
|
56
|
+
*/
|
|
57
|
+
let adapter: BeadsAdapter;
|
|
58
|
+
|
|
46
59
|
/**
|
|
47
60
|
* Cleanup helper - close all created beads after tests
|
|
48
61
|
*/
|
|
@@ -58,14 +71,13 @@ async function cleanupBeads() {
|
|
|
58
71
|
}
|
|
59
72
|
|
|
60
73
|
describe("beads integration", () => {
|
|
61
|
-
//
|
|
74
|
+
// Initialize adapter before running tests
|
|
62
75
|
beforeAll(async () => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
76
|
+
// Set working directory for beads commands
|
|
77
|
+
setBeadsWorkingDirectory(TEST_PROJECT_KEY);
|
|
78
|
+
|
|
79
|
+
// Get adapter instance for verification
|
|
80
|
+
adapter = await getBeadsAdapter(TEST_PROJECT_KEY);
|
|
69
81
|
});
|
|
70
82
|
|
|
71
83
|
afterAll(async () => {
|
|
@@ -303,11 +315,10 @@ describe("beads integration", () => {
|
|
|
303
315
|
expect(result).toContain("Closed");
|
|
304
316
|
expect(result).toContain(created.id);
|
|
305
317
|
|
|
306
|
-
// Verify it's actually closed using
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
expect(closedBead.status).toBe("closed");
|
|
318
|
+
// Verify it's actually closed using adapter
|
|
319
|
+
const closedBead = await adapter.getBead(TEST_PROJECT_KEY, created.id);
|
|
320
|
+
expect(closedBead).toBeDefined();
|
|
321
|
+
expect(closedBead!.status).toBe("closed");
|
|
311
322
|
});
|
|
312
323
|
|
|
313
324
|
it("throws BeadError for invalid bead ID", async () => {
|
|
@@ -337,15 +348,10 @@ describe("beads integration", () => {
|
|
|
337
348
|
expect(result).toContain("Started");
|
|
338
349
|
expect(result).toContain(created.id);
|
|
339
350
|
|
|
340
|
-
// Verify status changed
|
|
341
|
-
const
|
|
342
|
-
{ status: "in_progress" },
|
|
343
|
-
mockContext,
|
|
344
|
-
);
|
|
345
|
-
const inProgressBeads = parseResponse<Bead[]>(queryResult);
|
|
346
|
-
const startedBead = inProgressBeads.find((b) => b.id === created.id);
|
|
351
|
+
// Verify status changed using adapter
|
|
352
|
+
const startedBead = await adapter.getBead(TEST_PROJECT_KEY, created.id);
|
|
347
353
|
expect(startedBead).toBeDefined();
|
|
348
|
-
expect(startedBead
|
|
354
|
+
expect(startedBead!.status).toBe("in_progress");
|
|
349
355
|
});
|
|
350
356
|
|
|
351
357
|
it("throws BeadError for invalid bead ID", async () => {
|
|
@@ -418,11 +424,12 @@ describe("beads integration", () => {
|
|
|
418
424
|
expect(epicResult.epic.issue_type).toBe("epic");
|
|
419
425
|
expect(epicResult.subtasks).toHaveLength(3);
|
|
420
426
|
|
|
421
|
-
// Subtasks should have
|
|
422
|
-
//
|
|
427
|
+
// Subtasks should have parent_id pointing to epic
|
|
428
|
+
// Verify via adapter since parent_id may not be in the output schema
|
|
423
429
|
for (const subtask of epicResult.subtasks) {
|
|
424
|
-
|
|
425
|
-
expect(
|
|
430
|
+
const subtaskBead = await adapter.getBead(TEST_PROJECT_KEY, subtask.id);
|
|
431
|
+
expect(subtaskBead).toBeDefined();
|
|
432
|
+
expect(subtaskBead!.parent_id).toBe(epicResult.epic.id);
|
|
426
433
|
}
|
|
427
434
|
});
|
|
428
435
|
|
|
@@ -517,11 +524,10 @@ describe("beads integration", () => {
|
|
|
517
524
|
expect(result).toContain(testBeadId);
|
|
518
525
|
expect(result).toContain(threadId);
|
|
519
526
|
|
|
520
|
-
// Verify the thread marker is in the description using
|
|
521
|
-
const
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
expect(linkedBead.description).toContain(`[thread:${threadId}]`);
|
|
527
|
+
// Verify the thread marker is in the description using adapter
|
|
528
|
+
const linkedBead = await adapter.getBead(TEST_PROJECT_KEY, testBeadId);
|
|
529
|
+
expect(linkedBead).toBeDefined();
|
|
530
|
+
expect(linkedBead!.description).toContain(`[thread:${threadId}]`);
|
|
525
531
|
});
|
|
526
532
|
|
|
527
533
|
it("returns message if thread already linked", async () => {
|
|
@@ -555,13 +561,11 @@ describe("beads integration", () => {
|
|
|
555
561
|
mockContext,
|
|
556
562
|
);
|
|
557
563
|
|
|
558
|
-
// Verify both original description and thread marker exist using
|
|
559
|
-
const
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
expect(linkedBead.description).toContain("Important context here");
|
|
564
|
-
expect(linkedBead.description).toContain(`[thread:${threadId}]`);
|
|
564
|
+
// Verify both original description and thread marker exist using adapter
|
|
565
|
+
const linkedBead = await adapter.getBead(TEST_PROJECT_KEY, testBeadId);
|
|
566
|
+
expect(linkedBead).toBeDefined();
|
|
567
|
+
expect(linkedBead!.description).toContain("Important context here");
|
|
568
|
+
expect(linkedBead!.description).toContain(`[thread:${threadId}]`);
|
|
565
569
|
});
|
|
566
570
|
|
|
567
571
|
it("throws BeadError for invalid bead ID", async () => {
|
|
@@ -575,7 +579,7 @@ describe("beads integration", () => {
|
|
|
575
579
|
});
|
|
576
580
|
|
|
577
581
|
describe("error handling", () => {
|
|
578
|
-
it("throws BeadError with command info on
|
|
582
|
+
it("throws BeadError with command info on adapter failure", async () => {
|
|
579
583
|
try {
|
|
580
584
|
await beads_update.execute(
|
|
581
585
|
{ id: "definitely-not-a-real-bead-id", status: "closed" },
|
|
@@ -585,8 +589,7 @@ describe("beads integration", () => {
|
|
|
585
589
|
} catch (error) {
|
|
586
590
|
expect(error).toBeInstanceOf(BeadError);
|
|
587
591
|
const beadError = error as BeadError;
|
|
588
|
-
expect(beadError.command).
|
|
589
|
-
expect(beadError.exitCode).toBeDefined();
|
|
592
|
+
expect(beadError.command).toBeDefined();
|
|
590
593
|
}
|
|
591
594
|
});
|
|
592
595
|
});
|
|
@@ -623,11 +626,10 @@ describe("beads integration", () => {
|
|
|
623
626
|
);
|
|
624
627
|
expect(closeResult).toContain("Closed");
|
|
625
628
|
|
|
626
|
-
// Verify final state using
|
|
627
|
-
const
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
expect(finalBead.status).toBe("closed");
|
|
629
|
+
// Verify final state using adapter
|
|
630
|
+
const finalBead = await adapter.getBead(TEST_PROJECT_KEY, bead.id);
|
|
631
|
+
expect(finalBead).toBeDefined();
|
|
632
|
+
expect(finalBead!.status).toBe("closed");
|
|
631
633
|
});
|
|
632
634
|
|
|
633
635
|
it("epic workflow: create epic -> start subtasks -> close subtasks -> close epic", async () => {
|
|
@@ -665,23 +667,15 @@ describe("beads integration", () => {
|
|
|
665
667
|
mockContext,
|
|
666
668
|
);
|
|
667
669
|
|
|
668
|
-
// Verify all are closed using
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
const epicClosed = Array.isArray(epicShowData)
|
|
673
|
-
? epicShowData[0]
|
|
674
|
-
: epicShowData;
|
|
675
|
-
expect(epicClosed.status).toBe("closed");
|
|
670
|
+
// Verify all are closed using adapter
|
|
671
|
+
const epicClosed = await adapter.getBead(TEST_PROJECT_KEY, epic.epic.id);
|
|
672
|
+
expect(epicClosed).toBeDefined();
|
|
673
|
+
expect(epicClosed!.status).toBe("closed");
|
|
676
674
|
|
|
677
675
|
for (const subtask of epic.subtasks) {
|
|
678
|
-
const
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
const subtaskClosed = Array.isArray(subtaskShowData)
|
|
682
|
-
? subtaskShowData[0]
|
|
683
|
-
: subtaskShowData;
|
|
684
|
-
expect(subtaskClosed.status).toBe("closed");
|
|
676
|
+
const subtaskClosed = await adapter.getBead(TEST_PROJECT_KEY, subtask.id);
|
|
677
|
+
expect(subtaskClosed).toBeDefined();
|
|
678
|
+
expect(subtaskClosed!.status).toBe("closed");
|
|
685
679
|
}
|
|
686
680
|
});
|
|
687
681
|
});
|