/** Typed child process mock for testing code that spawns processes. */
import { EventEmitter } from 'events';
import type { Mock } from 'bun:test';
import type { ChildProcess } from 'child_process';
/** Mock child process with typed stdout/stderr EventEmitters. */
export interface MockChildProcess extends EventEmitter {
    stdout: EventEmitter;
    stderr: EventEmitter;
    pid: number;
    killed: boolean;
    kill: Mock<(signal?: string) => boolean>;
}
/** Creates a typed mock child process with EventEmitter-based stdout/stderr. */
export declare function createMockChildProcess(): MockChildProcess;
/** Result type for code search tool output. */
export interface CodeSearchResult {
    stdout?: string;
    stderr?: string;
    message?: string;
    errorMessage?: string;
}
/** Typed accessor for code search result value. */
export declare function asCodeSearchResult(result: unknown): CodeSearchResult;
/** Creates a mock spawn function that returns the provided mock process. */
export declare function createMockSpawn(mockProcess: MockChildProcess): Mock<(command: string, args: string[], options?: object) => ChildProcess>;
/** Helper to create ripgrep JSON match output. */
export declare function createRgJsonMatch(filePath: string, lineNumber: number, lineText: string): string;
/** Helper to create ripgrep JSON context output (for -A, -B, -C flags). */
export declare function createRgJsonContext(filePath: string, lineNumber: number, lineText: string): string;
