/** * Filesystem primitives shared by `installAgentPack` (SMI-5456 Wave 1 Step 5). * * `writeOwnedArtifactFile` is the idempotency backbone for the P-5 * "double-install produces identical filesystem state, no duplicate * backups" test: byte-identical content at an already-correct path is a * true no-op (no write, no backup, no manifest churn beyond re-recording the * same entry). * * @module @skillsmith/core/install/agent-pack-installer.fs-helpers */ export interface WriteOwnedFileOptions { path: string; content: string; executable: boolean; backupDir: string; } export interface WriteOwnedFileResult { /** True when a write actually happened (content or executable-bit changed, or the file was new). */ changed: boolean; /** Backup of PRE-EXISTING different content, or null (nothing existed, or content already matched). */ backupPath: string | null; } /** * Write a file the installer fully owns by path convention (SKILL.md copies, * shim files, hook scripts). Idempotent: re-writing identical content with * the correct executable bit is a no-op. A pre-existing file with DIFFERENT * content is backed up before being overwritten (defensive — these paths are * namespaced (`skillsmith-agent`) so a genuine foreign collision is unlikely, * but never silently destroying user data is the house floor). */ export declare function writeOwnedArtifactFile(opts: WriteOwnedFileOptions): WriteOwnedFileResult; //# sourceMappingURL=agent-pack-installer.fs-helpers.d.ts.map