/**
 * Manifest module for tracking installed files
 *
 * Agent-agnostic module that provides functionality to:
 * - Hash files for change detection
 * - Create manifests of installed directories
 * - Compare current state against stored manifests
 */
/**
 * Manifest file structure storing hashes of all installed files
 */
export type FileManifest = {
    version: 1;
    createdAt: string;
    skillsetName: string;
    files: Record<string, string>;
};
/**
 * Result of comparing a manifest against current directory state
 */
export type ManifestDiff = {
    modified: Array<string>;
    added: Array<string>;
    deleted: Array<string>;
};
/**
 * Files to exclude from manifest tracking regardless of location.
 * These are metadata files that should not trigger "local changes detected" warnings.
 */
export declare const EXCLUDED_FILES: ReadonlyArray<string>;
/**
 * Get the path to the per-agent manifest file
 *
 * @param args - Configuration arguments
 * @param args.agentName - Name of the agent
 *
 * @returns Absolute path to the manifest file
 */
export declare const getManifestPath: (args: {
    agentName: string;
}) => string;
/**
 * Get the path to the legacy manifest file (for backwards-compatible fallback)
 *
 * @returns Absolute path to the legacy manifest file
 */
export declare const getLegacyManifestPath: () => string;
/**
 * Compute SHA-256 hash of a file
 *
 * @param args - Configuration arguments
 * @param args.filePath - Absolute path to the file
 *
 * @returns SHA-256 hash as hex string
 */
export declare const computeFileHash: (args: {
    filePath: string;
}) => Promise<string>;
/**
 * Compute a manifest for a directory
 *
 * Creates a manifest containing SHA-256 hashes of all files in the directory.
 *
 * @param args - Configuration arguments
 * @param args.dir - Directory to create manifest for
 * @param args.skillsetName - Name of the profile being installed
 * @param args.managedFiles - Optional list of managed root-level filenames (falls back to defaults)
 * @param args.managedDirs - Optional list of managed directory names (falls back to defaults)
 *
 * @returns Manifest object with file hashes
 */
export declare const computeDirectoryManifest: (args: {
    dir: string;
    skillsetName: string;
    managedFiles?: ReadonlyArray<string> | null;
    managedDirs?: ReadonlyArray<string> | null;
}) => Promise<FileManifest>;
/**
 * Write a manifest to disk
 *
 * @param args - Configuration arguments
 * @param args.manifestPath - Absolute path to write the manifest
 * @param args.manifest - Manifest to write
 */
export declare const writeManifest: (args: {
    manifestPath: string;
    manifest: FileManifest;
}) => Promise<void>;
/**
 * Read a manifest from disk
 *
 * @param args - Configuration arguments
 * @param args.manifestPath - Absolute path to read the manifest from
 * @param args.legacyManifestPath - Optional path to legacy manifest for fallback
 *
 * @returns Manifest object, or null if file doesn't exist
 */
export declare const readManifest: (args: {
    manifestPath: string;
    legacyManifestPath?: string | null;
}) => Promise<FileManifest | null>;
/**
 * Compare a manifest against the current state of a directory
 *
 * @param args - Configuration arguments
 * @param args.manifest - Previously stored manifest
 * @param args.currentDir - Directory to compare against
 * @param args.managedFiles - Optional list of managed root-level filenames (falls back to defaults)
 * @param args.managedDirs - Optional list of managed directory names (falls back to defaults)
 *
 * @returns Diff showing modified, added, and deleted files
 */
export declare const compareManifest: (args: {
    manifest: FileManifest;
    currentDir: string;
    managedFiles?: ReadonlyArray<string> | null;
    managedDirs?: ReadonlyArray<string> | null;
}) => Promise<ManifestDiff>;
/**
 * Remove all Nori-managed files from a directory using the manifest as a guide
 *
 * Reads the manifest to determine which files were installed, removes them,
 * cleans up empty managed directories, and removes the .nori-managed marker.
 * Files not in the manifest are preserved. Files listed in `excludePaths`
 * (relative to `agentDir`) are skipped — useful for files cleared in-place
 * via managed-block clearing rather than full deletion.
 *
 * @param args - Configuration arguments
 * @param args.agentDir - The agent's config directory to clean up
 * @param args.manifestPath - Path to the manifest file
 * @param args.managedDirs - Optional list of managed directory names (falls back to defaults)
 * @param args.excludePaths - Optional list of relative paths to skip when deleting
 */
export declare const removeManagedFiles: (args: {
    agentDir: string;
    manifestPath: string;
    managedDirs?: ReadonlyArray<string> | null;
    excludePaths?: ReadonlyArray<string> | null;
}) => Promise<void>;
/**
 * Check if a manifest diff indicates any changes
 *
 * @param diff - Manifest diff to check
 *
 * @returns True if there are any changes
 */
export declare const hasChanges: (diff: ManifestDiff) => boolean;
//# sourceMappingURL=manifest.d.ts.map