/** * V1→V2 Agent Converter * * Provides automatic in-memory conversion from V1 agent format (legacy goals/constraints) * to V2 agent format (goal.template with parameters). * * UPGRADE STRATEGY: * - V1 agents are auto-upgraded to V2 in place when executed * - The original file is overwritten with the V2 format * - Conversion is triggered by executeAgent(), not by read() or edit() * * @since v2.0.0 - Agent V2 Infrastructure */ import type { AgentMetadata, AgentMetadataV2 } from './types.js'; /** * Result of V1→V2 conversion */ export interface ConversionResult { /** Whether conversion was successful */ converted: boolean; /** The converted V2 metadata (partial, to be merged with existing) */ metadata: Partial; /** Warnings generated during conversion */ warnings: string[]; } /** * Check if an agent is a V1 agent (legacy format without goal.template) * * @param metadata - Agent metadata to check * @returns true if this is a V1 agent that needs conversion */ export declare function isV1Agent(metadata: AgentMetadata | AgentMetadataV2): boolean; /** * Convert V1 agent metadata to V2 format * * Generates a goal.template from the agent's instructions and creates * a default parameter for the objective. * * @param metadata - V1 agent metadata * @param instructions - Agent instructions content (from extensions.instructions) * @returns Conversion result with V2 metadata */ export declare function convertV1ToV2(metadata: AgentMetadata, instructions: string): ConversionResult; //# sourceMappingURL=v1ToV2Converter.d.ts.map