/** * Agent tag key for proactive physical-instance capacity thresholds. * Each value encodes one pool policy (see {@link encodeCapacityPolicyTag} / * {@link parseCapacityPolicyTags}). * * Versioned wire format (pipe-delimited, one tag value per pool): * `v2|{encodedAgentName}|{engine}|{thresholdType}|{thresholdValue}` * * Example: * `v2|customer-opa|postgres|minAvailableCapacityPercent|20` */ export declare const DATABASE_LIFECYCLE_TAG_CAPACITY_POLICIES = "databaseLifecycle:capacityPolicies"; /** * Engines App Databases can provision. AWS only: managed Aurora PostgreSQL or * RDS PostgreSQL with IAM database authentication. This is the allowlist for * every wire surface — request bodies, query parameters, capacity-policy tags, * and the `databaseLifecycle:engines` capability tag — so a worker advertising * anything else contributes no engines. */ export declare const DATABASE_ENGINES: readonly ["postgres"]; export type DatabaseEngine = (typeof DATABASE_ENGINES)[number]; export declare const PHYSICAL_DATABASE_CAPACITY_THRESHOLD_TYPES: readonly ["minAvailableCapacityPercent"]; export type PhysicalDatabaseCapacityThresholdType = (typeof PHYSICAL_DATABASE_CAPACITY_THRESHOLD_TYPES)[number]; export type PhysicalDatabaseCapacityPolicy = { agentName: string; engine: DatabaseEngine; thresholdType: 'minAvailableCapacityPercent'; thresholdValue: number; }; export type PhysicalDatabasePoolKey = { organizationId: string; agentName: string; engine: DatabaseEngine; }; export declare class CapacityPolicyValidationError extends Error { readonly details: string[]; readonly code = "capacity_policy_invalid"; constructor(message: string, details?: string[]); } /** Stable idempotency and identity key for an organization physical pool. */ export declare function computePhysicalDatabasePoolKey(pool: PhysicalDatabasePoolKey): string; export declare function encodeCapacityPolicyTag(policy: PhysicalDatabaseCapacityPolicy): string; /** * Parse and validate capacity-policy tags. Fail closed: any malformed value * throws {@link CapacityPolicyValidationError}. Missing tag key ⇒ empty list * (no proactive provisioning for that agent). */ export declare function parseCapacityPolicyTags(published: string[] | undefined): PhysicalDatabaseCapacityPolicy[]; /** * Detect threshold disagreements for the same physical pool. * Profile tags are routing metadata and do not participate in identity. * * Registration callers soft-skip peer conflicts (rolling threshold updates); * the registering agent's own invalid tags still fail closed. */ export declare function validateCapacityPolicyCompatibility(candidatePolicies: readonly PhysicalDatabaseCapacityPolicy[], existingPolicies: readonly PhysicalDatabaseCapacityPolicy[]): void; export declare function parseCapacityPolicyTag(raw: string): PhysicalDatabaseCapacityPolicy; //# sourceMappingURL=capacityPolicy.d.ts.map