opencode-swarm-plugin 0.13.1 → 0.13.2

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.
@@ -1428,6 +1428,10 @@
1428
1428
  {"id":"opencode-swarm-plugin-qgd2n","title":"Update test bead","description":"Updated description","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-13T11:16:36.35338-08:00","updated_at":"2025-12-13T11:16:40.1931-08:00","closed_at":"2025-12-13T11:16:40.1931-08:00"}
1429
1429
  {"id":"opencode-swarm-plugin-qgt38","title":"Document SubtaskSpec estimated_complexity scale","description":"src/schemas/bead.ts:106 - `estimated_complexity: z.number().int().min(1).max(5)` - scale meaning not documented. Add JSDoc: \"/** Complexity estimate (1=trivial, 5=very complex) */\"","status":"open","priority":3,"issue_type":"chore","created_at":"2025-12-10T09:06:10.789511-08:00","updated_at":"2025-12-10T09:06:10.789511-08:00"}
1430
1430
  {"id":"opencode-swarm-plugin-qhr0","title":"Cleanup task","description":"","status":"closed","priority":3,"issue_type":"chore","created_at":"2025-12-08T08:22:16.521307-08:00","updated_at":"2025-12-08T08:22:19.112363-08:00","closed_at":"2025-12-08T08:22:19.112363-08:00"}
1431
+ {"id":"opencode-swarm-plugin-qkscs","title":"Production Hardening: Logging, Cleanup, and N+1 Fixes","description":"Fix 3 production readiness gaps in Swarm Mail to improve reliability and debuggability","status":"open","priority":1,"issue_type":"epic","created_at":"2025-12-13T13:27:21.122378-08:00","updated_at":"2025-12-13T13:27:21.122378-08:00"}
1432
+ {"id":"opencode-swarm-plugin-qkscs.1","title":"Fix N+1 queries in store.ts message and reservation handlers","description":"","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-13T13:27:21.179002-08:00","updated_at":"2025-12-13T13:27:21.179002-08:00","dependencies":[{"issue_id":"opencode-swarm-plugin-qkscs.1","depends_on_id":"opencode-swarm-plugin-qkscs","type":"parent-child","created_at":"2025-12-13T13:27:21.180631-08:00","created_by":"daemon"}]}
1433
+ {"id":"opencode-swarm-plugin-qkscs.2","title":"Implement expired reservation cleanup in projections.ts","description":"","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-13T13:27:21.234033-08:00","updated_at":"2025-12-13T13:27:21.234033-08:00","dependencies":[{"issue_id":"opencode-swarm-plugin-qkscs.2","depends_on_id":"opencode-swarm-plugin-qkscs","type":"parent-child","created_at":"2025-12-13T13:27:21.235438-08:00","created_by":"daemon"}]}
1434
+ {"id":"opencode-swarm-plugin-qkscs.3","title":"Add structured logging for critical operations","description":"","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-13T13:27:21.287551-08:00","updated_at":"2025-12-13T13:27:21.287551-08:00","dependencies":[{"issue_id":"opencode-swarm-plugin-qkscs.3","depends_on_id":"opencode-swarm-plugin-qkscs","type":"parent-child","created_at":"2025-12-13T13:27:21.288503-08:00","created_by":"daemon"}]}
1431
1435
  {"id":"opencode-swarm-plugin-ql5z","title":"Test bug with priority","description":"This is a critical bug","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-12-08T08:14:28.392972-08:00","updated_at":"2025-12-08T08:14:30.889299-08:00","closed_at":"2025-12-08T08:14:30.889299-08:00"}
1432
1436
  {"id":"opencode-swarm-plugin-qlrp","title":"Update test bead","description":"Updated description","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T08:56:55.899992-08:00","updated_at":"2025-12-08T08:56:58.219456-08:00","closed_at":"2025-12-08T08:56:58.219456-08:00"}
1433
1437
  {"id":"opencode-swarm-plugin-qlzm","title":"Update test bead","description":"Updated description","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-08T11:10:25.282262-08:00","updated_at":"2025-12-08T11:10:27.598379-08:00","closed_at":"2025-12-08T11:10:27.598379-08:00"}
@@ -383,6 +383,113 @@ const agentmail_health = tool({
383
383
  execute: (args, ctx) => execTool("agentmail_health", args, ctx),
384
384
  });
385
385
 
