/** * Agent-outputs directory migration utility. * * Single source of truth for detecting, migrating, and cleaning up * legacy agent-output directories. Handles the full lineage: * * 1. claudedocs/research-outputs/ (oldest, pre-v0.61.0) * 2. claudedocs/agent-outputs/ (intermediate, pre-v0.70.0) * 3. .cleo/agent-outputs/ (canonical, v0.80.0+) * * NOTE: The "research-outputs" naming predates the "agent-outputs" rename * (T2348). Projects that still have research-outputs/ get their content * merged into .cleo/agent-outputs/ in a single unified pass with * MANIFEST.jsonl path rewriting and deduplication. * * Used by: upgrade.ts (cleo upgrade) and init.ts (cleo init). * * @task T4700 * @epic T4454 */ /** Result of detecting legacy agent-output directories. */ export interface LegacyDetectionResult { /** Whether any legacy directories were found. */ hasLegacy: boolean; /** claudedocs/research-outputs/ exists. */ hasResearchOutputs: boolean; /** claudedocs/agent-outputs/ exists. */ hasLegacyAgentOutputs: boolean; /** .cleo/agent-outputs/ already exists. */ hasCanonical: boolean; /** Human-readable list of found legacy paths. */ legacyPaths: string[]; } /** Result of running the agent-outputs migration. */ export interface AgentOutputsMigrationResult { /** Whether migration was performed. */ migrated: boolean; /** Number of files copied to canonical location. */ filesCopied: number; /** Number of manifest entries in the merged MANIFEST.jsonl. */ manifestEntries: number; /** Legacy directories that were removed. */ removed: string[]; /** Human-readable summary of what happened. */ summary: string; } /** * Detect legacy agent-output directories in a project. * * Read-only check — never modifies the filesystem. * * @param projectRoot - Absolute path to project root * @param cleoDir - Absolute path to .cleo/ directory */ export declare function detectLegacyAgentOutputs(projectRoot: string, cleoDir: string): LegacyDetectionResult; /** * Run the full agent-outputs migration. * * Copies files from all legacy locations into .cleo/agent-outputs/, * merges MANIFEST.jsonl entries with path rewriting and deduplication, * updates config.json, and removes legacy directories. * * Safe to call when no legacy directories exist (returns early). * Safe to call when canonical directory already exists (merges). * * @param projectRoot - Absolute path to project root * @param cleoDir - Absolute path to .cleo/ directory */ export declare function migrateAgentOutputs(projectRoot: string, cleoDir: string): AgentOutputsMigrationResult; //# sourceMappingURL=agent-outputs.d.ts.map