import type { AdoptionReport, AdoptionItem } from "./adoption-report.js"; /** * v1.3.2 ยง10 โ€” apply an adoption (the write half). ADDITIVE: copies each * non-error asset into the workspace override dirs (`.solosquad/{agents,skills, * crons}`, already materialized from the bundle by `init`). New ids are * added; id collisions are namespaced by source-repo label; re-runs are * idempotent (matching content โ†’ skip). It never touches the bundle, and never * overwrites an existing asset โ€” so it cannot lose the built-in roster. * * This is NOT v1.5.0's edit-merge: adoption only adds new ids, it never * reconciles two edits to the *same* file. */ export interface ApplyTargets { agentsDir: string; skillsDir: string; schedulesDir: string; /** workflow templates live alongside the workflow-manager skill assets. */ workflowsDir: string; } export interface ApplyOutcome { kind: AdoptionItem["kind"]; id: string; /** final id written (may be namespaced). */ finalId: string; dest: string; action: "written" | "namespaced" | "skipped"; reason?: string; } export interface ApplyResult { outcomes: ApplyOutcome[]; writtenCount: number; skippedCount: number; } export declare function applyAdoption(repoRoot: string, report: AdoptionReport, targets: ApplyTargets): ApplyResult;