/** * `owned_file` intents: files Monomind ships whole — the Mastermind skills and * their reference files. Older versions wrapped each in a * `skills::` marker block to claim it, which made every install * rewrite files whose content had not changed (GH #344). Ownership now comes * from the init manifest's file hashes, through the same guard init uses for * every other shipped file: an untouched install is refreshed, one the user * edited is kept with the new version beside it, and a file an older version * marked is recognised by its content once that markup is ignored. */ import type { ArtifactIntent, InstallRequest, OwnedFileWriter, ResolvedArtifactLocation } from './types.js'; export interface OwnedFileResult { changed?: string; skipped?: string; diagnostics: string[]; } /** Write `intent.content` as the whole file, unless the user edited it. */ export declare function applyOwnedFile(location: ResolvedArtifactLocation, intent: ArtifactIntent, dryRun: boolean, writer: () => OwnedFileWriter): OwnedFileResult; /** Whether `content` still holds a block an older version wrapped this file in. */ export declare function hasLegacyOwnership(content: string, intent: ArtifactIntent): boolean; /** Uninstall: remove the file (after a backup) unless the user edited it. */ export declare function releaseOwnedFile(root: string, path: string, intent: ArtifactIntent, request: Pick): boolean; //# sourceMappingURL=owned-files.d.ts.map