opencode-swarm-plugin 0.13.1 → 0.14.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.
@@ -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"}
package/dist/index.js CHANGED
@@ -35192,7 +35192,6 @@ var SwarmPlugin = async (input) => {
35192
35192
  return {
35193
35193
  tool: {
35194
35194
  ...beadsTools,
35195
- ...agentMailTools,
35196
35195
  ...swarmMailTools,
35197
35196
  ...structuredTools,
35198
35197
  ...swarmTools,
@@ -35240,7 +35239,6 @@ var SwarmPlugin = async (input) => {
35240
35239
  var src_default = SwarmPlugin;
35241
35240
  var allTools = {
35242
35241
  ...beadsTools,
35243
- ...agentMailTools,
35244
35242
  ...swarmMailTools,
35245
35243
  ...structuredTools,
35246
35244
  ...swarmTools,
package/dist/plugin.js CHANGED
@@ -31340,19 +31340,6 @@ var agentmail_restart = tool({
31340
31340
  }, null, 2);
31341
31341
  }
31342
31342
  });
31343
- var agentMailTools = {
31344
- agentmail_init,
31345
- agentmail_send,
31346
- agentmail_inbox,
31347
- agentmail_read_message,
31348
- agentmail_summarize_thread,
31349
- agentmail_reserve,
31350
- agentmail_release,
31351
- agentmail_ack,
31352
- agentmail_search,
31353
- agentmail_health,
31354
- agentmail_restart
31355
- };
31356
31343
 
31357
31344
  // src/swarm-mail.ts
31358
31345
  init_dist();
@@ -34723,7 +34710,6 @@ var SwarmPlugin = async (input) => {
34723
34710
  return {
34724
34711
  tool: {
34725
34712
  ...beadsTools,
34726
- ...agentMailTools,
34727
34713
  ...swarmMailTools,
34728
34714
  ...structuredTools,
34729
34715
  ...swarmTools,
@@ -34770,7 +34756,6 @@ var SwarmPlugin = async (input) => {
34770
34756
  };
34771
34757
  var allTools = {
34772
34758
  ...beadsTools,
34773
- ...agentMailTools,
34774
34759
  ...swarmMailTools,
34775
34760
  ...structuredTools,
34776
34761
  ...swarmTools,
@@ -252,11 +252,11 @@ const beads_link_thread = tool({
252
252
  });
253
253
 
254
254
  // =============================================================================
255
- // Agent Mail Tools
255
+ // Swarm Mail Tools (Embedded)
256
256
  // =============================================================================
257
257
 
258
- const agentmail_init = tool({
259
- description: "Initialize Agent Mail session",
258
+ const swarmmail_init = tool({
259
+ description: "Initialize Swarm Mail session (REQUIRED FIRST)",
260
260
  args: {
261
261
  project_path: tool.schema.string().describe("Absolute path to the project"),
262
262
  agent_name: tool.schema.string().optional().describe("Custom agent name"),
@@ -265,11 +265,11 @@ const agentmail_init = tool({
265
265
  .optional()
266
266
  .describe("Task description"),
267
267
  },
268
- execute: (args, ctx) => execTool("agentmail_init", args, ctx),
268
+ execute: (args, ctx) => execTool("swarmmail_init", args, ctx),
269
269
  });
270
270
 
271
- const agentmail_send = tool({
272
- description: "Send message to other agents",
271
+ const swarmmail_send = tool({
272
+ description: "Send message to other agents via Swarm Mail",
273
273
  args: {
274
274
  to: tool.schema
275
275
  .array(tool.schema.string())
@@ -289,11 +289,11 @@ const agentmail_send = tool({
289
289
  .optional()
290
290
  .describe("Require acknowledgment"),
291
291
  },
292
- execute: (args, ctx) => execTool("agentmail_send", args, ctx),
292
+ execute: (args, ctx) => execTool("swarmmail_send", args, ctx),
293
293
  });
294
294
 
295
- const agentmail_inbox = tool({
296
- description: "Fetch inbox (CONTEXT-SAFE: bodies excluded, limit 5)",
295
+ const swarmmail_inbox = tool({
296
+ description: "Fetch inbox (CONTEXT-SAFE: bodies excluded, max 5 messages)",
297
297
  args: {
298
298
  limit: tool.schema
299
299
  .number()
@@ -304,35 +304,19 @@ const agentmail_inbox = tool({
304
304
  .boolean()
305
305
  .optional()
306
306
  .describe("Only urgent messages"),
307
- since_ts: tool.schema
308
- .string()
309
- .optional()
310
- .describe("Messages since timestamp"),
311
307
  },
312
- execute: (args, ctx) => execTool("agentmail_inbox", args, ctx),
308
+ execute: (args, ctx) => execTool("swarmmail_inbox", args, ctx),
313
309
  });
314
310
 
315
- const agentmail_read_message = tool({
311
+ const swarmmail_read_message = tool({
316
312
  description: "Fetch ONE message body by ID",
317
313
  args: {
318
314
  message_id: tool.schema.number().describe("Message ID"),
319
315
  },
320
- execute: (args, ctx) => execTool("agentmail_read_message", args, ctx),
321
- });
322
-
323
- const agentmail_summarize_thread = tool({
324
- description: "Summarize thread (PREFERRED over fetching all messages)",
325
- args: {
326
- thread_id: tool.schema.string().describe("Thread ID"),
327
- include_examples: tool.schema
328
- .boolean()
329
- .optional()
330
- .describe("Include example messages"),
331
- },
332
- execute: (args, ctx) => execTool("agentmail_summarize_thread", args, ctx),
316
+ execute: (args, ctx) => execTool("swarmmail_read_message", args, ctx),
333
317
  });
334
318
 
335
- const agentmail_reserve = tool({
319
+ const swarmmail_reserve = tool({
336
320
  description: "Reserve file paths for exclusive editing",
337
321
  args: {
338
322
  paths: tool.schema
@@ -342,10 +326,10 @@ const agentmail_reserve = tool({
342
326
  exclusive: tool.schema.boolean().optional().describe("Exclusive lock"),
343
327
  reason: tool.schema.string().optional().describe("Reservation reason"),
344
328
  },
345
- execute: (args, ctx) => execTool("agentmail_reserve", args, ctx),
329
+ execute: (args, ctx) => execTool("swarmmail_reserve", args, ctx),
346
330
  });
347
331
 
348
- const agentmail_release = tool({
332
+ const swarmmail_release = tool({
349
333
  description: "Release file reservations",
350
334
  args: {
351
335
  paths: tool.schema
@@ -357,30 +341,21 @@ const agentmail_release = tool({
357
341
  .optional()
358
342
  .describe("Reservation IDs"),
359
343
  },
360
- execute: (args, ctx) => execTool("agentmail_release", args, ctx),
344
+ execute: (args, ctx) => execTool("swarmmail_release", args, ctx),
361
345
  });
362
346
 
363
- const agentmail_ack = tool({
347
+ const swarmmail_ack = tool({
364
348
  description: "Acknowledge a message",
365
349
  args: {
366
350
  message_id: tool.schema.number().describe("Message ID"),
367
351
  },
368
- execute: (args, ctx) => execTool("agentmail_ack", args, ctx),
369
- });
370
-
371
- const agentmail_search = tool({
372
- description: "Search messages by keyword",
373
- args: {
374
- query: tool.schema.string().describe("Search query"),
375
- limit: tool.schema.number().optional().describe("Max results"),
376
- },
377
- execute: (args, ctx) => execTool("agentmail_search", args, ctx),
352
+ execute: (args, ctx) => execTool("swarmmail_ack", args, ctx),
378
353
  });
379
354
 
380
- const agentmail_health = tool({
381
- description: "Check if Agent Mail server is running",
355
+ const swarmmail_health = tool({
356
+ description: "Check Swarm Mail database health",
382
357
  args: {},
383
- execute: (args, ctx) => execTool("agentmail_health", args, ctx),
358
+ execute: (args, ctx) => execTool("swarmmail_health", args, ctx),
384
359
  });
385
360
 
386
361
  // =============================================================================
@@ -794,17 +769,15 @@ export const SwarmPlugin: Plugin = async (
794
769
  beads_ready,
795
770
  beads_sync,
796
771
  beads_link_thread,
797
- // Agent Mail
798
- agentmail_init,
799
- agentmail_send,
800
- agentmail_inbox,
801
- agentmail_read_message,
802
- agentmail_summarize_thread,
803
- agentmail_reserve,
804
- agentmail_release,
805
- agentmail_ack,
806
- agentmail_search,
807
- agentmail_health,
772
+ // Swarm Mail (Embedded)
773
+ swarmmail_init,
774
+ swarmmail_send,
775
+ swarmmail_inbox,
776
+ swarmmail_read_message,
777
+ swarmmail_reserve,
778
+ swarmmail_release,
779
+ swarmmail_ack,
780
+ swarmmail_health,
808
781
  // Structured
809
782
  structured_extract_json,
810
783
  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.14.0",
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",
package/src/index.ts CHANGED
@@ -135,7 +135,6 @@ export const SwarmPlugin: Plugin = async (
135
135
  */
136
136
  tool: {
137
137
  ...beadsTools,
138
- ...agentMailTools,
139
138
  ...swarmMailTools,
140
139
  ...structuredTools,
141
140
  ...swarmTools,
@@ -357,7 +356,6 @@ export {
357
356
  */
358
357
  export const allTools = {
359
358
  ...beadsTools,
360
- ...agentMailTools,
361
359
  ...swarmMailTools,
362
360
  ...structuredTools,
363
361
  ...swarmTools,