@joe-broadhead/messaging 0.7.0 → 0.8.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 (97) hide show
  1. package/CHANGELOG.md +259 -2
  2. package/dist/bin/messaging-mcp.js +5484 -3858
  3. package/dist/bin/messaging-relay.js +4728 -1136
  4. package/dist/bin/messaging.js +4616 -2807
  5. package/dist/bin/messagingd.js +16451 -9444
  6. package/dist/lib/modules/core/agent/operations.js +19 -327
  7. package/dist/lib/modules/core/agent/present.js +15 -55
  8. package/dist/lib/modules/core/agent-tools.js +46 -143
  9. package/dist/lib/modules/core/consent.js +1 -1
  10. package/dist/lib/modules/core/conversation/context.js +80 -0
  11. package/dist/lib/modules/core/conversation/event.js +125 -0
  12. package/dist/lib/modules/core/conversation/guest-invitation.js +42 -0
  13. package/dist/lib/modules/core/conversation/ids.js +38 -0
  14. package/dist/lib/modules/core/conversation/link.js +35 -0
  15. package/dist/lib/modules/core/conversation/log.js +988 -0
  16. package/dist/lib/modules/core/conversation/ratchet.js +243 -0
  17. package/dist/lib/modules/core/conversation/request-log.js +158 -0
  18. package/dist/lib/modules/core/conversation/request-seal.js +41 -0
  19. package/dist/lib/modules/core/conversation/requests.js +87 -0
  20. package/dist/lib/modules/core/conversation/seal.js +251 -0
  21. package/dist/lib/modules/core/conversation-agent-tools.js +69 -0
  22. package/dist/lib/modules/core/federation/directory-proof.js +83 -0
  23. package/dist/lib/modules/core/federation/proof-state.js +167 -0
  24. package/dist/lib/modules/core/federation/roster-proof.js +74 -0
  25. package/dist/lib/modules/core/index.js +16 -2
  26. package/dist/lib/modules/core/jelly-host.js +5 -5
  27. package/dist/lib/modules/core/schema/common.js +85 -3
  28. package/dist/lib/modules/core/schema/consent.js +5 -4
  29. package/dist/lib/modules/core/schema/contact-request.js +22 -0
  30. package/dist/lib/modules/core/schema/conv-frames.js +94 -0
  31. package/dist/lib/modules/core/schema/conversation.js +326 -0
  32. package/dist/lib/modules/core/schema/envelope.js +8 -24
  33. package/dist/lib/modules/core/schema/errors.js +42 -2
  34. package/dist/lib/modules/core/schema/guest-invitation.js +13 -0
  35. package/dist/lib/modules/core/schema/index.js +6 -0
  36. package/dist/lib/modules/core/schema/ipc/consent.js +13 -9
  37. package/dist/lib/modules/core/schema/ipc/conversation-views.js +80 -0
  38. package/dist/lib/modules/core/schema/ipc/conversations.js +128 -0
  39. package/dist/lib/modules/core/schema/ipc/device.js +2 -0
  40. package/dist/lib/modules/core/schema/ipc/jelly.js +3 -38
  41. package/dist/lib/modules/core/schema/ipc/shapes.js +14 -72
  42. package/dist/lib/modules/core/schema/ipc/surfaces.js +12 -195
  43. package/dist/lib/modules/core/schema/ipc/tasks.js +31 -0
  44. package/dist/lib/modules/core/schema/ipc.js +18 -44
  45. package/dist/lib/modules/core/testing.js +1 -0
  46. package/dist/lib/modules/core/version.js +1 -1
  47. package/dist/lib/modules/ipc/client.js +10 -2
  48. package/dist/lib/modules/ipc/server.js +14 -5
  49. package/dist/lib/modules/ipc/testing.js +13 -23
  50. package/dist/spec/messaging-v1.md +835 -380
  51. package/dist/third-party-notices.md +1 -1
  52. package/dist/third-party.json +1 -1
  53. package/dist/types/core/agent/operations.d.ts +5 -52
  54. package/dist/types/core/agent/present.d.ts +6 -21
  55. package/dist/types/core/agent-tools.d.ts +277 -438
  56. package/dist/types/core/conversation/context.d.ts +56 -0
  57. package/dist/types/core/conversation/event.d.ts +36 -0
  58. package/dist/types/core/conversation/guest-invitation.d.ts +8 -0
  59. package/dist/types/core/conversation/ids.d.ts +18 -0
  60. package/dist/types/core/conversation/link.d.ts +16 -0
  61. package/dist/types/core/conversation/log.d.ts +157 -0
  62. package/dist/types/core/conversation/ratchet.d.ts +95 -0
  63. package/dist/types/core/conversation/request-log.d.ts +24 -0
  64. package/dist/types/core/conversation/request-seal.d.ts +6 -0
  65. package/dist/types/core/conversation/requests.d.ts +14 -0
  66. package/dist/types/core/conversation/seal.d.ts +70 -0
  67. package/dist/types/core/conversation-agent-tools.d.ts +918 -0
  68. package/dist/types/core/federation/directory-proof.d.ts +8 -0
  69. package/dist/types/core/federation/proof-state.d.ts +114 -0
  70. package/dist/types/core/federation/roster-proof.d.ts +7 -0
  71. package/dist/types/core/index.d.ts +15 -3
  72. package/dist/types/core/jelly-host.d.ts +1 -1
  73. package/dist/types/core/schema/common.d.ts +85 -4
  74. package/dist/types/core/schema/consent.d.ts +7 -7
  75. package/dist/types/core/schema/contact-request.d.ts +264 -0
  76. package/dist/types/core/schema/conv-frames.d.ts +1200 -0
  77. package/dist/types/core/schema/conversation.d.ts +2803 -0
  78. package/dist/types/core/schema/envelope.d.ts +89 -130
  79. package/dist/types/core/schema/errors.d.ts +40 -0
  80. package/dist/types/core/schema/guest-invitation.d.ts +51 -0
  81. package/dist/types/core/schema/index.d.ts +6 -0
  82. package/dist/types/core/schema/ipc/consent.d.ts +89 -49
  83. package/dist/types/core/schema/ipc/conversation-views.d.ts +1023 -0
  84. package/dist/types/core/schema/ipc/conversations.d.ts +3987 -0
  85. package/dist/types/core/schema/ipc/device.d.ts +10 -0
  86. package/dist/types/core/schema/ipc/jelly.d.ts +2 -105
  87. package/dist/types/core/schema/ipc/shapes.d.ts +16 -95
  88. package/dist/types/core/schema/ipc/surfaces.d.ts +28 -424
  89. package/dist/types/core/schema/ipc/tasks.d.ts +208 -0
  90. package/dist/types/core/schema/ipc.d.ts +2684 -523
  91. package/dist/types/core/schema/relay.d.ts +20 -4
  92. package/dist/types/core/testing.d.ts +1 -0
  93. package/dist/types/core/version.d.ts +1 -1
  94. package/dist/types/ipc/client.d.ts +4 -1
  95. package/dist/types/ipc/server.d.ts +10 -1
  96. package/dist/types/ipc/testing.d.ts +21 -8
  97. package/package.json +1 -1
