import type { AgentCoreCliMcpDefs, AgentCoreMcpSpec, AgentCoreProjectSpec, AwsDeploymentTarget, DeployedState } from '../../../schema'; import { type PathConfig, PathResolver } from './path-resolver'; /** * Manages reading, writing, and validation of AgentCore configuration files */ export declare class ConfigIO { private readonly pathResolver; /** * Create a ConfigIO instance. * If no baseDir is provided, automatically discovers the project using findConfigRoot(). */ constructor(pathConfig?: Partial); /** * 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; /** * Write and validate the project configuration file. */ writeProjectSpec(data: AgentCoreProjectSpec): Promise; /** * Read and validate the AWS configuration file. * Region is preserved as saved. Environment/profile region is only used as a * fallback for targets that don't have a region saved in aws-targets.json. */ readAWSDeploymentTargets(): Promise; /** * Resolve a fallback region from environment variables or AWS profile config. */ private resolveRegionFallback; /** * Write and validate the AWS configuration file */ writeAWSDeploymentTargets(data: AwsDeploymentTarget[]): Promise; /** * Read and validate the deployed state file. * Validates that all target keys exist in aws-targets. */ readDeployedState(): Promise; /** * Write and validate the deployed state file. * Validates that all target keys exist in aws-targets. */ writeDeployedState(data: DeployedState): Promise; /** * Read and validate the MCP configuration file */ readMcpSpec(): Promise; /** * Write and validate the MCP configuration file */ writeMcpSpec(data: AgentCoreMcpSpec): Promise; /** * Read and validate the MCP definitions file */ readMcpDefs(): Promise; /** * Write and validate the MCP definitions file */ writeMcpDefs(data: AgentCoreCliMcpDefs): Promise; /** * Check if the base directory exists */ baseDirExists(): boolean; /** * Check if a specific config file exists */ configExists(type: 'project' | 'awsTargets' | 'state' | 'mcp' | 'mcpDefs'): boolean; /** * Initialize the base directory and CLI system subdirectory */ initializeBaseDir(): Promise; /** * 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): ConfigIO; //# sourceMappingURL=config-io.d.ts.map