@relaycast/types 0.2.4 → 0.3.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 (65) hide show
  1. package/dist/agent.d.ts +139 -35
  2. package/dist/agent.d.ts.map +1 -1
  3. package/dist/agent.js +73 -1
  4. package/dist/agent.js.map +1 -1
  5. package/dist/api.d.ts +50 -19
  6. package/dist/api.d.ts.map +1 -1
  7. package/dist/api.js +22 -1
  8. package/dist/api.js.map +1 -1
  9. package/dist/billing.d.ts +73 -43
  10. package/dist/billing.d.ts.map +1 -1
  11. package/dist/billing.js +44 -1
  12. package/dist/billing.js.map +1 -1
  13. package/dist/channel.d.ts +47 -33
  14. package/dist/channel.d.ts.map +1 -1
  15. package/dist/channel.js +35 -1
  16. package/dist/channel.js.map +1 -1
  17. package/dist/command.d.ts +84 -46
  18. package/dist/command.d.ts.map +1 -1
  19. package/dist/command.js +47 -1
  20. package/dist/command.js.map +1 -1
  21. package/dist/dm.d.ts +48 -32
  22. package/dist/dm.d.ts.map +1 -1
  23. package/dist/dm.js +33 -1
  24. package/dist/dm.js.map +1 -1
  25. package/dist/events.d.ts +509 -153
  26. package/dist/events.d.ts.map +1 -1
  27. package/dist/events.js +206 -1
  28. package/dist/events.js.map +1 -1
  29. package/dist/file.d.ts +52 -37
  30. package/dist/file.d.ts.map +1 -1
  31. package/dist/file.js +38 -1
  32. package/dist/file.js.map +1 -1
  33. package/dist/index.d.ts +0 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +0 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/message.d.ts +232 -70
  38. package/dist/message.d.ts.map +1 -1
  39. package/dist/message.js +75 -1
  40. package/dist/message.js.map +1 -1
  41. package/dist/reaction.d.ts +19 -15
  42. package/dist/reaction.d.ts.map +1 -1
  43. package/dist/reaction.js +16 -1
  44. package/dist/reaction.js.map +1 -1
  45. package/dist/receipt.d.ts +19 -15
  46. package/dist/receipt.d.ts.map +1 -1
  47. package/dist/receipt.js +16 -1
  48. package/dist/receipt.js.map +1 -1
  49. package/dist/subscription.d.ts +120 -29
  50. package/dist/subscription.d.ts.map +1 -1
  51. package/dist/subscription.js +49 -1
  52. package/dist/subscription.js.map +1 -1
  53. package/dist/webhook.d.ts +40 -34
  54. package/dist/webhook.d.ts.map +1 -1
  55. package/dist/webhook.js +35 -1
  56. package/dist/webhook.js.map +1 -1
  57. package/dist/workspace.d.ts +72 -23
  58. package/dist/workspace.d.ts.map +1 -1
  59. package/dist/workspace.js +57 -1
  60. package/dist/workspace.js.map +1 -1
  61. package/package.json +4 -1
  62. package/dist/dashboard.d.ts +0 -47
  63. package/dist/dashboard.d.ts.map +0 -1
  64. package/dist/dashboard.js +0 -2
  65. package/dist/dashboard.js.map +0 -1
