@helyx/bot 0.4.2 → 0.4.5

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 (38) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +13 -0
  3. package/dist/cloud-connector.d.ts +7 -0
  4. package/dist/cloud-connector.js +118 -1
  5. package/dist/cloud-control-dispatcher.js +84 -0
  6. package/dist/control-server.d.ts +187 -5
  7. package/dist/control-server.js +673 -6
  8. package/dist/developer-operations-module.js +8 -0
  9. package/dist/discord-owned-message-service.d.ts +39 -0
  10. package/dist/discord-owned-message-service.js +138 -0
  11. package/dist/events.d.ts +70 -1
  12. package/dist/events.js +557 -5
  13. package/dist/index.js +61 -13
  14. package/dist/interactions.d.ts +3 -2
  15. package/dist/interactions.js +66 -31
  16. package/dist/module-logging.d.ts +1 -0
  17. package/dist/module-logging.js +19 -1
  18. package/dist/modules.d.ts +9 -0
  19. package/dist/modules.js +45 -0
  20. package/dist/resource-authorization.d.ts +7 -0
  21. package/dist/resource-authorization.js +12 -0
  22. package/dist/scheduled-task-runner.d.ts +130 -0
  23. package/dist/scheduled-task-runner.js +417 -0
  24. package/dist/shard-cloud-proxy.d.ts +4 -0
  25. package/dist/shard-cloud-proxy.js +34 -0
  26. package/dist/shard-contracts.d.ts +574 -23
  27. package/dist/shard-contracts.js +346 -0
  28. package/dist/shard-coordinator.d.ts +5 -3
  29. package/dist/shard-coordinator.js +85 -2
  30. package/dist/shard-router.d.ts +10 -0
  31. package/dist/shard-router.js +58 -0
  32. package/dist/shard-supervisor.d.ts +2 -1
  33. package/dist/shard-supervisor.js +187 -5
  34. package/dist/shard-worker.d.ts +9 -3
  35. package/dist/shard-worker.js +97 -16
  36. package/dist/support-module.d.ts +9 -0
  37. package/dist/support-module.js +172 -0
  38. package/package.json +9 -9
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import type { ManagedResourceValue } from "@helyx/sdk";
2
3
  import type { BotControlHandler } from "./control-server.js";
3
4
  export declare const SHARD_CONTRACT_VERSION: 1;
4
5
  export declare const SHARD_CONTROL_MAX_BYTES: number;
