agent-relay 2.0.21 → 2.0.22

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.
Files changed (117) hide show
  1. package/dist/dashboard/out/404.html +1 -1
  2. package/dist/dashboard/out/app/onboarding.html +1 -1
  3. package/dist/dashboard/out/app/onboarding.txt +1 -1
  4. package/dist/dashboard/out/app.html +1 -1
  5. package/dist/dashboard/out/app.txt +1 -1
  6. package/dist/dashboard/out/cloud/link.html +1 -1
  7. package/dist/dashboard/out/cloud/link.txt +1 -1
  8. package/dist/dashboard/out/complete-profile.html +1 -1
  9. package/dist/dashboard/out/complete-profile.txt +1 -1
  10. package/dist/dashboard/out/connect-repos.html +1 -1
  11. package/dist/dashboard/out/connect-repos.txt +1 -1
  12. package/dist/dashboard/out/history.html +1 -1
  13. package/dist/dashboard/out/history.txt +1 -1
  14. package/dist/dashboard/out/index.html +1 -1
  15. package/dist/dashboard/out/index.txt +1 -1
  16. package/dist/dashboard/out/login.html +1 -1
  17. package/dist/dashboard/out/login.txt +1 -1
  18. package/dist/dashboard/out/metrics.html +1 -1
  19. package/dist/dashboard/out/metrics.txt +1 -1
  20. package/dist/dashboard/out/pricing.html +1 -1
  21. package/dist/dashboard/out/pricing.txt +1 -1
  22. package/dist/dashboard/out/providers/setup/claude.html +1 -1
  23. package/dist/dashboard/out/providers/setup/claude.txt +1 -1
  24. package/dist/dashboard/out/providers/setup/codex.html +1 -1
  25. package/dist/dashboard/out/providers/setup/codex.txt +1 -1
  26. package/dist/dashboard/out/providers/setup/cursor.html +1 -1
  27. package/dist/dashboard/out/providers/setup/cursor.txt +1 -1
  28. package/dist/dashboard/out/providers.html +1 -1
  29. package/dist/dashboard/out/providers.txt +1 -1
  30. package/dist/dashboard/out/signup.html +1 -1
  31. package/dist/dashboard/out/signup.txt +1 -1
  32. package/package.json +16 -16
  33. package/packages/api-types/package.json +1 -1
  34. package/packages/bridge/package.json +8 -8
  35. package/packages/cli-tester/package.json +1 -1
  36. package/packages/cloud/package.json +6 -6
  37. package/packages/config/package.json +2 -2
  38. package/packages/continuity/package.json +1 -1
  39. package/packages/daemon/dist/orchestrator.js +2 -0
  40. package/packages/daemon/dist/router.d.ts +5 -0
  41. package/packages/daemon/dist/router.js +31 -0
  42. package/packages/daemon/dist/server.d.ts +5 -0
  43. package/packages/daemon/dist/server.js +131 -1
  44. package/packages/daemon/package.json +12 -12
  45. package/packages/dashboard/package.json +13 -13
  46. package/packages/dashboard/ui-dist/404.html +1 -1
  47. package/packages/dashboard/ui-dist/app/onboarding.html +1 -1
  48. package/packages/dashboard/ui-dist/app/onboarding.txt +1 -1
  49. package/packages/dashboard/ui-dist/app.html +1 -1
  50. package/packages/dashboard/ui-dist/app.txt +1 -1
  51. package/packages/dashboard/ui-dist/cloud/link.html +1 -1
  52. package/packages/dashboard/ui-dist/cloud/link.txt +1 -1
  53. package/packages/dashboard/ui-dist/complete-profile.html +1 -1
  54. package/packages/dashboard/ui-dist/complete-profile.txt +1 -1
  55. package/packages/dashboard/ui-dist/connect-repos.html +1 -1
  56. package/packages/dashboard/ui-dist/connect-repos.txt +1 -1
  57. package/packages/dashboard/ui-dist/history.html +1 -1
  58. package/packages/dashboard/ui-dist/history.txt +1 -1
  59. package/packages/dashboard/ui-dist/index.html +1 -1
  60. package/packages/dashboard/ui-dist/index.txt +1 -1
  61. package/packages/dashboard/ui-dist/login.html +1 -1
  62. package/packages/dashboard/ui-dist/login.txt +1 -1
  63. package/packages/dashboard/ui-dist/metrics.html +1 -1
  64. package/packages/dashboard/ui-dist/metrics.txt +1 -1
  65. package/packages/dashboard/ui-dist/pricing.html +1 -1
  66. package/packages/dashboard/ui-dist/pricing.txt +1 -1
  67. package/packages/dashboard/ui-dist/providers/setup/claude.html +1 -1
  68. package/packages/dashboard/ui-dist/providers/setup/claude.txt +1 -1
  69. package/packages/dashboard/ui-dist/providers/setup/codex.html +1 -1
  70. package/packages/dashboard/ui-dist/providers/setup/codex.txt +1 -1
  71. package/packages/dashboard/ui-dist/providers/setup/cursor.html +1 -1
  72. package/packages/dashboard/ui-dist/providers/setup/cursor.txt +1 -1
  73. package/packages/dashboard/ui-dist/providers.html +1 -1
  74. package/packages/dashboard/ui-dist/providers.txt +1 -1
  75. package/packages/dashboard/ui-dist/signup.html +1 -1
  76. package/packages/dashboard/ui-dist/signup.txt +1 -1
  77. package/packages/dashboard-server/package.json +12 -12
  78. package/packages/hooks/package.json +4 -4
  79. package/packages/mcp/dist/client.d.ts +15 -0
  80. package/packages/mcp/dist/client.js +9 -0
  81. package/packages/mcp/dist/server.js +13 -1
  82. package/packages/mcp/dist/tools/index.d.ts +2 -0
  83. package/packages/mcp/dist/tools/index.js +2 -0
  84. package/packages/mcp/dist/tools/relay-connected.d.ts +17 -0
  85. package/packages/mcp/dist/tools/relay-connected.js +40 -0
  86. package/packages/mcp/dist/tools/relay-remove-agent.d.ts +20 -0
  87. package/packages/mcp/dist/tools/relay-remove-agent.js +50 -0
  88. package/packages/mcp/package.json +2 -2
  89. package/packages/memory/package.json +2 -2
  90. package/packages/policy/package.json +2 -2
  91. package/packages/protocol/dist/types.d.ts +46 -1
  92. package/packages/protocol/package.json +1 -1
  93. package/packages/resiliency/package.json +1 -1
  94. package/packages/sdk/dist/client.d.ts +22 -1
  95. package/packages/sdk/dist/client.js +31 -0
  96. package/packages/sdk/dist/protocol/index.d.ts +1 -1
  97. package/packages/sdk/dist/protocol/types.d.ts +35 -1
  98. package/packages/sdk/package.json +2 -2
  99. package/packages/spawner/package.json +1 -1
  100. package/packages/state/package.json +1 -1
  101. package/packages/storage/dist/adapter.d.ts +4 -0
  102. package/packages/storage/dist/sqlite-adapter.d.ts +10 -0
  103. package/packages/storage/dist/sqlite-adapter.js +26 -0
  104. package/packages/storage/package.json +2 -2
  105. package/packages/telemetry/package.json +1 -1
  106. package/packages/trajectory/package.json +2 -2
  107. package/packages/user-directory/package.json +2 -2
  108. package/packages/utils/package.json +1 -1
  109. package/packages/wrapper/package.json +6 -6
  110. /package/dist/dashboard/out/_next/static/{7MZPqYkVGw3EGzVBkVmY9 → 91mkGYq3qbG8WHE6VytQ8}/_buildManifest.js +0 -0
  111. /package/dist/dashboard/out/_next/static/{7MZPqYkVGw3EGzVBkVmY9 → 91mkGYq3qbG8WHE6VytQ8}/_ssgManifest.js +0 -0
  112. /package/packages/dashboard/ui-dist/_next/static/{7MZPqYkVGw3EGzVBkVmY9 → 91mkGYq3qbG8WHE6VytQ8}/_buildManifest.js +0 -0
  113. /package/packages/dashboard/ui-dist/_next/static/{7MZPqYkVGw3EGzVBkVmY9 → 91mkGYq3qbG8WHE6VytQ8}/_ssgManifest.js +0 -0
  114. /package/packages/dashboard/ui-dist/_next/static/{iJ3Uiz3IrqUJL7IxKZHiV → T2rV14eEU5OweDeV29SvG}/_buildManifest.js +0 -0
  115. /package/packages/dashboard/ui-dist/_next/static/{iJ3Uiz3IrqUJL7IxKZHiV → T2rV14eEU5OweDeV29SvG}/_ssgManifest.js +0 -0
  116. /package/packages/dashboard/ui-dist/_next/static/{l-jd878zUJ_IlraqEWMZc → l8L2OscDSR2vsMIlWcC48}/_buildManifest.js +0 -0
  117. /package/packages/dashboard/ui-dist/_next/static/{l-jd878zUJ_IlraqEWMZc → l8L2OscDSR2vsMIlWcC48}/_ssgManifest.js +0 -0
