export interface ApiEnvelope<T = unknown> {
    ok: boolean;
    data: T | null;
    error: string | null;
}
export declare function ok<T>(data: T): ApiEnvelope<T>;
export declare function fail(error: string): ApiEnvelope<null>;
export interface AppState {
    root: string;
    volumesRoot: string;
}
/**
 * Resolve volume root: if volume given, use volumesRoot/volume; otherwise use root.
 */
export declare function resolveVolumeRoot(state: AppState, volume?: string): string;
/**
 * Resolve a user-provided path safely under a root, preventing traversal.
 */
export declare function resolveUnderRoot(root: string, raw: string): string;
export declare class AppError extends Error {
    status: number;
    constructor(status: number, message: string);
}
export declare function ensureDir(dir: string): Promise<void>;
export declare function guessMimeType(filePath: string): string;
//# sourceMappingURL=utils.d.ts.map