@@ -0,0 +1,3987 @@
1
+ /** Conversation contracts, including later lanes. Only LIVE_CONVERSATION_METHODS registers IPC. */
2
+ import { z } from "zod";
3
+ /** Explicit consent evidence and unconfirmed delivery are different states. */
4
+ export declare const WaitingOnThemView: z.ZodObject<{
5
+ id: z.ZodString;
6
+ kind: z.ZodEnum<{
7
+ message: "message";
8
+ task: "task";
9
+ contact: "contact";
10
+ }>;
11
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
12
+ name: z.ZodString;
13
+ at: z.ZodNumber;
14
+ cid: z.ZodOptional<z.ZodString>;
15
+ agent: z.ZodOptional<z.ZodString>;
16
+ state: z.ZodEnum<{
17
+ held: "held";
18
+ "pending-delivery": "pending-delivery";
19
+ }>;
20
+ }, z.core.$strip>;
21
+ export type WaitingOnThemView = z.infer<typeof WaitingOnThemView>;
22
+ export declare const ConvListParams: z.ZodObject<{
23
+ limit: z.ZodOptional<z.ZodNumber>;
24
+ cursor: z.ZodOptional<z.ZodString>;
25
+ key: z.ZodOptional<z.ZodString>;
26
+ filter: z.ZodOptional<z.ZodObject<{
27
+ unread: z.ZodOptional<z.ZodBoolean>;
28
+ mentions: z.ZodOptional<z.ZodBoolean>;
29
+ kind: z.ZodOptional<z.ZodEnum<{
30
+ self: "self";
31
+ channel: "channel";
32
+ group: "group";
33
+ dm: "dm";
34
+ }>>;
35
+ archived: z.ZodOptional<z.ZodBoolean>;
36
+ }, z.core.$strict>>;
37
+ }, z.core.$strict>;
38
+ export declare const ConvListResult: z.ZodObject<{
39
+ conversations: z.ZodArray<z.ZodObject<{
40
+ cid: z.ZodString;
41
+ kind: z.ZodEnum<{
42
+ self: "self";
43
+ channel: "channel";
44
+ group: "group";
45
+ dm: "dm";
46
+ }>;
47
+ visibility: z.ZodOptional<z.ZodEnum<{
48
+ public: "public";
49
+ private: "private";
50
+ }>>;
51
+ history: z.ZodEnum<{
52
+ none: "none";
53
+ shared: "shared";
54
+ }>;
55
+ retainDays: z.ZodNumber;
56
+ agentContext: z.ZodEnum<{
57
+ none: "none";
58
+ members: "members";
59
+ seats: "seats";
60
+ }>;
61
+ name: z.ZodOptional<z.ZodString>;
62
+ topic: z.ZodOptional<z.ZodString>;
63
+ purpose: z.ZodOptional<z.ZodString>;
64
+ archived: z.ZodBoolean;
65
+ role: z.ZodEnum<{
66
+ admin: "admin";
67
+ member: "member";
68
+ owner: "owner";
69
+ guest: "guest";
70
+ }>;
71
+ participants: z.ZodNumber;
72
+ dmWith: z.ZodOptional<z.ZodObject<{
73
+ p: z.ZodString;
74
+ kind: z.ZodEnum<{
75
+ person: "person";
76
+ agent: "agent";
77
+ }>;
78
+ role: z.ZodEnum<{
79
+ admin: "admin";
80
+ member: "member";
81
+ owner: "owner";
82
+ guest: "guest";
83
+ }>;
84
+ state: z.ZodEnum<{
85
+ member: "member";
86
+ invited: "invited";
87
+ }>;
88
+ name: z.ZodString;
89
+ handle: z.ZodOptional<z.ZodString>;
90
+ org: z.ZodEnum<{
91
+ other: "other";
92
+ none: "none";
93
+ same: "same";
94
+ }>;
95
+ presence: z.ZodEnum<{
96
+ unknown: "unknown";
97
+ away: "away";
98
+ offline: "offline";
99
+ online: "online";
100
+ }>;
101
+ agentState: z.ZodOptional<z.ZodEnum<{
102
+ idle: "idle";
103
+ busy: "busy";
104
+ kept: "kept";
105
+ }>>;
106
+ respondTo: z.ZodOptional<z.ZodEnum<{
107
+ self: "self";
108
+ none: "none";
109
+ members: "members";
110
+ }>>;
111
+ }, z.core.$strip>>;
112
+ last: z.ZodOptional<z.ZodObject<{
113
+ cid: z.ZodString;
114
+ id: z.ZodString;
115
+ seq: z.ZodNumber;
116
+ at: z.ZodNumber;
117
+ author: z.ZodObject<{
118
+ name: z.ZodString;
119
+ kind: z.ZodEnum<{
120
+ person: "person";
121
+ agent: "agent";
122
+ }>;
123
+ p: z.ZodString;
124
+ }, z.core.$strip>;
125
+ kind: z.ZodEnum<{
126
+ task: "task";
127
+ line: "line";
128
+ notice: "notice";
129
+ }>;
130
+ text: z.ZodOptional<z.ZodString>;
131
+ format: z.ZodOptional<z.ZodEnum<{
132
+ plain: "plain";
133
+ md: "md";
134
+ }>>;
135
+ thread: z.ZodOptional<z.ZodString>;
136
+ broadcast: z.ZodOptional<z.ZodBoolean>;
137
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
138
+ p: z.ZodString;
139
+ }, z.core.$strict>, z.ZodObject<{
140
+ all: z.ZodLiteral<"channel">;
141
+ }, z.core.$strict>, z.ZodObject<{
142
+ all: z.ZodLiteral<"here">;
143
+ }, z.core.$strict>]>>>;
144
+ mentionsMe: z.ZodBoolean;
145
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
146
+ blob: z.ZodString;
147
+ name: z.ZodString;
148
+ mime: z.ZodString;
149
+ bytes: z.ZodNumber;
150
+ }, z.core.$strip>>>;
151
+ edited: z.ZodOptional<z.ZodNumber>;
152
+ deleted: z.ZodOptional<z.ZodBoolean>;
153
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
154
+ key: z.ZodString;
155
+ count: z.ZodNumber;
156
+ mine: z.ZodBoolean;
157
+ }, z.core.$strip>>>;
158
+ pinned: z.ZodOptional<z.ZodBoolean>;
159
+ replies: z.ZodOptional<z.ZodObject<{
160
+ count: z.ZodNumber;
161
+ lastAt: z.ZodNumber;
162
+ participants: z.ZodArray<z.ZodString>;
163
+ unread: z.ZodOptional<z.ZodNumber>;
164
+ following: z.ZodOptional<z.ZodBoolean>;
165
+ }, z.core.$strip>>;
166
+ task: z.ZodOptional<z.ZodObject<{
167
+ id: z.ZodString;
168
+ state: z.ZodEnum<{
169
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
170
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
171
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
172
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
173
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
174
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
175
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
176
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
177
+ }>;
178
+ }, z.core.$strip>>;
179
+ notice: z.ZodOptional<z.ZodObject<{
180
+ op: z.ZodEnum<{
181
+ role: "role";
182
+ remove: "remove";
183
+ accept: "accept";
184
+ settings: "settings";
185
+ create: "create";
186
+ add: "add";
187
+ join: "join";
188
+ leave: "leave";
189
+ seat: "seat";
190
+ archive: "archive";
191
+ policy: "policy";
192
+ meta: "meta";
193
+ }>;
194
+ by: z.ZodObject<{
195
+ name: z.ZodString;
196
+ kind: z.ZodEnum<{
197
+ person: "person";
198
+ agent: "agent";
199
+ }>;
200
+ p: z.ZodString;
201
+ }, z.core.$strip>;
202
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
203
+ name: z.ZodString;
204
+ kind: z.ZodEnum<{
205
+ person: "person";
206
+ agent: "agent";
207
+ }>;
208
+ p: z.ZodString;
209
+ }, z.core.$strip>>>;
210
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
211
+ name: "name";
212
+ history: "history";
213
+ purpose: "purpose";
214
+ agentContext: "agentContext";
215
+ bridges: "bridges";
216
+ visibility: "visibility";
217
+ retainDays: "retainDays";
218
+ post: "post";
219
+ invite: "invite";
220
+ pins: "pins";
221
+ topic: "topic";
222
+ }>>>;
223
+ }, z.core.$strip>>;
224
+ delivery: z.ZodOptional<z.ZodEnum<{
225
+ delivered: "delivered";
226
+ read: "read";
227
+ pending: "pending";
228
+ failed: "failed";
229
+ sent: "sent";
230
+ }>>;
231
+ clientId: z.ZodOptional<z.ZodString>;
232
+ }, z.core.$strip>>;
233
+ headSeq: z.ZodNumber;
234
+ readUpTo: z.ZodOptional<z.ZodNumber>;
235
+ unread: z.ZodOptional<z.ZodNumber>;
236
+ mentions: z.ZodOptional<z.ZodNumber>;
237
+ threadsUnread: z.ZodOptional<z.ZodNumber>;
238
+ notify: z.ZodOptional<z.ZodEnum<{
239
+ none: "none";
240
+ all: "all";
241
+ mentions: "mentions";
242
+ }>>;
243
+ mutedUntil: z.ZodOptional<z.ZodNumber>;
244
+ draft: z.ZodOptional<z.ZodString>;
245
+ }, z.core.$strip>>;
246
+ cursor: z.ZodOptional<z.ZodString>;
247
+ }, z.core.$strip>;
248
+ export declare const ConvReadParams: z.ZodObject<{
249
+ thread: z.ZodOptional<z.ZodString>;
250
+ before: z.ZodOptional<z.ZodNumber>;
251
+ after: z.ZodOptional<z.ZodNumber>;
252
+ around: z.ZodOptional<z.ZodString>;
253
+ limit: z.ZodOptional<z.ZodNumber>;
254
+ cursor: z.ZodOptional<z.ZodString>;
255
+ cid: z.ZodString;
256
+ key: z.ZodOptional<z.ZodString>;
257
+ }, z.core.$strict>;
258
+ export declare const ConvReadResult: z.ZodUnion<readonly [z.ZodObject<{
259
+ events: z.ZodArray<z.ZodObject<{
260
+ cid: z.ZodString;
261
+ id: z.ZodString;
262
+ seq: z.ZodNumber;
263
+ at: z.ZodNumber;
264
+ author: z.ZodObject<{
265
+ name: z.ZodString;
266
+ kind: z.ZodEnum<{
267
+ person: "person";
268
+ agent: "agent";
269
+ }>;
270
+ p: z.ZodString;
271
+ }, z.core.$strip>;
272
+ kind: z.ZodEnum<{
273
+ task: "task";
274
+ line: "line";
275
+ notice: "notice";
276
+ }>;
277
+ text: z.ZodOptional<z.ZodString>;
278
+ format: z.ZodOptional<z.ZodEnum<{
279
+ plain: "plain";
280
+ md: "md";
281
+ }>>;
282
+ thread: z.ZodOptional<z.ZodString>;
283
+ broadcast: z.ZodOptional<z.ZodBoolean>;
284
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
285
+ p: z.ZodString;
286
+ }, z.core.$strict>, z.ZodObject<{
287
+ all: z.ZodLiteral<"channel">;
288
+ }, z.core.$strict>, z.ZodObject<{
289
+ all: z.ZodLiteral<"here">;
290
+ }, z.core.$strict>]>>>;
291
+ mentionsMe: z.ZodBoolean;
292
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
293
+ blob: z.ZodString;
294
+ name: z.ZodString;
295
+ mime: z.ZodString;
296
+ bytes: z.ZodNumber;
297
+ }, z.core.$strip>>>;
298
+ edited: z.ZodOptional<z.ZodNumber>;
299
+ deleted: z.ZodOptional<z.ZodBoolean>;
300
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
301
+ key: z.ZodString;
302
+ count: z.ZodNumber;
303
+ mine: z.ZodBoolean;
304
+ }, z.core.$strip>>>;
305
+ pinned: z.ZodOptional<z.ZodBoolean>;
306
+ replies: z.ZodOptional<z.ZodObject<{
307
+ count: z.ZodNumber;
308
+ lastAt: z.ZodNumber;
309
+ participants: z.ZodArray<z.ZodString>;
310
+ unread: z.ZodOptional<z.ZodNumber>;
311
+ following: z.ZodOptional<z.ZodBoolean>;
312
+ }, z.core.$strip>>;
313
+ task: z.ZodOptional<z.ZodObject<{
314
+ id: z.ZodString;
315
+ state: z.ZodEnum<{
316
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
317
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
318
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
319
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
320
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
321
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
322
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
323
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
324
+ }>;
325
+ }, z.core.$strip>>;
326
+ notice: z.ZodOptional<z.ZodObject<{
327
+ op: z.ZodEnum<{
328
+ role: "role";
329
+ remove: "remove";
330
+ accept: "accept";
331
+ settings: "settings";
332
+ create: "create";
333
+ add: "add";
334
+ join: "join";
335
+ leave: "leave";
336
+ seat: "seat";
337
+ archive: "archive";
338
+ policy: "policy";
339
+ meta: "meta";
340
+ }>;
341
+ by: z.ZodObject<{
342
+ name: z.ZodString;
343
+ kind: z.ZodEnum<{
344
+ person: "person";
345
+ agent: "agent";
346
+ }>;
347
+ p: z.ZodString;
348
+ }, z.core.$strip>;
349
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
350
+ name: z.ZodString;
351
+ kind: z.ZodEnum<{
352
+ person: "person";
353
+ agent: "agent";
354
+ }>;
355
+ p: z.ZodString;
356
+ }, z.core.$strip>>>;
357
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
358
+ name: "name";
359
+ history: "history";
360
+ purpose: "purpose";
361
+ agentContext: "agentContext";
362
+ bridges: "bridges";
363
+ visibility: "visibility";
364
+ retainDays: "retainDays";
365
+ post: "post";
366
+ invite: "invite";
367
+ pins: "pins";
368
+ topic: "topic";
369
+ }>>>;
370
+ }, z.core.$strip>>;
371
+ delivery: z.ZodOptional<z.ZodEnum<{
372
+ delivered: "delivered";
373
+ read: "read";
374
+ pending: "pending";
375
+ failed: "failed";
376
+ sent: "sent";
377
+ }>>;
378
+ clientId: z.ZodOptional<z.ZodString>;
379
+ }, z.core.$strip>>;
380
+ more: z.ZodBoolean;
381
+ cursor: z.ZodOptional<z.ZodString>;
382
+ }, z.core.$strip>, z.ZodObject<{
383
+ stage: z.ZodLiteral<"held">;
384
+ code: z.ZodEnum<{
385
+ audience: "audience";
386
+ context: "context";
387
+ }>;
388
+ expect: z.ZodLiteral<"on_consent">;
389
+ }, z.core.$strip>]>;
390
+ export declare const ConvSendParams: z.ZodObject<{
391
+ answer: z.ZodOptional<z.ZodString>;
392
+ clientId: z.ZodString;
393
+ text: z.ZodString;
394
+ format: z.ZodOptional<z.ZodEnum<{
395
+ plain: "plain";
396
+ md: "md";
397
+ }>>;
398
+ thread: z.ZodOptional<z.ZodString>;
399
+ broadcast: z.ZodOptional<z.ZodBoolean>;
400
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
401
+ p: z.ZodString;
402
+ }, z.core.$strict>, z.ZodObject<{
403
+ all: z.ZodLiteral<"channel">;
404
+ }, z.core.$strict>, z.ZodObject<{
405
+ all: z.ZodLiteral<"here">;
406
+ }, z.core.$strict>]>>>;
407
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
408
+ blob: z.ZodString;
409
+ key: z.ZodString;
410
+ nonce: z.ZodString;
411
+ sha256: z.ZodString;
412
+ bytes: z.ZodNumber;
413
+ mime: z.ZodString;
414
+ name: z.ZodString;
415
+ thumb: z.ZodOptional<z.ZodString>;
416
+ }, z.core.$strict>>>;
417
+ key: z.ZodOptional<z.ZodString>;
418
+ cid: z.ZodOptional<z.ZodString>;
419
+ to: z.ZodOptional<z.ZodString>;
420
+ }, z.core.$strict>;
421
+ export declare const ConvSendResult: z.ZodUnion<readonly [z.ZodObject<{
422
+ cid: z.ZodString;
423
+ id: z.ZodString;
424
+ clientId: z.ZodString;
425
+ stage: z.ZodLiteral<"pending">;
426
+ }, z.core.$strip>, z.ZodObject<{
427
+ stage: z.ZodLiteral<"held">;
428
+ code: z.ZodEnum<{
429
+ audience: "audience";
430
+ context: "context";
431
+ }>;
432
+ expect: z.ZodLiteral<"on_consent">;
433
+ }, z.core.$strip>]>;
434
+ export declare const ConvSyncParams: z.ZodObject<{
435
+ key: z.ZodOptional<z.ZodString>;
436
+ after: z.ZodOptional<z.ZodNumber>;
437
+ waitMs: z.ZodOptional<z.ZodNumber>;
438
+ limit: z.ZodOptional<z.ZodNumber>;
439
+ }, z.core.$strict>;
440
+ export declare const ConvSyncResult: z.ZodObject<{
441
+ events: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
442
+ type: z.ZodLiteral<"event">;
443
+ pos: z.ZodNumber;
444
+ event: z.ZodObject<{
445
+ cid: z.ZodString;
446
+ id: z.ZodString;
447
+ seq: z.ZodNumber;
448
+ at: z.ZodNumber;
449
+ author: z.ZodObject<{
450
+ name: z.ZodString;
451
+ kind: z.ZodEnum<{
452
+ person: "person";
453
+ agent: "agent";
454
+ }>;
455
+ p: z.ZodString;
456
+ }, z.core.$strip>;
457
+ kind: z.ZodEnum<{
458
+ task: "task";
459
+ line: "line";
460
+ notice: "notice";
461
+ }>;
462
+ text: z.ZodOptional<z.ZodString>;
463
+ format: z.ZodOptional<z.ZodEnum<{
464
+ plain: "plain";
465
+ md: "md";
466
+ }>>;
467
+ thread: z.ZodOptional<z.ZodString>;
468
+ broadcast: z.ZodOptional<z.ZodBoolean>;
469
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
470
+ p: z.ZodString;
471
+ }, z.core.$strict>, z.ZodObject<{
472
+ all: z.ZodLiteral<"channel">;
473
+ }, z.core.$strict>, z.ZodObject<{
474
+ all: z.ZodLiteral<"here">;
475
+ }, z.core.$strict>]>>>;
476
+ mentionsMe: z.ZodBoolean;
477
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
478
+ blob: z.ZodString;
479
+ name: z.ZodString;
480
+ mime: z.ZodString;
481
+ bytes: z.ZodNumber;
482
+ }, z.core.$strip>>>;
483
+ edited: z.ZodOptional<z.ZodNumber>;
484
+ deleted: z.ZodOptional<z.ZodBoolean>;
485
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
486
+ key: z.ZodString;
487
+ count: z.ZodNumber;
488
+ mine: z.ZodBoolean;
489
+ }, z.core.$strip>>>;
490
+ pinned: z.ZodOptional<z.ZodBoolean>;
491
+ replies: z.ZodOptional<z.ZodObject<{
492
+ count: z.ZodNumber;
493
+ lastAt: z.ZodNumber;
494
+ participants: z.ZodArray<z.ZodString>;
495
+ unread: z.ZodOptional<z.ZodNumber>;
496
+ following: z.ZodOptional<z.ZodBoolean>;
497
+ }, z.core.$strip>>;
498
+ task: z.ZodOptional<z.ZodObject<{
499
+ id: z.ZodString;
500
+ state: z.ZodEnum<{
501
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
502
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
503
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
504
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
505
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
506
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
507
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
508
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
509
+ }>;
510
+ }, z.core.$strip>>;
511
+ notice: z.ZodOptional<z.ZodObject<{
512
+ op: z.ZodEnum<{
513
+ role: "role";
514
+ remove: "remove";
515
+ accept: "accept";
516
+ settings: "settings";
517
+ create: "create";
518
+ add: "add";
519
+ join: "join";
520
+ leave: "leave";
521
+ seat: "seat";
522
+ archive: "archive";
523
+ policy: "policy";
524
+ meta: "meta";
525
+ }>;
526
+ by: z.ZodObject<{
527
+ name: z.ZodString;
528
+ kind: z.ZodEnum<{
529
+ person: "person";
530
+ agent: "agent";
531
+ }>;
532
+ p: z.ZodString;
533
+ }, z.core.$strip>;
534
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
535
+ name: z.ZodString;
536
+ kind: z.ZodEnum<{
537
+ person: "person";
538
+ agent: "agent";
539
+ }>;
540
+ p: z.ZodString;
541
+ }, z.core.$strip>>>;
542
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
543
+ name: "name";
544
+ history: "history";
545
+ purpose: "purpose";
546
+ agentContext: "agentContext";
547
+ bridges: "bridges";
548
+ visibility: "visibility";
549
+ retainDays: "retainDays";
550
+ post: "post";
551
+ invite: "invite";
552
+ pins: "pins";
553
+ topic: "topic";
554
+ }>>>;
555
+ }, z.core.$strip>>;
556
+ delivery: z.ZodOptional<z.ZodEnum<{
557
+ delivered: "delivered";
558
+ read: "read";
559
+ pending: "pending";
560
+ failed: "failed";
561
+ sent: "sent";
562
+ }>>;
563
+ clientId: z.ZodOptional<z.ZodString>;
564
+ }, z.core.$strip>;
565
+ }, z.core.$strip>, z.ZodObject<{
566
+ type: z.ZodLiteral<"event.update">;
567
+ pos: z.ZodNumber;
568
+ cid: z.ZodString;
569
+ id: z.ZodString;
570
+ change: z.ZodEnum<{
571
+ task: "task";
572
+ edit: "edit";
573
+ delete: "delete";
574
+ react: "react";
575
+ pin: "pin";
576
+ replies: "replies";
577
+ delivery: "delivery";
578
+ }>;
579
+ event: z.ZodObject<{
580
+ cid: z.ZodString;
581
+ id: z.ZodString;
582
+ seq: z.ZodNumber;
583
+ at: z.ZodNumber;
584
+ author: z.ZodObject<{
585
+ name: z.ZodString;
586
+ kind: z.ZodEnum<{
587
+ person: "person";
588
+ agent: "agent";
589
+ }>;
590
+ p: z.ZodString;
591
+ }, z.core.$strip>;
592
+ kind: z.ZodEnum<{
593
+ task: "task";
594
+ line: "line";
595
+ notice: "notice";
596
+ }>;
597
+ text: z.ZodOptional<z.ZodString>;
598
+ format: z.ZodOptional<z.ZodEnum<{
599
+ plain: "plain";
600
+ md: "md";
601
+ }>>;
602
+ thread: z.ZodOptional<z.ZodString>;
603
+ broadcast: z.ZodOptional<z.ZodBoolean>;
604
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
605
+ p: z.ZodString;
606
+ }, z.core.$strict>, z.ZodObject<{
607
+ all: z.ZodLiteral<"channel">;
608
+ }, z.core.$strict>, z.ZodObject<{
609
+ all: z.ZodLiteral<"here">;
610
+ }, z.core.$strict>]>>>;
611
+ mentionsMe: z.ZodBoolean;
612
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
613
+ blob: z.ZodString;
614
+ name: z.ZodString;
615
+ mime: z.ZodString;
616
+ bytes: z.ZodNumber;
617
+ }, z.core.$strip>>>;
618
+ edited: z.ZodOptional<z.ZodNumber>;
619
+ deleted: z.ZodOptional<z.ZodBoolean>;
620
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
621
+ key: z.ZodString;
622
+ count: z.ZodNumber;
623
+ mine: z.ZodBoolean;
624
+ }, z.core.$strip>>>;
625
+ pinned: z.ZodOptional<z.ZodBoolean>;
626
+ replies: z.ZodOptional<z.ZodObject<{
627
+ count: z.ZodNumber;
628
+ lastAt: z.ZodNumber;
629
+ participants: z.ZodArray<z.ZodString>;
630
+ unread: z.ZodOptional<z.ZodNumber>;
631
+ following: z.ZodOptional<z.ZodBoolean>;
632
+ }, z.core.$strip>>;
633
+ task: z.ZodOptional<z.ZodObject<{
634
+ id: z.ZodString;
635
+ state: z.ZodEnum<{
636
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
637
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
638
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
639
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
640
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
641
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
642
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
643
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
644
+ }>;
645
+ }, z.core.$strip>>;
646
+ notice: z.ZodOptional<z.ZodObject<{
647
+ op: z.ZodEnum<{
648
+ role: "role";
649
+ remove: "remove";
650
+ accept: "accept";
651
+ settings: "settings";
652
+ create: "create";
653
+ add: "add";
654
+ join: "join";
655
+ leave: "leave";
656
+ seat: "seat";
657
+ archive: "archive";
658
+ policy: "policy";
659
+ meta: "meta";
660
+ }>;
661
+ by: z.ZodObject<{
662
+ name: z.ZodString;
663
+ kind: z.ZodEnum<{
664
+ person: "person";
665
+ agent: "agent";
666
+ }>;
667
+ p: z.ZodString;
668
+ }, z.core.$strip>;
669
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
670
+ name: z.ZodString;
671
+ kind: z.ZodEnum<{
672
+ person: "person";
673
+ agent: "agent";
674
+ }>;
675
+ p: z.ZodString;
676
+ }, z.core.$strip>>>;
677
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
678
+ name: "name";
679
+ history: "history";
680
+ purpose: "purpose";
681
+ agentContext: "agentContext";
682
+ bridges: "bridges";
683
+ visibility: "visibility";
684
+ retainDays: "retainDays";
685
+ post: "post";
686
+ invite: "invite";
687
+ pins: "pins";
688
+ topic: "topic";
689
+ }>>>;
690
+ }, z.core.$strip>>;
691
+ delivery: z.ZodOptional<z.ZodEnum<{
692
+ delivered: "delivered";
693
+ read: "read";
694
+ pending: "pending";
695
+ failed: "failed";
696
+ sent: "sent";
697
+ }>>;
698
+ clientId: z.ZodOptional<z.ZodString>;
699
+ }, z.core.$strip>;
700
+ }, z.core.$strip>, z.ZodObject<{
701
+ type: z.ZodLiteral<"conv">;
702
+ pos: z.ZodNumber;
703
+ conv: z.ZodObject<{
704
+ cid: z.ZodString;
705
+ kind: z.ZodEnum<{
706
+ self: "self";
707
+ channel: "channel";
708
+ group: "group";
709
+ dm: "dm";
710
+ }>;
711
+ visibility: z.ZodOptional<z.ZodEnum<{
712
+ public: "public";
713
+ private: "private";
714
+ }>>;
715
+ history: z.ZodEnum<{
716
+ none: "none";
717
+ shared: "shared";
718
+ }>;
719
+ retainDays: z.ZodNumber;
720
+ agentContext: z.ZodEnum<{
721
+ none: "none";
722
+ members: "members";
723
+ seats: "seats";
724
+ }>;
725
+ name: z.ZodOptional<z.ZodString>;
726
+ topic: z.ZodOptional<z.ZodString>;
727
+ purpose: z.ZodOptional<z.ZodString>;
728
+ archived: z.ZodBoolean;
729
+ role: z.ZodEnum<{
730
+ admin: "admin";
731
+ member: "member";
732
+ owner: "owner";
733
+ guest: "guest";
734
+ }>;
735
+ participants: z.ZodNumber;
736
+ dmWith: z.ZodOptional<z.ZodObject<{
737
+ p: z.ZodString;
738
+ kind: z.ZodEnum<{
739
+ person: "person";
740
+ agent: "agent";
741
+ }>;
742
+ role: z.ZodEnum<{
743
+ admin: "admin";
744
+ member: "member";
745
+ owner: "owner";
746
+ guest: "guest";
747
+ }>;
748
+ state: z.ZodEnum<{
749
+ member: "member";
750
+ invited: "invited";
751
+ }>;
752
+ name: z.ZodString;
753
+ handle: z.ZodOptional<z.ZodString>;
754
+ org: z.ZodEnum<{
755
+ other: "other";
756
+ none: "none";
757
+ same: "same";
758
+ }>;
759
+ presence: z.ZodEnum<{
760
+ unknown: "unknown";
761
+ away: "away";
762
+ offline: "offline";
763
+ online: "online";
764
+ }>;
765
+ agentState: z.ZodOptional<z.ZodEnum<{
766
+ idle: "idle";
767
+ busy: "busy";
768
+ kept: "kept";
769
+ }>>;
770
+ respondTo: z.ZodOptional<z.ZodEnum<{
771
+ self: "self";
772
+ none: "none";
773
+ members: "members";
774
+ }>>;
775
+ }, z.core.$strip>>;
776
+ last: z.ZodOptional<z.ZodObject<{
777
+ cid: z.ZodString;
778
+ id: z.ZodString;
779
+ seq: z.ZodNumber;
780
+ at: z.ZodNumber;
781
+ author: z.ZodObject<{
782
+ name: z.ZodString;
783
+ kind: z.ZodEnum<{
784
+ person: "person";
785
+ agent: "agent";
786
+ }>;
787
+ p: z.ZodString;
788
+ }, z.core.$strip>;
789
+ kind: z.ZodEnum<{
790
+ task: "task";
791
+ line: "line";
792
+ notice: "notice";
793
+ }>;
794
+ text: z.ZodOptional<z.ZodString>;
795
+ format: z.ZodOptional<z.ZodEnum<{
796
+ plain: "plain";
797
+ md: "md";
798
+ }>>;
799
+ thread: z.ZodOptional<z.ZodString>;
800
+ broadcast: z.ZodOptional<z.ZodBoolean>;
801
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
802
+ p: z.ZodString;
803
+ }, z.core.$strict>, z.ZodObject<{
804
+ all: z.ZodLiteral<"channel">;
805
+ }, z.core.$strict>, z.ZodObject<{
806
+ all: z.ZodLiteral<"here">;
807
+ }, z.core.$strict>]>>>;
808
+ mentionsMe: z.ZodBoolean;
809
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
810
+ blob: z.ZodString;
811
+ name: z.ZodString;
812
+ mime: z.ZodString;
813
+ bytes: z.ZodNumber;
814
+ }, z.core.$strip>>>;
815
+ edited: z.ZodOptional<z.ZodNumber>;
816
+ deleted: z.ZodOptional<z.ZodBoolean>;
817
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
818
+ key: z.ZodString;
819
+ count: z.ZodNumber;
820
+ mine: z.ZodBoolean;
821
+ }, z.core.$strip>>>;
822
+ pinned: z.ZodOptional<z.ZodBoolean>;
823
+ replies: z.ZodOptional<z.ZodObject<{
824
+ count: z.ZodNumber;
825
+ lastAt: z.ZodNumber;
826
+ participants: z.ZodArray<z.ZodString>;
827
+ unread: z.ZodOptional<z.ZodNumber>;
828
+ following: z.ZodOptional<z.ZodBoolean>;
829
+ }, z.core.$strip>>;
830
+ task: z.ZodOptional<z.ZodObject<{
831
+ id: z.ZodString;
832
+ state: z.ZodEnum<{
833
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
834
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
835
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
836
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
837
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
838
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
839
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
840
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
841
+ }>;
842
+ }, z.core.$strip>>;
843
+ notice: z.ZodOptional<z.ZodObject<{
844
+ op: z.ZodEnum<{
845
+ role: "role";
846
+ remove: "remove";
847
+ accept: "accept";
848
+ settings: "settings";
849
+ create: "create";
850
+ add: "add";
851
+ join: "join";
852
+ leave: "leave";
853
+ seat: "seat";
854
+ archive: "archive";
855
+ policy: "policy";
856
+ meta: "meta";
857
+ }>;
858
+ by: z.ZodObject<{
859
+ name: z.ZodString;
860
+ kind: z.ZodEnum<{
861
+ person: "person";
862
+ agent: "agent";
863
+ }>;
864
+ p: z.ZodString;
865
+ }, z.core.$strip>;
866
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
867
+ name: z.ZodString;
868
+ kind: z.ZodEnum<{
869
+ person: "person";
870
+ agent: "agent";
871
+ }>;
872
+ p: z.ZodString;
873
+ }, z.core.$strip>>>;
874
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
875
+ name: "name";
876
+ history: "history";
877
+ purpose: "purpose";
878
+ agentContext: "agentContext";
879
+ bridges: "bridges";
880
+ visibility: "visibility";
881
+ retainDays: "retainDays";
882
+ post: "post";
883
+ invite: "invite";
884
+ pins: "pins";
885
+ topic: "topic";
886
+ }>>>;
887
+ }, z.core.$strip>>;
888
+ delivery: z.ZodOptional<z.ZodEnum<{
889
+ delivered: "delivered";
890
+ read: "read";
891
+ pending: "pending";
892
+ failed: "failed";
893
+ sent: "sent";
894
+ }>>;
895
+ clientId: z.ZodOptional<z.ZodString>;
896
+ }, z.core.$strip>>;
897
+ headSeq: z.ZodNumber;
898
+ readUpTo: z.ZodOptional<z.ZodNumber>;
899
+ unread: z.ZodOptional<z.ZodNumber>;
900
+ mentions: z.ZodOptional<z.ZodNumber>;
901
+ threadsUnread: z.ZodOptional<z.ZodNumber>;
902
+ notify: z.ZodOptional<z.ZodEnum<{
903
+ none: "none";
904
+ all: "all";
905
+ mentions: "mentions";
906
+ }>>;
907
+ mutedUntil: z.ZodOptional<z.ZodNumber>;
908
+ draft: z.ZodOptional<z.ZodString>;
909
+ }, z.core.$strip>;
910
+ }, z.core.$strip>, z.ZodObject<{
911
+ type: z.ZodLiteral<"member">;
912
+ pos: z.ZodNumber;
913
+ cid: z.ZodString;
914
+ participant: z.ZodObject<{
915
+ p: z.ZodString;
916
+ kind: z.ZodEnum<{
917
+ person: "person";
918
+ agent: "agent";
919
+ }>;
920
+ role: z.ZodEnum<{
921
+ admin: "admin";
922
+ member: "member";
923
+ owner: "owner";
924
+ guest: "guest";
925
+ }>;
926
+ state: z.ZodEnum<{
927
+ member: "member";
928
+ invited: "invited";
929
+ }>;
930
+ name: z.ZodString;
931
+ handle: z.ZodOptional<z.ZodString>;
932
+ org: z.ZodEnum<{
933
+ other: "other";
934
+ none: "none";
935
+ same: "same";
936
+ }>;
937
+ presence: z.ZodEnum<{
938
+ unknown: "unknown";
939
+ away: "away";
940
+ offline: "offline";
941
+ online: "online";
942
+ }>;
943
+ agentState: z.ZodOptional<z.ZodEnum<{
944
+ idle: "idle";
945
+ busy: "busy";
946
+ kept: "kept";
947
+ }>>;
948
+ respondTo: z.ZodOptional<z.ZodEnum<{
949
+ self: "self";
950
+ none: "none";
951
+ members: "members";
952
+ }>>;
953
+ }, z.core.$strip>;
954
+ change: z.ZodEnum<{
955
+ role: "role";
956
+ removed: "removed";
957
+ added: "added";
958
+ invited: "invited";
959
+ seat: "seat";
960
+ presence: "presence";
961
+ }>;
962
+ }, z.core.$strip>, z.ZodObject<{
963
+ type: z.ZodLiteral<"read">;
964
+ pos: z.ZodNumber;
965
+ cid: z.ZodString;
966
+ readUpTo: z.ZodNumber;
967
+ unread: z.ZodNumber;
968
+ mentions: z.ZodNumber;
969
+ }, z.core.$strip>, z.ZodObject<{
970
+ type: z.ZodLiteral<"typing">;
971
+ cid: z.ZodString;
972
+ p: z.ZodString;
973
+ thread: z.ZodOptional<z.ZodString>;
974
+ until: z.ZodNumber;
975
+ }, z.core.$strip>, z.ZodObject<{
976
+ type: z.ZodLiteral<"activity">;
977
+ body: z.ZodObject<{
978
+ session: z.ZodString;
979
+ turn: z.ZodString;
980
+ seq: z.ZodNumber;
981
+ source: z.ZodOptional<z.ZodObject<{
982
+ item: z.ZodOptional<z.ZodString>;
983
+ cid: z.ZodOptional<z.ZodString>;
984
+ task: z.ZodOptional<z.ZodString>;
985
+ }, z.core.$strip>>;
986
+ kind: z.ZodEnum<{
987
+ error: "error";
988
+ cancelled: "cancelled";
989
+ turn_started: "turn_started";
990
+ step: "step";
991
+ turn_ended: "turn_ended";
992
+ }>;
993
+ summary: z.ZodOptional<z.ZodString>;
994
+ }, z.core.$strip>;
995
+ }, z.core.$strip>, z.ZodObject<{
996
+ type: z.ZodLiteral<"gap">;
997
+ pos: z.ZodNumber;
998
+ }, z.core.$strip>], "type">>;
999
+ pos: z.ZodNumber;
1000
+ }, z.core.$strip>;
1001
+ export declare const ConvCreateParams: z.ZodObject<{
1002
+ kind: z.ZodEnum<{
1003
+ channel: "channel";
1004
+ group: "group";
1005
+ dm: "dm";
1006
+ }>;
1007
+ participants: z.ZodArray<z.ZodObject<{
1008
+ p: z.ZodString;
1009
+ role: z.ZodEnum<{
1010
+ admin: "admin";
1011
+ member: "member";
1012
+ owner: "owner";
1013
+ guest: "guest";
1014
+ }>;
1015
+ device: z.ZodOptional<z.ZodString>;
1016
+ respondTo: z.ZodOptional<z.ZodEnum<{
1017
+ self: "self";
1018
+ none: "none";
1019
+ members: "members";
1020
+ }>>;
1021
+ }, z.core.$strict>>;
1022
+ visibility: z.ZodOptional<z.ZodEnum<{
1023
+ public: "public";
1024
+ private: "private";
1025
+ }>>;
1026
+ history: z.ZodEnum<{
1027
+ none: "none";
1028
+ shared: "shared";
1029
+ }>;
1030
+ retainDays: z.ZodNumber;
1031
+ meta: z.ZodOptional<z.ZodObject<{
1032
+ name: z.ZodOptional<z.ZodString>;
1033
+ topic: z.ZodOptional<z.ZodString>;
1034
+ purpose: z.ZodOptional<z.ZodString>;
1035
+ }, z.core.$strict>>;
1036
+ }, z.core.$strict>;
1037
+ export declare const ConvSeatParams: z.ZodObject<{
1038
+ p: z.ZodString;
1039
+ device: z.ZodOptional<z.ZodString>;
1040
+ respondTo: z.ZodOptional<z.ZodEnum<{
1041
+ self: "self";
1042
+ none: "none";
1043
+ members: "members";
1044
+ }>>;
1045
+ cid: z.ZodString;
1046
+ }, z.core.$strict>;
1047
+ export declare const PeopleGetParams: z.ZodObject<{
1048
+ people: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
1049
+ }, z.core.$strict>;
1050
+ export declare const PeopleGetResult: z.ZodObject<{
1051
+ people: z.ZodArray<z.ZodObject<{
1052
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1053
+ name: z.ZodString;
1054
+ handle: z.ZodString;
1055
+ org: z.ZodEnum<{
1056
+ other: "other";
1057
+ none: "none";
1058
+ same: "same";
1059
+ }>;
1060
+ vouched: z.ZodEnum<{
1061
+ admin: "admin";
1062
+ device: "device";
1063
+ jelly: "jelly";
1064
+ service: "service";
1065
+ }>;
1066
+ }, z.core.$strip>>;
1067
+ missing: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
1068
+ }, z.core.$strip>;
1069
+ /** Socket tiers are declared alongside this table below. */
1070
+ export declare const CONVERSATION_METHODS: {
1071
+ readonly "conv.list": {
1072
+ params: z.ZodObject<{
1073
+ limit: z.ZodOptional<z.ZodNumber>;
1074
+ cursor: z.ZodOptional<z.ZodString>;
1075
+ key: z.ZodOptional<z.ZodString>;
1076
+ filter: z.ZodOptional<z.ZodObject<{
1077
+ unread: z.ZodOptional<z.ZodBoolean>;
1078
+ mentions: z.ZodOptional<z.ZodBoolean>;
1079
+ kind: z.ZodOptional<z.ZodEnum<{
1080
+ self: "self";
1081
+ channel: "channel";
1082
+ group: "group";
1083
+ dm: "dm";
1084
+ }>>;
1085
+ archived: z.ZodOptional<z.ZodBoolean>;
1086
+ }, z.core.$strict>>;
1087
+ }, z.core.$strict>;
1088
+ result: z.ZodObject<{
1089
+ conversations: z.ZodArray<z.ZodObject<{
1090
+ cid: z.ZodString;
1091
+ kind: z.ZodEnum<{
1092
+ self: "self";
1093
+ channel: "channel";
1094
+ group: "group";
1095
+ dm: "dm";
1096
+ }>;
1097
+ visibility: z.ZodOptional<z.ZodEnum<{
1098
+ public: "public";
1099
+ private: "private";
1100
+ }>>;
1101
+ history: z.ZodEnum<{
1102
+ none: "none";
1103
+ shared: "shared";
1104
+ }>;
1105
+ retainDays: z.ZodNumber;
1106
+ agentContext: z.ZodEnum<{
1107
+ none: "none";
1108
+ members: "members";
1109
+ seats: "seats";
1110
+ }>;
1111
+ name: z.ZodOptional<z.ZodString>;
1112
+ topic: z.ZodOptional<z.ZodString>;
1113
+ purpose: z.ZodOptional<z.ZodString>;
1114
+ archived: z.ZodBoolean;
1115
+ role: z.ZodEnum<{
1116
+ admin: "admin";
1117
+ member: "member";
1118
+ owner: "owner";
1119
+ guest: "guest";
1120
+ }>;
1121
+ participants: z.ZodNumber;
1122
+ dmWith: z.ZodOptional<z.ZodObject<{
1123
+ p: z.ZodString;
1124
+ kind: z.ZodEnum<{
1125
+ person: "person";
1126
+ agent: "agent";
1127
+ }>;
1128
+ role: z.ZodEnum<{
1129
+ admin: "admin";
1130
+ member: "member";
1131
+ owner: "owner";
1132
+ guest: "guest";
1133
+ }>;
1134
+ state: z.ZodEnum<{
1135
+ member: "member";
1136
+ invited: "invited";
1137
+ }>;
1138
+ name: z.ZodString;
1139
+ handle: z.ZodOptional<z.ZodString>;
1140
+ org: z.ZodEnum<{
1141
+ other: "other";
1142
+ none: "none";
1143
+ same: "same";
1144
+ }>;
1145
+ presence: z.ZodEnum<{
1146
+ unknown: "unknown";
1147
+ away: "away";
1148
+ offline: "offline";
1149
+ online: "online";
1150
+ }>;
1151
+ agentState: z.ZodOptional<z.ZodEnum<{
1152
+ idle: "idle";
1153
+ busy: "busy";
1154
+ kept: "kept";
1155
+ }>>;
1156
+ respondTo: z.ZodOptional<z.ZodEnum<{
1157
+ self: "self";
1158
+ none: "none";
1159
+ members: "members";
1160
+ }>>;
1161
+ }, z.core.$strip>>;
1162
+ last: z.ZodOptional<z.ZodObject<{
1163
+ cid: z.ZodString;
1164
+ id: z.ZodString;
1165
+ seq: z.ZodNumber;
1166
+ at: z.ZodNumber;
1167
+ author: z.ZodObject<{
1168
+ name: z.ZodString;
1169
+ kind: z.ZodEnum<{
1170
+ person: "person";
1171
+ agent: "agent";
1172
+ }>;
1173
+ p: z.ZodString;
1174
+ }, z.core.$strip>;
1175
+ kind: z.ZodEnum<{
1176
+ task: "task";
1177
+ line: "line";
1178
+ notice: "notice";
1179
+ }>;
1180
+ text: z.ZodOptional<z.ZodString>;
1181
+ format: z.ZodOptional<z.ZodEnum<{
1182
+ plain: "plain";
1183
+ md: "md";
1184
+ }>>;
1185
+ thread: z.ZodOptional<z.ZodString>;
1186
+ broadcast: z.ZodOptional<z.ZodBoolean>;
1187
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1188
+ p: z.ZodString;
1189
+ }, z.core.$strict>, z.ZodObject<{
1190
+ all: z.ZodLiteral<"channel">;
1191
+ }, z.core.$strict>, z.ZodObject<{
1192
+ all: z.ZodLiteral<"here">;
1193
+ }, z.core.$strict>]>>>;
1194
+ mentionsMe: z.ZodBoolean;
1195
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
1196
+ blob: z.ZodString;
1197
+ name: z.ZodString;
1198
+ mime: z.ZodString;
1199
+ bytes: z.ZodNumber;
1200
+ }, z.core.$strip>>>;
1201
+ edited: z.ZodOptional<z.ZodNumber>;
1202
+ deleted: z.ZodOptional<z.ZodBoolean>;
1203
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1204
+ key: z.ZodString;
1205
+ count: z.ZodNumber;
1206
+ mine: z.ZodBoolean;
1207
+ }, z.core.$strip>>>;
1208
+ pinned: z.ZodOptional<z.ZodBoolean>;
1209
+ replies: z.ZodOptional<z.ZodObject<{
1210
+ count: z.ZodNumber;
1211
+ lastAt: z.ZodNumber;
1212
+ participants: z.ZodArray<z.ZodString>;
1213
+ unread: z.ZodOptional<z.ZodNumber>;
1214
+ following: z.ZodOptional<z.ZodBoolean>;
1215
+ }, z.core.$strip>>;
1216
+ task: z.ZodOptional<z.ZodObject<{
1217
+ id: z.ZodString;
1218
+ state: z.ZodEnum<{
1219
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
1220
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
1221
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
1222
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
1223
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
1224
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
1225
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1226
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1227
+ }>;
1228
+ }, z.core.$strip>>;
1229
+ notice: z.ZodOptional<z.ZodObject<{
1230
+ op: z.ZodEnum<{
1231
+ role: "role";
1232
+ remove: "remove";
1233
+ accept: "accept";
1234
+ settings: "settings";
1235
+ create: "create";
1236
+ add: "add";
1237
+ join: "join";
1238
+ leave: "leave";
1239
+ seat: "seat";
1240
+ archive: "archive";
1241
+ policy: "policy";
1242
+ meta: "meta";
1243
+ }>;
1244
+ by: z.ZodObject<{
1245
+ name: z.ZodString;
1246
+ kind: z.ZodEnum<{
1247
+ person: "person";
1248
+ agent: "agent";
1249
+ }>;
1250
+ p: z.ZodString;
1251
+ }, z.core.$strip>;
1252
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
1253
+ name: z.ZodString;
1254
+ kind: z.ZodEnum<{
1255
+ person: "person";
1256
+ agent: "agent";
1257
+ }>;
1258
+ p: z.ZodString;
1259
+ }, z.core.$strip>>>;
1260
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1261
+ name: "name";
1262
+ history: "history";
1263
+ purpose: "purpose";
1264
+ agentContext: "agentContext";
1265
+ bridges: "bridges";
1266
+ visibility: "visibility";
1267
+ retainDays: "retainDays";
1268
+ post: "post";
1269
+ invite: "invite";
1270
+ pins: "pins";
1271
+ topic: "topic";
1272
+ }>>>;
1273
+ }, z.core.$strip>>;
1274
+ delivery: z.ZodOptional<z.ZodEnum<{
1275
+ delivered: "delivered";
1276
+ read: "read";
1277
+ pending: "pending";
1278
+ failed: "failed";
1279
+ sent: "sent";
1280
+ }>>;
1281
+ clientId: z.ZodOptional<z.ZodString>;
1282
+ }, z.core.$strip>>;
1283
+ headSeq: z.ZodNumber;
1284
+ readUpTo: z.ZodOptional<z.ZodNumber>;
1285
+ unread: z.ZodOptional<z.ZodNumber>;
1286
+ mentions: z.ZodOptional<z.ZodNumber>;
1287
+ threadsUnread: z.ZodOptional<z.ZodNumber>;
1288
+ notify: z.ZodOptional<z.ZodEnum<{
1289
+ none: "none";
1290
+ all: "all";
1291
+ mentions: "mentions";
1292
+ }>>;
1293
+ mutedUntil: z.ZodOptional<z.ZodNumber>;
1294
+ draft: z.ZodOptional<z.ZodString>;
1295
+ }, z.core.$strip>>;
1296
+ cursor: z.ZodOptional<z.ZodString>;
1297
+ }, z.core.$strip>;
1298
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
1299
+ };
1300
+ readonly "conv.get": {
1301
+ params: z.ZodObject<{
1302
+ cid: z.ZodString;
1303
+ key: z.ZodOptional<z.ZodString>;
1304
+ }, z.core.$strict>;
1305
+ result: z.ZodObject<{
1306
+ cid: z.ZodString;
1307
+ kind: z.ZodEnum<{
1308
+ self: "self";
1309
+ channel: "channel";
1310
+ group: "group";
1311
+ dm: "dm";
1312
+ }>;
1313
+ visibility: z.ZodOptional<z.ZodEnum<{
1314
+ public: "public";
1315
+ private: "private";
1316
+ }>>;
1317
+ history: z.ZodEnum<{
1318
+ none: "none";
1319
+ shared: "shared";
1320
+ }>;
1321
+ retainDays: z.ZodNumber;
1322
+ agentContext: z.ZodEnum<{
1323
+ none: "none";
1324
+ members: "members";
1325
+ seats: "seats";
1326
+ }>;
1327
+ name: z.ZodOptional<z.ZodString>;
1328
+ topic: z.ZodOptional<z.ZodString>;
1329
+ purpose: z.ZodOptional<z.ZodString>;
1330
+ archived: z.ZodBoolean;
1331
+ role: z.ZodEnum<{
1332
+ admin: "admin";
1333
+ member: "member";
1334
+ owner: "owner";
1335
+ guest: "guest";
1336
+ }>;
1337
+ participants: z.ZodNumber;
1338
+ dmWith: z.ZodOptional<z.ZodObject<{
1339
+ p: z.ZodString;
1340
+ kind: z.ZodEnum<{
1341
+ person: "person";
1342
+ agent: "agent";
1343
+ }>;
1344
+ role: z.ZodEnum<{
1345
+ admin: "admin";
1346
+ member: "member";
1347
+ owner: "owner";
1348
+ guest: "guest";
1349
+ }>;
1350
+ state: z.ZodEnum<{
1351
+ member: "member";
1352
+ invited: "invited";
1353
+ }>;
1354
+ name: z.ZodString;
1355
+ handle: z.ZodOptional<z.ZodString>;
1356
+ org: z.ZodEnum<{
1357
+ other: "other";
1358
+ none: "none";
1359
+ same: "same";
1360
+ }>;
1361
+ presence: z.ZodEnum<{
1362
+ unknown: "unknown";
1363
+ away: "away";
1364
+ offline: "offline";
1365
+ online: "online";
1366
+ }>;
1367
+ agentState: z.ZodOptional<z.ZodEnum<{
1368
+ idle: "idle";
1369
+ busy: "busy";
1370
+ kept: "kept";
1371
+ }>>;
1372
+ respondTo: z.ZodOptional<z.ZodEnum<{
1373
+ self: "self";
1374
+ none: "none";
1375
+ members: "members";
1376
+ }>>;
1377
+ }, z.core.$strip>>;
1378
+ last: z.ZodOptional<z.ZodObject<{
1379
+ cid: z.ZodString;
1380
+ id: z.ZodString;
1381
+ seq: z.ZodNumber;
1382
+ at: z.ZodNumber;
1383
+ author: z.ZodObject<{
1384
+ name: z.ZodString;
1385
+ kind: z.ZodEnum<{
1386
+ person: "person";
1387
+ agent: "agent";
1388
+ }>;
1389
+ p: z.ZodString;
1390
+ }, z.core.$strip>;
1391
+ kind: z.ZodEnum<{
1392
+ task: "task";
1393
+ line: "line";
1394
+ notice: "notice";
1395
+ }>;
1396
+ text: z.ZodOptional<z.ZodString>;
1397
+ format: z.ZodOptional<z.ZodEnum<{
1398
+ plain: "plain";
1399
+ md: "md";
1400
+ }>>;
1401
+ thread: z.ZodOptional<z.ZodString>;
1402
+ broadcast: z.ZodOptional<z.ZodBoolean>;
1403
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1404
+ p: z.ZodString;
1405
+ }, z.core.$strict>, z.ZodObject<{
1406
+ all: z.ZodLiteral<"channel">;
1407
+ }, z.core.$strict>, z.ZodObject<{
1408
+ all: z.ZodLiteral<"here">;
1409
+ }, z.core.$strict>]>>>;
1410
+ mentionsMe: z.ZodBoolean;
1411
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
1412
+ blob: z.ZodString;
1413
+ name: z.ZodString;
1414
+ mime: z.ZodString;
1415
+ bytes: z.ZodNumber;
1416
+ }, z.core.$strip>>>;
1417
+ edited: z.ZodOptional<z.ZodNumber>;
1418
+ deleted: z.ZodOptional<z.ZodBoolean>;
1419
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1420
+ key: z.ZodString;
1421
+ count: z.ZodNumber;
1422
+ mine: z.ZodBoolean;
1423
+ }, z.core.$strip>>>;
1424
+ pinned: z.ZodOptional<z.ZodBoolean>;
1425
+ replies: z.ZodOptional<z.ZodObject<{
1426
+ count: z.ZodNumber;
1427
+ lastAt: z.ZodNumber;
1428
+ participants: z.ZodArray<z.ZodString>;
1429
+ unread: z.ZodOptional<z.ZodNumber>;
1430
+ following: z.ZodOptional<z.ZodBoolean>;
1431
+ }, z.core.$strip>>;
1432
+ task: z.ZodOptional<z.ZodObject<{
1433
+ id: z.ZodString;
1434
+ state: z.ZodEnum<{
1435
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
1436
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
1437
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
1438
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
1439
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
1440
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
1441
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1442
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1443
+ }>;
1444
+ }, z.core.$strip>>;
1445
+ notice: z.ZodOptional<z.ZodObject<{
1446
+ op: z.ZodEnum<{
1447
+ role: "role";
1448
+ remove: "remove";
1449
+ accept: "accept";
1450
+ settings: "settings";
1451
+ create: "create";
1452
+ add: "add";
1453
+ join: "join";
1454
+ leave: "leave";
1455
+ seat: "seat";
1456
+ archive: "archive";
1457
+ policy: "policy";
1458
+ meta: "meta";
1459
+ }>;
1460
+ by: z.ZodObject<{
1461
+ name: z.ZodString;
1462
+ kind: z.ZodEnum<{
1463
+ person: "person";
1464
+ agent: "agent";
1465
+ }>;
1466
+ p: z.ZodString;
1467
+ }, z.core.$strip>;
1468
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
1469
+ name: z.ZodString;
1470
+ kind: z.ZodEnum<{
1471
+ person: "person";
1472
+ agent: "agent";
1473
+ }>;
1474
+ p: z.ZodString;
1475
+ }, z.core.$strip>>>;
1476
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1477
+ name: "name";
1478
+ history: "history";
1479
+ purpose: "purpose";
1480
+ agentContext: "agentContext";
1481
+ bridges: "bridges";
1482
+ visibility: "visibility";
1483
+ retainDays: "retainDays";
1484
+ post: "post";
1485
+ invite: "invite";
1486
+ pins: "pins";
1487
+ topic: "topic";
1488
+ }>>>;
1489
+ }, z.core.$strip>>;
1490
+ delivery: z.ZodOptional<z.ZodEnum<{
1491
+ delivered: "delivered";
1492
+ read: "read";
1493
+ pending: "pending";
1494
+ failed: "failed";
1495
+ sent: "sent";
1496
+ }>>;
1497
+ clientId: z.ZodOptional<z.ZodString>;
1498
+ }, z.core.$strip>>;
1499
+ headSeq: z.ZodNumber;
1500
+ readUpTo: z.ZodOptional<z.ZodNumber>;
1501
+ unread: z.ZodOptional<z.ZodNumber>;
1502
+ mentions: z.ZodOptional<z.ZodNumber>;
1503
+ threadsUnread: z.ZodOptional<z.ZodNumber>;
1504
+ notify: z.ZodOptional<z.ZodEnum<{
1505
+ none: "none";
1506
+ all: "all";
1507
+ mentions: "mentions";
1508
+ }>>;
1509
+ mutedUntil: z.ZodOptional<z.ZodNumber>;
1510
+ draft: z.ZodOptional<z.ZodString>;
1511
+ }, z.core.$strip>;
1512
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
1513
+ };
1514
+ readonly "conv.members": {
1515
+ params: z.ZodObject<{
1516
+ limit: z.ZodOptional<z.ZodNumber>;
1517
+ cursor: z.ZodOptional<z.ZodString>;
1518
+ cid: z.ZodString;
1519
+ }, z.core.$strict>;
1520
+ result: z.ZodObject<{
1521
+ participants: z.ZodArray<z.ZodObject<{
1522
+ p: z.ZodString;
1523
+ kind: z.ZodEnum<{
1524
+ person: "person";
1525
+ agent: "agent";
1526
+ }>;
1527
+ role: z.ZodEnum<{
1528
+ admin: "admin";
1529
+ member: "member";
1530
+ owner: "owner";
1531
+ guest: "guest";
1532
+ }>;
1533
+ state: z.ZodEnum<{
1534
+ member: "member";
1535
+ invited: "invited";
1536
+ }>;
1537
+ name: z.ZodString;
1538
+ handle: z.ZodOptional<z.ZodString>;
1539
+ org: z.ZodEnum<{
1540
+ other: "other";
1541
+ none: "none";
1542
+ same: "same";
1543
+ }>;
1544
+ presence: z.ZodEnum<{
1545
+ unknown: "unknown";
1546
+ away: "away";
1547
+ offline: "offline";
1548
+ online: "online";
1549
+ }>;
1550
+ agentState: z.ZodOptional<z.ZodEnum<{
1551
+ idle: "idle";
1552
+ busy: "busy";
1553
+ kept: "kept";
1554
+ }>>;
1555
+ respondTo: z.ZodOptional<z.ZodEnum<{
1556
+ self: "self";
1557
+ none: "none";
1558
+ members: "members";
1559
+ }>>;
1560
+ }, z.core.$strip>>;
1561
+ cursor: z.ZodOptional<z.ZodString>;
1562
+ }, z.core.$strip>;
1563
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
1564
+ };
1565
+ readonly "conv.read": {
1566
+ params: z.ZodObject<{
1567
+ thread: z.ZodOptional<z.ZodString>;
1568
+ before: z.ZodOptional<z.ZodNumber>;
1569
+ after: z.ZodOptional<z.ZodNumber>;
1570
+ around: z.ZodOptional<z.ZodString>;
1571
+ limit: z.ZodOptional<z.ZodNumber>;
1572
+ cursor: z.ZodOptional<z.ZodString>;
1573
+ cid: z.ZodString;
1574
+ key: z.ZodOptional<z.ZodString>;
1575
+ }, z.core.$strict>;
1576
+ result: z.ZodUnion<readonly [z.ZodObject<{
1577
+ events: z.ZodArray<z.ZodObject<{
1578
+ cid: z.ZodString;
1579
+ id: z.ZodString;
1580
+ seq: z.ZodNumber;
1581
+ at: z.ZodNumber;
1582
+ author: z.ZodObject<{
1583
+ name: z.ZodString;
1584
+ kind: z.ZodEnum<{
1585
+ person: "person";
1586
+ agent: "agent";
1587
+ }>;
1588
+ p: z.ZodString;
1589
+ }, z.core.$strip>;
1590
+ kind: z.ZodEnum<{
1591
+ task: "task";
1592
+ line: "line";
1593
+ notice: "notice";
1594
+ }>;
1595
+ text: z.ZodOptional<z.ZodString>;
1596
+ format: z.ZodOptional<z.ZodEnum<{
1597
+ plain: "plain";
1598
+ md: "md";
1599
+ }>>;
1600
+ thread: z.ZodOptional<z.ZodString>;
1601
+ broadcast: z.ZodOptional<z.ZodBoolean>;
1602
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1603
+ p: z.ZodString;
1604
+ }, z.core.$strict>, z.ZodObject<{
1605
+ all: z.ZodLiteral<"channel">;
1606
+ }, z.core.$strict>, z.ZodObject<{
1607
+ all: z.ZodLiteral<"here">;
1608
+ }, z.core.$strict>]>>>;
1609
+ mentionsMe: z.ZodBoolean;
1610
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
1611
+ blob: z.ZodString;
1612
+ name: z.ZodString;
1613
+ mime: z.ZodString;
1614
+ bytes: z.ZodNumber;
1615
+ }, z.core.$strip>>>;
1616
+ edited: z.ZodOptional<z.ZodNumber>;
1617
+ deleted: z.ZodOptional<z.ZodBoolean>;
1618
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1619
+ key: z.ZodString;
1620
+ count: z.ZodNumber;
1621
+ mine: z.ZodBoolean;
1622
+ }, z.core.$strip>>>;
1623
+ pinned: z.ZodOptional<z.ZodBoolean>;
1624
+ replies: z.ZodOptional<z.ZodObject<{
1625
+ count: z.ZodNumber;
1626
+ lastAt: z.ZodNumber;
1627
+ participants: z.ZodArray<z.ZodString>;
1628
+ unread: z.ZodOptional<z.ZodNumber>;
1629
+ following: z.ZodOptional<z.ZodBoolean>;
1630
+ }, z.core.$strip>>;
1631
+ task: z.ZodOptional<z.ZodObject<{
1632
+ id: z.ZodString;
1633
+ state: z.ZodEnum<{
1634
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
1635
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
1636
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
1637
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
1638
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
1639
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
1640
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1641
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1642
+ }>;
1643
+ }, z.core.$strip>>;
1644
+ notice: z.ZodOptional<z.ZodObject<{
1645
+ op: z.ZodEnum<{
1646
+ role: "role";
1647
+ remove: "remove";
1648
+ accept: "accept";
1649
+ settings: "settings";
1650
+ create: "create";
1651
+ add: "add";
1652
+ join: "join";
1653
+ leave: "leave";
1654
+ seat: "seat";
1655
+ archive: "archive";
1656
+ policy: "policy";
1657
+ meta: "meta";
1658
+ }>;
1659
+ by: z.ZodObject<{
1660
+ name: z.ZodString;
1661
+ kind: z.ZodEnum<{
1662
+ person: "person";
1663
+ agent: "agent";
1664
+ }>;
1665
+ p: z.ZodString;
1666
+ }, z.core.$strip>;
1667
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
1668
+ name: z.ZodString;
1669
+ kind: z.ZodEnum<{
1670
+ person: "person";
1671
+ agent: "agent";
1672
+ }>;
1673
+ p: z.ZodString;
1674
+ }, z.core.$strip>>>;
1675
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1676
+ name: "name";
1677
+ history: "history";
1678
+ purpose: "purpose";
1679
+ agentContext: "agentContext";
1680
+ bridges: "bridges";
1681
+ visibility: "visibility";
1682
+ retainDays: "retainDays";
1683
+ post: "post";
1684
+ invite: "invite";
1685
+ pins: "pins";
1686
+ topic: "topic";
1687
+ }>>>;
1688
+ }, z.core.$strip>>;
1689
+ delivery: z.ZodOptional<z.ZodEnum<{
1690
+ delivered: "delivered";
1691
+ read: "read";
1692
+ pending: "pending";
1693
+ failed: "failed";
1694
+ sent: "sent";
1695
+ }>>;
1696
+ clientId: z.ZodOptional<z.ZodString>;
1697
+ }, z.core.$strip>>;
1698
+ more: z.ZodBoolean;
1699
+ cursor: z.ZodOptional<z.ZodString>;
1700
+ }, z.core.$strip>, z.ZodObject<{
1701
+ stage: z.ZodLiteral<"held">;
1702
+ code: z.ZodEnum<{
1703
+ audience: "audience";
1704
+ context: "context";
1705
+ }>;
1706
+ expect: z.ZodLiteral<"on_consent">;
1707
+ }, z.core.$strip>]>;
1708
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
1709
+ };
1710
+ readonly "conv.threads": {
1711
+ params: z.ZodObject<{
1712
+ limit: z.ZodOptional<z.ZodNumber>;
1713
+ cursor: z.ZodOptional<z.ZodString>;
1714
+ filter: z.ZodOptional<z.ZodEnum<{
1715
+ all: "all";
1716
+ unread: "unread";
1717
+ following: "following";
1718
+ }>>;
1719
+ cid: z.ZodString;
1720
+ }, z.core.$strict>;
1721
+ result: z.ZodObject<{
1722
+ events: z.ZodArray<z.ZodObject<{
1723
+ cid: z.ZodString;
1724
+ id: z.ZodString;
1725
+ seq: z.ZodNumber;
1726
+ at: z.ZodNumber;
1727
+ author: z.ZodObject<{
1728
+ name: z.ZodString;
1729
+ kind: z.ZodEnum<{
1730
+ person: "person";
1731
+ agent: "agent";
1732
+ }>;
1733
+ p: z.ZodString;
1734
+ }, z.core.$strip>;
1735
+ kind: z.ZodEnum<{
1736
+ task: "task";
1737
+ line: "line";
1738
+ notice: "notice";
1739
+ }>;
1740
+ text: z.ZodOptional<z.ZodString>;
1741
+ format: z.ZodOptional<z.ZodEnum<{
1742
+ plain: "plain";
1743
+ md: "md";
1744
+ }>>;
1745
+ thread: z.ZodOptional<z.ZodString>;
1746
+ broadcast: z.ZodOptional<z.ZodBoolean>;
1747
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1748
+ p: z.ZodString;
1749
+ }, z.core.$strict>, z.ZodObject<{
1750
+ all: z.ZodLiteral<"channel">;
1751
+ }, z.core.$strict>, z.ZodObject<{
1752
+ all: z.ZodLiteral<"here">;
1753
+ }, z.core.$strict>]>>>;
1754
+ mentionsMe: z.ZodBoolean;
1755
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
1756
+ blob: z.ZodString;
1757
+ name: z.ZodString;
1758
+ mime: z.ZodString;
1759
+ bytes: z.ZodNumber;
1760
+ }, z.core.$strip>>>;
1761
+ edited: z.ZodOptional<z.ZodNumber>;
1762
+ deleted: z.ZodOptional<z.ZodBoolean>;
1763
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1764
+ key: z.ZodString;
1765
+ count: z.ZodNumber;
1766
+ mine: z.ZodBoolean;
1767
+ }, z.core.$strip>>>;
1768
+ pinned: z.ZodOptional<z.ZodBoolean>;
1769
+ replies: z.ZodOptional<z.ZodObject<{
1770
+ count: z.ZodNumber;
1771
+ lastAt: z.ZodNumber;
1772
+ participants: z.ZodArray<z.ZodString>;
1773
+ unread: z.ZodOptional<z.ZodNumber>;
1774
+ following: z.ZodOptional<z.ZodBoolean>;
1775
+ }, z.core.$strip>>;
1776
+ task: z.ZodOptional<z.ZodObject<{
1777
+ id: z.ZodString;
1778
+ state: z.ZodEnum<{
1779
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
1780
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
1781
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
1782
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
1783
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
1784
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
1785
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1786
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1787
+ }>;
1788
+ }, z.core.$strip>>;
1789
+ notice: z.ZodOptional<z.ZodObject<{
1790
+ op: z.ZodEnum<{
1791
+ role: "role";
1792
+ remove: "remove";
1793
+ accept: "accept";
1794
+ settings: "settings";
1795
+ create: "create";
1796
+ add: "add";
1797
+ join: "join";
1798
+ leave: "leave";
1799
+ seat: "seat";
1800
+ archive: "archive";
1801
+ policy: "policy";
1802
+ meta: "meta";
1803
+ }>;
1804
+ by: z.ZodObject<{
1805
+ name: z.ZodString;
1806
+ kind: z.ZodEnum<{
1807
+ person: "person";
1808
+ agent: "agent";
1809
+ }>;
1810
+ p: z.ZodString;
1811
+ }, z.core.$strip>;
1812
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
1813
+ name: z.ZodString;
1814
+ kind: z.ZodEnum<{
1815
+ person: "person";
1816
+ agent: "agent";
1817
+ }>;
1818
+ p: z.ZodString;
1819
+ }, z.core.$strip>>>;
1820
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1821
+ name: "name";
1822
+ history: "history";
1823
+ purpose: "purpose";
1824
+ agentContext: "agentContext";
1825
+ bridges: "bridges";
1826
+ visibility: "visibility";
1827
+ retainDays: "retainDays";
1828
+ post: "post";
1829
+ invite: "invite";
1830
+ pins: "pins";
1831
+ topic: "topic";
1832
+ }>>>;
1833
+ }, z.core.$strip>>;
1834
+ delivery: z.ZodOptional<z.ZodEnum<{
1835
+ delivered: "delivered";
1836
+ read: "read";
1837
+ pending: "pending";
1838
+ failed: "failed";
1839
+ sent: "sent";
1840
+ }>>;
1841
+ clientId: z.ZodOptional<z.ZodString>;
1842
+ }, z.core.$strip>>;
1843
+ more: z.ZodBoolean;
1844
+ cursor: z.ZodOptional<z.ZodString>;
1845
+ }, z.core.$strip>;
1846
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
1847
+ };
1848
+ readonly "conv.send": {
1849
+ readonly params: z.ZodObject<{
1850
+ answer: z.ZodOptional<z.ZodString>;
1851
+ clientId: z.ZodString;
1852
+ text: z.ZodString;
1853
+ format: z.ZodOptional<z.ZodEnum<{
1854
+ plain: "plain";
1855
+ md: "md";
1856
+ }>>;
1857
+ thread: z.ZodOptional<z.ZodString>;
1858
+ broadcast: z.ZodOptional<z.ZodBoolean>;
1859
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1860
+ p: z.ZodString;
1861
+ }, z.core.$strict>, z.ZodObject<{
1862
+ all: z.ZodLiteral<"channel">;
1863
+ }, z.core.$strict>, z.ZodObject<{
1864
+ all: z.ZodLiteral<"here">;
1865
+ }, z.core.$strict>]>>>;
1866
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
1867
+ blob: z.ZodString;
1868
+ key: z.ZodString;
1869
+ nonce: z.ZodString;
1870
+ sha256: z.ZodString;
1871
+ bytes: z.ZodNumber;
1872
+ mime: z.ZodString;
1873
+ name: z.ZodString;
1874
+ thumb: z.ZodOptional<z.ZodString>;
1875
+ }, z.core.$strict>>>;
1876
+ key: z.ZodOptional<z.ZodString>;
1877
+ cid: z.ZodOptional<z.ZodString>;
1878
+ to: z.ZodOptional<z.ZodString>;
1879
+ }, z.core.$strict>;
1880
+ readonly result: z.ZodUnion<readonly [z.ZodObject<{
1881
+ cid: z.ZodString;
1882
+ id: z.ZodString;
1883
+ clientId: z.ZodString;
1884
+ stage: z.ZodLiteral<"pending">;
1885
+ }, z.core.$strip>, z.ZodObject<{
1886
+ stage: z.ZodLiteral<"held">;
1887
+ code: z.ZodEnum<{
1888
+ audience: "audience";
1889
+ context: "context";
1890
+ }>;
1891
+ expect: z.ZodLiteral<"on_consent">;
1892
+ }, z.core.$strip>]>;
1893
+ readonly errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
1894
+ };
1895
+ readonly "conv.react": {
1896
+ params: z.ZodObject<{
1897
+ reaction: z.ZodString;
1898
+ on: z.ZodBoolean;
1899
+ cid: z.ZodString;
1900
+ id: z.ZodString;
1901
+ key: z.ZodOptional<z.ZodString>;
1902
+ }, z.core.$strict>;
1903
+ result: z.ZodObject<{
1904
+ ok: z.ZodLiteral<true>;
1905
+ }, z.core.$strip>;
1906
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
1907
+ };
1908
+ readonly "conv.edit": {
1909
+ params: z.ZodObject<{
1910
+ text: z.ZodString;
1911
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1912
+ p: z.ZodString;
1913
+ }, z.core.$strict>, z.ZodObject<{
1914
+ all: z.ZodLiteral<"channel">;
1915
+ }, z.core.$strict>, z.ZodObject<{
1916
+ all: z.ZodLiteral<"here">;
1917
+ }, z.core.$strict>]>>>;
1918
+ cid: z.ZodString;
1919
+ id: z.ZodString;
1920
+ key: z.ZodOptional<z.ZodString>;
1921
+ }, z.core.$strict>;
1922
+ result: z.ZodObject<{
1923
+ ok: z.ZodLiteral<true>;
1924
+ }, z.core.$strip>;
1925
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
1926
+ };
1927
+ readonly "conv.delete": {
1928
+ params: z.ZodObject<{
1929
+ cid: z.ZodString;
1930
+ id: z.ZodString;
1931
+ key: z.ZodOptional<z.ZodString>;
1932
+ }, z.core.$strict>;
1933
+ result: z.ZodObject<{
1934
+ ok: z.ZodLiteral<true>;
1935
+ }, z.core.$strip>;
1936
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
1937
+ };
1938
+ readonly "conv.pin": {
1939
+ params: z.ZodObject<{
1940
+ on: z.ZodBoolean;
1941
+ cid: z.ZodString;
1942
+ id: z.ZodString;
1943
+ }, z.core.$strict>;
1944
+ result: z.ZodObject<{
1945
+ ok: z.ZodLiteral<true>;
1946
+ }, z.core.$strip>;
1947
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
1948
+ };
1949
+ readonly "conv.create": {
1950
+ readonly params: z.ZodObject<{
1951
+ kind: z.ZodEnum<{
1952
+ channel: "channel";
1953
+ group: "group";
1954
+ dm: "dm";
1955
+ }>;
1956
+ participants: z.ZodArray<z.ZodObject<{
1957
+ p: z.ZodString;
1958
+ role: z.ZodEnum<{
1959
+ admin: "admin";
1960
+ member: "member";
1961
+ owner: "owner";
1962
+ guest: "guest";
1963
+ }>;
1964
+ device: z.ZodOptional<z.ZodString>;
1965
+ respondTo: z.ZodOptional<z.ZodEnum<{
1966
+ self: "self";
1967
+ none: "none";
1968
+ members: "members";
1969
+ }>>;
1970
+ }, z.core.$strict>>;
1971
+ visibility: z.ZodOptional<z.ZodEnum<{
1972
+ public: "public";
1973
+ private: "private";
1974
+ }>>;
1975
+ history: z.ZodEnum<{
1976
+ none: "none";
1977
+ shared: "shared";
1978
+ }>;
1979
+ retainDays: z.ZodNumber;
1980
+ meta: z.ZodOptional<z.ZodObject<{
1981
+ name: z.ZodOptional<z.ZodString>;
1982
+ topic: z.ZodOptional<z.ZodString>;
1983
+ purpose: z.ZodOptional<z.ZodString>;
1984
+ }, z.core.$strict>>;
1985
+ }, z.core.$strict>;
1986
+ readonly result: z.ZodObject<{
1987
+ cid: z.ZodString;
1988
+ }, z.core.$strip>;
1989
+ readonly errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
1990
+ };
1991
+ readonly "conv.add": {
1992
+ params: z.ZodObject<{
1993
+ participants: z.ZodArray<z.ZodObject<{
1994
+ p: z.ZodString;
1995
+ role: z.ZodEnum<{
1996
+ admin: "admin";
1997
+ member: "member";
1998
+ owner: "owner";
1999
+ guest: "guest";
2000
+ }>;
2001
+ device: z.ZodOptional<z.ZodString>;
2002
+ respondTo: z.ZodOptional<z.ZodEnum<{
2003
+ self: "self";
2004
+ none: "none";
2005
+ members: "members";
2006
+ }>>;
2007
+ }, z.core.$strict>>;
2008
+ cid: z.ZodString;
2009
+ }, z.core.$strict>;
2010
+ result: z.ZodObject<{
2011
+ ok: z.ZodLiteral<true>;
2012
+ }, z.core.$strip>;
2013
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2014
+ };
2015
+ readonly "conv.remove": {
2016
+ params: z.ZodObject<{
2017
+ participants: z.ZodArray<z.ZodString>;
2018
+ cid: z.ZodString;
2019
+ }, z.core.$strict>;
2020
+ result: z.ZodObject<{
2021
+ ok: z.ZodLiteral<true>;
2022
+ }, z.core.$strip>;
2023
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2024
+ };
2025
+ readonly "conv.role": {
2026
+ params: z.ZodObject<{
2027
+ p: z.ZodString;
2028
+ role: z.ZodEnum<{
2029
+ admin: "admin";
2030
+ member: "member";
2031
+ owner: "owner";
2032
+ guest: "guest";
2033
+ }>;
2034
+ cid: z.ZodString;
2035
+ }, z.core.$strict>;
2036
+ result: z.ZodObject<{
2037
+ ok: z.ZodLiteral<true>;
2038
+ }, z.core.$strip>;
2039
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2040
+ };
2041
+ readonly "conv.seat": {
2042
+ params: z.ZodObject<{
2043
+ p: z.ZodString;
2044
+ device: z.ZodOptional<z.ZodString>;
2045
+ respondTo: z.ZodOptional<z.ZodEnum<{
2046
+ self: "self";
2047
+ none: "none";
2048
+ members: "members";
2049
+ }>>;
2050
+ cid: z.ZodString;
2051
+ }, z.core.$strict>;
2052
+ result: z.ZodObject<{
2053
+ ok: z.ZodLiteral<true>;
2054
+ }, z.core.$strip>;
2055
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2056
+ };
2057
+ readonly "conv.settings": {
2058
+ params: z.ZodObject<{
2059
+ visibility: z.ZodOptional<z.ZodEnum<{
2060
+ public: "public";
2061
+ private: "private";
2062
+ }>>;
2063
+ history: z.ZodOptional<z.ZodEnum<{
2064
+ none: "none";
2065
+ shared: "shared";
2066
+ }>>;
2067
+ retainDays: z.ZodOptional<z.ZodNumber>;
2068
+ post: z.ZodOptional<z.ZodEnum<{
2069
+ admins: "admins";
2070
+ all: "all";
2071
+ }>>;
2072
+ invite: z.ZodOptional<z.ZodEnum<{
2073
+ admins: "admins";
2074
+ all: "all";
2075
+ }>>;
2076
+ pins: z.ZodOptional<z.ZodEnum<{
2077
+ admins: "admins";
2078
+ all: "all";
2079
+ }>>;
2080
+ cid: z.ZodString;
2081
+ }, z.core.$strict>;
2082
+ result: z.ZodObject<{
2083
+ ok: z.ZodLiteral<true>;
2084
+ }, z.core.$strip>;
2085
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2086
+ };
2087
+ readonly "conv.meta": {
2088
+ params: z.ZodObject<{
2089
+ meta: z.ZodObject<{
2090
+ name: z.ZodOptional<z.ZodString>;
2091
+ topic: z.ZodOptional<z.ZodString>;
2092
+ purpose: z.ZodOptional<z.ZodString>;
2093
+ }, z.core.$strict>;
2094
+ cid: z.ZodString;
2095
+ }, z.core.$strict>;
2096
+ result: z.ZodObject<{
2097
+ ok: z.ZodLiteral<true>;
2098
+ }, z.core.$strip>;
2099
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2100
+ };
2101
+ readonly "conv.archive": {
2102
+ params: z.ZodObject<{
2103
+ on: z.ZodBoolean;
2104
+ cid: z.ZodString;
2105
+ }, z.core.$strict>;
2106
+ result: z.ZodObject<{
2107
+ ok: z.ZodLiteral<true>;
2108
+ }, z.core.$strip>;
2109
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2110
+ };
2111
+ readonly "conv.leave": {
2112
+ params: z.ZodObject<{
2113
+ cid: z.ZodString;
2114
+ }, z.core.$strict>;
2115
+ result: z.ZodObject<{
2116
+ ok: z.ZodLiteral<true>;
2117
+ }, z.core.$strip>;
2118
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2119
+ };
2120
+ readonly "conv.join": {
2121
+ params: z.ZodObject<{
2122
+ cid: z.ZodString;
2123
+ }, z.core.$strict>;
2124
+ result: z.ZodObject<{
2125
+ ok: z.ZodLiteral<true>;
2126
+ }, z.core.$strip>;
2127
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2128
+ };
2129
+ readonly "conv.accept": {
2130
+ params: z.ZodObject<{
2131
+ cid: z.ZodString;
2132
+ }, z.core.$strict>;
2133
+ result: z.ZodObject<{
2134
+ ok: z.ZodLiteral<true>;
2135
+ }, z.core.$strip>;
2136
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2137
+ };
2138
+ readonly "conv.catalogue": {
2139
+ params: z.ZodObject<{
2140
+ query: z.ZodOptional<z.ZodString>;
2141
+ limit: z.ZodOptional<z.ZodNumber>;
2142
+ }, z.core.$strict>;
2143
+ result: z.ZodObject<{
2144
+ channels: z.ZodArray<z.ZodObject<{
2145
+ cid: z.ZodString;
2146
+ name: z.ZodString;
2147
+ topic: z.ZodOptional<z.ZodString>;
2148
+ purpose: z.ZodOptional<z.ZodString>;
2149
+ participants: z.ZodNumber;
2150
+ }, z.core.$strip>>;
2151
+ }, z.core.$strip>;
2152
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
2153
+ };
2154
+ readonly "conv.publish": {
2155
+ params: z.ZodObject<{
2156
+ on: z.ZodBoolean;
2157
+ cid: z.ZodString;
2158
+ }, z.core.$strict>;
2159
+ result: z.ZodObject<{
2160
+ ok: z.ZodLiteral<true>;
2161
+ }, z.core.$strip>;
2162
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2163
+ };
2164
+ readonly "conv.markRead": {
2165
+ params: z.ZodObject<{
2166
+ upTo: z.ZodNumber;
2167
+ thread: z.ZodOptional<z.ZodString>;
2168
+ cid: z.ZodString;
2169
+ }, z.core.$strict>;
2170
+ result: z.ZodObject<{
2171
+ ok: z.ZodLiteral<true>;
2172
+ }, z.core.$strip>;
2173
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2174
+ };
2175
+ readonly "conv.markUnread": {
2176
+ params: z.ZodObject<{
2177
+ from: z.ZodNumber;
2178
+ cid: z.ZodString;
2179
+ }, z.core.$strict>;
2180
+ result: z.ZodObject<{
2181
+ ok: z.ZodLiteral<true>;
2182
+ }, z.core.$strip>;
2183
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2184
+ };
2185
+ readonly "conv.prefs": {
2186
+ params: z.ZodObject<{
2187
+ notify: z.ZodEnum<{
2188
+ none: "none";
2189
+ all: "all";
2190
+ mentions: "mentions";
2191
+ }>;
2192
+ muteUntil: z.ZodOptional<z.ZodNumber>;
2193
+ receipts: z.ZodOptional<z.ZodBoolean>;
2194
+ typing: z.ZodOptional<z.ZodBoolean>;
2195
+ cid: z.ZodString;
2196
+ }, z.core.$strict>;
2197
+ result: z.ZodObject<{
2198
+ ok: z.ZodLiteral<true>;
2199
+ }, z.core.$strip>;
2200
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2201
+ };
2202
+ readonly "conv.follow": {
2203
+ params: z.ZodObject<{
2204
+ thread: z.ZodString;
2205
+ on: z.ZodBoolean;
2206
+ cid: z.ZodString;
2207
+ }, z.core.$strict>;
2208
+ result: z.ZodObject<{
2209
+ ok: z.ZodLiteral<true>;
2210
+ }, z.core.$strip>;
2211
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2212
+ };
2213
+ readonly "conv.save": {
2214
+ params: z.ZodObject<{
2215
+ on: z.ZodBoolean;
2216
+ cid: z.ZodString;
2217
+ id: z.ZodString;
2218
+ }, z.core.$strict>;
2219
+ result: z.ZodObject<{
2220
+ ok: z.ZodLiteral<true>;
2221
+ }, z.core.$strip>;
2222
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2223
+ };
2224
+ readonly "conv.saved": {
2225
+ params: z.ZodObject<{
2226
+ limit: z.ZodOptional<z.ZodNumber>;
2227
+ cursor: z.ZodOptional<z.ZodString>;
2228
+ cid: z.ZodString;
2229
+ }, z.core.$strict>;
2230
+ result: z.ZodObject<{
2231
+ events: z.ZodArray<z.ZodObject<{
2232
+ cid: z.ZodString;
2233
+ id: z.ZodString;
2234
+ seq: z.ZodNumber;
2235
+ at: z.ZodNumber;
2236
+ author: z.ZodObject<{
2237
+ name: z.ZodString;
2238
+ kind: z.ZodEnum<{
2239
+ person: "person";
2240
+ agent: "agent";
2241
+ }>;
2242
+ p: z.ZodString;
2243
+ }, z.core.$strip>;
2244
+ kind: z.ZodEnum<{
2245
+ task: "task";
2246
+ line: "line";
2247
+ notice: "notice";
2248
+ }>;
2249
+ text: z.ZodOptional<z.ZodString>;
2250
+ format: z.ZodOptional<z.ZodEnum<{
2251
+ plain: "plain";
2252
+ md: "md";
2253
+ }>>;
2254
+ thread: z.ZodOptional<z.ZodString>;
2255
+ broadcast: z.ZodOptional<z.ZodBoolean>;
2256
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
2257
+ p: z.ZodString;
2258
+ }, z.core.$strict>, z.ZodObject<{
2259
+ all: z.ZodLiteral<"channel">;
2260
+ }, z.core.$strict>, z.ZodObject<{
2261
+ all: z.ZodLiteral<"here">;
2262
+ }, z.core.$strict>]>>>;
2263
+ mentionsMe: z.ZodBoolean;
2264
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
2265
+ blob: z.ZodString;
2266
+ name: z.ZodString;
2267
+ mime: z.ZodString;
2268
+ bytes: z.ZodNumber;
2269
+ }, z.core.$strip>>>;
2270
+ edited: z.ZodOptional<z.ZodNumber>;
2271
+ deleted: z.ZodOptional<z.ZodBoolean>;
2272
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2273
+ key: z.ZodString;
2274
+ count: z.ZodNumber;
2275
+ mine: z.ZodBoolean;
2276
+ }, z.core.$strip>>>;
2277
+ pinned: z.ZodOptional<z.ZodBoolean>;
2278
+ replies: z.ZodOptional<z.ZodObject<{
2279
+ count: z.ZodNumber;
2280
+ lastAt: z.ZodNumber;
2281
+ participants: z.ZodArray<z.ZodString>;
2282
+ unread: z.ZodOptional<z.ZodNumber>;
2283
+ following: z.ZodOptional<z.ZodBoolean>;
2284
+ }, z.core.$strip>>;
2285
+ task: z.ZodOptional<z.ZodObject<{
2286
+ id: z.ZodString;
2287
+ state: z.ZodEnum<{
2288
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
2289
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
2290
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
2291
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
2292
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
2293
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
2294
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
2295
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
2296
+ }>;
2297
+ }, z.core.$strip>>;
2298
+ notice: z.ZodOptional<z.ZodObject<{
2299
+ op: z.ZodEnum<{
2300
+ role: "role";
2301
+ remove: "remove";
2302
+ accept: "accept";
2303
+ settings: "settings";
2304
+ create: "create";
2305
+ add: "add";
2306
+ join: "join";
2307
+ leave: "leave";
2308
+ seat: "seat";
2309
+ archive: "archive";
2310
+ policy: "policy";
2311
+ meta: "meta";
2312
+ }>;
2313
+ by: z.ZodObject<{
2314
+ name: z.ZodString;
2315
+ kind: z.ZodEnum<{
2316
+ person: "person";
2317
+ agent: "agent";
2318
+ }>;
2319
+ p: z.ZodString;
2320
+ }, z.core.$strip>;
2321
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
2322
+ name: z.ZodString;
2323
+ kind: z.ZodEnum<{
2324
+ person: "person";
2325
+ agent: "agent";
2326
+ }>;
2327
+ p: z.ZodString;
2328
+ }, z.core.$strip>>>;
2329
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2330
+ name: "name";
2331
+ history: "history";
2332
+ purpose: "purpose";
2333
+ agentContext: "agentContext";
2334
+ bridges: "bridges";
2335
+ visibility: "visibility";
2336
+ retainDays: "retainDays";
2337
+ post: "post";
2338
+ invite: "invite";
2339
+ pins: "pins";
2340
+ topic: "topic";
2341
+ }>>>;
2342
+ }, z.core.$strip>>;
2343
+ delivery: z.ZodOptional<z.ZodEnum<{
2344
+ delivered: "delivered";
2345
+ read: "read";
2346
+ pending: "pending";
2347
+ failed: "failed";
2348
+ sent: "sent";
2349
+ }>>;
2350
+ clientId: z.ZodOptional<z.ZodString>;
2351
+ }, z.core.$strip>>;
2352
+ more: z.ZodBoolean;
2353
+ cursor: z.ZodOptional<z.ZodString>;
2354
+ }, z.core.$strip>;
2355
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
2356
+ };
2357
+ readonly "conv.draft": {
2358
+ params: z.ZodObject<{
2359
+ thread: z.ZodOptional<z.ZodString>;
2360
+ text: z.ZodString;
2361
+ cid: z.ZodString;
2362
+ }, z.core.$strict>;
2363
+ result: z.ZodObject<{
2364
+ ok: z.ZodLiteral<true>;
2365
+ }, z.core.$strip>;
2366
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2367
+ };
2368
+ readonly "conv.schedule": {
2369
+ readonly params: z.ZodObject<{
2370
+ at: z.ZodNumber;
2371
+ clientId: z.ZodString;
2372
+ text: z.ZodString;
2373
+ format: z.ZodOptional<z.ZodEnum<{
2374
+ plain: "plain";
2375
+ md: "md";
2376
+ }>>;
2377
+ thread: z.ZodOptional<z.ZodString>;
2378
+ broadcast: z.ZodOptional<z.ZodBoolean>;
2379
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
2380
+ p: z.ZodString;
2381
+ }, z.core.$strict>, z.ZodObject<{
2382
+ all: z.ZodLiteral<"channel">;
2383
+ }, z.core.$strict>, z.ZodObject<{
2384
+ all: z.ZodLiteral<"here">;
2385
+ }, z.core.$strict>]>>>;
2386
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
2387
+ blob: z.ZodString;
2388
+ key: z.ZodString;
2389
+ nonce: z.ZodString;
2390
+ sha256: z.ZodString;
2391
+ bytes: z.ZodNumber;
2392
+ mime: z.ZodString;
2393
+ name: z.ZodString;
2394
+ thumb: z.ZodOptional<z.ZodString>;
2395
+ }, z.core.$strict>>>;
2396
+ cid: z.ZodString;
2397
+ }, z.core.$strict>;
2398
+ readonly result: z.ZodObject<{
2399
+ id: z.ZodString;
2400
+ }, z.core.$strip>;
2401
+ readonly errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2402
+ };
2403
+ readonly "conv.scheduled": {
2404
+ params: z.ZodObject<{
2405
+ limit: z.ZodOptional<z.ZodNumber>;
2406
+ cursor: z.ZodOptional<z.ZodString>;
2407
+ }, z.core.$strict>;
2408
+ result: z.ZodObject<{
2409
+ items: z.ZodArray<z.ZodObject<{
2410
+ id: z.ZodString;
2411
+ cid: z.ZodString;
2412
+ at: z.ZodNumber;
2413
+ text: z.ZodString;
2414
+ }, z.core.$strip>>;
2415
+ cursor: z.ZodOptional<z.ZodString>;
2416
+ }, z.core.$strip>;
2417
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
2418
+ };
2419
+ readonly "conv.unschedule": {
2420
+ params: z.ZodObject<{
2421
+ id: z.ZodString;
2422
+ }, z.core.$strict>;
2423
+ result: z.ZodObject<{
2424
+ ok: z.ZodLiteral<true>;
2425
+ }, z.core.$strip>;
2426
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2427
+ };
2428
+ readonly "conv.typing": {
2429
+ params: z.ZodObject<{
2430
+ thread: z.ZodOptional<z.ZodString>;
2431
+ cid: z.ZodString;
2432
+ }, z.core.$strict>;
2433
+ result: z.ZodObject<{
2434
+ ok: z.ZodLiteral<true>;
2435
+ }, z.core.$strip>;
2436
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
2437
+ };
2438
+ readonly "conv.search": {
2439
+ params: z.ZodObject<{
2440
+ limit: z.ZodOptional<z.ZodNumber>;
2441
+ cursor: z.ZodOptional<z.ZodString>;
2442
+ key: z.ZodOptional<z.ZodString>;
2443
+ query: z.ZodString;
2444
+ cid: z.ZodOptional<z.ZodString>;
2445
+ from: z.ZodOptional<z.ZodString>;
2446
+ after: z.ZodOptional<z.ZodNumber>;
2447
+ before: z.ZodOptional<z.ZodNumber>;
2448
+ thread: z.ZodOptional<z.ZodString>;
2449
+ has: z.ZodOptional<z.ZodEnum<{
2450
+ file: "file";
2451
+ link: "link";
2452
+ }>>;
2453
+ }, z.core.$strict>;
2454
+ result: z.ZodUnion<readonly [z.ZodObject<{
2455
+ events: z.ZodArray<z.ZodObject<{
2456
+ cid: z.ZodString;
2457
+ id: z.ZodString;
2458
+ seq: z.ZodNumber;
2459
+ at: z.ZodNumber;
2460
+ author: z.ZodObject<{
2461
+ name: z.ZodString;
2462
+ kind: z.ZodEnum<{
2463
+ person: "person";
2464
+ agent: "agent";
2465
+ }>;
2466
+ p: z.ZodString;
2467
+ }, z.core.$strip>;
2468
+ kind: z.ZodEnum<{
2469
+ task: "task";
2470
+ line: "line";
2471
+ notice: "notice";
2472
+ }>;
2473
+ text: z.ZodOptional<z.ZodString>;
2474
+ format: z.ZodOptional<z.ZodEnum<{
2475
+ plain: "plain";
2476
+ md: "md";
2477
+ }>>;
2478
+ thread: z.ZodOptional<z.ZodString>;
2479
+ broadcast: z.ZodOptional<z.ZodBoolean>;
2480
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
2481
+ p: z.ZodString;
2482
+ }, z.core.$strict>, z.ZodObject<{
2483
+ all: z.ZodLiteral<"channel">;
2484
+ }, z.core.$strict>, z.ZodObject<{
2485
+ all: z.ZodLiteral<"here">;
2486
+ }, z.core.$strict>]>>>;
2487
+ mentionsMe: z.ZodBoolean;
2488
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
2489
+ blob: z.ZodString;
2490
+ name: z.ZodString;
2491
+ mime: z.ZodString;
2492
+ bytes: z.ZodNumber;
2493
+ }, z.core.$strip>>>;
2494
+ edited: z.ZodOptional<z.ZodNumber>;
2495
+ deleted: z.ZodOptional<z.ZodBoolean>;
2496
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2497
+ key: z.ZodString;
2498
+ count: z.ZodNumber;
2499
+ mine: z.ZodBoolean;
2500
+ }, z.core.$strip>>>;
2501
+ pinned: z.ZodOptional<z.ZodBoolean>;
2502
+ replies: z.ZodOptional<z.ZodObject<{
2503
+ count: z.ZodNumber;
2504
+ lastAt: z.ZodNumber;
2505
+ participants: z.ZodArray<z.ZodString>;
2506
+ unread: z.ZodOptional<z.ZodNumber>;
2507
+ following: z.ZodOptional<z.ZodBoolean>;
2508
+ }, z.core.$strip>>;
2509
+ task: z.ZodOptional<z.ZodObject<{
2510
+ id: z.ZodString;
2511
+ state: z.ZodEnum<{
2512
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
2513
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
2514
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
2515
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
2516
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
2517
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
2518
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
2519
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
2520
+ }>;
2521
+ }, z.core.$strip>>;
2522
+ notice: z.ZodOptional<z.ZodObject<{
2523
+ op: z.ZodEnum<{
2524
+ role: "role";
2525
+ remove: "remove";
2526
+ accept: "accept";
2527
+ settings: "settings";
2528
+ create: "create";
2529
+ add: "add";
2530
+ join: "join";
2531
+ leave: "leave";
2532
+ seat: "seat";
2533
+ archive: "archive";
2534
+ policy: "policy";
2535
+ meta: "meta";
2536
+ }>;
2537
+ by: z.ZodObject<{
2538
+ name: z.ZodString;
2539
+ kind: z.ZodEnum<{
2540
+ person: "person";
2541
+ agent: "agent";
2542
+ }>;
2543
+ p: z.ZodString;
2544
+ }, z.core.$strip>;
2545
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
2546
+ name: z.ZodString;
2547
+ kind: z.ZodEnum<{
2548
+ person: "person";
2549
+ agent: "agent";
2550
+ }>;
2551
+ p: z.ZodString;
2552
+ }, z.core.$strip>>>;
2553
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2554
+ name: "name";
2555
+ history: "history";
2556
+ purpose: "purpose";
2557
+ agentContext: "agentContext";
2558
+ bridges: "bridges";
2559
+ visibility: "visibility";
2560
+ retainDays: "retainDays";
2561
+ post: "post";
2562
+ invite: "invite";
2563
+ pins: "pins";
2564
+ topic: "topic";
2565
+ }>>>;
2566
+ }, z.core.$strip>>;
2567
+ delivery: z.ZodOptional<z.ZodEnum<{
2568
+ delivered: "delivered";
2569
+ read: "read";
2570
+ pending: "pending";
2571
+ failed: "failed";
2572
+ sent: "sent";
2573
+ }>>;
2574
+ clientId: z.ZodOptional<z.ZodString>;
2575
+ }, z.core.$strip>>;
2576
+ more: z.ZodBoolean;
2577
+ cursor: z.ZodOptional<z.ZodString>;
2578
+ }, z.core.$strip>, z.ZodObject<{
2579
+ stage: z.ZodLiteral<"held">;
2580
+ code: z.ZodEnum<{
2581
+ audience: "audience";
2582
+ context: "context";
2583
+ }>;
2584
+ expect: z.ZodLiteral<"on_consent">;
2585
+ }, z.core.$strip>]>;
2586
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
2587
+ };
2588
+ readonly "conv.context": {
2589
+ params: z.ZodObject<{
2590
+ event: z.ZodString;
2591
+ before: z.ZodOptional<z.ZodNumber>;
2592
+ after: z.ZodOptional<z.ZodNumber>;
2593
+ cid: z.ZodString;
2594
+ key: z.ZodOptional<z.ZodString>;
2595
+ }, z.core.$strict>;
2596
+ result: z.ZodUnion<readonly [z.ZodObject<{
2597
+ events: z.ZodArray<z.ZodObject<{
2598
+ cid: z.ZodString;
2599
+ id: z.ZodString;
2600
+ seq: z.ZodNumber;
2601
+ at: z.ZodNumber;
2602
+ author: z.ZodObject<{
2603
+ name: z.ZodString;
2604
+ kind: z.ZodEnum<{
2605
+ person: "person";
2606
+ agent: "agent";
2607
+ }>;
2608
+ p: z.ZodString;
2609
+ }, z.core.$strip>;
2610
+ kind: z.ZodEnum<{
2611
+ task: "task";
2612
+ line: "line";
2613
+ notice: "notice";
2614
+ }>;
2615
+ text: z.ZodOptional<z.ZodString>;
2616
+ format: z.ZodOptional<z.ZodEnum<{
2617
+ plain: "plain";
2618
+ md: "md";
2619
+ }>>;
2620
+ thread: z.ZodOptional<z.ZodString>;
2621
+ broadcast: z.ZodOptional<z.ZodBoolean>;
2622
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
2623
+ p: z.ZodString;
2624
+ }, z.core.$strict>, z.ZodObject<{
2625
+ all: z.ZodLiteral<"channel">;
2626
+ }, z.core.$strict>, z.ZodObject<{
2627
+ all: z.ZodLiteral<"here">;
2628
+ }, z.core.$strict>]>>>;
2629
+ mentionsMe: z.ZodBoolean;
2630
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
2631
+ blob: z.ZodString;
2632
+ name: z.ZodString;
2633
+ mime: z.ZodString;
2634
+ bytes: z.ZodNumber;
2635
+ }, z.core.$strip>>>;
2636
+ edited: z.ZodOptional<z.ZodNumber>;
2637
+ deleted: z.ZodOptional<z.ZodBoolean>;
2638
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2639
+ key: z.ZodString;
2640
+ count: z.ZodNumber;
2641
+ mine: z.ZodBoolean;
2642
+ }, z.core.$strip>>>;
2643
+ pinned: z.ZodOptional<z.ZodBoolean>;
2644
+ replies: z.ZodOptional<z.ZodObject<{
2645
+ count: z.ZodNumber;
2646
+ lastAt: z.ZodNumber;
2647
+ participants: z.ZodArray<z.ZodString>;
2648
+ unread: z.ZodOptional<z.ZodNumber>;
2649
+ following: z.ZodOptional<z.ZodBoolean>;
2650
+ }, z.core.$strip>>;
2651
+ task: z.ZodOptional<z.ZodObject<{
2652
+ id: z.ZodString;
2653
+ state: z.ZodEnum<{
2654
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
2655
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
2656
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
2657
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
2658
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
2659
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
2660
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
2661
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
2662
+ }>;
2663
+ }, z.core.$strip>>;
2664
+ notice: z.ZodOptional<z.ZodObject<{
2665
+ op: z.ZodEnum<{
2666
+ role: "role";
2667
+ remove: "remove";
2668
+ accept: "accept";
2669
+ settings: "settings";
2670
+ create: "create";
2671
+ add: "add";
2672
+ join: "join";
2673
+ leave: "leave";
2674
+ seat: "seat";
2675
+ archive: "archive";
2676
+ policy: "policy";
2677
+ meta: "meta";
2678
+ }>;
2679
+ by: z.ZodObject<{
2680
+ name: z.ZodString;
2681
+ kind: z.ZodEnum<{
2682
+ person: "person";
2683
+ agent: "agent";
2684
+ }>;
2685
+ p: z.ZodString;
2686
+ }, z.core.$strip>;
2687
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
2688
+ name: z.ZodString;
2689
+ kind: z.ZodEnum<{
2690
+ person: "person";
2691
+ agent: "agent";
2692
+ }>;
2693
+ p: z.ZodString;
2694
+ }, z.core.$strip>>>;
2695
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2696
+ name: "name";
2697
+ history: "history";
2698
+ purpose: "purpose";
2699
+ agentContext: "agentContext";
2700
+ bridges: "bridges";
2701
+ visibility: "visibility";
2702
+ retainDays: "retainDays";
2703
+ post: "post";
2704
+ invite: "invite";
2705
+ pins: "pins";
2706
+ topic: "topic";
2707
+ }>>>;
2708
+ }, z.core.$strip>>;
2709
+ delivery: z.ZodOptional<z.ZodEnum<{
2710
+ delivered: "delivered";
2711
+ read: "read";
2712
+ pending: "pending";
2713
+ failed: "failed";
2714
+ sent: "sent";
2715
+ }>>;
2716
+ clientId: z.ZodOptional<z.ZodString>;
2717
+ }, z.core.$strip>>;
2718
+ root: z.ZodOptional<z.ZodObject<{
2719
+ cid: z.ZodString;
2720
+ id: z.ZodString;
2721
+ seq: z.ZodNumber;
2722
+ at: z.ZodNumber;
2723
+ author: z.ZodObject<{
2724
+ name: z.ZodString;
2725
+ kind: z.ZodEnum<{
2726
+ person: "person";
2727
+ agent: "agent";
2728
+ }>;
2729
+ p: z.ZodString;
2730
+ }, z.core.$strip>;
2731
+ kind: z.ZodEnum<{
2732
+ task: "task";
2733
+ line: "line";
2734
+ notice: "notice";
2735
+ }>;
2736
+ text: z.ZodOptional<z.ZodString>;
2737
+ format: z.ZodOptional<z.ZodEnum<{
2738
+ plain: "plain";
2739
+ md: "md";
2740
+ }>>;
2741
+ thread: z.ZodOptional<z.ZodString>;
2742
+ broadcast: z.ZodOptional<z.ZodBoolean>;
2743
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
2744
+ p: z.ZodString;
2745
+ }, z.core.$strict>, z.ZodObject<{
2746
+ all: z.ZodLiteral<"channel">;
2747
+ }, z.core.$strict>, z.ZodObject<{
2748
+ all: z.ZodLiteral<"here">;
2749
+ }, z.core.$strict>]>>>;
2750
+ mentionsMe: z.ZodBoolean;
2751
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
2752
+ blob: z.ZodString;
2753
+ name: z.ZodString;
2754
+ mime: z.ZodString;
2755
+ bytes: z.ZodNumber;
2756
+ }, z.core.$strip>>>;
2757
+ edited: z.ZodOptional<z.ZodNumber>;
2758
+ deleted: z.ZodOptional<z.ZodBoolean>;
2759
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2760
+ key: z.ZodString;
2761
+ count: z.ZodNumber;
2762
+ mine: z.ZodBoolean;
2763
+ }, z.core.$strip>>>;
2764
+ pinned: z.ZodOptional<z.ZodBoolean>;
2765
+ replies: z.ZodOptional<z.ZodObject<{
2766
+ count: z.ZodNumber;
2767
+ lastAt: z.ZodNumber;
2768
+ participants: z.ZodArray<z.ZodString>;
2769
+ unread: z.ZodOptional<z.ZodNumber>;
2770
+ following: z.ZodOptional<z.ZodBoolean>;
2771
+ }, z.core.$strip>>;
2772
+ task: z.ZodOptional<z.ZodObject<{
2773
+ id: z.ZodString;
2774
+ state: z.ZodEnum<{
2775
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
2776
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
2777
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
2778
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
2779
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
2780
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
2781
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
2782
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
2783
+ }>;
2784
+ }, z.core.$strip>>;
2785
+ notice: z.ZodOptional<z.ZodObject<{
2786
+ op: z.ZodEnum<{
2787
+ role: "role";
2788
+ remove: "remove";
2789
+ accept: "accept";
2790
+ settings: "settings";
2791
+ create: "create";
2792
+ add: "add";
2793
+ join: "join";
2794
+ leave: "leave";
2795
+ seat: "seat";
2796
+ archive: "archive";
2797
+ policy: "policy";
2798
+ meta: "meta";
2799
+ }>;
2800
+ by: z.ZodObject<{
2801
+ name: z.ZodString;
2802
+ kind: z.ZodEnum<{
2803
+ person: "person";
2804
+ agent: "agent";
2805
+ }>;
2806
+ p: z.ZodString;
2807
+ }, z.core.$strip>;
2808
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
2809
+ name: z.ZodString;
2810
+ kind: z.ZodEnum<{
2811
+ person: "person";
2812
+ agent: "agent";
2813
+ }>;
2814
+ p: z.ZodString;
2815
+ }, z.core.$strip>>>;
2816
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2817
+ name: "name";
2818
+ history: "history";
2819
+ purpose: "purpose";
2820
+ agentContext: "agentContext";
2821
+ bridges: "bridges";
2822
+ visibility: "visibility";
2823
+ retainDays: "retainDays";
2824
+ post: "post";
2825
+ invite: "invite";
2826
+ pins: "pins";
2827
+ topic: "topic";
2828
+ }>>>;
2829
+ }, z.core.$strip>>;
2830
+ delivery: z.ZodOptional<z.ZodEnum<{
2831
+ delivered: "delivered";
2832
+ read: "read";
2833
+ pending: "pending";
2834
+ failed: "failed";
2835
+ sent: "sent";
2836
+ }>>;
2837
+ clientId: z.ZodOptional<z.ZodString>;
2838
+ }, z.core.$strip>>;
2839
+ }, z.core.$strip>, z.ZodObject<{
2840
+ stage: z.ZodLiteral<"held">;
2841
+ code: z.ZodEnum<{
2842
+ audience: "audience";
2843
+ context: "context";
2844
+ }>;
2845
+ expect: z.ZodLiteral<"on_consent">;
2846
+ }, z.core.$strip>]>;
2847
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
2848
+ };
2849
+ readonly "conv.access": {
2850
+ params: z.ZodObject<{
2851
+ limit: z.ZodOptional<z.ZodNumber>;
2852
+ cursor: z.ZodOptional<z.ZodString>;
2853
+ key: z.ZodString;
2854
+ cid: z.ZodOptional<z.ZodString>;
2855
+ }, z.core.$strict>;
2856
+ result: z.ZodObject<{
2857
+ conversations: z.ZodArray<z.ZodObject<{
2858
+ conv: z.ZodObject<{
2859
+ cid: z.ZodString;
2860
+ kind: z.ZodEnum<{
2861
+ self: "self";
2862
+ channel: "channel";
2863
+ group: "group";
2864
+ dm: "dm";
2865
+ }>;
2866
+ visibility: z.ZodOptional<z.ZodEnum<{
2867
+ public: "public";
2868
+ private: "private";
2869
+ }>>;
2870
+ history: z.ZodEnum<{
2871
+ none: "none";
2872
+ shared: "shared";
2873
+ }>;
2874
+ retainDays: z.ZodNumber;
2875
+ agentContext: z.ZodEnum<{
2876
+ none: "none";
2877
+ members: "members";
2878
+ seats: "seats";
2879
+ }>;
2880
+ name: z.ZodOptional<z.ZodString>;
2881
+ topic: z.ZodOptional<z.ZodString>;
2882
+ purpose: z.ZodOptional<z.ZodString>;
2883
+ archived: z.ZodBoolean;
2884
+ role: z.ZodEnum<{
2885
+ admin: "admin";
2886
+ member: "member";
2887
+ owner: "owner";
2888
+ guest: "guest";
2889
+ }>;
2890
+ participants: z.ZodNumber;
2891
+ dmWith: z.ZodOptional<z.ZodObject<{
2892
+ p: z.ZodString;
2893
+ kind: z.ZodEnum<{
2894
+ person: "person";
2895
+ agent: "agent";
2896
+ }>;
2897
+ role: z.ZodEnum<{
2898
+ admin: "admin";
2899
+ member: "member";
2900
+ owner: "owner";
2901
+ guest: "guest";
2902
+ }>;
2903
+ state: z.ZodEnum<{
2904
+ member: "member";
2905
+ invited: "invited";
2906
+ }>;
2907
+ name: z.ZodString;
2908
+ handle: z.ZodOptional<z.ZodString>;
2909
+ org: z.ZodEnum<{
2910
+ other: "other";
2911
+ none: "none";
2912
+ same: "same";
2913
+ }>;
2914
+ presence: z.ZodEnum<{
2915
+ unknown: "unknown";
2916
+ away: "away";
2917
+ offline: "offline";
2918
+ online: "online";
2919
+ }>;
2920
+ agentState: z.ZodOptional<z.ZodEnum<{
2921
+ idle: "idle";
2922
+ busy: "busy";
2923
+ kept: "kept";
2924
+ }>>;
2925
+ respondTo: z.ZodOptional<z.ZodEnum<{
2926
+ self: "self";
2927
+ none: "none";
2928
+ members: "members";
2929
+ }>>;
2930
+ }, z.core.$strip>>;
2931
+ last: z.ZodOptional<z.ZodObject<{
2932
+ cid: z.ZodString;
2933
+ id: z.ZodString;
2934
+ seq: z.ZodNumber;
2935
+ at: z.ZodNumber;
2936
+ author: z.ZodObject<{
2937
+ name: z.ZodString;
2938
+ kind: z.ZodEnum<{
2939
+ person: "person";
2940
+ agent: "agent";
2941
+ }>;
2942
+ p: z.ZodString;
2943
+ }, z.core.$strip>;
2944
+ kind: z.ZodEnum<{
2945
+ task: "task";
2946
+ line: "line";
2947
+ notice: "notice";
2948
+ }>;
2949
+ text: z.ZodOptional<z.ZodString>;
2950
+ format: z.ZodOptional<z.ZodEnum<{
2951
+ plain: "plain";
2952
+ md: "md";
2953
+ }>>;
2954
+ thread: z.ZodOptional<z.ZodString>;
2955
+ broadcast: z.ZodOptional<z.ZodBoolean>;
2956
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
2957
+ p: z.ZodString;
2958
+ }, z.core.$strict>, z.ZodObject<{
2959
+ all: z.ZodLiteral<"channel">;
2960
+ }, z.core.$strict>, z.ZodObject<{
2961
+ all: z.ZodLiteral<"here">;
2962
+ }, z.core.$strict>]>>>;
2963
+ mentionsMe: z.ZodBoolean;
2964
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
2965
+ blob: z.ZodString;
2966
+ name: z.ZodString;
2967
+ mime: z.ZodString;
2968
+ bytes: z.ZodNumber;
2969
+ }, z.core.$strip>>>;
2970
+ edited: z.ZodOptional<z.ZodNumber>;
2971
+ deleted: z.ZodOptional<z.ZodBoolean>;
2972
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2973
+ key: z.ZodString;
2974
+ count: z.ZodNumber;
2975
+ mine: z.ZodBoolean;
2976
+ }, z.core.$strip>>>;
2977
+ pinned: z.ZodOptional<z.ZodBoolean>;
2978
+ replies: z.ZodOptional<z.ZodObject<{
2979
+ count: z.ZodNumber;
2980
+ lastAt: z.ZodNumber;
2981
+ participants: z.ZodArray<z.ZodString>;
2982
+ unread: z.ZodOptional<z.ZodNumber>;
2983
+ following: z.ZodOptional<z.ZodBoolean>;
2984
+ }, z.core.$strip>>;
2985
+ task: z.ZodOptional<z.ZodObject<{
2986
+ id: z.ZodString;
2987
+ state: z.ZodEnum<{
2988
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
2989
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
2990
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
2991
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
2992
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
2993
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
2994
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
2995
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
2996
+ }>;
2997
+ }, z.core.$strip>>;
2998
+ notice: z.ZodOptional<z.ZodObject<{
2999
+ op: z.ZodEnum<{
3000
+ role: "role";
3001
+ remove: "remove";
3002
+ accept: "accept";
3003
+ settings: "settings";
3004
+ create: "create";
3005
+ add: "add";
3006
+ join: "join";
3007
+ leave: "leave";
3008
+ seat: "seat";
3009
+ archive: "archive";
3010
+ policy: "policy";
3011
+ meta: "meta";
3012
+ }>;
3013
+ by: z.ZodObject<{
3014
+ name: z.ZodString;
3015
+ kind: z.ZodEnum<{
3016
+ person: "person";
3017
+ agent: "agent";
3018
+ }>;
3019
+ p: z.ZodString;
3020
+ }, z.core.$strip>;
3021
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
3022
+ name: z.ZodString;
3023
+ kind: z.ZodEnum<{
3024
+ person: "person";
3025
+ agent: "agent";
3026
+ }>;
3027
+ p: z.ZodString;
3028
+ }, z.core.$strip>>>;
3029
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3030
+ name: "name";
3031
+ history: "history";
3032
+ purpose: "purpose";
3033
+ agentContext: "agentContext";
3034
+ bridges: "bridges";
3035
+ visibility: "visibility";
3036
+ retainDays: "retainDays";
3037
+ post: "post";
3038
+ invite: "invite";
3039
+ pins: "pins";
3040
+ topic: "topic";
3041
+ }>>>;
3042
+ }, z.core.$strip>>;
3043
+ delivery: z.ZodOptional<z.ZodEnum<{
3044
+ delivered: "delivered";
3045
+ read: "read";
3046
+ pending: "pending";
3047
+ failed: "failed";
3048
+ sent: "sent";
3049
+ }>>;
3050
+ clientId: z.ZodOptional<z.ZodString>;
3051
+ }, z.core.$strip>>;
3052
+ headSeq: z.ZodNumber;
3053
+ readUpTo: z.ZodOptional<z.ZodNumber>;
3054
+ unread: z.ZodOptional<z.ZodNumber>;
3055
+ mentions: z.ZodOptional<z.ZodNumber>;
3056
+ threadsUnread: z.ZodOptional<z.ZodNumber>;
3057
+ notify: z.ZodOptional<z.ZodEnum<{
3058
+ none: "none";
3059
+ all: "all";
3060
+ mentions: "mentions";
3061
+ }>>;
3062
+ mutedUntil: z.ZodOptional<z.ZodNumber>;
3063
+ draft: z.ZodOptional<z.ZodString>;
3064
+ }, z.core.$strip>;
3065
+ reason: z.ZodEnum<{
3066
+ seat: "seat";
3067
+ allow: "allow";
3068
+ ask: "ask";
3069
+ }>;
3070
+ lookbackDays: z.ZodNumber;
3071
+ indexedFrom: z.ZodOptional<z.ZodNumber>;
3072
+ complete: z.ZodBoolean;
3073
+ }, z.core.$strip>>;
3074
+ cursor: z.ZodOptional<z.ZodString>;
3075
+ }, z.core.$strip>;
3076
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
3077
+ };
3078
+ readonly "context.get": {
3079
+ params: z.ZodObject<{}, z.core.$strict>;
3080
+ result: z.ZodObject<{
3081
+ rules: z.ZodArray<z.ZodObject<{
3082
+ agent: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"*">]>;
3083
+ scope: z.ZodUnion<readonly [z.ZodObject<{
3084
+ cid: z.ZodString;
3085
+ }, z.core.$strict>, z.ZodObject<{
3086
+ kind: z.ZodEnum<{
3087
+ group: "group";
3088
+ dm: "dm";
3089
+ own: "own";
3090
+ "channel.private": "channel.private";
3091
+ "channel.public": "channel.public";
3092
+ }>;
3093
+ }, z.core.$strict>]>;
3094
+ access: z.ZodEnum<{
3095
+ allow: "allow";
3096
+ ask: "ask";
3097
+ off: "off";
3098
+ }>;
3099
+ lookbackDays: z.ZodOptional<z.ZodNumber>;
3100
+ }, z.core.$strict>>;
3101
+ defaults: z.ZodArray<z.ZodObject<{
3102
+ agent: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"*">]>;
3103
+ scope: z.ZodUnion<readonly [z.ZodObject<{
3104
+ cid: z.ZodString;
3105
+ }, z.core.$strict>, z.ZodObject<{
3106
+ kind: z.ZodEnum<{
3107
+ group: "group";
3108
+ dm: "dm";
3109
+ own: "own";
3110
+ "channel.private": "channel.private";
3111
+ "channel.public": "channel.public";
3112
+ }>;
3113
+ }, z.core.$strict>]>;
3114
+ access: z.ZodEnum<{
3115
+ allow: "allow";
3116
+ ask: "ask";
3117
+ off: "off";
3118
+ }>;
3119
+ lookbackDays: z.ZodOptional<z.ZodNumber>;
3120
+ }, z.core.$strict>>;
3121
+ effective: z.ZodArray<z.ZodObject<{
3122
+ agent: z.ZodString;
3123
+ cid: z.ZodString;
3124
+ access: z.ZodEnum<{
3125
+ allow: "allow";
3126
+ ask: "ask";
3127
+ off: "off";
3128
+ }>;
3129
+ }, z.core.$strip>>;
3130
+ }, z.core.$strip>;
3131
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
3132
+ };
3133
+ readonly "context.set": {
3134
+ params: z.ZodObject<{
3135
+ rules: z.ZodArray<z.ZodObject<{
3136
+ agent: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"*">]>;
3137
+ scope: z.ZodUnion<readonly [z.ZodObject<{
3138
+ cid: z.ZodString;
3139
+ }, z.core.$strict>, z.ZodObject<{
3140
+ kind: z.ZodEnum<{
3141
+ group: "group";
3142
+ dm: "dm";
3143
+ own: "own";
3144
+ "channel.private": "channel.private";
3145
+ "channel.public": "channel.public";
3146
+ }>;
3147
+ }, z.core.$strict>]>;
3148
+ access: z.ZodEnum<{
3149
+ allow: "allow";
3150
+ ask: "ask";
3151
+ off: "off";
3152
+ }>;
3153
+ lookbackDays: z.ZodOptional<z.ZodNumber>;
3154
+ }, z.core.$strict>>;
3155
+ }, z.core.$strict>;
3156
+ result: z.ZodObject<{
3157
+ ok: z.ZodLiteral<true>;
3158
+ }, z.core.$strip>;
3159
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
3160
+ };
3161
+ readonly "context.set.preview": {
3162
+ params: z.ZodObject<{
3163
+ rules: z.ZodArray<z.ZodObject<{
3164
+ agent: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"*">]>;
3165
+ scope: z.ZodUnion<readonly [z.ZodObject<{
3166
+ cid: z.ZodString;
3167
+ }, z.core.$strict>, z.ZodObject<{
3168
+ kind: z.ZodEnum<{
3169
+ group: "group";
3170
+ dm: "dm";
3171
+ own: "own";
3172
+ "channel.private": "channel.private";
3173
+ "channel.public": "channel.public";
3174
+ }>;
3175
+ }, z.core.$strict>]>;
3176
+ access: z.ZodEnum<{
3177
+ allow: "allow";
3178
+ ask: "ask";
3179
+ off: "off";
3180
+ }>;
3181
+ lookbackDays: z.ZodOptional<z.ZodNumber>;
3182
+ }, z.core.$strict>>;
3183
+ }, z.core.$strict>;
3184
+ result: z.ZodObject<{
3185
+ changes: z.ZodArray<z.ZodObject<{
3186
+ agent: z.ZodString;
3187
+ cid: z.ZodString;
3188
+ from: z.ZodEnum<{
3189
+ allow: "allow";
3190
+ ask: "ask";
3191
+ off: "off";
3192
+ }>;
3193
+ to: z.ZodEnum<{
3194
+ allow: "allow";
3195
+ ask: "ask";
3196
+ off: "off";
3197
+ }>;
3198
+ }, z.core.$strip>>;
3199
+ }, z.core.$strip>;
3200
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
3201
+ };
3202
+ readonly "conv.policy": {
3203
+ params: z.ZodObject<{
3204
+ agentContext: z.ZodEnum<{
3205
+ none: "none";
3206
+ members: "members";
3207
+ seats: "seats";
3208
+ }>;
3209
+ cid: z.ZodString;
3210
+ }, z.core.$strict>;
3211
+ result: z.ZodObject<{
3212
+ ok: z.ZodLiteral<true>;
3213
+ }, z.core.$strip>;
3214
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
3215
+ };
3216
+ readonly "conv.localRetention": {
3217
+ params: z.ZodObject<{
3218
+ days: z.ZodNumber;
3219
+ cid: z.ZodString;
3220
+ }, z.core.$strict>;
3221
+ result: z.ZodObject<{
3222
+ ok: z.ZodLiteral<true>;
3223
+ }, z.core.$strip>;
3224
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
3225
+ };
3226
+ readonly "conv.backfill": {
3227
+ readonly params: z.ZodObject<{
3228
+ cid: z.ZodString;
3229
+ }, z.core.$strict>;
3230
+ readonly result: z.ZodObject<{
3231
+ indexedFrom: z.ZodOptional<z.ZodNumber>;
3232
+ complete: z.ZodBoolean;
3233
+ }, z.core.$strip>;
3234
+ readonly errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
3235
+ };
3236
+ readonly "file.get": {
3237
+ params: z.ZodObject<{
3238
+ blob: z.ZodString;
3239
+ offset: z.ZodOptional<z.ZodNumber>;
3240
+ limit: z.ZodOptional<z.ZodNumber>;
3241
+ cid: z.ZodString;
3242
+ }, z.core.$strict>;
3243
+ result: z.ZodObject<{
3244
+ data: z.ZodString;
3245
+ offset: z.ZodNumber;
3246
+ more: z.ZodBoolean;
3247
+ mime: z.ZodString;
3248
+ name: z.ZodString;
3249
+ }, z.core.$strip>;
3250
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
3251
+ };
3252
+ readonly "session.activity": {
3253
+ params: z.ZodObject<{
3254
+ key: z.ZodString;
3255
+ body: z.ZodObject<{
3256
+ session: z.ZodString;
3257
+ turn: z.ZodString;
3258
+ seq: z.ZodNumber;
3259
+ source: z.ZodOptional<z.ZodObject<{
3260
+ item: z.ZodOptional<z.ZodString>;
3261
+ cid: z.ZodOptional<z.ZodString>;
3262
+ task: z.ZodOptional<z.ZodString>;
3263
+ }, z.core.$strip>>;
3264
+ kind: z.ZodEnum<{
3265
+ error: "error";
3266
+ cancelled: "cancelled";
3267
+ turn_started: "turn_started";
3268
+ step: "step";
3269
+ turn_ended: "turn_ended";
3270
+ }>;
3271
+ summary: z.ZodOptional<z.ZodString>;
3272
+ }, z.core.$strip>;
3273
+ }, z.core.$strict>;
3274
+ result: z.ZodObject<{
3275
+ ok: z.ZodLiteral<true>;
3276
+ }, z.core.$strip>;
3277
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
3278
+ };
3279
+ readonly "turn.cancel": {
3280
+ params: z.ZodObject<{
3281
+ device: z.ZodString;
3282
+ session: z.ZodString;
3283
+ turn: z.ZodOptional<z.ZodString>;
3284
+ }, z.core.$strict>;
3285
+ result: z.ZodObject<{
3286
+ ok: z.ZodLiteral<true>;
3287
+ }, z.core.$strip>;
3288
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "invalid_state", "conv_conflict", "stale_epoch", "relay_unavailable", "rate_limited", "duplicate", "secret_refused", "refused", "declined", "request_required", "loop_guard", "unknown_device", "binding_invalid"];
3289
+ };
3290
+ readonly "conv.sync": {
3291
+ params: z.ZodObject<{
3292
+ key: z.ZodOptional<z.ZodString>;
3293
+ after: z.ZodOptional<z.ZodNumber>;
3294
+ waitMs: z.ZodOptional<z.ZodNumber>;
3295
+ limit: z.ZodOptional<z.ZodNumber>;
3296
+ }, z.core.$strict>;
3297
+ result: z.ZodObject<{
3298
+ events: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
3299
+ type: z.ZodLiteral<"event">;
3300
+ pos: z.ZodNumber;
3301
+ event: z.ZodObject<{
3302
+ cid: z.ZodString;
3303
+ id: z.ZodString;
3304
+ seq: z.ZodNumber;
3305
+ at: z.ZodNumber;
3306
+ author: z.ZodObject<{
3307
+ name: z.ZodString;
3308
+ kind: z.ZodEnum<{
3309
+ person: "person";
3310
+ agent: "agent";
3311
+ }>;
3312
+ p: z.ZodString;
3313
+ }, z.core.$strip>;
3314
+ kind: z.ZodEnum<{
3315
+ task: "task";
3316
+ line: "line";
3317
+ notice: "notice";
3318
+ }>;
3319
+ text: z.ZodOptional<z.ZodString>;
3320
+ format: z.ZodOptional<z.ZodEnum<{
3321
+ plain: "plain";
3322
+ md: "md";
3323
+ }>>;
3324
+ thread: z.ZodOptional<z.ZodString>;
3325
+ broadcast: z.ZodOptional<z.ZodBoolean>;
3326
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
3327
+ p: z.ZodString;
3328
+ }, z.core.$strict>, z.ZodObject<{
3329
+ all: z.ZodLiteral<"channel">;
3330
+ }, z.core.$strict>, z.ZodObject<{
3331
+ all: z.ZodLiteral<"here">;
3332
+ }, z.core.$strict>]>>>;
3333
+ mentionsMe: z.ZodBoolean;
3334
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
3335
+ blob: z.ZodString;
3336
+ name: z.ZodString;
3337
+ mime: z.ZodString;
3338
+ bytes: z.ZodNumber;
3339
+ }, z.core.$strip>>>;
3340
+ edited: z.ZodOptional<z.ZodNumber>;
3341
+ deleted: z.ZodOptional<z.ZodBoolean>;
3342
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3343
+ key: z.ZodString;
3344
+ count: z.ZodNumber;
3345
+ mine: z.ZodBoolean;
3346
+ }, z.core.$strip>>>;
3347
+ pinned: z.ZodOptional<z.ZodBoolean>;
3348
+ replies: z.ZodOptional<z.ZodObject<{
3349
+ count: z.ZodNumber;
3350
+ lastAt: z.ZodNumber;
3351
+ participants: z.ZodArray<z.ZodString>;
3352
+ unread: z.ZodOptional<z.ZodNumber>;
3353
+ following: z.ZodOptional<z.ZodBoolean>;
3354
+ }, z.core.$strip>>;
3355
+ task: z.ZodOptional<z.ZodObject<{
3356
+ id: z.ZodString;
3357
+ state: z.ZodEnum<{
3358
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
3359
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
3360
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
3361
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
3362
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
3363
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
3364
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
3365
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
3366
+ }>;
3367
+ }, z.core.$strip>>;
3368
+ notice: z.ZodOptional<z.ZodObject<{
3369
+ op: z.ZodEnum<{
3370
+ role: "role";
3371
+ remove: "remove";
3372
+ accept: "accept";
3373
+ settings: "settings";
3374
+ create: "create";
3375
+ add: "add";
3376
+ join: "join";
3377
+ leave: "leave";
3378
+ seat: "seat";
3379
+ archive: "archive";
3380
+ policy: "policy";
3381
+ meta: "meta";
3382
+ }>;
3383
+ by: z.ZodObject<{
3384
+ name: z.ZodString;
3385
+ kind: z.ZodEnum<{
3386
+ person: "person";
3387
+ agent: "agent";
3388
+ }>;
3389
+ p: z.ZodString;
3390
+ }, z.core.$strip>;
3391
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
3392
+ name: z.ZodString;
3393
+ kind: z.ZodEnum<{
3394
+ person: "person";
3395
+ agent: "agent";
3396
+ }>;
3397
+ p: z.ZodString;
3398
+ }, z.core.$strip>>>;
3399
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3400
+ name: "name";
3401
+ history: "history";
3402
+ purpose: "purpose";
3403
+ agentContext: "agentContext";
3404
+ bridges: "bridges";
3405
+ visibility: "visibility";
3406
+ retainDays: "retainDays";
3407
+ post: "post";
3408
+ invite: "invite";
3409
+ pins: "pins";
3410
+ topic: "topic";
3411
+ }>>>;
3412
+ }, z.core.$strip>>;
3413
+ delivery: z.ZodOptional<z.ZodEnum<{
3414
+ delivered: "delivered";
3415
+ read: "read";
3416
+ pending: "pending";
3417
+ failed: "failed";
3418
+ sent: "sent";
3419
+ }>>;
3420
+ clientId: z.ZodOptional<z.ZodString>;
3421
+ }, z.core.$strip>;
3422
+ }, z.core.$strip>, z.ZodObject<{
3423
+ type: z.ZodLiteral<"event.update">;
3424
+ pos: z.ZodNumber;
3425
+ cid: z.ZodString;
3426
+ id: z.ZodString;
3427
+ change: z.ZodEnum<{
3428
+ task: "task";
3429
+ edit: "edit";
3430
+ delete: "delete";
3431
+ react: "react";
3432
+ pin: "pin";
3433
+ replies: "replies";
3434
+ delivery: "delivery";
3435
+ }>;
3436
+ event: z.ZodObject<{
3437
+ cid: z.ZodString;
3438
+ id: z.ZodString;
3439
+ seq: z.ZodNumber;
3440
+ at: z.ZodNumber;
3441
+ author: z.ZodObject<{
3442
+ name: z.ZodString;
3443
+ kind: z.ZodEnum<{
3444
+ person: "person";
3445
+ agent: "agent";
3446
+ }>;
3447
+ p: z.ZodString;
3448
+ }, z.core.$strip>;
3449
+ kind: z.ZodEnum<{
3450
+ task: "task";
3451
+ line: "line";
3452
+ notice: "notice";
3453
+ }>;
3454
+ text: z.ZodOptional<z.ZodString>;
3455
+ format: z.ZodOptional<z.ZodEnum<{
3456
+ plain: "plain";
3457
+ md: "md";
3458
+ }>>;
3459
+ thread: z.ZodOptional<z.ZodString>;
3460
+ broadcast: z.ZodOptional<z.ZodBoolean>;
3461
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
3462
+ p: z.ZodString;
3463
+ }, z.core.$strict>, z.ZodObject<{
3464
+ all: z.ZodLiteral<"channel">;
3465
+ }, z.core.$strict>, z.ZodObject<{
3466
+ all: z.ZodLiteral<"here">;
3467
+ }, z.core.$strict>]>>>;
3468
+ mentionsMe: z.ZodBoolean;
3469
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
3470
+ blob: z.ZodString;
3471
+ name: z.ZodString;
3472
+ mime: z.ZodString;
3473
+ bytes: z.ZodNumber;
3474
+ }, z.core.$strip>>>;
3475
+ edited: z.ZodOptional<z.ZodNumber>;
3476
+ deleted: z.ZodOptional<z.ZodBoolean>;
3477
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3478
+ key: z.ZodString;
3479
+ count: z.ZodNumber;
3480
+ mine: z.ZodBoolean;
3481
+ }, z.core.$strip>>>;
3482
+ pinned: z.ZodOptional<z.ZodBoolean>;
3483
+ replies: z.ZodOptional<z.ZodObject<{
3484
+ count: z.ZodNumber;
3485
+ lastAt: z.ZodNumber;
3486
+ participants: z.ZodArray<z.ZodString>;
3487
+ unread: z.ZodOptional<z.ZodNumber>;
3488
+ following: z.ZodOptional<z.ZodBoolean>;
3489
+ }, z.core.$strip>>;
3490
+ task: z.ZodOptional<z.ZodObject<{
3491
+ id: z.ZodString;
3492
+ state: z.ZodEnum<{
3493
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
3494
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
3495
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
3496
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
3497
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
3498
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
3499
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
3500
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
3501
+ }>;
3502
+ }, z.core.$strip>>;
3503
+ notice: z.ZodOptional<z.ZodObject<{
3504
+ op: z.ZodEnum<{
3505
+ role: "role";
3506
+ remove: "remove";
3507
+ accept: "accept";
3508
+ settings: "settings";
3509
+ create: "create";
3510
+ add: "add";
3511
+ join: "join";
3512
+ leave: "leave";
3513
+ seat: "seat";
3514
+ archive: "archive";
3515
+ policy: "policy";
3516
+ meta: "meta";
3517
+ }>;
3518
+ by: z.ZodObject<{
3519
+ name: z.ZodString;
3520
+ kind: z.ZodEnum<{
3521
+ person: "person";
3522
+ agent: "agent";
3523
+ }>;
3524
+ p: z.ZodString;
3525
+ }, z.core.$strip>;
3526
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
3527
+ name: z.ZodString;
3528
+ kind: z.ZodEnum<{
3529
+ person: "person";
3530
+ agent: "agent";
3531
+ }>;
3532
+ p: z.ZodString;
3533
+ }, z.core.$strip>>>;
3534
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3535
+ name: "name";
3536
+ history: "history";
3537
+ purpose: "purpose";
3538
+ agentContext: "agentContext";
3539
+ bridges: "bridges";
3540
+ visibility: "visibility";
3541
+ retainDays: "retainDays";
3542
+ post: "post";
3543
+ invite: "invite";
3544
+ pins: "pins";
3545
+ topic: "topic";
3546
+ }>>>;
3547
+ }, z.core.$strip>>;
3548
+ delivery: z.ZodOptional<z.ZodEnum<{
3549
+ delivered: "delivered";
3550
+ read: "read";
3551
+ pending: "pending";
3552
+ failed: "failed";
3553
+ sent: "sent";
3554
+ }>>;
3555
+ clientId: z.ZodOptional<z.ZodString>;
3556
+ }, z.core.$strip>;
3557
+ }, z.core.$strip>, z.ZodObject<{
3558
+ type: z.ZodLiteral<"conv">;
3559
+ pos: z.ZodNumber;
3560
+ conv: z.ZodObject<{
3561
+ cid: z.ZodString;
3562
+ kind: z.ZodEnum<{
3563
+ self: "self";
3564
+ channel: "channel";
3565
+ group: "group";
3566
+ dm: "dm";
3567
+ }>;
3568
+ visibility: z.ZodOptional<z.ZodEnum<{
3569
+ public: "public";
3570
+ private: "private";
3571
+ }>>;
3572
+ history: z.ZodEnum<{
3573
+ none: "none";
3574
+ shared: "shared";
3575
+ }>;
3576
+ retainDays: z.ZodNumber;
3577
+ agentContext: z.ZodEnum<{
3578
+ none: "none";
3579
+ members: "members";
3580
+ seats: "seats";
3581
+ }>;
3582
+ name: z.ZodOptional<z.ZodString>;
3583
+ topic: z.ZodOptional<z.ZodString>;
3584
+ purpose: z.ZodOptional<z.ZodString>;
3585
+ archived: z.ZodBoolean;
3586
+ role: z.ZodEnum<{
3587
+ admin: "admin";
3588
+ member: "member";
3589
+ owner: "owner";
3590
+ guest: "guest";
3591
+ }>;
3592
+ participants: z.ZodNumber;
3593
+ dmWith: z.ZodOptional<z.ZodObject<{
3594
+ p: z.ZodString;
3595
+ kind: z.ZodEnum<{
3596
+ person: "person";
3597
+ agent: "agent";
3598
+ }>;
3599
+ role: z.ZodEnum<{
3600
+ admin: "admin";
3601
+ member: "member";
3602
+ owner: "owner";
3603
+ guest: "guest";
3604
+ }>;
3605
+ state: z.ZodEnum<{
3606
+ member: "member";
3607
+ invited: "invited";
3608
+ }>;
3609
+ name: z.ZodString;
3610
+ handle: z.ZodOptional<z.ZodString>;
3611
+ org: z.ZodEnum<{
3612
+ other: "other";
3613
+ none: "none";
3614
+ same: "same";
3615
+ }>;
3616
+ presence: z.ZodEnum<{
3617
+ unknown: "unknown";
3618
+ away: "away";
3619
+ offline: "offline";
3620
+ online: "online";
3621
+ }>;
3622
+ agentState: z.ZodOptional<z.ZodEnum<{
3623
+ idle: "idle";
3624
+ busy: "busy";
3625
+ kept: "kept";
3626
+ }>>;
3627
+ respondTo: z.ZodOptional<z.ZodEnum<{
3628
+ self: "self";
3629
+ none: "none";
3630
+ members: "members";
3631
+ }>>;
3632
+ }, z.core.$strip>>;
3633
+ last: z.ZodOptional<z.ZodObject<{
3634
+ cid: z.ZodString;
3635
+ id: z.ZodString;
3636
+ seq: z.ZodNumber;
3637
+ at: z.ZodNumber;
3638
+ author: z.ZodObject<{
3639
+ name: z.ZodString;
3640
+ kind: z.ZodEnum<{
3641
+ person: "person";
3642
+ agent: "agent";
3643
+ }>;
3644
+ p: z.ZodString;
3645
+ }, z.core.$strip>;
3646
+ kind: z.ZodEnum<{
3647
+ task: "task";
3648
+ line: "line";
3649
+ notice: "notice";
3650
+ }>;
3651
+ text: z.ZodOptional<z.ZodString>;
3652
+ format: z.ZodOptional<z.ZodEnum<{
3653
+ plain: "plain";
3654
+ md: "md";
3655
+ }>>;
3656
+ thread: z.ZodOptional<z.ZodString>;
3657
+ broadcast: z.ZodOptional<z.ZodBoolean>;
3658
+ mentions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
3659
+ p: z.ZodString;
3660
+ }, z.core.$strict>, z.ZodObject<{
3661
+ all: z.ZodLiteral<"channel">;
3662
+ }, z.core.$strict>, z.ZodObject<{
3663
+ all: z.ZodLiteral<"here">;
3664
+ }, z.core.$strict>]>>>;
3665
+ mentionsMe: z.ZodBoolean;
3666
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
3667
+ blob: z.ZodString;
3668
+ name: z.ZodString;
3669
+ mime: z.ZodString;
3670
+ bytes: z.ZodNumber;
3671
+ }, z.core.$strip>>>;
3672
+ edited: z.ZodOptional<z.ZodNumber>;
3673
+ deleted: z.ZodOptional<z.ZodBoolean>;
3674
+ reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3675
+ key: z.ZodString;
3676
+ count: z.ZodNumber;
3677
+ mine: z.ZodBoolean;
3678
+ }, z.core.$strip>>>;
3679
+ pinned: z.ZodOptional<z.ZodBoolean>;
3680
+ replies: z.ZodOptional<z.ZodObject<{
3681
+ count: z.ZodNumber;
3682
+ lastAt: z.ZodNumber;
3683
+ participants: z.ZodArray<z.ZodString>;
3684
+ unread: z.ZodOptional<z.ZodNumber>;
3685
+ following: z.ZodOptional<z.ZodBoolean>;
3686
+ }, z.core.$strip>>;
3687
+ task: z.ZodOptional<z.ZodObject<{
3688
+ id: z.ZodString;
3689
+ state: z.ZodEnum<{
3690
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
3691
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
3692
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
3693
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
3694
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
3695
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
3696
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
3697
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
3698
+ }>;
3699
+ }, z.core.$strip>>;
3700
+ notice: z.ZodOptional<z.ZodObject<{
3701
+ op: z.ZodEnum<{
3702
+ role: "role";
3703
+ remove: "remove";
3704
+ accept: "accept";
3705
+ settings: "settings";
3706
+ create: "create";
3707
+ add: "add";
3708
+ join: "join";
3709
+ leave: "leave";
3710
+ seat: "seat";
3711
+ archive: "archive";
3712
+ policy: "policy";
3713
+ meta: "meta";
3714
+ }>;
3715
+ by: z.ZodObject<{
3716
+ name: z.ZodString;
3717
+ kind: z.ZodEnum<{
3718
+ person: "person";
3719
+ agent: "agent";
3720
+ }>;
3721
+ p: z.ZodString;
3722
+ }, z.core.$strip>;
3723
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
3724
+ name: z.ZodString;
3725
+ kind: z.ZodEnum<{
3726
+ person: "person";
3727
+ agent: "agent";
3728
+ }>;
3729
+ p: z.ZodString;
3730
+ }, z.core.$strip>>>;
3731
+ fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3732
+ name: "name";
3733
+ history: "history";
3734
+ purpose: "purpose";
3735
+ agentContext: "agentContext";
3736
+ bridges: "bridges";
3737
+ visibility: "visibility";
3738
+ retainDays: "retainDays";
3739
+ post: "post";
3740
+ invite: "invite";
3741
+ pins: "pins";
3742
+ topic: "topic";
3743
+ }>>>;
3744
+ }, z.core.$strip>>;
3745
+ delivery: z.ZodOptional<z.ZodEnum<{
3746
+ delivered: "delivered";
3747
+ read: "read";
3748
+ pending: "pending";
3749
+ failed: "failed";
3750
+ sent: "sent";
3751
+ }>>;
3752
+ clientId: z.ZodOptional<z.ZodString>;
3753
+ }, z.core.$strip>>;
3754
+ headSeq: z.ZodNumber;
3755
+ readUpTo: z.ZodOptional<z.ZodNumber>;
3756
+ unread: z.ZodOptional<z.ZodNumber>;
3757
+ mentions: z.ZodOptional<z.ZodNumber>;
3758
+ threadsUnread: z.ZodOptional<z.ZodNumber>;
3759
+ notify: z.ZodOptional<z.ZodEnum<{
3760
+ none: "none";
3761
+ all: "all";
3762
+ mentions: "mentions";
3763
+ }>>;
3764
+ mutedUntil: z.ZodOptional<z.ZodNumber>;
3765
+ draft: z.ZodOptional<z.ZodString>;
3766
+ }, z.core.$strip>;
3767
+ }, z.core.$strip>, z.ZodObject<{
3768
+ type: z.ZodLiteral<"member">;
3769
+ pos: z.ZodNumber;
3770
+ cid: z.ZodString;
3771
+ participant: z.ZodObject<{
3772
+ p: z.ZodString;
3773
+ kind: z.ZodEnum<{
3774
+ person: "person";
3775
+ agent: "agent";
3776
+ }>;
3777
+ role: z.ZodEnum<{
3778
+ admin: "admin";
3779
+ member: "member";
3780
+ owner: "owner";
3781
+ guest: "guest";
3782
+ }>;
3783
+ state: z.ZodEnum<{
3784
+ member: "member";
3785
+ invited: "invited";
3786
+ }>;
3787
+ name: z.ZodString;
3788
+ handle: z.ZodOptional<z.ZodString>;
3789
+ org: z.ZodEnum<{
3790
+ other: "other";
3791
+ none: "none";
3792
+ same: "same";
3793
+ }>;
3794
+ presence: z.ZodEnum<{
3795
+ unknown: "unknown";
3796
+ away: "away";
3797
+ offline: "offline";
3798
+ online: "online";
3799
+ }>;
3800
+ agentState: z.ZodOptional<z.ZodEnum<{
3801
+ idle: "idle";
3802
+ busy: "busy";
3803
+ kept: "kept";
3804
+ }>>;
3805
+ respondTo: z.ZodOptional<z.ZodEnum<{
3806
+ self: "self";
3807
+ none: "none";
3808
+ members: "members";
3809
+ }>>;
3810
+ }, z.core.$strip>;
3811
+ change: z.ZodEnum<{
3812
+ role: "role";
3813
+ removed: "removed";
3814
+ added: "added";
3815
+ invited: "invited";
3816
+ seat: "seat";
3817
+ presence: "presence";
3818
+ }>;
3819
+ }, z.core.$strip>, z.ZodObject<{
3820
+ type: z.ZodLiteral<"read">;
3821
+ pos: z.ZodNumber;
3822
+ cid: z.ZodString;
3823
+ readUpTo: z.ZodNumber;
3824
+ unread: z.ZodNumber;
3825
+ mentions: z.ZodNumber;
3826
+ }, z.core.$strip>, z.ZodObject<{
3827
+ type: z.ZodLiteral<"typing">;
3828
+ cid: z.ZodString;
3829
+ p: z.ZodString;
3830
+ thread: z.ZodOptional<z.ZodString>;
3831
+ until: z.ZodNumber;
3832
+ }, z.core.$strip>, z.ZodObject<{
3833
+ type: z.ZodLiteral<"activity">;
3834
+ body: z.ZodObject<{
3835
+ session: z.ZodString;
3836
+ turn: z.ZodString;
3837
+ seq: z.ZodNumber;
3838
+ source: z.ZodOptional<z.ZodObject<{
3839
+ item: z.ZodOptional<z.ZodString>;
3840
+ cid: z.ZodOptional<z.ZodString>;
3841
+ task: z.ZodOptional<z.ZodString>;
3842
+ }, z.core.$strip>>;
3843
+ kind: z.ZodEnum<{
3844
+ error: "error";
3845
+ cancelled: "cancelled";
3846
+ turn_started: "turn_started";
3847
+ step: "step";
3848
+ turn_ended: "turn_ended";
3849
+ }>;
3850
+ summary: z.ZodOptional<z.ZodString>;
3851
+ }, z.core.$strip>;
3852
+ }, z.core.$strip>, z.ZodObject<{
3853
+ type: z.ZodLiteral<"gap">;
3854
+ pos: z.ZodNumber;
3855
+ }, z.core.$strip>], "type">>;
3856
+ pos: z.ZodNumber;
3857
+ }, z.core.$strip>;
3858
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
3859
+ };
3860
+ readonly "people.get": {
3861
+ params: z.ZodObject<{
3862
+ people: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
3863
+ }, z.core.$strict>;
3864
+ result: z.ZodObject<{
3865
+ people: z.ZodArray<z.ZodObject<{
3866
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
3867
+ name: z.ZodString;
3868
+ handle: z.ZodString;
3869
+ org: z.ZodEnum<{
3870
+ other: "other";
3871
+ none: "none";
3872
+ same: "same";
3873
+ }>;
3874
+ vouched: z.ZodEnum<{
3875
+ admin: "admin";
3876
+ device: "device";
3877
+ jelly: "jelly";
3878
+ service: "service";
3879
+ }>;
3880
+ }, z.core.$strip>>;
3881
+ missing: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
3882
+ }, z.core.$strip>;
3883
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
3884
+ };
3885
+ readonly "sessions.list": {
3886
+ params: z.ZodObject<{}, z.core.$strict>;
3887
+ result: z.ZodObject<{
3888
+ sessions: z.ZodArray<z.ZodObject<{
3889
+ agent: z.ZodString;
3890
+ state: z.ZodEnum<{
3891
+ idle: "idle";
3892
+ busy: "busy";
3893
+ kept: "kept";
3894
+ }>;
3895
+ seats: z.ZodArray<z.ZodString>;
3896
+ }, z.core.$strip>>;
3897
+ }, z.core.$strip>;
3898
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
3899
+ };
3900
+ readonly "request.waiting": {
3901
+ params: z.ZodObject<{
3902
+ limit: z.ZodOptional<z.ZodNumber>;
3903
+ cursor: z.ZodOptional<z.ZodString>;
3904
+ }, z.core.$strict>;
3905
+ result: z.ZodObject<{
3906
+ items: z.ZodArray<z.ZodObject<{
3907
+ id: z.ZodString;
3908
+ kind: z.ZodEnum<{
3909
+ message: "message";
3910
+ task: "task";
3911
+ contact: "contact";
3912
+ }>;
3913
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
3914
+ name: z.ZodString;
3915
+ at: z.ZodNumber;
3916
+ cid: z.ZodOptional<z.ZodString>;
3917
+ agent: z.ZodOptional<z.ZodString>;
3918
+ state: z.ZodEnum<{
3919
+ held: "held";
3920
+ "pending-delivery": "pending-delivery";
3921
+ }>;
3922
+ }, z.core.$strip>>;
3923
+ cursor: z.ZodOptional<z.ZodString>;
3924
+ }, z.core.$strip>;
3925
+ errors: readonly ["invalid_request", "forbidden", "not_found", "too_large", "internal", "no_identity", "unknown_session", "grant_required", "grant_invalid", "directory_unavailable", "directory_inconsistent", "relay_unavailable"];
3926
+ };
3927
+ };
3928
+ export type ConversationMethod = keyof typeof CONVERSATION_METHODS;
3929
+ /** Staged contracts have no live handler or socket tier until their owning lane ships. */
3930
+ export declare const STAGED_CONVERSATION_METHODS: readonly ["conv.catalogue", "conv.publish", "conv.markRead", "conv.markUnread", "conv.prefs", "conv.follow", "conv.save", "conv.saved", "conv.draft", "conv.schedule", "conv.scheduled", "conv.unschedule", "conv.typing", "context.get", "context.set", "context.set.preview", "conv.localRetention", "file.get", "session.activity", "turn.cancel"];
3931
+ export type LiveConversationMethod = Exclude<ConversationMethod, typeof STAGED_CONVERSATION_METHODS[number]>;
3932
+ export declare const LIVE_CONVERSATION_METHODS: Pick<typeof CONVERSATION_METHODS, LiveConversationMethod>;
3933
+ export type ConversationParams<M extends ConversationMethod> = z.input<(typeof CONVERSATION_METHODS)[M]["params"]>;
3934
+ export type ConversationResult<M extends ConversationMethod> = z.output<(typeof CONVERSATION_METHODS)[M]["result"]>;
3935
+ /** agent means both sockets, human means admin socket only. session.activity is runtime-only, not a model tool. */
3936
+ export declare const CONVERSATION_TIERS: {
3937
+ readonly "conv.list": "agent";
3938
+ readonly "conv.get": "human";
3939
+ readonly "conv.members": "human";
3940
+ readonly "conv.read": "agent";
3941
+ readonly "conv.threads": "human";
3942
+ readonly "conv.send": "agent";
3943
+ readonly "conv.react": "agent";
3944
+ readonly "conv.edit": "agent";
3945
+ readonly "conv.delete": "agent";
3946
+ readonly "conv.pin": "human";
3947
+ readonly "conv.create": "human";
3948
+ readonly "conv.add": "human";
3949
+ readonly "conv.remove": "human";
3950
+ readonly "conv.role": "human";
3951
+ readonly "conv.seat": "human";
3952
+ readonly "conv.settings": "human";
3953
+ readonly "conv.meta": "human";
3954
+ readonly "conv.archive": "human";
3955
+ readonly "conv.leave": "human";
3956
+ readonly "conv.join": "human";
3957
+ readonly "conv.accept": "human";
3958
+ readonly "conv.catalogue": "human";
3959
+ readonly "conv.publish": "human";
3960
+ readonly "conv.markRead": "human";
3961
+ readonly "conv.markUnread": "human";
3962
+ readonly "conv.prefs": "human";
3963
+ readonly "conv.follow": "human";
3964
+ readonly "conv.save": "human";
3965
+ readonly "conv.saved": "human";
3966
+ readonly "conv.draft": "human";
3967
+ readonly "conv.schedule": "human";
3968
+ readonly "conv.scheduled": "human";
3969
+ readonly "conv.unschedule": "human";
3970
+ readonly "conv.typing": "human";
3971
+ readonly "conv.search": "agent";
3972
+ readonly "conv.context": "agent";
3973
+ readonly "conv.access": "agent";
3974
+ readonly "context.get": "human";
3975
+ readonly "context.set": "human";
3976
+ readonly "context.set.preview": "human";
3977
+ readonly "conv.policy": "human";
3978
+ readonly "conv.localRetention": "human";
3979
+ readonly "conv.backfill": "human";
3980
+ readonly "file.get": "human";
3981
+ readonly "session.activity": "agent";
3982
+ readonly "turn.cancel": "human";
3983
+ readonly "conv.sync": "agent";
3984
+ readonly "people.get": "human";
3985
+ readonly "request.waiting": "human";
3986
+ readonly "sessions.list": "human";
3987
+ };