export type PersistedAttachment = {
    filename: string;
    mediaType: string | null;
    path: string;
};
type AttachmentMetadata = {
    mediaType: string | null;
};
export declare const resolveAttachmentsRootDir: (rootDir?: string | null) => string;
export declare const resolveProjectAttachmentsDir: (projectPath: string, rootDir?: string | null) => string;
export declare const resolveThreadAttachmentsDir: (projectPath: string, threadId: string, rootDir?: string | null) => string;
export declare const isPathInsideDirectory: (targetPath: string, directory: string) => boolean;
export declare const writeAttachmentMetadata: (filePath: string, metadata: AttachmentMetadata) => Promise<void>;
export declare const readAttachmentMetadata: (filePath: string) => Promise<AttachmentMetadata | null>;
export declare const createThreadAttachmentTarget: (input: {
    projectPath: string;
    threadId: string;
    filename: string;
    rootDir?: string | null;
}) => Promise<{
    filePath: string;
    handle: import("fs/promises").FileHandle;
}>;
export declare const persistThreadAttachmentStream: (input: {
    projectPath: string;
    threadId: string;
    filename: string;
    mediaType: string | null;
    stream: NodeJS.ReadableStream;
    rootDir?: string | null;
}) => Promise<PersistedAttachment>;
export {};