@@ -5,7 +5,7 @@
5
5
  * These types define the wire protocol for agent-to-agent communication.
6
6
  */
7
7
  export declare const PROTOCOL_VERSION = 1;
8
- export type MessageType = 'HELLO' | 'WELCOME' | 'SEND' | 'DELIVER' | 'ACK' | 'NACK' | 'PING' | 'PONG' | 'ERROR' | 'BUSY' | 'RESUME' | 'BYE' | 'STATE' | 'SYNC' | 'SYNC_SNAPSHOT' | 'SYNC_DELTA' | 'SUBSCRIBE' | 'UNSUBSCRIBE' | 'SHADOW_BIND' | 'SHADOW_UNBIND' | 'LOG' | 'CHANNEL_JOIN' | 'CHANNEL_LEAVE' | 'CHANNEL_MESSAGE' | 'CHANNEL_INFO' | 'CHANNEL_MEMBERS' | 'CHANNEL_TYPING' | 'SPAWN' | 'SPAWN_RESULT' | 'RELEASE' | 'RELEASE_RESULT' | 'STATUS' | 'STATUS_RESPONSE' | 'INBOX' | 'INBOX_RESPONSE' | 'LIST_AGENTS' | 'LIST_AGENTS_RESPONSE' | 'HEALTH' | 'HEALTH_RESPONSE' | 'METRICS' | 'METRICS_RESPONSE';
8
+ export type MessageType = 'HELLO' | 'WELCOME' | 'SEND' | 'DELIVER' | 'ACK' | 'NACK' | 'PING' | 'PONG' | 'ERROR' | 'BUSY' | 'RESUME' | 'BYE' | 'STATE' | 'SYNC' | 'SYNC_SNAPSHOT' | 'SYNC_DELTA' | 'SUBSCRIBE' | 'UNSUBSCRIBE' | 'SHADOW_BIND' | 'SHADOW_UNBIND' | 'LOG' | 'CHANNEL_JOIN' | 'CHANNEL_LEAVE' | 'CHANNEL_MESSAGE' | 'CHANNEL_INFO' | 'CHANNEL_MEMBERS' | 'CHANNEL_TYPING' | 'SPAWN' | 'SPAWN_RESULT' | 'RELEASE' | 'RELEASE_RESULT' | 'STATUS' | 'STATUS_RESPONSE' | 'INBOX' | 'INBOX_RESPONSE' | 'LIST_AGENTS' | 'LIST_AGENTS_RESPONSE' | 'LIST_CONNECTED_AGENTS' | 'LIST_CONNECTED_AGENTS_RESPONSE' | 'REMOVE_AGENT' | 'REMOVE_AGENT_RESPONSE' | 'HEALTH' | 'HEALTH_RESPONSE' | 'METRICS' | 'METRICS_RESPONSE';
9
9
  export type PayloadKind = 'message' | 'action' | 'state' | 'thinking';
