opencode-swarm-plugin 0.21.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/.turbo/turbo-build.log +9 -0
  2. package/CHANGELOG.md +12 -0
  3. package/README.md +111 -166
  4. package/dist/agent-mail.d.ts +480 -0
  5. package/dist/agent-mail.d.ts.map +1 -0
  6. package/dist/anti-patterns.d.ts +257 -0
  7. package/dist/anti-patterns.d.ts.map +1 -0
  8. package/dist/beads.d.ts +377 -0
  9. package/dist/beads.d.ts.map +1 -0
  10. package/dist/eval-capture.d.ts +206 -0
  11. package/dist/eval-capture.d.ts.map +1 -0
  12. package/dist/index.d.ts +1299 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +776 -4387
  15. package/dist/learning.d.ts +670 -0
  16. package/dist/learning.d.ts.map +1 -0
  17. package/dist/mandate-promotion.d.ts +93 -0
  18. package/dist/mandate-promotion.d.ts.map +1 -0
  19. package/dist/mandate-storage.d.ts +209 -0
  20. package/dist/mandate-storage.d.ts.map +1 -0
  21. package/dist/mandates.d.ts +230 -0
  22. package/dist/mandates.d.ts.map +1 -0
  23. package/dist/output-guardrails.d.ts +125 -0
  24. package/dist/output-guardrails.d.ts.map +1 -0
  25. package/dist/pattern-maturity.d.ts +246 -0
  26. package/dist/pattern-maturity.d.ts.map +1 -0
  27. package/dist/plugin.d.ts +22 -0
  28. package/dist/plugin.d.ts.map +1 -0
  29. package/dist/plugin.js +755 -4375
  30. package/dist/rate-limiter.d.ts +218 -0
  31. package/dist/rate-limiter.d.ts.map +1 -0
  32. package/dist/repo-crawl.d.ts +146 -0
  33. package/dist/repo-crawl.d.ts.map +1 -0
  34. package/dist/schemas/bead.d.ts +255 -0
  35. package/dist/schemas/bead.d.ts.map +1 -0
  36. package/dist/schemas/evaluation.d.ts +161 -0
  37. package/dist/schemas/evaluation.d.ts.map +1 -0
  38. package/dist/schemas/index.d.ts +34 -0
  39. package/dist/schemas/index.d.ts.map +1 -0
  40. package/dist/schemas/mandate.d.ts +336 -0
  41. package/dist/schemas/mandate.d.ts.map +1 -0
  42. package/dist/schemas/swarm-context.d.ts +131 -0
  43. package/dist/schemas/swarm-context.d.ts.map +1 -0
  44. package/dist/schemas/task.d.ts +188 -0
  45. package/dist/schemas/task.d.ts.map +1 -0
  46. package/dist/skills.d.ts +471 -0
  47. package/dist/skills.d.ts.map +1 -0
  48. package/dist/storage.d.ts +260 -0
  49. package/dist/storage.d.ts.map +1 -0
  50. package/dist/structured.d.ts +196 -0
  51. package/dist/structured.d.ts.map +1 -0
  52. package/dist/swarm-decompose.d.ts +201 -0
  53. package/dist/swarm-decompose.d.ts.map +1 -0
  54. package/dist/swarm-mail.d.ts +240 -0
  55. package/dist/swarm-mail.d.ts.map +1 -0
  56. package/dist/swarm-orchestrate.d.ts +708 -0
  57. package/dist/swarm-orchestrate.d.ts.map +1 -0
  58. package/dist/swarm-prompts.d.ts +292 -0
  59. package/dist/swarm-prompts.d.ts.map +1 -0
  60. package/dist/swarm-strategies.d.ts +100 -0
  61. package/dist/swarm-strategies.d.ts.map +1 -0
  62. package/dist/swarm.d.ts +455 -0
  63. package/dist/swarm.d.ts.map +1 -0
  64. package/dist/tool-availability.d.ts +91 -0
  65. package/dist/tool-availability.d.ts.map +1 -0
  66. package/docs/planning/ADR-001-monorepo-structure.md +171 -0
  67. package/docs/planning/ADR-002-package-extraction.md +393 -0
  68. package/docs/planning/ADR-003-performance-improvements.md +451 -0
  69. package/docs/planning/ADR-004-message-queue-features.md +187 -0
  70. package/docs/planning/ADR-005-devtools-observability.md +202 -0
  71. package/docs/planning/ROADMAP.md +368 -0
  72. package/docs/semantic-memory-cli-syntax.md +123 -0
  73. package/docs/swarm-mail-architecture.md +1147 -0
  74. package/package.json +13 -24
  75. package/scripts/cleanup-test-memories.ts +346 -0
  76. package/src/agent-mail.ts +1 -1
  77. package/src/beads.ts +1 -2
  78. package/src/index.ts +2 -2
  79. package/src/learning.integration.test.ts +80 -10
  80. package/src/mandate-storage.test.ts +3 -3
  81. package/src/storage.ts +189 -9
  82. package/src/swarm-mail.ts +3 -3
  83. package/src/swarm-orchestrate.ts +399 -246
  84. package/src/swarm.integration.test.ts +124 -0
  85. package/src/tool-availability.ts +1 -1
  86. package/tsconfig.json +1 -1
  87. package/.beads/.local_version +0 -1
  88. package/.beads/README.md +0 -81
  89. package/.beads/analysis/skill-architecture-meta-skills.md +0 -1562
  90. package/.beads/config.yaml +0 -62
  91. package/.beads/issues.jsonl +0 -2186
  92. package/.beads/metadata.json +0 -4
  93. package/.gitattributes +0 -3
  94. package/.github/workflows/ci.yml +0 -30
  95. package/.github/workflows/opencode.yml +0 -31
  96. package/.opencode/skills/tdd/SKILL.md +0 -182
  97. package/INTEGRATION_EXAMPLE.md +0 -66
  98. package/VERIFICATION_QUALITY_PATTERNS.md +0 -565
  99. package/bun.lock +0 -286
  100. package/dist/pglite.data +0 -0
  101. package/dist/pglite.wasm +0 -0
  102. package/src/streams/agent-mail.test.ts +0 -777
  103. package/src/streams/agent-mail.ts +0 -535
  104. package/src/streams/debug.test.ts +0 -500
  105. package/src/streams/debug.ts +0 -727
  106. package/src/streams/effect/ask.integration.test.ts +0 -314
  107. package/src/streams/effect/ask.ts +0 -202
  108. package/src/streams/effect/cursor.integration.test.ts +0 -418
  109. package/src/streams/effect/cursor.ts +0 -288
  110. package/src/streams/effect/deferred.test.ts +0 -357
  111. package/src/streams/effect/deferred.ts +0 -445
  112. package/src/streams/effect/index.ts +0 -17
  113. package/src/streams/effect/layers.ts +0 -73
  114. package/src/streams/effect/lock.test.ts +0 -385
  115. package/src/streams/effect/lock.ts +0 -399
  116. package/src/streams/effect/mailbox.test.ts +0 -260
  117. package/src/streams/effect/mailbox.ts +0 -318
  118. package/src/streams/events.test.ts +0 -924
  119. package/src/streams/events.ts +0 -329
  120. package/src/streams/index.test.ts +0 -229
  121. package/src/streams/index.ts +0 -578
  122. package/src/streams/migrations.test.ts +0 -359
  123. package/src/streams/migrations.ts +0 -362
  124. package/src/streams/projections.test.ts +0 -611
  125. package/src/streams/projections.ts +0 -504
  126. package/src/streams/store.integration.test.ts +0 -658
  127. package/src/streams/store.ts +0 -1075
  128. package/src/streams/swarm-mail.ts +0 -552
  129. package/test-bug-fixes.ts +0 -86
  130. package/vitest.integration.config.ts +0 -13
  131. package/workflow-integration-analysis.md +0 -876
