@greatwait/contracts 0.3.1 → 0.3.3
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.
- package/dist/attempt-diagnostics.d.ts +1 -1
- package/dist/attempt-diagnostics.js +13 -1
- package/dist/attempt-search.d.ts +2 -0
- package/dist/billing.d.ts +46 -0
- package/dist/billing.js +29 -0
- package/dist/callback-safety.js +5 -1
- package/dist/configuration.d.ts +2 -2
- package/dist/configuration.js +6 -3
- package/dist/delivery.d.ts +12 -1
- package/dist/delivery.js +1 -0
- package/dist/effective-limits.d.ts +4 -4
- package/dist/endpoints.d.ts +29 -0
- package/dist/endpoints.js +32 -1
- package/dist/forecast.d.ts +2 -2
- package/dist/http-request.d.ts +12 -2
- package/dist/http-request.js +31 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.js +8 -7
- package/dist/mcp.js +1 -0
- package/dist/operational-config.d.ts +174 -22
- package/dist/operational-config.js +207 -74
- package/dist/operations.d.ts +334 -52
- package/dist/operations.js +195 -34
- package/dist/project-notifications.d.ts +35 -9
- package/dist/project-notifications.js +43 -12
- package/dist/protocol.d.ts +28 -0
- package/dist/protocol.js +23 -0
- package/dist/scheduling-records.d.ts +106 -16
- package/dist/scheduling-records.js +36 -12
- package/dist/scheduling.d.ts +155 -43
- package/dist/scheduling.js +188 -50
- package/dist/service-mode.d.ts +88 -0
- package/dist/service-mode.js +130 -0
- package/dist/tenancy.d.ts +54 -30
- package/dist/tenancy.js +35 -17
- package/dist/timing.d.ts +39 -0
- package/dist/timing.js +51 -0
- package/dist/zod-values.d.ts +1 -1
- package/dist/zod-values.js +1 -1
- package/dist/zod.d.ts +1 -1
- package/dist/zod.js +1 -1
- package/generated/v1/examples/billing.noticesdismiss.request.json +3 -0
- package/generated/v1/examples/billing.noticesdismiss.response.json +6 -0
- package/generated/v1/examples/billing.reconcile.response.json +12 -0
- package/generated/v1/examples/billing.summary.response.json +12 -0
- package/generated/v1/examples/executions.list.response.json +1 -0
- package/generated/v1/examples/limits.read.response.json +1 -1
- package/generated/v1/examples/projectnotifications.rotateSigningKey.response.json +1 -0
- package/generated/v1/examples/projects.list.response.json +0 -6
- package/generated/v1/examples/projects.read.response.json +14 -0
- package/generated/v1/examples/schedules.list.response.json +1 -3
- package/generated/v1/examples/schedules.summary.response.json +174 -0
- package/generated/v1/examples/timing.summary.response.json +33 -1
- package/generated/v1/manifest.json +79 -2
- package/generated/v1/openapi.json +4084 -2023
- package/generated/v1/policy-matrix.json +22 -1
- package/generated/v1/schemas/attempts.list.response.json +10 -0
- package/generated/v1/schemas/attempts.read.response.json +10 -0
- package/generated/v1/schemas/attempts.search.response.json +4 -0
- package/generated/v1/schemas/billing.notices.query.json +4 -0
- package/generated/v1/schemas/billing.noticesdismiss.request.json +12 -0
- package/generated/v1/schemas/billing.noticesdismiss.response.json +22 -0
- package/generated/v1/schemas/billing.reconcile.response.json +43 -0
- package/generated/v1/schemas/billing.summary.response.json +43 -0
- package/generated/v1/schemas/endpoints.list.query.json +15 -0
- package/generated/v1/schemas/executions.list.response.json +4 -0
- package/generated/v1/schemas/occurrences.list.response.json +4 -0
- package/generated/v1/schemas/occurrences.read.response.json +4 -0
- package/generated/v1/schemas/occurrences.redeliver.response.json +10 -0
- package/generated/v1/schemas/projectnotifications.read.response.json +4 -0
- package/generated/v1/schemas/projectnotifications.rotateSigningKey.response.json +4 -0
- package/generated/v1/schemas/projectnotifications.update.request.json +41 -17
- package/generated/v1/schemas/projectnotifications.update.response.json +4 -0
- package/generated/v1/schemas/projects.list.response.json +0 -27
- package/generated/v1/schemas/projects.read.response-headers.json +11 -0
- package/generated/v1/schemas/projects.read.response.json +79 -0
- package/generated/v1/schemas/schedules.archive.response.json +8 -0
- package/generated/v1/schemas/schedules.cancel.response.json +8 -0
- package/generated/v1/schemas/schedules.create.request.json +1 -1
- package/generated/v1/schemas/schedules.create.response.json +8 -0
- package/generated/v1/schemas/schedules.list.query.json +6 -0
- package/generated/v1/schemas/schedules.list.response.json +4 -0
- package/generated/v1/schemas/schedules.pause.response.json +8 -0
- package/generated/v1/schemas/schedules.read.response.json +8 -0
- package/generated/v1/schemas/schedules.replace.request.json +1 -1
- package/generated/v1/schemas/schedules.replace.response.json +8 -0
- package/generated/v1/schemas/schedules.resume.response.json +8 -0
- package/generated/v1/schemas/schedules.summary.query.json +11 -0
- package/generated/v1/schemas/schedules.summary.response.json +144 -0
- package/generated/v1/schemas/timing.summary.response.json +69 -0
- package/generated/v1/snippets/billing.noticesdismiss.json +6 -0
- package/generated/v1/snippets/projectnotifications.rotateSigningKey.json +1 -1
- package/generated/v1/snippets/projects.read.json +6 -0
- package/generated/v1/snippets/schedules.summary.json +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export { ANY_ID_PATTERN, ID_ALPHABET, ID_PREFIXES, apiCredentialEventIdSchema, a
|
|
|
4
4
|
export { durationSecondsSchema, timeZoneSchema, timestampSchema, toTimestamp, } 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, } from "./authority.js";
|
|
6
6
|
export { PROBLEM_CATEGORIES, PROBLEM_CODES, fieldErrorSchema, isRetryable, problem, problemCategorySchema, problemCodeSchema, problemSchema, } 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, SCHEDULE_ORDERS, } 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, SCHEDULE_ORDERS, SCHEDULE_DIRECTIONS, } 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, } 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, } from "./secrets.js";
|
|
10
10
|
export { MAX_PARTITION_SHARDS, PROJECTION_DRAIN_LIMIT, SINGLE_SHARD, partitionInstanceName, partitionShardCount, partitionShardFor, partitionShardForIdempotencyKey, } 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, } from "./compatibility.js";
|
|
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
|
-
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, 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";
|
|
16
|
+
export { PROJECT_LIST_LIMIT, PROJECT_STATUSES, environmentSchema, organizationSchema, projectCreateRequestSchema, projectArchiveRequestSchema, projectDeletedSchema, projectDeletionCountsSchema, projectListItemSchema, 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, 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, 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, scheduleNameSchema, scheduleLatenessRequestSchema, scheduleLatenessSchema, schedulePageSchema, SCHEDULE_SUMMARY_DAYS, SCHEDULE_SUMMARY_MAX_AGE_SECONDS, SCHEDULE_SUMMARY_PAUSED_SAMPLE, scheduleSummaryRequestSchema, scheduleSummarySchema, 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";
|
|
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, } 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, } 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, callbackEndpointRequestSchema, callbackEndpointRotatedSchema, callbackEndpointSchema, callbackEndpointSigningSecretsSchema, callbackEndpointStatusSchema, callbackSigningKeyRotationRequestSchema, callbackSigningKeysSchema, callbackEgressFailureSchema, callbackUrlSchema, endpointDashboardPath, signingSecretNotice, signingSecretNoticeSchema, } 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, FORECAST_BREAKDOWNS, FORECAST_COMPATIBILITY, FORECAST_RULES, FORECAST_WINDOW_VERSION, decideForecastAnswer, forecastBreakdownSchema, forecastBucketSchema, forecastBucketStartMs, forecastLatencyCountsSchema, forecastRequestSchema, forecastSchema, forecastViolations, forecastWindowBucketSchema, forecastWindowViolations, forecastWindowsSchema, mergeForecastBuckets, parseForecastRequest, resolveForecastWindow, topPartitionKeys, } 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, } from "./first-value-journey.js";
|
|
27
27
|
export { BILLABLE_TERMINAL_STATES, USAGE_BOUNDS, USAGE_WINDOW_REASONS, billableTerminalStateSchema, parseUsageRequest, resolveUsageWindow, usageDaySchema, usageRequestSchema, usageSchema, utcMidnightMs, } 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, } from "./billing.js";
|
|
29
|
-
export { DELIVERY_TIMING_TARGETS_MS, DELIVERY_TIMING_VERDICTS, deliveryTimingSummarySchema, timingThresholdSummarySchema, } 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, } from "./billing.js";
|
|
29
|
+
export { DELIVERY_TIMING_POLICY_VERSION, DELIVERY_TIMING_TARGETS_MS, bandTimingSummarySchema, DELIVERY_TIMING_VERDICTS, deliveryTimingSummarySchema, timingThresholdSummarySchema, } 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, } from "./test-sink.js";
|
|
31
31
|
export { PROMOTION_BENEFIT_KINDS, billingPromotionsSchema, billingRedeemRequestSchema, billingRedeemResponseSchema, promotionCodeSchema, promotionGrantViewSchema, PROJECT_BILLING_ACTIONS, projectBillingQuoteRequestSchema, projectBillingQuoteSchema, projectBillingChangeRequestSchema, projectBillingStateSchema, billingPortalSchema, BILLING_PAYMENT_METHOD_REQUIRED_TITLE, billingPaymentMethodSchema, billingPaymentMethodSetupRequestSchema, billingPaymentMethodConfirmRequestSchema, billingPaymentMethodRemoveRequestSchema, billingInvoiceSchema, billingInvoiceListSchema, billingPaymentHistoryPageSchema, billingInvoiceHistoryPageSchema, } from "./billing.js";
|
|
32
32
|
export { effectiveCustomerLimitsSchema, } 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, } from "./project-notifications.js";
|
|
36
|
+
export { PROJECT_NOTIFICATION_OPERATIONS, notificationEmailRecipientsSchema, notificationEmailSettingsSchema, statusWebhookEventSchema, statusWebhookConfigurationSchema, statusWebhookEndpointConfigurationSchema, projectNotificationSettingsSchema, projectNotificationSettingsUpdateRequestSchema, statusSigningKeyRequestSchema, statusSigningKeyCreatedSchema, statusWebhookPayloadSchema, statusWebhookDeliverySchema, statusWebhookDeliveryPageSchema, } from "./project-notifications.js";
|
|
37
37
|
export { externalIdentifierSchema, scheduleTagSchema, scheduleTagsSchema, } from "./host-correlation.js";
|
|
38
38
|
export { scheduleSelectionSchema, normalizeScheduleSelection, } from "./schedule-selection.js";
|
|
39
39
|
export * from "./bulk-operations.js";
|
|
40
40
|
export { executionSelectionSchema, normalizeExecutionSelection, } 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, } from "./service-mode.js";
|
package/dist/mcp.js
CHANGED
|
@@ -56,6 +56,7 @@ export const MCP_INSTRUCTIONS = [
|
|
|
56
56
|
"GreatWait schedules work and delivers it to an endpoint at the time asked for.",
|
|
57
57
|
"Every tool acts inside one organization, project and environment, fixed by the credential this connection was authorized with; no argument can name another, and there is no tool that moves between them.",
|
|
58
58
|
"Reads are safe to repeat. Writes are annotated, and the ones marked destructive settle or discard an occurrence that would otherwise have fired.",
|
|
59
|
+
"List tools return one page (25 items by default, at most 100) and a `nextCursor` while more remain: follow `nextCursor` until it is absent before counting, ranking or concluding something does not exist, and use schedules_summary for whole-project schedule counts.",
|
|
59
60
|
"A refusal comes back as a problem document with a stable `code`: act on the code, not on the wording.",
|
|
60
61
|
].join(" ");
|
|
61
62
|
/**
|
|
@@ -31,27 +31,8 @@ export declare const OPERATIONAL_TIMING: Readonly<{
|
|
|
31
31
|
claimReclaimWindowMs: 1200;
|
|
32
32
|
controlPlaneBackoffCeilingMs: 200;
|
|
33
33
|
controlPlaneConnectMs: 5000;
|
|
34
|
-
conclusionReplayDelaysMs: readonly [250, 1000, 2000, 4000];
|
|
35
|
-
hostFullRetryMs: 1000;
|
|
36
34
|
deliveryRetryBaseMs: readonly [2000, 5000, 15000, 60000];
|
|
37
35
|
deliveryRetryAfterMaximumMs: 3600000;
|
|
38
|
-
wakeReceiptRetryMs: 5000;
|
|
39
|
-
wakeReceiptRecoveryLifetimeMs: number;
|
|
40
|
-
repairOverdueGraceSeconds: 10;
|
|
41
|
-
admissionWindowMs: 1000;
|
|
42
|
-
admissionLookaheadMs: 60000;
|
|
43
|
-
admissionHedgeAfterMs: 250;
|
|
44
|
-
admissionRpcBudgetMs: 2999;
|
|
45
|
-
unreachableRetryMs: 5000;
|
|
46
|
-
heldResponseStepMarginMs: 20000;
|
|
47
|
-
sendLeaseMarginSeconds: 12;
|
|
48
|
-
sendSettlementReserveMs: 7000;
|
|
49
|
-
exhaustedClaimRetryMs: 250;
|
|
50
|
-
retentionCadenceMs: number;
|
|
51
|
-
retentionBacklogCadenceMs: number;
|
|
52
|
-
retentionRetryHandoffCount: 5;
|
|
53
|
-
timerSignalRetryDelaysMs: readonly number[];
|
|
54
|
-
dispatchWarmHorizonMs: 10000;
|
|
55
36
|
sdkAutoRetryCount: 3;
|
|
56
37
|
sdkAutoRetryBaseMs: 250;
|
|
57
38
|
sdkAutoRetryMaximumWaitMs: 30000;
|
|
@@ -85,13 +66,108 @@ export declare const OPERATIONAL_TIMING: Readonly<{
|
|
|
85
66
|
forecastRefreshMaximumMs: 300000;
|
|
86
67
|
forecastCoverageSlackMs: 120000;
|
|
87
68
|
}>;
|
|
69
|
+
/**
|
|
70
|
+
* The approved service-mode policy (W12-02, FXO-3171; owner decision
|
|
71
|
+
* 2026-10-14, docs/archive/warm-worker-scheduling/project-spec.md § Customer
|
|
72
|
+
* contract). Product decisions, not tuning: a change is a change to what
|
|
73
|
+
* customers were promised, and `service-mode.test.ts` holds the approved values.
|
|
74
|
+
*
|
|
75
|
+
* - `auto` resolves a one-off planned below `autoRealtimeBelowMs` after its
|
|
76
|
+
* acceptance to `realtime`; exactly at the threshold it is bulk.
|
|
77
|
+
* - Bulk work below `shortBulkBelowMs` (one-off lead, or a recurrence's shorter
|
|
78
|
+
* adjacent gap) uses the short-bulk band; at and above it, ordinary bulk.
|
|
79
|
+
* - Each band's first eligibility rounds up to its quantum; an instant already
|
|
80
|
+
* on a boundary is unchanged.
|
|
81
|
+
* - The p95 first-outbound lateness targets are engineering targets, never an
|
|
82
|
+
* SLA, and nothing in the send path reads them.
|
|
83
|
+
*/
|
|
84
|
+
export declare const SERVICE_MODE_POLICY: Readonly<{
|
|
85
|
+
autoRealtimeBelowMs: 60000;
|
|
86
|
+
shortBulkBelowMs: 300000;
|
|
87
|
+
quantumMs: Readonly<{
|
|
88
|
+
readonly realtime: 250;
|
|
89
|
+
readonly short_bulk: 5000;
|
|
90
|
+
readonly bulk: 50000;
|
|
91
|
+
}>;
|
|
92
|
+
firstOutboundP95TargetMs: Readonly<{
|
|
93
|
+
readonly realtime: 1000;
|
|
94
|
+
readonly short_bulk: 10000;
|
|
95
|
+
readonly bulk: 60000;
|
|
96
|
+
}>;
|
|
97
|
+
}>;
|
|
98
|
+
/**
|
|
99
|
+
* W12-03: bounded approximate warm API abuse controls. These are estimated
|
|
100
|
+
* safety settings, independent of exact plan/accounting limits. API topology
|
|
101
|
+
* is a required deployment input, never inferred from execution-only nodes.
|
|
102
|
+
* Pure local-object initializers let Worker bundles omit unused warm settings;
|
|
103
|
+
* referenced settings still freeze at runtime.
|
|
104
|
+
*/
|
|
105
|
+
export declare const WARM_API_ADMISSION: Readonly<{
|
|
106
|
+
maximumEntries: 100000;
|
|
107
|
+
minimumBurst: 1;
|
|
108
|
+
expirySweepLimit: 100;
|
|
109
|
+
failureLogIntervalMs: 60000;
|
|
110
|
+
maximumApiNodes: 10000;
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* The warm claim path's starting settings
|
|
114
|
+
* (docs/archive/warm-worker-scheduling/implementation-guide.md § Boundaries
|
|
115
|
+
* and parameter ownership, § Bounded discovery and fairness). **Estimated**:
|
|
116
|
+
* bounded-work settings, not measured capacity, a fairness SLA or a customer
|
|
117
|
+
* promise. Tune one only after an observation shows it is the limit, and record
|
|
118
|
+
* the observation in the handoff.
|
|
119
|
+
*
|
|
120
|
+
* - A claim takes at most `claimTarget` occurrences, never more than
|
|
121
|
+
* `claimMaximum`, and never more than the worker's free local capacity.
|
|
122
|
+
* - One claim transaction inspects at most `inspectionCap` narrow occurrence
|
|
123
|
+
* rows across all its probes, and walks at most that many catalog scopes.
|
|
124
|
+
* - The catalog is read `catalogPageScopes` scopes at a time; each eligible
|
|
125
|
+
* scope's due probe returns at most `perScopeProbe` rows per pass. Refill
|
|
126
|
+
* passes after the catalog walk may take more from a scope that filled its
|
|
127
|
+
* share, within the same inspection cap.
|
|
128
|
+
* - An empty realtime lane polls again after `realtimeEmptyPollMs`. The bulk
|
|
129
|
+
* lanes poll at their band's next boundary
|
|
130
|
+
* (`SERVICE_MODE_POLICY.quantumMs`), the instant their work becomes eligible.
|
|
131
|
+
*/
|
|
132
|
+
export declare const WARM_CLAIM_SETTINGS: Readonly<{
|
|
133
|
+
claimTarget: 100;
|
|
134
|
+
claimMaximum: 500;
|
|
135
|
+
inspectionCap: 2000;
|
|
136
|
+
catalogPageScopes: 64;
|
|
137
|
+
perScopeProbe: 25;
|
|
138
|
+
realtimeEmptyPollMs: 250;
|
|
139
|
+
}>;
|
|
140
|
+
/** W12-05 estimated bounded-work settings, not capacity or customer promises. */
|
|
141
|
+
export declare const WARM_SEND_SETTINGS: Readonly<{
|
|
142
|
+
pacingRequestBudgetMs: 100;
|
|
143
|
+
pacingOwnerBudgetMs: 80;
|
|
144
|
+
pacingClockSkewMs: 2000;
|
|
145
|
+
pacingMaxBatch: 100;
|
|
146
|
+
pacingHardMaxBatch: 500;
|
|
147
|
+
pacingMaxBytes: number;
|
|
148
|
+
activationRefreshMs: 1000;
|
|
149
|
+
activationPageSize: 256;
|
|
150
|
+
activationCacheBytes: number;
|
|
151
|
+
reactiveActivationMs: 30000;
|
|
152
|
+
settlementTarget: 100;
|
|
153
|
+
settlementHardMax: 500;
|
|
154
|
+
settlementMaxBytes: number;
|
|
155
|
+
settlementMaxAgeMs: 50;
|
|
156
|
+
}>;
|
|
157
|
+
/** W12-06 billing cadence and bounded shared-loop polling. Not permission timeouts. */
|
|
158
|
+
export declare const WARM_BILLING_SETTINGS: Readonly<{
|
|
159
|
+
quietMs: 1000;
|
|
160
|
+
oldestPendingMs: 30000;
|
|
161
|
+
detailMs: 60000;
|
|
162
|
+
idlePollMs: 1000;
|
|
163
|
+
}>;
|
|
88
164
|
export type OperationalTimingKey = keyof typeof OPERATIONAL_TIMING;
|
|
89
165
|
export declare const OPERATIONAL_TIMING_ENFORCEMENT: Readonly<Record<OperationalTimingKey, readonly string[]>>;
|
|
90
166
|
/** Catalog metadata derives its defaults from the numeric owner above. */
|
|
91
167
|
export declare const OPERATIONAL_TIMING_CATALOG: readonly Readonly<{
|
|
92
|
-
key: "operational.projectBillingConflictRetryCount" | "operational.projectBillingConflictRetryBaseMs" | "operational.billingNoticeBackoffBaseMs" | "operational.automaticFundingBackoffBaseMs" | "operational.controlPlaneBackoffBaseMs" | "operational.postgresConnectionAcquisitionMs" | "operational.postgresLockMs" | "operational.postgresStatementMs" | "operational.postgresTransactionBudgetMs" | "operational.postgresTransactionMaximumMs" | "operational.apiMutationStatementMs" | "operational.apiMutationBudgetMs" | "operational.apiMutationMaximumMs" | "operational.controlPlaneWriteStatementMs" | "operational.controlPlaneWriteBudgetMs" | "operational.dispatchHedgeAfterMs" | "operational.dispatchHedgeThirdLegMs" | "operational.apiHedgeAfterMs" | "operational.authorizationReplayDelaysMs" | "operational.claimProbeCount" | "operational.claimReclaimCount" | "operational.claimReclaimWindowMs" | "operational.controlPlaneBackoffCeilingMs" | "operational.controlPlaneConnectMs" | "operational.
|
|
93
|
-
default: number | readonly
|
|
94
|
-
unit: "
|
|
168
|
+
key: "operational.projectBillingConflictRetryCount" | "operational.projectBillingConflictRetryBaseMs" | "operational.billingNoticeBackoffBaseMs" | "operational.automaticFundingBackoffBaseMs" | "operational.controlPlaneBackoffBaseMs" | "operational.postgresConnectionAcquisitionMs" | "operational.postgresLockMs" | "operational.postgresStatementMs" | "operational.postgresTransactionBudgetMs" | "operational.postgresTransactionMaximumMs" | "operational.apiMutationStatementMs" | "operational.apiMutationBudgetMs" | "operational.apiMutationMaximumMs" | "operational.controlPlaneWriteStatementMs" | "operational.controlPlaneWriteBudgetMs" | "operational.dispatchHedgeAfterMs" | "operational.dispatchHedgeThirdLegMs" | "operational.apiHedgeAfterMs" | "operational.authorizationReplayDelaysMs" | "operational.claimProbeCount" | "operational.claimReclaimCount" | "operational.claimReclaimWindowMs" | "operational.controlPlaneBackoffCeilingMs" | "operational.controlPlaneConnectMs" | "operational.deliveryRetryBaseMs" | "operational.deliveryRetryAfterMaximumMs" | "operational.sdkAutoRetryCount" | "operational.sdkAutoRetryBaseMs" | "operational.sdkAutoRetryMaximumWaitMs" | "operational.callbackMiddlewareLeaseMs" | "operational.automaticFundingSuccessCooldownMs" | "operational.automaticFundingClaimLeaseMs" | "operational.automaticFundingBackoffMaximumMs" | "operational.providerCreateFenceMs" | "operational.fundingUnresolvedAfterMs" | "operational.fundingRepairMs" | "operational.fundingActionRequiredRepairMs" | "operational.fundingDisputeRepairMs" | "operational.billingNoticeBackoffMaximumMs" | "operational.billingNoticeClaimMaximumMs" | "operational.billingNoticeRetryMaximumMs" | "operational.billingNoticeCatchUpRetryCount" | "operational.billingNoticeClaimSeconds" | "operational.fundingDiscoveryClaimMs" | "operational.fundingDiscoveryRetryMaximumMs" | "operational.fundingDiscoveryClaimMaximumMs" | "operational.fundingAbandonedAfterMs" | "operational.checkoutDiscoverySkewSeconds" | "operational.checkoutDiscoveryWindowSeconds" | "operational.fundingQuoteLifetimeMs" | "operational.automaticFundingPreviewLifetimeMs" | "operational.testSinkRefreshMs" | "operational.payloadLintDelayMs" | "operational.payloadParseBudgetMs" | "operational.dashboardQueryStaleMs" | "operational.forecastRefreshFloorMs" | "operational.forecastRefreshMaximumMs" | "operational.forecastCoverageSlackMs";
|
|
169
|
+
default: number | readonly [500, 1500, 4000] | readonly [2000, 5000, 15000, 60000];
|
|
170
|
+
unit: "seconds" | "count" | "milliseconds";
|
|
95
171
|
scope: "deployment";
|
|
96
172
|
permittedLayers: readonly ["deployment"];
|
|
97
173
|
visibility: "operator";
|
|
@@ -99,3 +175,79 @@ export declare const OPERATIONAL_TIMING_CATALOG: readonly Readonly<{
|
|
|
99
175
|
rationale: "Retain the existing measured or copied operating policy; the enforcement owner documents its evidence";
|
|
100
176
|
enforcement: readonly string[];
|
|
101
177
|
}>[];
|
|
178
|
+
/** Estimated CPU/storage policy; writes stay off until readers and rollback agree. */
|
|
179
|
+
export declare const PAYLOAD_COMPRESSION_POLICY: Readonly<{
|
|
180
|
+
newEnvelopeWrites: false;
|
|
181
|
+
minimumBodyBytes: 1024;
|
|
182
|
+
gzipLevel: 1;
|
|
183
|
+
minimumSavingsBytes: 128;
|
|
184
|
+
minimumSavingsRatio: 0.1;
|
|
185
|
+
maximumConcurrentJobs: 2;
|
|
186
|
+
}>;
|
|
187
|
+
/** Explicit rollout switch: unset/off preserves every legacy rollback image. */
|
|
188
|
+
export declare function readPayloadEnvelopeWrites(raw: string | undefined): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* W10 scaling signals, dedicated-pool fallback and forecast herd hints
|
|
191
|
+
* (docs/archive/warm-worker-scheduling/implementation-guide.md § W10 and
|
|
192
|
+
* scaling-signals-contract.md). **Estimated** starting settings, not measured
|
|
193
|
+
* capacity, a controller tick or a customer promise. Fleet size and database
|
|
194
|
+
* tier remain operator deployment inputs (apps/api/src/node/control-settings.ts).
|
|
195
|
+
*
|
|
196
|
+
* - Every process writes one registry heartbeat per `heartbeatMs`; a heartbeat
|
|
197
|
+
* older than `heartbeatStaleMs` is reported stale, never as proof that its
|
|
198
|
+
* connections are released. A cleanly stopped row is deleted after
|
|
199
|
+
* `workerRetentionMs`; a stale row that never reported a stop is kept and
|
|
200
|
+
* reported as unconfirmed for `unconfirmedRetentionMs`. Deletion runs
|
|
201
|
+
* `workerRetentionBatch` rows at a time.
|
|
202
|
+
* - A dedicated pool with members but no live serving process for
|
|
203
|
+
* `dedicatedFallbackGraceMs` is served by shared workers for new claims.
|
|
204
|
+
* - The forecast sweep reads at most `forecastCatalogScopes` scopes in pages of
|
|
205
|
+
* `forecastCatalogPageScopes`, at most `forecastScopeRows` due-or-upcoming rows
|
|
206
|
+
* per scope and band, and at most `forecastRowBudget` rows in all, over
|
|
207
|
+
* `forecastHorizonMs`, aggregated by `forecastBucketMs` of rounded
|
|
208
|
+
* eligibility. Snapshot windows aggregate those buckets by `forecastWindowMs`.
|
|
209
|
+
* - One leased node runs the herd tick every `forecastTickMs`; its lease lasts
|
|
210
|
+
* `forecastLeaseMs`. A herd hint starts two hint refresh periods plus the
|
|
211
|
+
* pacing request budget before the herd and lasts through its predicted drain
|
|
212
|
+
* plus `herdTailMs`. Each owner gets one bounded touch on detection and one
|
|
213
|
+
* more inside `prewarmLeadMs` only if the first fell outside it; at most
|
|
214
|
+
* `prewarmMaxOwners` owners are touched per tick.
|
|
215
|
+
*/
|
|
216
|
+
export declare const WARM_SCALING_SETTINGS: Readonly<{
|
|
217
|
+
heartbeatMs: 10000;
|
|
218
|
+
heartbeatStaleMs: 30000;
|
|
219
|
+
dedicatedFallbackGraceMs: 60000;
|
|
220
|
+
workerRetentionMs: number;
|
|
221
|
+
unconfirmedRetentionMs: number;
|
|
222
|
+
workerRetentionBatch: 100;
|
|
223
|
+
registryReadLimit: 1000;
|
|
224
|
+
poolReadLimit: 256;
|
|
225
|
+
poolMemberCountLimit: 10000;
|
|
226
|
+
forecastTickMs: 10000;
|
|
227
|
+
forecastLeaseMs: 30000;
|
|
228
|
+
forecastHorizonMs: number;
|
|
229
|
+
forecastBucketMs: 1000;
|
|
230
|
+
forecastWindowMs: 10000;
|
|
231
|
+
forecastCatalogPageScopes: 64;
|
|
232
|
+
forecastCatalogScopes: 256;
|
|
233
|
+
forecastScopeRows: 256;
|
|
234
|
+
forecastRowBudget: 16384;
|
|
235
|
+
herdTailMs: 30000;
|
|
236
|
+
prewarmLeadMs: 10000;
|
|
237
|
+
prewarmMaxOwners: 100;
|
|
238
|
+
}>;
|
|
239
|
+
/** W07 estimated bounded maintenance cadence. Domain retention/backoff horizons
|
|
240
|
+
* retain their existing owners; these values only schedule discovery. */
|
|
241
|
+
export declare const WARM_BACKGROUND_SETTINGS: Readonly<{
|
|
242
|
+
recoveryPollMs: 1000;
|
|
243
|
+
repairPollMs: 60000;
|
|
244
|
+
maintenanceObservationMs: 60000;
|
|
245
|
+
batchLimit: 100;
|
|
246
|
+
statusClaimLimit: 8;
|
|
247
|
+
}>;
|
|
248
|
+
/** Internal diagnostic/rebuild copies only; financial-ledger retention is separate. */
|
|
249
|
+
export declare const BILLING_OUTBOX_HISTORY_MS: number;
|
|
250
|
+
/** Deployment controls for a coordinated stop/drain/switch, never tenant routing. */
|
|
251
|
+
export declare function readLegacyRuntimeState(raw: unknown): "active" | "draining" | "stopped";
|
|
252
|
+
export declare function readIntakePaused(raw: unknown): boolean;
|
|
253
|
+
export declare function readWarmOwnersEnabled(raw: unknown): boolean;
|
|
@@ -31,27 +31,8 @@ export const OPERATIONAL_TIMING = Object.freeze({
|
|
|
31
31
|
claimReclaimWindowMs: 1_200,
|
|
32
32
|
controlPlaneBackoffCeilingMs: 200,
|
|
33
33
|
controlPlaneConnectMs: 5_000,
|
|
34
|
-
conclusionReplayDelaysMs: Object.freeze([250, 1_000, 2_000, 4_000]),
|
|
35
|
-
hostFullRetryMs: 1_000,
|
|
36
34
|
deliveryRetryBaseMs: Object.freeze([2_000, 5_000, 15_000, 60_000]),
|
|
37
35
|
deliveryRetryAfterMaximumMs: 3_600_000,
|
|
38
|
-
wakeReceiptRetryMs: 5_000,
|
|
39
|
-
wakeReceiptRecoveryLifetimeMs: 9 * 60_000,
|
|
40
|
-
repairOverdueGraceSeconds: 10,
|
|
41
|
-
admissionWindowMs: 1_000,
|
|
42
|
-
admissionLookaheadMs: 60_000,
|
|
43
|
-
admissionHedgeAfterMs: 250,
|
|
44
|
-
admissionRpcBudgetMs: 2_999,
|
|
45
|
-
unreachableRetryMs: 5_000,
|
|
46
|
-
heldResponseStepMarginMs: 20_000,
|
|
47
|
-
sendLeaseMarginSeconds: 12,
|
|
48
|
-
sendSettlementReserveMs: 7_000,
|
|
49
|
-
exhaustedClaimRetryMs: 250,
|
|
50
|
-
retentionCadenceMs: 60 * 60 * 1_000,
|
|
51
|
-
retentionBacklogCadenceMs: 60 * 1_000,
|
|
52
|
-
retentionRetryHandoffCount: 5,
|
|
53
|
-
timerSignalRetryDelaysMs: Object.freeze([250, 1_000]),
|
|
54
|
-
dispatchWarmHorizonMs: 10_000,
|
|
55
36
|
sdkAutoRetryCount: 3,
|
|
56
37
|
sdkAutoRetryBaseMs: 250,
|
|
57
38
|
sdkAutoRetryMaximumWaitMs: 30_000,
|
|
@@ -85,6 +66,109 @@ export const OPERATIONAL_TIMING = Object.freeze({
|
|
|
85
66
|
forecastRefreshMaximumMs: 300_000,
|
|
86
67
|
forecastCoverageSlackMs: 120_000,
|
|
87
68
|
});
|
|
69
|
+
// Share the literal without a cross-object property read: that read prevents
|
|
70
|
+
// Workers from tree-shaking the otherwise unused warm claim settings.
|
|
71
|
+
const REALTIME_ELIGIBILITY_QUANTUM_MS = 250;
|
|
72
|
+
/**
|
|
73
|
+
* The approved service-mode policy (W12-02, FXO-3171; owner decision
|
|
74
|
+
* 2026-10-14, docs/archive/warm-worker-scheduling/project-spec.md § Customer
|
|
75
|
+
* contract). Product decisions, not tuning: a change is a change to what
|
|
76
|
+
* customers were promised, and `service-mode.test.ts` holds the approved values.
|
|
77
|
+
*
|
|
78
|
+
* - `auto` resolves a one-off planned below `autoRealtimeBelowMs` after its
|
|
79
|
+
* acceptance to `realtime`; exactly at the threshold it is bulk.
|
|
80
|
+
* - Bulk work below `shortBulkBelowMs` (one-off lead, or a recurrence's shorter
|
|
81
|
+
* adjacent gap) uses the short-bulk band; at and above it, ordinary bulk.
|
|
82
|
+
* - Each band's first eligibility rounds up to its quantum; an instant already
|
|
83
|
+
* on a boundary is unchanged.
|
|
84
|
+
* - The p95 first-outbound lateness targets are engineering targets, never an
|
|
85
|
+
* SLA, and nothing in the send path reads them.
|
|
86
|
+
*/
|
|
87
|
+
export const SERVICE_MODE_POLICY = Object.freeze({
|
|
88
|
+
autoRealtimeBelowMs: 60_000,
|
|
89
|
+
shortBulkBelowMs: 300_000,
|
|
90
|
+
quantumMs: Object.freeze({
|
|
91
|
+
realtime: REALTIME_ELIGIBILITY_QUANTUM_MS,
|
|
92
|
+
short_bulk: 5_000,
|
|
93
|
+
bulk: 50_000,
|
|
94
|
+
}),
|
|
95
|
+
firstOutboundP95TargetMs: Object.freeze({
|
|
96
|
+
realtime: 1_000,
|
|
97
|
+
short_bulk: 10_000,
|
|
98
|
+
bulk: 60_000,
|
|
99
|
+
}),
|
|
100
|
+
});
|
|
101
|
+
/**
|
|
102
|
+
* W12-03: bounded approximate warm API abuse controls. These are estimated
|
|
103
|
+
* safety settings, independent of exact plan/accounting limits. API topology
|
|
104
|
+
* is a required deployment input, never inferred from execution-only nodes.
|
|
105
|
+
* Pure local-object initializers let Worker bundles omit unused warm settings;
|
|
106
|
+
* referenced settings still freeze at runtime.
|
|
107
|
+
*/
|
|
108
|
+
export const WARM_API_ADMISSION = /* @__PURE__ */ Object.freeze({
|
|
109
|
+
maximumEntries: 100_000,
|
|
110
|
+
minimumBurst: 1,
|
|
111
|
+
expirySweepLimit: 100,
|
|
112
|
+
failureLogIntervalMs: 60_000,
|
|
113
|
+
maximumApiNodes: 10_000,
|
|
114
|
+
});
|
|
115
|
+
// ---- W12-04 (FXO-3173) warm claim settings: begin ----
|
|
116
|
+
/**
|
|
117
|
+
* The warm claim path's starting settings
|
|
118
|
+
* (docs/archive/warm-worker-scheduling/implementation-guide.md § Boundaries
|
|
119
|
+
* and parameter ownership, § Bounded discovery and fairness). **Estimated**:
|
|
120
|
+
* bounded-work settings, not measured capacity, a fairness SLA or a customer
|
|
121
|
+
* promise. Tune one only after an observation shows it is the limit, and record
|
|
122
|
+
* the observation in the handoff.
|
|
123
|
+
*
|
|
124
|
+
* - A claim takes at most `claimTarget` occurrences, never more than
|
|
125
|
+
* `claimMaximum`, and never more than the worker's free local capacity.
|
|
126
|
+
* - One claim transaction inspects at most `inspectionCap` narrow occurrence
|
|
127
|
+
* rows across all its probes, and walks at most that many catalog scopes.
|
|
128
|
+
* - The catalog is read `catalogPageScopes` scopes at a time; each eligible
|
|
129
|
+
* scope's due probe returns at most `perScopeProbe` rows per pass. Refill
|
|
130
|
+
* passes after the catalog walk may take more from a scope that filled its
|
|
131
|
+
* share, within the same inspection cap.
|
|
132
|
+
* - An empty realtime lane polls again after `realtimeEmptyPollMs`. The bulk
|
|
133
|
+
* lanes poll at their band's next boundary
|
|
134
|
+
* (`SERVICE_MODE_POLICY.quantumMs`), the instant their work becomes eligible.
|
|
135
|
+
*/
|
|
136
|
+
export const WARM_CLAIM_SETTINGS = /* @__PURE__ */ Object.freeze({
|
|
137
|
+
claimTarget: 100,
|
|
138
|
+
claimMaximum: 500,
|
|
139
|
+
inspectionCap: 2_000,
|
|
140
|
+
catalogPageScopes: 64,
|
|
141
|
+
perScopeProbe: 25,
|
|
142
|
+
// An empty lane needs at most one look per eligibility quantum. Productive
|
|
143
|
+
// catalog passes still drain immediately, without waiting to fill a batch.
|
|
144
|
+
realtimeEmptyPollMs: REALTIME_ELIGIBILITY_QUANTUM_MS,
|
|
145
|
+
});
|
|
146
|
+
// ---- W12-04 (FXO-3173) warm claim settings: end ----
|
|
147
|
+
/** W12-05 estimated bounded-work settings, not capacity or customer promises. */
|
|
148
|
+
export const WARM_SEND_SETTINGS = /* @__PURE__ */ Object.freeze({
|
|
149
|
+
pacingRequestBudgetMs: 100,
|
|
150
|
+
// Leave response transit room inside the Node caller's whole request budget.
|
|
151
|
+
pacingOwnerBudgetMs: 80,
|
|
152
|
+
pacingClockSkewMs: 2_000,
|
|
153
|
+
pacingMaxBatch: 100,
|
|
154
|
+
pacingHardMaxBatch: 500,
|
|
155
|
+
pacingMaxBytes: 256 * 1024,
|
|
156
|
+
activationRefreshMs: 1_000,
|
|
157
|
+
activationPageSize: 256,
|
|
158
|
+
activationCacheBytes: 4 * 1024 * 1024,
|
|
159
|
+
reactiveActivationMs: 30_000,
|
|
160
|
+
settlementTarget: 100,
|
|
161
|
+
settlementHardMax: 500,
|
|
162
|
+
settlementMaxBytes: 256 * 1024,
|
|
163
|
+
settlementMaxAgeMs: 50,
|
|
164
|
+
});
|
|
165
|
+
/** W12-06 billing cadence and bounded shared-loop polling. Not permission timeouts. */
|
|
166
|
+
export const WARM_BILLING_SETTINGS = /* @__PURE__ */ Object.freeze({
|
|
167
|
+
quietMs: 1_000,
|
|
168
|
+
oldestPendingMs: 30_000,
|
|
169
|
+
detailMs: 60_000,
|
|
170
|
+
idlePollMs: 1_000,
|
|
171
|
+
});
|
|
88
172
|
export const OPERATIONAL_TIMING_ENFORCEMENT = /* @__PURE__ */ (() => Object.freeze({
|
|
89
173
|
forecastRefreshFloorMs: [
|
|
90
174
|
"packages/contracts/src/forecast.ts#OPERATIONAL_TIMING.forecastRefreshFloorMs",
|
|
@@ -155,67 +239,12 @@ export const OPERATIONAL_TIMING_ENFORCEMENT = /* @__PURE__ */ (() => Object.free
|
|
|
155
239
|
controlPlaneConnectMs: [
|
|
156
240
|
"packages/postgres-scheduling/src/control-plane-database.ts#CONTROL_PLANE_CONNECT_TIMEOUT_MS",
|
|
157
241
|
],
|
|
158
|
-
conclusionReplayDelaysMs: [
|
|
159
|
-
"packages/application/src/dialer.ts#DEFAULT_CONCLUSION_RETRY_DELAYS_MS",
|
|
160
|
-
],
|
|
161
|
-
hostFullRetryMs: [
|
|
162
|
-
"packages/application/src/dialer.ts#DEFAULT_HOST_FULL_RETRY_MS",
|
|
163
|
-
],
|
|
164
242
|
deliveryRetryBaseMs: [
|
|
165
243
|
"packages/application/src/schedule-series.ts#RETRY_BASE_MS",
|
|
166
244
|
],
|
|
167
245
|
deliveryRetryAfterMaximumMs: [
|
|
168
246
|
"packages/application/src/schedule-series.ts#MAX_RETRY_AFTER_MS",
|
|
169
247
|
],
|
|
170
|
-
wakeReceiptRetryMs: [
|
|
171
|
-
"packages/application/src/timer-bucket.ts#WAKE_RECEIPT_RETRY_MS",
|
|
172
|
-
],
|
|
173
|
-
wakeReceiptRecoveryLifetimeMs: [
|
|
174
|
-
"packages/application/src/timer-bucket.ts#WAKE_RECEIPT_RECOVERY_LIFETIME_MS",
|
|
175
|
-
],
|
|
176
|
-
repairOverdueGraceSeconds: [
|
|
177
|
-
"packages/application/src/timer-bucket-repair.ts#REPAIR_OVERDUE_GRACE_SECONDS",
|
|
178
|
-
],
|
|
179
|
-
admissionWindowMs: [
|
|
180
|
-
"packages/application/src/admission-window.ts#ADMISSION_WINDOW_MS",
|
|
181
|
-
],
|
|
182
|
-
admissionLookaheadMs: [
|
|
183
|
-
"packages/application/src/admission-window.ts#ADMISSION_WINDOW_MAX_LOOKAHEAD_MS",
|
|
184
|
-
],
|
|
185
|
-
admissionHedgeAfterMs: [
|
|
186
|
-
"packages/delivery-runtime/src/admission-hedge.ts#ADMISSION_HEDGE_AFTER_MS",
|
|
187
|
-
],
|
|
188
|
-
admissionRpcBudgetMs: [
|
|
189
|
-
"packages/delivery-runtime/src/admission-hedge.ts#ADMISSION_RPC_BUDGET_MS",
|
|
190
|
-
],
|
|
191
|
-
unreachableRetryMs: [
|
|
192
|
-
"packages/delivery-runtime/src/dispatch-admission.ts#UNREACHABLE_RETRY_MS",
|
|
193
|
-
],
|
|
194
|
-
heldResponseStepMarginMs: [
|
|
195
|
-
"packages/delivery-runtime/src/held-response-carrier.ts#HELD_RESPONSE_STEP_MARGIN_MS",
|
|
196
|
-
],
|
|
197
|
-
sendLeaseMarginSeconds: [
|
|
198
|
-
"packages/delivery-runtime/src/held-response-carrier.ts#SEND_LEASE_MARGIN_SECONDS",
|
|
199
|
-
],
|
|
200
|
-
sendSettlementReserveMs: [
|
|
201
|
-
"packages/delivery-runtime/src/held-response-carrier.ts#SEND_SETTLEMENT_RESERVE_MS",
|
|
202
|
-
],
|
|
203
|
-
exhaustedClaimRetryMs: [
|
|
204
|
-
"packages/timer-bucket/src/durable-object.ts#EXHAUSTED_CLAIM_RETRY_MS",
|
|
205
|
-
],
|
|
206
|
-
retentionCadenceMs: [
|
|
207
|
-
"packages/retention-worker/src/worker.ts#RETENTION_CADENCE_MS",
|
|
208
|
-
],
|
|
209
|
-
retentionBacklogCadenceMs: [
|
|
210
|
-
"packages/retention-worker/src/worker.ts#RETENTION_BACKLOG_CADENCE_MS",
|
|
211
|
-
],
|
|
212
|
-
retentionRetryHandoffCount: [
|
|
213
|
-
"packages/retention-worker/src/worker.ts#RETENTION_RETRY_HANDOFF_COUNT",
|
|
214
|
-
],
|
|
215
|
-
timerSignalRetryDelaysMs: [
|
|
216
|
-
"apps/api/src/detached-signal.ts#TIMER_SIGNAL_RETRY_DELAYS_MS",
|
|
217
|
-
],
|
|
218
|
-
dispatchWarmHorizonMs: ["apps/api/src/worker.ts#DISPATCH_WARM_HORIZON_MS"],
|
|
219
248
|
sdkAutoRetryCount: [
|
|
220
249
|
"packages/api-client/src/client.ts#SDK_AUTO_RETRY_LIMIT",
|
|
221
250
|
],
|
|
@@ -340,3 +369,107 @@ export const OPERATIONAL_TIMING_CATALOG = /* @__PURE__ */ (() => Object.freeze(O
|
|
|
340
369
|
rationale: "Retain the existing measured or copied operating policy; the enforcement owner documents its evidence",
|
|
341
370
|
enforcement: OPERATIONAL_TIMING_ENFORCEMENT[key],
|
|
342
371
|
}))))();
|
|
372
|
+
// ---- W12-08 (FXO-3177) payload compression begin ----
|
|
373
|
+
/** Estimated CPU/storage policy; writes stay off until readers and rollback agree. */
|
|
374
|
+
export const PAYLOAD_COMPRESSION_POLICY = /* @__PURE__ */ Object.freeze({
|
|
375
|
+
newEnvelopeWrites: false,
|
|
376
|
+
minimumBodyBytes: 1_024,
|
|
377
|
+
gzipLevel: 1,
|
|
378
|
+
minimumSavingsBytes: 128,
|
|
379
|
+
minimumSavingsRatio: 0.1,
|
|
380
|
+
maximumConcurrentJobs: 2,
|
|
381
|
+
});
|
|
382
|
+
/** Explicit rollout switch: unset/off preserves every legacy rollback image. */
|
|
383
|
+
export function readPayloadEnvelopeWrites(raw) {
|
|
384
|
+
if (raw === undefined || raw === "off")
|
|
385
|
+
return false;
|
|
386
|
+
if (raw === "on")
|
|
387
|
+
return true;
|
|
388
|
+
throw new Error("GREATWAIT_PAYLOAD_ENVELOPE_WRITES must be on or off");
|
|
389
|
+
}
|
|
390
|
+
// ---- W12-08 (FXO-3177) payload compression end ----
|
|
391
|
+
// ---- W12-10 (FXO-3179) scaling signals: begin ----
|
|
392
|
+
/**
|
|
393
|
+
* W10 scaling signals, dedicated-pool fallback and forecast herd hints
|
|
394
|
+
* (docs/archive/warm-worker-scheduling/implementation-guide.md § W10 and
|
|
395
|
+
* scaling-signals-contract.md). **Estimated** starting settings, not measured
|
|
396
|
+
* capacity, a controller tick or a customer promise. Fleet size and database
|
|
397
|
+
* tier remain operator deployment inputs (apps/api/src/node/control-settings.ts).
|
|
398
|
+
*
|
|
399
|
+
* - Every process writes one registry heartbeat per `heartbeatMs`; a heartbeat
|
|
400
|
+
* older than `heartbeatStaleMs` is reported stale, never as proof that its
|
|
401
|
+
* connections are released. A cleanly stopped row is deleted after
|
|
402
|
+
* `workerRetentionMs`; a stale row that never reported a stop is kept and
|
|
403
|
+
* reported as unconfirmed for `unconfirmedRetentionMs`. Deletion runs
|
|
404
|
+
* `workerRetentionBatch` rows at a time.
|
|
405
|
+
* - A dedicated pool with members but no live serving process for
|
|
406
|
+
* `dedicatedFallbackGraceMs` is served by shared workers for new claims.
|
|
407
|
+
* - The forecast sweep reads at most `forecastCatalogScopes` scopes in pages of
|
|
408
|
+
* `forecastCatalogPageScopes`, at most `forecastScopeRows` due-or-upcoming rows
|
|
409
|
+
* per scope and band, and at most `forecastRowBudget` rows in all, over
|
|
410
|
+
* `forecastHorizonMs`, aggregated by `forecastBucketMs` of rounded
|
|
411
|
+
* eligibility. Snapshot windows aggregate those buckets by `forecastWindowMs`.
|
|
412
|
+
* - One leased node runs the herd tick every `forecastTickMs`; its lease lasts
|
|
413
|
+
* `forecastLeaseMs`. A herd hint starts two hint refresh periods plus the
|
|
414
|
+
* pacing request budget before the herd and lasts through its predicted drain
|
|
415
|
+
* plus `herdTailMs`. Each owner gets one bounded touch on detection and one
|
|
416
|
+
* more inside `prewarmLeadMs` only if the first fell outside it; at most
|
|
417
|
+
* `prewarmMaxOwners` owners are touched per tick.
|
|
418
|
+
*/
|
|
419
|
+
export const WARM_SCALING_SETTINGS = /* @__PURE__ */ Object.freeze({
|
|
420
|
+
heartbeatMs: 10_000,
|
|
421
|
+
heartbeatStaleMs: 30_000,
|
|
422
|
+
dedicatedFallbackGraceMs: 60_000,
|
|
423
|
+
workerRetentionMs: 24 * 60 * 60_000,
|
|
424
|
+
unconfirmedRetentionMs: 7 * 24 * 60 * 60_000,
|
|
425
|
+
workerRetentionBatch: 100,
|
|
426
|
+
registryReadLimit: 1_000,
|
|
427
|
+
poolReadLimit: 256,
|
|
428
|
+
poolMemberCountLimit: 10_000,
|
|
429
|
+
forecastTickMs: 10_000,
|
|
430
|
+
forecastLeaseMs: 30_000,
|
|
431
|
+
forecastHorizonMs: 10 * 60_000,
|
|
432
|
+
forecastBucketMs: 1_000,
|
|
433
|
+
forecastWindowMs: 10_000,
|
|
434
|
+
forecastCatalogPageScopes: 64,
|
|
435
|
+
forecastCatalogScopes: 256,
|
|
436
|
+
forecastScopeRows: 256,
|
|
437
|
+
forecastRowBudget: 16_384,
|
|
438
|
+
herdTailMs: 30_000,
|
|
439
|
+
prewarmLeadMs: 10_000,
|
|
440
|
+
prewarmMaxOwners: 100,
|
|
441
|
+
});
|
|
442
|
+
// ---- W12-10 (FXO-3179) scaling signals: end ----
|
|
443
|
+
/** W07 estimated bounded maintenance cadence. Domain retention/backoff horizons
|
|
444
|
+
* retain their existing owners; these values only schedule discovery. */
|
|
445
|
+
export const WARM_BACKGROUND_SETTINGS = /* @__PURE__ */ Object.freeze({
|
|
446
|
+
recoveryPollMs: 1_000,
|
|
447
|
+
repairPollMs: 60_000,
|
|
448
|
+
maintenanceObservationMs: 60_000,
|
|
449
|
+
batchLimit: 100,
|
|
450
|
+
statusClaimLimit: 8,
|
|
451
|
+
});
|
|
452
|
+
/** Internal diagnostic/rebuild copies only; financial-ledger retention is separate. */
|
|
453
|
+
export const BILLING_OUTBOX_HISTORY_MS = 90 * 24 * 60 * 60_000;
|
|
454
|
+
/** Deployment controls for a coordinated stop/drain/switch, never tenant routing. */
|
|
455
|
+
export function readLegacyRuntimeState(raw) {
|
|
456
|
+
if (raw === undefined || raw === "active")
|
|
457
|
+
return "active";
|
|
458
|
+
if (raw === "draining" || raw === "stopped")
|
|
459
|
+
return raw;
|
|
460
|
+
throw new Error("GREATWAIT_LEGACY_RUNTIME_STATE must be active, draining or stopped");
|
|
461
|
+
}
|
|
462
|
+
export function readIntakePaused(raw) {
|
|
463
|
+
if (raw === undefined || raw === "off")
|
|
464
|
+
return false;
|
|
465
|
+
if (raw === "on")
|
|
466
|
+
return true;
|
|
467
|
+
throw new Error("GREATWAIT_INTAKE_PAUSED must be on or off");
|
|
468
|
+
}
|
|
469
|
+
export function readWarmOwnersEnabled(raw) {
|
|
470
|
+
if (raw === undefined || raw === "on")
|
|
471
|
+
return true;
|
|
472
|
+
if (raw === "off")
|
|
473
|
+
return false;
|
|
474
|
+
throw new Error("GREATWAIT_WARM_OWNERS must be on or off");
|
|
475
|
+
}
|