import { type AgentId } from '../agents/registry'; export interface InstructionInstallOptions { cwd: string; agents: AgentId[]; force: boolean; copy: boolean; dryRun: boolean; } export type AgentInstructionAction = 'noop' | 'created' | 'merged' | 'prepended' | 'included' | 'copied' | 'skipped' | 'dry-run'; export interface AgentInstructionResult { agent: AgentId; path: string; action: AgentInstructionAction; note?: string; } export interface InstructionInstallResult { fileAction: 'created' | 'noop' | 'merged' | 'prepended' | 'dry-run' | 'skipped'; agents: AgentInstructionResult[]; written: string[]; /** Hard skips — orphan marker / fs error / explicit refusal. Empty when * every drift was reconciled by marker-block merge. */ skipped: { path: string; reason: string; }[]; /** Soft warnings — non-fatal observations (legacy content converted, * multi-block file with extra blocks preserved, etc.). */ warnings: string[]; } export interface WriteOutcome { action: AgentInstructionAction; note?: string; written: boolean; } /** * Reconcile a single instruction file (AGENTS.md or per-agent linkPath) * using marker-block merge. Returns the action taken plus a flag whether * disk was actually written. * * @param linkAbs absolute path of the file on disk * @param desiredBody body to wrap inside the managed marker block * @param legacyVariants exact-byte forms previous mswai versions may have * written. When disk matches one of these, the file * is treated as ours — we replace it with the wrapped * form rather than treating it as user content. * @param mode 'include' or 'copy' — purely cosmetic, used to pick * between the 'included' / 'copied' action labels * when converting legacy content. */ export declare function reconcileInstructionFile(cwd: string, linkAbs: string, desiredBody: string, legacyVariants: string[], mode: 'include' | 'copy', force: boolean, dryRun: boolean): WriteOutcome; export declare function installInstruction(opts: InstructionInstallOptions): InstructionInstallResult;