UNPKG

aiwg

Version:

Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo

129 lines 3.44 kB
/** * FrameworkMigration - Migrate workspaces to framework-scoped structure * * Handles migration from legacy workspaces to framework-scoped structure, * multi-framework setup, and duplicate resource merging. * * FID-007 Framework-Scoped Workspaces migration scenarios. * * @module src/plugin/framework-migration * @version 1.0.0 * @since 2025-10-23 */ export interface MigrationOptions { backup?: boolean; dryRun?: boolean; defaultFramework?: string; conflictStrategy?: 'skip' | 'overwrite' | 'keep-newest'; preserveGitHistory?: boolean; rollbackOnError?: boolean; sourcePath?: string; } export interface MigrationResult { id: string; success: boolean; skipped?: boolean; reason?: string; backupPath?: string; validation: MigrationValidation; report: MigrationReport; errors: MigrationError[]; conflicts: Conflict[]; plan?: MigrationPlan; gitMoveUsed?: boolean; suggestions?: string[]; } export interface MigrationValidation { safe?: boolean; warnings?: string[]; frameworkSpecificMoved?: boolean; sharedResourcesMoved?: boolean; legacyCleanedUp?: boolean; } export interface MigrationReport { filesMoved: number; frameworkSpecificCount: number; sharedResourceCount: number; duplicatesFound?: number; mergedCount?: number; removedCount?: number; } export interface MigrationError { path: string; error: string; severity: 'warning' | 'error' | 'critical'; context?: any; } export interface Conflict { type: 'file' | 'directory'; path: string; resolution: string; } export interface MigrationPlan { frameworkSpecificMoves: number; sharedMoves: number; } export interface DuplicateInfo { path: string; frameworks: string[]; } export interface MergeResult { conflicts: MergeConflict[]; report: MergeReport; } export interface MergeConflict { path: string; resolution: string; } export interface MergeReport { duplicatesFound: number; mergedCount: number; removedCount: number; } export declare class FrameworkMigration { private projectRoot; constructor(projectRoot: string); /** * Migrate legacy workspace to framework-scoped structure * * @param options - Migration options * @returns Migration result */ migrateLegacyToScoped(options?: MigrationOptions): Promise<MigrationResult>; /** * Detect target framework for migration * * @returns Framework name */ detectTargetFramework(): Promise<string>; /** * Migrate to multi-framework setup * * @param newFrameworks - Frameworks to add */ migrateToMultiFramework(newFrameworks: string[]): Promise<void>; /** * Detect duplicate shared content across frameworks * * @returns Array of duplicates */ detectDuplicateShared(): Promise<DuplicateInfo[]>; /** * Merge duplicate shared resources * * @param options - Merge options * @returns Merge result */ mergeDuplicateShared(options?: MigrationOptions): Promise<MergeResult>; /** * Rollback migration * * @param migrationId - Migration ID */ rollback(migrationId: string): Promise<void>; private createBackup; private moveResource; private listFilesRecursive; private generateMigrationId; } //# sourceMappingURL=framework-migration.d.ts.map