/** * Install manifest for `sklx agent install` / `uninstall` (SMI-5456 Wave 1 * Step 5). * * `sklx agent uninstall` must reverse EXACTLY what install wrote — per- * changeset file identity, not a re-derivation from the current pack * generator (which could have changed between install and uninstall, e.g. * across a version bump). The manifest is the durable record of every path * the installer created or modified, plus a backup reference for anything it * modified (so a foreign file's pre-existing content is restorable) or `null` * for anything it created outright (so uninstall deletes rather than * restores). * * Location: `~/.skillsmith/agent-install/manifest.json` — a sibling * directory to `~/.skillsmith/journal` (Step 3) and `~/.skillsmith/agent-markers` * (Step 1), following the same `getConfigDir()`-rooted, env-override-for- * tests convention as both. * * @module @skillsmith/core/install/agent-manifest */ /** Env var overriding the manifest directory (test isolation — mirrors SKILLSMITH_JOURNAL_DIR). */ export declare const AGENT_INSTALL_DIR_ENV_VAR = "SKILLSMITH_AGENT_INSTALL_DIR"; export declare const AGENT_MANIFEST_SCHEMA_VERSION = 1; export type AgentManifestEntryKind = 'skill' | 'shim' | 'hook-script' | 'mcp-config' | 'hook-config'; /** * One path the installer touched. `backupPath` is set only when a * PRE-EXISTING file was modified (config-file merges); it is `null` for * anything the installer created fresh (skill pack copies, shim files, hook * scripts) since there is nothing meaningful to restore — uninstall deletes. */ export interface AgentManifestEntry { path: string; kind: AgentManifestEntryKind; /** Harness this entry belongs to, or null for the harness-neutral SKILL.md pack. */ harness: string | null; backupPath: string | null; /** True when the installer set the executable bit (hook scripts). */ executable: boolean; } export interface AgentInstallManifest { schemaVersion: number; installedAt: string; /** `AGENT_PACK_SCHEMA_VERSION` at install time — informational, not enforced. */ packSchemaVersion: number; entries: AgentManifestEntry[]; } export declare function getAgentManifestPath(): string; export declare function getAgentInstallBackupsDir(): string; /** Load the manifest, or an empty (never-installed) manifest if none exists or it is corrupt. */ export declare function loadAgentManifest(): AgentInstallManifest; /** * Persist a manifest, replacing any prior one. Re-running install writes a * fresh manifest reflecting the CURRENT full set of entries (deduped by * `path` — later entries in `entries` win) so a double-install never * accumulates duplicate entries (P-5 idempotency test). */ export declare function saveAgentManifest(manifest: AgentInstallManifest): void; //# sourceMappingURL=agent-manifest.d.ts.map