@greatwait/contracts 0.1.0-alpha.6 → 0.1.0-alpha.8

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 (67) hide show
  1. package/README.md +1 -1
  2. package/dist/attempt-diagnostics.d.ts +8 -0
  3. package/dist/attempt-diagnostics.js +68 -0
  4. package/dist/billing.d.ts +12 -10
  5. package/dist/billing.js +14 -4
  6. package/dist/delivery.d.ts +17 -40
  7. package/dist/delivery.js +12 -37
  8. package/dist/effective-limits.d.ts +4 -4
  9. package/dist/endpoints.d.ts +6 -6
  10. package/dist/first-value-journey.js +4 -4
  11. package/dist/identity.d.ts +3 -3
  12. package/dist/index.d.ts +3 -1
  13. package/dist/index.js +3 -1
  14. package/dist/mcp.d.ts +1 -1
  15. package/dist/members.d.ts +4 -4
  16. package/dist/operations.d.ts +338 -103
  17. package/dist/operations.js +3 -1
  18. package/dist/policy.d.ts +5 -4
  19. package/dist/policy.js +5 -4
  20. package/dist/project-notifications.d.ts +238 -0
  21. package/dist/project-notifications.js +236 -0
  22. package/dist/scheduling-records.d.ts +112 -8
  23. package/dist/scheduling.d.ts +253 -22
  24. package/dist/scheduling.js +51 -9
  25. package/dist/signatures.d.ts +1 -1
  26. package/dist/test-sink.d.ts +27 -41
  27. package/dist/test-sink.js +12 -31
  28. package/dist/workspace.d.ts +4 -4
  29. package/generated/v1/callback-receiver.json +4 -4
  30. package/generated/v1/examples/projectnotifications.read.response.json +12 -0
  31. package/generated/v1/examples/projectnotifications.rotateSigningKey.request.json +3 -0
  32. package/generated/v1/examples/projectnotifications.rotateSigningKey.response.json +25 -0
  33. package/generated/v1/examples/projectnotifications.update.request.json +10 -0
  34. package/generated/v1/examples/projectnotifications.update.response.json +12 -0
  35. package/generated/v1/examples/statusdeliveries.list.response.json +3 -0
  36. package/generated/v1/first-value-journey.json +4 -4
  37. package/generated/v1/manifest.json +110 -1
  38. package/generated/v1/openapi.json +3655 -333
  39. package/generated/v1/policy-matrix.json +28 -0
  40. package/generated/v1/schemas/attempts.list.response.json +105 -0
  41. package/generated/v1/schemas/attempts.read.response.json +105 -0
  42. package/generated/v1/schemas/billing.notices.response.json +17 -6
  43. package/generated/v1/schemas/billing.purchase.request.json +4 -0
  44. package/generated/v1/schemas/occurrences.redeliver.response.json +105 -0
  45. package/generated/v1/schemas/projectnotifications.read.response.json +101 -0
  46. package/generated/v1/schemas/projectnotifications.rotateSigningKey.request.json +13 -0
  47. package/generated/v1/schemas/projectnotifications.rotateSigningKey.response.json +119 -0
  48. package/generated/v1/schemas/projectnotifications.update.request-headers.json +13 -0
  49. package/generated/v1/schemas/projectnotifications.update.request.json +90 -0
  50. package/generated/v1/schemas/projectnotifications.update.response.json +101 -0
  51. package/generated/v1/schemas/schedules.archive.response.json +50 -0
  52. package/generated/v1/schemas/schedules.cancel.response.json +50 -0
  53. package/generated/v1/schemas/schedules.create.request.json +14 -0
  54. package/generated/v1/schemas/schedules.create.response.json +50 -0
  55. package/generated/v1/schemas/schedules.list.response.json +50 -0
  56. package/generated/v1/schemas/schedules.pause.response.json +50 -0
  57. package/generated/v1/schemas/schedules.read.response.json +50 -0
  58. package/generated/v1/schemas/schedules.replace.request.json +14 -0
  59. package/generated/v1/schemas/schedules.replace.response.json +50 -0
  60. package/generated/v1/schemas/schedules.resume.response.json +50 -0
  61. package/generated/v1/schemas/statusdeliveries.list.query.json +16 -0
  62. package/generated/v1/schemas/statusdeliveries.list.response.json +82 -0
  63. package/generated/v1/snippets/projectnotifications.read.json +6 -0
  64. package/generated/v1/snippets/projectnotifications.rotateSigningKey.json +6 -0
  65. package/generated/v1/snippets/projectnotifications.update.json +6 -0
  66. package/generated/v1/snippets/statusdeliveries.list.json +6 -0
  67. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@ The public contracts for [GreatWait](https://greatwait.dev): the schemas every
4
4
  response is parsed with, the stable refusal catalog, the operation registry, and
5
5
  the generated OpenAPI documents.
6
6
 
7
- > **Invited alpha.** This package publishes on the `alpha` dist-tag and has no
7
+ > **Alpha.** This package publishes on the `alpha` dist-tag and has no
8
8
  > `latest`. Install it explicitly, and pin the exact version in anything you
9
9
  > care about.
10
10
 
@@ -0,0 +1,8 @@
1
+ import type { Attempt, AttemptResponse } from "./scheduling.js";
2
+ /** Render customer-controlled text without terminal escapes, controls or bidi overrides. */
3
+ export declare function sanitizedDiagnosticText(value: string): string;
4
+ export declare function responseBodySentence(state: AttemptResponse["bodyState"], noServerResponse?: boolean): string;
5
+ export declare function requestCaptureSentence(state: Attempt["requestState"], inProgress?: boolean): string;
6
+ export declare function attemptStatusGuidance(status: number | undefined): string | undefined;
7
+ /** A safe text preview, independently of the exact retained/download bytes. */
8
+ export declare function diagnosticBodyText(body: NonNullable<AttemptResponse["body"]>): string | undefined;
@@ -0,0 +1,68 @@
1
+ /** Render customer-controlled text without terminal escapes, controls or bidi overrides. */
2
+ export function sanitizedDiagnosticText(value) {
3
+ return Array.from(value.replace(/\r\n/gu, "\n"), (c) => {
4
+ const n = c.codePointAt(0);
5
+ return c === "\n" ||
6
+ c === "\t" ||
7
+ c === "\u200C" ||
8
+ c === "\u200D" ||
9
+ c === "\uFEFF" ||
10
+ (!/\p{Cc}|\p{Cf}/u.test(c) && n !== 0x7f)
11
+ ? c
12
+ : "�";
13
+ }).join("");
14
+ }
15
+ export function responseBodySentence(state, noServerResponse = false) {
16
+ switch (state) {
17
+ case "empty":
18
+ return "The server answered with an empty body.";
19
+ case "expired":
20
+ return "The response has expired after 7 days.";
21
+ case "not_captured":
22
+ return noServerResponse
23
+ ? "No server response was received for this attempt."
24
+ : "The response body was not captured.";
25
+ case "captured":
26
+ return "What the server answered:";
27
+ }
28
+ }
29
+ export function requestCaptureSentence(state, inProgress = false) {
30
+ return state === "expired"
31
+ ? "The request body has expired. Request evidence is kept for at most 3 days and never beyond payload retention."
32
+ : inProgress
33
+ ? "The request is still in progress; sent-request evidence is not available yet."
34
+ : "The request was not captured.";
35
+ }
36
+ export function attemptStatusGuidance(status) {
37
+ if (status === 401 || status === 403)
38
+ return "Your server rejected the credentials we sent. Check the Authorization header on this endpoint.";
39
+ if (status === 404 || status === 410)
40
+ return "The server could not find this endpoint. Check the URL we sent.";
41
+ if (status === 405)
42
+ return "The server refused this HTTP method. Check the method we sent.";
43
+ if (status === 429)
44
+ return "The server asked us to slow down. Check its Retry-After header.";
45
+ if (status === 408)
46
+ return "The server timed out while receiving the request. Check its response and timeout settings.";
47
+ if (status !== undefined && status >= 500)
48
+ return "The server reported an error. Use its response to diagnose the failure.";
49
+ if (status !== undefined && status >= 300 && status < 400)
50
+ return "The server redirected the request. Call the final HTTPS URL directly; redirects are disabled.";
51
+ if (status !== undefined && status >= 400)
52
+ return "The server refused this request. Check its response against what we sent.";
53
+ return undefined;
54
+ }
55
+ /** A safe text preview, independently of the exact retained/download bytes. */
56
+ export function diagnosticBodyText(body) {
57
+ if (body.encoding === "utf8")
58
+ return body.content;
59
+ const media = (body.contentType.split(";")[0] ?? "").trim().toLowerCase();
60
+ if (!/^(?:text\/[a-z0-9.+-]+|application\/(?:[a-z0-9.+-]+\+)?(?:json|xml)|application\/javascript)$/u.test(media))
61
+ return undefined;
62
+ try {
63
+ return new TextDecoder().decode(Uint8Array.from(atob(body.content), (c) => c.charCodeAt(0)));
64
+ }
65
+ catch {
66
+ return undefined;
67
+ }
68
+ }
package/dist/billing.d.ts CHANGED
@@ -110,6 +110,7 @@ export declare const billingPurchaseRequestSchema: import("zod").ZodObject<{
110
110
  confirmed: import("zod").ZodLiteral<true>;
111
111
  expectedRevision: import("zod").ZodNumber;
112
112
  quote: import("zod").ZodString;
113
+ savePaymentMethod: import("zod").ZodOptional<import("zod").ZodBoolean>;
113
114
  }, import("zod/v4/core").$strict>;
114
115
  export declare const billingCeilingUpdateRequestSchema: import("zod").ZodObject<{
115
116
  automaticExecutionTopUpCeiling: import("zod").ZodNullable<import("zod").ZodObject<{
@@ -253,16 +254,16 @@ export declare const billingPaymentOperationSchema: import("zod").ZodObject<{
253
254
  }, import("zod/v4/core").$strip>>;
254
255
  id: import("zod").ZodString;
255
256
  kind: import("zod").ZodEnum<{
256
- manual: "manual";
257
257
  automatic: "automatic";
258
+ manual: "manual";
258
259
  }>;
259
260
  paymentUrl: import("zod").ZodOptional<import("zod").ZodString>;
260
261
  reason: import("zod").ZodOptional<import("zod").ZodString>;
261
262
  receiptUrl: import("zod").ZodOptional<import("zod").ZodString>;
262
263
  state: import("zod").ZodEnum<{
264
+ failed: "failed";
263
265
  pending: "pending";
264
266
  paid: "paid";
265
- failed: "failed";
266
267
  "authentication-required": "authentication-required";
267
268
  "action-required": "action-required";
268
269
  canceled: "canceled";
@@ -393,16 +394,16 @@ export declare const billingFundingViewSchema: import("zod").ZodObject<{
393
394
  }, import("zod/v4/core").$strip>>;
394
395
  id: import("zod").ZodString;
395
396
  kind: import("zod").ZodEnum<{
396
- manual: "manual";
397
397
  automatic: "automatic";
398
+ manual: "manual";
398
399
  }>;
399
400
  paymentUrl: import("zod").ZodOptional<import("zod").ZodString>;
400
401
  reason: import("zod").ZodOptional<import("zod").ZodString>;
401
402
  receiptUrl: import("zod").ZodOptional<import("zod").ZodString>;
402
403
  state: import("zod").ZodEnum<{
404
+ failed: "failed";
403
405
  pending: "pending";
404
406
  paid: "paid";
405
- failed: "failed";
406
407
  "authentication-required": "authentication-required";
407
408
  "action-required": "action-required";
408
409
  canceled: "canceled";
@@ -427,7 +428,7 @@ export declare const billingFundingViewSchema: import("zod").ZodObject<{
427
428
  scale: import("zod").ZodLiteral<6>;
428
429
  }, import("zod/v4/core").$strip>;
429
430
  }, import("zod/v4/core").$strict>;
430
- export declare const BILLING_NOTICE_KINDS: readonly ["budget-warning", "budget-exhausted", "low-credit", "automatic-top-up-cap-reached", "funding-blocked", "payment-pending", "payment-succeeded", "payment-failed", "payment-authentication-required", "payment-outcome-unresolved", "service-restored"];
431
+ export declare const BILLING_NOTICE_KINDS: readonly ["budget-warning", "budget-exhausted", "low-credit", "automatic-top-up-cap-reached", "funding-blocked", "payment-pending", "payment-succeeded", "payment-failed", "payment-authentication-required", "payment-outcome-unresolved", "service-restored", "schedule-auto-paused", "delivery-failed"];
431
432
  type BillingNoticeMoney = z.infer<typeof nonnegativeExactMoneySchema>;
432
433
  export interface BillingNotice {
433
434
  readonly amounts: {
@@ -450,7 +451,8 @@ export interface BillingNotice {
450
451
  readonly operation: string;
451
452
  readonly state: (typeof BILLING_PAYMENT_STATES)[number];
452
453
  } | null;
453
- readonly recoveryPath: "#billing" | "#billing-funding" | "#billing-notification-settings";
454
+ /** A fixed billing anchor or a scoped schedule recovery route. */
455
+ readonly recoveryPath: string;
454
456
  readonly resolvedAt: string | null;
455
457
  readonly scope: {
456
458
  readonly kind: "organization";
@@ -493,11 +495,11 @@ export interface BillingNotificationSettingsUpdateRequest {
493
495
  readonly lowCreditThreshold?: z.infer<typeof exactCentMoneySchema> | null | undefined;
494
496
  readonly noncriticalEmail: boolean;
495
497
  }
496
- export declare const billingNoticeRecoveryPathSchema: import("zod").ZodEnum<{
498
+ export declare const billingNoticeRecoveryPathSchema: import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
497
499
  "#billing": "#billing";
498
500
  "#billing-funding": "#billing-funding";
499
501
  "#billing-notification-settings": "#billing-notification-settings";
500
- }>;
502
+ }>, import("zod").ZodString]>;
501
503
  export declare const billingNoticeSchema: z.ZodType<BillingNotice>;
502
504
  export declare const billingNoticePageSchema: z.ZodType<BillingNoticePage>;
503
505
  export declare const billingNotificationSettingsSchema: z.ZodType<BillingNotificationSettings>;
@@ -1118,16 +1120,16 @@ export declare const billingPaymentHistoryPageSchema: import("zod").ZodObject<{
1118
1120
  }, import("zod/v4/core").$strip>>;
1119
1121
  id: import("zod").ZodString;
1120
1122
  kind: import("zod").ZodEnum<{
1121
- manual: "manual";
1122
1123
  automatic: "automatic";
1124
+ manual: "manual";
1123
1125
  }>;
1124
1126
  paymentUrl: import("zod").ZodOptional<import("zod").ZodString>;
1125
1127
  reason: import("zod").ZodOptional<import("zod").ZodString>;
1126
1128
  receiptUrl: import("zod").ZodOptional<import("zod").ZodString>;
1127
1129
  state: import("zod").ZodEnum<{
1130
+ failed: "failed";
1128
1131
  pending: "pending";
1129
1132
  paid: "paid";
1130
- failed: "failed";
1131
1133
  "authentication-required": "authentication-required";
1132
1134
  "action-required": "action-required";
1133
1135
  canceled: "canceled";
package/dist/billing.js CHANGED
@@ -208,6 +208,12 @@ export const billingPurchaseRequestSchema = z
208
208
  confirmed: z.literal(true),
209
209
  expectedRevision: z.number().int().nonnegative(),
210
210
  quote: z.string().min(1).max(128),
211
+ savePaymentMethod: z
212
+ .boolean()
213
+ .meta({
214
+ description: "true: the customer also asks to keep the payment method they pay with, for automatic top-up and for projects past the free one. The hosted payment then saves it for later charges made without the customer present (it offers every method the account enables except Klarna, which cannot be charged that way), and once the provider confirms this payment paid, that method becomes the organization's saved payment method if it has none. An existing saved payment method is never replaced, and saving one never turns automatic top-up on. Omitted or false: the purchase does exactly what it always did.",
215
+ })
216
+ .optional(),
211
217
  })
212
218
  .strict();
213
219
  export const billingCeilingUpdateRequestSchema = z
@@ -406,11 +412,15 @@ export const BILLING_NOTICE_KINDS = [
406
412
  "payment-authentication-required",
407
413
  "payment-outcome-unresolved",
408
414
  "service-restored",
415
+ "schedule-auto-paused",
416
+ "delivery-failed",
409
417
  ];
410
- export const billingNoticeRecoveryPathSchema = z.enum([
411
- "#billing",
412
- "#billing-funding",
413
- "#billing-notification-settings",
418
+ export const billingNoticeRecoveryPathSchema = z.union([
419
+ z.enum(["#billing", "#billing-funding", "#billing-notification-settings"]),
420
+ z
421
+ .string()
422
+ .max(1024)
423
+ .regex(/^\/o\/[A-Za-z0-9_%.-]+\/p\/proj_[0-9abcdefghjkmnpqrstvwxyz]{26}\/(?:live|test)\/schedules(?:\/sch_[0-9abcdefghjkmnpqrstvwxyz]{26}(?:\/occurrences\/occ_[0-9abcdefghjkmnpqrstvwxyz]{26})?)?$/u, "must be a scoped schedule recovery route"),
414
424
  ]);
415
425
  export const billingNoticeSchema = z
416
426
  .object({
@@ -252,41 +252,17 @@ export declare function effectiveCompletionDeadlineMs(requestedMs: number | unde
252
252
  export declare const CALLBACK_ATTEMPT_DIAGNOSTICS: readonly ["completion_timed_out", "delivered", "duplicate_inflight", "endpoint_unavailable", "endpoint_unsafe", "http_refused", "http_retryable", "http_terminal", "identity_conflict", "network_ambiguous", "payload_unavailable", "rate_limited"];
253
253
  export type CallbackAttemptDiagnostic = (typeof CALLBACK_ATTEMPT_DIAGNOSTICS)[number];
254
254
  /**
255
- * Statuses where the receiver is refusing *this delivery, right now* rather
256
- * than objecting to the message it carries.
255
+ * Receiver refusals that retain the ordinary five-failure retry budget.
257
256
  *
258
- * **The line is whether resending the identical bytes could ever get a
259
- * different answer.** Every callback attempt re-sends the same signed envelope,
260
- * so a receiver that rejects the message itself — malformed, too large, wrong
261
- * media type, gone, refused for legal reasons — will reject it identically for
262
- * as long as the occurrence lives, and retrying is pure cost on the population
263
- * least likely to recover. A receiver that refuses *us* has a cause someone
264
- * fixes: an expired or rotated credential, a WAF rule that started matching, a
265
- * deploy window where the route is briefly absent.
257
+ * W9-50 reverses FXO-1596 for 401/403/404/405: credentials, permissions,
258
+ * missing routes and unsupported methods need a customer change, so an
259
+ * automatic retry bills another attempt without fixing them. They now end
260
+ * the occurrence immediately; manual redelivery remains available.
266
261
  *
267
- * | Status | Why it is here |
268
- * | ------ | -------------- |
269
- * | 401 | credential expired, rotated, or not yet deployed |
270
- * | 402 | receiver's own service suspended, restored on payment |
271
- * | 403 | WAF or bot rule, revoked permission, IP block |
272
- * | 404 | route absent during a deploy or a partial rollout |
273
- * | 405 | method absent during a deploy or a partial rollout |
274
- * | 407 | an egress proxy in front of the receiver wants credentials |
275
- * | 421 | misdirected during a routing or certificate change |
276
- * | 423 | the target resource is temporarily locked |
277
- * | 424 | the receiver's own dependency failed |
278
- * | 425 | the receiver asked us not to risk a replay yet — literally "retry later" |
279
- *
280
- * **409 is deliberately not here**, though it is a refusal in the plain
281
- * reading. From a callback receiver a conflict overwhelmingly means "I already
282
- * have this delivery", which the identical retry cannot resolve and which is
283
- * the receiver's idempotency working rather than failing.
284
- *
285
- * **An unrecognised 4xx is not here either.** RFC 7231 says an unknown 4xx must
286
- * be treated as a 400, so the default is terminal and this list is the whole of
287
- * the exception. Adding to it is a product decision, not a lookup.
262
+ * 402, 407, 421, 423, 424 and 425 retain the budget. 408, 429 and 5xx are
263
+ * retryable separately. Other responses outside 2xx are terminal.
288
264
  */
289
- export declare const CALLBACK_REFUSAL_STATUSES: readonly [401, 402, 403, 404, 405, 407, 421, 423, 424, 425];
265
+ export declare const CALLBACK_REFUSAL_STATUSES: readonly [402, 407, 421, 423, 424, 425];
290
266
  /** Whether a receiver refused this delivery in a way that may recover. */
291
267
  export declare function isCallbackRefusalStatus(status: number): boolean;
292
268
  /** Stable outcome of the one network attempt an executor invocation may run. */
@@ -339,18 +315,17 @@ export declare const CALLBACK_RESPONSE_HEADER_MAX_BYTES = 256;
339
315
  /**
340
316
  * How much of a failed response body may be retained, in bytes.
341
317
  *
342
- * Four kibibytes of the *start* of the body, read as a bounded prefix and with
318
+ * Ten kibibytes of the *start* of any media type, read as a bounded prefix and with
343
319
  * the rest of the stream cancelled rather than buffered. It is enough for a
344
320
  * stack trace's first frames or a validation error list, which is what makes a
345
321
  * failing receiver diagnosable without turning this product into a log store.
346
322
  */
347
- export declare const CALLBACK_FAILURE_SNIPPET_MAX_BYTES = 4096;
323
+ export declare const CALLBACK_FAILURE_SNIPPET_MAX_BYTES = 10240;
348
324
  /**
349
325
  * Media types whose body may be retained as a failure snippet.
350
326
  *
351
- * Text and JSON only. A binary body has nothing a person reads in its first
352
- * four kibibytes, and retaining one would mean storing an arbitrary fragment
353
- * of an arbitrary file because a receiver set a header.
327
+ * Legacy text detection, also used as a hint for decoding invalid UTF-8.
328
+ * Full failed-response capture accepts every media type.
354
329
  */
355
330
  export declare const CALLBACK_FAILURE_SNIPPET_CONTENT_TYPES: readonly ["application/json", "application/problem+json", "application/xml", "text/"];
356
331
  /** One retained response header, already bounded and lowercased by name. */
@@ -373,14 +348,16 @@ export interface CallbackFailureSnippet {
373
348
  /**
374
349
  * Bounded evidence about one HTTP response.
375
350
  *
376
- * Deliberately not "the response": there is no body for a success, no header
377
- * outside the allowlist, and no representation at all for a transport failure
378
- * that produced no response.
351
+ * Failed responses retain every header and bounded body before encryption.
352
+ * Success and pending responses keep only legacy diagnostic headers.
353
+ * The sent request is independent of whether a response arrived.
379
354
  */
380
355
  export interface CallbackResponseEvidence {
381
356
  readonly headers: readonly CallbackResponseHeader[];
382
357
  /** Absent for a success, a pending acknowledgement, and a non-text body. */
383
358
  readonly snippet?: CallbackFailureSnippet;
359
+ readonly response?: import("./scheduling.js").AttemptResponse;
360
+ readonly request?: import("./scheduling.js").AttemptRequest;
384
361
  }
385
362
  /**
386
363
  * What one network attempt did, including the answer that is not an outcome.
package/dist/delivery.js CHANGED
@@ -208,42 +208,18 @@ export const CALLBACK_ATTEMPT_DIAGNOSTICS = [
208
208
  "rate_limited",
209
209
  ];
210
210
  /**
211
- * Statuses where the receiver is refusing *this delivery, right now* rather
212
- * than objecting to the message it carries.
211
+ * Receiver refusals that retain the ordinary five-failure retry budget.
213
212
  *
214
- * **The line is whether resending the identical bytes could ever get a
215
- * different answer.** Every callback attempt re-sends the same signed envelope,
216
- * so a receiver that rejects the message itself — malformed, too large, wrong
217
- * media type, gone, refused for legal reasons — will reject it identically for
218
- * as long as the occurrence lives, and retrying is pure cost on the population
219
- * least likely to recover. A receiver that refuses *us* has a cause someone
220
- * fixes: an expired or rotated credential, a WAF rule that started matching, a
221
- * deploy window where the route is briefly absent.
213
+ * W9-50 reverses FXO-1596 for 401/403/404/405: credentials, permissions,
214
+ * missing routes and unsupported methods need a customer change, so an
215
+ * automatic retry bills another attempt without fixing them. They now end
216
+ * the occurrence immediately; manual redelivery remains available.
222
217
  *
223
- * | Status | Why it is here |
224
- * | ------ | -------------- |
225
- * | 401 | credential expired, rotated, or not yet deployed |
226
- * | 402 | receiver's own service suspended, restored on payment |
227
- * | 403 | WAF or bot rule, revoked permission, IP block |
228
- * | 404 | route absent during a deploy or a partial rollout |
229
- * | 405 | method absent during a deploy or a partial rollout |
230
- * | 407 | an egress proxy in front of the receiver wants credentials |
231
- * | 421 | misdirected during a routing or certificate change |
232
- * | 423 | the target resource is temporarily locked |
233
- * | 424 | the receiver's own dependency failed |
234
- * | 425 | the receiver asked us not to risk a replay yet — literally "retry later" |
235
- *
236
- * **409 is deliberately not here**, though it is a refusal in the plain
237
- * reading. From a callback receiver a conflict overwhelmingly means "I already
238
- * have this delivery", which the identical retry cannot resolve and which is
239
- * the receiver's idempotency working rather than failing.
240
- *
241
- * **An unrecognised 4xx is not here either.** RFC 7231 says an unknown 4xx must
242
- * be treated as a 400, so the default is terminal and this list is the whole of
243
- * the exception. Adding to it is a product decision, not a lookup.
218
+ * 402, 407, 421, 423, 424 and 425 retain the budget. 408, 429 and 5xx are
219
+ * retryable separately. Other responses outside 2xx are terminal.
244
220
  */
245
221
  export const CALLBACK_REFUSAL_STATUSES = [
246
- 401, 402, 403, 404, 405, 407, 421, 423, 424, 425,
222
+ 402, 407, 421, 423, 424, 425,
247
223
  ];
248
224
  /** Whether a receiver refused this delivery in a way that may recover. */
249
225
  export function isCallbackRefusalStatus(status) {
@@ -288,18 +264,17 @@ export const CALLBACK_RESPONSE_HEADER_MAX_BYTES = 256;
288
264
  /**
289
265
  * How much of a failed response body may be retained, in bytes.
290
266
  *
291
- * Four kibibytes of the *start* of the body, read as a bounded prefix and with
267
+ * Ten kibibytes of the *start* of any media type, read as a bounded prefix and with
292
268
  * the rest of the stream cancelled rather than buffered. It is enough for a
293
269
  * stack trace's first frames or a validation error list, which is what makes a
294
270
  * failing receiver diagnosable without turning this product into a log store.
295
271
  */
296
- export const CALLBACK_FAILURE_SNIPPET_MAX_BYTES = 4_096;
272
+ export const CALLBACK_FAILURE_SNIPPET_MAX_BYTES = 10_240;
297
273
  /**
298
274
  * Media types whose body may be retained as a failure snippet.
299
275
  *
300
- * Text and JSON only. A binary body has nothing a person reads in its first
301
- * four kibibytes, and retaining one would mean storing an arbitrary fragment
302
- * of an arbitrary file because a receiver set a header.
276
+ * Legacy text detection, also used as a hint for decoding invalid UTF-8.
277
+ * Full failed-response capture accepts every media type.
303
278
  */
304
279
  export const CALLBACK_FAILURE_SNIPPET_CONTENT_TYPES = [
305
280
  "application/json",
@@ -8,26 +8,26 @@ export declare const effectiveCustomerLimitsSchema: import("zod").ZodObject<{
8
8
  }, import("zod/v4/core").$strict>;
9
9
  provenance: import("zod").ZodObject<{
10
10
  inlinePayloadBytes: import("zod").ZodEnum<{
11
- organization: "organization";
12
11
  default: "default";
12
+ organization: "organization";
13
13
  global: "global";
14
14
  deployment: "deployment";
15
15
  }>;
16
16
  partitionKeyCeiling: import("zod").ZodOptional<import("zod").ZodEnum<{
17
- organization: "organization";
18
17
  default: "default";
18
+ organization: "organization";
19
19
  global: "global";
20
20
  deployment: "deployment";
21
21
  }>>;
22
22
  forecastHorizonSeconds: import("zod").ZodEnum<{
23
- organization: "organization";
24
23
  default: "default";
24
+ organization: "organization";
25
25
  global: "global";
26
26
  deployment: "deployment";
27
27
  }>;
28
28
  usageWindowDays: import("zod").ZodEnum<{
29
- organization: "organization";
30
29
  default: "default";
30
+ organization: "organization";
31
31
  global: "global";
32
32
  deployment: "deployment";
33
33
  }>;
@@ -15,8 +15,8 @@ import { z } from "./zod.js";
15
15
  */
16
16
  export declare const CALLBACK_ENDPOINT_STATUSES: readonly ["active", "disabled"];
17
17
  export declare const callbackEndpointStatusSchema: import("zod").ZodEnum<{
18
- disabled: "disabled";
19
18
  active: "active";
19
+ disabled: "disabled";
20
20
  }>;
21
21
  export type CallbackEndpointStatus = z.infer<typeof callbackEndpointStatusSchema>;
22
22
  /**
@@ -114,8 +114,8 @@ export declare const callbackEndpointSchema: import("zod").ZodObject<{
114
114
  }, import("zod/v4/core").$strip>>;
115
115
  }, import("zod/v4/core").$strip>;
116
116
  status: import("zod").ZodEnum<{
117
- disabled: "disabled";
118
117
  active: "active";
118
+ disabled: "disabled";
119
119
  }>;
120
120
  updatedAt: import("zod").ZodString;
121
121
  url: import("zod").ZodString;
@@ -155,8 +155,8 @@ export declare const callbackEndpointPageSchema: import("zod").ZodObject<{
155
155
  }, import("zod/v4/core").$strip>>;
156
156
  }, import("zod/v4/core").$strip>;
157
157
  status: import("zod").ZodEnum<{
158
- disabled: "disabled";
159
158
  active: "active";
159
+ disabled: "disabled";
160
160
  }>;
161
161
  updatedAt: import("zod").ZodString;
162
162
  url: import("zod").ZodString;
@@ -205,8 +205,8 @@ export declare const callbackEndpointCreatedSchema: import("zod").ZodObject<{
205
205
  }, import("zod/v4/core").$strip>>;
206
206
  }, import("zod/v4/core").$strip>;
207
207
  status: import("zod").ZodEnum<{
208
- disabled: "disabled";
209
208
  active: "active";
209
+ disabled: "disabled";
210
210
  }>;
211
211
  updatedAt: import("zod").ZodString;
212
212
  url: import("zod").ZodString;
@@ -253,8 +253,8 @@ export declare const callbackEndpointRotatedSchema: import("zod").ZodObject<{
253
253
  }, import("zod/v4/core").$strip>>;
254
254
  }, import("zod/v4/core").$strip>;
255
255
  status: import("zod").ZodEnum<{
256
- disabled: "disabled";
257
256
  active: "active";
257
+ disabled: "disabled";
258
258
  }>;
259
259
  updatedAt: import("zod").ZodString;
260
260
  url: import("zod").ZodString;
@@ -372,8 +372,8 @@ export declare const callbackEndpointEnsuredSchema: import("zod").ZodObject<{
372
372
  }, import("zod/v4/core").$strip>>;
373
373
  }, import("zod/v4/core").$strip>;
374
374
  status: import("zod").ZodEnum<{
375
- disabled: "disabled";
376
375
  active: "active";
376
+ disabled: "disabled";
377
377
  }>;
378
378
  updatedAt: import("zod").ZodString;
379
379
  url: import("zod").ZodString;
@@ -109,7 +109,7 @@ export const CURL_JOURNEY_TOOLS = [
109
109
  ];
110
110
  export const FIRST_VALUE_PREREQUISITES = [
111
111
  {
112
- action: "Accept your GreatWait invitation, sign in, and create a project in the dashboard.",
112
+ action: "Sign up at https://app.greatwait.dev/sign-up and name your organization, or sign in. Then create a project in the dashboard, or pick an existing one.",
113
113
  because: "projects.create accepts only a signed-in member, so a project is created by a person rather than by an API credential.",
114
114
  id: "project",
115
115
  title: "A project",
@@ -121,10 +121,10 @@ export const FIRST_VALUE_PREREQUISITES = [
121
121
  title: "An API credential",
122
122
  },
123
123
  {
124
- action: "Have an HTTPS URL of your own that answers POST with a 2xx status, and can be reached from the public internet.",
125
- because: "GreatWait delivers your callback to an address you control. It does not offer a shared receiver to try, and it will not send your payload to a third-party inspection service on your behalf.",
124
+ action: "Get a test URL from webhook.site, which shows every request it receives, or use your own app's HTTPS URL. It must answer with a 2xx status and be reachable from the public internet.",
125
+ because: "GreatWait calls the URL you give it. Don't send real data to a public tester.",
126
126
  id: "receiver",
127
- title: "An HTTPS receiver you control",
127
+ title: "A URL to call",
128
128
  },
129
129
  ];
130
130
  export const FIRST_VALUE_VARIABLES = [
@@ -71,8 +71,8 @@ export type MembershipRole = z.infer<typeof membershipRoleSchema>;
71
71
  */
72
72
  export declare const MEMBERSHIP_STATUSES: readonly ["active", "suspended", "removed"];
73
73
  export declare const membershipStatusSchema: import("zod").ZodEnum<{
74
- active: "active";
75
74
  removed: "removed";
75
+ active: "active";
76
76
  suspended: "suspended";
77
77
  }>;
78
78
  export type MembershipStatus = z.infer<typeof membershipStatusSchema>;
@@ -105,8 +105,8 @@ export declare const membershipSchema: import("zod").ZodObject<{
105
105
  billing: "billing";
106
106
  }>;
107
107
  status: import("zod").ZodEnum<{
108
- active: "active";
109
108
  removed: "removed";
109
+ active: "active";
110
110
  suspended: "suspended";
111
111
  }>;
112
112
  user: import("zod").ZodString;
@@ -147,8 +147,8 @@ export declare const membershipChangeSchema: import("zod").ZodObject<{
147
147
  billing: "billing";
148
148
  }>;
149
149
  status: import("zod").ZodEnum<{
150
- active: "active";
151
150
  removed: "removed";
151
+ active: "active";
152
152
  suspended: "suspended";
153
153
  }>;
154
154
  user: import("zod").ZodString;
package/dist/index.d.ts CHANGED
@@ -14,7 +14,7 @@ export { CHANGE_KINDS, CHANGE_OPERATIONS, CHANGE_SUBJECTS, CONTRACT_VERSION, ass
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
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, 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, 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";
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";
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";
@@ -32,3 +32,5 @@ export { PROJECT_BILLING_ACTIONS, projectBillingQuoteRequestSchema, projectBilli
32
32
  export { effectiveCustomerLimitsSchema, type EffectiveCustomerLimits, } from "./effective-limits.js";
33
33
  export * from "./members.js";
34
34
  export * from "./http-request.js";
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";
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ export { CHANGE_KINDS, CHANGE_OPERATIONS, CHANGE_SUBJECTS, CONTRACT_VERSION, ass
14
14
  export { WORKSPACE_LAYERS, scaffoldProblemSchema, scaffoldVersionSchema, toolDescriptorSchema, toolListSchema, workspaceIdentitySchema, workspaceLayerSchema, workspaceScaffoldSchema, } 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, } from "./operations.js";
16
16
  export { PROJECT_LIST_LIMIT, PROJECT_STATUSES, environmentSchema, organizationSchema, projectCreateRequestSchema, projectArchiveRequestSchema, projectDeletedSchema, projectDeletionCountsSchema, projectListSchema, projectNameKey, projectNameSchema, projectSchema, projectStatusSchema, projectSummarySchema, projectUpdateRequestSchema, provisionedProjectSchema, } 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, 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, deriveDeliverySettings, deriveLatencyClass, deriveLatenessSettings, defaultLatenessPolicyForRecurrence, generationSchema, isTerminalOccurrenceState, isTerminalScheduleStatus, latencyClassSchema, latenessPolicySchema, occurrenceSchema, occurrencePageSchema, parseProjectOccurrenceListRequest, projectOccurrenceCursorBinding, projectOccurrenceListRequestSchema, projectOccurrencePageSchema, occurrenceStateSchema, occurrenceViewSchema, partitionKeySchema, remediationForAttempt, recurrenceSchema, scheduleNameSchema, scheduleLatenessRequestSchema, scheduleLatenessSchema, schedulePageSchema, scheduleRequestSchema, scheduleSchema, scheduleStatusSchema, scheduleViewSchema, scheduleWrittenViewSchema, } from "./scheduling.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, 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, 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, scheduleNameSchema, scheduleLatenessRequestSchema, scheduleLatenessSchema, schedulePageSchema, scheduleRequestSchema, scheduleSchema, scheduleStatusSchema, scheduleViewSchema, scheduleWrittenViewSchema, } from "./scheduling.js";
18
18
  export { portableAttemptRecordSchema, portableEncryptedPayloadRecordSchema, portableOccurrenceRecordSchema, portableReceiptRecordSchema, portableScheduleRecordSchema, portableSchedulingRecordSetSchema, } from "./scheduling-records.js";
19
19
  export { ROLE_SCOPE_CEILINGS, capScopesToRole, ceilingForRole, credentialScopes, grantableScopes, policyMatrix, roleAllows, roleCanPerform, } 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, } from "./oauth.js";
@@ -32,3 +32,5 @@ export { PROJECT_BILLING_ACTIONS, projectBillingQuoteRequestSchema, projectBilli
32
32
  export { effectiveCustomerLimitsSchema, } from "./effective-limits.js";
33
33
  export * from "./members.js";
34
34
  export * from "./http-request.js";
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, } from "./project-notifications.js";
package/dist/mcp.d.ts CHANGED
@@ -116,8 +116,8 @@ export declare const mcpConnectionSchema: import("zod").ZodObject<{
116
116
  "usage:read": "usage:read";
117
117
  }>>;
118
118
  state: import("zod").ZodEnum<{
119
- revoked: "revoked";
120
119
  expired: "expired";
120
+ revoked: "revoked";
121
121
  usable: "usable";
122
122
  }>;
123
123
  tools: import("zod").ZodArray<import("zod").ZodString>;