import { z } from 'zod/v4';
export declare const FileTreeNodeSchema: z.ZodType<FileTreeNode>;
export interface FileTreeNode {
    name: string;
    type: 'file' | 'directory';
    filePath: string;
    lastReadTime?: number;
    children?: FileTreeNode[];
}
export interface DirectoryNode extends FileTreeNode {
    type: 'directory';
    children: FileTreeNode[];
}
export interface FileNode extends FileTreeNode {
    type: 'file';
    lastReadTime: number;
}
export declare const FileVersionSchema: z.ZodObject<{
    path: z.ZodString;
    content: z.ZodString;
}, z.core.$strip>;
export type FileVersion = z.infer<typeof FileVersionSchema>;
export declare const customToolDefinitionsSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
    inputJsonSchema: z.ZodAny;
    endsAgentStep: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    description: z.ZodOptional<z.ZodString>;
    exampleInputs: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>;
}, z.core.$strip>>>;
export type CustomToolDefinitions = z.input<typeof customToolDefinitionsSchema>;
export declare const ProjectFileContextSchema: z.ZodObject<{
    projectRoot: z.ZodString;
    cwd: z.ZodString;
    fileTree: z.ZodArray<z.ZodCustom<FileTreeNode, FileTreeNode>>;
    fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
    tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>>;
    knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
    userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    agentTemplates: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
    customToolDefinitions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        inputJsonSchema: z.ZodAny;
        endsAgentStep: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
        description: z.ZodOptional<z.ZodString>;
        exampleInputs: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>;
    }, z.core.$strip>>>;
    codebuffConfig: z.ZodOptional<z.ZodObject<{
        description: z.ZodOptional<z.ZodAny>;
        startupProcesses: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            command: z.ZodString;
            cwd: z.ZodOptional<z.ZodString>;
            enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
            stdoutFile: z.ZodOptional<z.ZodString>;
            stderrFile: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        fileChangeHooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            command: z.ZodString;
            cwd: z.ZodOptional<z.ZodString>;
            filePattern: z.ZodOptional<z.ZodString>;
            enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
        }, z.core.$strip>>>;
        maxAgentSteps: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
        baseAgent: z.ZodOptional<z.ZodString>;
        spawnableAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
    }, z.core.$strip>>;
    gitChanges: z.ZodObject<{
        status: z.ZodString;
        diff: z.ZodString;
        diffCached: z.ZodString;
        lastCommitMessages: z.ZodString;
    }, z.core.$strip>;
    changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
    shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
    systemInfo: z.ZodObject<{
        platform: z.ZodString;
        shell: z.ZodString;
        nodeVersion: z.ZodString;
        arch: z.ZodString;
        homedir: z.ZodString;
        cpus: z.ZodNumber;
    }, z.core.$strip>;
}, z.core.$strip>;
export type ProjectFileContext = z.infer<typeof ProjectFileContextSchema>;
export declare const fileRegex: RegExp;
export declare const fileWithNoPathRegex: RegExp;
export declare const parseFileBlocks: (fileBlocks: string) => Record<string, string>;
export declare const getStubProjectFileContext: () => ProjectFileContext;
export declare const createMarkdownFileBlock: (filePath: string, content: string) => string;
export declare const parseMarkdownCodeBlock: (content: string) => string;
export declare const createSearchReplaceBlock: (search: string, replace: string) => string;
export declare function printFileTree(nodes: FileTreeNode[], depth?: number): string;
export declare function printFileTreeWithTokens(nodes: FileTreeNode[], fileTokenScores: Record<string, Record<string, number>>, path?: string[]): string;
/**
 * Ensures the given file contents ends with a newline character.
 * @param contents - The file contents
 * @returns the file contents with a newline character.
 */
export declare const ensureEndsWithNewline: (contents: string | null) => string | null;
export declare const ensureDirectoryExists: (baseDir: string) => void;
/**
 * Removes markdown code block syntax if present, including any language tag
 */
export declare const cleanMarkdownCodeBlock: (content: string) => string;
export declare function isValidFilePath(path: string): boolean;
export declare function isDir(p: string): boolean;
/**
 * Returns true if the `toPath` is a subdirectory of `fromPath`.
 */
export declare function isSubdir(fromPath: string, toPath: string): boolean;
export declare function isValidProjectRoot(dir: string): boolean;
//# sourceMappingURL=file.d.ts.map