opencode-swarm-plugin 0.28.0 → 0.28.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.
@@ -1,9 +1,9 @@
1
1
  $ bun build ./src/index.ts --outdir ./dist --target node --external @electric-sql/pglite --external swarm-mail && bun build ./src/plugin.ts --outfile ./dist/plugin.js --target node --external @electric-sql/pglite --external swarm-mail && tsc
2
- Bundled 200 modules in 32ms
2
+ Bundled 200 modules in 35ms
3
3
 
4
4
  index.js 1.20 MB (entry point)
5
5
 
6
- Bundled 201 modules in 31ms
6
+ Bundled 201 modules in 32ms
7
7
 
8
8
  plugin.js 1.16 MB (entry point)
9
9
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # opencode-swarm-plugin
2
2
 
3
+ ## 0.28.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`90409ef`](https://github.com/joelhooks/swarm-tools/commit/90409ef4f353844b25fe04221bc80d6f930eced2)]:
8
+ - swarm-mail@0.3.4
9
+
10
+ ## 0.28.1
11
+
12
+ ### Patch Changes
13
+
14
+ - [`0ee4f65`](https://github.com/joelhooks/swarm-tools/commit/0ee4f656c2fb2cf62d3ef06d329d9e093d124c33) Thanks [@joelhooks](https://github.com/joelhooks)! - Add postinstall hint and update repo URL
15
+
16
+ - Show "Run swarm setup" hint after npm install
17
+ - Update repo URL to github.com/joelhooks/swarm-tools
18
+ - Add "Get started" commands to version output
19
+
3
20
  ## 0.28.0
4
21
 
5
22
  ### Minor Changes
package/bin/swarm.ts CHANGED
@@ -1966,7 +1966,11 @@ async function version() {
1966
1966
  console.log(dim(" " + TAGLINE));
1967
1967
  console.log();
1968
1968
  console.log(" Version: " + VERSION);
1969
- console.log(" Docs: https://github.com/joelhooks/opencode-swarm-plugin");
1969
+ console.log(" Docs: https://github.com/joelhooks/swarm-tools");
1970
+ console.log();
1971
+ console.log(cyan(" Get started:"));
1972
+ console.log(" swarm setup " + dim("Configure OpenCode integration"));
1973
+ console.log(" swarm doctor " + dim("Check dependencies"));
1970
1974
  console.log();
1971
1975
 
1972
1976
  // Check for updates (non-blocking)
package/dist/hive.d.ts CHANGED
@@ -301,11 +301,11 @@ export declare const hive_sync: {
301
301
  export declare const hive_link_thread: {
302
302
  description: string;
303
303
  args: {
304
- cell_id: z.ZodString;
304
+ bead_id: z.ZodString;
305
305
  thread_id: z.ZodString;
306
306
  };
307
307
  execute(args: {
308
- cell_id: string;
308
+ bead_id: string;
309
309
  thread_id: string;
310
310
  }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
311
311
  };
@@ -461,11 +461,11 @@ export declare const hiveTools: {
461
461
  hive_link_thread: {
462
462
  description: string;
463
463
  args: {
464
- cell_id: z.ZodString;
464
+ bead_id: z.ZodString;
465
465
  thread_id: z.ZodString;
466
466
  };
467
467
  execute(args: {
468
- cell_id: string;
468
+ bead_id: string;
469
469
  thread_id: string;
470
470
  }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
471
471
  };
@@ -648,11 +648,11 @@ export declare const beads_sync: {
648
648
  export declare const beads_link_thread: {
649
649
  description: string;
650
650
  args: {
651
- cell_id: z.ZodString;
651
+ bead_id: z.ZodString;
652
652
  thread_id: z.ZodString;
653
653
  };
654
654
  execute(args: {
655
- cell_id: string;
655
+ bead_id: string;
656
656
  thread_id: string;
657
657
  }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
658
658
  };
@@ -811,11 +811,11 @@ export declare const beadsTools: {
811
811
  beads_link_thread: {
812
812
  description: string;
813
813
  args: {
814
- cell_id: z.ZodString;
814
+ bead_id: z.ZodString;
815
815
  thread_id: z.ZodString;
816
816
  };
817
817
  execute(args: {
818
- cell_id: string;
818
+ bead_id: string;
819
819
  thread_id: string;
820
820
  }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
821
821
  };
package/dist/index.d.ts CHANGED
@@ -1287,11 +1287,11 @@ export declare const allTools: {
1287
1287
  readonly hive_link_thread: {
1288
1288
  description: string;
1289
1289
  args: {
1290
- cell_id: import("zod").ZodString;
1290
+ bead_id: import("zod").ZodString;
1291
1291
  thread_id: import("zod").ZodString;
1292
1292
  };
1293
1293
  execute(args: {
1294
- cell_id: string;
1294
+ bead_id: string;
1295
1295
  thread_id: string;
1296
1296
  }, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
1297
1297
  };
package/dist/index.js CHANGED
@@ -28258,30 +28258,30 @@ var hive_sync = tool({
28258
28258
  var hive_link_thread = tool({
28259
28259
  description: "Add metadata linking cell to Agent Mail thread",
28260
28260
  args: {
28261
- cell_id: tool.schema.string().describe("Cell ID"),
28261
+ bead_id: tool.schema.string().describe("Cell ID"),
28262
28262
  thread_id: tool.schema.string().describe("Agent Mail thread ID")
28263
28263
  },
28264
28264
  async execute(args, ctx) {
28265
28265
  const projectKey = getHiveWorkingDirectory();
28266
28266
  const adapter = await getHiveAdapter(projectKey);
28267
28267
  try {
28268
- const cell = await adapter.getCell(projectKey, args.cell_id);
28268
+ const cell = await adapter.getCell(projectKey, args.bead_id);
28269
28269
  if (!cell) {
28270
- throw new HiveError(`Cell not found: ${args.cell_id}`, "hive_link_thread");
28270
+ throw new HiveError(`Cell not found: ${args.bead_id}`, "hive_link_thread");
28271
28271
  }
28272
28272
  const existingDesc = cell.description || "";
28273
28273
  const threadMarker = `[thread:${args.thread_id}]`;
28274
28274
  if (existingDesc.includes(threadMarker)) {
28275
- return `Cell ${args.cell_id} already linked to thread ${args.thread_id}`;
28275
+ return `Cell ${args.bead_id} already linked to thread ${args.thread_id}`;
28276
28276
  }
28277
28277
  const newDesc = existingDesc ? `${existingDesc}
28278
28278
 
28279
28279
  ${threadMarker}` : threadMarker;
28280
- await adapter.updateCell(projectKey, args.cell_id, {
28280
+ await adapter.updateCell(projectKey, args.bead_id, {
28281
28281
  description: newDesc
28282
28282
  });
28283
- await adapter.markDirty(projectKey, args.cell_id);
28284
- return `Linked cell ${args.cell_id} to thread ${args.thread_id}`;
28283
+ await adapter.markDirty(projectKey, args.bead_id);
28284
+ return `Linked cell ${args.bead_id} to thread ${args.thread_id}`;
28285
28285
  } catch (error45) {
28286
28286
  const message = error45 instanceof Error ? error45.message : String(error45);
28287
28287
  throw new HiveError(`Failed to link thread: ${message}`, "hive_link_thread");
package/dist/plugin.js CHANGED
@@ -28015,30 +28015,30 @@ var hive_sync = tool({
28015
28015
  var hive_link_thread = tool({
28016
28016
  description: "Add metadata linking cell to Agent Mail thread",
28017
28017
  args: {
28018
- cell_id: tool.schema.string().describe("Cell ID"),
28018
+ bead_id: tool.schema.string().describe("Cell ID"),
28019
28019
  thread_id: tool.schema.string().describe("Agent Mail thread ID")
28020
28020
  },
28021
28021
  async execute(args, ctx) {
28022
28022
  const projectKey = getHiveWorkingDirectory();
28023
28023
  const adapter = await getHiveAdapter(projectKey);
28024
28024
  try {
28025
- const cell = await adapter.getCell(projectKey, args.cell_id);
28025
+ const cell = await adapter.getCell(projectKey, args.bead_id);
28026
28026
  if (!cell) {
28027
- throw new HiveError(`Cell not found: ${args.cell_id}`, "hive_link_thread");
28027
+ throw new HiveError(`Cell not found: ${args.bead_id}`, "hive_link_thread");
28028
28028
  }
28029
28029
  const existingDesc = cell.description || "";
28030
28030
  const threadMarker = `[thread:${args.thread_id}]`;
28031
28031
  if (existingDesc.includes(threadMarker)) {
28032
- return `Cell ${args.cell_id} already linked to thread ${args.thread_id}`;
28032
+ return `Cell ${args.bead_id} already linked to thread ${args.thread_id}`;
28033
28033
  }
28034
28034
  const newDesc = existingDesc ? `${existingDesc}
28035
28035
 
28036
28036
  ${threadMarker}` : threadMarker;
28037
- await adapter.updateCell(projectKey, args.cell_id, {
28037
+ await adapter.updateCell(projectKey, args.bead_id, {
28038
28038
  description: newDesc
28039
28039
  });
28040
- await adapter.markDirty(projectKey, args.cell_id);
28041
- return `Linked cell ${args.cell_id} to thread ${args.thread_id}`;
28040
+ await adapter.markDirty(projectKey, args.bead_id);
28041
+ return `Linked cell ${args.bead_id} to thread ${args.thread_id}`;
28042
28042
  } catch (error45) {
28043
28043
  const message = error45 instanceof Error ? error45.message : String(error45);
28044
28044
  throw new HiveError(`Failed to link thread: ${message}`, "hive_link_thread");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm-plugin",
3
- "version": "0.28.0",
3
+ "version": "0.28.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",
@@ -26,14 +26,15 @@
26
26
  "test:all": "bun test --timeout 60000 src/",
27
27
  "test:watch": "bun test --watch src/",
28
28
  "typecheck": "tsc --noEmit",
29
- "publish:pkg": "npm publish --access public --provenance"
29
+ "publish:pkg": "npm publish --access public --provenance",
30
+ "postinstall": "node -e \"console.log('\\n\\x1b[33m Run \\x1b[36mswarm setup\\x1b[33m to configure OpenCode integration\\x1b[0m\\n')\""
30
31
  },
31
32
  "dependencies": {
32
33
  "@clack/prompts": "^0.11.0",
33
34
  "@opencode-ai/plugin": "^1.0.134",
34
35
  "gray-matter": "^4.0.3",
35
36
  "ioredis": "^5.4.1",
36
- "swarm-mail": "0.3.3",
37
+ "swarm-mail": "0.3.4",
37
38
  "zod": "4.1.8"
38
39
  },
39
40
  "devDependencies": {
@@ -65,6 +66,6 @@
65
66
  "license": "MIT",
66
67
  "repository": {
67
68
  "type": "git",
68
- "url": "https://github.com/joelhooks/opencode-swarm-plugin"
69
+ "url": "https://github.com/joelhooks/swarm-tools"
69
70
  }
70
71
  }
@@ -521,7 +521,7 @@ describe("beads integration", () => {
521
521
  it("links a bead to an Agent Mail thread", async () => {
522
522
  const threadId = "test-thread-123";
523
523
  const result = await beads_link_thread.execute(
524
- { cell_id: testBeadId, thread_id: threadId },
524
+ { bead_id: testBeadId, thread_id: threadId },
525
525
  mockContext,
526
526
  );
527
527
 
@@ -540,13 +540,13 @@ describe("beads integration", () => {
540
540
 
541
541
  // Link once
542
542
  await beads_link_thread.execute(
543
- { cell_id: testBeadId, thread_id: threadId },
543
+ { bead_id: testBeadId, thread_id: threadId },
544
544
  mockContext,
545
545
  );
546
546
 
547
547
  // Try to link again
548
548
  const result = await beads_link_thread.execute(
549
- { cell_id: testBeadId, thread_id: threadId },
549
+ { bead_id: testBeadId, thread_id: threadId },
550
550
  mockContext,
551
551
  );
552
552
 
@@ -562,7 +562,7 @@ describe("beads integration", () => {
562
562
 
563
563
  const threadId = "test-thread-789";
564
564
  await beads_link_thread.execute(
565
- { cell_id: testBeadId, thread_id: threadId },
565
+ { bead_id: testBeadId, thread_id: threadId },
566
566
  mockContext,
567
567
  );
568
568
 
@@ -576,7 +576,7 @@ describe("beads integration", () => {
576
576
  it("throws BeadError for invalid bead ID", async () => {
577
577
  await expect(
578
578
  beads_link_thread.execute(
579
- { cell_id: "nonexistent-bead-xyz", thread_id: "thread-123" },
579
+ { bead_id: "nonexistent-bead-xyz", thread_id: "thread-123" },
580
580
  mockContext,
581
581
  ),
582
582
  ).rejects.toThrow(BeadError);
package/src/hive.ts CHANGED
@@ -1094,7 +1094,7 @@ export const hive_sync = tool({
1094
1094
  export const hive_link_thread = tool({
1095
1095
  description: "Add metadata linking cell to Agent Mail thread",
1096
1096
  args: {
1097
- cell_id: tool.schema.string().describe("Cell ID"),
1097
+ bead_id: tool.schema.string().describe("Cell ID"),
1098
1098
  thread_id: tool.schema.string().describe("Agent Mail thread ID"),
1099
1099
  },
1100
1100
  async execute(args, ctx) {
@@ -1102,11 +1102,11 @@ export const hive_link_thread = tool({
1102
1102
  const adapter = await getHiveAdapter(projectKey);
1103
1103
 
1104
1104
  try {
1105
- const cell = await adapter.getCell(projectKey, args.cell_id);
1105
+ const cell = await adapter.getCell(projectKey, args.bead_id);
1106
1106
 
1107
1107
  if (!cell) {
1108
1108
  throw new HiveError(
1109
- `Cell not found: ${args.cell_id}`,
1109
+ `Cell not found: ${args.bead_id}`,
1110
1110
  "hive_link_thread",
1111
1111
  );
1112
1112
  }
@@ -1115,20 +1115,20 @@ export const hive_link_thread = tool({
1115
1115
  const threadMarker = `[thread:${args.thread_id}]`;
1116
1116
 
1117
1117
  if (existingDesc.includes(threadMarker)) {
1118
- return `Cell ${args.cell_id} already linked to thread ${args.thread_id}`;
1118
+ return `Cell ${args.bead_id} already linked to thread ${args.thread_id}`;
1119
1119
  }
1120
1120
 
1121
1121
  const newDesc = existingDesc
1122
1122
  ? `${existingDesc}\n\n${threadMarker}`
1123
1123
  : threadMarker;
1124
1124
 
1125
- await adapter.updateCell(projectKey, args.cell_id, {
1125
+ await adapter.updateCell(projectKey, args.bead_id, {
1126
1126
  description: newDesc,
1127
1127
  });
1128
1128
 
1129
- await adapter.markDirty(projectKey, args.cell_id);
1129
+ await adapter.markDirty(projectKey, args.bead_id);
1130
1130
 
1131
- return `Linked cell ${args.cell_id} to thread ${args.thread_id}`;
1131
+ return `Linked cell ${args.bead_id} to thread ${args.thread_id}`;
1132
1132
  } catch (error) {
1133
1133
  const message = error instanceof Error ? error.message : String(error);
1134
1134
  throw new HiveError(