10
10
  /**
11
11
  * Base envelope structure for all protocol messages.
@@ -410,6 +410,36 @@ export interface AgentInfo {
410
410
  export interface ListAgentsResponsePayload {
411
411
  agents: AgentInfo[];
412
412
  }
413
+ /**
414
+ * Payload for LIST_CONNECTED_AGENTS request.
415
+ * Returns only currently connected agents (not historical/registered agents).
416
+ */
417
+ export interface ListConnectedAgentsPayload {
418
+ project?: string;
419
+ }
420
+ /**
421
+ * Response payload for LIST_CONNECTED_AGENTS request.
422
+ */
423
+ export interface ListConnectedAgentsResponsePayload {
424
+ agents: AgentInfo[];
425
+ }
426
+ /**
427
+ * Payload for REMOVE_AGENT request.
428
+ * Removes an agent from the registry (sessions, agents.json).
429
+ */
430
+ export interface RemoveAgentPayload {
431
+ name: string;
432
+ /** If true, also removes all messages from/to this agent */
433
+ removeMessages?: boolean;
434
+ }
435
+ /**
436
+ * Response payload for REMOVE_AGENT request.
437
+ */
438
+ export interface RemoveAgentResponsePayload {
439
+ success: boolean;
440
+ removed: boolean;
441
+ message?: string;
442
+ }
413
443
  /**
414
444
  * Payload for HEALTH request.
415
445
  */
