import type { Dependencies } from './types';
export interface ConfigSchemaFieldUpdate {
    action: 'add' | 'update' | 'remove';
    field: string;
    /** Raw TS expression for the field type, e.g. "z.string().default('sk-...')" */
    definition?: string;
}
export interface SecretDeclarationUpdate {
    action: 'add' | 'update' | 'remove';
    field: string;
    /** Optional: include to set or overwrite the description. */
    description?: string;
    /** Optional: include to set or overwrite the optional flag. */
    optional?: boolean;
}
export type DefaultModelSelection = string | string[];
export interface DefaultModelsUpdate {
    autonomous?: DefaultModelSelection;
    zai?: DefaultModelSelection;
}
export interface IntegrationConfigMigrationState {
    deprecatedAliases: string[];
    migratableAliases: string[];
}
/**
 * Minimal ConfigWriter shape used by callers that only need to rewrite
 * dependencies — exposed so tests can inject stubs without constructing a
 * full ConfigWriter.
 */
export interface DependencyConfigWriter {
    updateDependencies(dependencies: Dependencies): Promise<void>;
}
export type DependencyConfigWriterFactory = (projectPath: string) => DependencyConfigWriter;
/**
 * ConfigWriter handles writing updates to agent.config.ts
 *
 * Note: For reading dependencies, use AgentProject.dependencies instead.
 * This class is only for surgical updates to specific fields.
 */
export declare class ConfigWriter {
    private configPath;
    constructor(projectPath: string);
    private loadConfig;
    private saveConfig;
    private serializeDefaultModelSelection;
    private getIntegrationConfigMigrationCandidates;
    /**
     * Updates the dependencies field in agent.config.ts
     * Uses ts-morph to surgically update only the dependencies property
     * while preserving all other config fields (name, models, state, etc.)
     */
    updateDependencies(dependencies: Dependencies): Promise<void>;
    /**
     * Updates the name field in agent.config.ts
     */
    updateName(name: string): Promise<void>;
    /**
     * Updates the defaultModels field in agent.config.ts.
     * Creates the object when it does not exist and only mutates the requested keys.
     */
    updateDefaultModels(updates: DefaultModelsUpdate): Promise<void>;
    /**
     * Migrates object-format integrations to the string shorthand format.
     * e.g. `chat: { version: "chat@0.7.6", enabled: true }` → `chat: "chat@0.7.6"`
     *
     * Returns the list of alias names that were migrated.
     */
    migrateIntegrationsToStringFormat(): Promise<string[]>;
    /**
     * Checks which integrations still use the deprecated object format and which
     * of those entries can be safely rewritten to string shorthand.
     */
    getIntegrationConfigMigrationState(): IntegrationConfigMigrationState;
    /**
     * Checks if any integrations use the deprecated object format.
     * Returns alias names of integrations using the deprecated format.
     */
    getObjectFormatIntegrations(): string[];
    /**
     * Serializes a string literal using single quotes, escaping any embedded single quotes.
     */
    private serializeStringLiteral;
    /**
     * Builds the initializer for a new secret declaration:
     *   { description: '…', optional: true }
     * Only emits fields that are provided.
     */
    private buildSecretInitializer;
    /**
     * Adds, updates, or removes entries inside the top-level `secrets` object.
     *
     * Shape:
     *   secrets: {
     *     MY_SECRET: { description: '...', optional: true },
     *   }
     *
     * For `update`, only the fields provided (`description` / `optional`) are modified;
     * other keys on the existing secret declaration are preserved.
     */
    updateSecrets(updates: SecretDeclarationUpdate[]): Promise<void>;
    /**
     * Adds, updates, or removes fields inside configuration.schema (the z.object({...}))
     */
    updateConfiguration(updates: ConfigSchemaFieldUpdate[]): Promise<void>;
    /**
     * Removes the top-level `dependencies` field from agent.config.ts.
     * Used during migration to move dependencies to Cloud-backed .adk snapshots.
     */
    removeDependenciesField(): Promise<void>;
}
//# sourceMappingURL=config-writer.d.ts.map