386
+ // =============================================================================
387
+ // Swarm Mail Tools (Embedded - Primary)
388
+ // =============================================================================
389
+
390
+ const swarmmail_init = tool({
391
+ description: "Initialize Swarm Mail session (REQUIRED FIRST)",
392
+ args: {
393
+ project_path: tool.schema.string().describe("Absolute path to the project"),
394
+ agent_name: tool.schema.string().optional().describe("Custom agent name"),
395
+ task_description: tool.schema
396
+ .string()
397
+ .optional()
398
+ .describe("Task description"),
399
+ },
400
+ execute: (args, ctx) => execTool("swarmmail_init", args, ctx),
401
+ });
402
+
403
+ const swarmmail_send = tool({
404
+ description: "Send message to other agents via Swarm Mail",
405
+ args: {
406
+ to: tool.schema
407
+ .array(tool.schema.string())
408
+ .describe("Recipient agent names"),
409
+ subject: tool.schema.string().describe("Message subject"),
410
+ body: tool.schema.string().describe("Message body"),
411
+ thread_id: tool.schema
412
+ .string()
413
+ .optional()
414
+ .describe("Thread ID for grouping"),
415
+ importance: tool.schema
416
+ .enum(["low", "normal", "high", "urgent"])
417
+ .optional()
418
+ .describe("Message importance"),
419
+ ack_required: tool.schema
420
+ .boolean()
421
+ .optional()
422
+ .describe("Require acknowledgment"),
423
+ },
424
+ execute: (args, ctx) => execTool("swarmmail_send", args, ctx),
425
+ });
426
+
427
+ const swarmmail_inbox = tool({
428
+ description: "Fetch inbox (CONTEXT-SAFE: bodies excluded, max 5 messages)",
429
+ args: {
430
+ limit: tool.schema
431
+ .number()
432
+ .max(5)
433
+ .optional()
434
+ .describe("Max messages (max 5)"),
435
+ urgent_only: tool.schema
436
+ .boolean()
437
+ .optional()
438
+ .describe("Only urgent messages"),
439
+ },
440
+ execute: (args, ctx) => execTool("swarmmail_inbox", args, ctx),
441
+ });
442
+
443
+ const swarmmail_read_message = tool({
444
+ description: "Fetch ONE message body by ID",
445
+ args: {
446
+ message_id: tool.schema.number().describe("Message ID"),
447
+ },
448
+ execute: (args, ctx) => execTool("swarmmail_read_message", args, ctx),
449
+ });
450
+
451
+ const swarmmail_reserve = tool({
452
+ description: "Reserve file paths for exclusive editing",
453
+ args: {
454
+ paths: tool.schema
455
+ .array(tool.schema.string())
456
+ .describe("File paths/patterns"),
457
+ ttl_seconds: tool.schema.number().optional().describe("Reservation TTL"),
458
+ exclusive: tool.schema.boolean().optional().describe("Exclusive lock"),
459
+ reason: tool.schema.string().optional().describe("Reservation reason"),
460
+ },
461
+ execute: (args, ctx) => execTool("swarmmail_reserve", args, ctx),
462
+ });
463
+
464
+ const swarmmail_release = tool({
465
+ description: "Release file reservations",
466
+ args: {
467
+ paths: tool.schema
468
+ .array(tool.schema.string())
469
+ .optional()
470
+ .describe("Paths to release"),
471
+ reservation_ids: tool.schema
472
+ .array(tool.schema.number())
473
+ .optional()
474
+ .describe("Reservation IDs"),
475
+ },
476
+ execute: (args, ctx) => execTool("swarmmail_release", args, ctx),
477
+ });
478
+
479
+ const swarmmail_ack = tool({
480
+ description: "Acknowledge a message",
481
+ args: {
482
+ message_id: tool.schema.number().describe("Message ID"),
483
+ },
484
+ execute: (args, ctx) => execTool("swarmmail_ack", args, ctx),
485
+ });
486
+
487
+ const swarmmail_health = tool({
488
+ description: "Check Swarm Mail database health",
489
+ args: {},
490
+ execute: (args, ctx) => execTool("swarmmail_health", args, ctx),
491
+ });
492
+
386
493
  // =============================================================================
387
494
  // Structured Tools
388
495
  // =============================================================================
@@ -794,7 +901,7 @@ export const SwarmPlugin: Plugin = async (
794
901
  beads_ready,
795
902
  beads_sync,
796
903
  beads_link_thread,
797
- // Agent Mail
904
+ // Agent Mail (Legacy MCP)
798
905
  agentmail_init,
799
906
  agentmail_send,
800
907
  agentmail_inbox,
@@ -805,6 +912,15 @@ export const SwarmPlugin: Plugin = async (
805
912
  agentmail_ack,
806
913
  agentmail_search,
807
914
  agentmail_health,
915
+ // Swarm Mail (Embedded - Primary)
916
+ swarmmail_init,
917
+ swarmmail_send,
918
+ swarmmail_inbox,
919
+ swarmmail_read_message,
920
+ swarmmail_reserve,
921
+ swarmmail_release,
922
+ swarmmail_ack,
923
+ swarmmail_health,
808
924
  // Structured
809
925
  structured_extract_json,
810
926
  structured_validate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm-plugin",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
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",