@@ -1356,4 +1356,128 @@ describe("Swarm Prompt V2 (with Swarm Mail/Beads)", () => {
1356
1356
  expect(SUBTASK_PROMPT_V2).toContain("CRITICAL");
1357
1357
  });
1358
1358
  });
1359
+
1360
+ describe("swarm_complete automatic memory capture", () => {
1361
+ let beadsAvailable = false;
1362
+
1363
+ beforeAll(async () => {
1364
+ beadsAvailable = await isBeadsAvailable();
1365
+ });
1366
+
1367
+ it.skipIf(!beadsAvailable)(
1368
+ "includes memory_capture object in response",
1369
+ async () => {
1370
+ // Create a real bead for the test
1371
+ const createResult =
1372
+ await Bun.$`bd create "Test memory capture" -t task --json`
1373
+ .quiet()
1374
+ .nothrow();
1375
+
1376
+ if (createResult.exitCode !== 0) {
1377
+ console.warn(
1378
+ "Could not create bead:",
1379
+ createResult.stderr.toString(),
1380
+ );
1381
+ return;
1382
+ }
1383
+
1384
+ const bead = JSON.parse(createResult.stdout.toString());
1385
+
1386
+ try {
1387
+ const result = await swarm_complete.execute(
1388
+ {
1389
+ project_key: "/tmp/test-memory-capture",
1390
+ agent_name: "test-agent",
1391
+ bead_id: bead.id,
1392
+ summary: "Implemented auto-capture feature",
1393
+ files_touched: ["src/swarm-orchestrate.ts"],
1394
+ skip_verification: true,
1395
+ },
1396
+ mockContext,
1397
+ );
1398
+
1399
+ const parsed = JSON.parse(result);
1400
+
1401
+ // Verify memory capture was attempted
1402
+ expect(parsed).toHaveProperty("memory_capture");
1403
+ expect(parsed.memory_capture).toHaveProperty("attempted", true);
1404
+ expect(parsed.memory_capture).toHaveProperty("stored");
1405
+ expect(parsed.memory_capture).toHaveProperty("information");
1406
+ expect(parsed.memory_capture).toHaveProperty("metadata");
1407
+
1408
+ // Information should contain bead ID and summary
1409
+ expect(parsed.memory_capture.information).toContain(bead.id);
1410
+ expect(parsed.memory_capture.information).toContain(
1411
+ "Implemented auto-capture feature",
1412
+ );
1413
+
1414
+ // Metadata should contain relevant tags
1415
+ expect(parsed.memory_capture.metadata).toContain("swarm");
1416
+ expect(parsed.memory_capture.metadata).toContain("success");
1417
+ } catch (error) {
1418
+ // Clean up bead if test fails
1419
+ await Bun.$`bd close ${bead.id} --reason "Test cleanup"`
1420
+ .quiet()
1421
+ .nothrow();
1422
+ throw error;
1423
+ }
1424
+ },
1425
+ );
1426
+
1427
+ it.skipIf(!beadsAvailable)(
1428
+ "attempts to store in semantic-memory when available",
1429
+ async () => {
1430
+ const createResult =
1431
+ await Bun.$`bd create "Test semantic-memory storage" -t task --json`
1432
+ .quiet()
1433
+ .nothrow();
1434
+
1435
+ if (createResult.exitCode !== 0) {
1436
+ console.warn(
1437
+ "Could not create bead:",
1438
+ createResult.stderr.toString(),
1439
+ );
1440
+ return;
1441
+ }
1442
+
1443
+ const bead = JSON.parse(createResult.stdout.toString());
1444
+
1445
+ try {
1446
+ const result = await swarm_complete.execute(
1447
+ {
1448
+ project_key: "/tmp/test-memory-storage",
1449
+ agent_name: "test-agent",
1450
+ bead_id: bead.id,
1451
+ summary: "Fixed critical bug in auth flow",
1452
+ files_touched: ["src/auth.ts", "src/middleware.ts"],
1453
+ skip_verification: true,
1454
+ },
1455
+ mockContext,
1456
+ );
1457
+
1458
+ const parsed = JSON.parse(result);
1459
+
1460
+ // If semantic-memory is available, stored should be true
1461
+ // If not, error should explain why
1462
+ if (parsed.memory_capture.stored) {
1463
+ expect(parsed.memory_capture.note).toContain(
1464
+ "automatically stored in semantic-memory",
1465
+ );
1466
+ } else {
1467
+ expect(parsed.memory_capture.error).toBeDefined();
1468
+ expect(
1469
+ parsed.memory_capture.error.includes("not available") ||
1470
+ parsed.memory_capture.error.includes("failed"),
1471
+ ).toBe(true);
1472
+ }
1473
+ } catch (error) {
1474
+ // Clean up bead if test fails
1475
+ await Bun.$`bd close ${bead.id} --reason "Test cleanup"`
1476
+ .quiet()
1477
+ .nothrow();
1478
+ throw error;
1479
+ }
1480
+ },
1481
+ );
1482
+ });
1359
1483
  });
