@trigger.dev/core 4.6.3 → 4.7.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 (109) hide show
  1. package/dist/commonjs/v3/apiClient/index.d.ts +201 -20
  2. package/dist/commonjs/v3/apiClient/index.js +38 -0
  3. package/dist/commonjs/v3/apiClient/index.js.map +1 -1
  4. package/dist/commonjs/v3/apiClient/runStream.d.ts +3 -0
  5. package/dist/commonjs/v3/apiClient/runStream.js +21 -5
  6. package/dist/commonjs/v3/apiClient/runStream.js.map +1 -1
  7. package/dist/commonjs/v3/errors.d.ts +4 -0
  8. package/dist/commonjs/v3/errors.js +28 -1
  9. package/dist/commonjs/v3/errors.js.map +1 -1
  10. package/dist/commonjs/v3/resource-catalog/catalog.d.ts +3 -1
  11. package/dist/commonjs/v3/resource-catalog/index.d.ts +3 -1
  12. package/dist/commonjs/v3/resource-catalog/index.js +6 -0
  13. package/dist/commonjs/v3/resource-catalog/index.js.map +1 -1
  14. package/dist/commonjs/v3/resource-catalog/noopResourceCatalog.d.ts +3 -1
  15. package/dist/commonjs/v3/resource-catalog/noopResourceCatalog.js +4 -0
  16. package/dist/commonjs/v3/resource-catalog/noopResourceCatalog.js.map +1 -1
  17. package/dist/commonjs/v3/resource-catalog/standardResourceCatalog.d.ts +4 -1
  18. package/dist/commonjs/v3/resource-catalog/standardResourceCatalog.js +27 -2
  19. package/dist/commonjs/v3/resource-catalog/standardResourceCatalog.js.map +1 -1
  20. package/dist/commonjs/v3/schemas/api.d.ts +99 -2
  21. package/dist/commonjs/v3/schemas/api.js +48 -4
  22. package/dist/commonjs/v3/schemas/api.js.map +1 -1
  23. package/dist/commonjs/v3/schemas/build.d.ts +84 -4
  24. package/dist/commonjs/v3/schemas/build.js +1 -0
  25. package/dist/commonjs/v3/schemas/build.js.map +1 -1
  26. package/dist/commonjs/v3/schemas/messages.d.ts +49 -2
  27. package/dist/commonjs/v3/schemas/messages.js +4 -0
  28. package/dist/commonjs/v3/schemas/messages.js.map +1 -1
  29. package/dist/commonjs/v3/schemas/queues.d.ts +124 -3
  30. package/dist/commonjs/v3/schemas/queues.js +91 -19
  31. package/dist/commonjs/v3/schemas/queues.js.map +1 -1
  32. package/dist/commonjs/v3/schemas/resources.d.ts +78 -4
  33. package/dist/commonjs/v3/schemas/resources.js +3 -0
  34. package/dist/commonjs/v3/schemas/resources.js.map +1 -1
  35. package/dist/commonjs/v3/schemas/schemas.d.ts +108 -4
  36. package/dist/commonjs/v3/schemas/schemas.js +35 -1
  37. package/dist/commonjs/v3/schemas/schemas.js.map +1 -1
  38. package/dist/commonjs/v3/schemas/snapshotRoute.d.ts +1 -1
  39. package/dist/commonjs/v3/schemas/snapshotRoute.js +6 -6
  40. package/dist/commonjs/v3/schemas/snapshotRoute.js.map +1 -1
  41. package/dist/commonjs/v3/schemas/webhookConfig.d.ts +48 -3
  42. package/dist/commonjs/v3/schemas/webhookConfig.js +58 -5
  43. package/dist/commonjs/v3/schemas/webhookConfig.js.map +1 -1
  44. package/dist/commonjs/v3/types/queues.d.ts +39 -3
  45. package/dist/commonjs/v3/types/tasks.d.ts +39 -5
  46. package/dist/commonjs/v3/utils/zod.d.ts +6 -0
  47. package/dist/commonjs/v3/utils/zod.js +9 -0
  48. package/dist/commonjs/v3/utils/zod.js.map +1 -1
  49. package/dist/commonjs/v3/webhooks/index.d.ts +8 -1
  50. package/dist/commonjs/v3/webhooks/index.js +34 -2
  51. package/dist/commonjs/v3/webhooks/index.js.map +1 -1
  52. package/dist/commonjs/v3/zodIpc.js +3 -1
  53. package/dist/commonjs/v3/zodIpc.js.map +1 -1
  54. package/dist/commonjs/version.js +1 -1
  55. package/dist/esm/v3/apiClient/index.d.ts +201 -20
  56. package/dist/esm/v3/apiClient/index.js +39 -1
  57. package/dist/esm/v3/apiClient/index.js.map +1 -1
  58. package/dist/esm/v3/apiClient/runStream.d.ts +3 -0
  59. package/dist/esm/v3/apiClient/runStream.js +21 -5
  60. package/dist/esm/v3/apiClient/runStream.js.map +1 -1
  61. package/dist/esm/v3/errors.d.ts +4 -0
  62. package/dist/esm/v3/errors.js +26 -0
  63. package/dist/esm/v3/errors.js.map +1 -1
  64. package/dist/esm/v3/resource-catalog/catalog.d.ts +3 -1
  65. package/dist/esm/v3/resource-catalog/index.d.ts +3 -1
  66. package/dist/esm/v3/resource-catalog/index.js +6 -0
  67. package/dist/esm/v3/resource-catalog/index.js.map +1 -1
  68. package/dist/esm/v3/resource-catalog/noopResourceCatalog.d.ts +3 -1
  69. package/dist/esm/v3/resource-catalog/noopResourceCatalog.js +4 -0
  70. package/dist/esm/v3/resource-catalog/noopResourceCatalog.js.map +1 -1
  71. package/dist/esm/v3/resource-catalog/standardResourceCatalog.d.ts +4 -1
  72. package/dist/esm/v3/resource-catalog/standardResourceCatalog.js +27 -2
  73. package/dist/esm/v3/resource-catalog/standardResourceCatalog.js.map +1 -1
  74. package/dist/esm/v3/schemas/api.d.ts +99 -2
  75. package/dist/esm/v3/schemas/api.js +44 -0
  76. package/dist/esm/v3/schemas/api.js.map +1 -1
  77. package/dist/esm/v3/schemas/build.d.ts +84 -4
  78. package/dist/esm/v3/schemas/build.js +2 -1
  79. package/dist/esm/v3/schemas/build.js.map +1 -1
  80. package/dist/esm/v3/schemas/messages.d.ts +49 -2
  81. package/dist/esm/v3/schemas/messages.js +4 -0
  82. package/dist/esm/v3/schemas/messages.js.map +1 -1
  83. package/dist/esm/v3/schemas/queues.d.ts +124 -3
  84. package/dist/esm/v3/schemas/queues.js +90 -18
  85. package/dist/esm/v3/schemas/queues.js.map +1 -1
  86. package/dist/esm/v3/schemas/resources.d.ts +78 -4
  87. package/dist/esm/v3/schemas/resources.js +4 -1
  88. package/dist/esm/v3/schemas/resources.js.map +1 -1
  89. package/dist/esm/v3/schemas/schemas.d.ts +108 -4
  90. package/dist/esm/v3/schemas/schemas.js +34 -0
  91. package/dist/esm/v3/schemas/schemas.js.map +1 -1
  92. package/dist/esm/v3/schemas/snapshotRoute.d.ts +1 -1
  93. package/dist/esm/v3/schemas/snapshotRoute.js +1 -1
  94. package/dist/esm/v3/schemas/snapshotRoute.js.map +1 -1
  95. package/dist/esm/v3/schemas/webhookConfig.d.ts +48 -3
  96. package/dist/esm/v3/schemas/webhookConfig.js +57 -4
  97. package/dist/esm/v3/schemas/webhookConfig.js.map +1 -1
  98. package/dist/esm/v3/types/queues.d.ts +39 -3
  99. package/dist/esm/v3/types/tasks.d.ts +39 -5
  100. package/dist/esm/v3/utils/zod.d.ts +6 -0
  101. package/dist/esm/v3/utils/zod.js +8 -0
  102. package/dist/esm/v3/utils/zod.js.map +1 -1
  103. package/dist/esm/v3/webhooks/index.d.ts +8 -1
  104. package/dist/esm/v3/webhooks/index.js +33 -2
  105. package/dist/esm/v3/webhooks/index.js.map +1 -1
  106. package/dist/esm/v3/zodIpc.js +3 -1
  107. package/dist/esm/v3/zodIpc.js.map +1 -1
  108. package/dist/esm/version.js +1 -1
  109. package/package.json +1 -1
