import type { AgentCoreCliMcpDefs, AgentCoreProjectSpec, AwsDeploymentTarget, DeployedState } from '../../../schema';
import { type PathConfig, PathResolver } from './path-resolver';
/** Supported schema versions. Extend this union as new versions are published. */
type SchemaVersion = 1;
export declare function getSchemaUrlForVersion(version: SchemaVersion): string;
/**
 * Manages reading, writing, and validation of AgentCore configuration files
 */
export declare class ConfigIO {
    private readonly pathResolver;
    private readonly projectDiscovered;
    /**
     * Create a ConfigIO instance.
     * If no baseDir is provided, automatically discovers the project using findConfigRoot().
     */
    constructor(pathConfig?: Partial<PathConfig>);
    /**
     * Check if this ConfigIO is associated with a discovered or explicitly configured project.
     * Returns false if no baseDir was provided and no project was found via auto-discovery.
     */
    hasProject(): boolean;
    /**
     * Get the current path resolver
     */
    getPathResolver(): PathResolver;
    /**
     * Update the base directory for config files
     */
    setBaseDir(baseDir: string): void;
    /**
     * Get the project root directory (parent of agentcore/)
     */
    getProjectRoot(): string;
    /**
     * Get the config root directory (the agentcore/ directory)
     */
    getConfigRoot(): string;
    /**
     * Read and validate the project configuration.
     */
    readProjectSpec(): Promise<AgentCoreProjectSpec>;
    /**
     * Write and validate the project configuration file.
     */
    writeProjectSpec(data: AgentCoreProjectSpec): Promise<void>;
    /**
     * Read and validate the AWS configuration file.
     * Region is preserved as saved. Use resolveAWSDeploymentTargets() for environment/profile overrides.
     * TODO: Account is still overridden via AWS_PROFILE — consider moving to resolveAWSDeploymentTargets() for consistency.
     */
    readAWSDeploymentTargets(): Promise<AwsDeploymentTarget[]>;
    /**
     * Read AWS deployment targets with region fallback from environment/profile.
     * Region precedence: saved value > AWS_REGION > AWS_DEFAULT_REGION > profile config.
     * Environment/profile region is only used as a fallback when no region is saved in aws-targets.json.
     */
    resolveAWSDeploymentTargets(): Promise<AwsDeploymentTarget[]>;
    /**
     * Resolve a fallback region from environment variables or AWS profile config.
     */
    private resolveRegionFallback;
    /**
     * Write and validate the AWS configuration file
     */
    writeAWSDeploymentTargets(data: AwsDeploymentTarget[]): Promise<void>;
    /**
     * Read and validate the deployed state file.
     * Validates that all target keys exist in aws-targets.
     */
    readDeployedState(): Promise<DeployedState>;
    /**
     * Write and validate the deployed state file.
     * Validates that all target keys exist in aws-targets.
     */
    writeDeployedState(data: DeployedState): Promise<void>;
    /**
     * Read and validate the MCP definitions file
     */
    readMcpDefs(): Promise<AgentCoreCliMcpDefs>;
    /**
     * Write and validate the MCP definitions file
     */
    writeMcpDefs(data: AgentCoreCliMcpDefs): Promise<void>;
    /**
     * Check if the base directory exists
     */
    baseDirExists(): boolean;
    /**
     * Check if a specific config file exists
     */
    configExists(type: 'project' | 'awsTargets' | 'state' | 'mcpDefs'): boolean;
    /**
     * Initialize the base directory and CLI system subdirectory.
     * Requires that a baseDir was explicitly provided or a project was discovered.
     */
    initializeBaseDir(): Promise<void>;
    /**
     * Generic read and validate method
     */
    private readAndValidate;
    /**
     * Generic validate and write method
     */
    private validateAndWrite;
}
/**
 * Create a new ConfigIO instance
 */
export declare function createConfigIO(pathConfig?: Partial<PathConfig>): ConfigIO;
export {};
//# sourceMappingURL=config-io.d.ts.map