import { z } from "zod"; /** * Stable capacity identity — the shared vocabulary for capacity SLOTS and * their identity ANCHORS (the 2026-08-01 stable capacity identity and * rename-safe deploys design). * * A capacity slot is the operator-chosen, config-independent name for one EC2 * auto-scaling group within a cluster ("primary", "clickhouse-data"). Its * anchor is the PascalCase token every CloudFormation identity surface derives * from (logical-ID prefixes, the physical service name, the launch-template * name). Pins freeze a deployed pre-6.0 stack's config-derived anchor so a * re-synth reproduces the deployed identity byte-for-byte instead of renaming * every stateful resource. * * Three shapes share this module so the producer and every consumer stay on * one contract (code-quality § coupled values): * - the PIN — identity facts captured from a deployed stack; * - the WIRE shape — what the deploy engine injects as CDK context and the * constructs Zod-validate (`fjall:capacityIdentity`); * - the CONFIG shape — the target-keyed `capacityIdentity` section of * fjall-config.json the engine projects the wire shape from. */ /** Slot-name grammar: lowercase kebab, letter first (`web`, `clickhouse-data`). */ export declare const CAPACITY_SLOT_PATTERN: RegExp; export declare const CAPACITY_SLOT_MAX_LENGTH = 64; export declare const DEFAULT_CAPACITY_SLOT = "primary"; /** * Anchor grammar: alphanumeric, letter first — must be a valid CloudFormation * logical-ID prefix AND a valid segment of a physical service name. Legacy * pre-6.0 anchors (alphanumeric-stripped `getEc2ConfigKey` output such as * `m7gmediumARMnowppdvdevxvdf80useast2aazuseast2a`) satisfy this by * construction. */ export declare const CAPACITY_ANCHOR_PATTERN: RegExp; export declare const CAPACITY_ANCHOR_MAX_LENGTH = 128; /** CDK context key the deploy engine injects the wire shape under. */ export declare const CAPACITY_IDENTITY_CONTEXT_KEY = "fjall:capacityIdentity"; /** * One frozen slot identity, captured from the deployed stack at pin time. * Kept in fjall-config.json for the stack's whole life — deleting a pin * renames (replaces) every stateful resource in the slot on the next deploy. */ export declare const CapacityIdentityPinSchema: z.ZodObject<{ legacyAnchor: z.ZodString; legacyOwnerId: z.ZodOptional; legacySgDescription: z.ZodOptional; }, z.core.$strict>; export type CapacityIdentityPin = z.infer; /** * Wire shape injected as the `fjall:capacityIdentity` CDK context value: * `{ : { : pin } }` — already projected to the current deploy * target. Constructs route by the manifest appName plus the resolved slot. */ export declare const CapacityIdentityWireSchema: z.ZodRecord; legacySgDescription: z.ZodOptional; }, z.core.$strict>>>; export type CapacityIdentityWire = z.infer; /** * Config-file shape (`capacityIdentity` in fjall-config.json): * `{ : { : { : pin } } }`. Target-keyed because * the same app deploys to several targets, each with its own deployed * identity history. */ export declare const CapacityIdentityConfigSchema: z.ZodRecord; legacySgDescription: z.ZodOptional; }, z.core.$strict>>>>; export type CapacityIdentityConfig = z.infer; /** * Project the config-file shape onto ONE deploy target, producing the wire * shape. Apps with no pins for the target are omitted; returns `undefined` * when nothing survives so callers can skip context injection entirely. */ export declare function projectCapacityIdentityToTarget(config: CapacityIdentityConfig | undefined, targetName: string): CapacityIdentityWire | undefined;