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.
- package/.turbo/turbo-build.log +9 -0
- package/CHANGELOG.md +12 -0
- package/README.md +111 -166
- package/dist/agent-mail.d.ts +480 -0
- package/dist/agent-mail.d.ts.map +1 -0
- package/dist/anti-patterns.d.ts +257 -0
- package/dist/anti-patterns.d.ts.map +1 -0
- package/dist/beads.d.ts +377 -0
- package/dist/beads.d.ts.map +1 -0
- package/dist/eval-capture.d.ts +206 -0
- package/dist/eval-capture.d.ts.map +1 -0
- package/dist/index.d.ts +1299 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +776 -4387
- package/dist/learning.d.ts +670 -0
- package/dist/learning.d.ts.map +1 -0
- package/dist/mandate-promotion.d.ts +93 -0
- package/dist/mandate-promotion.d.ts.map +1 -0
- package/dist/mandate-storage.d.ts +209 -0
- package/dist/mandate-storage.d.ts.map +1 -0
- package/dist/mandates.d.ts +230 -0
- package/dist/mandates.d.ts.map +1 -0
- package/dist/output-guardrails.d.ts +125 -0
- package/dist/output-guardrails.d.ts.map +1 -0
- package/dist/pattern-maturity.d.ts +246 -0
- package/dist/pattern-maturity.d.ts.map +1 -0
- package/dist/plugin.d.ts +22 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +755 -4375
- package/dist/rate-limiter.d.ts +218 -0
- package/dist/rate-limiter.d.ts.map +1 -0
- package/dist/repo-crawl.d.ts +146 -0
- package/dist/repo-crawl.d.ts.map +1 -0
- package/dist/schemas/bead.d.ts +255 -0
- package/dist/schemas/bead.d.ts.map +1 -0
- package/dist/schemas/evaluation.d.ts +161 -0
- package/dist/schemas/evaluation.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +34 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/mandate.d.ts +336 -0
- package/dist/schemas/mandate.d.ts.map +1 -0
- package/dist/schemas/swarm-context.d.ts +131 -0
- package/dist/schemas/swarm-context.d.ts.map +1 -0
- package/dist/schemas/task.d.ts +188 -0
- package/dist/schemas/task.d.ts.map +1 -0
- package/dist/skills.d.ts +471 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/storage.d.ts +260 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/structured.d.ts +196 -0
- package/dist/structured.d.ts.map +1 -0
- package/dist/swarm-decompose.d.ts +201 -0
- package/dist/swarm-decompose.d.ts.map +1 -0
- package/dist/swarm-mail.d.ts +240 -0
- package/dist/swarm-mail.d.ts.map +1 -0
- package/dist/swarm-orchestrate.d.ts +708 -0
- package/dist/swarm-orchestrate.d.ts.map +1 -0
- package/dist/swarm-prompts.d.ts +292 -0
- package/dist/swarm-prompts.d.ts.map +1 -0
- package/dist/swarm-strategies.d.ts +100 -0
- package/dist/swarm-strategies.d.ts.map +1 -0
- package/dist/swarm.d.ts +455 -0
- package/dist/swarm.d.ts.map +1 -0
- package/dist/tool-availability.d.ts +91 -0
- package/dist/tool-availability.d.ts.map +1 -0
- package/docs/planning/ADR-001-monorepo-structure.md +171 -0
- package/docs/planning/ADR-002-package-extraction.md +393 -0
- package/docs/planning/ADR-003-performance-improvements.md +451 -0
- package/docs/planning/ADR-004-message-queue-features.md +187 -0
- package/docs/planning/ADR-005-devtools-observability.md +202 -0
- package/docs/planning/ROADMAP.md +368 -0
- package/docs/semantic-memory-cli-syntax.md +123 -0
- package/docs/swarm-mail-architecture.md +1147 -0
- package/package.json +13 -24
- package/scripts/cleanup-test-memories.ts +346 -0
- package/src/agent-mail.ts +1 -1
- package/src/beads.ts +1 -2
- package/src/index.ts +2 -2
- package/src/learning.integration.test.ts +80 -10
- package/src/mandate-storage.test.ts +3 -3
- package/src/storage.ts +189 -9
- package/src/swarm-mail.ts +3 -3
- package/src/swarm-orchestrate.ts +399 -246
- package/src/swarm.integration.test.ts +124 -0
- package/src/tool-availability.ts +1 -1
- package/tsconfig.json +1 -1
- package/.beads/.local_version +0 -1
- package/.beads/README.md +0 -81
- package/.beads/analysis/skill-architecture-meta-skills.md +0 -1562
- package/.beads/config.yaml +0 -62
- package/.beads/issues.jsonl +0 -2186
- package/.beads/metadata.json +0 -4
- package/.gitattributes +0 -3
- package/.github/workflows/ci.yml +0 -30
- package/.github/workflows/opencode.yml +0 -31
- package/.opencode/skills/tdd/SKILL.md +0 -182
- package/INTEGRATION_EXAMPLE.md +0 -66
- package/VERIFICATION_QUALITY_PATTERNS.md +0 -565
- package/bun.lock +0 -286
- package/dist/pglite.data +0 -0
- package/dist/pglite.wasm +0 -0
- package/src/streams/agent-mail.test.ts +0 -777
- package/src/streams/agent-mail.ts +0 -535
- package/src/streams/debug.test.ts +0 -500
- package/src/streams/debug.ts +0 -727
- package/src/streams/effect/ask.integration.test.ts +0 -314
- package/src/streams/effect/ask.ts +0 -202
- package/src/streams/effect/cursor.integration.test.ts +0 -418
- package/src/streams/effect/cursor.ts +0 -288
- package/src/streams/effect/deferred.test.ts +0 -357
- package/src/streams/effect/deferred.ts +0 -445
- package/src/streams/effect/index.ts +0 -17
- package/src/streams/effect/layers.ts +0 -73
- package/src/streams/effect/lock.test.ts +0 -385
- package/src/streams/effect/lock.ts +0 -399
- package/src/streams/effect/mailbox.test.ts +0 -260
- package/src/streams/effect/mailbox.ts +0 -318
- package/src/streams/events.test.ts +0 -924
- package/src/streams/events.ts +0 -329
- package/src/streams/index.test.ts +0 -229
- package/src/streams/index.ts +0 -578
- package/src/streams/migrations.test.ts +0 -359
- package/src/streams/migrations.ts +0 -362
- package/src/streams/projections.test.ts +0 -611
- package/src/streams/projections.ts +0 -504
- package/src/streams/store.integration.test.ts +0 -658
- package/src/streams/store.ts +0 -1075
- package/src/streams/swarm-mail.ts +0 -552
- package/test-bug-fixes.ts +0 -86
- package/vitest.integration.config.ts +0 -13
- 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
|
});
|
package/src/tool-availability.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* - agent-mail: DEPRECATED - Legacy MCP server (use swarm-mail instead)
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { checkSwarmHealth } from "
|
|
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",
|
package/.beads/.local_version
DELETED
|
@@ -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* ⚡
|