agent-comms 1.0.14 → 1.2.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.
- package/.claude-plugin/marketplace.json +21 -0
- package/.claude-plugin/plugin.json +21 -0
- package/README.md +83 -22
- package/dist/bridges/claude-code/channel.d.ts +1 -0
- package/dist/bridges/claude-code/channel.d.ts.map +1 -1
- package/dist/bridges/claude-code/channel.js +18 -37
- package/dist/bridges/claude-code/channel.js.map +1 -1
- package/dist/bridges/codex/tool.d.ts +2 -1
- package/dist/bridges/codex/tool.d.ts.map +1 -1
- package/dist/bridges/codex/tool.js +24 -19
- package/dist/bridges/codex/tool.js.map +1 -1
- package/dist/bridges/index.js +2 -2
- package/dist/bridges/index.js.map +1 -1
- package/dist/bridges/mcp/index.d.ts +11 -0
- package/dist/bridges/mcp/index.d.ts.map +1 -0
- package/dist/bridges/mcp/index.js +76 -0
- package/dist/bridges/mcp/index.js.map +1 -0
- package/dist/bridges/opencode/plugin.d.ts +2 -2
- package/dist/bridges/opencode/plugin.d.ts.map +1 -1
- package/dist/bridges/opencode/plugin.js +22 -20
- package/dist/bridges/opencode/plugin.js.map +1 -1
- package/dist/bridges/pi/index.d.ts +2 -2
- package/dist/bridges/pi/index.d.ts.map +1 -1
- package/dist/bridges/pi/index.js +12 -35
- package/dist/bridges/pi/index.js.map +1 -1
- package/dist/cli.js +4 -78
- package/dist/cli.js.map +1 -1
- package/dist/core/bridge.d.ts +7 -7
- package/dist/core/bridge.d.ts.map +1 -1
- package/dist/core/bridge.js +2 -2
- package/dist/core/bridge.js.map +1 -1
- package/dist/core/comms-store.d.ts +48 -0
- package/dist/core/comms-store.d.ts.map +1 -0
- package/dist/core/comms-store.js +11 -0
- package/dist/core/comms-store.js.map +1 -0
- package/dist/core/index.d.ts +6 -4
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +4 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/mesh-store.d.ts +88 -0
- package/dist/core/mesh-store.d.ts.map +1 -0
- package/dist/core/mesh-store.js +790 -0
- package/dist/core/mesh-store.js.map +1 -0
- package/dist/core/store.d.ts +3 -2
- package/dist/core/store.d.ts.map +1 -1
- package/dist/core/store.js +20 -20
- package/dist/core/store.js.map +1 -1
- package/dist/core/tool.d.ts +9 -9
- package/dist/core/tool.d.ts.map +1 -1
- package/dist/core/tool.js +5 -5
- package/dist/core/tool.js.map +1 -1
- package/dist/core/types.d.ts +2 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +2 -2
- package/dist/core/types.js.map +1 -1
- package/dist/test/mesh-e2e.test.d.ts +8 -0
- package/dist/test/mesh-e2e.test.d.ts.map +1 -0
- package/dist/test/mesh-e2e.test.js +126 -0
- package/dist/test/mesh-e2e.test.js.map +1 -0
- package/dist/test/mesh-smoke.test.d.ts +9 -0
- package/dist/test/mesh-smoke.test.d.ts.map +1 -0
- package/dist/test/mesh-smoke.test.js +193 -0
- package/dist/test/mesh-smoke.test.js.map +1 -0
- package/package.json +17 -4
- package/dist/bridges/codex/stop_hook.d.ts +0 -13
- package/dist/bridges/codex/stop_hook.d.ts.map +0 -1
- package/dist/bridges/codex/stop_hook.js +0 -113
- package/dist/bridges/codex/stop_hook.js.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-comms",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "ExaDev"
|
|
5
|
+
},
|
|
6
|
+
"metadata": {
|
|
7
|
+
"description": "Cross-harness communication bus for LLM agents",
|
|
8
|
+
"homepage": "https://github.com/ExaDev/agent-comms#readme"
|
|
9
|
+
},
|
|
10
|
+
"plugins": [
|
|
11
|
+
{
|
|
12
|
+
"name": "agent-comms",
|
|
13
|
+
"source": {
|
|
14
|
+
"source": "url",
|
|
15
|
+
"url": "https://github.com/ExaDev/agent-comms.git"
|
|
16
|
+
},
|
|
17
|
+
"description": "Cross-harness LLM agent communication bus — rooms, DMs, and presence",
|
|
18
|
+
"version": "1.1.0"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-comms",
|
|
3
|
+
"description": "Cross-harness LLM agent communication bus — rooms, DMs, and presence",
|
|
4
|
+
"version": "1.2.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "ExaDev"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/ExaDev/agent-comms#readme",
|
|
9
|
+
"repository": "https://github.com/ExaDev/agent-comms",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"mcpServers": {
|
|
12
|
+
"agent-comms": {
|
|
13
|
+
"command": "npx",
|
|
14
|
+
"args": [
|
|
15
|
+
"agent-comms",
|
|
16
|
+
"bridge",
|
|
17
|
+
"claude-code"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
package/README.md
CHANGED
|
@@ -1,23 +1,76 @@
|
|
|
1
1
|
# Agent Comms
|
|
2
2
|
|
|
3
|
-
Cross-harness communication bus for LLM agents. Rooms, DMs, presence, and visibility —
|
|
3
|
+
Cross-harness communication bus for LLM agents. Rooms, DMs, presence, and visibility — via a TCP peer mesh with zero filesystem dependencies.
|
|
4
4
|
|
|
5
5
|
## How it works
|
|
6
6
|
|
|
7
|
+
Each bridge instance is a peer in a TCP mesh on localhost. The first instance to start becomes the **coordinator** (port 19876). Subsequent instances connect to the coordinator, receive the peer list, and establish direct data connections with every other peer.
|
|
8
|
+
|
|
7
9
|
```
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
│
|
|
11
|
-
│
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
Agent A (pi) Agent B (Claude Code)
|
|
11
|
+
│ │
|
|
12
|
+
│ pi bridge ◀──TCP localhost──▶ Claude bridge
|
|
13
|
+
│ │ │
|
|
14
|
+
│ agent_comms( channel notification
|
|
15
|
+
│ "send", │
|
|
16
|
+
│ ... Claude surfaces it
|
|
17
|
+
│ ) to the LLM
|
|
18
|
+
│ │
|
|
19
|
+
│ push to B's bridge ───────────▶ handled
|
|
15
20
|
```
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
All state is held in memory and synchronised between peers. Delivery events are pushed directly over TCP — no polling, no filesystem, no daemon process.
|
|
23
|
+
|
|
24
|
+
### Coordinator pattern
|
|
25
|
+
|
|
26
|
+
- **Well-known port** 19876 on localhost — the only agreed-upon constant
|
|
27
|
+
- The first instance to bind it becomes coordinator
|
|
28
|
+
- Coordinator handles introductions only — not a router
|
|
29
|
+
- On graceful shutdown, coordinator hands over to the longest-running peer
|
|
30
|
+
- On crash, remaining peers race to bind the port (~100ms recovery)
|
|
31
|
+
|
|
32
|
+
### Identity
|
|
33
|
+
|
|
34
|
+
Each instance gets a unique peer ID on startup. Mesh state is in-memory — when a process exits, its peer is gone. Identity is not persisted because the mesh state dies with the process.
|
|
18
35
|
|
|
19
36
|
## Install
|
|
20
37
|
|
|
38
|
+
### pi
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pi install npm:agent-comms
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The [`pi` manifest](/package.json) registers the extension automatically.
|
|
45
|
+
|
|
46
|
+
### Claude Code
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
claude plugin marketplace add https://github.com/ExaDev/agent-comms
|
|
50
|
+
claude plugin install agent-comms@agent-comms
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
This repo serves as its own marketplace. The [plugin manifest](/.claude-plugin/plugin.json) defines the MCP server.
|
|
54
|
+
|
|
55
|
+
### Any MCP-compatible harness
|
|
56
|
+
|
|
57
|
+
Add to your MCP server configuration:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"mcpServers": {
|
|
62
|
+
"agent-comms": {
|
|
63
|
+
"command": "npx",
|
|
64
|
+
"args": ["agent-comms", "bridge", "mcp"]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The generic MCP bridge works with any MCP client. Incoming messages are included in every tool response.
|
|
71
|
+
|
|
72
|
+
### Other harnesses
|
|
73
|
+
|
|
21
74
|
```bash
|
|
22
75
|
npx agent-comms # auto-detect harnesses and configure
|
|
23
76
|
npx agent-comms status # check current configuration
|
|
@@ -50,21 +103,30 @@ A bridge is two things:
|
|
|
50
103
|
Core provides shared helpers so each bridge only implements those two things:
|
|
51
104
|
|
|
52
105
|
```typescript
|
|
53
|
-
import {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
106
|
+
import {
|
|
107
|
+
MeshStore,
|
|
108
|
+
CommsTool,
|
|
109
|
+
buildAction,
|
|
110
|
+
ensureRegistered,
|
|
111
|
+
formatDeliveryEvent,
|
|
112
|
+
} from "agent-comms";
|
|
113
|
+
|
|
114
|
+
const store = new MeshStore();
|
|
115
|
+
const tool = new CommsTool(store);
|
|
116
|
+
|
|
117
|
+
// 1. Initialise mesh and register identity
|
|
118
|
+
await store.init();
|
|
59
119
|
const { agentId } = await ensureRegistered({ store, harness: "my-harness", defaultName: "my-agent" });
|
|
60
120
|
|
|
61
|
-
// 2. Wire
|
|
62
|
-
|
|
63
|
-
const
|
|
121
|
+
// 2. Wire delivery callback for real-time push
|
|
122
|
+
store.onDelivery = (_targetId, event) => {
|
|
123
|
+
const line = formatDeliveryEvent(event);
|
|
124
|
+
yourHarness.push(`📬 ${line}`);
|
|
125
|
+
};
|
|
64
126
|
|
|
65
|
-
// 3.
|
|
66
|
-
const
|
|
67
|
-
|
|
127
|
+
// 3. Wire tool into your harness
|
|
128
|
+
const action = buildAction(paramsFromToolCall);
|
|
129
|
+
const result = await tool.handle({ agentId, harness: "my-harness", cwd: process.cwd(), pid: process.pid }, action);
|
|
68
130
|
```
|
|
69
131
|
|
|
70
132
|
See `src/bridges/` for working examples.
|
|
@@ -112,4 +174,3 @@ agent_comms({ action: "update", visibility: "hidden" })
|
|
|
112
174
|
| `visible` | ✓ | ✓ | ✓ |
|
|
113
175
|
| `hidden` | ✗ | ✓ (if ID known) | Members only |
|
|
114
176
|
| `ghost` | ✗ | ✗ | ✗ |
|
|
115
|
-
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* MCP channel server that provides the "agent_comms" tool and pushes
|
|
5
5
|
* incoming messages into Claude's context via <channel> events.
|
|
6
|
+
* Uses TCP mesh for real-time delivery — no filesystem polling.
|
|
6
7
|
*
|
|
7
8
|
* Run via: npx agent-comms bridge claude-code
|
|
8
9
|
* Requires: claude --dangerously-load-development-channels
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../src/bridges/claude-code/channel.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../src/bridges/claude-code/channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAmBH,wBAAsB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAuFzC"}
|
|
@@ -3,50 +3,35 @@
|
|
|
3
3
|
*
|
|
4
4
|
* MCP channel server that provides the "agent_comms" tool and pushes
|
|
5
5
|
* incoming messages into Claude's context via <channel> events.
|
|
6
|
+
* Uses TCP mesh for real-time delivery — no filesystem polling.
|
|
6
7
|
*
|
|
7
8
|
* Run via: npx agent-comms bridge claude-code
|
|
8
9
|
* Requires: claude --dangerously-load-development-channels
|
|
9
10
|
*/
|
|
10
11
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
11
12
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
12
|
-
import
|
|
13
|
-
import * as os from "node:os";
|
|
14
|
-
import { BusStore, BusTool, buildAction, ensureRegistered, drainAndFormat, MCP_TOOL_PARAMS, } from "../../core/index.js";
|
|
13
|
+
import { MeshStore, CommsTool, buildAction, ensureRegistered, formatDeliveryEvent, MCP_TOOL_PARAMS, } from "../../core/index.js";
|
|
15
14
|
import { nanoid } from "../../core/nanoid.js";
|
|
16
15
|
function isRecord(value) {
|
|
17
16
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18
17
|
}
|
|
19
18
|
export async function run() {
|
|
20
|
-
const store = new
|
|
21
|
-
const tool = new
|
|
19
|
+
const store = new MeshStore();
|
|
20
|
+
const tool = new CommsTool(store);
|
|
22
21
|
let agentId;
|
|
23
|
-
let watchTimer;
|
|
24
22
|
const mcp = new McpServer({ name: "agent-comms", version: "0.2.0" }, {
|
|
25
23
|
capabilities: {
|
|
26
24
|
experimental: { "claude/channel": {} },
|
|
27
25
|
},
|
|
28
26
|
});
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, 2000);
|
|
38
|
-
}
|
|
39
|
-
async function pollDelivery() {
|
|
40
|
-
if (!agentId)
|
|
41
|
-
return;
|
|
42
|
-
const lines = await drainAndFormat(store, agentId);
|
|
43
|
-
for (const line of lines) {
|
|
44
|
-
await mcp.server.notification({
|
|
45
|
-
method: "notifications/claude/channel",
|
|
46
|
-
params: { content: line, meta: {} },
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
}
|
|
27
|
+
// Incoming messages arrive via TCP mesh — push as channel notifications
|
|
28
|
+
store.onDelivery = async (_targetId, event) => {
|
|
29
|
+
const line = formatDeliveryEvent(event);
|
|
30
|
+
await mcp.server.notification({
|
|
31
|
+
method: "notifications/claude/channel",
|
|
32
|
+
params: { content: line, meta: {} },
|
|
33
|
+
});
|
|
34
|
+
};
|
|
50
35
|
// -----------------------------------------------------------------------
|
|
51
36
|
// Tool registration
|
|
52
37
|
// -----------------------------------------------------------------------
|
|
@@ -61,21 +46,17 @@ export async function run() {
|
|
|
61
46
|
}, async (rawParams) => {
|
|
62
47
|
const params = isRecord(rawParams) ? rawParams : {};
|
|
63
48
|
const actionParam = params.action;
|
|
64
|
-
if (!agentId
|
|
49
|
+
if (!agentId) {
|
|
50
|
+
const name = actionParam === "register" && typeof params.name === "string"
|
|
51
|
+
? params.name
|
|
52
|
+
: `claude-code-${nanoid(4)}`;
|
|
65
53
|
const reg = await ensureRegistered({
|
|
66
54
|
cwd: process.cwd(),
|
|
67
55
|
store,
|
|
68
56
|
harness: "claude-code",
|
|
69
|
-
defaultName:
|
|
57
|
+
defaultName: name,
|
|
70
58
|
});
|
|
71
59
|
agentId = reg.agentId;
|
|
72
|
-
startDeliveryPoll();
|
|
73
|
-
}
|
|
74
|
-
if (!agentId) {
|
|
75
|
-
return {
|
|
76
|
-
content: [{ type: "text", text: "Error: failed to register" }],
|
|
77
|
-
isError: true,
|
|
78
|
-
};
|
|
79
60
|
}
|
|
80
61
|
const action = buildAction(params);
|
|
81
62
|
const result = await tool.handle({
|
|
@@ -92,6 +73,7 @@ export async function run() {
|
|
|
92
73
|
// -----------------------------------------------------------------------
|
|
93
74
|
// Startup
|
|
94
75
|
// -----------------------------------------------------------------------
|
|
76
|
+
await store.init();
|
|
95
77
|
await mcp.connect(new StdioServerTransport());
|
|
96
78
|
const reg = await ensureRegistered({
|
|
97
79
|
cwd: process.cwd(),
|
|
@@ -100,6 +82,5 @@ export async function run() {
|
|
|
100
82
|
defaultName: `claude-code-${nanoid(4)}`,
|
|
101
83
|
});
|
|
102
84
|
agentId = reg.agentId;
|
|
103
|
-
startDeliveryPoll();
|
|
104
85
|
}
|
|
105
86
|
//# sourceMappingURL=channel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../../../src/bridges/claude-code/channel.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../../../src/bridges/claude-code/channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,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E,CAAC;IACnB,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;IAE9C,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC;QACjC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;QAClB,KAAK;QACL,OAAO,EAAE,aAAa;QACtB,WAAW,EAAE,eAAe,MAAM,CAAC,CAAC,CAAC,EAAE;KACxC,CAAC,CAAC;IACH,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;AACxB,CAAC"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Agent Comms — Codex MCP tool server.
|
|
3
3
|
*
|
|
4
4
|
* Provides the "agent_comms" tool for Codex to call.
|
|
5
|
-
*
|
|
5
|
+
* Uses TCP mesh for state sync. Pending messages are drained and
|
|
6
|
+
* appended to every tool response so Codex sees them mid-turn.
|
|
6
7
|
*
|
|
7
8
|
* Run via: npx agent-comms bridge codex
|
|
8
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../../src/bridges/codex/tool.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../../src/bridges/codex/tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmBH,wBAAsB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CA+EzC"}
|
|
@@ -2,22 +2,21 @@
|
|
|
2
2
|
* Agent Comms — Codex MCP tool server.
|
|
3
3
|
*
|
|
4
4
|
* Provides the "agent_comms" tool for Codex to call.
|
|
5
|
-
*
|
|
5
|
+
* Uses TCP mesh for state sync. Pending messages are drained and
|
|
6
|
+
* appended to every tool response so Codex sees them mid-turn.
|
|
6
7
|
*
|
|
7
8
|
* Run via: npx agent-comms bridge codex
|
|
8
9
|
*/
|
|
9
10
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
10
11
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
11
|
-
import
|
|
12
|
-
import * as os from "node:os";
|
|
13
|
-
import { BusStore, BusTool, buildAction, ensureRegistered, MCP_TOOL_PARAMS, } from "../../core/index.js";
|
|
12
|
+
import { MeshStore, CommsTool, buildAction, ensureRegistered, drainAndFormat, MCP_TOOL_PARAMS, } from "../../core/index.js";
|
|
14
13
|
import { nanoid } from "../../core/nanoid.js";
|
|
15
14
|
function isRecord(value) {
|
|
16
15
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
17
16
|
}
|
|
18
17
|
export async function run() {
|
|
19
|
-
const store = new
|
|
20
|
-
const tool = new
|
|
18
|
+
const store = new MeshStore();
|
|
19
|
+
const tool = new CommsTool(store);
|
|
21
20
|
let agentId;
|
|
22
21
|
const mcp = new McpServer({ name: "agent-comms", version: "0.2.0" }, { capabilities: {} });
|
|
23
22
|
// -----------------------------------------------------------------------
|
|
@@ -28,37 +27,43 @@ export async function run() {
|
|
|
28
27
|
"Cross-harness agent communication bus. Actions:",
|
|
29
28
|
"register, update, whoami, create_room, list_rooms, join_room, leave_room,",
|
|
30
29
|
"send, dm, list_agents, read_room, invite, kick, destroy_room.",
|
|
31
|
-
"
|
|
30
|
+
"Pending incoming messages are included in every response.",
|
|
32
31
|
].join(" "),
|
|
33
32
|
inputSchema: MCP_TOOL_PARAMS,
|
|
34
33
|
}, async (rawParams) => {
|
|
35
34
|
const params = isRecord(rawParams) ? rawParams : {};
|
|
36
35
|
const actionParam = params.action;
|
|
37
|
-
if (!agentId
|
|
36
|
+
if (!agentId) {
|
|
37
|
+
const name = actionParam === "register" && typeof params.name === "string"
|
|
38
|
+
? params.name
|
|
39
|
+
: `codex-${nanoid(4)}`;
|
|
38
40
|
const reg = await ensureRegistered({
|
|
39
41
|
cwd: process.cwd(),
|
|
40
42
|
store,
|
|
41
43
|
harness: "codex",
|
|
42
|
-
defaultName:
|
|
44
|
+
defaultName: name,
|
|
43
45
|
});
|
|
44
46
|
agentId = reg.agentId;
|
|
45
47
|
}
|
|
46
|
-
if (!agentId) {
|
|
47
|
-
return {
|
|
48
|
-
content: [{ type: "text", text: "Error: failed to register" }],
|
|
49
|
-
isError: true,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
48
|
const action = buildAction(params);
|
|
53
49
|
const result = await tool.handle({ agentId, harness: "codex", cwd: process.cwd(), pid: process.pid }, action);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
// Drain pending delivery messages and append to response
|
|
51
|
+
const deliveryLines = await drainAndFormat(store, agentId);
|
|
52
|
+
const content = [
|
|
53
|
+
{ type: "text", text: result.content },
|
|
54
|
+
];
|
|
55
|
+
if (deliveryLines.length > 0) {
|
|
56
|
+
content.push({
|
|
57
|
+
type: "text",
|
|
58
|
+
text: "📬 Incoming messages:\n" + deliveryLines.join("\n"),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return { content, isError: result.isError };
|
|
58
62
|
});
|
|
59
63
|
// -----------------------------------------------------------------------
|
|
60
64
|
// Startup
|
|
61
65
|
// -----------------------------------------------------------------------
|
|
66
|
+
await store.init();
|
|
62
67
|
await mcp.connect(new StdioServerTransport());
|
|
63
68
|
const reg = await ensureRegistered({
|
|
64
69
|
cwd: process.cwd(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/bridges/codex/tool.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../../../src/bridges/codex/tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,eAAe,GAChB,MAAM,qBAAqB,CAAC;AA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AE;KAClC,CAAC,CAAC;IACH,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;AACxB,CAAC"}
|
package/dist/bridges/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as claudeCode from "./claude-code/channel.js";
|
|
2
2
|
import * as codex from "./codex/tool.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as mcp from "./mcp/index.js";
|
|
4
4
|
export const bridges = {
|
|
5
5
|
"claude-code": claudeCode,
|
|
6
6
|
codex,
|
|
7
|
-
|
|
7
|
+
mcp,
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bridges/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAC;AACzC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bridges/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAC;AACzC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AAMtC,MAAM,CAAC,MAAM,OAAO,GAA2B;IAC7C,aAAa,EAAE,UAAU;IACzB,KAAK;IACL,GAAG;CACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Comms — generic MCP tool server.
|
|
3
|
+
*
|
|
4
|
+
* Standard MCP server that works with any MCP-compatible harness.
|
|
5
|
+
* Uses TCP mesh for state sync. Pending messages are drained and
|
|
6
|
+
* appended to every tool response so the agent sees them.
|
|
7
|
+
*
|
|
8
|
+
* Run via: npx agent-comms bridge mcp
|
|
9
|
+
*/
|
|
10
|
+
export declare function run(): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bridges/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmBH,wBAAsB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAgFzC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Comms — generic MCP tool server.
|
|
3
|
+
*
|
|
4
|
+
* Standard MCP server that works with any MCP-compatible harness.
|
|
5
|
+
* Uses TCP mesh for state sync. Pending messages are drained and
|
|
6
|
+
* appended to every tool response so the agent sees them.
|
|
7
|
+
*
|
|
8
|
+
* Run via: npx agent-comms bridge mcp
|
|
9
|
+
*/
|
|
10
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
11
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
12
|
+
import { MeshStore, CommsTool, buildAction, ensureRegistered, drainAndFormat, MCP_TOOL_PARAMS, } from "../../core/index.js";
|
|
13
|
+
import { nanoid } from "../../core/nanoid.js";
|
|
14
|
+
function isRecord(value) {
|
|
15
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
16
|
+
}
|
|
17
|
+
export async function run() {
|
|
18
|
+
const store = new MeshStore();
|
|
19
|
+
const tool = new CommsTool(store);
|
|
20
|
+
let agentId;
|
|
21
|
+
const mcp = new McpServer({ name: "agent-comms", version: "1.1.0" }, { capabilities: {} });
|
|
22
|
+
// -----------------------------------------------------------------------
|
|
23
|
+
// Tool registration
|
|
24
|
+
// -----------------------------------------------------------------------
|
|
25
|
+
mcp.registerTool("agent_comms", {
|
|
26
|
+
description: [
|
|
27
|
+
"Cross-harness agent communication bus. Actions:",
|
|
28
|
+
"register, update, whoami, create_room, list_rooms, join_room, leave_room,",
|
|
29
|
+
"send, dm, list_agents, read_room, invite, kick, destroy_room.",
|
|
30
|
+
"Pending incoming messages are included in every response.",
|
|
31
|
+
].join(" "),
|
|
32
|
+
inputSchema: MCP_TOOL_PARAMS,
|
|
33
|
+
}, async (rawParams) => {
|
|
34
|
+
const params = isRecord(rawParams) ? rawParams : {};
|
|
35
|
+
const actionParam = params.action;
|
|
36
|
+
if (!agentId) {
|
|
37
|
+
const name = actionParam === "register" && typeof params.name === "string"
|
|
38
|
+
? params.name
|
|
39
|
+
: `mcp-${nanoid(4)}`;
|
|
40
|
+
const reg = await ensureRegistered({
|
|
41
|
+
cwd: process.cwd(),
|
|
42
|
+
store,
|
|
43
|
+
harness: "mcp",
|
|
44
|
+
defaultName: name,
|
|
45
|
+
});
|
|
46
|
+
agentId = reg.agentId;
|
|
47
|
+
}
|
|
48
|
+
const action = buildAction(params);
|
|
49
|
+
const result = await tool.handle({ agentId, harness: "mcp", cwd: process.cwd(), pid: process.pid }, action);
|
|
50
|
+
// Drain pending delivery messages and append to response
|
|
51
|
+
const deliveryLines = await drainAndFormat(store, agentId);
|
|
52
|
+
const content = [
|
|
53
|
+
{ type: "text", text: result.content },
|
|
54
|
+
];
|
|
55
|
+
if (deliveryLines.length > 0) {
|
|
56
|
+
content.push({
|
|
57
|
+
type: "text",
|
|
58
|
+
text: "📬 Incoming messages:\n" + deliveryLines.join("\n"),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return { content, isError: result.isError };
|
|
62
|
+
});
|
|
63
|
+
// -----------------------------------------------------------------------
|
|
64
|
+
// Startup
|
|
65
|
+
// -----------------------------------------------------------------------
|
|
66
|
+
await store.init();
|
|
67
|
+
await mcp.connect(new StdioServerTransport());
|
|
68
|
+
const reg = await ensureRegistered({
|
|
69
|
+
cwd: process.cwd(),
|
|
70
|
+
store,
|
|
71
|
+
harness: "mcp",
|
|
72
|
+
defaultName: `mcp-${nanoid(4)}`,
|
|
73
|
+
});
|
|
74
|
+
agentId = reg.agentId;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|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C1E,UAAU;IACV,0EAA0E;IAE1E,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;IACnB,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;IAE9C,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC;QACjC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;QAClB,KAAK;QACL,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,OAAO,MAAM,CAAC,CAAC,CAAC,EAAE;KAChC,CAAC,CAAC;IACH,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;AACxB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent Comms — OpenCode plugin bridge.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* tui.prompt.append + tui.submitPrompt.
|
|
4
|
+
* Receives incoming messages via TCP mesh push and injects them
|
|
5
|
+
* into the OpenCode TUI via tui.prompt.append + tui.submitPrompt.
|
|
6
6
|
*
|
|
7
7
|
* Install (project): ln -s ~/Developer/agent-comms/src/bridges/opencode/plugin.ts .opencode/plugins/agent-comms.ts
|
|
8
8
|
* Install (global): ln -s ~/Developer/agent-comms/src/bridges/opencode/plugin.ts ~/.config/opencode/plugins/agent-comms.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/bridges/opencode/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/bridges/opencode/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAiCH,eAAO,MAAM,gBAAgB,GAAU,MAAM;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,CAAC,EAAE,OAAO,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;uBAuC4B;QAAE,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE;EAgBvD,CAAC"}
|