@greatwait/contracts 0.3.0 → 0.3.2

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 (104) hide show
  1. package/dist/attempt-diagnostics.d.ts +1 -1
  2. package/dist/attempt-diagnostics.js +13 -1
  3. package/dist/attempt-search.d.ts +2 -0
  4. package/dist/attempt-search.js +22 -19
  5. package/dist/authority.js +9 -9
  6. package/dist/billing.d.ts +46 -0
  7. package/dist/billing.js +29 -0
  8. package/dist/callback-safety.js +5 -1
  9. package/dist/configuration.d.ts +6 -2
  10. package/dist/configuration.js +93 -52
  11. package/dist/delivery.d.ts +13 -1
  12. package/dist/delivery.js +2 -0
  13. package/dist/effective-limits.d.ts +4 -4
  14. package/dist/endpoints.d.ts +29 -0
  15. package/dist/endpoints.js +57 -26
  16. package/dist/forecast.d.ts +2 -2
  17. package/dist/http-request.d.ts +12 -2
  18. package/dist/http-request.js +56 -24
  19. package/dist/identifiers.js +20 -20
  20. package/dist/index.d.ts +8 -7
  21. package/dist/index.js +8 -7
  22. package/dist/mcp.js +1 -0
  23. package/dist/operational-config.d.ts +174 -22
  24. package/dist/operational-config.js +213 -79
  25. package/dist/operations.d.ts +334 -52
  26. package/dist/operations.js +195 -34
  27. package/dist/project-notifications.d.ts +35 -9
  28. package/dist/project-notifications.js +43 -12
  29. package/dist/protocol.d.ts +28 -0
  30. package/dist/protocol.js +56 -33
  31. package/dist/schedule-selection.js +2 -2
  32. package/dist/scheduling-records.d.ts +106 -16
  33. package/dist/scheduling-records.js +36 -12
  34. package/dist/scheduling.d.ts +200 -43
  35. package/dist/scheduling.js +280 -131
  36. package/dist/service-mode.d.ts +88 -0
  37. package/dist/service-mode.js +130 -0
  38. package/dist/signatures.d.ts +6 -6
  39. package/dist/signatures.js +24 -24
  40. package/dist/stored-http.d.ts +18 -0
  41. package/dist/stored-http.js +106 -0
  42. package/dist/tenancy.d.ts +54 -30
  43. package/dist/tenancy.js +35 -17
  44. package/dist/time.js +7 -7
  45. package/dist/timing.d.ts +39 -0
  46. package/dist/timing.js +51 -0
  47. package/dist/zod-values.d.ts +1 -1
  48. package/dist/zod-values.js +1 -1
  49. package/dist/zod.d.ts +1 -1
  50. package/dist/zod.js +1 -1
  51. package/generated/v1/examples/billing.noticesdismiss.request.json +3 -0
  52. package/generated/v1/examples/billing.noticesdismiss.response.json +6 -0
  53. package/generated/v1/examples/billing.reconcile.response.json +12 -0
  54. package/generated/v1/examples/billing.summary.response.json +12 -0
  55. package/generated/v1/examples/executions.list.response.json +1 -0
  56. package/generated/v1/examples/limits.read.response.json +1 -1
  57. package/generated/v1/examples/projectnotifications.rotateSigningKey.response.json +1 -0
  58. package/generated/v1/examples/projects.list.response.json +0 -6
  59. package/generated/v1/examples/projects.read.response.json +14 -0
  60. package/generated/v1/examples/schedules.list.response.json +1 -3
  61. package/generated/v1/examples/schedules.summary.response.json +174 -0
  62. package/generated/v1/examples/timing.summary.response.json +33 -1
  63. package/generated/v1/manifest.json +79 -2
  64. package/generated/v1/openapi.json +4084 -2023
  65. package/generated/v1/policy-matrix.json +22 -1
  66. package/generated/v1/schemas/attempts.list.response.json +10 -0
  67. package/generated/v1/schemas/attempts.read.response.json +10 -0
  68. package/generated/v1/schemas/attempts.search.response.json +4 -0
  69. package/generated/v1/schemas/billing.notices.query.json +4 -0
  70. package/generated/v1/schemas/billing.noticesdismiss.request.json +12 -0
  71. package/generated/v1/schemas/billing.noticesdismiss.response.json +22 -0
  72. package/generated/v1/schemas/billing.reconcile.response.json +43 -0
  73. package/generated/v1/schemas/billing.summary.response.json +43 -0
  74. package/generated/v1/schemas/endpoints.list.query.json +15 -0
  75. package/generated/v1/schemas/executions.list.response.json +4 -0
  76. package/generated/v1/schemas/occurrences.list.response.json +4 -0
  77. package/generated/v1/schemas/occurrences.read.response.json +4 -0
  78. package/generated/v1/schemas/occurrences.redeliver.response.json +10 -0
  79. package/generated/v1/schemas/projectnotifications.read.response.json +4 -0
  80. package/generated/v1/schemas/projectnotifications.rotateSigningKey.response.json +4 -0
  81. package/generated/v1/schemas/projectnotifications.update.request.json +41 -17
  82. package/generated/v1/schemas/projectnotifications.update.response.json +4 -0
  83. package/generated/v1/schemas/projects.list.response.json +0 -27
  84. package/generated/v1/schemas/projects.read.response-headers.json +11 -0
  85. package/generated/v1/schemas/projects.read.response.json +79 -0
  86. package/generated/v1/schemas/schedules.archive.response.json +8 -0
  87. package/generated/v1/schemas/schedules.cancel.response.json +8 -0
  88. package/generated/v1/schemas/schedules.create.request.json +1 -1
  89. package/generated/v1/schemas/schedules.create.response.json +8 -0
  90. package/generated/v1/schemas/schedules.list.query.json +6 -0
  91. package/generated/v1/schemas/schedules.list.response.json +4 -0
  92. package/generated/v1/schemas/schedules.pause.response.json +8 -0
  93. package/generated/v1/schemas/schedules.read.response.json +8 -0
  94. package/generated/v1/schemas/schedules.replace.request.json +1 -1
  95. package/generated/v1/schemas/schedules.replace.response.json +8 -0
  96. package/generated/v1/schemas/schedules.resume.response.json +8 -0
  97. package/generated/v1/schemas/schedules.summary.query.json +11 -0
  98. package/generated/v1/schemas/schedules.summary.response.json +144 -0
  99. package/generated/v1/schemas/timing.summary.response.json +69 -0
  100. package/generated/v1/snippets/billing.noticesdismiss.json +6 -0
  101. package/generated/v1/snippets/projectnotifications.rotateSigningKey.json +1 -1
  102. package/generated/v1/snippets/projects.read.json +6 -0
  103. package/generated/v1/snippets/schedules.summary.json +6 -0
  104. package/package.json +1 -1
@@ -172,6 +172,35 @@ export declare const callbackEndpointPageSchema: import("zod").ZodObject<{
172
172
  nextCursor: import("zod").ZodOptional<import("zod").ZodString>;
173
173
  }, import("zod/v4/core").$strip>;
174
174
  export type CallbackEndpointPage = z.infer<typeof callbackEndpointPageSchema>;
175
+ /**
176
+ * The rotation filter's one value (W9-80, FXO-3446): endpoints carrying a next
177
+ * signing key whose server update has not been marked done.
178
+ */
179
+ export declare const CALLBACK_ENDPOINT_ROTATION_FILTERS: readonly ["unacknowledged"];
180
+ /**
181
+ * An endpoints listing: the page, and optional filters that intersect before
182
+ * paging (W9-80, FXO-3446).
183
+ *
184
+ * Filters run in the listing's own statement, so the hundred-and-first
185
+ * endpoint is as findable as the first: a picker searches by `text`, the
186
+ * disabled-endpoint check asks for `status=disabled`, and the rotation
187
+ * reminder asks for `rotation=unacknowledged`, each without reading the whole
188
+ * project. A cursor is bound to the filters that issued it. All three are
189
+ * optional, so a client that sends none sees exactly the listing it always had.
190
+ */
191
+ export declare const callbackEndpointListRequestSchema: import("zod").ZodObject<{
192
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
193
+ limit: import("zod").ZodDefault<import("zod").ZodNumber>;
194
+ text: import("zod").ZodOptional<import("zod").ZodString>;
195
+ status: import("zod").ZodOptional<import("zod").ZodEnum<{
196
+ active: "active";
197
+ disabled: "disabled";
198
+ }>>;
199
+ rotation: import("zod").ZodOptional<import("zod").ZodEnum<{
200
+ unacknowledged: "unacknowledged";
201
+ }>>;
202
+ }, import("zod/v4/core").$strip>;
203
+ export type CallbackEndpointListRequest = z.infer<typeof callbackEndpointListRequestSchema>;
175
204
  /** The one response that carries the per-endpoint secret. */
