@joe-broadhead/messaging 0.7.1 → 0.9.0

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