@@ -13,7 +13,7 @@
13
13
  * - agent-mail: DEPRECATED - Legacy MCP server (use swarm-mail instead)
14
14
  */
15
15
 
16
- import { checkSwarmHealth } from "./streams/swarm-mail";
16
+ import { checkSwarmHealth } from "swarm-mail";
17
17
 
18
18
  /** Default timeout for URL reachability checks in milliseconds */
19
19
  const DEFAULT_URL_TIMEOUT_MS = 2000;
package/tsconfig.json CHANGED
@@ -7,13 +7,13 @@
7
7
  "types": ["bun-types"],
8
8
  "strict": true,
9
9
  "skipLibCheck": true,
10
- "noEmit": true,
11
10
  "esModuleInterop": true,
12
11
  "allowSyntheticDefaultImports": true,
13
12
  "forceConsistentCasingInFileNames": true,
14
13
  "resolveJsonModule": true,
15
14
  "declaration": true,
16
15
  "declarationMap": true,
16
+ "emitDeclarationOnly": true,
17
17
  "sourceMap": true,
18
18
  "outDir": "./dist",
19
19
  "rootDir": "./src",
@@ -1 +0,0 @@
1
- 0.29.0
package/.beads/README.md DELETED
@@ -1,81 +0,0 @@
1
- # Beads - AI-Native Issue Tracking
2
-
3
- Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.
4
-
5
- ## What is Beads?
6
-
7
- Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.
8
-
9
- **Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
10
-
11
- ## Quick Start
12
-
13
- ### Essential Commands
14
-
15
- ```bash
16
- # Create new issues
17
- bd create "Add user authentication"
18
-
19
- # View all issues
20
- bd list
21
-
22
- # View issue details
23
- bd show <issue-id>
24
-
25
- # Update issue status
26
- bd update <issue-id> --status in_progress
27
- bd update <issue-id> --status done
28
-
29
- # Sync with git remote
30
- bd sync
31
- ```
32
-
33
- ### Working with Issues
34
-
35
- Issues in Beads are:
36
- - **Git-native**: Stored in `.beads/issues.jsonl` and synced like code
37
- - **AI-friendly**: CLI-first design works perfectly with AI coding agents
38
- - **Branch-aware**: Issues can follow your branch workflow
39
- - **Always in sync**: Auto-syncs with your commits
40
-
41
- ## Why Beads?
42
-
43
- ✨ **AI-Native Design**
44
- - Built specifically for AI-assisted development workflows
45
- - CLI-first interface works seamlessly with AI coding agents
46
- - No context switching to web UIs
47
-
48
- 🚀 **Developer Focused**
49
- - Issues live in your repo, right next to your code
50
- - Works offline, syncs when you push
51
- - Fast, lightweight, and stays out of your way
52
-
53
- 🔧 **Git Integration**
54
- - Automatic sync with git commits
55
- - Branch-aware issue tracking
56
- - Intelligent JSONL merge resolution
57
-
58
- ## Get Started with Beads
59
-
60
- Try Beads in your own projects:
61
-
62
- ```bash
63
- # Install Beads
64
- curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
65
-
66
- # Initialize in your repo
67
- bd init
68
-
69
- # Create your first issue
70
- bd create "Try out Beads"
71
- ```
72
-
73
- ## Learn More
74
-
75
- - **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs)
76
- - **Quick Start Guide**: Run `bd quickstart`
77
- - **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples)
78
-
79
- ---
80
-
81
- *Beads: Issue tracking that moves at the speed of thought* ⚡