@@ -10,8 +10,20 @@ export declare const TaskResource: z.ZodObject<{
10
10
  exportName: z.ZodOptional<z.ZodString>;
11
11
  queue: z.ZodOptional<z.ZodObject<{
12
12
  concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
13
+ combinedConcurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
13
14
  name: z.ZodOptional<z.ZodString>;
14
15
  }, z.core.$strip>>;
16
+ gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
17
+ queue: z.ZodString;
18
+ concurrencyKey: z.ZodOptional<z.ZodString>;
19
+ }, z.core.$strip>>>;
20
+ concurrency: z.ZodOptional<z.ZodObject<{
21
+ inline: z.ZodOptional<z.ZodObject<{
22
+ perKey: z.ZodOptional<z.ZodNumber>;
23
+ total: z.ZodOptional<z.ZodNumber>;
24
+ }, z.core.$strip>>;
25
+ limits: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
+ }, z.core.$strip>>;
15
27
  retry: z.ZodOptional<z.ZodObject<{
16
28
  maxAttempts: z.ZodOptional<z.ZodNumber>;
17
29
  factor: z.ZodOptional<z.ZodNumber>;
@@ -268,7 +280,18 @@ export declare const WebhookResource: z.ZodObject<{
268
280
  handshake: z.ZodOptional<z.ZodObject<{
269
281
  matchPath: z.ZodString;
270
282
  matchValue: z.ZodString;
271
- respondPath: z.ZodString;
283
+ respondPath: z.ZodOptional<z.ZodString>;
284
+ respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
285
+ }, z.core.$strip>>;
286
+ getHandshake: z.ZodOptional<z.ZodObject<{
287
+ matchParam: z.ZodOptional<z.ZodString>;
288
+ matchValue: z.ZodOptional<z.ZodString>;
289
+ tokenParam: z.ZodString;
290
+ challengeParam: z.ZodString;
291
+ }, z.core.$strip>>;
292
+ response: z.ZodOptional<z.ZodObject<{
293
+ acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
294
+ rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
272
295
  }, z.core.$strip>>;
273
296
  }, z.core.$strip>, z.ZodObject<{
274
297
  kind: z.ZodLiteral<"preset">;
@@ -452,7 +475,18 @@ export declare const WebhookResource: z.ZodObject<{
452
475
  handshake: z.ZodOptional<z.ZodObject<{
453
476
  matchPath: z.ZodString;
454
477
  matchValue: z.ZodString;
455
- respondPath: z.ZodString;
478
+ respondPath: z.ZodOptional<z.ZodString>;
479
+ respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
480
+ }, z.core.$strip>>;
481
+ getHandshake: z.ZodOptional<z.ZodObject<{
482
+ matchParam: z.ZodOptional<z.ZodString>;
483
+ matchValue: z.ZodOptional<z.ZodString>;
484
+ tokenParam: z.ZodString;
485
+ challengeParam: z.ZodString;
486
+ }, z.core.$strip>>;
487
+ response: z.ZodOptional<z.ZodObject<{
488
+ acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
489
+ rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
456
490
  }, z.core.$strip>>;
457
491
  }, z.core.$strip>, z.ZodObject<{
458
492
  kind: z.ZodLiteral<"bundle">;
@@ -495,8 +529,20 @@ export declare const BackgroundWorkerMetadata: z.ZodObject<{
495
529
  exportName: z.ZodOptional<z.ZodString>;
496
530
  queue: z.ZodOptional<z.ZodObject<{
497
531
  concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
532
+ combinedConcurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
498
533
  name: z.ZodOptional<z.ZodString>;
499
534
  }, z.core.$strip>>;
535
+ gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
536
+ queue: z.ZodString;
537
+ concurrencyKey: z.ZodOptional<z.ZodString>;
538
+ }, z.core.$strip>>>;
539
+ concurrency: z.ZodOptional<z.ZodObject<{
540
+ inline: z.ZodOptional<z.ZodObject<{
541
+ perKey: z.ZodOptional<z.ZodNumber>;
542
+ total: z.ZodOptional<z.ZodNumber>;
543
+ }, z.core.$strip>>;
544
+ limits: z.ZodOptional<z.ZodArray<z.ZodString>>;
545
+ }, z.core.$strip>>;
500
546
  retry: z.ZodOptional<z.ZodObject<{
501
547
  maxAttempts: z.ZodOptional<z.ZodNumber>;
502
548
  factor: z.ZodOptional<z.ZodNumber>;
@@ -744,7 +790,18 @@ export declare const BackgroundWorkerMetadata: z.ZodObject<{
744
790
  handshake: z.ZodOptional<z.ZodObject<{
745
791
  matchPath: z.ZodString;
746
792
  matchValue: z.ZodString;
747
- respondPath: z.ZodString;
793
+ respondPath: z.ZodOptional<z.ZodString>;
794
+ respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
795
+ }, z.core.$strip>>;
796
+ getHandshake: z.ZodOptional<z.ZodObject<{
797
+ matchParam: z.ZodOptional<z.ZodString>;
798
+ matchValue: z.ZodOptional<z.ZodString>;
799
+ tokenParam: z.ZodString;
800
+ challengeParam: z.ZodString;
801
+ }, z.core.$strip>>;
802
+ response: z.ZodOptional<z.ZodObject<{
803
+ acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
804
+ rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
748
805
  }, z.core.$strip>>;
749
806
  }, z.core.$strip>, z.ZodObject<{
750
807
  kind: z.ZodLiteral<"preset">;
@@ -928,7 +985,18 @@ export declare const BackgroundWorkerMetadata: z.ZodObject<{
928
985
  handshake: z.ZodOptional<z.ZodObject<{
929
986
  matchPath: z.ZodString;
930
987
  matchValue: z.ZodString;
931
- respondPath: z.ZodString;
988
+ respondPath: z.ZodOptional<z.ZodString>;
989
+ respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
990
+ }, z.core.$strip>>;
991
+ getHandshake: z.ZodOptional<z.ZodObject<{
992
+ matchParam: z.ZodOptional<z.ZodString>;
993
+ matchValue: z.ZodOptional<z.ZodString>;
994
+ tokenParam: z.ZodString;
995
+ challengeParam: z.ZodString;
996
+ }, z.core.$strip>>;
997
+ response: z.ZodOptional<z.ZodObject<{
998
+ acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
999
+ rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
932
1000
  }, z.core.$strip>>;
933
1001
  }, z.core.$strip>, z.ZodObject<{
934
1002
  kind: z.ZodLiteral<"bundle">;
@@ -962,6 +1030,12 @@ export declare const BackgroundWorkerMetadata: z.ZodObject<{
962
1030
  queues: z.ZodOptional<z.ZodArray<z.ZodObject<{
963
1031
  name: z.ZodString;
964
1032
  concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1033
+ combinedConcurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1034
+ }, z.core.$strip>>>;
1035
+ concurrencyLimits: z.ZodOptional<z.ZodArray<z.ZodObject<{
1036
+ perKey: z.ZodOptional<z.ZodNumber>;
1037
+ total: z.ZodOptional<z.ZodNumber>;
1038
+ name: z.ZodString;
965
1039
  }, z.core.$strip>>>;
966
1040
  sourceFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
967
1041
  filePath: z.ZodString;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod/v4";
2
- import { QueueManifest, RetryOptions, ScheduleMetadata } from "./schemas.js";
2
+ import { QueueGateManifest, QueueManifest, RetryOptions, ScheduleMetadata, TaskConcurrencyManifest, ConcurrencyLimitManifest, } from "./schemas.js";
3
3
  import { MachineConfig } from "./common.js";
4
4
  import { WebhookVerifierArtifact, WebhookRoutingTarget, WebhookSecretProvisioning, } from "./webhookConfig.js";
5
5
  export const AgentConfig = z.object({
@@ -11,6 +11,8 @@ export const TaskResource = z.object({
11
11
  filePath: z.string(),
12
12
  exportName: z.string().optional(),
13
13
  queue: QueueManifest.extend({ name: z.string().optional() }).optional(),
14
+ gates: QueueGateManifest.array().max(2).optional(),
15
+ concurrency: TaskConcurrencyManifest.optional(),
14
16
  retry: RetryOptions.optional(),
15
17
  machine: MachineConfig.optional(),
16
18
  triggerSource: z.string().optional(),
@@ -61,6 +63,7 @@ export const BackgroundWorkerMetadata = z.object({
61
63
  prompts: z.array(PromptResource).optional(),
62
64
  webhooks: z.array(WebhookResource).optional(), // NEW
63
65
  queues: z.array(QueueManifest).optional(),
66
+ concurrencyLimits: z.array(ConcurrencyLimitManifest).optional(),
64
67
  sourceFiles: z.array(BackgroundWorkerSourceFileMetadata).optional(),
65
68
  runtime: z.string().optional(),
66
69
  runtimeVersion: z.string().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../../src/v3/schemas/resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,6DAA6D;CAChF,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvE,KAAK,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC9B,OAAO,EAAE,aAAa,CAAC,QAAQ,EAAE;IACjC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,WAAW,EAAE,WAAW,CAAC,QAAQ,EAAE;IACnC,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,E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AC,KAAK,CAAC,YAAY,CAAC;IAC5B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;IAC3C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE,EAAE,MAAM;IACrD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;IACzC,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;IAC/D,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC,QAAQ,EAAE;IACnE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC"}
@@ -484,8 +484,44 @@ export type RetryOptions = z.infer<typeof RetryOptions>;
484
484
  export declare const QueueManifest: z.ZodObject<{
485
485
  name: z.ZodString;
486
486
  concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
487
+ combinedConcurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
487
488
  }, z.core.$strip>;
488
489
  export type QueueManifest = z.infer<typeof QueueManifest>;
490
+ /** A gate a task's runs must also hold a concurrency slot in while executing.
491
+ * `queue` is the gate queue's name. When `concurrencyKey` is omitted the run's own
492
+ * `concurrencyKey` is used, so the gate is keyed per tenant; a literal value pins
493
+ * the gate to one shared slot pool. */
494
+ export declare const QueueGateManifest: z.ZodObject<{
495
+ queue: z.ZodString;
496
+ concurrencyKey: z.ZodOptional<z.ZodString>;
497
+ }, z.core.$strip>;
498
+ export type QueueGateManifest = z.infer<typeof QueueGateManifest>;
499
+ /** One limit shape everywhere a limit appears: perKey caps each concurrencyKey pool
500
+ * (runs without a key share one pool); total caps across everything, keys or not.
501
+ * Limits start at 1 — "block everything" is a pause or an override, not a declared
502
+ * limit — so a stored zero always means "no limit" in metrics and engine keys. */
503
+ export declare const ConcurrencyShapeManifest: z.ZodObject<{
504
+ perKey: z.ZodOptional<z.ZodNumber>;
505
+ total: z.ZodOptional<z.ZodNumber>;
506
+ }, z.core.$strip>;
507
+ export type ConcurrencyShapeManifest = z.infer<typeof ConcurrencyShapeManifest>;
508
+ /** A named, shareable concurrency limit declared with concurrencyLimit(). */
509
+ export declare const ConcurrencyLimitManifest: z.ZodObject<{
510
+ perKey: z.ZodOptional<z.ZodNumber>;
511
+ total: z.ZodOptional<z.ZodNumber>;
512
+ name: z.ZodString;
513
+ }, z.core.$strip>;
514
+ export type ConcurrencyLimitManifest = z.infer<typeof ConcurrencyLimitManifest>;
515
+ /** A task's concurrency declaration: an optional inline limit scoped to the task,
516
+ * plus up to two named limits the task's runs also hold while executing. */
517
+ export declare const TaskConcurrencyManifest: z.ZodObject<{
518
+ inline: z.ZodOptional<z.ZodObject<{
519
+ perKey: z.ZodOptional<z.ZodNumber>;
520
+ total: z.ZodOptional<z.ZodNumber>;
521
+ }, z.core.$strip>>;
522
+ limits: z.ZodOptional<z.ZodArray<z.ZodString>>;
523
+ }, z.core.$strip>;
524
+ export type TaskConcurrencyManifest = z.infer<typeof TaskConcurrencyManifest>;
489
525
  export declare const ScheduleMetadata: z.ZodObject<{
490
526
  cron: z.ZodString;
491
527
  timezone: z.ZodString;
@@ -502,8 +538,20 @@ export declare const TaskMetadata: z.ZodObject<{
502
538
  description: z.ZodOptional<z.ZodString>;
503
539
  queue: z.ZodOptional<z.ZodObject<{
504
540
  concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
541
+ combinedConcurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
505
542
  name: z.ZodOptional<z.ZodString>;
506
543
  }, z.core.$strip>>;
544
+ gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
545
+ queue: z.ZodString;
546
+ concurrencyKey: z.ZodOptional<z.ZodString>;
547
+ }, z.core.$strip>>>;
548
+ concurrency: z.ZodOptional<z.ZodObject<{
549
+ inline: z.ZodOptional<z.ZodObject<{
550
+ perKey: z.ZodOptional<z.ZodNumber>;
551
+ total: z.ZodOptional<z.ZodNumber>;
552
+ }, z.core.$strip>>;
553
+ limits: z.ZodOptional<z.ZodArray<z.ZodString>>;
554
+ }, z.core.$strip>>;
507
555
  retry: z.ZodOptional<z.ZodObject<{
508
556
  maxAttempts: z.ZodOptional<z.ZodNumber>;
509
557
  factor: z.ZodOptional<z.ZodNumber>;
@@ -571,8 +619,20 @@ export declare const TaskManifest: z.ZodObject<{
571
619
  description: z.ZodOptional<z.ZodString>;
572
620
  queue: z.ZodOptional<z.ZodObject<{
573
621
  concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
622
+ combinedConcurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
574
623
  name: z.ZodOptional<z.ZodString>;
575
624
  }, z.core.$strip>>;
625
+ gates: z.ZodOptional<z.ZodArray<z.ZodObject<{
626
+ queue: z.ZodString;
627
+ concurrencyKey: z.ZodOptional<z.ZodString>;
628
+ }, z.core.$strip>>>;
629
+ concurrency: z.ZodOptional<z.ZodObject<{
630
+ inline: z.ZodOptional<z.ZodObject<{
631
+ perKey: z.ZodOptional<z.ZodNumber>;
632
+ total: z.ZodOptional<z.ZodNumber>;
633
+ }, z.core.$strip>>;
634
+ limits: z.ZodOptional<z.ZodArray<z.ZodString>>;
635
+ }, z.core.$strip>>;
576
636
  retry: z.ZodOptional<z.ZodObject<{
577
637
  maxAttempts: z.ZodOptional<z.ZodNumber>;
578
638
  factor: z.ZodOptional<z.ZodNumber>;
@@ -846,7 +906,18 @@ export declare const WebhookMetadata: z.ZodObject<{
846
906
  handshake: z.ZodOptional<z.ZodObject<{
847
907
  matchPath: z.ZodString;
848
908
  matchValue: z.ZodString;
849
- respondPath: z.ZodString;
909
+ respondPath: z.ZodOptional<z.ZodString>;
910
+ respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
911
+ }, z.core.$strip>>;
912
+ getHandshake: z.ZodOptional<z.ZodObject<{
913
+ matchParam: z.ZodOptional<z.ZodString>;
914
+ matchValue: z.ZodOptional<z.ZodString>;
915
+ tokenParam: z.ZodString;
916
+ challengeParam: z.ZodString;
917
+ }, z.core.$strip>>;
918
+ response: z.ZodOptional<z.ZodObject<{
919
+ acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
920
+ rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
850
921
  }, z.core.$strip>>;
851
922
  }, z.core.$strip>, z.ZodObject<{
852
923
  kind: z.ZodLiteral<"preset">;
@@ -1030,7 +1101,18 @@ export declare const WebhookMetadata: z.ZodObject<{
1030
1101
  handshake: z.ZodOptional<z.ZodObject<{
1031
1102
  matchPath: z.ZodString;
1032
1103
  matchValue: z.ZodString;
1033
- respondPath: z.ZodString;
1104
+ respondPath: z.ZodOptional<z.ZodString>;
1105
+ respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
1106
+ }, z.core.$strip>>;
1107
+ getHandshake: z.ZodOptional<z.ZodObject<{
1108
+ matchParam: z.ZodOptional<z.ZodString>;
1109
+ matchValue: z.ZodOptional<z.ZodString>;
1110
+ tokenParam: z.ZodString;
1111
+ challengeParam: z.ZodString;
1112
+ }, z.core.$strip>>;
1113
+ response: z.ZodOptional<z.ZodObject<{
1114
+ acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
1115
+ rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
1034
1116
  }, z.core.$strip>>;
1035
1117
  }, z.core.$strip>, z.ZodObject<{
1036
1118
  kind: z.ZodLiteral<"bundle">;
@@ -1250,7 +1332,18 @@ export declare const WebhookManifest: z.ZodObject<{
1250
1332
  handshake: z.ZodOptional<z.ZodObject<{
1251
1333
  matchPath: z.ZodString;
1252
1334
  matchValue: z.ZodString;
1253
- respondPath: z.ZodString;
1335
+ respondPath: z.ZodOptional<z.ZodString>;
1336
+ respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
1337
+ }, z.core.$strip>>;
1338
+ getHandshake: z.ZodOptional<z.ZodObject<{
1339
+ matchParam: z.ZodOptional<z.ZodString>;
1340
+ matchValue: z.ZodOptional<z.ZodString>;
1341
+ tokenParam: z.ZodString;
1342
+ challengeParam: z.ZodString;
1343
+ }, z.core.$strip>>;
1344
+ response: z.ZodOptional<z.ZodObject<{
1345
+ acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
1346
+ rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
1254
1347
  }, z.core.$strip>>;
1255
1348
  }, z.core.$strip>, z.ZodObject<{
1256
1349
  kind: z.ZodLiteral<"preset">;
@@ -1434,7 +1527,18 @@ export declare const WebhookManifest: z.ZodObject<{
1434
1527
  handshake: z.ZodOptional<z.ZodObject<{
1435
1528
  matchPath: z.ZodString;
1436
1529
  matchValue: z.ZodString;
1437
- respondPath: z.ZodString;
1530
+ respondPath: z.ZodOptional<z.ZodString>;
1531
+ respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
1532
+ }, z.core.$strip>>;
1533
+ getHandshake: z.ZodOptional<z.ZodObject<{
1534
+ matchParam: z.ZodOptional<z.ZodString>;
1535
+ matchValue: z.ZodOptional<z.ZodString>;
1536
+ tokenParam: z.ZodString;
1537
+ challengeParam: z.ZodString;
1538
+ }, z.core.$strip>>;
1539
+ response: z.ZodOptional<z.ZodObject<{
1540
+ acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
1541
+ rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
1438
1542
  }, z.core.$strip>>;
1439
1543
  }, z.core.$strip>, z.ZodObject<{
1440
1544
  kind: z.ZodLiteral<"bundle">;
@@ -139,6 +139,38 @@ export const QueueManifest = z.object({
139
139
  *
140
140
  * If this property is omitted, the task can potentially use up the full concurrency of an environment */
141
141
  concurrencyLimit: z.number().int().min(0).max(100000).optional().nullable(),
142
+ /** An optional property that caps the total number of concurrent run executions across ALL
143
+ * `concurrencyKey` values of this queue. On a queue with a `concurrencyKey`, `concurrencyLimit`
144
+ * applies per key value; this is the ceiling for the whole queue.
145
+ *
146
+ * Caps keyed and keyless runs together, and requires server-side support. */
147
+ combinedConcurrencyLimit: z.number().int().min(0).max(100000).optional().nullable(),
148
+ });
149
+ /** A gate a task's runs must also hold a concurrency slot in while executing.
150
+ * `queue` is the gate queue's name. When `concurrencyKey` is omitted the run's own
151
+ * `concurrencyKey` is used, so the gate is keyed per tenant; a literal value pins
152
+ * the gate to one shared slot pool. */
153
+ export const QueueGateManifest = z.object({
154
+ queue: z.string().min(1).max(128),
155
+ concurrencyKey: z.string().min(1).max(128).optional(),
156
+ });
157
+ /** One limit shape everywhere a limit appears: perKey caps each concurrencyKey pool
158
+ * (runs without a key share one pool); total caps across everything, keys or not.
159
+ * Limits start at 1 — "block everything" is a pause or an override, not a declared
160
+ * limit — so a stored zero always means "no limit" in metrics and engine keys. */
161
+ export const ConcurrencyShapeManifest = z.object({
162
+ perKey: z.number().int().min(1).max(100000).optional(),
163
+ total: z.number().int().min(1).max(100000).optional(),
164
+ });
165
+ /** A named, shareable concurrency limit declared with concurrencyLimit(). */
166
+ export const ConcurrencyLimitManifest = ConcurrencyShapeManifest.extend({
167
+ name: z.string().min(1).max(128),
168
+ });
169
+ /** A task's concurrency declaration: an optional inline limit scoped to the task,
170
+ * plus up to two named limits the task's runs also hold while executing. */
171
+ export const TaskConcurrencyManifest = z.object({
172
+ inline: ConcurrencyShapeManifest.optional(),
173
+ limits: z.string().min(1).max(128).array().max(2).optional(),
142
174
  });
143
175
  export const ScheduleMetadata = z.object({
144
176
  cron: z.string(),
@@ -153,6 +185,8 @@ const taskMetadata = {
153
185
  id: z.string(),
154
186
  description: z.string().optional(),
155
187
  queue: QueueManifest.extend({ name: z.string().optional() }).optional(),
188
+ gates: QueueGateManifest.array().max(2).optional(),
189
+ concurrency: TaskConcurrencyManifest.optional(),
156
190
  retry: RetryOptions.optional(),
157
191
  machine: MachineConfig.optional(),
158
192
  triggerSource: z.string().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../src/v3/schemas/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,cAAc,qBAAqB,CAAC;AAEpC;;EAEE;AACF,MAAM,CAAC,MAAM,eAA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M,EAAE,CAAC,QAAQ,EAAE;IACjC,QAAQ,EAAE,CAAC;SACR,MAAM,CAAC;QACN,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAClC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAClC,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from "zod/v4";
2
2
  /**
3
3
  * A run's versioned storage route (control metadata, never a TRES column), stamped on the queue message
4
4
  * from its immutable BIRTH residency. Carried opaquely on the DequeuedMessage so the worker's separate
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from "zod/v4";
2
2
  /**
3
3
  * A run's versioned storage route (control metadata, never a TRES column), stamped on the queue message
4
4
  * from its immutable BIRTH residency. Carried opaquely on the DequeuedMessage so the worker's separate
@@ -1 +1 @@
1
- {"version":3,"file":"snapshotRoute.js","sourceRoot":"","sources":["../../../../src/v3/schemas/snapshotRoute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACrB,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;IAC5D,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AAGH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,OAAO,EAAE;KACT,SAAS,CAAC,CAAC,KAAK,EAAiC,EAAE;IAClD,MAAM,MAAM,GAAG,iBAAiB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAClD,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"snapshotRoute.js","sourceRoot":"","sources":["../../../../src/v3/schemas/snapshotRoute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACrB,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;IAC5D,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AAGH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,OAAO,EAAE;KACT,SAAS,CAAC,CAAC,KAAK,EAAiC,EAAE;IAClD,MAAM,MAAM,GAAG,iBAAiB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAClD,CAAC,CAAC,CAAC"}
@@ -459,9 +459,32 @@ export type WebhookVerifierConfig = z.infer<typeof WebhookVerifierConfig>;
459
459
  export declare const WebhookHandshakeConfig: z.ZodObject<{
460
460
  matchPath: z.ZodString;
461
461
  matchValue: z.ZodString;
462
- respondPath: z.ZodString;
462
+ respondPath: z.ZodOptional<z.ZodString>;
463
+ respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
463
464
  }, z.core.$strip>;
464
465
  export type WebhookHandshakeConfig = z.infer<typeof WebhookHandshakeConfig>;
466
+ /**
467
+ * The status codes the ingress answers a provider with, for providers that require something other
468
+ * than 200 JSON on success and 400 on a bad signature. Data-only: the ingress reads it off the
469
+ * artifact and never knows which provider asked for it.
470
+ */
471
+ export declare const WebhookResponseConfig: z.ZodObject<{
472
+ acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
473
+ rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
474
+ }, z.core.$strip>;
475
+ export type WebhookResponseConfig = z.infer<typeof WebhookResponseConfig>;
476
+ /**
477
+ * A provider's GET verification of the endpoint URL (Meta's `hub.*` flow): the ingress answers a GET
478
+ * whose `tokenParam` equals the endpoint's dedicated verify token by echoing `challengeParam` as text, and
479
+ * records nothing. Data-only and provider-neutral; the query parameter names are the whole contract.
480
+ */
481
+ export declare const WebhookGetHandshakeConfig: z.ZodObject<{
482
+ matchParam: z.ZodOptional<z.ZodString>;
483
+ matchValue: z.ZodOptional<z.ZodString>;
484
+ tokenParam: z.ZodString;
485
+ challengeParam: z.ZodString;
486
+ }, z.core.$strip>;
487
+ export type WebhookGetHandshakeConfig = z.infer<typeof WebhookGetHandshakeConfig>;
465
488
  export declare const WebhookVerifierArtifact: import("../utils/zod.js").CompatibleZodDiscriminatedUnion<readonly [z.ZodObject<{
466
489
  kind: z.ZodLiteral<"config">;
467
490
  config: import("../utils/zod.js").CompatibleZodDiscriminatedUnion<readonly [z.ZodObject<{
@@ -643,7 +666,18 @@ export declare const WebhookVerifierArtifact: import("../utils/zod.js").Compatib
643
666
  handshake: z.ZodOptional<z.ZodObject<{
644
667
  matchPath: z.ZodString;
645
668
  matchValue: z.ZodString;
646
- respondPath: z.ZodString;
669
+ respondPath: z.ZodOptional<z.ZodString>;
670
+ respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
671
+ }, z.core.$strip>>;
672
+ getHandshake: z.ZodOptional<z.ZodObject<{
673
+ matchParam: z.ZodOptional<z.ZodString>;
674
+ matchValue: z.ZodOptional<z.ZodString>;
675
+ tokenParam: z.ZodString;
676
+ challengeParam: z.ZodString;
677
+ }, z.core.$strip>>;
678
+ response: z.ZodOptional<z.ZodObject<{
679
+ acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
680
+ rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
647
681
  }, z.core.$strip>>;
648
682
  }, z.core.$strip>, z.ZodObject<{
649
683
  kind: z.ZodLiteral<"preset">;
@@ -827,7 +861,18 @@ export declare const WebhookVerifierArtifact: import("../utils/zod.js").Compatib
827
861
  handshake: z.ZodOptional<z.ZodObject<{
828
862
  matchPath: z.ZodString;
829
863
  matchValue: z.ZodString;
830
- respondPath: z.ZodString;
864
+ respondPath: z.ZodOptional<z.ZodString>;
865
+ respondStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<204>]>>;
866
+ }, z.core.$strip>>;
867
+ getHandshake: z.ZodOptional<z.ZodObject<{
868
+ matchParam: z.ZodOptional<z.ZodString>;
869
+ matchValue: z.ZodOptional<z.ZodString>;
870
+ tokenParam: z.ZodString;
871
+ challengeParam: z.ZodString;
872
+ }, z.core.$strip>>;
873
+ response: z.ZodOptional<z.ZodObject<{
874
+ acceptedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<200>, z.ZodLiteral<202>, z.ZodLiteral<204>]>>;
875
+ rejectedStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>]>>;
831
876
  }, z.core.$strip>>;
832
877
  }, z.core.$strip>, z.ZodObject<{
833
878
  kind: z.ZodLiteral<"bundle">;
@@ -18,10 +18,23 @@ export const WebhookIdempotencyField = z.object({
18
18
  // Where a scalar value comes from. Used for the timestamp and for signing-string template vars.
19
19
  // "signatureField" reads a field parsed out of the signature header (e.g. Stripe `t`).
20
20
  // "url" is the inbound request URL (e.g. Square signs `{url}{body}`). "constant" is a literal.
21
+ /**
22
+ * A dotted path into the parsed JSON body. Segments that name the prototype chain are refused: the
23
+ * path is author-supplied and is followed on the server, both to read a value and, for the console's
24
+ * test-send, to write a fresh timestamp.
25
+ */
26
+ const WebhookBodyPath = z
27
+ .string()
28
+ .min(1)
29
+ .refine((path) => path
30
+ .split(".")
31
+ .every((segment) => segment !== "" && !["__proto__", "constructor", "prototype"].includes(segment)), {
32
+ message: "body path segments must be non-empty and must not name __proto__, constructor or prototype",
33
+ });
21
34
  export const WebhookValueSource = discriminatedUnion("from", [
22
35
  z.object({ from: z.literal("header"), name: z.string() }),
23
36
  z.object({ from: z.literal("signatureField"), field: z.string() }),
24
- z.object({ from: z.literal("body"), path: z.string() }),
37
+ z.object({ from: z.literal("body"), path: WebhookBodyPath }),
25
38
  z.object({ from: z.literal("url") }),
26
39
  z.object({ from: z.literal("constant"), value: z.string() }),
27
40
  ]);
@@ -117,9 +130,45 @@ export const WebhookVerifierConfig = discriminatedUnion("scheme", [
117
130
  // delivery (Slack url_verification, Discord PING). Generic + data-only: if the verified body's
118
131
  // `matchPath` equals `matchValue`, ingest responds 200 with the body's `respondPath` value. ──
119
132
  export const WebhookHandshakeConfig = z.object({
120
- matchPath: z.string(), // dotted path into the body, e.g. "type"
121
- matchValue: z.string(), // e.g. "url_verification"
122
- respondPath: z.string(), // dotted path to echo, e.g. "challenge"
133
+ /** Dotted path into the body, e.g. "type". Compared as a string, so a numeric 0 matches "0". */
134
+ matchPath: z.string(),
135
+ /** e.g. "url_verification", or "0" for a numeric PING type. */
136
+ matchValue: z.string(),
137
+ /** Dotted path whose value is echoed as the text body, e.g. "challenge". Unset: empty body. */
138
+ respondPath: z.string().optional(),
139
+ /** Status of the answer. Default 200; 204 always answers without a body. */
140
+ respondStatus: z.union([z.literal(200), z.literal(204)]).optional(),
141
+ });
142
+ /**
143
+ * The status codes the ingress answers a provider with, for providers that require something other
144
+ * than 200 JSON on success and 400 on a bad signature. Data-only: the ingress reads it off the
145
+ * artifact and never knows which provider asked for it.
146
+ */
147
+ export const WebhookResponseConfig = z.object({
148
+ /** Status for a recorded or deduplicated delivery. 204 sends no body. Default 200 with a JSON body. */
149
+ acceptedStatus: z.union([z.literal(200), z.literal(202), z.literal(204)]).optional(),
150
+ /** Status when signature verification fails. Default 400. */
151
+ rejectedStatus: z.union([z.literal(400), z.literal(401), z.literal(403)]).optional(),
152
+ });
153
+ /**
154
+ * A provider's GET verification of the endpoint URL (Meta's `hub.*` flow): the ingress answers a GET
155
+ * whose `tokenParam` equals the endpoint's dedicated verify token by echoing `challengeParam` as text, and
156
+ * records nothing. Data-only and provider-neutral; the query parameter names are the whole contract.
157
+ */
158
+ export const WebhookGetHandshakeConfig = z
159
+ .object({
160
+ /** Query parameter that must equal `matchValue` for the request to count, e.g. "hub.mode". */
161
+ matchParam: z.string().min(1).optional(),
162
+ /** e.g. "subscribe". Required when matchParam is set. */
163
+ matchValue: z.string().optional(),
164
+ /** Query parameter carrying the endpoint's dedicated verify token, not its signing secret. */
165
+ tokenParam: z.string().min(1),
166
+ /** Query parameter whose value is echoed as the plain-text 200 body. */
167
+ challengeParam: z.string().min(1),
168
+ })
169
+ .refine((config) => (config.matchParam === undefined) === (config.matchValue === undefined), {
170
+ message: "matchParam and matchValue must be supplied together",
171
+ path: ["matchParam"],
123
172
  });
124
173
  // ── Verifier artifact: data-only tagged union stored on WebhookEndpoint.verifierArtifact ──
125
174
  export const WebhookVerifierArtifact = discriminatedUnion("kind", [
@@ -127,12 +176,16 @@ export const WebhookVerifierArtifact = discriminatedUnion("kind", [
127
176
  kind: z.literal("config"),
128
177
  config: WebhookVerifierConfig,
129
178
  handshake: WebhookHandshakeConfig.optional(),
179
+ getHandshake: WebhookGetHandshakeConfig.optional(),
180
+ response: WebhookResponseConfig.optional(),
130
181
  }),
131
182
  z.object({
132
183
  kind: z.literal("preset"),
133
184
  preset: z.string(),
134
185
  config: WebhookVerifierConfig,
135
186
  handshake: WebhookHandshakeConfig.optional(),
187
+ getHandshake: WebhookGetHandshakeConfig.optional(),
188
+ response: WebhookResponseConfig.optional(),
136
189
  }),
137
190
  z.object({ kind: z.literal("bundle"), bundleUrl: z.string(), hash: z.string() }), // P3 seam
138
191
  ]);