@@ -8,8 +9,8 @@ export declare const SHARD_LEASE_HEARTBEAT_TIMEOUT_MS = 20000;
8
9
  export declare const shardIdentitySchema: z.ZodObject<{
9
10
  version: z.ZodLiteral<1>;
10
11
  mode: z.ZodEnum<{
11
- fixed: "fixed";
12
12
  auto: "auto";
13
+ fixed: "fixed";
13
14
  }>;
14
15
  scope: z.ZodEnum<{
15
16
  local: "local";
@@ -37,8 +38,8 @@ export type GatewayBotInformation = z.infer<typeof gatewayBotInformationSchema>;
37
38
  export declare const shardProcessHealthSchema: z.ZodObject<{
38
39
  shardId: z.ZodNumber;
39
40
  status: z.ZodEnum<{
40
- ready: "ready";
41
41
  starting: "starting";
42
+ ready: "ready";
42
43
  disconnected: "disconnected";
43
44
  reconnecting: "reconnecting";
44
45
  stopped: "stopped";
@@ -54,12 +55,36 @@ export declare const shardProcessHealthSchema: z.ZodObject<{
54
55
  observedAt: z.ZodISODateTime;
55
56
  }, z.core.$strict>;
56
57
  export type ShardProcessHealth = z.infer<typeof shardProcessHealthSchema>;
58
+ export declare const schedulerOperationalHealthSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
59
+ status: z.ZodLiteral<"available">;
60
+ oneShot: z.ZodObject<{
61
+ sampleLimit: z.ZodNumber;
62
+ sampled: z.ZodNumber;
63
+ ready: z.ZodNumber;
64
+ expiredLeases: z.ZodNumber;
65
+ retried: z.ZodNumber;
66
+ requiresReview: z.ZodNumber;
67
+ oldestReadyAt: z.ZodNullable<z.ZodISODateTime>;
68
+ }, z.core.$strict>;
69
+ coalesced: z.ZodObject<{
70
+ sampleLimit: z.ZodNumber;
71
+ sampled: z.ZodNumber;
72
+ ready: z.ZodNumber;
73
+ expiredLeases: z.ZodNumber;
74
+ retried: z.ZodNumber;
75
+ requiresReview: z.ZodNumber;
76
+ oldestReadyAt: z.ZodNullable<z.ZodISODateTime>;
77
+ }, z.core.$strict>;
78
+ }, z.core.$strict>, z.ZodObject<{
79
+ status: z.ZodLiteral<"unavailable">;
80
+ }, z.core.$strict>], "status">;
81
+ export type SchedulerOperationalHealth = z.infer<typeof schedulerOperationalHealthSchema>;
57
82
  export declare const shardHealthSnapshotSchema: z.ZodObject<{
58
83
  version: z.ZodLiteral<1>;
59
84
  mode: z.ZodEnum<{
60
- fixed: "fixed";
61
- auto: "auto";
62
85
  off: "off";
86
+ auto: "auto";
87
+ fixed: "fixed";
63
88
  }>;
64
89
  scope: z.ZodEnum<{
65
90
  local: "local";
@@ -90,6 +115,29 @@ export declare const shardHealthSnapshotSchema: z.ZodObject<{
90
115
  unavailable: "unavailable";
91
116
  }>;
92
117
  }, z.core.$strict>;
118
+ scheduler: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
119
+ status: z.ZodLiteral<"available">;
120
+ oneShot: z.ZodObject<{
121
+ sampleLimit: z.ZodNumber;
122
+ sampled: z.ZodNumber;
123
+ ready: z.ZodNumber;
124
+ expiredLeases: z.ZodNumber;
125
+ retried: z.ZodNumber;
126
+ requiresReview: z.ZodNumber;
127
+ oldestReadyAt: z.ZodNullable<z.ZodISODateTime>;
128
+ }, z.core.$strict>;
129
+ coalesced: z.ZodObject<{
130
+ sampleLimit: z.ZodNumber;
131
+ sampled: z.ZodNumber;
132
+ ready: z.ZodNumber;
133
+ expiredLeases: z.ZodNumber;
134
+ retried: z.ZodNumber;
135
+ requiresReview: z.ZodNumber;
136
+ oldestReadyAt: z.ZodNullable<z.ZodISODateTime>;
137
+ }, z.core.$strict>;
138
+ }, z.core.$strict>, z.ZodObject<{
139
+ status: z.ZodLiteral<"unavailable">;
140
+ }, z.core.$strict>], "status">>;
93
141
  sessionStarts: z.ZodOptional<z.ZodObject<{
94
142
  total: z.ZodNumber;
95
143
  remaining: z.ZodNumber;
@@ -100,8 +148,8 @@ export declare const shardHealthSnapshotSchema: z.ZodObject<{
100
148
  shards: z.ZodArray<z.ZodObject<{
101
149
  shardId: z.ZodNumber;
102
150
  status: z.ZodEnum<{
103
- ready: "ready";
104
151
  starting: "starting";
152
+ ready: "ready";
105
153
  disconnected: "disconnected";
106
154
  reconnecting: "reconnecting";
107
155
  stopped: "stopped";
@@ -146,10 +194,10 @@ export declare const shardControlOperationSchema: z.ZodDiscriminatedUnion<[z.Zod
146
194
  version: z.ZodNumber;
147
195
  module: z.ZodObject<{
148
196
  preset: z.ZodEnum<{
197
+ custom: "custom";
149
198
  everyone: "everyone";
150
199
  moderators: "moderators";
151
200
  administrators: "administrators";
152
- custom: "custom";
153
201
  }>;
154
202
  allowedRoleIds: z.ZodArray<z.ZodString>;
155
203
  deniedRoleIds: z.ZodArray<z.ZodString>;
@@ -160,10 +208,10 @@ export declare const shardControlOperationSchema: z.ZodDiscriminatedUnion<[z.Zod
160
208
  enabled: z.ZodBoolean;
161
209
  policy: z.ZodObject<{
162
210
  preset: z.ZodEnum<{
211
+ custom: "custom";
163
212
  everyone: "everyone";
164
213
  moderators: "moderators";
165
214
  administrators: "administrators";
166
- custom: "custom";
167
215
  }>;
168
216
  allowedRoleIds: z.ZodArray<z.ZodString>;
169
217
  deniedRoleIds: z.ZodArray<z.ZodString>;
@@ -186,6 +234,109 @@ export declare const shardControlOperationSchema: z.ZodDiscriminatedUnion<[z.Zod
186
234
  guildId: z.ZodString;
187
235
  moduleId: z.ZodString;
188
236
  actionId: z.ZodString;
237
+ }, z.core.$strict>, z.ZodObject<{
238
+ actorUserId: z.ZodString;
239
+ correlationId: z.ZodString;
240
+ kind: z.ZodLiteral<"guild.module.resource.list">;
241
+ guildId: z.ZodString;
242
+ moduleId: z.ZodString;
243
+ resourceType: z.ZodString;
244
+ cursor: z.ZodOptional<z.ZodString>;
245
+ limit: z.ZodNumber;
246
+ search: z.ZodOptional<z.ZodString>;
247
+ filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
248
+ }, z.core.$strict>, z.ZodObject<{
249
+ actorUserId: z.ZodString;
250
+ correlationId: z.ZodString;
251
+ kind: z.ZodLiteral<"guild.module.resource.read">;
252
+ guildId: z.ZodString;
253
+ moduleId: z.ZodString;
254
+ resourceType: z.ZodString;
255
+ resourceId: z.ZodString;
256
+ }, z.core.$strict>, z.ZodObject<{
257
+ actorUserId: z.ZodString;
258
+ correlationId: z.ZodString;
259
+ kind: z.ZodLiteral<"guild.module.resource.relation.list">;
260
+ guildId: z.ZodString;
261
+ moduleId: z.ZodString;
262
+ resourceType: z.ZodString;
263
+ resourceId: z.ZodString;
264
+ relationId: z.ZodString;
265
+ cursor: z.ZodOptional<z.ZodString>;
266
+ limit: z.ZodNumber;
267
+ }, z.core.$strict>, z.ZodObject<{
268
+ actorUserId: z.ZodString;
269
+ correlationId: z.ZodString;
270
+ kind: z.ZodLiteral<"guild.module.resource.preview">;
271
+ guildId: z.ZodString;
272
+ moduleId: z.ZodString;
273
+ resourceType: z.ZodString;
274
+ value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
275
+ }, z.core.$strict>, z.ZodObject<{
276
+ actorUserId: z.ZodString;
277
+ correlationId: z.ZodString;
278
+ kind: z.ZodLiteral<"guild.module.resource.create">;
279
+ guildId: z.ZodString;
280
+ moduleId: z.ZodString;
281
+ resourceType: z.ZodString;
282
+ intent: z.ZodEnum<{
283
+ draft: "draft";
284
+ publish: "publish";
285
+ }>;
286
+ value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
287
+ }, z.core.$strict>, z.ZodObject<{
288
+ actorUserId: z.ZodString;
289
+ correlationId: z.ZodString;
290
+ kind: z.ZodLiteral<"guild.module.resource.update">;
291
+ guildId: z.ZodString;
292
+ moduleId: z.ZodString;
293
+ resourceType: z.ZodString;
294
+ resourceId: z.ZodString;
295
+ expectedRevision: z.ZodNumber;
296
+ value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
297
+ }, z.core.$strict>, z.ZodObject<{
298
+ actorUserId: z.ZodString;
299
+ correlationId: z.ZodString;
300
+ kind: z.ZodLiteral<"guild.module.resource.delete">;
301
+ guildId: z.ZodString;
302
+ moduleId: z.ZodString;
303
+ resourceType: z.ZodString;
304
+ resourceId: z.ZodString;
305
+ expectedRevision: z.ZodNumber;
306
+ }, z.core.$strict>, z.ZodObject<{
307
+ actorUserId: z.ZodString;
308
+ correlationId: z.ZodString;
309
+ kind: z.ZodLiteral<"guild.module.resource.action.execute">;
310
+ guildId: z.ZodString;
311
+ moduleId: z.ZodString;
312
+ resourceType: z.ZodString;
313
+ resourceId: z.ZodString;
314
+ actionId: z.ZodString;
315
+ expectedRevision: z.ZodNumber;
316
+ value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
317
+ }, z.core.$strict>, z.ZodObject<{
318
+ kind: z.ZodLiteral<"support.notification.send">;
319
+ guildId: z.ZodString;
320
+ notificationId: z.ZodUUID;
321
+ reference: z.ZodString;
322
+ caseType: z.ZodEnum<{
323
+ bug: "bug";
324
+ general_support: "general_support";
325
+ security: "security";
326
+ }>;
327
+ categoryOrModule: z.ZodString;
328
+ reportedSeverity: z.ZodNullable<z.ZodEnum<{
329
+ low: "low";
330
+ medium: "medium";
331
+ high: "high";
332
+ critical: "critical";
333
+ }>>;
334
+ source: z.ZodEnum<{
335
+ dashboard_bug: "dashboard_bug";
336
+ dashboard_support: "dashboard_support";
337
+ dashboard_security: "dashboard_security";
338
+ discord_command: "discord_command";
339
+ }>;
189
340
  }, z.core.$strict>, z.ZodObject<{
190
341
  kind: z.ZodLiteral<"privacy.providers.list">;
191
342
  }, z.core.$strict>, z.ZodObject<{
@@ -241,10 +392,10 @@ export declare const shardControlRequestSchema: z.ZodObject<{
241
392
  version: z.ZodNumber;
242
393
  module: z.ZodObject<{
243
394
  preset: z.ZodEnum<{
395
+ custom: "custom";
244
396
  everyone: "everyone";
245
397
  moderators: "moderators";
246
398
  administrators: "administrators";
247
- custom: "custom";
248
399
  }>;
249
400
  allowedRoleIds: z.ZodArray<z.ZodString>;
250
401
  deniedRoleIds: z.ZodArray<z.ZodString>;
@@ -255,10 +406,10 @@ export declare const shardControlRequestSchema: z.ZodObject<{
255
406
  enabled: z.ZodBoolean;
256
407
  policy: z.ZodObject<{
257
408
  preset: z.ZodEnum<{
409
+ custom: "custom";
258
410
  everyone: "everyone";
259
411
  moderators: "moderators";
260
412
  administrators: "administrators";
261
- custom: "custom";
262
413
  }>;
263
414
  allowedRoleIds: z.ZodArray<z.ZodString>;
264
415
  deniedRoleIds: z.ZodArray<z.ZodString>;
@@ -281,6 +432,109 @@ export declare const shardControlRequestSchema: z.ZodObject<{
281
432
  guildId: z.ZodString;
282
433
  moduleId: z.ZodString;
283
434
  actionId: z.ZodString;
435
+ }, z.core.$strict>, z.ZodObject<{
436
+ actorUserId: z.ZodString;
437
+ correlationId: z.ZodString;
438
+ kind: z.ZodLiteral<"guild.module.resource.list">;
439
+ guildId: z.ZodString;
440
+ moduleId: z.ZodString;
441
+ resourceType: z.ZodString;
442
+ cursor: z.ZodOptional<z.ZodString>;
443
+ limit: z.ZodNumber;
444
+ search: z.ZodOptional<z.ZodString>;
445
+ filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
446
+ }, z.core.$strict>, z.ZodObject<{
447
+ actorUserId: z.ZodString;
448
+ correlationId: z.ZodString;
449
+ kind: z.ZodLiteral<"guild.module.resource.read">;
450
+ guildId: z.ZodString;
451
+ moduleId: z.ZodString;
452
+ resourceType: z.ZodString;
453
+ resourceId: z.ZodString;
454
+ }, z.core.$strict>, z.ZodObject<{
455
+ actorUserId: z.ZodString;
456
+ correlationId: z.ZodString;
457
+ kind: z.ZodLiteral<"guild.module.resource.relation.list">;
458
+ guildId: z.ZodString;
459
+ moduleId: z.ZodString;
460
+ resourceType: z.ZodString;
461
+ resourceId: z.ZodString;
462
+ relationId: z.ZodString;
463
+ cursor: z.ZodOptional<z.ZodString>;
464
+ limit: z.ZodNumber;
465
+ }, z.core.$strict>, z.ZodObject<{
466
+ actorUserId: z.ZodString;
467
+ correlationId: z.ZodString;
468
+ kind: z.ZodLiteral<"guild.module.resource.preview">;
469
+ guildId: z.ZodString;
470
+ moduleId: z.ZodString;
471
+ resourceType: z.ZodString;
472
+ value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
473
+ }, z.core.$strict>, z.ZodObject<{
474
+ actorUserId: z.ZodString;
475
+ correlationId: z.ZodString;
476
+ kind: z.ZodLiteral<"guild.module.resource.create">;
477
+ guildId: z.ZodString;
478
+ moduleId: z.ZodString;
479
+ resourceType: z.ZodString;
480
+ intent: z.ZodEnum<{
481
+ draft: "draft";
482
+ publish: "publish";
483
+ }>;
484
+ value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
485
+ }, z.core.$strict>, z.ZodObject<{
486
+ actorUserId: z.ZodString;
487
+ correlationId: z.ZodString;
488
+ kind: z.ZodLiteral<"guild.module.resource.update">;
489
+ guildId: z.ZodString;
490
+ moduleId: z.ZodString;
491
+ resourceType: z.ZodString;
492
+ resourceId: z.ZodString;
493
+ expectedRevision: z.ZodNumber;
494
+ value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
495
+ }, z.core.$strict>, z.ZodObject<{
496
+ actorUserId: z.ZodString;
497
+ correlationId: z.ZodString;
498
+ kind: z.ZodLiteral<"guild.module.resource.delete">;
499
+ guildId: z.ZodString;
500
+ moduleId: z.ZodString;
501
+ resourceType: z.ZodString;
502
+ resourceId: z.ZodString;
503
+ expectedRevision: z.ZodNumber;
504
+ }, z.core.$strict>, z.ZodObject<{
505
+ actorUserId: z.ZodString;
506
+ correlationId: z.ZodString;
507
+ kind: z.ZodLiteral<"guild.module.resource.action.execute">;
508
+ guildId: z.ZodString;
509
+ moduleId: z.ZodString;
510
+ resourceType: z.ZodString;
511
+ resourceId: z.ZodString;
512
+ actionId: z.ZodString;
513
+ expectedRevision: z.ZodNumber;
514
+ value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
515
+ }, z.core.$strict>, z.ZodObject<{
516
+ kind: z.ZodLiteral<"support.notification.send">;
517
+ guildId: z.ZodString;
518
+ notificationId: z.ZodUUID;
519
+ reference: z.ZodString;
520
+ caseType: z.ZodEnum<{
521
+ bug: "bug";
522
+ general_support: "general_support";
523
+ security: "security";
524
+ }>;
525
+ categoryOrModule: z.ZodString;
526
+ reportedSeverity: z.ZodNullable<z.ZodEnum<{
527
+ low: "low";
528
+ medium: "medium";
529
+ high: "high";
530
+ critical: "critical";
531
+ }>>;
532
+ source: z.ZodEnum<{
533
+ dashboard_bug: "dashboard_bug";
534
+ dashboard_support: "dashboard_support";
535
+ dashboard_security: "dashboard_security";
536
+ discord_command: "discord_command";
537
+ }>;
284
538
  }, z.core.$strict>, z.ZodObject<{
285
539
  kind: z.ZodLiteral<"privacy.providers.list">;
286
540
  }, z.core.$strict>, z.ZodObject<{
@@ -331,13 +585,23 @@ declare const shardCloudOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
331
585
  token: z.ZodString;
332
586
  source: z.ZodEnum<{
333
587
  file: "file";
334
- discord: "discord";
335
588
  startup: "startup";
589
+ discord: "discord";
336
590
  }>;
337
591
  }, z.core.$strict>, z.ZodObject<{
338
592
  kind: z.ZodLiteral<"cloud.disconnect">;
339
593
  }, z.core.$strict>, z.ZodObject<{
340
594
  kind: z.ZodLiteral<"cloud.rotate">;
595
+ }, z.core.$strict>, z.ZodObject<{
596
+ kind: z.ZodLiteral<"support.bug.create">;
597
+ reporterDiscordUserId: z.ZodString;
598
+ guildId: z.ZodString;
599
+ moduleOrArea: z.ZodString;
600
+ summary: z.ZodString;
601
+ whatHappened: z.ZodString;
602
+ extraDetail: z.ZodOptional<z.ZodString>;
603
+ interactionId: z.ZodString;
604
+ correlationId: z.ZodUUID;
341
605
  }, z.core.$strict>], "kind">;
342
606
  export type ShardCloudOperation = z.infer<typeof shardCloudOperationSchema>;
343
607
  export declare const shardCloudRequestSchema: z.ZodObject<{
@@ -359,13 +623,23 @@ export declare const shardCloudRequestSchema: z.ZodObject<{
359
623
  token: z.ZodString;
360
624
  source: z.ZodEnum<{
361
625
  file: "file";
362
- discord: "discord";
363
626
  startup: "startup";
627
+ discord: "discord";
364
628
  }>;
365
629
  }, z.core.$strict>, z.ZodObject<{
366
630
  kind: z.ZodLiteral<"cloud.disconnect">;
367
631
  }, z.core.$strict>, z.ZodObject<{
368
632
  kind: z.ZodLiteral<"cloud.rotate">;
633
+ }, z.core.$strict>, z.ZodObject<{
634
+ kind: z.ZodLiteral<"support.bug.create">;
635
+ reporterDiscordUserId: z.ZodString;
636
+ guildId: z.ZodString;
637
+ moduleOrArea: z.ZodString;
638
+ summary: z.ZodString;
639
+ whatHappened: z.ZodString;
640
+ extraDetail: z.ZodOptional<z.ZodString>;
641
+ interactionId: z.ZodString;
642
+ correlationId: z.ZodUUID;
369
643
  }, z.core.$strict>], "kind">;
370
644
  }, z.core.$strict>;
371
645
  export declare const shardCloudResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -396,9 +670,9 @@ export declare const shardOperationsHealthResponseSchema: z.ZodObject<{
396
670
  health: z.ZodObject<{
397
671
  version: z.ZodLiteral<1>;
398
672
  mode: z.ZodEnum<{
399
- fixed: "fixed";
400
- auto: "auto";
401
673
  off: "off";
674
+ auto: "auto";
675
+ fixed: "fixed";
402
676
  }>;
403
677
  scope: z.ZodEnum<{
404
678
  local: "local";
@@ -429,6 +703,29 @@ export declare const shardOperationsHealthResponseSchema: z.ZodObject<{
429
703
  unavailable: "unavailable";
430
704
  }>;
431
705
  }, z.core.$strict>;
706
+ scheduler: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
707
+ status: z.ZodLiteral<"available">;
708
+ oneShot: z.ZodObject<{
709
+ sampleLimit: z.ZodNumber;
710
+ sampled: z.ZodNumber;
711
+ ready: z.ZodNumber;
712
+ expiredLeases: z.ZodNumber;
713
+ retried: z.ZodNumber;
714
+ requiresReview: z.ZodNumber;
715
+ oldestReadyAt: z.ZodNullable<z.ZodISODateTime>;
716
+ }, z.core.$strict>;
717
+ coalesced: z.ZodObject<{
718
+ sampleLimit: z.ZodNumber;
719
+ sampled: z.ZodNumber;
720
+ ready: z.ZodNumber;
721
+ expiredLeases: z.ZodNumber;
722
+ retried: z.ZodNumber;
723
+ requiresReview: z.ZodNumber;
724
+ oldestReadyAt: z.ZodNullable<z.ZodISODateTime>;
725
+ }, z.core.$strict>;
726
+ }, z.core.$strict>, z.ZodObject<{
727
+ status: z.ZodLiteral<"unavailable">;
728
+ }, z.core.$strict>], "status">>;
432
729
  sessionStarts: z.ZodOptional<z.ZodObject<{
433
730
  total: z.ZodNumber;
434
731
  remaining: z.ZodNumber;
@@ -439,8 +736,8 @@ export declare const shardOperationsHealthResponseSchema: z.ZodObject<{
439
736
  shards: z.ZodArray<z.ZodObject<{
440
737
  shardId: z.ZodNumber;
441
738
  status: z.ZodEnum<{
442
- ready: "ready";
443
739
  starting: "starting";
740
+ ready: "ready";
444
741
  disconnected: "disconnected";
445
742
  reconnecting: "reconnecting";
446
743
  stopped: "stopped";
@@ -457,6 +754,67 @@ export declare const shardOperationsHealthResponseSchema: z.ZodObject<{
457
754
  }, z.core.$strict>>;
458
755
  }, z.core.$strict>;
459
756
  }, z.core.$strict>;
757
+ export declare const shardScheduledTaskRequestSchema: z.ZodObject<{
758
+ version: z.ZodLiteral<1>;
759
+ type: z.ZodLiteral<"helyx.scheduled.request">;
760
+ requestId: z.ZodUUID;
761
+ deadlineAt: z.ZodISODateTime;
762
+ identity: z.ZodObject<{
763
+ version: z.ZodLiteral<1>;
764
+ mode: z.ZodEnum<{
765
+ auto: "auto";
766
+ fixed: "fixed";
767
+ }>;
768
+ scope: z.ZodEnum<{
769
+ local: "local";
770
+ coordinated: "coordinated";
771
+ }>;
772
+ generation: z.ZodString;
773
+ deploymentOrder: z.ZodOptional<z.ZodNumber>;
774
+ supervisorId: z.ZodUUID;
775
+ shardId: z.ZodNumber;
776
+ shardCount: z.ZodNumber;
777
+ fencingToken: z.ZodNumber;
778
+ }, z.core.$strict>;
779
+ task: z.ZodDiscriminatedUnion<[z.ZodObject<{
780
+ delivery: z.ZodLiteral<"one-shot">;
781
+ taskId: z.ZodUUID;
782
+ moduleId: z.ZodString;
783
+ taskKind: z.ZodString;
784
+ taskVersion: z.ZodNumber;
785
+ guildId: z.ZodString;
786
+ payload: z.ZodRecord<z.ZodString, z.ZodString>;
787
+ }, z.core.$strict>, z.ZodObject<{
788
+ delivery: z.ZodLiteral<"coalesced">;
789
+ taskId: z.ZodUUID;
790
+ moduleId: z.ZodString;
791
+ taskKind: z.ZodString;
792
+ taskVersion: z.ZodNumber;
793
+ guildId: z.ZodString;
794
+ payload: z.ZodRecord<z.ZodString, z.ZodString>;
795
+ claimedGeneration: z.ZodNumber;
796
+ }, z.core.$strict>], "delivery">;
797
+ }, z.core.$strict>;
798
+ export declare const shardScheduledTaskResponseSchema: z.ZodObject<{
799
+ version: z.ZodLiteral<1>;
800
+ type: z.ZodLiteral<"helyx.scheduled.response">;
801
+ requestId: z.ZodUUID;
802
+ result: z.ZodDiscriminatedUnion<[z.ZodObject<{
803
+ outcome: z.ZodLiteral<"completed">;
804
+ }, z.core.$strict>, z.ZodObject<{
805
+ outcome: z.ZodEnum<{
806
+ deferred: "deferred";
807
+ retry: "retry";
808
+ }>;
809
+ delayMs: z.ZodNumber;
810
+ safeCode: z.ZodString;
811
+ }, z.core.$strict>, z.ZodObject<{
812
+ outcome: z.ZodLiteral<"requires_review">;
813
+ safeCode: z.ZodString;
814
+ }, z.core.$strict>], "outcome">;
815
+ }, z.core.$strict>;
816
+ export type ShardScheduledTaskRequest = z.infer<typeof shardScheduledTaskRequestSchema>;
817
+ export type ShardScheduledTaskResponse = z.infer<typeof shardScheduledTaskResponseSchema>;
460
818
  export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
461
819
  version: z.ZodLiteral<1>;
462
820
  type: z.ZodLiteral<"helyx.control.request">;
@@ -492,10 +850,10 @@ export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
492
850
  version: z.ZodNumber;
493
851
  module: z.ZodObject<{
494
852
  preset: z.ZodEnum<{
853
+ custom: "custom";
495
854
  everyone: "everyone";
496
855
  moderators: "moderators";
497
856
  administrators: "administrators";
498
- custom: "custom";
499
857
  }>;
500
858
  allowedRoleIds: z.ZodArray<z.ZodString>;
501
859
  deniedRoleIds: z.ZodArray<z.ZodString>;
@@ -506,10 +864,10 @@ export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
506
864
  enabled: z.ZodBoolean;
507
865
  policy: z.ZodObject<{
508
866
  preset: z.ZodEnum<{
867
+ custom: "custom";
509
868
  everyone: "everyone";
510
869
  moderators: "moderators";
511
870
  administrators: "administrators";
512
- custom: "custom";
513
871
  }>;
514
872
  allowedRoleIds: z.ZodArray<z.ZodString>;
515
873
  deniedRoleIds: z.ZodArray<z.ZodString>;
@@ -532,6 +890,109 @@ export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
532
890
  guildId: z.ZodString;
533
891
  moduleId: z.ZodString;
534
892
  actionId: z.ZodString;
893
+ }, z.core.$strict>, z.ZodObject<{
894
+ actorUserId: z.ZodString;
895
+ correlationId: z.ZodString;
896
+ kind: z.ZodLiteral<"guild.module.resource.list">;
897
+ guildId: z.ZodString;
898
+ moduleId: z.ZodString;
899
+ resourceType: z.ZodString;
900
+ cursor: z.ZodOptional<z.ZodString>;
901
+ limit: z.ZodNumber;
902
+ search: z.ZodOptional<z.ZodString>;
903
+ filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
904
+ }, z.core.$strict>, z.ZodObject<{
905
+ actorUserId: z.ZodString;
906
+ correlationId: z.ZodString;
907
+ kind: z.ZodLiteral<"guild.module.resource.read">;
908
+ guildId: z.ZodString;
909
+ moduleId: z.ZodString;
910
+ resourceType: z.ZodString;
911
+ resourceId: z.ZodString;
912
+ }, z.core.$strict>, z.ZodObject<{
913
+ actorUserId: z.ZodString;
914
+ correlationId: z.ZodString;
915
+ kind: z.ZodLiteral<"guild.module.resource.relation.list">;
916
+ guildId: z.ZodString;
917
+ moduleId: z.ZodString;
918
+ resourceType: z.ZodString;
919
+ resourceId: z.ZodString;
920
+ relationId: z.ZodString;
921
+ cursor: z.ZodOptional<z.ZodString>;
922
+ limit: z.ZodNumber;
923
+ }, z.core.$strict>, z.ZodObject<{
924
+ actorUserId: z.ZodString;
925
+ correlationId: z.ZodString;
926
+ kind: z.ZodLiteral<"guild.module.resource.preview">;
927
+ guildId: z.ZodString;
928
+ moduleId: z.ZodString;
929
+ resourceType: z.ZodString;
930
+ value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
931
+ }, z.core.$strict>, z.ZodObject<{
932
+ actorUserId: z.ZodString;
933
+ correlationId: z.ZodString;
934
+ kind: z.ZodLiteral<"guild.module.resource.create">;
935
+ guildId: z.ZodString;
936
+ moduleId: z.ZodString;
937
+ resourceType: z.ZodString;
938
+ intent: z.ZodEnum<{
939
+ draft: "draft";
940
+ publish: "publish";
941
+ }>;
942
+ value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
943
+ }, z.core.$strict>, z.ZodObject<{
944
+ actorUserId: z.ZodString;
945
+ correlationId: z.ZodString;
946
+ kind: z.ZodLiteral<"guild.module.resource.update">;
947
+ guildId: z.ZodString;
948
+ moduleId: z.ZodString;
949
+ resourceType: z.ZodString;
950
+ resourceId: z.ZodString;
951
+ expectedRevision: z.ZodNumber;
952
+ value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
953
+ }, z.core.$strict>, z.ZodObject<{
954
+ actorUserId: z.ZodString;
955
+ correlationId: z.ZodString;
956
+ kind: z.ZodLiteral<"guild.module.resource.delete">;
957
+ guildId: z.ZodString;
958
+ moduleId: z.ZodString;
959
+ resourceType: z.ZodString;
960
+ resourceId: z.ZodString;
961
+ expectedRevision: z.ZodNumber;
962
+ }, z.core.$strict>, z.ZodObject<{
963
+ actorUserId: z.ZodString;
964
+ correlationId: z.ZodString;
965
+ kind: z.ZodLiteral<"guild.module.resource.action.execute">;
966
+ guildId: z.ZodString;
967
+ moduleId: z.ZodString;
968
+ resourceType: z.ZodString;
969
+ resourceId: z.ZodString;
970
+ actionId: z.ZodString;
971
+ expectedRevision: z.ZodNumber;
972
+ value: z.ZodRecord<z.ZodString, z.ZodCustom<ManagedResourceValue, ManagedResourceValue>>;
973
+ }, z.core.$strict>, z.ZodObject<{
974
+ kind: z.ZodLiteral<"support.notification.send">;
975
+ guildId: z.ZodString;
976
+ notificationId: z.ZodUUID;
977
+ reference: z.ZodString;
978
+ caseType: z.ZodEnum<{
979
+ bug: "bug";
980
+ general_support: "general_support";
981
+ security: "security";
982
+ }>;
983
+ categoryOrModule: z.ZodString;
984
+ reportedSeverity: z.ZodNullable<z.ZodEnum<{
985
+ low: "low";
986
+ medium: "medium";
987
+ high: "high";
988
+ critical: "critical";
989
+ }>>;
990
+ source: z.ZodEnum<{
991
+ dashboard_bug: "dashboard_bug";
992
+ dashboard_support: "dashboard_support";
993
+ dashboard_security: "dashboard_security";
994
+ discord_command: "discord_command";
995
+ }>;
535
996
  }, z.core.$strict>, z.ZodObject<{
536
997
  kind: z.ZodLiteral<"privacy.providers.list">;
537
998
  }, z.core.$strict>, z.ZodObject<{
@@ -570,9 +1031,9 @@ export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
570
1031
  health: z.ZodObject<{
571
1032
  version: z.ZodLiteral<1>;
572
1033
  mode: z.ZodEnum<{
573
- fixed: "fixed";
574
- auto: "auto";
575
1034
  off: "off";
1035
+ auto: "auto";
1036
+ fixed: "fixed";
576
1037
  }>;
577
1038
  scope: z.ZodEnum<{
578
1039
  local: "local";
@@ -603,6 +1064,29 @@ export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
603
1064
  unavailable: "unavailable";
604
1065
  }>;
605
1066
  }, z.core.$strict>;
1067
+ scheduler: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1068
+ status: z.ZodLiteral<"available">;
1069
+ oneShot: z.ZodObject<{
1070
+ sampleLimit: z.ZodNumber;
1071
+ sampled: z.ZodNumber;
1072
+ ready: z.ZodNumber;
1073
+ expiredLeases: z.ZodNumber;
1074
+ retried: z.ZodNumber;
1075
+ requiresReview: z.ZodNumber;
1076
+ oldestReadyAt: z.ZodNullable<z.ZodISODateTime>;
1077
+ }, z.core.$strict>;
1078
+ coalesced: z.ZodObject<{
1079
+ sampleLimit: z.ZodNumber;
1080
+ sampled: z.ZodNumber;
1081
+ ready: z.ZodNumber;
1082
+ expiredLeases: z.ZodNumber;
1083
+ retried: z.ZodNumber;
1084
+ requiresReview: z.ZodNumber;
1085
+ oldestReadyAt: z.ZodNullable<z.ZodISODateTime>;
1086
+ }, z.core.$strict>;
1087
+ }, z.core.$strict>, z.ZodObject<{
1088
+ status: z.ZodLiteral<"unavailable">;
1089
+ }, z.core.$strict>], "status">>;
606
1090
  sessionStarts: z.ZodOptional<z.ZodObject<{
607
1091
  total: z.ZodNumber;
608
1092
  remaining: z.ZodNumber;
@@ -613,8 +1097,8 @@ export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
613
1097
  shards: z.ZodArray<z.ZodObject<{
614
1098
  shardId: z.ZodNumber;
615
1099
  status: z.ZodEnum<{
616
- ready: "ready";
617
1100
  starting: "starting";
1101
+ ready: "ready";
618
1102
  disconnected: "disconnected";
619
1103
  reconnecting: "reconnecting";
620
1104
  stopped: "stopped";
@@ -632,12 +1116,52 @@ export declare const supervisorMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
632
1116
  }, z.core.$strict>;
633
1117
  }, z.core.$strict>, z.ZodObject<{
634
1118
  version: z.ZodLiteral<1>;
635
- type: z.ZodLiteral<"helyx.lease.heartbeat">;
1119
+ type: z.ZodLiteral<"helyx.scheduled.request">;
1120
+ requestId: z.ZodUUID;
1121
+ deadlineAt: z.ZodISODateTime;
636
1122
  identity: z.ZodObject<{
637
1123
  version: z.ZodLiteral<1>;
638
1124
  mode: z.ZodEnum<{
1125
+ auto: "auto";
639
1126
  fixed: "fixed";
1127
+ }>;
1128
+ scope: z.ZodEnum<{
1129
+ local: "local";
1130
+ coordinated: "coordinated";
1131
+ }>;
1132
+ generation: z.ZodString;
1133
+ deploymentOrder: z.ZodOptional<z.ZodNumber>;
1134
+ supervisorId: z.ZodUUID;
1135
+ shardId: z.ZodNumber;
1136
+ shardCount: z.ZodNumber;
1137
+ fencingToken: z.ZodNumber;
1138
+ }, z.core.$strict>;
1139
+ task: z.ZodDiscriminatedUnion<[z.ZodObject<{
1140
+ delivery: z.ZodLiteral<"one-shot">;
1141
+ taskId: z.ZodUUID;
1142
+ moduleId: z.ZodString;
1143
+ taskKind: z.ZodString;
1144
+ taskVersion: z.ZodNumber;
1145
+ guildId: z.ZodString;
1146
+ payload: z.ZodRecord<z.ZodString, z.ZodString>;
1147
+ }, z.core.$strict>, z.ZodObject<{
1148
+ delivery: z.ZodLiteral<"coalesced">;
1149
+ taskId: z.ZodUUID;
1150
+ moduleId: z.ZodString;
1151
+ taskKind: z.ZodString;
1152
+ taskVersion: z.ZodNumber;
1153
+ guildId: z.ZodString;
1154
+ payload: z.ZodRecord<z.ZodString, z.ZodString>;
1155
+ claimedGeneration: z.ZodNumber;
1156
+ }, z.core.$strict>], "delivery">;
1157
+ }, z.core.$strict>, z.ZodObject<{
1158
+ version: z.ZodLiteral<1>;
1159
+ type: z.ZodLiteral<"helyx.lease.heartbeat">;
1160
+ identity: z.ZodObject<{
1161
+ version: z.ZodLiteral<1>;
1162
+ mode: z.ZodEnum<{
640
1163
  auto: "auto";
1164
+ fixed: "fixed";
641
1165
  }>;
642
1166
  scope: z.ZodEnum<{
643
1167
  local: "local";
@@ -690,27 +1214,54 @@ export declare const workerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodDiscrimi
690
1214
  token: z.ZodString;
691
1215
  source: z.ZodEnum<{
692
1216
  file: "file";
693
- discord: "discord";
694
1217
  startup: "startup";
1218
+ discord: "discord";
695
1219
  }>;
696
1220
  }, z.core.$strict>, z.ZodObject<{
697
1221
  kind: z.ZodLiteral<"cloud.disconnect">;
698
1222
  }, z.core.$strict>, z.ZodObject<{
699
1223
  kind: z.ZodLiteral<"cloud.rotate">;
1224
+ }, z.core.$strict>, z.ZodObject<{
1225
+ kind: z.ZodLiteral<"support.bug.create">;
1226
+ reporterDiscordUserId: z.ZodString;
1227
+ guildId: z.ZodString;
1228
+ moduleOrArea: z.ZodString;
1229
+ summary: z.ZodString;
1230
+ whatHappened: z.ZodString;
1231
+ extraDetail: z.ZodOptional<z.ZodString>;
1232
+ interactionId: z.ZodString;
1233
+ correlationId: z.ZodUUID;
700
1234
  }, z.core.$strict>], "kind">;
701
1235
  }, z.core.$strict>, z.ZodObject<{
702
1236
  version: z.ZodLiteral<1>;
703
1237
  type: z.ZodLiteral<"helyx.operations.health.request">;
704
1238
  requestId: z.ZodUUID;
705
1239
  deadlineAt: z.ZodISODateTime;
1240
+ }, z.core.$strict>, z.ZodObject<{
1241
+ version: z.ZodLiteral<1>;
1242
+ type: z.ZodLiteral<"helyx.scheduled.response">;
1243
+ requestId: z.ZodUUID;
1244
+ result: z.ZodDiscriminatedUnion<[z.ZodObject<{
1245
+ outcome: z.ZodLiteral<"completed">;
1246
+ }, z.core.$strict>, z.ZodObject<{
1247
+ outcome: z.ZodEnum<{
1248
+ deferred: "deferred";
1249
+ retry: "retry";
1250
+ }>;
1251
+ delayMs: z.ZodNumber;
1252
+ safeCode: z.ZodString;
1253
+ }, z.core.$strict>, z.ZodObject<{
1254
+ outcome: z.ZodLiteral<"requires_review">;
1255
+ safeCode: z.ZodString;
1256
+ }, z.core.$strict>], "outcome">;
706
1257
  }, z.core.$strict>, z.ZodObject<{
707
1258
  version: z.ZodLiteral<1>;
708
1259
  type: z.ZodLiteral<"helyx.health.update">;
709
1260
  identity: z.ZodObject<{
710
1261
  version: z.ZodLiteral<1>;
711
1262
  mode: z.ZodEnum<{
712
- fixed: "fixed";
713
1263
  auto: "auto";
1264
+ fixed: "fixed";
714
1265
  }>;
715
1266
  scope: z.ZodEnum<{
716
1267
  local: "local";
@@ -726,8 +1277,8 @@ export declare const workerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodDiscrimi
726
1277
  health: z.ZodObject<{
727
1278
  shardId: z.ZodNumber;
728
1279
  status: z.ZodEnum<{
729
- ready: "ready";
730
1280
  starting: "starting";
1281
+ ready: "ready";
731
1282
  disconnected: "disconnected";
732
1283
  reconnecting: "reconnecting";
733
1284
  stopped: "stopped";