agent-comms 3.21.0 → 3.22.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.
Files changed (78) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +1 -1
  4. package/dist/bridges/user/web/actions.d.ts +59 -0
  5. package/dist/bridges/user/web/actions.d.ts.map +1 -0
  6. package/dist/bridges/user/web/actions.js +109 -0
  7. package/dist/bridges/user/web/actions.js.map +1 -0
  8. package/dist/bridges/user/web/event-publisher.d.ts +30 -0
  9. package/dist/bridges/user/web/event-publisher.d.ts.map +1 -0
  10. package/dist/bridges/user/web/event-publisher.js +84 -0
  11. package/dist/bridges/user/web/event-publisher.js.map +1 -0
  12. package/dist/bridges/user/web/router.d.ts +696 -0
  13. package/dist/bridges/user/web/router.d.ts.map +1 -0
  14. package/dist/bridges/user/web/router.js +50 -0
  15. package/dist/bridges/user/web/router.js.map +1 -0
  16. package/dist/bridges/user/web/server.d.ts +2 -0
  17. package/dist/bridges/user/web/server.d.ts.map +1 -1
  18. package/dist/bridges/user/web/server.js +94 -114
  19. package/dist/bridges/user/web/server.js.map +1 -1
  20. package/dist/bridges/user/web/test/orpc-router.integration.test.d.ts +7 -0
  21. package/dist/bridges/user/web/test/orpc-router.integration.test.d.ts.map +1 -0
  22. package/dist/bridges/user/web/test/orpc-router.integration.test.js +214 -0
  23. package/dist/bridges/user/web/test/orpc-router.integration.test.js.map +1 -0
  24. package/dist/core/bridge.d.ts +3 -0
  25. package/dist/core/bridge.d.ts.map +1 -1
  26. package/dist/core/bridge.js +14 -0
  27. package/dist/core/bridge.js.map +1 -1
  28. package/dist/core/data-frame-routing.d.ts +14 -0
  29. package/dist/core/data-frame-routing.d.ts.map +1 -0
  30. package/dist/core/data-frame-routing.js +37 -0
  31. package/dist/core/data-frame-routing.js.map +1 -0
  32. package/dist/core/gossip-directory.d.ts +5 -0
  33. package/dist/core/gossip-directory.d.ts.map +1 -1
  34. package/dist/core/gossip-directory.js +7 -0
  35. package/dist/core/gossip-directory.js.map +1 -1
  36. package/dist/core/hub-session.d.ts +5 -1
  37. package/dist/core/hub-session.d.ts.map +1 -1
  38. package/dist/core/hub-session.js +24 -0
  39. package/dist/core/hub-session.js.map +1 -1
  40. package/dist/core/mesh-graph-trace-tool.d.ts +12 -0
  41. package/dist/core/mesh-graph-trace-tool.d.ts.map +1 -0
  42. package/dist/core/mesh-graph-trace-tool.js +60 -0
  43. package/dist/core/mesh-graph-trace-tool.js.map +1 -0
  44. package/dist/core/mesh-graph.d.ts +14 -0
  45. package/dist/core/mesh-graph.d.ts.map +1 -0
  46. package/dist/core/mesh-graph.js +46 -0
  47. package/dist/core/mesh-graph.js.map +1 -0
  48. package/dist/core/mesh-network-actions.d.ts +28 -0
  49. package/dist/core/mesh-network-actions.d.ts.map +1 -0
  50. package/dist/core/mesh-network-actions.js +143 -0
  51. package/dist/core/mesh-network-actions.js.map +1 -0
  52. package/dist/core/mesh-store.d.ts +5 -1
  53. package/dist/core/mesh-store.d.ts.map +1 -1
  54. package/dist/core/mesh-store.js +16 -0
  55. package/dist/core/mesh-store.js.map +1 -1
  56. package/dist/core/tool.d.ts +3 -10
  57. package/dist/core/tool.d.ts.map +1 -1
  58. package/dist/core/tool.js +15 -147
  59. package/dist/core/tool.js.map +1 -1
  60. package/dist/core/transport.d.ts +35 -0
  61. package/dist/core/transport.d.ts.map +1 -1
  62. package/dist/core/types.d.ts +12 -0
  63. package/dist/core/types.d.ts.map +1 -1
  64. package/dist/core/types.js +6 -0
  65. package/dist/core/types.js.map +1 -1
  66. package/dist/core/wire-mesh-transport.d.ts +7 -2
  67. package/dist/core/wire-mesh-transport.d.ts.map +1 -1
  68. package/dist/core/wire-mesh-transport.js +22 -38
  69. package/dist/core/wire-mesh-transport.js.map +1 -1
  70. package/dist/test/mesh-graph-trace-tool.test.d.ts +2 -0
  71. package/dist/test/mesh-graph-trace-tool.test.d.ts.map +1 -0
  72. package/dist/test/mesh-graph-trace-tool.test.js +104 -0
  73. package/dist/test/mesh-graph-trace-tool.test.js.map +1 -0
  74. package/dist/test/mesh-graph-trace.integration.test.d.ts +5 -0
  75. package/dist/test/mesh-graph-trace.integration.test.d.ts.map +1 -0
  76. package/dist/test/mesh-graph-trace.integration.test.js +146 -0
  77. package/dist/test/mesh-graph-trace.integration.test.js.map +1 -0
  78. package/package.json +2 -2
