/** * Host-side `grep` / `glob` fast path — wraps ripgrep (`rg`) and renders * a token-efficient, grouped output analogous to the sandbox variant. * * Activated by `src/hooks/host-tools.ts` only when: * - `rg` is available on PATH, and * - the current session is NOT running in a sandbox (sandbox-tools.ts * handles grep/glob inside containers separately). * * Gracefully falls through (returns null) when `rg` is not available, so the * caller can fall back to opencode's built-in implementation. */ /** Probe whether `rg` is installed. Result is memoised for the process lifetime. */ export declare function isRipgrepAvailable(): boolean; /** Resets the cached probe (tests only). */ export declare function __resetRipgrepProbeForTests(): void; export interface HostGlobOptions { path?: string; cwd: string; } export interface HostGrepOptions { path?: string; include?: string; cwd: string; } /** * List files matching a glob pattern using `rg --files --glob`. * Returns `null` when `rg` is unavailable so callers can fall back. */ export declare function executeHostGlob(pattern: string, opts: HostGlobOptions): string | null; /** * Search for a regex pattern using `rg --json`. Renders each match as a * submatch-centred window (±30 chars) rather than the full line, which is * critical for minified / long-line repositories. */ export declare function executeHostGrep(pattern: string, opts: HostGrepOptions): string | null; /** Parse ripgrep's `--json` event stream. Exported for unit tests. */ export declare function parseRipgrepJson(stdout: string): string; //# sourceMappingURL=host-fs.d.ts.map