agent-comms 2.1.0 → 2.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.
@@ -15,7 +15,7 @@
15
15
  "url": "https://github.com/ExaDev/agent-comms.git"
16
16
  },
17
17
  "description": "Cross-harness LLM agent communication mesh — rooms, DMs, and presence",
18
- "version": "2.1.0"
18
+ "version": "2.2.0"
19
19
  }
20
20
  ]
21
21
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agent-comms",
3
3
  "description": "Cross-harness LLM agent communication mesh — rooms, DMs, and presence",
4
- "version": "2.1.0",
4
+ "version": "2.2.0",
5
5
  "author": {
6
6
  "name": "ExaDev"
7
7
  },
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![GitHub](https://img.shields.io/badge/GitHub-181717?logo=github&logoColor=white)](https://github.com/ExaDev/agent-comms)
4
4
  [![npm](https://img.shields.io/badge/npm-CB3837?logo=npm&logoColor=white)](https://www.npmjs.com/package/agent-comms)
5
- [![version](https://img.shields.io/badge/version-2.1.0-blue)](https://github.com/ExaDev/agent-comms/releases/tag/v2.1.0)
5
+ [![version](https://img.shields.io/badge/version-2.2.0-blue)](https://github.com/ExaDev/agent-comms/releases/tag/v2.2.0)
6
6
  [![CI](https://img.shields.io/github/actions/workflow/status/ExaDev/agent-comms/ci.yml?branch=main)](https://github.com/ExaDev/agent-comms/actions)
7
7
 
8
8
  Cross-harness communication mesh for LLM agents: rooms, DMs, presence, and visibility over TCP with zero filesystem dependencies.
@@ -0,0 +1,24 @@
1
+ /**
2
+ * core/room's six verifier obligations (spec/room.cddl), layered on top of verifyCapabilityToken (obligations 2, 4, and 5 -- bearer match, ordinary token-claims checks, and delegations-remaining narrowing -- already live there). This module adds the two obligations specific to room-shaped scopes: the chain must terminate at the correct root for the path's own shape (1), and the token's own scope must actually name the room the request claims to act on (3). Obligation 6 (refuse an unrecognised content-type/kind) is a message-handling concern, not a token-verification one, and belongs to the room verb router instead.
3
+ */
4
+ import { type TokenVerdictReason, type VerifyCapabilityTokenOptions } from "wire-mesh-core/domain/tokens";
5
+ import type { CapabilityToken, DeviceId, TokenClaims } from "wire-mesh-core/generated/protocol";
6
+ export type RoomTokenVerdictReason = TokenVerdictReason | "wrong_scope_kind" | "wrong_scope_path" | "wrong_chain_root";
7
+ export type RoomTokenVerdict = {
8
+ ok: true;
9
+ claims: TokenClaims;
10
+ } | {
11
+ ok: false;
12
+ reason: RoomTokenVerdictReason;
13
+ };
14
+ export interface VerifyRoomTokenOptions extends Omit<VerifyCapabilityTokenOptions, "expectedBearer"> {
15
+ /** The peer identity actually authenticated on the arriving connection (obligation 2) -- never a relay-asserted or gossip-derived value. Mandatory here: every room verb requires a bearer, unlike verifyCapabilityToken's own optional field for callers presenting a token to authorise themselves rather than a specific counterparty. */
16
+ expectedBearer: DeviceId;
17
+ /** The room path this request claims to act on (obligation 3) -- must equal the token's own scope.path, and its own shape determines the chain root obligation 1 requires. */
18
+ roomPath: string;
19
+ }
20
+ /**
21
+ * Verifies a `room:member` capability token against all six of core/room's verifier obligations. Delegates obligations 2/4/5 to verifyCapabilityToken directly; adds obligation 3 (scope.kind/scope.path must match the room being acted on) and obligation 1 (the chain's root must be the room's own owner for a named room, or the verifying identity itself for a DM -- never either named participant directly, since a DM token minted by anyone other than the verifier would let a sender self-issue authority to message a stranger unsolicited).
22
+ */
23
+ export declare function verifyRoomToken(token: CapabilityToken, options: VerifyRoomTokenOptions): Promise<RoomTokenVerdict>;
24
+ //# sourceMappingURL=room-token-verification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"room-token-verification.d.ts","sourceRoot":"","sources":["../../src/core/room-token-verification.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EAClC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EACV,eAAe,EACf,QAAQ,EACR,WAAW,EACZ,MAAM,mCAAmC,CAAC;AAG3C,MAAM,MAAM,sBAAsB,GAC9B,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,gBAAgB,GACxB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,GACjC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,sBAAsB,CAAA;CAAE,CAAC;AAElD,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAClD,4BAA4B,EAC5B,gBAAgB,CACjB;IACC,6UAA6U;IAC7U,cAAc,EAAE,QAAQ,CAAC;IACzB,8KAA8K;IAC9K,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,gBAAgB,CAAC,CA4B3B"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * core/room's six verifier obligations (spec/room.cddl), layered on top of verifyCapabilityToken (obligations 2, 4, and 5 -- bearer match, ordinary token-claims checks, and delegations-remaining narrowing -- already live there). This module adds the two obligations specific to room-shaped scopes: the chain must terminate at the correct root for the path's own shape (1), and the token's own scope must actually name the room the request claims to act on (3). Obligation 6 (refuse an unrecognised content-type/kind) is a message-handling concern, not a token-verification one, and belongs to the room verb router instead.
3
+ */
4
+ import { verifyCapabilityToken, } from "wire-mesh-core/domain/tokens";
5
+ import { deviceIdToHex } from "wire-mesh-core/domain/device-id";
6
+ import { parseRoomPath } from "./room-path.js";
7
+ /**
8
+ * Verifies a `room:member` capability token against all six of core/room's verifier obligations. Delegates obligations 2/4/5 to verifyCapabilityToken directly; adds obligation 3 (scope.kind/scope.path must match the room being acted on) and obligation 1 (the chain's root must be the room's own owner for a named room, or the verifying identity itself for a DM -- never either named participant directly, since a DM token minted by anyone other than the verifier would let a sender self-issue authority to message a stranger unsolicited).
9
+ */
10
+ export async function verifyRoomToken(token, options) {
11
+ const verdict = await verifyCapabilityToken(token, {
12
+ identity: options.identity,
13
+ clock: options.clock,
14
+ revocation: options.revocation,
15
+ expectedBearer: options.expectedBearer,
16
+ });
17
+ if (!verdict.ok) {
18
+ return verdict;
19
+ }
20
+ if (verdict.claims.scope.kind !== "room") {
21
+ return { ok: false, reason: "wrong_scope_kind" };
22
+ }
23
+ if (verdict.claims.scope.path !== options.roomPath) {
24
+ return { ok: false, reason: "wrong_scope_path" };
25
+ }
26
+ const parsed = parseRoomPath(options.roomPath);
27
+ const expectedRootHex = parsed.kind === "owner-named"
28
+ ? parsed.owner
29
+ : deviceIdToHex(options.identity.deviceId);
30
+ if (deviceIdToHex(verdict.rootIssuer) !== expectedRootHex) {
31
+ return { ok: false, reason: "wrong_chain_root" };
32
+ }
33
+ return { ok: true, claims: verdict.claims };
34
+ }
35
+ //# sourceMappingURL=room-token-verification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"room-token-verification.js","sourceRoot":"","sources":["../../src/core/room-token-verification.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,qBAAqB,GAGtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAMhE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAsB/C;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,KAAsB,EACtB,OAA+B;IAE/B,MAAM,OAAO,GAAG,MAAM,qBAAqB,CAAC,KAAK,EAAE;QACjD,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,cAAc,EAAE,OAAO,CAAC,cAAc;KACvC,CAAC,CAAC;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QAChB,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QACzC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;IACnD,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC;QACnD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;IACnD,CAAC;IAED,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/C,MAAM,eAAe,GACnB,MAAM,CAAC,IAAI,KAAK,aAAa;QAC3B,CAAC,CAAC,MAAM,CAAC,KAAK;QACd,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC/C,IAAI,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,eAAe,EAAE,CAAC;QAC1D,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;IACnD,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=room-token-verification.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"room-token-verification.test.d.ts","sourceRoot":"","sources":["../../src/test/room-token-verification.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,212 @@
1
+ import { webcrypto } from "node:crypto";
2
+ import { describe, it } from "node:test";
3
+ import assert from "node:assert/strict";
4
+ import { createNodeIdentity } from "wire-mesh-core/adapters/node-identity";
5
+ import { deviceIdToHex } from "wire-mesh-core/domain/device-id";
6
+ import { mintCapabilityToken, mintRevocationEntry, } from "wire-mesh-core/domain/tokens";
7
+ import { createRevocationView } from "wire-mesh-core/domain/revocation-view";
8
+ import { ownerNamedRoomPath, dmRoomPath } from "../core/room-path.js";
9
+ import { verifyRoomToken } from "../core/room-token-verification.js";
10
+ const ES256 = -7;
11
+ const HOUR_MS = 3_600_000;
12
+ function buf(bytes) {
13
+ return Uint8Array.from(bytes);
14
+ }
15
+ async function generateEs256Identity() {
16
+ const keyPair = await webcrypto.subtle.generateKey({ name: "ECDSA", namedCurve: "P-256" }, true, ["sign", "verify"]);
17
+ const publicKeyBytes = new Uint8Array(await webcrypto.subtle.exportKey("raw", keyPair.publicKey));
18
+ return createNodeIdentity(keyPair.privateKey, publicKeyBytes, ES256);
19
+ }
20
+ function fixedClock(atMs) {
21
+ return { now: () => atMs };
22
+ }
23
+ let issuedTokenIds = 0;
24
+ function nextTokenId() {
25
+ issuedTokenIds += 1;
26
+ return buf([issuedTokenIds]);
27
+ }
28
+ const NOW_MS = 1_893_456_000_000;
29
+ const EXPIRES_MS = NOW_MS + HOUR_MS;
30
+ async function mintRoomMemberToken(issuer, bearer, roomPath, tokenId = nextTokenId()) {
31
+ const verdict = await mintCapabilityToken({
32
+ identity: issuer,
33
+ clock: fixedClock(NOW_MS),
34
+ tokenId,
35
+ bearer: bearer.deviceId,
36
+ capability: "room:member",
37
+ scope: { kind: "room", path: roomPath },
38
+ expires: EXPIRES_MS,
39
+ delegationsRemaining: 0,
40
+ });
41
+ if (!verdict.ok)
42
+ throw new Error(`mint failed: ${verdict.reason}`);
43
+ return verdict.token;
44
+ }
45
+ describe("verifyRoomToken", () => {
46
+ it("accepts a token rooted at the named room's own owner", async () => {
47
+ const owner = await generateEs256Identity();
48
+ const member = await generateEs256Identity();
49
+ const roomPath = ownerNamedRoomPath(deviceIdToHex(owner.deviceId), "general");
50
+ const token = await mintRoomMemberToken(owner, member, roomPath);
51
+ const verdict = await verifyRoomToken(token, {
52
+ identity: owner,
53
+ clock: fixedClock(NOW_MS),
54
+ revocation: createRevocationView(),
55
+ expectedBearer: member.deviceId,
56
+ roomPath,
57
+ });
58
+ assert.equal(verdict.ok, true);
59
+ });
60
+ it("refuses a token rooted at the wrong device for a named room", async () => {
61
+ const owner = await generateEs256Identity();
62
+ const impostor = await generateEs256Identity();
63
+ const member = await generateEs256Identity();
64
+ const roomPath = ownerNamedRoomPath(deviceIdToHex(owner.deviceId), "general");
65
+ // Minted by the impostor, not the room's actual owner -- rootIssuer will be the impostor's own device-id, not the path's owner.
66
+ const token = await mintRoomMemberToken(impostor, member, roomPath);
67
+ const verdict = await verifyRoomToken(token, {
68
+ identity: owner,
69
+ clock: fixedClock(NOW_MS),
70
+ revocation: createRevocationView(),
71
+ expectedBearer: member.deviceId,
72
+ roomPath,
73
+ });
74
+ assert.equal(verdict.ok, false);
75
+ if (!verdict.ok)
76
+ assert.equal(verdict.reason, "wrong_chain_root");
77
+ });
78
+ it("accepts a DM token rooted at the verifying identity itself", async () => {
79
+ const me = await generateEs256Identity();
80
+ const them = await generateEs256Identity();
81
+ const roomPath = dmRoomPath(deviceIdToHex(me.deviceId), deviceIdToHex(them.deviceId));
82
+ // I (the verifier) issue the token that lets `them` send to me.
83
+ const token = await mintRoomMemberToken(me, them, roomPath);
84
+ const verdict = await verifyRoomToken(token, {
85
+ identity: me,
86
+ clock: fixedClock(NOW_MS),
87
+ revocation: createRevocationView(),
88
+ expectedBearer: them.deviceId,
89
+ roomPath,
90
+ });
91
+ assert.equal(verdict.ok, true);
92
+ });
93
+ it("refuses a DM token rooted at neither participant nor the verifier", async () => {
94
+ const me = await generateEs256Identity();
95
+ const them = await generateEs256Identity();
96
+ const stranger = await generateEs256Identity();
97
+ const roomPath = dmRoomPath(deviceIdToHex(me.deviceId), deviceIdToHex(them.deviceId));
98
+ // A stranger self-issues a token for this DM path -- must never verify, since the DM path's only acceptable root is the verifier itself.
99
+ const token = await mintRoomMemberToken(stranger, them, roomPath);
100
+ const verdict = await verifyRoomToken(token, {
101
+ identity: me,
102
+ clock: fixedClock(NOW_MS),
103
+ revocation: createRevocationView(),
104
+ expectedBearer: them.deviceId,
105
+ roomPath,
106
+ });
107
+ assert.equal(verdict.ok, false);
108
+ if (!verdict.ok)
109
+ assert.equal(verdict.reason, "wrong_chain_root");
110
+ });
111
+ it("refuses a token scoped to a different room path", async () => {
112
+ const owner = await generateEs256Identity();
113
+ const member = await generateEs256Identity();
114
+ const actualRoomPath = ownerNamedRoomPath(deviceIdToHex(owner.deviceId), "general");
115
+ const otherRoomPath = ownerNamedRoomPath(deviceIdToHex(owner.deviceId), "other-room");
116
+ const token = await mintRoomMemberToken(owner, member, actualRoomPath);
117
+ const verdict = await verifyRoomToken(token, {
118
+ identity: owner,
119
+ clock: fixedClock(NOW_MS),
120
+ revocation: createRevocationView(),
121
+ expectedBearer: member.deviceId,
122
+ roomPath: otherRoomPath,
123
+ });
124
+ assert.equal(verdict.ok, false);
125
+ if (!verdict.ok)
126
+ assert.equal(verdict.reason, "wrong_scope_path");
127
+ });
128
+ it("refuses a token scoped to a non-room capability", async () => {
129
+ const owner = await generateEs256Identity();
130
+ const member = await generateEs256Identity();
131
+ const roomPath = ownerNamedRoomPath(deviceIdToHex(owner.deviceId), "general");
132
+ const verdict1 = await mintCapabilityToken({
133
+ identity: owner,
134
+ clock: fixedClock(NOW_MS),
135
+ tokenId: nextTokenId(),
136
+ bearer: member.deviceId,
137
+ capability: "exec:pty",
138
+ scope: { kind: "folder" },
139
+ expires: EXPIRES_MS,
140
+ });
141
+ if (!verdict1.ok)
142
+ throw new Error(`mint failed: ${verdict1.reason}`);
143
+ const verdict = await verifyRoomToken(verdict1.token, {
144
+ identity: owner,
145
+ clock: fixedClock(NOW_MS),
146
+ revocation: createRevocationView(),
147
+ expectedBearer: member.deviceId,
148
+ roomPath,
149
+ });
150
+ assert.equal(verdict.ok, false);
151
+ if (!verdict.ok)
152
+ assert.equal(verdict.reason, "wrong_scope_kind");
153
+ });
154
+ it("refuses a token bearing a different device than the authenticated connection", async () => {
155
+ const owner = await generateEs256Identity();
156
+ const member = await generateEs256Identity();
157
+ const impostor = await generateEs256Identity();
158
+ const roomPath = ownerNamedRoomPath(deviceIdToHex(owner.deviceId), "general");
159
+ const token = await mintRoomMemberToken(owner, member, roomPath);
160
+ const verdict = await verifyRoomToken(token, {
161
+ identity: owner,
162
+ clock: fixedClock(NOW_MS),
163
+ revocation: createRevocationView(),
164
+ expectedBearer: impostor.deviceId,
165
+ roomPath,
166
+ });
167
+ assert.equal(verdict.ok, false);
168
+ if (!verdict.ok)
169
+ assert.equal(verdict.reason, "bearer_mismatch");
170
+ });
171
+ it("refuses an expired token", async () => {
172
+ const owner = await generateEs256Identity();
173
+ const member = await generateEs256Identity();
174
+ const roomPath = ownerNamedRoomPath(deviceIdToHex(owner.deviceId), "general");
175
+ const token = await mintRoomMemberToken(owner, member, roomPath);
176
+ const verdict = await verifyRoomToken(token, {
177
+ identity: owner,
178
+ clock: fixedClock(EXPIRES_MS + HOUR_MS),
179
+ revocation: createRevocationView(),
180
+ expectedBearer: member.deviceId,
181
+ roomPath,
182
+ });
183
+ assert.equal(verdict.ok, false);
184
+ if (!verdict.ok)
185
+ assert.equal(verdict.reason, "expired");
186
+ });
187
+ it("refuses a revoked token", async () => {
188
+ const owner = await generateEs256Identity();
189
+ const member = await generateEs256Identity();
190
+ const roomPath = ownerNamedRoomPath(deviceIdToHex(owner.deviceId), "general");
191
+ const tokenId = nextTokenId();
192
+ const token = await mintRoomMemberToken(owner, member, roomPath, tokenId);
193
+ const revocation = createRevocationView();
194
+ const entry = await mintRevocationEntry({
195
+ identity: owner,
196
+ tokenId,
197
+ revokedAt: NOW_MS,
198
+ });
199
+ await revocation.record(entry, { identity: owner });
200
+ const verdict = await verifyRoomToken(token, {
201
+ identity: owner,
202
+ clock: fixedClock(NOW_MS),
203
+ revocation,
204
+ expectedBearer: member.deviceId,
205
+ roomPath,
206
+ });
207
+ assert.equal(verdict.ok, false);
208
+ if (!verdict.ok)
209
+ assert.equal(verdict.reason, "revoked");
210
+ });
211
+ });
212
+ //# sourceMappingURL=room-token-verification.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"room-token-verification.test.js","sourceRoot":"","sources":["../../src/test/room-token-verification.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAI7E,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC;AACjB,MAAM,OAAO,GAAG,SAAS,CAAC;AAE1B,SAAS,GAAG,CAAC,KAAqC;IAChD,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC;AAED,KAAK,UAAU,qBAAqB;IAClC,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,WAAW,CAChD,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EACtC,IAAI,EACJ,CAAC,MAAM,EAAE,QAAQ,CAAC,CACnB,CAAC;IACF,MAAM,cAAc,GAAG,IAAI,UAAU,CACnC,MAAM,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,CAC3D,CAAC;IACF,OAAO,kBAAkB,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;AACvE,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B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AM,EAAE,SAAS,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-comms",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Cross-harness communication mesh for LLM agents — rooms, DMs, presence, and real-time push delivery over TCP",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.33.0",
@@ -97,7 +97,7 @@
97
97
  "cbor2": "2.3.0",
98
98
  "preact": "10.29.7",
99
99
  "typebox": "1.3.6",
100
- "wire-mesh-core": "1.0.1",
100
+ "wire-mesh-core": "1.0.2",
101
101
  "ws": "8.21.1",
102
102
  "zod": "4.4.3"
103
103
  },