@@ -0,0 +1,696 @@
1
+ /**
2
+ * oRPC router -- implements meshContract against a real ChatController.
3
+ *
4
+ * Every mutating procedure is a one-line passthrough to the plain action functions in actions.ts, the same functions the legacy REST /api/action dispatcher calls, so both paths share one implementation. subscribeEvents is the one genuinely new procedure: it unifies the old chat socket's delivery frames and the old mesh socket's state_sync/state_update methods into a single resumable stream, backed by a per-handle MeshEventPublisher.
5
+ */
6
+ import type { PushManager } from "../../../core/push-manager.js";
7
+ import type { ChatController } from "../controller.js";
8
+ import type { MeshEventPublisher } from "./event-publisher.js";
9
+ export interface MeshRouterContext {
10
+ controller: ChatController;
11
+ publisher: MeshEventPublisher;
12
+ pushManager: PushManager | undefined;
13
+ }
14
+ export declare const meshRouter: {
15
+ send: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
16
+ target: import("zod").ZodString;
17
+ content: import("zod").ZodString;
18
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
19
+ content: import("zod").ZodString;
20
+ isError: import("zod").ZodBoolean;
21
+ }, import("zod/v4/core").$strip>, object>;
22
+ dm: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
23
+ target: import("zod").ZodString;
24
+ content: import("zod").ZodString;
25
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
26
+ content: import("zod").ZodString;
27
+ isError: import("zod").ZodBoolean;
28
+ }, import("zod/v4/core").$strip>, object>;
29
+ joinRoom: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
30
+ room: import("zod").ZodString;
31
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
32
+ content: import("zod").ZodString;
33
+ isError: import("zod").ZodBoolean;
34
+ }, import("zod/v4/core").$strip>, object>;
35
+ leaveRoom: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
36
+ room: import("zod").ZodOptional<import("zod").ZodString>;
37
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
38
+ content: import("zod").ZodString;
39
+ isError: import("zod").ZodBoolean;
40
+ }, import("zod/v4/core").$strip>, object>;
41
+ createRoom: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
42
+ name: import("zod").ZodString;
43
+ type: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"public">, import("zod").ZodLiteral<"private">, import("zod").ZodLiteral<"secret">]>;
44
+ description: import("zod").ZodOptional<import("zod").ZodString>;
45
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
46
+ content: import("zod").ZodString;
47
+ isError: import("zod").ZodBoolean;
48
+ }, import("zod/v4/core").$strip>, object>;
49
+ listRooms: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
50
+ content: import("zod").ZodString;
51
+ isError: import("zod").ZodBoolean;
52
+ }, import("zod/v4/core").$strip>, object>;
53
+ listAgents: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
54
+ content: import("zod").ZodString;
55
+ isError: import("zod").ZodBoolean;
56
+ }, import("zod/v4/core").$strip>, object>;
57
+ readRoom: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
58
+ room: import("zod").ZodOptional<import("zod").ZodString>;
59
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
60
+ content: import("zod").ZodString;
61
+ isError: import("zod").ZodBoolean;
62
+ }, import("zod/v4/core").$strip>, object>;
63
+ destroyRoom: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
64
+ room: import("zod").ZodString;
65
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
66
+ content: import("zod").ZodString;
67
+ isError: import("zod").ZodBoolean;
68
+ }, import("zod/v4/core").$strip>, object>;
69
+ invite: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
70
+ room: import("zod").ZodString;
71
+ agent: import("zod").ZodString;
72
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
73
+ content: import("zod").ZodString;
74
+ isError: import("zod").ZodBoolean;
75
+ }, import("zod/v4/core").$strip>, object>;
76
+ declineInvite: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
77
+ room: import("zod").ZodString;
78
+ reason: import("zod").ZodString;
79
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
80
+ content: import("zod").ZodString;
81
+ isError: import("zod").ZodBoolean;
82
+ }, import("zod/v4/core").$strip>, object>;
83
+ kick: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
84
+ room: import("zod").ZodString;
85
+ agent: import("zod").ZodString;
86
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
87
+ content: import("zod").ZodString;
88
+ isError: import("zod").ZodBoolean;
89
+ }, import("zod/v4/core").$strip>, object>;
90
+ renameAgent: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
91
+ agent: import("zod").ZodString;
92
+ name: import("zod").ZodString;
93
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
94
+ content: import("zod").ZodString;
95
+ isError: import("zod").ZodBoolean;
96
+ }, import("zod/v4/core").$strip>, object>;
97
+ pushSubscribe: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
98
+ subscription: import("zod").ZodObject<{
99
+ endpoint: import("zod").ZodString;
100
+ keys: import("zod").ZodObject<{
101
+ p256dh: import("zod").ZodString;
102
+ auth: import("zod").ZodString;
103
+ }, import("zod/v4/core").$strip>;
104
+ }, import("zod/v4/core").$strip>;
105
+ agentId: import("zod").ZodOptional<import("zod").ZodString>;
106
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
107
+ content: import("zod").ZodString;
108
+ isError: import("zod").ZodBoolean;
109
+ }, import("zod/v4/core").$strip>, object>;
110
+ pushUnsubscribe: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
111
+ agentId: import("zod").ZodOptional<import("zod").ZodString>;
112
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
113
+ content: import("zod").ZodString;
114
+ isError: import("zod").ZodBoolean;
115
+ }, import("zod/v4/core").$strip>, object>;
116
+ subscribeEvents: import("@orpc/server").ImplementedProcedure<MeshRouterContext & object, object, import("zod").ZodObject<{
117
+ lastEventId: import("zod").ZodOptional<import("zod").ZodString>;
118
+ }, import("zod/v4/core").$strip>, import("@orpc/server").Schema<AsyncIteratorObject<{
119
+ kind: "state_sync";
120
+ state: {
121
+ agents: Record<string, {
122
+ id: string;
123
+ version: number;
124
+ name: string;
125
+ harness: string;
126
+ cwd: string;
127
+ pid: number;
128
+ startedAt: string;
129
+ visibility: "visible" | "hidden" | "ghost";
130
+ status: "active" | "idle" | "busy" | "offline";
131
+ tags: string[];
132
+ subscribedRooms: string[];
133
+ }>;
134
+ rooms: Record<string, {
135
+ id: string;
136
+ version: number;
137
+ name: string;
138
+ type: "public" | "private" | "secret";
139
+ owner: string;
140
+ createdAt: string;
141
+ description: string;
142
+ members: string[];
143
+ invited: string[];
144
+ memberJoins: Record<string, number>;
145
+ memberLeaves: Record<string, number>;
146
+ invitedJoins: Record<string, number>;
147
+ invitedLeaves: Record<string, number>;
148
+ }>;
149
+ messages: Record<string, {
150
+ id: string;
151
+ from: string;
152
+ room: string;
153
+ content: string;
154
+ timestamp: string;
155
+ readBy: string[];
156
+ replyTo?: string | undefined;
157
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
158
+ }[]>;
159
+ dms: Record<string, {
160
+ id: string;
161
+ from: string;
162
+ to: string;
163
+ content: string;
164
+ timestamp: string;
165
+ readBy: string[];
166
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
167
+ }[]>;
168
+ };
169
+ } | {
170
+ kind: "state_patch";
171
+ patch: {
172
+ type: "agent_upsert";
173
+ agent: {
174
+ id: string;
175
+ version: number;
176
+ name: string;
177
+ harness: string;
178
+ cwd: string;
179
+ pid: number;
180
+ startedAt: string;
181
+ visibility: "visible" | "hidden" | "ghost";
182
+ status: "active" | "idle" | "busy" | "offline";
183
+ tags: string[];
184
+ subscribedRooms: string[];
185
+ };
186
+ } | {
187
+ type: "agent_offline";
188
+ agentId: string;
189
+ } | {
190
+ type: "room_upsert";
191
+ room: {
192
+ id: string;
193
+ version: number;
194
+ name: string;
195
+ type: "public" | "private" | "secret";
196
+ owner: string;
197
+ createdAt: string;
198
+ description: string;
199
+ members: string[];
200
+ invited: string[];
201
+ memberJoins: Record<string, number>;
202
+ memberLeaves: Record<string, number>;
203
+ invitedJoins: Record<string, number>;
204
+ invitedLeaves: Record<string, number>;
205
+ };
206
+ } | {
207
+ type: "room_delete";
208
+ roomId: string;
209
+ } | {
210
+ type: "message_add";
211
+ roomId: string;
212
+ message: {
213
+ id: string;
214
+ from: string;
215
+ room: string;
216
+ content: string;
217
+ timestamp: string;
218
+ readBy: string[];
219
+ replyTo?: string | undefined;
220
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
221
+ };
222
+ } | {
223
+ type: "dm_add";
224
+ key: string;
225
+ message: {
226
+ id: string;
227
+ from: string;
228
+ to: string;
229
+ content: string;
230
+ timestamp: string;
231
+ readBy: string[];
232
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
233
+ };
234
+ } | {
235
+ type: "delivery";
236
+ agentId: string;
237
+ event: {
238
+ type: "room_message";
239
+ message: {
240
+ id: string;
241
+ from: string;
242
+ room: string;
243
+ content: string;
244
+ timestamp: string;
245
+ readBy: string[];
246
+ replyTo?: string | undefined;
247
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
248
+ };
249
+ } | {
250
+ type: "dm";
251
+ message: {
252
+ id: string;
253
+ from: string;
254
+ to: string;
255
+ content: string;
256
+ timestamp: string;
257
+ readBy: string[];
258
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
259
+ };
260
+ } | {
261
+ type: "room_invite";
262
+ room: string;
263
+ roomDescription: string;
264
+ from: string;
265
+ fromName: string;
266
+ fromCwd: string;
267
+ } | {
268
+ type: "member_joined";
269
+ room: string;
270
+ agent: string;
271
+ } | {
272
+ type: "member_left";
273
+ room: string;
274
+ agent: string;
275
+ } | {
276
+ type: "room_members";
277
+ room: string;
278
+ members: {
279
+ id: string;
280
+ name: string;
281
+ status: "active" | "idle" | "busy" | "offline";
282
+ }[];
283
+ } | {
284
+ type: "member_status";
285
+ room: string;
286
+ agent: string;
287
+ status: "active" | "idle" | "busy" | "offline";
288
+ } | {
289
+ type: "delivery_status";
290
+ messageId: string;
291
+ agent: string;
292
+ status: "delivered" | "read";
293
+ room?: string | undefined;
294
+ } | {
295
+ type: "invite_declined";
296
+ room: string;
297
+ agent: string;
298
+ agentName: string;
299
+ reason: string;
300
+ } | {
301
+ type: "name_changed";
302
+ agent: string;
303
+ oldName: string;
304
+ newName: string;
305
+ } | {
306
+ type: "connection_request";
307
+ connectionId: string;
308
+ peerId: string;
309
+ dataPort: number;
310
+ name: string;
311
+ fingerprint: string;
312
+ } | {
313
+ type: "capability_request";
314
+ requestId: string;
315
+ capability: string;
316
+ scopeKind: string;
317
+ requesterDevice: string;
318
+ scopePath?: string | undefined;
319
+ };
320
+ };
321
+ } | {
322
+ kind: "delivery";
323
+ event: {
324
+ type: "room_message";
325
+ message: {
326
+ id: string;
327
+ from: string;
328
+ room: string;
329
+ content: string;
330
+ timestamp: string;
331
+ readBy: string[];
332
+ replyTo?: string | undefined;
333
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
334
+ };
335
+ } | {
336
+ type: "dm";
337
+ message: {
338
+ id: string;
339
+ from: string;
340
+ to: string;
341
+ content: string;
342
+ timestamp: string;
343
+ readBy: string[];
344
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
345
+ };
346
+ } | {
347
+ type: "room_invite";
348
+ room: string;
349
+ roomDescription: string;
350
+ from: string;
351
+ fromName: string;
352
+ fromCwd: string;
353
+ } | {
354
+ type: "member_joined";
355
+ room: string;
356
+ agent: string;
357
+ } | {
358
+ type: "member_left";
359
+ room: string;
360
+ agent: string;
361
+ } | {
362
+ type: "room_members";
363
+ room: string;
364
+ members: {
365
+ id: string;
366
+ name: string;
367
+ status: "active" | "idle" | "busy" | "offline";
368
+ }[];
369
+ } | {
370
+ type: "member_status";
371
+ room: string;
372
+ agent: string;
373
+ status: "active" | "idle" | "busy" | "offline";
374
+ } | {
375
+ type: "delivery_status";
376
+ messageId: string;
377
+ agent: string;
378
+ status: "delivered" | "read";
379
+ room?: string | undefined;
380
+ } | {
381
+ type: "invite_declined";
382
+ room: string;
383
+ agent: string;
384
+ agentName: string;
385
+ reason: string;
386
+ } | {
387
+ type: "name_changed";
388
+ agent: string;
389
+ oldName: string;
390
+ newName: string;
391
+ } | {
392
+ type: "connection_request";
393
+ connectionId: string;
394
+ peerId: string;
395
+ dataPort: number;
396
+ name: string;
397
+ fingerprint: string;
398
+ } | {
399
+ type: "capability_request";
400
+ requestId: string;
401
+ capability: string;
402
+ scopeKind: string;
403
+ requesterDevice: string;
404
+ scopePath?: string | undefined;
405
+ };
406
+ }, unknown, void>, import("@orpc/server").AsyncIteratorClass<{
407
+ kind: "state_sync";
408
+ state: {
409
+ agents: Record<string, {
410
+ id: string;
411
+ version: number;
412
+ name: string;
413
+ harness: string;
414
+ cwd: string;
415
+ pid: number;
416
+ startedAt: string;
417
+ visibility: "visible" | "hidden" | "ghost";
418
+ status: "active" | "idle" | "busy" | "offline";
419
+ tags: string[];
420
+ subscribedRooms: string[];
421
+ }>;
422
+ rooms: Record<string, {
423
+ id: string;
424
+ version: number;
425
+ name: string;
426
+ type: "public" | "private" | "secret";
427
+ owner: string;
428
+ createdAt: string;
429
+ description: string;
430
+ members: string[];
431
+ invited: string[];
432
+ memberJoins: Record<string, number>;
433
+ memberLeaves: Record<string, number>;
434
+ invitedJoins: Record<string, number>;
435
+ invitedLeaves: Record<string, number>;
436
+ }>;
437
+ messages: Record<string, {
438
+ id: string;
439
+ from: string;
440
+ room: string;
441
+ content: string;
442
+ timestamp: string;
443
+ readBy: string[];
444
+ replyTo?: string | undefined;
445
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
446
+ }[]>;
447
+ dms: Record<string, {
448
+ id: string;
449
+ from: string;
450
+ to: string;
451
+ content: string;
452
+ timestamp: string;
453
+ readBy: string[];
454
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
455
+ }[]>;
456
+ };
457
+ } | {
458
+ kind: "state_patch";
459
+ patch: {
460
+ type: "agent_upsert";
461
+ agent: {
462
+ id: string;
463
+ version: number;
464
+ name: string;
465
+ harness: string;
466
+ cwd: string;
467
+ pid: number;
468
+ startedAt: string;
469
+ visibility: "visible" | "hidden" | "ghost";
470
+ status: "active" | "idle" | "busy" | "offline";
471
+ tags: string[];
472
+ subscribedRooms: string[];
473
+ };
474
+ } | {
475
+ type: "agent_offline";
476
+ agentId: string;
477
+ } | {
478
+ type: "room_upsert";
479
+ room: {
480
+ id: string;
481
+ version: number;
482
+ name: string;
483
+ type: "public" | "private" | "secret";
484
+ owner: string;
485
+ createdAt: string;
486
+ description: string;
487
+ members: string[];
488
+ invited: string[];
489
+ memberJoins: Record<string, number>;
490
+ memberLeaves: Record<string, number>;
491
+ invitedJoins: Record<string, number>;
492
+ invitedLeaves: Record<string, number>;
493
+ };
494
+ } | {
495
+ type: "room_delete";
496
+ roomId: string;
497
+ } | {
498
+ type: "message_add";
499
+ roomId: string;
500
+ message: {
501
+ id: string;
502
+ from: string;
503
+ room: string;
504
+ content: string;
505
+ timestamp: string;
506
+ readBy: string[];
507
+ replyTo?: string | undefined;
508
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
509
+ };
510
+ } | {
511
+ type: "dm_add";
512
+ key: string;
513
+ message: {
514
+ id: string;
515
+ from: string;
516
+ to: string;
517
+ content: string;
518
+ timestamp: string;
519
+ readBy: string[];
520
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
521
+ };
522
+ } | {
523
+ type: "delivery";
524
+ agentId: string;
525
+ event: {
526
+ type: "room_message";
527
+ message: {
528
+ id: string;
529
+ from: string;
530
+ room: string;
531
+ content: string;
532
+ timestamp: string;
533
+ readBy: string[];
534
+ replyTo?: string | undefined;
535
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
536
+ };
537
+ } | {
538
+ type: "dm";
539
+ message: {
540
+ id: string;
541
+ from: string;
542
+ to: string;
543
+ content: string;
544
+ timestamp: string;
545
+ readBy: string[];
546
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
547
+ };
548
+ } | {
549
+ type: "room_invite";
550
+ room: string;
551
+ roomDescription: string;
552
+ from: string;
553
+ fromName: string;
554
+ fromCwd: string;
555
+ } | {
556
+ type: "member_joined";
557
+ room: string;
558
+ agent: string;
559
+ } | {
560
+ type: "member_left";
561
+ room: string;
562
+ agent: string;
563
+ } | {
564
+ type: "room_members";
565
+ room: string;
566
+ members: {
567
+ id: string;
568
+ name: string;
569
+ status: "active" | "idle" | "busy" | "offline";
570
+ }[];
571
+ } | {
572
+ type: "member_status";
573
+ room: string;
574
+ agent: string;
575
+ status: "active" | "idle" | "busy" | "offline";
576
+ } | {
577
+ type: "delivery_status";
578
+ messageId: string;
579
+ agent: string;
580
+ status: "delivered" | "read";
581
+ room?: string | undefined;
582
+ } | {
583
+ type: "invite_declined";
584
+ room: string;
585
+ agent: string;
586
+ agentName: string;
587
+ reason: string;
588
+ } | {
589
+ type: "name_changed";
590
+ agent: string;
591
+ oldName: string;
592
+ newName: string;
593
+ } | {
594
+ type: "connection_request";
595
+ connectionId: string;
596
+ peerId: string;
597
+ dataPort: number;
598
+ name: string;
599
+ fingerprint: string;
600
+ } | {
601
+ type: "capability_request";
602
+ requestId: string;
603
+ capability: string;
604
+ scopeKind: string;
605
+ requesterDevice: string;
606
+ scopePath?: string | undefined;
607
+ };
608
+ };
609
+ } | {
610
+ kind: "delivery";
611
+ event: {
612
+ type: "room_message";
613
+ message: {
614
+ id: string;
615
+ from: string;
616
+ room: string;
617
+ content: string;
618
+ timestamp: string;
619
+ readBy: string[];
620
+ replyTo?: string | undefined;
621
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
622
+ };
623
+ } | {
624
+ type: "dm";
625
+ message: {
626
+ id: string;
627
+ from: string;
628
+ to: string;
629
+ content: string;
630
+ timestamp: string;
631
+ readBy: string[];
632
+ streamingBehavior?: "steer" | "followUp" | "info" | undefined;
633
+ };
634
+ } | {
635
+ type: "room_invite";
636
+ room: string;
637
+ roomDescription: string;
638
+ from: string;
639
+ fromName: string;
640
+ fromCwd: string;
641
+ } | {
642
+ type: "member_joined";
643
+ room: string;
644
+ agent: string;
645
+ } | {
646
+ type: "member_left";
647
+ room: string;
648
+ agent: string;
649
+ } | {
650
+ type: "room_members";
651
+ room: string;
652
+ members: {
653
+ id: string;
654
+ name: string;
655
+ status: "active" | "idle" | "busy" | "offline";
656
+ }[];
657
+ } | {
658
+ type: "member_status";
659
+ room: string;
660
+ agent: string;
661
+ status: "active" | "idle" | "busy" | "offline";
662
+ } | {
663
+ type: "delivery_status";
664
+ messageId: string;
665
+ agent: string;
666
+ status: "delivered" | "read";
667
+ room?: string | undefined;
668
+ } | {
669
+ type: "invite_declined";
670
+ room: string;
671
+ agent: string;
672
+ agentName: string;
673
+ reason: string;
674
+ } | {
675
+ type: "name_changed";
676
+ agent: string;
677
+ oldName: string;
678
+ newName: string;
679
+ } | {
680
+ type: "connection_request";
681
+ connectionId: string;
682
+ peerId: string;
683
+ dataPort: number;
684
+ name: string;
685
+ fingerprint: string;
686
+ } | {
687
+ type: "capability_request";
688
+ requestId: string;
689
+ capability: string;
690
+ scopeKind: string;
691
+ requesterDevice: string;
692
+ scopePath?: string | undefined;
693
+ };
694
+ }, unknown, void>>, object>;
695
+ };
696
+ //# sourceMappingURL=router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../src/bridges/user/web/router.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAoBvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,cAAc,CAAC;IAC3B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;CACtC;AAmBD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFtB,CAAC"}