export type ArtifactIntegrityStatus = "ok" | "missing" | "mismatch" | "metadata_only";
export type ArtifactRedactionStatus = "clean" | "redacted" | "binary_or_unknown";
export interface StoredArtifactMetadata {
    stored: true;
    algorithm: "sha256";
    sha256: string;
    size_bytes: number;
    relative_path: string;
    content_address: string;
    media_type: string;
    redaction: {
        checked: boolean;
        status: ArtifactRedactionStatus;
    };
    retention: {
        days: number | null;
        expires_at: string | null;
    };
    source: {
        path: string;
        size_bytes: number;
        sha256: string;
    };
}
export interface StoreArtifactContentInput {
    path: string;
    metadata?: Record<string, unknown>;
    retention_days?: number;
    created_at?: string;
}
export interface StoredArtifactContent {
    size_bytes: number;
    sha256: string;
    store: StoredArtifactMetadata;
}
export interface ArtifactIntegrityInput {
    id: string;
    path: string;
    size_bytes: number | null;
    sha256: string | null;
    metadata: Record<string, unknown>;
}
export interface ArtifactIntegrityReport {
    id: string;
    path: string;
    status: ArtifactIntegrityStatus;
    expected_sha256: string | null;
    actual_sha256: string | null;
    expected_size_bytes: number | null;
    actual_size_bytes: number | null;
    relative_path: string | null;
    message: string;
}
export interface ExportedArtifactContent {
    artifact_id: string;
    sha256: string;
    size_bytes: number;
    relative_path: string;
    base64: string;
}
export declare function artifactStoreRoot(): string;
export declare function artifactStorePath(relativePath: string): string;
export declare function storeArtifactContent(input: StoreArtifactContentInput): StoredArtifactContent | null;
export declare function verifyStoredArtifact(input: ArtifactIntegrityInput): ArtifactIntegrityReport;
export declare function exportStoredArtifactContent(input: ArtifactIntegrityInput): ExportedArtifactContent | null;
export declare function importStoredArtifactContent(content: ExportedArtifactContent): ArtifactIntegrityReport;
export declare function redactArtifactMetadata<T>(value: T): T;
export type ArtifactStorageModeValue = "copy" | "reference";
export interface StoreArtifactFileInput {
    artifactId: string;
    sourcePath: string;
    storageMode?: ArtifactStorageModeValue;
    name?: string;
    dbPath?: string;
}
export interface StoredArtifactFile {
    sourcePath: string;
    localPath: string;
    contentHash: string;
    mimeType: string;
    sizeBytes: number;
}
export interface CleanupPolicy {
    deleted_retention_days?: number;
    now?: Date;
}
export interface ArtifactExportEntry {
    id: string;
    entity_type: string;
    entity_id: string;
    name: string | null;
    storage_mode: string;
    source_path: string | null;
    local_path: string | null;
    content_hash: string | null;
    mime_type: string | null;
    size_bytes: number | null;
    redaction_status: string;
    metadata: Record<string, unknown>;
    created_at: string;
}
export interface ArtifactExportManifest {
    schema_version: "todos.artifacts.v1";
    store_root: string;
    exported_at: string;
    artifacts: ArtifactExportEntry[];
}
/** Root directory of the local artifact store for a given (or default) db path. */
export declare function getArtifactStoreRoot(dbPath?: string): string;
/** sha256 of a file's raw bytes. */
export declare function computeContentHash(path: string): string;
/**
 * Copy (or reference) a source file into the local artifact store, preserving
 * the original bytes. Copies live at `<store-root>/<artifactId>/<name>`.
 */
export declare function storeArtifactFile(input: StoreArtifactFileInput): StoredArtifactFile;
/** Remove a stored artifact copy. Reference-mode sources are never touched. */
export declare function deleteStoredArtifactFile(localPath: string | null, storageMode: string, _dbPath?: string): boolean;
/** Whether a soft-deleted artifact has aged past the retention window. */
export declare function isArtifactExpired(deletedAt: string | null, policy?: CleanupPolicy): boolean;
/** Build an export manifest tied to the local store root. */
export declare function buildArtifactExportManifest(artifacts: ArtifactExportEntry[], dbPath?: string): ArtifactExportManifest;
/** Write an export manifest to disk as pretty JSON. */
export declare function writeArtifactExportManifest(manifest: ArtifactExportManifest, outputPath: string): string;
//# sourceMappingURL=artifact-store.d.ts.map