import { z } from "zod/v4"; /** Portable versioned wire values only. Eligibility, repricing, freshness, budgets * and execution authority are verified by the configured server. */ export declare const RECURRING_CONTRACT_VERSION: 1; export declare const MAX_RECURRING_CREDITS = 2147483647; export declare const recurringRequestSchema: z.ZodObject<{ contractVersion: z.ZodLiteral<1>; skill: z.ZodString; input: z.ZodRecord; args: z.ZodArray; runtime: z.ZodObject<{ timeoutMs: z.ZodNumber; maxOutputBytes: z.ZodNumber; maxAttempts: z.ZodNumber; connectorOperations: z.ZodArray>; }, z.core.$strict>; everyMinutes: z.ZodNumber; startsAt: z.ZodString; expiresAt: z.ZodString; dispatchGraceSeconds: z.ZodNumber; period: z.ZodLiteral<"utc-day">; inFlightPolicy: z.ZodLiteral<"finish-authorized-attempt">; maxCreditsPerRun: z.ZodNumber; maxCreditsPerPeriod: z.ZodNumber; maxCreditsTotal: z.ZodNumber; maxOccurrencesPerPeriod: z.ZodNumber; maxOccurrencesTotal: z.ZodNumber; }, z.core.$strict>; export type RecurringRequest = z.infer; export interface RecurringTerms extends RecurringRequest { deploymentId: string; organizationId: string; approvedByUserId: string; approvedMembershipId: string; policyId: string; policyRevision: number; skillId: string; skillVersionId: string; runtimeApprovalDigest: string; payloadSha256: string; } export declare const recurringTermsSchema: z.ZodObject<{ contractVersion: z.ZodLiteral<1>; skill: z.ZodString; input: z.ZodRecord; args: z.ZodArray; runtime: z.ZodObject<{ timeoutMs: z.ZodNumber; maxOutputBytes: z.ZodNumber; maxAttempts: z.ZodNumber; connectorOperations: z.ZodArray>; }, z.core.$strict>; everyMinutes: z.ZodNumber; startsAt: z.ZodString; expiresAt: z.ZodString; dispatchGraceSeconds: z.ZodNumber; period: z.ZodLiteral<"utc-day">; inFlightPolicy: z.ZodLiteral<"finish-authorized-attempt">; maxCreditsPerRun: z.ZodNumber; maxCreditsPerPeriod: z.ZodNumber; maxCreditsTotal: z.ZodNumber; maxOccurrencesPerPeriod: z.ZodNumber; maxOccurrencesTotal: z.ZodNumber; deploymentId: z.ZodString; organizationId: z.ZodUUID; approvedByUserId: z.ZodUUID; approvedMembershipId: z.ZodUUID; policyId: z.ZodUUID; policyRevision: z.ZodNumber; skillId: z.ZodUUID; skillVersionId: z.ZodUUID; runtimeApprovalDigest: z.ZodString; payloadSha256: z.ZodString; }, z.core.$strict>; export interface RecurringQuote { costCredits: number; quotedAt: string; /** Quote is informational: admission always reprices under authority locks. */ admissionReprices: true; } export interface RecurringPreview { contractVersion: typeof RECURRING_CONTRACT_VERSION; draftId: string; terms: RecurringTerms; termsSha256: string; quote: RecurringQuote; approvalDeadline: string; firstDueInstants: string[]; firstPeriod: { startsAt: string; endsAt: string; }; additionalBudget: true; } export declare const recurringActivationSchema: z.ZodObject<{ contractVersion: z.ZodLiteral<1>; acceptedTermsSha256: z.ZodString; acceptance: z.ZodLiteral<"authorize-recurring-credit-use">; idempotencyKey: z.ZodString; }, z.core.$strict>; export type RecurringActivation = z.infer; export interface RecurringBudget { reservedCredits: number; settledCredits: number; admittedOccurrences: number; } export interface RecurringConsentView { contractVersion: typeof RECURRING_CONTRACT_VERSION; consentId: string; scheduleId: string; terms: RecurringTerms; termsSha256: string; state: "active" | "revoked" | "expired"; activatedAt: string; revokedAt: string | null; total: RecurringBudget; currentPeriod: (RecurringBudget & { startsAt: string; endsAt: string; }) | null; nextDueAt: string | null; } export interface RecurringActivationResult { replayed: boolean; consent: RecurringConsentView; } export interface RecurringPage { contractVersion: typeof RECURRING_CONTRACT_VERSION; items: T[]; nextCursor: string | null; } export type RecurringRefusal = "consent-inactive" | "authority-revoked" | "policy-disabled" | "policy-changed" | "skill-changed" | "quote-unavailable" | "per-run-ceiling" | "period-ceiling" | "total-ceiling" | "period-count" | "total-count" | "insufficient-credits" | "input-quota" | "runtime-unavailable"; export interface RecurringOccurrenceView { occurrenceId: string; scheduleId: string; dueAt: string; periodStartsAt: string; periodEndsAt: string; outcome: "admitted" | "skipped" | "refused"; reason: RecurringRefusal | "dispatch-grace-elapsed" | null; runId: string | null; quotedCredits: number | null; allocationState: "reserved" | "captured" | "released" | null; } export interface RecurringRevocation { contractVersion: typeof RECURRING_CONTRACT_VERSION; consentId: string; revokedAt: string; /** Bounded snapshot; separate paginated occurrences contains every run. */ authorizedRuns: { runId: string; attempt: number; reservedCredits: number; }[]; authorizedRunCount: number; residualReservedCredits: number; inFlightPolicy: "finish-authorized-attempt"; cancellationIsSeparate: true; }