/**
 * 文件浏览器 API 路由
 *
 * 提供文件系统浏览功能
 */
import multer from 'multer';
export declare const fileBrowserRouter: import("express-serve-static-core").Router;
export declare const WORKSPACE_UPLOAD_FILE_LIMIT = 2000;
interface FileBrowserItem {
    name: string;
    path: string;
    isDirectory: boolean;
}
interface FileBrowserResponse {
    isWindows: boolean;
    currentPath: string;
    items: FileBrowserItem[];
}
interface DirectoryTreeItem extends FileBrowserItem {
    children?: DirectoryTreeItem[];
    truncated?: boolean;
}
interface DirectoryTreeResponse extends FileBrowserResponse {
    maxDepth: number;
    maxItemsPerDirectory: number;
    tree: DirectoryTreeItem[];
}
interface GitIgnoreRule {
    pattern: string;
    negated: boolean;
    directoryOnly: boolean;
    anchored: boolean;
    hasSlash: boolean;
}
export declare function createWorkspaceUploadLimitResponse(error: multer.MulterError): {
    status: number;
    body: {
        error: string;
        code: string;
    };
};
export declare function parseWorkspaceUploadRelativePaths(body: Record<string, unknown>): string[];
/**
 * 主流程：从选中的工作目录生成受限目录树，最多 10 层且每个目录只返回前 20 个子目录。
 */
export declare function listHostDirectoryTree(requestPath?: string): Promise<DirectoryTreeResponse>;
export declare function parseGitIgnoreRules(content: string): GitIgnoreRule[];
export declare function isIgnoredByGitIgnore(relativePath: string, isDirectory: boolean, rules: GitIgnoreRule[]): boolean;
export {};
//# sourceMappingURL=file-browser.d.ts.map