claude-code-swarm 0.3.20 → 0.3.21

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.20",
3
+ "version": "0.3.21",
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.20",
4
+ "version": "0.3.21",
5
5
  "author": {
6
6
  "name": "alexngai"
7
7
  },
package/CLAUDE.md CHANGED
@@ -398,6 +398,15 @@ Both modes:
398
398
  - Report trajectory checkpoints via `trajectory/checkpoint` (with broadcast fallback)
399
399
  - Self-terminate after 30 minutes of inactivity (session mode)
400
400
 
401
+ **MAP capabilities declared** (in `src/map-connection.mjs`):
402
+ - `messaging: { canSend: true, canReceive: true }` — can exchange MAP scope messages
403
+ - `mail: { canCreate: true, canJoin: true, canViewHistory: true }` — supports agent-inbox conversations (enables Mail chat mode in OpenHive session view)
404
+ - `trajectory: { canReport: true, canServeContent: true }` — reports checkpoints, serves transcript content on demand
405
+ - `tasks: { canCreate, canAssign, canUpdate, canList }` — task management
406
+ - `opentasks: { canQuery, canLink, canAnnotate, canTask }` — conditional, when task_graph configured
407
+
408
+ Message delivery is **pull-based**: the `UserPromptSubmit` hook reads the inbox on each turn and injects messages into Claude Code's prompt context. No real-time push delivery.
409
+
401
410
  The hook helper (`scripts/map-hook.mjs`) includes best-effort auto-recovery: if the sidecar is down, it attempts to restart it, with a fire-and-forget fallback (mesh or direct WebSocket) if recovery fails.
402
411
 
403
412
  ### OpenTasks integration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-swarm",
3
- "version": "0.3.20",
3
+ "version": "0.3.21",
4
4
  "description": "Claude Code plugin for launching agent teams from openteams topologies with MAP observability",
5
5
  "type": "module",
6
6
  "exports": {
@@ -224,6 +224,7 @@ function startSlowReconnectLoop() {
224
224
  systemId: SYSTEM_ID,
225
225
  credential: AUTH_CREDENTIAL || undefined,
226
226
  projectContext: PROJECT_CONTEXT,
227
+ inboxEnabled: !!INBOX_CONFIG || MESH_ENABLED,
227
228
  onMessage: () => resetInactivityTimer(),
228
229
  });
229
230
 
@@ -409,6 +410,7 @@ async function startWebSocketTransport() {
409
410
  systemId: SYSTEM_ID,
410
411
  credential: AUTH_CREDENTIAL || undefined,
411
412
  projectContext: PROJECT_CONTEXT,
413
+ inboxEnabled: !!INBOX_CONFIG || MESH_ENABLED,
412
414
  onMessage: () => {
413
415
  resetInactivityTimer();
414
416
  },
@@ -24,7 +24,7 @@ const log = createLogger("map");
24
24
  * authRequired challenge with the server's preferred method + this credential.
25
25
  * When absent, uses the standard SDK connect() for open mode servers.
26
26
  */
27
- export async function connectToMAP({ server, scope, systemId, onMessage, credential, projectContext }) {
27
+ export async function connectToMAP({ server, scope, systemId, onMessage, credential, projectContext, inboxEnabled }) {
28
28
  try {
29
29
  const mapSdk = await resolvePackage("@multi-agent-protocol/sdk");
30
30
  if (!mapSdk) throw new Error("@multi-agent-protocol/sdk not available");
@@ -38,6 +38,12 @@ export async function connectToMAP({ server, scope, systemId, onMessage, credent
38
38
  role: "sidecar",
39
39
  scopes: [scope],
40
40
  capabilities: {
41
+ // Messaging and mail capabilities are conditional on agent-inbox being available.
42
+ // Without inbox, the sidecar can't receive messages or participate in conversations.
43
+ ...(inboxEnabled ? {
44
+ messaging: { canSend: true, canReceive: true },
45
+ mail: { canCreate: true, canJoin: true, canViewHistory: true },
46
+ } : {}),
41
47
  trajectory: { canReport: true, canServeContent: true },
42
48
  tasks: { canCreate: true, canAssign: true, canUpdate: true, canList: true },
43
49
  ...(projectContext?.task_graph ? {