@@ -519,6 +549,10 @@ export type InboxEnvelope = Envelope<InboxPayload>;
519
549
  export type InboxResponseEnvelope = Envelope<InboxResponsePayload>;
520
550
  export type ListAgentsEnvelope = Envelope<ListAgentsPayload>;
521
551
  export type ListAgentsResponseEnvelope = Envelope<ListAgentsResponsePayload>;
552
+ export type ListConnectedAgentsEnvelope = Envelope<ListConnectedAgentsPayload>;
553
+ export type ListConnectedAgentsResponseEnvelope = Envelope<ListConnectedAgentsResponsePayload>;
554
+ export type RemoveAgentEnvelope = Envelope<RemoveAgentPayload>;
555
+ export type RemoveAgentResponseEnvelope = Envelope<RemoveAgentResponsePayload>;
522
556
  export type HealthEnvelope = Envelope<HealthPayload>;
523
557
  export type HealthResponseEnvelope = Envelope<HealthResponsePayload>;
524
558
  export type MetricsEnvelope = Envelope<MetricsPayload>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/sdk",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "Lightweight SDK for agent-to-agent communication via Agent Relay",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -55,7 +55,7 @@
55
55
  "access": "public"
56
56
  },
57
57
  "dependencies": {
58
- "@agent-relay/protocol": "2.0.21"
58
+ "@agent-relay/protocol": "2.0.22"
59
59
  },
60
60
  "engines": {
61
61
  "node": ">=18.0.0"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/spawner",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "Agent spawning types and utilities for Agent Relay",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/state",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "Agent state persistence for non-hook CLIs (Codex, Gemini, etc.)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -96,6 +96,10 @@ export interface StorageAdapter {
96
96
  }>>;
97
97
  /** Get channels that an agent is a member of (based on stored membership events) */
98
98
  getChannelMembershipsForAgent?(memberName: string): Promise<string[]>;
99
+ /** Remove an agent from sessions table */
100
+ removeAgent?(agentName: string): Promise<void>;
101
+ /** Remove all messages from/to an agent */
102
+ removeMessagesForAgent?(agentName: string): Promise<void>;
99
103
  }
