@joe-broadhead/messaging 0.7.1 → 0.9.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 (94) hide show
  1. package/CHANGELOG.md +364 -2
  2. package/dist/bin/messaging-mcp.js +5498 -4338
  3. package/dist/bin/messaging-relay.js +8626 -5540
  4. package/dist/bin/messaging.js +4492 -3158
  5. package/dist/bin/messagingd.js +19672 -12412
  6. package/dist/lib/modules/core/agent/operations.js +19 -327
  7. package/dist/lib/modules/core/agent/present.js +20 -55
  8. package/dist/lib/modules/core/agent-tools.js +35 -139
  9. package/dist/lib/modules/core/consent.js +54 -14
  10. package/dist/lib/modules/core/contact-card.js +3 -3
  11. package/dist/lib/modules/core/conversation/event.js +29 -4
  12. package/dist/lib/modules/core/conversation/guest-invitation.js +42 -0
  13. package/dist/lib/modules/core/conversation/log.js +287 -65
  14. package/dist/lib/modules/core/conversation/request-log.js +158 -0
  15. package/dist/lib/modules/core/conversation/request-seal.js +41 -0
  16. package/dist/lib/modules/core/conversation/requests.js +87 -0
  17. package/dist/lib/modules/core/conversation/seal.js +90 -37
  18. package/dist/lib/modules/core/conversation-agent-tools.js +69 -0
  19. package/dist/lib/modules/core/federation/directory-proof.js +83 -0
  20. package/dist/lib/modules/core/federation/proof-state.js +167 -0
  21. package/dist/lib/modules/core/federation/roster-proof.js +74 -0
  22. package/dist/lib/modules/core/index.js +9 -4
  23. package/dist/lib/modules/core/jelly-host.js +8 -5
  24. package/dist/lib/modules/core/schema/common.js +33 -5
  25. package/dist/lib/modules/core/schema/consent.js +23 -5
  26. package/dist/lib/modules/core/schema/contact-request.js +22 -0
  27. package/dist/lib/modules/core/schema/conv-frames.js +101 -0
  28. package/dist/lib/modules/core/schema/conversation.js +67 -33
  29. package/dist/lib/modules/core/schema/directory-frames.js +8 -3
  30. package/dist/lib/modules/core/schema/envelope.js +8 -24
  31. package/dist/lib/modules/core/schema/errors.js +7 -5
  32. package/dist/lib/modules/core/schema/guest-invitation.js +13 -0
  33. package/dist/lib/modules/core/schema/index.js +5 -0
  34. package/dist/lib/modules/core/schema/ipc/consent.js +97 -18
  35. package/dist/lib/modules/core/schema/ipc/conversation-views.js +87 -0
  36. package/dist/lib/modules/core/schema/ipc/conversations.js +132 -0
  37. package/dist/lib/modules/core/schema/ipc/device.js +9 -0
  38. package/dist/lib/modules/core/schema/ipc/jelly.js +17 -45
  39. package/dist/lib/modules/core/schema/ipc/shapes.js +74 -73
  40. package/dist/lib/modules/core/schema/ipc/surfaces.js +12 -195
  41. package/dist/lib/modules/core/schema/ipc/tasks.js +31 -0
  42. package/dist/lib/modules/core/schema/ipc.js +68 -46
  43. package/dist/lib/modules/core/testing.js +1 -1
  44. package/dist/lib/modules/core/version.js +1 -1
  45. package/dist/lib/modules/ipc/client.js +10 -2
  46. package/dist/lib/modules/ipc/server.js +14 -5
  47. package/dist/lib/modules/ipc/testing.js +13 -23
  48. package/dist/spec/messaging-v1.md +854 -445
  49. package/dist/third-party-notices.md +1 -1
  50. package/dist/third-party.json +1 -1
  51. package/dist/types/core/agent/operations.d.ts +5 -52
  52. package/dist/types/core/agent/present.d.ts +6 -21
  53. package/dist/types/core/agent-tools.d.ts +295 -442
  54. package/dist/types/core/consent.d.ts +30 -7
  55. package/dist/types/core/contact-card.d.ts +3 -3
  56. package/dist/types/core/conversation/event.d.ts +6 -6
  57. package/dist/types/core/conversation/guest-invitation.d.ts +8 -0
  58. package/dist/types/core/conversation/log.d.ts +28 -13
  59. package/dist/types/core/conversation/request-log.d.ts +24 -0
  60. package/dist/types/core/conversation/request-seal.d.ts +6 -0
  61. package/dist/types/core/conversation/requests.d.ts +14 -0
  62. package/dist/types/core/conversation/seal.d.ts +32 -9
  63. package/dist/types/core/conversation-agent-tools.d.ts +939 -0
  64. package/dist/types/core/federation/directory-proof.d.ts +8 -0
  65. package/dist/types/core/federation/proof-state.d.ts +114 -0
  66. package/dist/types/core/federation/roster-proof.d.ts +7 -0
  67. package/dist/types/core/index.d.ts +11 -6
  68. package/dist/types/core/jelly-host.d.ts +1 -1
  69. package/dist/types/core/schema/common.d.ts +33 -6
  70. package/dist/types/core/schema/consent.d.ts +29 -8
  71. package/dist/types/core/schema/contact-request.d.ts +264 -0
  72. package/dist/types/core/schema/conv-frames.d.ts +1204 -0
  73. package/dist/types/core/schema/conversation.d.ts +1410 -264
  74. package/dist/types/core/schema/directory-frames.d.ts +8 -3
  75. package/dist/types/core/schema/envelope.d.ts +85 -130
  76. package/dist/types/core/schema/errors.d.ts +5 -1
  77. package/dist/types/core/schema/guest-invitation.d.ts +51 -0
  78. package/dist/types/core/schema/index.d.ts +5 -0
  79. package/dist/types/core/schema/ipc/consent.d.ts +464 -62
  80. package/dist/types/core/schema/ipc/conversation-views.d.ts +1199 -0
  81. package/dist/types/core/schema/ipc/conversations.d.ts +4355 -0
  82. package/dist/types/core/schema/ipc/device.d.ts +10 -0
  83. package/dist/types/core/schema/ipc/jelly.d.ts +16 -111
  84. package/dist/types/core/schema/ipc/shapes.d.ts +211 -95
  85. package/dist/types/core/schema/ipc/surfaces.d.ts +26 -427
  86. package/dist/types/core/schema/ipc/tasks.d.ts +210 -0
  87. package/dist/types/core/schema/ipc.d.ts +3859 -890
  88. package/dist/types/core/schema/relay.d.ts +12 -4
  89. package/dist/types/core/testing.d.ts +1 -1
  90. package/dist/types/core/version.d.ts +1 -1
  91. package/dist/types/ipc/client.d.ts +4 -1
  92. package/dist/types/ipc/server.d.ts +16 -1
  93. package/dist/types/ipc/testing.d.ts +21 -8
  94. package/package.json +1 -1
