claude-code-swarm 0.3.8 → 0.3.9

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,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-swarm",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Launch Claude Code with swarmkit capabilities, including team orchestration, MAP observability, and session tracking.",
5
5
  "owner": {
6
6
  "name": "alexngai"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "claude-code-swarm",
3
3
  "description": "Spin up Claude Code agent teams from openteams YAML topologies with optional MAP (Multi-Agent Protocol) observability and coordination. Provides hooks for session lifecycle, agent spawn/complete tracking, and a /swarm skill to launch team configurations.",
4
- "version": "0.3.8",
4
+ "version": "0.3.9",
5
5
  "author": {
6
6
  "name": "alexngai"
7
7
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-swarm",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Claude Code plugin for launching agent teams from openteams topologies with MAP observability",
5
5
  "type": "module",
6
6
  "exports": {
@@ -18,19 +18,16 @@
18
18
  "swarm-generate-agents": "./scripts/generate-agents.mjs"
19
19
  },
20
20
  "dependencies": {
21
+ "@multi-agent-protocol/sdk": "^0.1.4",
21
22
  "agentic-mesh": "^0.2.0",
22
23
  "js-yaml": "^4.1.0"
23
24
  },
24
25
  "peerDependencies": {
25
- "@multi-agent-protocol/sdk": "*",
26
26
  "agent-inbox": "*",
27
27
  "opentasks": "*",
28
28
  "swarmkit": "*"
29
29
  },
30
30
  "peerDependenciesMeta": {
31
- "@multi-agent-protocol/sdk": {
32
- "optional": true
33
- },
34
31
  "agent-inbox": {
35
32
  "optional": true
36
33
  },
@@ -26,6 +26,11 @@
26
26
 
27
27
  import { readConfig, resolveTeamName } from "../src/config.mjs";
28
28
  import { createLogger, init as initLog } from "../src/log.mjs";
29
+ import { configureNodePath } from "../src/swarmkit-resolver.mjs";
30
+
31
+ // Configure NODE_PATH so dynamic imports of globally-installed packages
32
+ // resolve correctly when hooks restart the sidecar or use fire-and-forget.
33
+ configureNodePath();
29
34
 
30
35
  const log = createLogger("map-hook");
31
36
  import { readRoles, matchRole } from "../src/roles.mjs";
@@ -20,12 +20,13 @@
20
20
 
21
21
  import fs from "fs";
22
22
  import path from "path";
23
- import { SOCKET_PATH, PID_PATH, INBOX_SOCKET_PATH, sessionPaths } from "../src/paths.mjs";
23
+ import { SOCKET_PATH, PID_PATH, INBOX_SOCKET_PATH, sessionPaths, pluginDir } from "../src/paths.mjs";
24
24
  import { connectToMAP } from "../src/map-connection.mjs";
25
25
  import { createMeshPeer, createMeshInbox } from "../src/mesh-connection.mjs";
26
26
  import { createSocketServer, createCommandHandler } from "../src/sidecar-server.mjs";
27
27
  import { readConfig } from "../src/config.mjs";
28
28
  import { createLogger, init as initLog } from "../src/log.mjs";
29
+ import { configureNodePath } from "../src/swarmkit-resolver.mjs";
29
30
 
30
31
  const log = createLogger("sidecar");
31
32
 
@@ -49,6 +50,11 @@ const RECONNECT_INTERVAL_MS = parseInt(getArg("reconnect-interval", ""), 10) ||
49
50
  // Auth credential for server-driven auth negotiation (opaque — type determined by server)
50
51
  const AUTH_CREDENTIAL = getArg("credential", "");
51
52
 
53
+ // Configure NODE_PATH so dynamic imports of globally-installed packages
54
+ // (@multi-agent-protocol/sdk, agent-inbox, agentic-mesh) resolve correctly.
55
+ // Must happen before any dynamic import() calls.
56
+ configureNodePath();
57
+
52
58
  // Initialize logger with config + session context (before any log calls)
53
59
  const _logConfig = readConfig().log;
54
60
  initLog({ ..._logConfig, sessionId: SESSION_ID || undefined });
@@ -400,7 +406,7 @@ async function main() {
400
406
  });
401
407
  socketServer = createSocketServer(sPaths.socketPath, (command, client) => {
402
408
  resetInactivityTimer();
403
- commandHandler(command, client);
409
+ return commandHandler(command, client);
404
410
  });
405
411
 
406
412
  // Start inactivity timer