/**
 * Stack Name Resolver
 *
 * Resolves the CloudFormation stack name for Live Dev infrastructure.
 * Supports pattern-based derivation, CLI overrides, and config overrides.
 *
 * @module bin/commands/dev/stack-name-resolver
 *
 * @see Requirements 1.4, 4.1, 4.2, 4.3
 */
/**
 * Configuration for stack name resolution.
 *
 * @see Requirements 4.1, 4.2, 4.3
 */
export interface StackNameResolverConfig {
    /** Application name */
    readonly appName: string;
    /** Deployment stage */
    readonly stage: string;
    /** Custom stack name from config (runtime.config.ts runtimeAwakeStackName) */
    readonly configStackName?: string;
    /** CLI override (--stack-name option) */
    readonly cliStackName?: string;
}
/**
 * Result of stack name resolution.
 */
export interface StackNameResolutionResult {
    /** Resolved stack name */
    readonly stackName: string;
    /** Source of the stack name */
    readonly source: StackNameSource;
}
/**
 * Source of the resolved stack name.
 *
 * - 'cli': From --stack-name CLI option
 * - 'config': From runtime.config.ts runtimeAwakeStackName
 * - 'derived': From pattern {appName}-RuntimeAwake-{stage}
 */
export type StackNameSource = 'cli' | 'config' | 'derived';
/**
 * Default Live Dev stack name suffix.
 */
export declare const RUNTIME_AWAKE_STACK_SUFFIX = "RuntimeAwake";
/**
 * Maximum stack name length (AWS CloudFormation limit).
 */
export declare const MAX_STACK_NAME_LENGTH = 128;
/**
 * Minimum stack name length.
 */
export declare const MIN_STACK_NAME_LENGTH = 1;
/**
 * Pattern for valid CloudFormation stack names.
 * Must start with a letter and contain only alphanumeric characters and hyphens.
 */
export declare const STACK_NAME_PATTERN: RegExp;
/**
 * Error thrown when stack name resolution fails.
 */
export declare class StackNameResolutionError extends Error {
    /** Error code for programmatic handling */
    readonly code: string;
    constructor(message: string, code: string);
}
/**
 * Validate a stack name follows AWS CloudFormation naming rules.
 *
 * CloudFormation stack names must:
 * - Start with a letter
 * - Contain only alphanumeric characters and hyphens
 * - Be between 1 and 128 characters
 *
 * @param stackName - Stack name to validate
 * @returns True if valid, false otherwise
 *
 * @see Requirements 4.1
 *
 * @example
 * ```typescript
 * isValidStackName('my-app-RuntimeAwake-dev'); // true
 * isValidStackName('123-invalid'); // false (starts with number)
 * isValidStackName('has_underscore'); // false (contains underscore)
 * ```
 */
export declare function isValidStackName(stackName: string): boolean;
/**
 * Sanitize a string for use in a stack name.
 *
 * Replaces invalid characters with hyphens and ensures the result
 * starts with a letter.
 *
 * @param input - Input string to sanitize
 * @returns Sanitized string safe for stack names
 *
 * @example
 * ```typescript
 * sanitizeForStackName('my_app'); // 'my-app'
 * sanitizeForStackName('123app'); // 'app' (removes leading numbers)
 * ```
 */
export declare function sanitizeForStackName(input: string): string;
/**
 * Derive the Live Dev stack name from app name and stage.
 *
 * Uses the pattern: {appName}-RuntimeAwake-{stage}
 *
 * @param appName - Application name
 * @param stage - Deployment stage
 * @returns Derived stack name
 *
 * @see Requirements 1.4, 4.1
 *
 * @example
 * ```typescript
 * deriveStackName('runtime6', 'dev'); // 'runtime6-RuntimeAwake-dev'
 * deriveStackName('my-app', 'staging'); // 'my-app-RuntimeAwake-staging'
 * ```
 */
export declare function deriveStackName(appName: string, stage: string): string;
/**
 * Resolve the Live Dev stack name.
 *
 * Priority order:
 * 1. CLI --stack-name option (highest priority)
 * 2. runtime.config.ts runtimeAwakeStackName
 * 3. Default pattern: {appName}-RuntimeAwake-{stage}
 *
 * @param config - Stack name configuration
 * @returns Resolution result with stack name and source
 * @throws StackNameResolutionError if resolution fails
 *
 * @see Requirements 1.4, 4.1, 4.2, 4.3
 *
 * @example
 * ```typescript
 * // CLI override takes precedence
 * resolveStackName({
 *   appName: 'my-app',
 *   stage: 'dev',
 *   cliStackName: 'custom-stack'
 * });
 * // Returns: { stackName: 'custom-stack', source: 'cli' }
 *
 * // Config override
 * resolveStackName({
 *   appName: 'my-app',
 *   stage: 'dev',
 *   configStackName: 'config-stack'
 * });
 * // Returns: { stackName: 'config-stack', source: 'config' }
 *
 * // Default derivation
 * resolveStackName({
 *   appName: 'my-app',
 *   stage: 'dev'
 * });
 * // Returns: { stackName: 'my-app-RuntimeAwake-dev', source: 'derived' }
 * ```
 */
export declare function resolveStackName(config: StackNameResolverConfig): StackNameResolutionResult;
/**
 * Get the stack name as a simple string (convenience function).
 *
 * @param config - Stack name configuration
 * @returns Resolved stack name
 * @throws StackNameResolutionError if resolution fails
 *
 * @see Requirements 1.4, 4.1, 4.2, 4.3
 */
export declare function getStackName(config: StackNameResolverConfig): string;
/**
 * Check if a stack name matches the Live Dev pattern.
 *
 * @param stackName - Stack name to check
 * @returns True if the stack name includes with '-RuntimeAwake-'
 */
export declare function isRuntimeAwakeStackName(stackName: string): boolean;
/**
 * Extract app name and stage from a Live Dev stack name.
 *
 * @param stackName - Stack name to parse
 * @returns Object with appName and stage, or null if not a valid Live Dev stack name
 *
 * @example
 * ```typescript
 * parseStackName('my-app-RuntimeAwake-dev');
 * // Returns: { appName: 'my-app', stage: 'dev' }
 *
 * parseStackName('invalid-stack');
 * // Returns: null
 * ```
 */
export declare function parseStackName(stackName: string): {
    appName: string;
    stage: string;
} | null;