@@ -0,0 +1,1204 @@
1
+ /**
2
+ * Conversation frames (spec §7, "Conversation frames"; spec §16): the frames a relay speaks after `hello` to carry
3
+ * conversation logs, in a roster realm and in a directory realm alike. They follow the frame rules of §7: one JSON
4
+ * object per text frame, discriminated by `t`; requests carry `req`, replies echo it, and a refusal is the relay
5
+ * binding's `nack {id: req, code, message}` (with `retryAfterMs` for `rate_limited`). Every frame is strict.
6
+ *
7
+ * conv.append {req, event} → conv.ok {req, cid, seq, hash} an op or a msg, sequenced
8
+ * conv.share {req, events} → conv.shared {req, cid, count} key shares, one recipient each
9
+ * conv.fetch {req, cid, after, limit?, sharesAfter?} → conv.entries {req, cid, head, entries, shares, more}
10
+ * conv.head {req, cids? | after?} → conv.heads {req, heads, more}
11
+ * conv.caps {req, persons} → conv.capabilities {req, outdated, unknown?} who cannot read conversations yet
12
+ * relay → conv.push {cid, entry} | {cid, share} a new entry to the members' online devices; a share to its recipient
13
+ *
14
+ * The relay sequences and filters; members verify everything (spec §16.4, §16.7). It never signs an entry.
15
+ */
16
+ import { z } from "zod";
17
+ /** Appends an op or a msg to its conversation (`event.cid`). The relay answers `conv.ok` once the entry is stored. */
18
+ export declare const ConvAppendFrame: z.ZodObject<{
19
+ t: z.ZodLiteral<"conv.append">;
20
+ req: z.ZodString;
21
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
22
+ class: z.ZodLiteral<"op">;
23
+ body: z.ZodDiscriminatedUnion<[z.ZodObject<{
24
+ op: z.ZodLiteral<"create">;
25
+ kind: z.ZodEnum<{
26
+ self: "self";
27
+ channel: "channel";
28
+ group: "group";
29
+ dm: "dm";
30
+ }>;
31
+ visibility: z.ZodOptional<z.ZodEnum<{
32
+ public: "public";
33
+ private: "private";
34
+ }>>;
35
+ history: z.ZodEnum<{
36
+ none: "none";
37
+ shared: "shared";
38
+ }>;
39
+ retainDays: z.ZodNumber;
40
+ org: z.ZodOptional<z.ZodString>;
41
+ participants: z.ZodArray<z.ZodObject<{
42
+ p: z.ZodString;
43
+ role: z.ZodEnum<{
44
+ admin: "admin";
45
+ member: "member";
46
+ owner: "owner";
47
+ guest: "guest";
48
+ }>;
49
+ device: z.ZodOptional<z.ZodString>;
50
+ respondTo: z.ZodOptional<z.ZodEnum<{
51
+ self: "self";
52
+ none: "none";
53
+ members: "members";
54
+ }>>;
55
+ }, z.core.$strict>>;
56
+ post: z.ZodOptional<z.ZodEnum<{
57
+ admins: "admins";
58
+ all: "all";
59
+ }>>;
60
+ invite: z.ZodOptional<z.ZodEnum<{
61
+ admins: "admins";
62
+ all: "all";
63
+ }>>;
64
+ pins: z.ZodOptional<z.ZodEnum<{
65
+ admins: "admins";
66
+ all: "all";
67
+ }>>;
68
+ sealedMeta: z.ZodOptional<z.ZodString>;
69
+ admission: z.ZodOptional<z.ZodLiteral<"request">>;
70
+ }, z.core.$strict>, z.ZodObject<{
71
+ op: z.ZodLiteral<"add">;
72
+ participants: z.ZodArray<z.ZodObject<{
73
+ p: z.ZodString;
74
+ role: z.ZodEnum<{
75
+ admin: "admin";
76
+ member: "member";
77
+ owner: "owner";
78
+ guest: "guest";
79
+ }>;
80
+ device: z.ZodOptional<z.ZodString>;
81
+ respondTo: z.ZodOptional<z.ZodEnum<{
82
+ self: "self";
83
+ none: "none";
84
+ members: "members";
85
+ }>>;
86
+ }, z.core.$strict>>;
87
+ }, z.core.$strict>, z.ZodObject<{
88
+ op: z.ZodLiteral<"accept">;
89
+ invitation: z.ZodOptional<z.ZodObject<{
90
+ v: z.ZodLiteral<"messaging/1">;
91
+ realm: z.ZodString;
92
+ cid: z.ZodString;
93
+ id: z.ZodString;
94
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
95
+ inviter: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
96
+ by: z.ZodString;
97
+ head: z.ZodObject<{
98
+ seq: z.ZodNumber;
99
+ hash: z.ZodString;
100
+ }, z.core.$strict>;
101
+ issuedAt: z.ZodNumber;
102
+ expiresAt: z.ZodNumber;
103
+ kind: z.ZodEnum<{
104
+ channel: "channel";
105
+ group: "group";
106
+ }>;
107
+ history: z.ZodEnum<{
108
+ none: "none";
109
+ shared: "shared";
110
+ }>;
111
+ agentContext: z.ZodEnum<{
112
+ none: "none";
113
+ members: "members";
114
+ seats: "seats";
115
+ }>;
116
+ bridges: z.ZodEnum<{
117
+ none: "none";
118
+ members: "members";
119
+ admins: "admins";
120
+ }>;
121
+ audience: z.ZodArray<z.ZodObject<{
122
+ p: z.ZodString;
123
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
124
+ role: z.ZodEnum<{
125
+ admin: "admin";
126
+ member: "member";
127
+ owner: "owner";
128
+ guest: "guest";
129
+ }>;
130
+ state: z.ZodEnum<{
131
+ member: "member";
132
+ invited: "invited";
133
+ }>;
134
+ }, z.core.$strict>>;
135
+ sig: z.ZodString;
136
+ }, z.core.$strict>>;
137
+ }, z.core.$strict>, z.ZodObject<{
138
+ op: z.ZodLiteral<"activate">;
139
+ proof: z.ZodUnion<readonly [z.ZodObject<{
140
+ descriptor: z.ZodObject<{
141
+ id: z.ZodString;
142
+ issuedAt: z.ZodNumber;
143
+ expiresAt: z.ZodNumber;
144
+ commitment: z.ZodString;
145
+ by: z.ZodString;
146
+ sig: z.ZodString;
147
+ v: z.ZodLiteral<"messaging/1">;
148
+ realm: z.ZodString;
149
+ cid: z.ZodString;
150
+ from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
151
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
152
+ }, z.core.$strict>;
153
+ decision: z.ZodObject<{
154
+ id: z.ZodString;
155
+ descriptor: z.ZodString;
156
+ answer: z.ZodEnum<{
157
+ accept: "accept";
158
+ decline: "decline";
159
+ }>;
160
+ at: z.ZodNumber;
161
+ by: z.ZodString;
162
+ sig: z.ZodString;
163
+ v: z.ZodLiteral<"messaging/1">;
164
+ realm: z.ZodString;
165
+ cid: z.ZodString;
166
+ from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
167
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
168
+ }, z.core.$strict>;
169
+ }, z.core.$strict>, z.ZodObject<{
170
+ contacts: z.ZodTuple<[z.ZodObject<{
171
+ at: z.ZodNumber;
172
+ by: z.ZodString;
173
+ sig: z.ZodString;
174
+ v: z.ZodLiteral<"messaging/1">;
175
+ realm: z.ZodString;
176
+ cid: z.ZodString;
177
+ from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
178
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
179
+ }, z.core.$strict>, z.ZodObject<{
180
+ at: z.ZodNumber;
181
+ by: z.ZodString;
182
+ sig: z.ZodString;
183
+ v: z.ZodLiteral<"messaging/1">;
184
+ realm: z.ZodString;
185
+ cid: z.ZodString;
186
+ from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
187
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
188
+ }, z.core.$strict>], null>;
189
+ }, z.core.$strict>]>;
190
+ }, z.core.$strict>, z.ZodObject<{
191
+ op: z.ZodLiteral<"request.complete">;
192
+ request: z.ZodString;
193
+ seq: z.ZodNumber;
194
+ digest: z.ZodString;
195
+ }, z.core.$strict>, z.ZodObject<{
196
+ op: z.ZodLiteral<"join">;
197
+ }, z.core.$strict>, z.ZodObject<{
198
+ op: z.ZodLiteral<"leave">;
199
+ }, z.core.$strict>, z.ZodObject<{
200
+ op: z.ZodLiteral<"remove">;
201
+ participants: z.ZodArray<z.ZodString>;
202
+ }, z.core.$strict>, z.ZodObject<{
203
+ op: z.ZodLiteral<"role">;
204
+ p: z.ZodString;
205
+ role: z.ZodEnum<{
206
+ admin: "admin";
207
+ member: "member";
208
+ owner: "owner";
209
+ guest: "guest";
210
+ }>;
211
+ }, z.core.$strict>, z.ZodObject<{
212
+ op: z.ZodLiteral<"seat">;
213
+ p: z.ZodString;
214
+ device: z.ZodOptional<z.ZodString>;
215
+ respondTo: z.ZodOptional<z.ZodEnum<{
216
+ self: "self";
217
+ none: "none";
218
+ members: "members";
219
+ }>>;
220
+ }, z.core.$strict>, z.ZodObject<{
221
+ op: z.ZodLiteral<"settings">;
222
+ visibility: z.ZodOptional<z.ZodEnum<{
223
+ public: "public";
224
+ private: "private";
225
+ }>>;
226
+ history: z.ZodOptional<z.ZodEnum<{
227
+ none: "none";
228
+ shared: "shared";
229
+ }>>;
230
+ retainDays: z.ZodOptional<z.ZodNumber>;
231
+ post: z.ZodOptional<z.ZodEnum<{
232
+ admins: "admins";
233
+ all: "all";
234
+ }>>;
235
+ invite: z.ZodOptional<z.ZodEnum<{
236
+ admins: "admins";
237
+ all: "all";
238
+ }>>;
239
+ pins: z.ZodOptional<z.ZodEnum<{
240
+ admins: "admins";
241
+ all: "all";
242
+ }>>;
243
+ }, z.core.$strict>, z.ZodObject<{
244
+ op: z.ZodLiteral<"archive">;
245
+ on: z.ZodBoolean;
246
+ }, z.core.$strict>, z.ZodObject<{
247
+ op: z.ZodLiteral<"rekey">;
248
+ epoch: z.ZodNumber;
249
+ cause: z.ZodEnum<{
250
+ device: "device";
251
+ removed: "removed";
252
+ added: "added";
253
+ settings: "settings";
254
+ schedule: "schedule";
255
+ }>;
256
+ device: z.ZodOptional<z.ZodString>;
257
+ until: z.ZodOptional<z.ZodNumber>;
258
+ }, z.core.$strict>, z.ZodObject<{
259
+ op: z.ZodLiteral<"policy">;
260
+ agentContext: z.ZodOptional<z.ZodEnum<{
261
+ none: "none";
262
+ members: "members";
263
+ seats: "seats";
264
+ }>>;
265
+ bridges: z.ZodOptional<z.ZodEnum<{
266
+ none: "none";
267
+ members: "members";
268
+ admins: "admins";
269
+ }>>;
270
+ }, z.core.$strict>, z.ZodObject<{
271
+ op: z.ZodLiteral<"meta">;
272
+ epoch: z.ZodNumber;
273
+ idx: z.ZodNumber;
274
+ sealed: z.ZodString;
275
+ }, z.core.$strict>, z.ZodObject<{
276
+ op: z.ZodLiteral<"setting">;
277
+ kind: z.ZodEnum<{
278
+ link: "link";
279
+ prefs: "prefs";
280
+ grant: "grant";
281
+ context: "context";
282
+ localRetention: "localRetention";
283
+ }>;
284
+ epoch: z.ZodNumber;
285
+ idx: z.ZodNumber;
286
+ sealed: z.ZodString;
287
+ }, z.core.$strict>], "op">;
288
+ sig: z.ZodString;
289
+ v: z.ZodLiteral<"messaging/1">;
290
+ realm: z.ZodString;
291
+ cid: z.ZodString;
292
+ id: z.ZodString;
293
+ by: z.ZodObject<{
294
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
295
+ device: z.ZodString;
296
+ agent: z.ZodOptional<z.ZodString>;
297
+ }, z.core.$strict>;
298
+ ts: z.ZodNumber;
299
+ opHead: z.ZodObject<{
300
+ seq: z.ZodNumber;
301
+ hash: z.ZodString;
302
+ }, z.core.$strict>;
303
+ seen: z.ZodOptional<z.ZodObject<{
304
+ seq: z.ZodNumber;
305
+ hash: z.ZodString;
306
+ }, z.core.$strict>>;
307
+ }, z.core.$strict>, z.ZodObject<{
308
+ class: z.ZodLiteral<"msg">;
309
+ epoch: z.ZodNumber;
310
+ idx: z.ZodNumber;
311
+ wake: z.ZodOptional<z.ZodArray<z.ZodString>>;
312
+ request: z.ZodOptional<z.ZodString>;
313
+ body: z.ZodString;
314
+ sig: z.ZodString;
315
+ v: z.ZodLiteral<"messaging/1">;
316
+ realm: z.ZodString;
317
+ cid: z.ZodString;
318
+ id: z.ZodString;
319
+ by: z.ZodObject<{
320
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
321
+ device: z.ZodString;
322
+ agent: z.ZodOptional<z.ZodString>;
323
+ }, z.core.$strict>;
324
+ ts: z.ZodNumber;
325
+ opHead: z.ZodObject<{
326
+ seq: z.ZodNumber;
327
+ hash: z.ZodString;
328
+ }, z.core.$strict>;
329
+ seen: z.ZodOptional<z.ZodObject<{
330
+ seq: z.ZodNumber;
331
+ hash: z.ZodString;
332
+ }, z.core.$strict>>;
333
+ }, z.core.$strict>], "class">;
334
+ }, z.core.$strict>;
335
+ export type ConvAppendFrame = z.infer<typeof ConvAppendFrame>;
336
+ /**
337
+ * Stores key shares (spec §16.6): each event to one recipient device, all of one conversation and by the sending
338
+ * device. All or none are stored; the relay answers `conv.shared` once they are.
339
+ */
340
+ export declare const ConvShareFrame: z.ZodObject<{
341
+ t: z.ZodLiteral<"conv.share">;
342
+ req: z.ZodString;
343
+ events: z.ZodArray<z.ZodObject<{
344
+ class: z.ZodLiteral<"keys">;
345
+ body: z.ZodObject<{
346
+ to: z.ZodObject<{
347
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
348
+ device: z.ZodString;
349
+ }, z.core.$strict>;
350
+ epk: z.ZodString;
351
+ nonce: z.ZodString;
352
+ ct: z.ZodString;
353
+ }, z.core.$strict>;
354
+ sig: z.ZodString;
355
+ v: z.ZodLiteral<"messaging/1">;
356
+ realm: z.ZodString;
357
+ cid: z.ZodString;
358
+ id: z.ZodString;
359
+ by: z.ZodObject<{
360
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
361
+ device: z.ZodString;
362
+ agent: z.ZodOptional<z.ZodString>;
363
+ }, z.core.$strict>;
364
+ ts: z.ZodNumber;
365
+ opHead: z.ZodObject<{
366
+ seq: z.ZodNumber;
367
+ hash: z.ZodString;
368
+ }, z.core.$strict>;
369
+ seen: z.ZodOptional<z.ZodObject<{
370
+ seq: z.ZodNumber;
371
+ hash: z.ZodString;
372
+ }, z.core.$strict>>;
373
+ }, z.core.$strict>>;
374
+ }, z.core.$strict>;
375
+ export type ConvShareFrame = z.infer<typeof ConvShareFrame>;
376
+ /**
377
+ * The entries of `cid` after `after`, in seq order, at most `limit` (and `LIMITS.convFetchEntries`) and as many as
378
+ * fit in a frame. `sharesAfter`: also the shares to this device after that `n`; absent, no shares.
379
+ */
380
+ export declare const ConvFetchFrame: z.ZodObject<{
381
+ t: z.ZodLiteral<"conv.fetch">;
382
+ req: z.ZodString;
383
+ cid: z.ZodString;
384
+ after: z.ZodNumber;
385
+ limit: z.ZodOptional<z.ZodNumber>;
386
+ sharesAfter: z.ZodOptional<z.ZodNumber>;
387
+ }, z.core.$strict>;
388
+ export type ConvFetchFrame = z.infer<typeof ConvFetchFrame>;
389
+ /**
390
+ * The heads of the named conversations, or, without `cids`, of every conversation this device's person takes part in,
391
+ * by cid after `after`, at most `LIMITS.convHeads`.
392
+ */
393
+ export declare const ConvHeadFrame: z.ZodObject<{
394
+ t: z.ZodLiteral<"conv.head">;
395
+ req: z.ZodString;
396
+ cids: z.ZodOptional<z.ZodArray<z.ZodString>>;
397
+ after: z.ZodOptional<z.ZodString>;
398
+ }, z.core.$strict>;
399
+ export type ConvHeadFrame = z.infer<typeof ConvHeadFrame>;
400
+ /**
401
+ * Which of these persons cannot read conversations yet: every current device of theirs whose latest presence the
402
+ * relay holds names no `conversations` feature (a daemon before the cut-over). A person with no such presence is not
403
+ * named. A hint from the relay: it can only make a sender refuse, never admit anything.
404
+ */
405
+ export declare const ConvCapsFrame: z.ZodObject<{
406
+ t: z.ZodLiteral<"conv.caps">;
407
+ req: z.ZodString;
408
+ persons: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
409
+ }, z.core.$strict>;
410
+ export type ConvCapsFrame = z.infer<typeof ConvCapsFrame>;
411
+ /** `conv.append` stored: the entry's seq and h(seq), which the author recomputes. */
412
+ export declare const ConvOkFrame: z.ZodObject<{
413
+ t: z.ZodLiteral<"conv.ok">;
414
+ req: z.ZodString;
415
+ cid: z.ZodString;
416
+ seq: z.ZodNumber;
417
+ hash: z.ZodString;
418
+ }, z.core.$strict>;
419
+ export type ConvOkFrame = z.infer<typeof ConvOkFrame>;
420
+ /** `conv.share` stored: how many shares. */
421
+ export declare const ConvSharedFrame: z.ZodObject<{
422
+ t: z.ZodLiteral<"conv.shared">;
423
+ req: z.ZodString;
424
+ cid: z.ZodString;
425
+ count: z.ZodNumber;
426
+ }, z.core.$strict>;
427
+ export type ConvSharedFrame = z.infer<typeof ConvSharedFrame>;
428
+ /**
429
+ * `conv.fetch`'s answer: the relay's head, the entries (an expired `msg` as its digest, `ConvExpiredEntry`) and this
430
+ * device's shares. `more`: ask again after the last entry (and the last share).
431
+ */
432
+ export declare const ConvEntriesFrame: z.ZodObject<{
433
+ t: z.ZodLiteral<"conv.entries">;
434
+ req: z.ZodString;
435
+ cid: z.ZodString;
436
+ head: z.ZodObject<{
437
+ seq: z.ZodNumber;
438
+ hash: z.ZodString;
439
+ }, z.core.$strict>;
440
+ entries: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
441
+ seq: z.ZodNumber;
442
+ prev: z.ZodString;
443
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
444
+ class: z.ZodLiteral<"op">;
445
+ body: z.ZodDiscriminatedUnion<[z.ZodObject<{
446
+ op: z.ZodLiteral<"create">;
447
+ kind: z.ZodEnum<{
448
+ self: "self";
449
+ channel: "channel";
450
+ group: "group";
451
+ dm: "dm";
452
+ }>;
453
+ visibility: z.ZodOptional<z.ZodEnum<{
454
+ public: "public";
455
+ private: "private";
456
+ }>>;
457
+ history: z.ZodEnum<{
458
+ none: "none";
459
+ shared: "shared";
460
+ }>;
461
+ retainDays: z.ZodNumber;
462
+ org: z.ZodOptional<z.ZodString>;
463
+ participants: z.ZodArray<z.ZodObject<{
464
+ p: z.ZodString;
465
+ role: z.ZodEnum<{
466
+ admin: "admin";
467
+ member: "member";
468
+ owner: "owner";
469
+ guest: "guest";
470
+ }>;
471
+ device: z.ZodOptional<z.ZodString>;
472
+ respondTo: z.ZodOptional<z.ZodEnum<{
473
+ self: "self";
474
+ none: "none";
475
+ members: "members";
476
+ }>>;
477
+ }, z.core.$strict>>;
478
+ post: z.ZodOptional<z.ZodEnum<{
479
+ admins: "admins";
480
+ all: "all";
481
+ }>>;
482
+ invite: z.ZodOptional<z.ZodEnum<{
483
+ admins: "admins";
484
+ all: "all";
485
+ }>>;
486
+ pins: z.ZodOptional<z.ZodEnum<{
487
+ admins: "admins";
488
+ all: "all";
489
+ }>>;
490
+ sealedMeta: z.ZodOptional<z.ZodString>;
491
+ admission: z.ZodOptional<z.ZodLiteral<"request">>;
492
+ }, z.core.$strict>, z.ZodObject<{
493
+ op: z.ZodLiteral<"add">;
494
+ participants: z.ZodArray<z.ZodObject<{
495
+ p: z.ZodString;
496
+ role: z.ZodEnum<{
497
+ admin: "admin";
498
+ member: "member";
499
+ owner: "owner";
500
+ guest: "guest";
501
+ }>;
502
+ device: z.ZodOptional<z.ZodString>;
503
+ respondTo: z.ZodOptional<z.ZodEnum<{
504
+ self: "self";
505
+ none: "none";
506
+ members: "members";
507
+ }>>;
508
+ }, z.core.$strict>>;
509
+ }, z.core.$strict>, z.ZodObject<{
510
+ op: z.ZodLiteral<"accept">;
511
+ invitation: z.ZodOptional<z.ZodObject<{
512
+ v: z.ZodLiteral<"messaging/1">;
513
+ realm: z.ZodString;
514
+ cid: z.ZodString;
515
+ id: z.ZodString;
516
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
517
+ inviter: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
518
+ by: z.ZodString;
519
+ head: z.ZodObject<{
520
+ seq: z.ZodNumber;
521
+ hash: z.ZodString;
522
+ }, z.core.$strict>;
523
+ issuedAt: z.ZodNumber;
524
+ expiresAt: z.ZodNumber;
525
+ kind: z.ZodEnum<{
526
+ channel: "channel";
527
+ group: "group";
528
+ }>;
529
+ history: z.ZodEnum<{
530
+ none: "none";
531
+ shared: "shared";
532
+ }>;
533
+ agentContext: z.ZodEnum<{
534
+ none: "none";
535
+ members: "members";
536
+ seats: "seats";
537
+ }>;
538
+ bridges: z.ZodEnum<{
539
+ none: "none";
540
+ members: "members";
541
+ admins: "admins";
542
+ }>;
543
+ audience: z.ZodArray<z.ZodObject<{
544
+ p: z.ZodString;
545
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
546
+ role: z.ZodEnum<{
547
+ admin: "admin";
548
+ member: "member";
549
+ owner: "owner";
550
+ guest: "guest";
551
+ }>;
552
+ state: z.ZodEnum<{
553
+ member: "member";
554
+ invited: "invited";
555
+ }>;
556
+ }, z.core.$strict>>;
557
+ sig: z.ZodString;
558
+ }, z.core.$strict>>;
559
+ }, z.core.$strict>, z.ZodObject<{
560
+ op: z.ZodLiteral<"activate">;
561
+ proof: z.ZodUnion<readonly [z.ZodObject<{
562
+ descriptor: z.ZodObject<{
563
+ id: z.ZodString;
564
+ issuedAt: z.ZodNumber;
565
+ expiresAt: z.ZodNumber;
566
+ commitment: z.ZodString;
567
+ by: z.ZodString;
568
+ sig: z.ZodString;
569
+ v: z.ZodLiteral<"messaging/1">;
570
+ realm: z.ZodString;
571
+ cid: z.ZodString;
572
+ from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
573
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
574
+ }, z.core.$strict>;
575
+ decision: z.ZodObject<{
576
+ id: z.ZodString;
577
+ descriptor: z.ZodString;
578
+ answer: z.ZodEnum<{
579
+ accept: "accept";
580
+ decline: "decline";
581
+ }>;
582
+ at: z.ZodNumber;
583
+ by: z.ZodString;
584
+ sig: z.ZodString;
585
+ v: z.ZodLiteral<"messaging/1">;
586
+ realm: z.ZodString;
587
+ cid: z.ZodString;
588
+ from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
589
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
590
+ }, z.core.$strict>;
591
+ }, z.core.$strict>, z.ZodObject<{
592
+ contacts: z.ZodTuple<[z.ZodObject<{
593
+ at: z.ZodNumber;
594
+ by: z.ZodString;
595
+ sig: z.ZodString;
596
+ v: z.ZodLiteral<"messaging/1">;
597
+ realm: z.ZodString;
598
+ cid: z.ZodString;
599
+ from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
600
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
601
+ }, z.core.$strict>, z.ZodObject<{
602
+ at: z.ZodNumber;
603
+ by: z.ZodString;
604
+ sig: z.ZodString;
605
+ v: z.ZodLiteral<"messaging/1">;
606
+ realm: z.ZodString;
607
+ cid: z.ZodString;
608
+ from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
609
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
610
+ }, z.core.$strict>], null>;
611
+ }, z.core.$strict>]>;
612
+ }, z.core.$strict>, z.ZodObject<{
613
+ op: z.ZodLiteral<"request.complete">;
614
+ request: z.ZodString;
615
+ seq: z.ZodNumber;
616
+ digest: z.ZodString;
617
+ }, z.core.$strict>, z.ZodObject<{
618
+ op: z.ZodLiteral<"join">;
619
+ }, z.core.$strict>, z.ZodObject<{
620
+ op: z.ZodLiteral<"leave">;
621
+ }, z.core.$strict>, z.ZodObject<{
622
+ op: z.ZodLiteral<"remove">;
623
+ participants: z.ZodArray<z.ZodString>;
624
+ }, z.core.$strict>, z.ZodObject<{
625
+ op: z.ZodLiteral<"role">;
626
+ p: z.ZodString;
627
+ role: z.ZodEnum<{
628
+ admin: "admin";
629
+ member: "member";
630
+ owner: "owner";
631
+ guest: "guest";
632
+ }>;
633
+ }, z.core.$strict>, z.ZodObject<{
634
+ op: z.ZodLiteral<"seat">;
635
+ p: z.ZodString;
636
+ device: z.ZodOptional<z.ZodString>;
637
+ respondTo: z.ZodOptional<z.ZodEnum<{
638
+ self: "self";
639
+ none: "none";
640
+ members: "members";
641
+ }>>;
642
+ }, z.core.$strict>, z.ZodObject<{
643
+ op: z.ZodLiteral<"settings">;
644
+ visibility: z.ZodOptional<z.ZodEnum<{
645
+ public: "public";
646
+ private: "private";
647
+ }>>;
648
+ history: z.ZodOptional<z.ZodEnum<{
649
+ none: "none";
650
+ shared: "shared";
651
+ }>>;
652
+ retainDays: z.ZodOptional<z.ZodNumber>;
653
+ post: z.ZodOptional<z.ZodEnum<{
654
+ admins: "admins";
655
+ all: "all";
656
+ }>>;
657
+ invite: z.ZodOptional<z.ZodEnum<{
658
+ admins: "admins";
659
+ all: "all";
660
+ }>>;
661
+ pins: z.ZodOptional<z.ZodEnum<{
662
+ admins: "admins";
663
+ all: "all";
664
+ }>>;
665
+ }, z.core.$strict>, z.ZodObject<{
666
+ op: z.ZodLiteral<"archive">;
667
+ on: z.ZodBoolean;
668
+ }, z.core.$strict>, z.ZodObject<{
669
+ op: z.ZodLiteral<"rekey">;
670
+ epoch: z.ZodNumber;
671
+ cause: z.ZodEnum<{
672
+ device: "device";
673
+ removed: "removed";
674
+ added: "added";
675
+ settings: "settings";
676
+ schedule: "schedule";
677
+ }>;
678
+ device: z.ZodOptional<z.ZodString>;
679
+ until: z.ZodOptional<z.ZodNumber>;
680
+ }, z.core.$strict>, z.ZodObject<{
681
+ op: z.ZodLiteral<"policy">;
682
+ agentContext: z.ZodOptional<z.ZodEnum<{
683
+ none: "none";
684
+ members: "members";
685
+ seats: "seats";
686
+ }>>;
687
+ bridges: z.ZodOptional<z.ZodEnum<{
688
+ none: "none";
689
+ members: "members";
690
+ admins: "admins";
691
+ }>>;
692
+ }, z.core.$strict>, z.ZodObject<{
693
+ op: z.ZodLiteral<"meta">;
694
+ epoch: z.ZodNumber;
695
+ idx: z.ZodNumber;
696
+ sealed: z.ZodString;
697
+ }, z.core.$strict>, z.ZodObject<{
698
+ op: z.ZodLiteral<"setting">;
699
+ kind: z.ZodEnum<{
700
+ link: "link";
701
+ prefs: "prefs";
702
+ grant: "grant";
703
+ context: "context";
704
+ localRetention: "localRetention";
705
+ }>;
706
+ epoch: z.ZodNumber;
707
+ idx: z.ZodNumber;
708
+ sealed: z.ZodString;
709
+ }, z.core.$strict>], "op">;
710
+ sig: z.ZodString;
711
+ v: z.ZodLiteral<"messaging/1">;
712
+ realm: z.ZodString;
713
+ cid: z.ZodString;
714
+ id: z.ZodString;
715
+ by: z.ZodObject<{
716
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
717
+ device: z.ZodString;
718
+ agent: z.ZodOptional<z.ZodString>;
719
+ }, z.core.$strict>;
720
+ ts: z.ZodNumber;
721
+ opHead: z.ZodObject<{
722
+ seq: z.ZodNumber;
723
+ hash: z.ZodString;
724
+ }, z.core.$strict>;
725
+ seen: z.ZodOptional<z.ZodObject<{
726
+ seq: z.ZodNumber;
727
+ hash: z.ZodString;
728
+ }, z.core.$strict>>;
729
+ }, z.core.$strict>, z.ZodObject<{
730
+ class: z.ZodLiteral<"msg">;
731
+ epoch: z.ZodNumber;
732
+ idx: z.ZodNumber;
733
+ wake: z.ZodOptional<z.ZodArray<z.ZodString>>;
734
+ request: z.ZodOptional<z.ZodString>;
735
+ body: z.ZodString;
736
+ sig: z.ZodString;
737
+ v: z.ZodLiteral<"messaging/1">;
738
+ realm: z.ZodString;
739
+ cid: z.ZodString;
740
+ id: z.ZodString;
741
+ by: z.ZodObject<{
742
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
743
+ device: z.ZodString;
744
+ agent: z.ZodOptional<z.ZodString>;
745
+ }, z.core.$strict>;
746
+ ts: z.ZodNumber;
747
+ opHead: z.ZodObject<{
748
+ seq: z.ZodNumber;
749
+ hash: z.ZodString;
750
+ }, z.core.$strict>;
751
+ seen: z.ZodOptional<z.ZodObject<{
752
+ seq: z.ZodNumber;
753
+ hash: z.ZodString;
754
+ }, z.core.$strict>>;
755
+ }, z.core.$strict>], "class">;
756
+ }, z.core.$strict>, z.ZodObject<{
757
+ seq: z.ZodNumber;
758
+ prev: z.ZodString;
759
+ digest: z.ZodString;
760
+ }, z.core.$strict>]>>;
761
+ shares: z.ZodArray<z.ZodObject<{
762
+ n: z.ZodNumber;
763
+ event: z.ZodObject<{
764
+ class: z.ZodLiteral<"keys">;
765
+ body: z.ZodObject<{
766
+ to: z.ZodObject<{
767
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
768
+ device: z.ZodString;
769
+ }, z.core.$strict>;
770
+ epk: z.ZodString;
771
+ nonce: z.ZodString;
772
+ ct: z.ZodString;
773
+ }, z.core.$strict>;
774
+ sig: z.ZodString;
775
+ v: z.ZodLiteral<"messaging/1">;
776
+ realm: z.ZodString;
777
+ cid: z.ZodString;
778
+ id: z.ZodString;
779
+ by: z.ZodObject<{
780
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
781
+ device: z.ZodString;
782
+ agent: z.ZodOptional<z.ZodString>;
783
+ }, z.core.$strict>;
784
+ ts: z.ZodNumber;
785
+ opHead: z.ZodObject<{
786
+ seq: z.ZodNumber;
787
+ hash: z.ZodString;
788
+ }, z.core.$strict>;
789
+ seen: z.ZodOptional<z.ZodObject<{
790
+ seq: z.ZodNumber;
791
+ hash: z.ZodString;
792
+ }, z.core.$strict>>;
793
+ }, z.core.$strict>;
794
+ }, z.core.$strict>>;
795
+ more: z.ZodBoolean;
796
+ }, z.core.$strict>;
797
+ export type ConvEntriesFrame = z.infer<typeof ConvEntriesFrame>;
798
+ /** One conversation's position at the relay: its head, its op head, and the last share `n` for this device (0: none). */
799
+ export declare const ConvHeadView: z.ZodObject<{
800
+ cid: z.ZodString;
801
+ head: z.ZodObject<{
802
+ seq: z.ZodNumber;
803
+ hash: z.ZodString;
804
+ }, z.core.$strict>;
805
+ opHead: z.ZodObject<{
806
+ seq: z.ZodNumber;
807
+ hash: z.ZodString;
808
+ }, z.core.$strict>;
809
+ shares: z.ZodNumber;
810
+ }, z.core.$strict>;
811
+ export type ConvHeadView = z.infer<typeof ConvHeadView>;
812
+ /** `conv.head`'s answer. A named conversation this device's person is not in is left out, as one that does not exist. */
813
+ export declare const ConvHeadsFrame: z.ZodObject<{
814
+ t: z.ZodLiteral<"conv.heads">;
815
+ req: z.ZodString;
816
+ heads: z.ZodArray<z.ZodObject<{
817
+ cid: z.ZodString;
818
+ head: z.ZodObject<{
819
+ seq: z.ZodNumber;
820
+ hash: z.ZodString;
821
+ }, z.core.$strict>;
822
+ opHead: z.ZodObject<{
823
+ seq: z.ZodNumber;
824
+ hash: z.ZodString;
825
+ }, z.core.$strict>;
826
+ shares: z.ZodNumber;
827
+ }, z.core.$strict>>;
828
+ more: z.ZodBoolean;
829
+ }, z.core.$strict>;
830
+ export type ConvHeadsFrame = z.infer<typeof ConvHeadsFrame>;
831
+ /**
832
+ * `conv.caps`'s answer: the named persons that cannot read conversations yet, and, only when there are any, the
833
+ * persons it says nothing about (`unknown`: unrelated persons past the asker's daily budget).
834
+ */
835
+ export declare const ConvCapabilitiesFrame: z.ZodObject<{
836
+ t: z.ZodLiteral<"conv.capabilities">;
837
+ req: z.ZodString;
838
+ outdated: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
839
+ unknown: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
840
+ }, z.core.$strict>;
841
+ export type ConvCapabilitiesFrame = z.infer<typeof ConvCapabilitiesFrame>;
842
+ /** A new entry, to the online devices of the conversation's participant persons; or a new share, to its recipient. */
843
+ export declare const ConvPushFrame: z.ZodUnion<readonly [z.ZodObject<{
844
+ t: z.ZodLiteral<"conv.push">;
845
+ cid: z.ZodString;
846
+ entry: z.ZodObject<{
847
+ seq: z.ZodNumber;
848
+ prev: z.ZodString;
849
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
850
+ class: z.ZodLiteral<"op">;
851
+ body: z.ZodDiscriminatedUnion<[z.ZodObject<{
852
+ op: z.ZodLiteral<"create">;
853
+ kind: z.ZodEnum<{
854
+ self: "self";
855
+ channel: "channel";
856
+ group: "group";
857
+ dm: "dm";
858
+ }>;
859
+ visibility: z.ZodOptional<z.ZodEnum<{
860
+ public: "public";
861
+ private: "private";
862
+ }>>;
863
+ history: z.ZodEnum<{
864
+ none: "none";
865
+ shared: "shared";
866
+ }>;
867
+ retainDays: z.ZodNumber;
868
+ org: z.ZodOptional<z.ZodString>;
869
+ participants: z.ZodArray<z.ZodObject<{
870
+ p: z.ZodString;
871
+ role: z.ZodEnum<{
872
+ admin: "admin";
873
+ member: "member";
874
+ owner: "owner";
875
+ guest: "guest";
876
+ }>;
877
+ device: z.ZodOptional<z.ZodString>;
878
+ respondTo: z.ZodOptional<z.ZodEnum<{
879
+ self: "self";
880
+ none: "none";
881
+ members: "members";
882
+ }>>;
883
+ }, z.core.$strict>>;
884
+ post: z.ZodOptional<z.ZodEnum<{
885
+ admins: "admins";
886
+ all: "all";
887
+ }>>;
888
+ invite: z.ZodOptional<z.ZodEnum<{
889
+ admins: "admins";
890
+ all: "all";
891
+ }>>;
892
+ pins: z.ZodOptional<z.ZodEnum<{
893
+ admins: "admins";
894
+ all: "all";
895
+ }>>;
896
+ sealedMeta: z.ZodOptional<z.ZodString>;
897
+ admission: z.ZodOptional<z.ZodLiteral<"request">>;
898
+ }, z.core.$strict>, z.ZodObject<{
899
+ op: z.ZodLiteral<"add">;
900
+ participants: z.ZodArray<z.ZodObject<{
901
+ p: z.ZodString;
902
+ role: z.ZodEnum<{
903
+ admin: "admin";
904
+ member: "member";
905
+ owner: "owner";
906
+ guest: "guest";
907
+ }>;
908
+ device: z.ZodOptional<z.ZodString>;
909
+ respondTo: z.ZodOptional<z.ZodEnum<{
910
+ self: "self";
911
+ none: "none";
912
+ members: "members";
913
+ }>>;
914
+ }, z.core.$strict>>;
915
+ }, z.core.$strict>, z.ZodObject<{
916
+ op: z.ZodLiteral<"accept">;
917
+ invitation: z.ZodOptional<z.ZodObject<{
918
+ v: z.ZodLiteral<"messaging/1">;
919
+ realm: z.ZodString;
920
+ cid: z.ZodString;
921
+ id: z.ZodString;
922
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
923
+ inviter: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
924
+ by: z.ZodString;
925
+ head: z.ZodObject<{
926
+ seq: z.ZodNumber;
927
+ hash: z.ZodString;
928
+ }, z.core.$strict>;
929
+ issuedAt: z.ZodNumber;
930
+ expiresAt: z.ZodNumber;
931
+ kind: z.ZodEnum<{
932
+ channel: "channel";
933
+ group: "group";
934
+ }>;
935
+ history: z.ZodEnum<{
936
+ none: "none";
937
+ shared: "shared";
938
+ }>;
939
+ agentContext: z.ZodEnum<{
940
+ none: "none";
941
+ members: "members";
942
+ seats: "seats";
943
+ }>;
944
+ bridges: z.ZodEnum<{
945
+ none: "none";
946
+ members: "members";
947
+ admins: "admins";
948
+ }>;
949
+ audience: z.ZodArray<z.ZodObject<{
950
+ p: z.ZodString;
951
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
952
+ role: z.ZodEnum<{
953
+ admin: "admin";
954
+ member: "member";
955
+ owner: "owner";
956
+ guest: "guest";
957
+ }>;
958
+ state: z.ZodEnum<{
959
+ member: "member";
960
+ invited: "invited";
961
+ }>;
962
+ }, z.core.$strict>>;
963
+ sig: z.ZodString;
964
+ }, z.core.$strict>>;
965
+ }, z.core.$strict>, z.ZodObject<{
966
+ op: z.ZodLiteral<"activate">;
967
+ proof: z.ZodUnion<readonly [z.ZodObject<{
968
+ descriptor: z.ZodObject<{
969
+ id: z.ZodString;
970
+ issuedAt: z.ZodNumber;
971
+ expiresAt: z.ZodNumber;
972
+ commitment: z.ZodString;
973
+ by: z.ZodString;
974
+ sig: z.ZodString;
975
+ v: z.ZodLiteral<"messaging/1">;
976
+ realm: z.ZodString;
977
+ cid: z.ZodString;
978
+ from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
979
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
980
+ }, z.core.$strict>;
981
+ decision: z.ZodObject<{
982
+ id: z.ZodString;
983
+ descriptor: z.ZodString;
984
+ answer: z.ZodEnum<{
985
+ accept: "accept";
986
+ decline: "decline";
987
+ }>;
988
+ at: z.ZodNumber;
989
+ by: z.ZodString;
990
+ sig: z.ZodString;
991
+ v: z.ZodLiteral<"messaging/1">;
992
+ realm: z.ZodString;
993
+ cid: z.ZodString;
994
+ from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
995
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
996
+ }, z.core.$strict>;
997
+ }, z.core.$strict>, z.ZodObject<{
998
+ contacts: z.ZodTuple<[z.ZodObject<{
999
+ at: z.ZodNumber;
1000
+ by: z.ZodString;
1001
+ sig: z.ZodString;
1002
+ v: z.ZodLiteral<"messaging/1">;
1003
+ realm: z.ZodString;
1004
+ cid: z.ZodString;
1005
+ from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1006
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1007
+ }, z.core.$strict>, z.ZodObject<{
1008
+ at: z.ZodNumber;
1009
+ by: z.ZodString;
1010
+ sig: z.ZodString;
1011
+ v: z.ZodLiteral<"messaging/1">;
1012
+ realm: z.ZodString;
1013
+ cid: z.ZodString;
1014
+ from: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1015
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1016
+ }, z.core.$strict>], null>;
1017
+ }, z.core.$strict>]>;
1018
+ }, z.core.$strict>, z.ZodObject<{
1019
+ op: z.ZodLiteral<"request.complete">;
1020
+ request: z.ZodString;
1021
+ seq: z.ZodNumber;
1022
+ digest: z.ZodString;
1023
+ }, z.core.$strict>, z.ZodObject<{
1024
+ op: z.ZodLiteral<"join">;
1025
+ }, z.core.$strict>, z.ZodObject<{
1026
+ op: z.ZodLiteral<"leave">;
1027
+ }, z.core.$strict>, z.ZodObject<{
1028
+ op: z.ZodLiteral<"remove">;
1029
+ participants: z.ZodArray<z.ZodString>;
1030
+ }, z.core.$strict>, z.ZodObject<{
1031
+ op: z.ZodLiteral<"role">;
1032
+ p: z.ZodString;
1033
+ role: z.ZodEnum<{
1034
+ admin: "admin";
1035
+ member: "member";
1036
+ owner: "owner";
1037
+ guest: "guest";
1038
+ }>;
1039
+ }, z.core.$strict>, z.ZodObject<{
1040
+ op: z.ZodLiteral<"seat">;
1041
+ p: z.ZodString;
1042
+ device: z.ZodOptional<z.ZodString>;
1043
+ respondTo: z.ZodOptional<z.ZodEnum<{
1044
+ self: "self";
1045
+ none: "none";
1046
+ members: "members";
1047
+ }>>;
1048
+ }, z.core.$strict>, z.ZodObject<{
1049
+ op: z.ZodLiteral<"settings">;
1050
+ visibility: z.ZodOptional<z.ZodEnum<{
1051
+ public: "public";
1052
+ private: "private";
1053
+ }>>;
1054
+ history: z.ZodOptional<z.ZodEnum<{
1055
+ none: "none";
1056
+ shared: "shared";
1057
+ }>>;
1058
+ retainDays: z.ZodOptional<z.ZodNumber>;
1059
+ post: z.ZodOptional<z.ZodEnum<{
1060
+ admins: "admins";
1061
+ all: "all";
1062
+ }>>;
1063
+ invite: z.ZodOptional<z.ZodEnum<{
1064
+ admins: "admins";
1065
+ all: "all";
1066
+ }>>;
1067
+ pins: z.ZodOptional<z.ZodEnum<{
1068
+ admins: "admins";
1069
+ all: "all";
1070
+ }>>;
1071
+ }, z.core.$strict>, z.ZodObject<{
1072
+ op: z.ZodLiteral<"archive">;
1073
+ on: z.ZodBoolean;
1074
+ }, z.core.$strict>, z.ZodObject<{
1075
+ op: z.ZodLiteral<"rekey">;
1076
+ epoch: z.ZodNumber;
1077
+ cause: z.ZodEnum<{
1078
+ device: "device";
1079
+ removed: "removed";
1080
+ added: "added";
1081
+ settings: "settings";
1082
+ schedule: "schedule";
1083
+ }>;
1084
+ device: z.ZodOptional<z.ZodString>;
1085
+ until: z.ZodOptional<z.ZodNumber>;
1086
+ }, z.core.$strict>, z.ZodObject<{
1087
+ op: z.ZodLiteral<"policy">;
1088
+ agentContext: z.ZodOptional<z.ZodEnum<{
1089
+ none: "none";
1090
+ members: "members";
1091
+ seats: "seats";
1092
+ }>>;
1093
+ bridges: z.ZodOptional<z.ZodEnum<{
1094
+ none: "none";
1095
+ members: "members";
1096
+ admins: "admins";
1097
+ }>>;
1098
+ }, z.core.$strict>, z.ZodObject<{
1099
+ op: z.ZodLiteral<"meta">;
1100
+ epoch: z.ZodNumber;
1101
+ idx: z.ZodNumber;
1102
+ sealed: z.ZodString;
1103
+ }, z.core.$strict>, z.ZodObject<{
1104
+ op: z.ZodLiteral<"setting">;
1105
+ kind: z.ZodEnum<{
1106
+ link: "link";
1107
+ prefs: "prefs";
1108
+ grant: "grant";
1109
+ context: "context";
1110
+ localRetention: "localRetention";
1111
+ }>;
1112
+ epoch: z.ZodNumber;
1113
+ idx: z.ZodNumber;
1114
+ sealed: z.ZodString;
1115
+ }, z.core.$strict>], "op">;
1116
+ sig: z.ZodString;
1117
+ v: z.ZodLiteral<"messaging/1">;
1118
+ realm: z.ZodString;
1119
+ cid: z.ZodString;
1120
+ id: z.ZodString;
1121
+ by: z.ZodObject<{
1122
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1123
+ device: z.ZodString;
1124
+ agent: z.ZodOptional<z.ZodString>;
1125
+ }, z.core.$strict>;
1126
+ ts: z.ZodNumber;
1127
+ opHead: z.ZodObject<{
1128
+ seq: z.ZodNumber;
1129
+ hash: z.ZodString;
1130
+ }, z.core.$strict>;
1131
+ seen: z.ZodOptional<z.ZodObject<{
1132
+ seq: z.ZodNumber;
1133
+ hash: z.ZodString;
1134
+ }, z.core.$strict>>;
1135
+ }, z.core.$strict>, z.ZodObject<{
1136
+ class: z.ZodLiteral<"msg">;
1137
+ epoch: z.ZodNumber;
1138
+ idx: z.ZodNumber;
1139
+ wake: z.ZodOptional<z.ZodArray<z.ZodString>>;
1140
+ request: z.ZodOptional<z.ZodString>;
1141
+ body: z.ZodString;
1142
+ sig: z.ZodString;
1143
+ v: z.ZodLiteral<"messaging/1">;
1144
+ realm: z.ZodString;
1145
+ cid: z.ZodString;
1146
+ id: z.ZodString;
1147
+ by: z.ZodObject<{
1148
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1149
+ device: z.ZodString;
1150
+ agent: z.ZodOptional<z.ZodString>;
1151
+ }, z.core.$strict>;
1152
+ ts: z.ZodNumber;
1153
+ opHead: z.ZodObject<{
1154
+ seq: z.ZodNumber;
1155
+ hash: z.ZodString;
1156
+ }, z.core.$strict>;
1157
+ seen: z.ZodOptional<z.ZodObject<{
1158
+ seq: z.ZodNumber;
1159
+ hash: z.ZodString;
1160
+ }, z.core.$strict>>;
1161
+ }, z.core.$strict>], "class">;
1162
+ }, z.core.$strict>;
1163
+ }, z.core.$strict>, z.ZodObject<{
1164
+ t: z.ZodLiteral<"conv.push">;
1165
+ cid: z.ZodString;
1166
+ share: z.ZodObject<{
1167
+ n: z.ZodNumber;
1168
+ event: z.ZodObject<{
1169
+ class: z.ZodLiteral<"keys">;
1170
+ body: z.ZodObject<{
1171
+ to: z.ZodObject<{
1172
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1173
+ device: z.ZodString;
1174
+ }, z.core.$strict>;
1175
+ epk: z.ZodString;
1176
+ nonce: z.ZodString;
1177
+ ct: z.ZodString;
1178
+ }, z.core.$strict>;
1179
+ sig: z.ZodString;
1180
+ v: z.ZodLiteral<"messaging/1">;
1181
+ realm: z.ZodString;
1182
+ cid: z.ZodString;
1183
+ id: z.ZodString;
1184
+ by: z.ZodObject<{
1185
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1186
+ device: z.ZodString;
1187
+ agent: z.ZodOptional<z.ZodString>;
1188
+ }, z.core.$strict>;
1189
+ ts: z.ZodNumber;
1190
+ opHead: z.ZodObject<{
1191
+ seq: z.ZodNumber;
1192
+ hash: z.ZodString;
1193
+ }, z.core.$strict>;
1194
+ seen: z.ZodOptional<z.ZodObject<{
1195
+ seq: z.ZodNumber;
1196
+ hash: z.ZodString;
1197
+ }, z.core.$strict>>;
1198
+ }, z.core.$strict>;
1199
+ }, z.core.$strict>;
1200
+ }, z.core.$strict>]>;
1201
+ export type ConvPushFrame = z.infer<typeof ConvPushFrame>;
1202
+ /** The conversation frames' types, for the relay's dispatch and `/metrics`. */
1203
+ export declare const CONV_FRAMES: readonly ["conv.append", "conv.share", "conv.fetch", "conv.head", "conv.caps"];
1204
+ export declare const CONV_REPLIES: readonly ["conv.ok", "conv.shared", "conv.entries", "conv.heads", "conv.capabilities", "conv.push"];