/** * Host-side tool interceptor — routes `grep` / `glob` tool calls through * ripgrep for a token-efficient, grouped output. * * Activation rules: * - Session is NOT running in a sandbox (sandbox-tools.ts owns that case). * - `rg` is available on PATH. * - `config.host.fastGrep !== false` (default: true). * * When active, the `before` hook neutralises the builtin tool args (like * sandbox-tools does) and the `after` hook swaps in the ripgrep-rendered * output. When inactive, both hooks no-op and the builtin runs unchanged. */ import type { Hooks } from '@opencode-ai/plugin'; import type { Logger } from '../types'; import type { createLoopService } from '../services/loop'; import type { createSandboxManager } from '../sandbox/manager'; interface HostToolHookDeps { loopService: ReturnType; sandboxManager: ReturnType | null; logger: Logger; /** Working directory for rg invocations (plugin `directory`). */ cwd: string; /** User-facing feature flag; defaults to true. */ enabled?: boolean; } export declare function createHostToolBeforeHook(deps: HostToolHookDeps): Hooks['tool.execute.before']; export declare function createHostToolAfterHook(deps: HostToolHookDeps): Hooks['tool.execute.after']; /** Test helper — clears pending results map. */ export declare function __clearHostToolPendingForTests(): void; export {}; //# sourceMappingURL=host-tools.d.ts.map