176
205
  export declare const callbackEndpointCreatedSchema: import("zod").ZodObject<{
177
206
  headers: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
package/dist/endpoints.js CHANGED
@@ -3,7 +3,7 @@ import { z } from "./zod.js";
3
3
  import { environmentKindSchema } from "./authority.js";
4
4
  import { evaluateCallbackUrl } from "./callback-safety.js";
5
5
  import { callbackSigningKeyIdSchema, endpointIdSchema, projectIdSchema, } from "./identifiers.js";
6
- import { pageSchema } from "./protocol.js";
6
+ import { pageRequestSchema, pageSchema } from "./protocol.js";
7
7
  import { timestampSchema } from "./time.js";
8
8
  /**
9
9
  * Reusable callback endpoints.
@@ -20,7 +20,7 @@ import { timestampSchema } from "./time.js";
20
20
  * nothing to prove.
21
21
  */
22
22
  export const CALLBACK_ENDPOINT_STATUSES = ["active", "disabled"];
23
- export const callbackEndpointStatusSchema = z.enum(CALLBACK_ENDPOINT_STATUSES);
23
+ export const callbackEndpointStatusSchema = /* @__PURE__ */ (() => z.enum(CALLBACK_ENDPOINT_STATUSES))();
24
24
  /**
25
25
  * Why an address could not be resolved or reached: the classification the
26
26
  * DNS inspection at create and update, and the delivery egress, share. It
@@ -37,7 +37,7 @@ export const CALLBACK_EGRESS_FAILURES = [
37
37
  "timed_out",
38
38
  "unexpected_status",
39
39
  ];
40
- export const callbackEgressFailureSchema = z.enum(CALLBACK_EGRESS_FAILURES);
40
+ export const callbackEgressFailureSchema = /* @__PURE__ */ (() => z.enum(CALLBACK_EGRESS_FAILURES))();
41
41
  /**
42
42
  * @deprecated The former retained endpoint count ceiling. W0-15 removes count
43
43
  * enforcement after the operator's decision; DNS/mutation admission and paged
@@ -56,7 +56,7 @@ export const CALLBACK_ADMISSION_RATE_LIMITS = {
56
56
  };
57
57
  /** Longest period during which a receiver may accept current and next keys. */
58
58
  export const CALLBACK_SIGNING_KEY_ROTATION_OVERLAP_SECONDS = 86_400;
59
- export const callbackSigningKeysSchema = z.object({
59
+ export const callbackSigningKeysSchema = /* @__PURE__ */ (() => z.object({
60
60
  current: callbackSigningKeyIdSchema,
61
61
  next: z
62
62
  .object({
@@ -66,7 +66,7 @@ export const callbackSigningKeysSchema = z.object({
66
66
  overlapEndsAt: timestampSchema,
67
67
  })
68
68
  .optional(),
69
- });
69
+ }))();
70
70
  /**
71
71
  * An endpoint's name: unique within its project and environment, compared
72
72
  * exactly (W4-14, FXO-2255).
@@ -80,16 +80,16 @@ export const callbackSigningKeysSchema = z.object({
80
80
  * "Prod receiver" and "prod receiver" are both allowed. Deliberately unlike a
81
81
  * project's name, which ignores case and spacing.
82
82
  */
83
- export const callbackEndpointNameSchema = z
83
+ export const callbackEndpointNameSchema = /* @__PURE__ */ (() => z
84
84
  .string()
85
85
  .trim()
86
86
  .min(1, "must not be blank")
87
- .max(2_048, "must be at most 2048 characters");
87
+ .max(2_048, "must be at most 2048 characters"))();
88
88
  /**
89
89
  * A metadata-only endpoint shape. The sealed signing secret has no public
90
90
  * field, so list/get/update/disable/enable cannot accidentally recover it.
91
91
  */
92
- export const callbackEndpointSchema = z.object({
92
+ export const callbackEndpointSchema = /* @__PURE__ */ (() => z.object({
93
93
  headers: z.array(publicHttpHeaderSchema).optional(),
94
94
  createdAt: timestampSchema,
95
95
  disabledAt: timestampSchema.optional(),
@@ -107,33 +107,64 @@ export const callbackEndpointSchema = z.object({
107
107
  updatedAt: timestampSchema,
108
108
  url: z.string().url(),
109
109
  version: z.number().int().positive(),
110
- });
111
- export const callbackEndpointPageSchema = pageSchema(callbackEndpointSchema);
110
+ }))();
111
+ export const callbackEndpointPageSchema = /* @__PURE__ */ (() => pageSchema(callbackEndpointSchema))();
112
+ /**
113
+ * The rotation filter's one value (W9-80, FXO-3446): endpoints carrying a next
114
+ * signing key whose server update has not been marked done.
115
+ */
116
+ export const CALLBACK_ENDPOINT_ROTATION_FILTERS = ["unacknowledged"];
117
+ /**
118
+ * An endpoints listing: the page, and optional filters that intersect before
119
+ * paging (W9-80, FXO-3446).
120
+ *
121
+ * Filters run in the listing's own statement, so the hundred-and-first
122
+ * endpoint is as findable as the first: a picker searches by `text`, the
123
+ * disabled-endpoint check asks for `status=disabled`, and the rotation
124
+ * reminder asks for `rotation=unacknowledged`, each without reading the whole
125
+ * project. A cursor is bound to the filters that issued it. All three are
126
+ * optional, so a client that sends none sees exactly the listing it always had.
127
+ */
128
+ export const callbackEndpointListRequestSchema = /* @__PURE__ */ (() => pageRequestSchema.extend({
129
+ text: z
130
+ .string()
131
+ .max(256)
132
+ .refine((value) => !value.includes("\u0000"), "must not contain NUL characters")
133
+ .optional()
134
+ .describe("Case-insensitive literal substring of the endpoint's name, address or identifier."),
135
+ status: callbackEndpointStatusSchema
136
+ .optional()
137
+ .describe("Only endpoints in this status."),
138
+ rotation: z
139
+ .enum(CALLBACK_ENDPOINT_ROTATION_FILTERS)
140
+ .optional()
141
+ .describe("unacknowledged: only endpoints with a signing-key rotation whose server update has not been marked done."),
142
+ }))();
112
143
  /** The one response that carries the per-endpoint secret. */
113
- export const callbackEndpointCreatedSchema = callbackEndpointSchema.extend({
144
+ export const callbackEndpointCreatedSchema = /* @__PURE__ */ (() => callbackEndpointSchema.extend({
114
145
  keyId: callbackSigningKeyIdSchema,
115
146
  secret: z.string().min(1),
116
147
  shownOnce: z.literal(true),
117
- });
118
- export const callbackSigningKeyRotationRequestSchema = z.object({
148
+ }))();
149
+ export const callbackSigningKeyRotationRequestSchema = /* @__PURE__ */ (() => z.object({
119
150
  overlapSeconds: z
120
151
  .number()
121
152
  .int()
122
153
  .min(0)
123
154
  .max(CALLBACK_SIGNING_KEY_ROTATION_OVERLAP_SECONDS, "must not exceed the maximum endpoint-key overlap")
124
155
  .optional(),
125
- });
126
- export const callbackEndpointRotatedSchema = z.object({
156
+ }))();
157
+ export const callbackEndpointRotatedSchema = /* @__PURE__ */ (() => z.object({
127
158
  endpoint: callbackEndpointSchema,
128
159
  keyId: callbackSigningKeyIdSchema,
129
160
  secret: z.string().min(1),
130
161
  shownOnce: z.literal(true),
131
- });
162
+ }))();
132
163
  /** One signing key and the secret behind it, as a signed-in person may see it. */
133
- export const callbackEndpointSigningSecretSchema = z.object({
164
+ export const callbackEndpointSigningSecretSchema = /* @__PURE__ */ (() => z.object({
134
165
  keyId: callbackSigningKeyIdSchema,
135
166
  secret: z.string().min(1),
136
- });
167
+ }))();
137
168
  /**
138
169
  * What `endpoints.revealSigningSecret` answers (FXO-2244).
139
170
  *
@@ -142,14 +173,14 @@ export const callbackEndpointSigningSecretSchema = z.object({
142
173
  * rotation both keys are here, with the instant the overlap ends, because a
143
174
  * receiver being moved to the new key needs both until then.
144
175
  */
145
- export const callbackEndpointSigningSecretsSchema = z.object({
176
+ export const callbackEndpointSigningSecretsSchema = /* @__PURE__ */ (() => z.object({
146
177
  current: callbackEndpointSigningSecretSchema,
147
178
  /** The endpoint these belong to, so an answer names what it is about. */
148
179
  id: endpointIdSchema,
149
180
  next: callbackEndpointSigningSecretSchema
150
181
  .extend({ overlapEndsAt: timestampSchema })
151
182
  .optional(),
152
- });
183
+ }))();
153
184
  /**
154
185
  * Where an endpoint's signing secret is, for a result that does not carry it
155
186
  * (W9-44, FXO-2907).
@@ -166,7 +197,7 @@ export const callbackEndpointSigningSecretsSchema = z.object({
166
197
  * reader deciding whether it holds a secret should be told so, not left to
167
198
  * infer it from what is missing.
168
199
  */
169
- export const signingSecretNoticeSchema = z.object({
200
+ export const signingSecretNoticeSchema = /* @__PURE__ */ (() => z.object({
170
201
  /** One sentence an agent can relay to the person it is working for. */
171
202
  guidance: z.string().min(1),
172
203
  /** Never `true`: these results do not carry the secret. */
@@ -176,7 +207,7 @@ export const signingSecretNoticeSchema = z.object({
176
207
  * reveals the secret. Absent only where this deployment has no dashboard.
177
208
  */
178
209
  revealUrl: z.string().url().optional(),
179
- });
210
+ }))();
180
211
  /**
181
212
  * The dashboard path of one endpoint's page, beneath the project and
182
213
  * environment it belongs to. The dashboard's router serves it; a test there
@@ -208,11 +239,11 @@ export function signingSecretNotice(target, dashboardOrigin) {
208
239
  * Metadata only, like every endpoint read. There is no `secret` field to fill
209
240
  * by mistake; the shape is what keeps it out of an agent's history.
210
241
  */
211
- export const callbackEndpointEnsuredSchema = callbackEndpointSchema.extend({
242
+ export const callbackEndpointEnsuredSchema = /* @__PURE__ */ (() => callbackEndpointSchema.extend({
212
243
  /** Whether this call created the endpoint, or found one already there. */
213
244
  created: z.boolean(),
214
245
  signingSecret: signingSecretNoticeSchema,
215
- });
246
+ }))();
216
247
  /**
217
248
  * A callback destination as a caller types it: HTTPS on port 443, no
218
249
  * credentials or fragment, a public name or address. The DNS half of the
@@ -233,7 +264,7 @@ export function callbackUrlSchema() {
233
264
  }
234
265
  });
235
266
  }
236
- export const callbackEndpointRequestSchema = z.object({
267
+ export const callbackEndpointRequestSchema = /* @__PURE__ */ (() => z.object({
237
268
  headers: endpointHeaderChangesSchema.optional(),
238
269
  /**
239
270
  * A name for people (W4-14, FXO-2255). Omitted on a create, the endpoint
@@ -243,4 +274,4 @@ export const callbackEndpointRequestSchema = z.object({
243
274
  */
244
275
  name: callbackEndpointNameSchema.optional(),
245
276
  url: callbackUrlSchema(),
246
- });
277
+ }))();
@@ -240,8 +240,8 @@ export declare const forecastCoverageSchema: import("zod").ZodObject<{
240
240
  lastGroup: import("zod").ZodOptional<import("zod").ZodObject<{
241
241
  start: import("zod").ZodString;
242
242
  latencyClass: import("zod").ZodEnum<{
243
- realtime: "realtime";
244
243
  bulk: "bulk";
244
+ realtime: "realtime";
245
245
  }>;
246
246
  partitionKey: import("zod").ZodString;
247
247
  }, import("zod/v4/core").$strip>>;
@@ -288,8 +288,8 @@ export declare const forecastSchema: import("zod").ZodObject<{
288
288
  lastGroup: import("zod").ZodOptional<import("zod").ZodObject<{
289
289
  start: import("zod").ZodString;
290
290
  latencyClass: import("zod").ZodEnum<{
291
- realtime: "realtime";
292
291
  bulk: "bulk";
292
+ realtime: "realtime";
293
293
  }>;
294
294
  partitionKey: import("zod").ZodString;
295
295
  }, import("zod/v4/core").$strip>>;
@@ -185,9 +185,19 @@ export declare const storedHttpRequestSchema: import("zod").ZodObject<{
185
185
  name: import("zod").ZodString;
186
186
  suppressed: import("zod").ZodLiteral<true>;
187
187
  }, import("zod/v4/core").$strict>]>>;
188
- encryptedTemplate: import("zod").ZodOptional<import("zod").ZodObject<{
188
+ encryptedTemplate: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
189
189
  keyId: import("zod").ZodLiteral<"v1">;
190
190
  nonce: import("zod").ZodString;
191
191
  ciphertext: import("zod").ZodString;
192
- }, import("zod/v4/core").$strict>>;
192
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
193
+ keyId: import("zod").ZodLiteral<"v1">;
194
+ nonce: import("zod").ZodString;
195
+ ciphertext: import("zod").ZodString;
196
+ version: import("zod").ZodLiteral<2>;
197
+ codec: import("zod").ZodEnum<{
198
+ identity: "identity";
199
+ gzip: "gzip";
200
+ }>;
201
+ originalBytes: import("zod").ZodNumber;
202
+ }, import("zod/v4/core").$strict>]>>;
193
203
  }, import("zod/v4/core").$strict>;
@@ -1,3 +1,4 @@
1
+ import { MAX_INLINE_PAYLOAD_BYTES } from "./configuration-bounds.js";
1
2
  import { z } from "./zod.js";
2
3
  export const HTTP_HEADER_BOUNDS = {
3
4
  count: 32,
@@ -31,7 +32,7 @@ export function reservedHttpHeaderReason(name) {
31
32
  return "reserved for transport";
32
33
  return undefined;
33
34
  }
34
- export const httpHeaderNameSchema = z
35
+ export const httpHeaderNameSchema = /* @__PURE__ */ (() => z
35
36
  .string()
36
37
  .min(1)
37
38
  .superRefine((name, ctx) => {
@@ -48,8 +49,8 @@ export const httpHeaderNameSchema = z
48
49
  const reason = reservedHttpHeaderReason(name);
49
50
  if (reason !== undefined)
50
51
  ctx.addIssue({ code: "custom", message: `${name}: ${reason}` });
51
- });
52
- export const httpHeaderValueSchema = z.string().superRefine((value, ctx) => {
52
+ }))();
53
+ export const httpHeaderValueSchema = /* @__PURE__ */ (() => z.string().superRefine((value, ctx) => {
53
54
  if (Array.from(value).some((character) => {
54
55
  const point = character.codePointAt(0);
55
56
  return point < 32 || (point >= 127 && point <= 159) || point > 255;
@@ -64,8 +65,8 @@ export const httpHeaderValueSchema = z.string().superRefine((value, ctx) => {
64
65
  code: "custom",
65
66
  message: "header value exceeds 8192 bytes",
66
67
  });
67
- });
68
- export const headerChangeSchema = z.discriminatedUnion("action", [
68
+ }))();
69
+ export const headerChangeSchema = /* @__PURE__ */ (() => z.discriminatedUnion("action", [
69
70
  z
70
71
  .object({
71
72
  action: z.literal("set"),
@@ -74,15 +75,17 @@ export const headerChangeSchema = z.discriminatedUnion("action", [
74
75
  secret: z.boolean().optional(),
75
76
  })
76
77
  .strict(),
77
- z.object({ action: z.literal("keep"), name: httpHeaderNameSchema }).strict(),
78
+ z
79
+ .object({ action: z.literal("keep"), name: httpHeaderNameSchema })
80
+ .strict(),
78
81
  z
79
82
  .object({ action: z.literal("remove"), name: httpHeaderNameSchema })
80
83
  .strict(),
81
84
  z
82
85
  .object({ action: z.literal("suppress"), name: httpHeaderNameSchema })
83
86
  .strict(),
84
- ]);
85
- export const headerChangesSchema = z
87
+ ]))();
88
+ export const headerChangesSchema = /* @__PURE__ */ (() => z
86
89
  .array(headerChangeSchema)
87
90
  .max(HTTP_HEADER_BOUNDS.count * 2)
88
91
  .superRefine((rows, ctx) => {
@@ -113,8 +116,8 @@ export const headerChangesSchema = z
113
116
  code: "custom",
114
117
  message: "headers exceed 16384 total bytes",
115
118
  });
116
- });
117
- export const endpointHeaderChangesSchema = headerChangesSchema.superRefine((rows, ctx) => {
119
+ }))();
120
+ export const endpointHeaderChangesSchema = /* @__PURE__ */ (() => headerChangesSchema.superRefine((rows, ctx) => {
118
121
  rows.forEach((row, index) => {
119
122
  if (row.action === "suppress")
120
123
  ctx.addIssue({
@@ -123,8 +126,8 @@ export const endpointHeaderChangesSchema = headerChangesSchema.superRefine((rows
123
126
  message: "only a schedule can suppress an inherited header",
124
127
  });
125
128
  });
126
- });
127
- export const publicHttpHeaderSchema = z.union([
129
+ }))();
130
+ export const publicHttpHeaderSchema = /* @__PURE__ */ (() => z.union([
128
131
  z
129
132
  .object({
130
133
  name: httpHeaderNameSchema,
@@ -144,8 +147,8 @@ export const publicHttpHeaderSchema = z.union([
144
147
  z
145
148
  .object({ name: httpHeaderNameSchema, suppressed: z.literal(true) })
146
149
  .strict(),
147
- ]);
148
- export const httpRequestSchema = z
150
+ ]))();
151
+ export const httpRequestSchema = /* @__PURE__ */ (() => z
149
152
  .object({
150
153
  method: z.enum(HTTP_METHODS).optional(),
151
154
  body: z
@@ -164,8 +167,8 @@ export const httpRequestSchema = z
164
167
  path: ["body"],
165
168
  message: "GET must be bodyless; omit body",
166
169
  });
167
- });
168
- export const publicHttpRequestSchema = z
170
+ }))();
171
+ export const publicHttpRequestSchema = /* @__PURE__ */ (() => z
169
172
  .object({
170
173
  method: z.enum(HTTP_METHODS),
171
174
  body: z.discriminatedUnion("mode", [
@@ -177,9 +180,9 @@ export const publicHttpRequestSchema = z
177
180
  ]),
178
181
  headers: z.array(publicHttpHeaderSchema),
179
182
  })
180
- .strict();
183
+ .strict())();
181
184
  /** Internal portability schema: ciphertext remains sealed across backend exports. */
182
- const sealedHttpValueSchema = z
185
+ const sealedHttpValueSchema = /* @__PURE__ */ (() => z
183
186
  .object({
184
187
  keyId: z.literal("v1"),
185
188
  nonce: z.string().regex(/^[A-Za-z0-9_-]{16}$/u),
@@ -189,7 +192,7 @@ const sealedHttpValueSchema = z
189
192
  .max(100000)
190
193
  .regex(/^[A-Za-z0-9_-]+$/u),
191
194
  })
192
- .strict();
195
+ .strict())();
193
196
  function decodedCipherBytes(value) {
194
197
  try {
195
198
  const padding = "=".repeat((4 - (value.length % 4)) % 4);
@@ -204,7 +207,36 @@ function decodedCipherBytes(value) {
204
207
  return undefined;
205
208
  }
206
209
  }
207
- export const storedHttpHeaderSchema = z
210
+ // HTTP templates carry payload bodies and can use the authenticated codec
211
+ // envelope. Secret-header envelopes keep their existing identity-only format.
212
+ const sealedHttpTemplateSchema = /* @__PURE__ */ (() => z
213
+ .union([
214
+ sealedHttpValueSchema,
215
+ sealedHttpValueSchema.extend({
216
+ version: z.literal(2),
217
+ codec: z.enum(["identity", "gzip"]),
218
+ originalBytes: z
219
+ .number()
220
+ .int()
221
+ .nonnegative()
222
+ .max(MAX_INLINE_PAYLOAD_BYTES),
223
+ }),
224
+ ])
225
+ .superRefine((envelope, ctx) => {
226
+ if (!("version" in envelope))
227
+ return;
228
+ const bytes = decodedCipherBytes(envelope.ciphertext);
229
+ if (bytes === undefined ||
230
+ bytes < 16 ||
231
+ bytes > envelope.originalBytes + 16 ||
232
+ (envelope.codec === "identity" && bytes !== envelope.originalBytes + 16))
233
+ ctx.addIssue({
234
+ code: "custom",
235
+ path: ["ciphertext"],
236
+ message: "template ciphertext must match authenticated codec and size",
237
+ });
238
+ }))();
239
+ export const storedHttpHeaderSchema = /* @__PURE__ */ (() => z
208
240
  .union([
209
241
  z
210
242
  .object({
@@ -253,13 +285,13 @@ export const storedHttpHeaderSchema = z
253
285
  path: ["valueBytes"],
254
286
  message: "header byte count must match value",
255
287
  });
256
- });
257
- export const storedHttpRequestSchema = z
288
+ }))();
289
+ export const storedHttpRequestSchema = /* @__PURE__ */ (() => z
258
290
  .object({
259
291
  method: z.enum(HTTP_METHODS),
260
292
  bodyMode: z.enum(["envelope", "json", "none"]),
261
293
  headers: z.array(storedHttpHeaderSchema).max(HTTP_HEADER_BOUNDS.count),
262
- encryptedTemplate: sealedHttpValueSchema.optional(),
294
+ encryptedTemplate: sealedHttpTemplateSchema.optional(),
263
295
  })
264
296
  .strict()
265
297
  .superRefine((http, ctx) => {
@@ -302,4 +334,4 @@ export const storedHttpRequestSchema = z
302
334
  path: ["headers"],
303
335
  message: "stored headers exceed 16384 total bytes",
304
336
  });
305
- });
337
+ }))();
@@ -65,31 +65,31 @@ export function idPattern(resource) {
65
65
  return new RegExp(`^${ID_PREFIXES[resource]}_${SUFFIX}$`, "u");
66
66
  }
