/**
 * `vyuh-dxkit context-hook` — the Claude Code PreToolUse hook that
 * delivers the token-reduction win passively. Wired into a scaffolded
 * repo's `.claude/settings.json` with a `Grep|Glob` matcher: when an
 * agent is about to search the codebase, this hook injects a slim
 * structural map as `additionalContext` so the agent needs fewer
 * follow-up whole-file reads.
 *
 * THE CONTRACT IS FAIL-OPEN + ADDITIVE. This hook can only ever ADD
 * context; it never blocks the tool, never replaces grep output, and
 * stays a silent no-op (exit 0, no stdout) on ANY problem — missing
 * graph.json, parse error, no keyword match, unreadable stdin. So
 * Claude Code behaves exactly as it does today whenever the graph is
 * absent or unhelpful; the hook is pure upside.
 *
 * Claude Code passes the tool call as JSON on stdin
 * (`{ tool_name, tool_input: { pattern, ... }, ... }`) and reads a
 * JSON object on stdout with `hookSpecificOutput.additionalContext`.
 */
import { type ContextResult } from './queries';
import type { Graph } from './types';
/**
 * Entry point for `case 'context-hook'`. Reads stdin, runs the query,
 * writes the hook output. Wrapped so nothing it does can fail the
 * tool call: every failure path resolves to a silent no-op.
 */
export declare function runContextHook(cwd: string): Promise<void>;
/**
 * Extract the search keyword from the PreToolUse payload. Both Grep
 * and Glob carry it on `tool_input.pattern`. Returns undefined for
 * anything we can't confidently read (→ no-op upstream).
 */
export declare function extractPattern(rawStdin: string): string | undefined;
/**
 * Compact `additionalContext` body. Terser than the CLI's markdown
 * (the hook pays this cost on every grep): an anchor line, blast
 * radius, and the top symbols grouped by their leading community.
 * Leads with a one-line provenance + best-effort caveat so the agent
 * calibrates trust.
 */
export declare function formatHookContext(result: ContextResult, graph: Graph): string;
//# sourceMappingURL=context-hook.d.ts.map