100
104
  /**
101
105
  * Storage configuration options.
@@ -109,5 +109,15 @@ export declare class SqliteStorageAdapter implements StorageAdapter {
109
109
  * @returns List of channel names where the agent's latest action is not "leave"
110
110
  */
111
111
  getChannelMembershipsForAgent(memberName: string): Promise<string[]>;
112
+ /**
113
+ * Remove an agent from the sessions table.
114
+ * This is used to clean up stale agents from the registry.
115
+ */
116
+ removeAgent(agentName: string): Promise<void>;
117
+ /**
118
+ * Remove all messages from/to an agent.
119
+ * Use with caution - this permanently deletes message history.
120
+ */
121
+ removeMessagesForAgent(agentName: string): Promise<void>;
112
122
  }
113
123
  //# sourceMappingURL=sqlite-adapter.d.ts.map
@@ -750,5 +750,31 @@ export class SqliteStorageAdapter {
750
750
  const rows = stmt.all(memberName);
751
751
  return rows.map(row => row.channel);
752
752
  }
753
+ /**
754
+ * Remove an agent from the sessions table.
755
+ * This is used to clean up stale agents from the registry.
756
+ */
757
+ async removeAgent(agentName) {
758
+ if (!this.db) {
759
+ await this.init();
760
+ }
761
+ const stmt = this.db.prepare(`
762
+ DELETE FROM sessions WHERE agent_name = ?
763
+ `);
764
+ stmt.run(agentName);
765
+ }
766
+ /**
767
+ * Remove all messages from/to an agent.
768
+ * Use with caution - this permanently deletes message history.
769
+ */
770
+ async removeMessagesForAgent(agentName) {
771
+ if (!this.db) {
772
+ await this.init();
773
+ }
774
+ const stmt = this.db.prepare(`
775
+ DELETE FROM messages WHERE sender = ? OR recipient = ?
776
+ `);
777
+ stmt.run(agentName, agentName);
778
+ }
753
779
  }
754
780
  //# sourceMappingURL=sqlite-adapter.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/storage",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "Storage adapters and interfaces for Relay message/session persistence",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -56,7 +56,7 @@
56
56
  }
57
57
  },
58
58
  "dependencies": {
59
- "@agent-relay/protocol": "2.0.21"
59
+ "@agent-relay/protocol": "2.0.22"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/node": "^22.19.3",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/telemetry",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "Anonymous telemetry for Agent Relay usage analytics",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/trajectory",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "Trajectory integration utilities (trail/PDERO) for Relay",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "test:watch": "vitest"
23
23
  },
24
24
  "dependencies": {
25
- "@agent-relay/config": "2.0.21"
25
+ "@agent-relay/config": "2.0.22"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.19.3",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/user-directory",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "User directory service for agent-relay (per-user credential storage)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "test:watch": "vitest"
23
23
  },
24
24
  "dependencies": {
25
- "@agent-relay/resiliency": "2.0.21"
25
+ "@agent-relay/resiliency": "2.0.22"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.19.3",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/utils",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "Shared utilities for agent-relay: logging, name generation, command resolution, update checking",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/wrapper",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "CLI agent wrappers for Agent Relay - tmux, pty integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,11 +30,11 @@
30
30
  "clean": "rm -rf dist"
31
31
  },
32
32
  "dependencies": {
33
- "@agent-relay/api-types": "2.0.21",
34
- "@agent-relay/protocol": "2.0.21",
35
- "@agent-relay/config": "2.0.21",
36
- "@agent-relay/continuity": "2.0.21",
37
- "@agent-relay/resiliency": "2.0.21"
33
+ "@agent-relay/api-types": "2.0.22",
34
+ "@agent-relay/protocol": "2.0.22",
35
+ "@agent-relay/config": "2.0.22",
36
+ "@agent-relay/continuity": "2.0.22",
37
+ "@agent-relay/resiliency": "2.0.22"
38
38
  },
39
39
  "devDependencies": {
40
40
  "typescript": "^5.9.3",