package/dist/events.d.ts CHANGED
@@ -1,156 +1,512 @@
1
- export interface SubscribeEvent {
2
- type: 'subscribe';
3
- channels: string[];
4
- }
5
- export interface UnsubscribeEvent {
6
- type: 'unsubscribe';
7
- channels: string[];
8
- }
9
- export interface PingEvent {
10
- type: 'ping';
11
- }
12
- export type ClientEvent = SubscribeEvent | UnsubscribeEvent | PingEvent;
13
- export interface MessageCreatedEvent {
14
- type: 'message.created';
15
- channel: string;
16
- message: {
17
- id: string;
18
- agent_name: string;
19
- text: string;
20
- attachments: Array<{
21
- file_id: string;
22
- filename: string;
23
- url: string;
24
- size: number;
25
- }>;
26
- };
27
- }
28
- export interface MessageUpdatedEvent {
29
- type: 'message.updated';
30
- channel: string;
31
- message: {
32
- id: string;
33
- agent_name: string;
34
- text: string;
35
- };
36
- }
37
- export interface ThreadReplyEvent {
38
- type: 'thread.reply';
39
- parent_id: string;
40
- message: {
41
- id: string;
42
- agent_name: string;
43
- text: string;
44
- };
45
- }
46
- export interface ReactionAddedEvent {
47
- type: 'reaction.added';
48
- message_id: string;
49
- emoji: string;
50
- agent_name: string;
51
- }
52
- export interface ReactionRemovedEvent {
53
- type: 'reaction.removed';
54
- message_id: string;
55
- emoji: string;
56
- agent_name: string;
57
- }
58
- export interface DmReceivedEvent {
59
- type: 'dm.received';
60
- conversation_id: string;
61
- message: {
62
- id: string;
63
- agent_name: string;
64
- text: string;
65
- };
66
- }
67
- export interface GroupDmReceivedEvent {
68
- type: 'group_dm.received';
69
- conversation_id: string;
70
- message: {
71
- id: string;
72
- agent_name: string;
73
- text: string;
74
- };
75
- }
76
- export interface AgentOnlineEvent {
77
- type: 'agent.online';
78
- agent: {
79
- name: string;
80
- };
81
- }
82
- export interface AgentOfflineEvent {
83
- type: 'agent.offline';
84
- agent: {
85
- name: string;
86
- };
87
- }
88
- export interface ChannelCreatedEvent {
89
- type: 'channel.created';
90
- channel: {
91
- name: string;
92
- topic: string | null;
93
- };
94
- }
95
- export interface ChannelUpdatedEvent {
96
- type: 'channel.updated';
97
- channel: {
98
- name: string;
99
- topic: string | null;
100
- };
101
- }
102
- export interface ChannelArchivedEvent {
103
- type: 'channel.archived';
104
- channel: {
105
- name: string;
106
- };
107
- }
108
- export interface MemberJoinedEvent {
109
- type: 'member.joined';
110
- channel: string;
111
- agent_name: string;
112
- }
113
- export interface MemberLeftEvent {
114
- type: 'member.left';
115
- channel: string;
116
- agent_name: string;
117
- }
118
- export interface MessageReadEvent {
119
- type: 'message.read';
120
- message_id: string;
121
- agent_name: string;
122
- read_at: string;
123
- }
124
- export interface FileUploadedEvent {
125
- type: 'file.uploaded';
126
- file: {
127
- file_id: string;
128
- filename: string;
129
- uploaded_by: string;
130
- };
131
- }
132
- export interface PongEvent {
133
- type: 'pong';
134
- }
135
- export interface WebhookReceivedEvent {
136
- type: 'webhook.received';
137
- webhook_id: string;
138
- channel: string;
139
- message: {
140
- id: string;
141
- text: string;
142
- source: string | null;
143
- };
144
- }
145
- export interface CommandInvokedEvent {
146
- type: 'command.invoked';
147
- command: string;
148
- channel: string;
149
- invoked_by: string;
150
- args: string | null;
151
- parameters: Record<string, unknown> | null;
152
- }
153
- export type ServerEvent = MessageCreatedEvent | MessageUpdatedEvent | ThreadReplyEvent | ReactionAddedEvent | ReactionRemovedEvent | DmReceivedEvent | GroupDmReceivedEvent | AgentOnlineEvent | AgentOfflineEvent | ChannelCreatedEvent | ChannelUpdatedEvent | ChannelArchivedEvent | MemberJoinedEvent | MemberLeftEvent | MessageReadEvent | FileUploadedEvent | WebhookReceivedEvent | CommandInvokedEvent | PongEvent;
1
+ import { z } from 'zod';
2
+ export declare const SubscribeEventSchema: z.ZodObject<{
3
+ type: z.ZodLiteral<"subscribe">;
4
+ channels: z.ZodArray<z.ZodString>;
5
+ }, z.core.$strip>;
6
+ export type SubscribeEvent = z.infer<typeof SubscribeEventSchema>;
7
+ export declare const UnsubscribeEventSchema: z.ZodObject<{
8
+ type: z.ZodLiteral<"unsubscribe">;
9
+ channels: z.ZodArray<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ export type UnsubscribeEvent = z.infer<typeof UnsubscribeEventSchema>;
12
+ export declare const PingEventSchema: z.ZodObject<{
13
+ type: z.ZodLiteral<"ping">;
14
+ }, z.core.$strip>;
15
+ export type PingEvent = z.infer<typeof PingEventSchema>;
16
+ export declare const ClientEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
17
+ type: z.ZodLiteral<"subscribe">;
18
+ channels: z.ZodArray<z.ZodString>;
19
+ }, z.core.$strip>, z.ZodObject<{
20
+ type: z.ZodLiteral<"unsubscribe">;
21
+ channels: z.ZodArray<z.ZodString>;
22
+ }, z.core.$strip>, z.ZodObject<{
23
+ type: z.ZodLiteral<"ping">;
24
+ }, z.core.$strip>], "type">;
25
+ export type ClientEvent = z.infer<typeof ClientEventSchema>;
26
+ export declare const MessageCreatedEventSchema: z.ZodObject<{
27
+ type: z.ZodLiteral<"message.created">;
28
+ channel: z.ZodString;
29
+ message: z.ZodObject<{
30
+ id: z.ZodString;
31
+ agent_name: z.ZodString;
32
+ text: z.ZodString;
33
+ attachments: z.ZodArray<z.ZodObject<{
34
+ file_id: z.ZodString;
35
+ filename: z.ZodString;
36
+ url: z.ZodString;
37
+ size: z.ZodNumber;
38
+ }, z.core.$strip>>;
39
+ }, z.core.$strip>;
40
+ }, z.core.$strip>;
41
+ export type MessageCreatedEvent = z.infer<typeof MessageCreatedEventSchema>;
42
+ export declare const MessageUpdatedEventSchema: z.ZodObject<{
43
+ type: z.ZodLiteral<"message.updated">;
44
+ channel: z.ZodString;
45
+ message: z.ZodObject<{
46
+ id: z.ZodString;
47
+ agent_name: z.ZodString;
48
+ text: z.ZodString;
49
+ }, z.core.$strip>;
50
+ }, z.core.$strip>;
51
+ export type MessageUpdatedEvent = z.infer<typeof MessageUpdatedEventSchema>;
52
+ export declare const ThreadReplyEventSchema: z.ZodObject<{
53
+ type: z.ZodLiteral<"thread.reply">;
54
+ parent_id: z.ZodString;
55
+ message: z.ZodObject<{
56
+ id: z.ZodString;
57
+ agent_name: z.ZodString;
58
+ text: z.ZodString;
59
+ }, z.core.$strip>;
60
+ }, z.core.$strip>;
61
+ export type ThreadReplyEvent = z.infer<typeof ThreadReplyEventSchema>;
62
+ export declare const ReactionAddedEventSchema: z.ZodObject<{
63
+ type: z.ZodLiteral<"reaction.added">;
64
+ message_id: z.ZodString;
65
+ emoji: z.ZodString;
66
+ agent_name: z.ZodString;
67
+ }, z.core.$strip>;
68
+ export type ReactionAddedEvent = z.infer<typeof ReactionAddedEventSchema>;
69
+ export declare const ReactionRemovedEventSchema: z.ZodObject<{
70
+ type: z.ZodLiteral<"reaction.removed">;
71
+ message_id: z.ZodString;
72
+ emoji: z.ZodString;
73
+ agent_name: z.ZodString;
74
+ }, z.core.$strip>;
75
+ export type ReactionRemovedEvent = z.infer<typeof ReactionRemovedEventSchema>;
76
+ export declare const DmReceivedEventSchema: z.ZodObject<{
77
+ type: z.ZodLiteral<"dm.received">;
78
+ conversation_id: z.ZodString;
79
+ message: z.ZodObject<{
80
+ id: z.ZodString;
81
+ agent_name: z.ZodString;
82
+ text: z.ZodString;
83
+ }, z.core.$strip>;
84
+ }, z.core.$strip>;
85
+ export type DmReceivedEvent = z.infer<typeof DmReceivedEventSchema>;
86
+ export declare const GroupDmReceivedEventSchema: z.ZodObject<{
87
+ type: z.ZodLiteral<"group_dm.received">;
88
+ conversation_id: z.ZodString;
89
+ message: z.ZodObject<{
90
+ id: z.ZodString;
91
+ agent_name: z.ZodString;
92
+ text: z.ZodString;
93
+ }, z.core.$strip>;
94
+ }, z.core.$strip>;
95
+ export type GroupDmReceivedEvent = z.infer<typeof GroupDmReceivedEventSchema>;
96
+ export declare const AgentOnlineEventSchema: z.ZodObject<{
97
+ type: z.ZodLiteral<"agent.online">;
98
+ agent: z.ZodObject<{
99
+ name: z.ZodString;
100
+ }, z.core.$strip>;
101
+ }, z.core.$strip>;
102
+ export type AgentOnlineEvent = z.infer<typeof AgentOnlineEventSchema>;
103
+ export declare const AgentOfflineEventSchema: z.ZodObject<{
104
+ type: z.ZodLiteral<"agent.offline">;
105
+ agent: z.ZodObject<{
106
+ name: z.ZodString;
107
+ }, z.core.$strip>;
108
+ }, z.core.$strip>;
109
+ export type AgentOfflineEvent = z.infer<typeof AgentOfflineEventSchema>;
110
+ export declare const AgentSpawnRequestedEventSchema: z.ZodObject<{
111
+ type: z.ZodLiteral<"agent.spawn_requested">;
112
+ agent: z.ZodObject<{
113
+ name: z.ZodString;
114
+ cli: z.ZodString;
115
+ task: z.ZodString;
116
+ channel: z.ZodNullable<z.ZodString>;
117
+ already_existed: z.ZodBoolean;
118
+ }, z.core.$strip>;
119
+ }, z.core.$strip>;
120
+ export type AgentSpawnRequestedEvent = z.infer<typeof AgentSpawnRequestedEventSchema>;
121
+ export declare const AgentReleaseRequestedEventSchema: z.ZodObject<{
122
+ type: z.ZodLiteral<"agent.release_requested">;
123
+ agent: z.ZodObject<{
124
+ name: z.ZodString;
125
+ }, z.core.$strip>;
126
+ reason: z.ZodNullable<z.ZodString>;
127
+ deleted: z.ZodBoolean;
128
+ }, z.core.$strip>;
129
+ export type AgentReleaseRequestedEvent = z.infer<typeof AgentReleaseRequestedEventSchema>;
130
+ export declare const ChannelCreatedEventSchema: z.ZodObject<{
131
+ type: z.ZodLiteral<"channel.created">;
132
+ channel: z.ZodObject<{
133
+ name: z.ZodString;
134
+ topic: z.ZodNullable<z.ZodString>;
135
+ }, z.core.$strip>;
136
+ }, z.core.$strip>;
137
+ export type ChannelCreatedEvent = z.infer<typeof ChannelCreatedEventSchema>;
138
+ export declare const ChannelUpdatedEventSchema: z.ZodObject<{
139
+ type: z.ZodLiteral<"channel.updated">;
140
+ channel: z.ZodObject<{
141
+ name: z.ZodString;
142
+ topic: z.ZodNullable<z.ZodString>;
143
+ }, z.core.$strip>;
144
+ }, z.core.$strip>;
145
+ export type ChannelUpdatedEvent = z.infer<typeof ChannelUpdatedEventSchema>;
146
+ export declare const ChannelArchivedEventSchema: z.ZodObject<{
147
+ type: z.ZodLiteral<"channel.archived">;
148
+ channel: z.ZodObject<{
149
+ name: z.ZodString;
150
+ }, z.core.$strip>;
151
+ }, z.core.$strip>;
152
+ export type ChannelArchivedEvent = z.infer<typeof ChannelArchivedEventSchema>;
153
+ export declare const MemberJoinedEventSchema: z.ZodObject<{
154
+ type: z.ZodLiteral<"member.joined">;
155
+ channel: z.ZodString;
156
+ agent_name: z.ZodString;
157
+ }, z.core.$strip>;
158
+ export type MemberJoinedEvent = z.infer<typeof MemberJoinedEventSchema>;
159
+ export declare const MemberLeftEventSchema: z.ZodObject<{
160
+ type: z.ZodLiteral<"member.left">;
161
+ channel: z.ZodString;
162
+ agent_name: z.ZodString;
163
+ }, z.core.$strip>;
164
+ export type MemberLeftEvent = z.infer<typeof MemberLeftEventSchema>;
165
+ export declare const MessageReadEventSchema: z.ZodObject<{
166
+ type: z.ZodLiteral<"message.read">;
167
+ message_id: z.ZodString;
168
+ agent_name: z.ZodString;
169
+ read_at: z.ZodString;
170
+ }, z.core.$strip>;
171
+ export type MessageReadEvent = z.infer<typeof MessageReadEventSchema>;
172
+ export declare const FileUploadedEventSchema: z.ZodObject<{
173
+ type: z.ZodLiteral<"file.uploaded">;
174
+ file: z.ZodObject<{
175
+ file_id: z.ZodString;
176
+ filename: z.ZodString;
177
+ uploaded_by: z.ZodString;
178
+ }, z.core.$strip>;
179
+ }, z.core.$strip>;
180
+ export type FileUploadedEvent = z.infer<typeof FileUploadedEventSchema>;
181
+ export declare const PongEventSchema: z.ZodObject<{
182
+ type: z.ZodLiteral<"pong">;
183
+ }, z.core.$strip>;
184
+ export type PongEvent = z.infer<typeof PongEventSchema>;
185
+ export declare const WebhookReceivedEventSchema: z.ZodObject<{
186
+ type: z.ZodLiteral<"webhook.received">;
187
+ webhook_id: z.ZodString;
188
+ channel: z.ZodString;
189
+ message: z.ZodObject<{
190
+ id: z.ZodString;
191
+ text: z.ZodString;
192
+ source: z.ZodNullable<z.ZodString>;
193
+ }, z.core.$strip>;
194
+ }, z.core.$strip>;
195
+ export type WebhookReceivedEvent = z.infer<typeof WebhookReceivedEventSchema>;
196
+ export declare const CommandInvokedEventSchema: z.ZodObject<{
197
+ type: z.ZodLiteral<"command.invoked">;
198
+ command: z.ZodString;
199
+ channel: z.ZodString;
200
+ invoked_by: z.ZodString;
201
+ args: z.ZodNullable<z.ZodString>;
202
+ parameters: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
203
+ }, z.core.$strip>;
204
+ export type CommandInvokedEvent = z.infer<typeof CommandInvokedEventSchema>;
205
+ export declare const WsOpenEventSchema: z.ZodObject<{
206
+ type: z.ZodLiteral<"open">;
207
+ }, z.core.$strip>;
208
+ export type WsOpenEvent = z.infer<typeof WsOpenEventSchema>;
209
+ export declare const WsErrorEventSchema: z.ZodObject<{
210
+ type: z.ZodLiteral<"error">;
211
+ }, z.core.$strip>;
212
+ export type WsErrorEvent = z.infer<typeof WsErrorEventSchema>;
213
+ export declare const WsReconnectingEventSchema: z.ZodObject<{
214
+ type: z.ZodLiteral<"reconnecting">;
215
+ attempt: z.ZodNumber;
216
+ }, z.core.$strip>;
217
+ export type WsReconnectingEvent = z.infer<typeof WsReconnectingEventSchema>;
218
+ export declare const WsCloseEventSchema: z.ZodObject<{
219
+ type: z.ZodLiteral<"close">;
220
+ }, z.core.$strip>;
221
+ export type WsCloseEvent = z.infer<typeof WsCloseEventSchema>;
222
+ export declare const ServerEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
223
+ type: z.ZodLiteral<"message.created">;
224
+ channel: z.ZodString;
225
+ message: z.ZodObject<{
226
+ id: z.ZodString;
227
+ agent_name: z.ZodString;
228
+ text: z.ZodString;
229
+ attachments: z.ZodArray<z.ZodObject<{
230
+ file_id: z.ZodString;
231
+ filename: z.ZodString;
232
+ url: z.ZodString;
233
+ size: z.ZodNumber;
234
+ }, z.core.$strip>>;
235
+ }, z.core.$strip>;
236
+ }, z.core.$strip>, z.ZodObject<{
237
+ type: z.ZodLiteral<"message.updated">;
238
+ channel: z.ZodString;
239
+ message: z.ZodObject<{
240
+ id: z.ZodString;
241
+ agent_name: z.ZodString;
242
+ text: z.ZodString;
243
+ }, z.core.$strip>;
244
+ }, z.core.$strip>, z.ZodObject<{
245
+ type: z.ZodLiteral<"thread.reply">;
246
+ parent_id: z.ZodString;
247
+ message: z.ZodObject<{
248
+ id: z.ZodString;
249
+ agent_name: z.ZodString;
250
+ text: z.ZodString;
251
+ }, z.core.$strip>;
252
+ }, z.core.$strip>, z.ZodObject<{
253
+ type: z.ZodLiteral<"reaction.added">;
254
+ message_id: z.ZodString;
255
+ emoji: z.ZodString;
256
+ agent_name: z.ZodString;
257
+ }, z.core.$strip>, z.ZodObject<{
258
+ type: z.ZodLiteral<"reaction.removed">;
259
+ message_id: z.ZodString;
260
+ emoji: z.ZodString;
261
+ agent_name: z.ZodString;
262
+ }, z.core.$strip>, z.ZodObject<{
263
+ type: z.ZodLiteral<"dm.received">;
264
+ conversation_id: z.ZodString;
265
+ message: z.ZodObject<{
266
+ id: z.ZodString;
267
+ agent_name: z.ZodString;
268
+ text: z.ZodString;
269
+ }, z.core.$strip>;
270
+ }, z.core.$strip>, z.ZodObject<{
271
+ type: z.ZodLiteral<"group_dm.received">;
272
+ conversation_id: z.ZodString;
273
+ message: z.ZodObject<{
274
+ id: z.ZodString;
275
+ agent_name: z.ZodString;
276
+ text: z.ZodString;
277
+ }, z.core.$strip>;
278
+ }, z.core.$strip>, z.ZodObject<{
279
+ type: z.ZodLiteral<"agent.online">;
280
+ agent: z.ZodObject<{
281
+ name: z.ZodString;
282
+ }, z.core.$strip>;
283
+ }, z.core.$strip>, z.ZodObject<{
284
+ type: z.ZodLiteral<"agent.offline">;
285
+ agent: z.ZodObject<{
286
+ name: z.ZodString;
287
+ }, z.core.$strip>;
288
+ }, z.core.$strip>, z.ZodObject<{
289
+ type: z.ZodLiteral<"agent.spawn_requested">;
290
+ agent: z.ZodObject<{
291
+ name: z.ZodString;
292
+ cli: z.ZodString;
293
+ task: z.ZodString;
294
+ channel: z.ZodNullable<z.ZodString>;
295
+ already_existed: z.ZodBoolean;
296
+ }, z.core.$strip>;
297
+ }, z.core.$strip>, z.ZodObject<{
298
+ type: z.ZodLiteral<"agent.release_requested">;
299
+ agent: z.ZodObject<{
300
+ name: z.ZodString;
301
+ }, z.core.$strip>;
302
+ reason: z.ZodNullable<z.ZodString>;
303
+ deleted: z.ZodBoolean;
304
+ }, z.core.$strip>, z.ZodObject<{
305
+ type: z.ZodLiteral<"channel.created">;
306
+ channel: z.ZodObject<{
307
+ name: z.ZodString;
308
+ topic: z.ZodNullable<z.ZodString>;
309
+ }, z.core.$strip>;
310
+ }, z.core.$strip>, z.ZodObject<{
311
+ type: z.ZodLiteral<"channel.updated">;
312
+ channel: z.ZodObject<{
313
+ name: z.ZodString;
314
+ topic: z.ZodNullable<z.ZodString>;
315
+ }, z.core.$strip>;
316
+ }, z.core.$strip>, z.ZodObject<{
317
+ type: z.ZodLiteral<"channel.archived">;
318
+ channel: z.ZodObject<{
319
+ name: z.ZodString;
320
+ }, z.core.$strip>;
321
+ }, z.core.$strip>, z.ZodObject<{
322
+ type: z.ZodLiteral<"member.joined">;
323
+ channel: z.ZodString;
324
+ agent_name: z.ZodString;
325
+ }, z.core.$strip>, z.ZodObject<{
326
+ type: z.ZodLiteral<"member.left">;
327
+ channel: z.ZodString;
328
+ agent_name: z.ZodString;
329
+ }, z.core.$strip>, z.ZodObject<{
330
+ type: z.ZodLiteral<"message.read">;
331
+ message_id: z.ZodString;
332
+ agent_name: z.ZodString;
333
+ read_at: z.ZodString;
334
+ }, z.core.$strip>, z.ZodObject<{
335
+ type: z.ZodLiteral<"file.uploaded">;
336
+ file: z.ZodObject<{
337
+ file_id: z.ZodString;
338
+ filename: z.ZodString;
339
+ uploaded_by: z.ZodString;
340
+ }, z.core.$strip>;
341
+ }, z.core.$strip>, z.ZodObject<{
342
+ type: z.ZodLiteral<"webhook.received">;
343
+ webhook_id: z.ZodString;
344
+ channel: z.ZodString;
345
+ message: z.ZodObject<{
346
+ id: z.ZodString;
347
+ text: z.ZodString;
348
+ source: z.ZodNullable<z.ZodString>;
349
+ }, z.core.$strip>;
350
+ }, z.core.$strip>, z.ZodObject<{
351
+ type: z.ZodLiteral<"command.invoked">;
352
+ command: z.ZodString;
353
+ channel: z.ZodString;
354
+ invoked_by: z.ZodString;
355
+ args: z.ZodNullable<z.ZodString>;
356
+ parameters: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
357
+ }, z.core.$strip>, z.ZodObject<{
358
+ type: z.ZodLiteral<"pong">;
359
+ }, z.core.$strip>], "type">;
360
+ export type ServerEvent = z.infer<typeof ServerEventSchema>;
154
361
  export type ServerEventType = ServerEvent['type'];