67
67
  /** Any well-formed public identifier, whatever it names. */
68
- export const ANY_ID_PATTERN = new RegExp(`^(?:${Object.values(ID_PREFIXES).join("|")})_${SUFFIX}$`, "u");
68
+ export const ANY_ID_PATTERN = /* @__PURE__ */ (() => new RegExp(`^(?:${Object.values(ID_PREFIXES).join("|")})_${SUFFIX}$`, "u"))();
69
69
  export function idSchema(resource) {
70
70
  return z
71
71
  .string()
72
72
  .regex(idPattern(resource), `must be a ${resource} identifier: "${ID_PREFIXES[resource]}_" followed by 26 Crockford base32 characters`);
73
73
  }
74
- export const apiCredentialIdSchema = idSchema("apiCredential");
75
- export const apiCredentialEventIdSchema = idSchema("apiCredentialEvent");
76
- export const authorizationRequestIdSchema = idSchema("authorizationRequest");
77
- export const callbackSigningKeyIdSchema = idSchema("callbackSigningKey");
78
- export const oauthClientIdSchema = idSchema("oauthClient");
79
- export const oauthGrantIdSchema = idSchema("oauthGrant");
80
- export const oauthGrantEventIdSchema = idSchema("oauthGrantEvent");
81
- export const scheduleIdSchema = idSchema("schedule");
82
- export const occurrenceIdSchema = idSchema("occurrence");
83
- export const bulkJobIdSchema = idSchema("bulkJob");
84
- export const attemptIdSchema = idSchema("attempt");
85
- export const deliveryIdSchema = idSchema("delivery");
86
- export const endpointIdSchema = idSchema("endpoint");
87
- export const organizationIdSchema = idSchema("organization");
88
- export const projectIdSchema = idSchema("project");
89
- export const environmentIdSchema = idSchema("environment");
90
- export const eventIdSchema = idSchema("event");
91
- export const testSinkIdSchema = idSchema("testSink");
92
- export const testSinkDeliveryIdSchema = idSchema("testSinkDelivery");
74
+ export const apiCredentialIdSchema = /* @__PURE__ */ (() => idSchema("apiCredential"))();
75
+ export const apiCredentialEventIdSchema = /* @__PURE__ */ (() => idSchema("apiCredentialEvent"))();
76
+ export const authorizationRequestIdSchema = /* @__PURE__ */ (() => idSchema("authorizationRequest"))();
77
+ export const callbackSigningKeyIdSchema = /* @__PURE__ */ (() => idSchema("callbackSigningKey"))();
78
+ export const oauthClientIdSchema = /* @__PURE__ */ (() => idSchema("oauthClient"))();
79
+ export const oauthGrantIdSchema = /* @__PURE__ */ (() => idSchema("oauthGrant"))();
80
+ export const oauthGrantEventIdSchema = /* @__PURE__ */ (() => idSchema("oauthGrantEvent"))();
81
+ export const scheduleIdSchema = /* @__PURE__ */ (() => idSchema("schedule"))();
82
+ export const occurrenceIdSchema = /* @__PURE__ */ (() => idSchema("occurrence"))();
83
+ export const bulkJobIdSchema = /* @__PURE__ */ (() => idSchema("bulkJob"))();
84
+ export const attemptIdSchema = /* @__PURE__ */ (() => idSchema("attempt"))();
85
+ export const deliveryIdSchema = /* @__PURE__ */ (() => idSchema("delivery"))();
86
+ export const endpointIdSchema = /* @__PURE__ */ (() => idSchema("endpoint"))();
87
+ export const organizationIdSchema = /* @__PURE__ */ (() => idSchema("organization"))();
88
+ export const projectIdSchema = /* @__PURE__ */ (() => idSchema("project"))();
89
+ export const environmentIdSchema = /* @__PURE__ */ (() => idSchema("environment"))();
90
+ export const eventIdSchema = /* @__PURE__ */ (() => idSchema("event"))();
91
+ export const testSinkIdSchema = /* @__PURE__ */ (() => idSchema("testSink"))();
92
+ export const testSinkDeliveryIdSchema = /* @__PURE__ */ (() => idSchema("testSinkDelivery"))();
93
93
  /**
94
94
  * The alphabet the pattern above accepts, in order.
95
95
  *
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { ANY_ID_PATTERN, ID_ALPHABET, ID_PREFIXES, apiCredentialEventIdSchema, a
4
4
  export { durationSecondsSchema, timeZoneSchema, timestampSchema, toTimestamp, type DurationSeconds, type TimeZone, type Timestamp, } from "./time.js";
5
5
  export { ENVIRONMENT_KINDS_IN_ORDER, PRINCIPAL_KINDS, SCOPES, SESSION_AUTHORITY_HEADERS, authoritySchema, credentialContextSchema, decideAccess, decideEnvironmentIntent, effectiveScopes, problemCodeForRefusal, environmentKindSchema, principalKindSchema, principalSchema, scopeSchema, type AccessDecision, type AccessRefusal, type AccessRequest, type Authority, type CredentialContext, type EnvironmentIntentDecision, type EnvironmentKind, type Principal, type PrincipalKind, type Scope, } from "./authority.js";
6
6
  export { PROBLEM_CATEGORIES, PROBLEM_CODES, fieldErrorSchema, isRetryable, problem, problemCategorySchema, problemCodeSchema, problemSchema, type FieldError, type Problem, type ProblemCategory, type ProblemCode, type ProblemOptions, } from "./problems.js";
7
- export { CONCURRENCY_HEADERS, PAGE_SIZE, canonicalRequest, classifyIdempotency, conditionalRequestHeaderSchema, decodeCursor, encodeCursor, etagSchema, freshnessSchema, projectedFreshnessSchema, requiredConditionalRequestHeaderSchema, fromETag, idempotencyKeySchema, idempotencyReplayResponseHeaderSchema, idempotencyRequestHeaderSchema, idempotencyReceiptSchema, idempotencyScopeSchema, HISTORY_ORDERS, historyPageRequestSchema, pageRequestSchema, scheduleListRequestSchema, parseHistoryPageRequest, pageSchema, parsePageRequest, parseScheduleListRequest, replayedResponseHeaderSchema, requiredIdempotencyRequestHeaderSchema, requestFingerprint, toETag, versionResponseHeaderSchema, versionSchema, type Freshness, type CursorBinding, type ProjectedFreshness, type IdempotencyKey, type IdempotencyOutcome, type IdempotencyReceipt, type IdempotencyScope, type PagePosition, type PageRequest, SCHEDULE_ORDERS, type ScheduleListRequest, type ScheduleListRequestParse, type ScheduleOrder, type HistoryOrder, type HistoryPageRequest, type HistoryPageRequestParse, type PageRequestParse, type Version, } from "./protocol.js";
7
+ export { CONCURRENCY_HEADERS, PAGE_SIZE, canonicalRequest, classifyIdempotency, conditionalRequestHeaderSchema, decodeCursor, encodeCursor, etagSchema, freshnessSchema, projectedFreshnessSchema, requiredConditionalRequestHeaderSchema, fromETag, idempotencyKeySchema, idempotencyReplayResponseHeaderSchema, idempotencyRequestHeaderSchema, idempotencyReceiptSchema, idempotencyScopeSchema, HISTORY_ORDERS, historyPageRequestSchema, pageRequestSchema, scheduleListRequestSchema, parseHistoryPageRequest, pageSchema, parsePageRequest, parseScheduleListRequest, parseListingRequest, replayedResponseHeaderSchema, requiredIdempotencyRequestHeaderSchema, requestFingerprint, toETag, versionResponseHeaderSchema, versionSchema, type Freshness, type CursorBinding, type ProjectedFreshness, type IdempotencyKey, type IdempotencyOutcome, type IdempotencyReceipt, type IdempotencyScope, type PagePosition, type PageRequest, SCHEDULE_ORDERS, SCHEDULE_DIRECTIONS, type ScheduleDirection, type ScheduleListRequest, type ScheduleListRequestParse, type ScheduleOrder, type HistoryOrder, type HistoryPageRequest, type HistoryPageRequestParse, type PageRequestParse, type Version, } from "./protocol.js";
8
8
  export { CALLBACK_CONTENT_TYPE, CALLBACK_DELIVERY_PROTOCOL, CALLBACK_DELIVERY_PROTOCOL_VERSION, CALLBACK_ENVELOPE_VERSION, CALLBACK_ENVELOPE_VERSION_2026_07_01, CALLBACK_ENVELOPE_VERSION_2026_08_08, CALLBACK_ENVELOPE_VERSION_CHANGE, CALLBACK_ENVELOPE_VERSIONS, CALLBACK_HEADERS, SIGNATURE_SCHEME, SIGNATURE_TOLERANCE_SECONDS, callbackDeferredCompletionSchema, callbackDeliveryTestVectors, callbackEnvelopeSchema, callbackEnvelopeTrigger, callbackHeadersSchema, callbackRun, callbackTriggerSchema, classifyOutcome, classifyStatus, formatSignature, extractCanonicalEnvelopeIds, isTimestampFresh, signatureHeaderSchema, serializeCallbackEnvelope, signingInput, trySigningInput, type AttemptOutcome, type CallbackDeferredCompletion, type CallbackDeliveryTestVector, type CallbackEnvelope, type CallbackRun, type CallbackTrigger, type ResponseClass, } from "./signatures.js";
9
9
  export { CREDENTIAL_PREFIX_LENGTH, CREDENTIAL_PREFIX_PATTERN, CREDENTIAL_ROTATION_OVERLAP_SECONDS, CREDENTIAL_SECRET_LENGTH, CREDENTIAL_SECRET_PATTERN, NEVER_REDACTED, REDACTED_FIELDS_EXACT, REDACTED_FIELD_FRAGMENTS, credentialCreatedSchema, credentialMetadataSchema, credentialPageSchema, credentialRequestSchema, credentialRevokedSchema, credentialRotatedSchema, credentialRotationRequestSchema, redact, type CredentialCreated, type CredentialMetadata, type CredentialPage, type CredentialRequest, type CredentialRevokedResponse, type CredentialRotated, type CredentialRotationRequest, } from "./secrets.js";
10
10
  export { MAX_PARTITION_SHARDS, PROJECTION_DRAIN_LIMIT, SINGLE_SHARD, partitionInstanceName, partitionShardCount, partitionShardFor, partitionShardForIdempotencyKey, type CreateScheduleCommand, type CreateScheduleOutcome, type AttemptPagePosition, type DrainProjectionsOutcome, type DrainProjectionsQuery, type ForecastOutcome, type ForecastPartitionBucket, type ForecastQuery, type IdempotencyDisposition, type ListSchedulesOutcome, type ListSchedulesQuery, type ListAttemptsOutcome, type ListAttemptsQuery, type ListOccurrencesOutcome, type ListOccurrencesQuery, type OccurrencePagePosition, type PartitionOutcome, type PartitionRefusal, type PartitionRefused, type PartitionRpc, type ProjectionIntent, type ReadScheduleQuery, type ReadAttemptOutcome, type ReadAttemptQuery, type ReadOccurrenceOutcome, type ReadOccurrenceQuery, type RedeliverOccurrenceCommand, type RedeliverOccurrenceOutcome, type ReplaceScheduleCommand, type RetainedProjections, type ScheduleDefinition, type ScheduleWriteCommand, type ScheduleWriteOutcome, type SettleProjectionsCommand, type SettleProjectionsOutcome, } from "./partition.js";
@@ -13,30 +13,31 @@ export { MEMBERSHIP_ROLES, MEMBERSHIP_STATUSES, externalMembershipIdSchema, exte
13
13
  export { CHANGE_KINDS, CHANGE_OPERATIONS, CHANGE_SUBJECTS, CONTRACT_VERSION, assess, changeKindSchema, classifyChange, contractVersionSchema, type ChangeKind, type ChangeOperation, type ChangeSubject, type CompatibilityVerdict, type ContractChange, } from "./compatibility.js";
14
14
  export { WORKSPACE_LAYERS, scaffoldProblemSchema, scaffoldVersionSchema, toolDescriptorSchema, toolListSchema, workspaceIdentitySchema, workspaceLayerSchema, workspaceScaffoldSchema, type ScaffoldProblem, type ScaffoldVersion, type ToolDescriptor, type ToolList, type WorkspaceIdentity, type WorkspaceLayer, type WorkspaceScaffold, } from "./workspace.js";
15
15
  export { MOCK_BEHAVIORS, MOCK_HEADERS, OPERATIONS, UNIVERSAL_PROBLEMS, AUTHENTICATED_PROBLEMS, SCOPED_PROBLEMS, findOperation, fixtureListSchema, mockBehaviorSchema, mockScenarioRequestSchema, mockScenarioResponseSchema, operationsFor, problemsFor, requestSchemaFor, responseSchemaFor, successStatusFor, type FixtureList, type McpDisposition, type MockBehavior, type MockScenarioRequest, type MockScenarioResponse, type OperationDefinition, type OperationId, type OperationRequestBody, type OperationSurface, } from "./operations.js";
16
- export { PROJECT_LIST_LIMIT, PROJECT_STATUSES, environmentSchema, organizationSchema, projectCreateRequestSchema, projectArchiveRequestSchema, projectDeletedSchema, projectDeletionCountsSchema, projectListSchema, projectNameKey, projectNameSchema, projectSchema, projectStatusSchema, projectSummarySchema, projectUpdateRequestSchema, provisionedProjectSchema, type Environment, type Organization, type Project, type ProjectCreateRequest, type ProjectArchiveRequest, type ProjectDeleted, type ProjectDeletionCounts, type ProjectList, type ProjectStatus, type ProjectSummary, type ProjectUpdateRequest, type ProvisionedProject, } from "./tenancy.js";
17
- export { ATTEMPT_DURATION_MAX_MS, ATTEMPT_FAILURE_SNIPPET_MAX_LENGTH, ATTEMPT_REMEDIATIONS, ATTEMPT_RESPONSE_HEADER_MAX_LENGTH, ATTEMPT_STATES, CRON_EXPRESSION_MAX_LENGTH, LATENCY_CLASSES, OCCURRENCE_STATES, PARTITION_KEY_MAX_LENGTH, RECURRENCE_REQUEST_FIELDS, SCHEDULE_STATUSES, SCHEDULING_BOUNDS, TERMINAL_OCCURRENCE_STATES, TERMINAL_SCHEDULE_STATUSES, attemptFailureSnippetSchema, attemptResponseHeaderSchema, attemptSchema, attemptResponseSchema, attemptRequestSchema, type AttemptResponse, type AttemptRequest, attemptDiagnosticSchema, attemptPageSchema, attemptRemediationSchema, attemptStateForResponse, attemptStateSchema, attemptTriggerSchema, attemptViewSchema, cronExpressionSchema, DELIVERY_COMPLETION_MODES, DELIVERY_DURATION_TIERS, MAX_DELIVERY_DURATION_SECONDS, RESPONSE_DELIVERY_MAX_DURATION_SECONDS, DELIVERY_OVERLAP_POLICIES, DEFAULT_DELIVERY_DURATION_SECONDS, DEFAULT_DELIVERY_OVERLAP_POLICY, FREE_DELIVERY_DURATION_SECONDS, DEFAULT_ONE_SHOT_MAX_STALENESS_SECONDS, LATENESS_POLICIES, isLongRunningDuration, deliveryCompletionModeSchema, deliveryDurationSecondsSchema, deliveryOverlapPolicySchema, type DeliveryCompletionMode, type DeliveryOverlapPolicy, deriveDeliverySettings, deriveLatencyClass, deriveLatenessSettings, defaultLatenessPolicyForRecurrence, generationSchema, isTerminalOccurrenceState, isTerminalScheduleStatus, latencyClassSchema, latenessPolicySchema, occurrenceSchema, occurrencePageSchema, parseProjectOccurrenceListRequest, projectOccurrenceCursorBinding, projectOccurrenceListRequestSchema, projectOccurrencePageSchema, occurrenceStateSchema, occurrenceViewSchema, partitionKeySchema, remediationForAttempt, recurrenceSchema, DEFAULT_AUTO_PAUSE_AFTER_FAILURES, autoPauseAfterFailuresSchema, autoPauseReasonSchema, type AutoPauseAfterFailures, type AutoPauseReason, scheduleNameSchema, scheduleLatenessRequestSchema, scheduleLatenessSchema, schedulePageSchema, scheduleRequestSchema, scheduleSchema, scheduleStatusSchema, scheduleViewSchema, scheduleWrittenViewSchema, type Attempt, type AttemptFailureSnippet, type AttemptResponseHeader, type AttemptDiagnostic, type AttemptPage, type AttemptRemediation, type AttemptState, type AttemptTrigger, type AttemptView, type CronExpression, type Generation, type DeliverySettings, type LatencyClass, type LatenessPolicy, type LatenessSettings, type Occurrence, type OccurrencePage, type ProjectOccurrenceListRequest, type ProjectOccurrenceListRequestParse, type ProjectOccurrencePage, type OccurrenceState, type OccurrenceView, type PartitionKey, type Recurrence, type Schedule, type ScheduleLatenessRequest, type SchedulePage, type ScheduleRequest, type ScheduleStatus, type ScheduleView, type ScheduleWrittenView, } from "./scheduling.js";
16
+ export { PROJECT_LIST_LIMIT, PROJECT_STATUSES, environmentSchema, organizationSchema, projectCreateRequestSchema, projectArchiveRequestSchema, projectDeletedSchema, projectDeletionCountsSchema, projectListItemSchema, projectListSchema, projectNameKey, projectNameSchema, projectSchema, projectStatusSchema, projectSummarySchema, projectUpdateRequestSchema, provisionedProjectSchema, type Environment, type Organization, type Project, type ProjectCreateRequest, type ProjectArchiveRequest, type ProjectDeleted, type ProjectDeletionCounts, type ProjectList, type ProjectListItem, type ProjectStatus, type ProjectSummary, type ProjectUpdateRequest, type ProvisionedProject, } from "./tenancy.js";
17
+ export { ATTEMPT_DURATION_MAX_MS, ATTEMPT_FAILURE_SNIPPET_MAX_LENGTH, ATTEMPT_REMEDIATIONS, ATTEMPT_RESPONSE_HEADER_MAX_LENGTH, ATTEMPT_STATES, CRON_EXPRESSION_MAX_LENGTH, LATENCY_CLASSES, OCCURRENCE_STATES, PARTITION_KEY_MAX_LENGTH, RECURRENCE_REQUEST_FIELDS, SCHEDULE_STATUSES, SCHEDULING_BOUNDS, TERMINAL_OCCURRENCE_STATES, TERMINAL_SCHEDULE_STATUSES, attemptFailureSnippetSchema, attemptResponseHeaderSchema, attemptSchema, attemptResponseSchema, attemptRequestSchema, type AttemptResponse, type AttemptRequest, attemptDiagnosticSchema, attemptPageSchema, attemptRemediationSchema, attemptStateForResponse, attemptStateSchema, attemptTriggerSchema, attemptViewSchema, cronExpressionSchema, DELIVERY_COMPLETION_MODES, DELIVERY_DURATION_TIERS, MAX_DELIVERY_DURATION_SECONDS, RESPONSE_DELIVERY_MAX_DURATION_SECONDS, DELIVERY_OVERLAP_POLICIES, DEFAULT_DELIVERY_DURATION_SECONDS, DEFAULT_DELIVERY_OVERLAP_POLICY, FREE_DELIVERY_DURATION_SECONDS, DEFAULT_ONE_SHOT_MAX_STALENESS_SECONDS, LATENESS_POLICIES, isLongRunningDuration, deliveryCompletionModeSchema, deliveryDurationSecondsSchema, deliveryOverlapPolicySchema, type DeliveryCompletionMode, type DeliveryOverlapPolicy, deriveDeliverySettings, deriveLatencyClass, deriveLatenessSettings, fingerprintedScheduleRequest, defaultLatenessPolicyForRecurrence, generationSchema, isTerminalOccurrenceState, isTerminalScheduleStatus, latencyClassSchema, requestedLatencyClassSchema, latenessPolicySchema, occurrenceSchema, occurrencePageSchema, parseProjectOccurrenceListRequest, projectOccurrenceCursorBinding, projectOccurrenceListRequestSchema, projectOccurrencePageSchema, occurrenceStateSchema, occurrenceViewSchema, partitionKeySchema, remediationForAttempt, recurrenceSchema, DEFAULT_AUTO_PAUSE_AFTER_FAILURES, autoPauseAfterFailuresSchema, autoPauseReasonSchema, type AutoPauseAfterFailures, type AutoPauseReason, scheduleNameSchema, scheduleLatenessRequestSchema, scheduleLatenessSchema, schedulePageSchema, SCHEDULE_SUMMARY_DAYS, SCHEDULE_SUMMARY_MAX_AGE_SECONDS, SCHEDULE_SUMMARY_PAUSED_SAMPLE, scheduleSummaryRequestSchema, scheduleSummarySchema, type ScheduleSummary, type ScheduleSummaryRequest, scheduleRequestSchema, scheduleSchema, scheduleStatusSchema, scheduleViewSchema, scheduleWrittenViewSchema, type Attempt, type AttemptFailureSnippet, type AttemptResponseHeader, type AttemptDiagnostic, type AttemptPage, type AttemptRemediation, type AttemptState, type AttemptTrigger, type AttemptView, type CronExpression, type Generation, type DeliverySettings, type LatencyClass, type LatenessPolicy, type LatenessSettings, type Occurrence, type OccurrencePage, type ProjectOccurrenceListRequest, type ProjectOccurrenceListRequestParse, type ProjectOccurrencePage, type OccurrenceState, type OccurrenceView, type PartitionKey, type Recurrence, type Schedule, type ScheduleLatenessRequest, type SchedulePage, type ScheduleRequest, type ScheduleStatus, type ScheduleView, type ScheduleWrittenView, } from "./scheduling.js";
18
18
  export { portableAttemptRecordSchema, portableEncryptedPayloadRecordSchema, portableOccurrenceRecordSchema, portableReceiptRecordSchema, portableScheduleRecordSchema, portableSchedulingRecordSetSchema, type PortableAttemptRecord, type PortableEncryptedPayloadRecord, type PortableOccurrenceRecord, type PortableReceiptRecord, type PortableScheduleRecord, type PortableSchedulingRecordSet, } from "./scheduling-records.js";
19
19
  export { ROLE_SCOPE_CEILINGS, capScopesToRole, ceilingForRole, credentialScopes, grantableScopes, policyMatrix, roleAllows, roleCanPerform, type PolicyMatrixRow, } from "./policy.js";
20
20
  export { ACCESS_TOKEN_PATTERN, ACCESS_TOKEN_TTL_SECONDS, AUTHORIZATION_CODE_PATTERN, AUTHORIZATION_CODE_TTL_SECONDS, AUTHORIZATION_REQUEST_TTL_SECONDS, MAX_REDIRECT_URIS, OAUTH_ERRORS, OAUTH_ERROR_STATUS, OAUTH_GRANT_STATUSES, OAUTH_GRANT_TYPES, OAUTH_RESPONSE_TYPES, OAUTH_REVOCATION_REASONS, OAUTH_ROUTES, OAUTH_SECRET_PATTERN, OAUTH_TOKEN_NAMESPACE_LENGTH, OAUTH_TOKEN_SECRET_LENGTH, PKCE_CHALLENGE_PATTERN, PKCE_METHODS, PKCE_VERIFIER_PATTERN, REFRESH_TOKEN_PATTERN, REFRESH_TOKEN_TTL_SECONDS, TOKEN_ENDPOINT_AUTH_METHODS, authorizationParametersSchema, authorizationServerMetadataSchema, bearerChallenge, clientRegistrationRequestSchema, clientRegistrationSchema, consentDecisionSchema, consentOutcomeSchema, consentPromptSchema, formatScopeString, isLoopbackRedirect, oauthError, oauthErrorCodeSchema, oauthErrorSchema, oauthGrantListSchema, oauthGrantRevokedSchema, oauthGrantSchema, oauthGrantStatusSchema, oauthGrantTypeSchema, oauthRevocationReasonSchema, parseScopeString, pkceMethodSchema, protectedResourceMetadataSchema, redirectUriSchema, revocationRequestSchema, tokenRequestSchema, tokenResponseSchema, type AuthorizationParameters, type AuthorizationServerMetadata, type ClientRegistration, type ClientRegistrationRequest, type ConsentDecision, type ConsentOutcome, type ConsentPrompt, type OAuthErrorBody, type OAuthErrorCode, type OAuthGrant, type OAuthGrantList, type OAuthGrantRevoked, type OAuthGrantStatus, type OAuthGrantType, type OAuthRevocationReason, type ProtectedResourceMetadata, type RevocationRequest, type TokenRequest, type TokenResponse, } from "./oauth.js";
21
21
  export { CALLBACK_ENVELOPE_HEADROOM_BYTES, CALLBACK_RECEIVER_MAX_BODY_BYTES, } from "./callback-receiver.js";
22
22
  export { CALLBACK_ENDPOINT_SECRET_PATTERN, CALLBACK_URL_REJECTION_REASONS, evaluateCallbackUrl, isPublicCallbackAddress, type CallbackUrlRejectionReason, } from "./callback-safety.js";
23
- export { CALLBACK_ENDPOINT_LIMIT_PER_ENVIRONMENT, CALLBACK_ENDPOINT_STATUSES, CALLBACK_SIGNING_KEY_ROTATION_OVERLAP_SECONDS, CALLBACK_EGRESS_FAILURES, CALLBACK_ADMISSION_RATE_LIMITS, callbackEndpointCreatedSchema, callbackEndpointEnsuredSchema, callbackEndpointNameSchema, callbackEndpointPageSchema, callbackEndpointRequestSchema, callbackEndpointRotatedSchema, callbackEndpointSchema, callbackEndpointSigningSecretsSchema, callbackEndpointStatusSchema, callbackSigningKeyRotationRequestSchema, callbackSigningKeysSchema, callbackEgressFailureSchema, callbackUrlSchema, endpointDashboardPath, signingSecretNotice, signingSecretNoticeSchema, type CallbackEndpoint, type CallbackEndpointCreated, type CallbackEndpointEnsured, type SigningSecretNotice, type CallbackEndpointPage, type CallbackEndpointRequest, type CallbackEndpointRotated, type CallbackEndpointSigningSecrets, type CallbackEndpointStatus, type CallbackSigningKeyRotationRequest, type CallbackSigningKeys, type CallbackEgressFailure, } from "./endpoints.js";
23
+ export { CALLBACK_ENDPOINT_LIMIT_PER_ENVIRONMENT, CALLBACK_ENDPOINT_STATUSES, CALLBACK_SIGNING_KEY_ROTATION_OVERLAP_SECONDS, CALLBACK_EGRESS_FAILURES, CALLBACK_ADMISSION_RATE_LIMITS, callbackEndpointCreatedSchema, callbackEndpointEnsuredSchema, callbackEndpointNameSchema, callbackEndpointPageSchema, CALLBACK_ENDPOINT_ROTATION_FILTERS, callbackEndpointListRequestSchema, type CallbackEndpointListRequest, callbackEndpointRequestSchema, callbackEndpointRotatedSchema, callbackEndpointSchema, callbackEndpointSigningSecretsSchema, callbackEndpointStatusSchema, callbackSigningKeyRotationRequestSchema, callbackSigningKeysSchema, callbackEgressFailureSchema, callbackUrlSchema, endpointDashboardPath, signingSecretNotice, signingSecretNoticeSchema, type CallbackEndpoint, type CallbackEndpointCreated, type CallbackEndpointEnsured, type SigningSecretNotice, type CallbackEndpointPage, type CallbackEndpointRequest, type CallbackEndpointRotated, type CallbackEndpointSigningSecrets, type CallbackEndpointStatus, type CallbackSigningKeyRotationRequest, type CallbackSigningKeys, type CallbackEgressFailure, } from "./endpoints.js";
24
24
  export { compactInterval, cronWords, generatedEndpointName, generatedScheduleName, periodWords, targetDomain, } from "./naming.js";
25
25
  export { FORECAST_BOUNDS, FORECAST_PARTIAL_ACCEPT_HEADER, forecastRequestHeadersSchema, forecastCoverageSchema, type ForecastCoverage, FORECAST_BREAKDOWNS, FORECAST_COMPATIBILITY, FORECAST_RULES, FORECAST_WINDOW_VERSION, decideForecastAnswer, forecastBreakdownSchema, forecastBucketSchema, forecastBucketStartMs, forecastLatencyCountsSchema, forecastRequestSchema, forecastSchema, forecastViolations, forecastWindowBucketSchema, forecastWindowViolations, forecastWindowsSchema, mergeForecastBuckets, parseForecastRequest, resolveForecastWindow, topPartitionKeys, type Forecast, type ForecastAnswerDecision, type ForecastAnswerRefusal, type ForecastBreakdown, type ForecastBucket, type ForecastMergedBucket, type ForecastShardAnswer, type ForecastLatencyCounts, type ForecastRequest, type ForecastRequestParse, type ForecastWindow, type ForecastWindowBucket, type ForecastWindowRefusal, type ForecastWindowResolution, type ForecastWindows, } from "./forecast.js";
26
26
  export { CURL_JOURNEY_TOOLS, FIRST_VALUE_JOURNEY, FIRST_VALUE_PREREQUISITES, FIRST_VALUE_STEPS, FIRST_VALUE_VARIABLES, JOURNEY_ACTIVATION_DURATIONS, JOURNEY_ACTIVATION_OUTCOMES, JOURNEY_CONDITIONS, MINIMUM_CURL_VERSION, WEBSITE_JOURNEY_STEPS, WEBSITE_JOURNEY_STEP_KEYS, journeyActivationDuration, journeyCapturedVariables, journeyPathVariables, journeyPoll, journeyPrerequisite, journeyReferences, journeyStepSchema, journeyStepVariables, journeyVariable, journeyVariableName, journeyVariableSchema, parseWebsiteActivationEvent, pathParameterNames, resolveJourneyReferences, websiteActivationEventSchema, websiteJourneySteps, type FirstValueJourney, type JourneyActivationDuration, type JourneyActivationOutcome, type JourneyCapture, type JourneyCondition, type JourneyExpectation, type JourneyPoll, type JourneyPrerequisite, type JourneyRecovery, type JourneyStep, type JourneyVariable, type WebsiteActivationEvent, } from "./first-value-journey.js";
27
27
  export { BILLABLE_TERMINAL_STATES, USAGE_BOUNDS, USAGE_WINDOW_REASONS, billableTerminalStateSchema, parseUsageRequest, resolveUsageWindow, usageDaySchema, usageRequestSchema, usageSchema, utcMidnightMs, type BillableTerminalStateName, type ResolvedUsageWindow, type UsageDayView, type UsageRequest, type UsageRequestParse, type UsageView, type UsageWindowRefusal, } from "./usage.js";
28
- export { BILLING_ACTIVATION_MODES, BILLING_AMOUNT_SCALE, BILLING_BLOCK_REASONS, BILLING_CURRENCY, BILLING_ENTRY_KINDS, BILLING_LEDGER_ENTRY_NOTES, BILLING_PAYMENT_KINDS, BILLING_PAYMENT_STATES, BILLING_NOTICE_KINDS, billingAutoTopUpApplyRequestSchema, billingAutoTopUpConfigurationSchema, billingAutoTopUpPreviewRequestSchema, billingAutoTopUpPreviewSchema, billingAutoTopUpRuleSchema, billingBudgetPolicySchema, billingBudgetUpdateRequestHeadersSchema, billingBudgetUpdateRequestSchema, billingBudgetUpdateResponseSchema, billingCeilingUpdateRequestSchema, billingFundingQuoteRequestSchema, billingFundingQuoteSchema, billingFundingViewSchema, billingNoticePageSchema, billingNoticeRecoveryPathSchema, billingNoticeSchema, billingNotificationSettingsSchema, billingNotificationSettingsUpdateRequestSchema, billingLedgerEntrySchema, billingLedgerPageSchema, billingLedgerRequestSchema, billingPaymentOperationSchema, billingPeriodSummarySchema, billingPurchaseRequestSchema, billingRefundRequestCreateSchema, billingRefundResolutionRequestSchema, billingRefundRequestViewSchema, billingSummarySchema, exactCentMoneySchema, manualFundingCreditSchema, microdollarAmountSchema, nonnegativeMicrodollarAmountSchema, type BillingAutoTopUpApplyRequest, type BillingAutoTopUpConfiguration, type BillingAutoTopUpPreview, type BillingAutoTopUpPreviewRequest, type BillingAutoTopUpRule, type BillingCeilingUpdateRequest, type BillingFundingQuote, type BillingFundingQuoteRequest, type BillingFundingView, type BillingNotice, type BillingNoticePage, type BillingNotificationSettings, type BillingNotificationSettingsUpdateRequest, type BillingLedgerEntryView, type BillingLedgerPage, type BillingLedgerRequest, type BillingBudgetUpdateRequest, type BillingBudgetUpdateResponse, type BillingPaymentOperation, type BillingPurchaseRequest, type BillingRefundRequestCreate, type BillingRefundResolutionRequest, type BillingRefundRequestView, type BillingSummaryView, } from "./billing.js";
29
- export { DELIVERY_TIMING_TARGETS_MS, DELIVERY_TIMING_VERDICTS, deliveryTimingSummarySchema, timingThresholdSummarySchema, type DeliveryTimingSummaryView, type TimingThresholdView, } from "./timing.js";
28
+ export { BILLING_ACTIVATION_MODES, BILLING_AMOUNT_SCALE, BILLING_BLOCK_REASONS, BILLING_CURRENCY, BILLING_ENTRY_KINDS, BILLING_LEDGER_ENTRY_NOTES, BILLING_PAYMENT_KINDS, BILLING_PAYMENT_STATES, BILLING_NOTICE_KINDS, DELIVERY_FAILURE_NOTICE_KINDS, billingAutoTopUpApplyRequestSchema, billingAutoTopUpConfigurationSchema, billingAutoTopUpPreviewRequestSchema, billingAutoTopUpPreviewSchema, billingAutoTopUpRuleSchema, billingBudgetPolicySchema, billingBudgetUpdateRequestHeadersSchema, billingBudgetUpdateRequestSchema, billingBudgetUpdateResponseSchema, billingCeilingUpdateRequestSchema, billingFundingQuoteRequestSchema, billingFundingQuoteSchema, billingFundingViewSchema, billingNoticeDismissRequestSchema, billingNoticeDismissResultSchema, billingNoticeListRequestSchema, billingNoticePageSchema, billingNoticeRecoveryPathSchema, billingNoticeSchema, billingNotificationSettingsSchema, billingNotificationSettingsUpdateRequestSchema, billingLedgerEntrySchema, billingLedgerPageSchema, billingLedgerRequestSchema, billingPaymentOperationSchema, billingPeriodSummarySchema, billingPurchaseRequestSchema, billingRefundRequestCreateSchema, billingRefundResolutionRequestSchema, billingRefundRequestViewSchema, billingSummarySchema, exactCentMoneySchema, manualFundingCreditSchema, microdollarAmountSchema, nonnegativeMicrodollarAmountSchema, type BillingAutoTopUpApplyRequest, type BillingAutoTopUpConfiguration, type BillingAutoTopUpPreview, type BillingAutoTopUpPreviewRequest, type BillingAutoTopUpRule, type BillingCeilingUpdateRequest, type BillingFundingQuote, type BillingFundingQuoteRequest, type BillingFundingView, type BillingNotice, type BillingNoticeDismissRequest, type BillingNoticeDismissResult, type BillingNoticeListRequest, type BillingNoticePage, type BillingNotificationSettings, type BillingNotificationSettingsUpdateRequest, type BillingLedgerEntryView, type BillingLedgerPage, type BillingLedgerRequest, type BillingBudgetUpdateRequest, type BillingBudgetUpdateResponse, type BillingPaymentOperation, type BillingPurchaseRequest, type BillingRefundRequestCreate, type BillingRefundResolutionRequest, type BillingRefundRequestView, type BillingSummaryView, } from "./billing.js";
29
+ export { DELIVERY_TIMING_POLICY_VERSION, DELIVERY_TIMING_TARGETS_MS, bandTimingSummarySchema, type BandTimingSummaryView, DELIVERY_TIMING_VERDICTS, deliveryTimingSummarySchema, timingThresholdSummarySchema, type DeliveryTimingSummaryView, type TimingThresholdView, } from "./timing.js";
30
30
  export { CALLBACK_RECEIVER_DISPOSITIONS, CALLBACK_RECEIVER_PROTOCOL, CALLBACK_RECEIVER_STATUS, TEST_SINK_BEHAVIORS, TEST_SINK_BEHAVIOR_FACTS, TEST_SINK_BOUNDS, TEST_SINK_CLIENT_ERROR_STATUSES, TEST_SINK_DISPOSITIONS, TEST_SINK_PROTOCOL_VERSION, TEST_SINK_SERVER_ERROR_STATUSES, callbackReceiverAcknowledgementSchema, callbackReceiverDispositionSchema, resolveTestSinkAction, testSinkBehaviorSchema, testSinkCreateRequestSchema, testSinkDeliveryBodySchema, testSinkDispositionSchema, testSinkDeliveryPageSchema, testSinkDeliverySchema, testSinkPageSchema, testSinkProgramSchema, testSinkSchema, type CallbackReceiverAcknowledgement, type CallbackReceiverDisposition, type TestSink, type TestSinkAction, type TestSinkBehavior, type TestSinkCreateRequest, type TestSinkDelivery, type TestSinkDeliveryBody, type TestSinkDeliveryPage, type TestSinkDisposition, type TestSinkPage, type TestSinkProgram, } from "./test-sink.js";
31
31
  export { PROMOTION_BENEFIT_KINDS, billingPromotionsSchema, billingRedeemRequestSchema, billingRedeemResponseSchema, promotionCodeSchema, promotionGrantViewSchema, type BillingPromotions, type BillingRedeemResponse, type PromotionGrantView, PROJECT_BILLING_ACTIONS, projectBillingQuoteRequestSchema, projectBillingQuoteSchema, projectBillingChangeRequestSchema, projectBillingStateSchema, billingPortalSchema, BILLING_PAYMENT_METHOD_REQUIRED_TITLE, billingPaymentMethodSchema, billingPaymentMethodSetupRequestSchema, billingPaymentMethodConfirmRequestSchema, billingPaymentMethodRemoveRequestSchema, billingInvoiceSchema, billingInvoiceListSchema, billingPaymentHistoryPageSchema, billingInvoiceHistoryPageSchema, type BillingPaymentHistoryPage, type BillingInvoiceHistoryPage, type BillingInvoice, type BillingInvoiceList, type BillingPaymentMethod, type BillingPaymentMethodSetupRequest, type BillingPaymentMethodConfirmRequest, type BillingPaymentMethodRemoveRequest, type ProjectBillingQuoteRequest, type ProjectBillingQuote, type ProjectBillingChangeRequest, type ProjectBillingState, } from "./billing.js";
32
32
  export { effectiveCustomerLimitsSchema, type EffectiveCustomerLimits, } from "./effective-limits.js";
33
33
  export * from "./members.js";
34
34
  export * from "./http-request.js";
35
35
  export { sanitizedDiagnosticText, diagnosticBodyText, responseBodySentence, requestCaptureSentence, attemptStatusGuidance, } from "./attempt-diagnostics.js";
36
- export { PROJECT_NOTIFICATION_OPERATIONS, notificationEmailRecipientsSchema, notificationEmailSettingsSchema, statusWebhookEventSchema, statusWebhookConfigurationSchema, projectNotificationSettingsSchema, projectNotificationSettingsUpdateRequestSchema, statusSigningKeyRequestSchema, statusSigningKeyCreatedSchema, statusWebhookPayloadSchema, statusWebhookDeliverySchema, statusWebhookDeliveryPageSchema, type ProjectNotificationSettings, type ProjectNotificationSettingsUpdateRequest, type StatusSigningKeyCreated, type StatusWebhookEvent, type StatusWebhookPayload, type StatusWebhookDelivery, type StatusWebhookDeliveryPage, } from "./project-notifications.js";
36
+ export { PROJECT_NOTIFICATION_OPERATIONS, notificationEmailRecipientsSchema, notificationEmailSettingsSchema, statusWebhookEventSchema, statusWebhookConfigurationSchema, statusWebhookEndpointConfigurationSchema, projectNotificationSettingsSchema, projectNotificationSettingsUpdateRequestSchema, statusSigningKeyRequestSchema, statusSigningKeyCreatedSchema, statusWebhookPayloadSchema, statusWebhookDeliverySchema, statusWebhookDeliveryPageSchema, type ProjectNotificationSettings, type ProjectNotificationSettingsUpdateRequest, type StatusSigningKeyCreated, type StatusWebhookEvent, type StatusWebhookPayload, type StatusWebhookDelivery, type StatusWebhookDeliveryPage, } from "./project-notifications.js";
37
37
  export { externalIdentifierSchema, scheduleTagSchema, scheduleTagsSchema, } from "./host-correlation.js";
38
38
  export { scheduleSelectionSchema, normalizeScheduleSelection, type ScheduleSelection, } from "./schedule-selection.js";
39
39
  export * from "./bulk-operations.js";
40
40
  export { executionSelectionSchema, normalizeExecutionSelection, type ExecutionSelection, } from "./execution-selection.js";
41
41
  export { bulkJobIdSchema } from "./identifiers.js";
42
42
  export * from "./attempt-search.js";
43
+ export { REQUESTED_LATENCY_CLASSES, SERVICE_BANDS, bandLatencyClass, oneOffSpacingMs, recurrenceSpacingMs, replacementMode, resolveOccurrence, resolveService, roundEligibilityMs, type RequestedLatencyClass, type OccurrenceResolution, type ResolvedLatencyClass, type ServiceBand, type ServiceResolution, type StoredRequestedLatencyClass, } from "./service-mode.js";