155
362
  export type ClientEventType = ClientEvent['type'];
363
+ export declare const WsClientEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
364
+ type: z.ZodLiteral<"message.created">;
365
+ channel: z.ZodString;
366
+ message: z.ZodObject<{
367
+ id: z.ZodString;
368
+ agent_name: z.ZodString;
369
+ text: z.ZodString;
370
+ attachments: z.ZodArray<z.ZodObject<{
371
+ file_id: z.ZodString;
372
+ filename: z.ZodString;
373
+ url: z.ZodString;
374
+ size: z.ZodNumber;
375
+ }, z.core.$strip>>;
376
+ }, z.core.$strip>;
377
+ }, z.core.$strip>, z.ZodObject<{
378
+ type: z.ZodLiteral<"message.updated">;
379
+ channel: z.ZodString;
380
+ message: z.ZodObject<{
381
+ id: z.ZodString;
382
+ agent_name: z.ZodString;
383
+ text: z.ZodString;
384
+ }, z.core.$strip>;
385
+ }, z.core.$strip>, z.ZodObject<{
386
+ type: z.ZodLiteral<"thread.reply">;
387
+ parent_id: z.ZodString;
388
+ message: z.ZodObject<{
389
+ id: z.ZodString;
390
+ agent_name: z.ZodString;
391
+ text: z.ZodString;
392
+ }, z.core.$strip>;
393
+ }, z.core.$strip>, z.ZodObject<{
394
+ type: z.ZodLiteral<"reaction.added">;
395
+ message_id: z.ZodString;
396
+ emoji: z.ZodString;
397
+ agent_name: z.ZodString;
398
+ }, z.core.$strip>, z.ZodObject<{
399
+ type: z.ZodLiteral<"reaction.removed">;
400
+ message_id: z.ZodString;
401
+ emoji: z.ZodString;
402
+ agent_name: z.ZodString;
403
+ }, z.core.$strip>, z.ZodObject<{
404
+ type: z.ZodLiteral<"dm.received">;
405
+ conversation_id: z.ZodString;
406
+ message: z.ZodObject<{
407
+ id: z.ZodString;
408
+ agent_name: z.ZodString;
409
+ text: z.ZodString;
410
+ }, z.core.$strip>;
411
+ }, z.core.$strip>, z.ZodObject<{
412
+ type: z.ZodLiteral<"group_dm.received">;
413
+ conversation_id: z.ZodString;
414
+ message: z.ZodObject<{
415
+ id: z.ZodString;
416
+ agent_name: z.ZodString;
417
+ text: z.ZodString;
418
+ }, z.core.$strip>;
419
+ }, z.core.$strip>, z.ZodObject<{
420
+ type: z.ZodLiteral<"agent.online">;
421
+ agent: z.ZodObject<{
422
+ name: z.ZodString;
423
+ }, z.core.$strip>;
424
+ }, z.core.$strip>, z.ZodObject<{
425
+ type: z.ZodLiteral<"agent.offline">;
426
+ agent: z.ZodObject<{
427
+ name: z.ZodString;
428
+ }, z.core.$strip>;
429
+ }, z.core.$strip>, z.ZodObject<{
430
+ type: z.ZodLiteral<"agent.spawn_requested">;
431
+ agent: z.ZodObject<{
432
+ name: z.ZodString;
433
+ cli: z.ZodString;
434
+ task: z.ZodString;
435
+ channel: z.ZodNullable<z.ZodString>;
436
+ already_existed: z.ZodBoolean;
437
+ }, z.core.$strip>;
438
+ }, z.core.$strip>, z.ZodObject<{
439
+ type: z.ZodLiteral<"agent.release_requested">;
440
+ agent: z.ZodObject<{
441
+ name: z.ZodString;
442
+ }, z.core.$strip>;
443
+ reason: z.ZodNullable<z.ZodString>;
444
+ deleted: z.ZodBoolean;
445
+ }, z.core.$strip>, z.ZodObject<{
446
+ type: z.ZodLiteral<"channel.created">;
447
+ channel: z.ZodObject<{
448
+ name: z.ZodString;
449
+ topic: z.ZodNullable<z.ZodString>;
450
+ }, z.core.$strip>;
451
+ }, z.core.$strip>, z.ZodObject<{
452
+ type: z.ZodLiteral<"channel.updated">;
453
+ channel: z.ZodObject<{
454
+ name: z.ZodString;
455
+ topic: z.ZodNullable<z.ZodString>;
456
+ }, z.core.$strip>;
457
+ }, z.core.$strip>, z.ZodObject<{
458
+ type: z.ZodLiteral<"channel.archived">;
459
+ channel: z.ZodObject<{
460
+ name: z.ZodString;
461
+ }, z.core.$strip>;
462
+ }, z.core.$strip>, z.ZodObject<{
463
+ type: z.ZodLiteral<"member.joined">;
464
+ channel: z.ZodString;
465
+ agent_name: z.ZodString;
466
+ }, z.core.$strip>, z.ZodObject<{
467
+ type: z.ZodLiteral<"member.left">;
468
+ channel: z.ZodString;
469
+ agent_name: z.ZodString;
470
+ }, z.core.$strip>, z.ZodObject<{
471
+ type: z.ZodLiteral<"message.read">;
472
+ message_id: z.ZodString;
473
+ agent_name: z.ZodString;
474
+ read_at: z.ZodString;
475
+ }, z.core.$strip>, z.ZodObject<{
476
+ type: z.ZodLiteral<"file.uploaded">;
477
+ file: z.ZodObject<{
478
+ file_id: z.ZodString;
479
+ filename: z.ZodString;
480
+ uploaded_by: z.ZodString;
481
+ }, z.core.$strip>;
482
+ }, z.core.$strip>, z.ZodObject<{
483
+ type: z.ZodLiteral<"webhook.received">;
484
+ webhook_id: z.ZodString;
485
+ channel: z.ZodString;
486
+ message: z.ZodObject<{
487
+ id: z.ZodString;
488
+ text: z.ZodString;
489
+ source: z.ZodNullable<z.ZodString>;
490
+ }, z.core.$strip>;
491
+ }, z.core.$strip>, z.ZodObject<{
492
+ type: z.ZodLiteral<"command.invoked">;
493
+ command: z.ZodString;
494
+ channel: z.ZodString;
495
+ invoked_by: z.ZodString;
496
+ args: z.ZodNullable<z.ZodString>;
497
+ parameters: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
498
+ }, z.core.$strip>, z.ZodObject<{
499
+ type: z.ZodLiteral<"pong">;
500
+ }, z.core.$strip>, z.ZodObject<{
501
+ type: z.ZodLiteral<"open">;
502
+ }, z.core.$strip>, z.ZodObject<{
503
+ type: z.ZodLiteral<"error">;
504
+ }, z.core.$strip>, z.ZodObject<{
505
+ type: z.ZodLiteral<"reconnecting">;
506
+ attempt: z.ZodNumber;
507
+ }, z.core.$strip>, z.ZodObject<{
508
+ type: z.ZodLiteral<"close">;
509
+ }, z.core.$strip>], "type">;
510
+ export type WsClientEvent = z.infer<typeof WsClientEventSchema>;
511
+ export type WsClientEventType = WsClientEvent['type'];
156
512
  //# sourceMappingURL=events.d.ts.map