/** * Spec-09 — tool driver registry. * * Maps every name in TOOL_DEFINITIONS to (a) a classification and (b) an * arg-builder that derives realistic inputs from a repo's own analysis. The * integration suite drives each tool through the shared `dispatchTool` entry * point with these args; the static coverage gate (a plain unit test) asserts * the registry covers TOOL_DEFINITIONS so a newly-added tool fails CI until it * has a driver entry. THIS IS THE HEADLINE ANTI-ROT MECHANISM (spec-09 §6). * * Behavior-neutral: this module only constructs args. It never modifies a * handler, TOOL_DEFINITIONS, or dispatch. */ /** * read — deterministic, side-effect-free; full invariant treatment. * mutating — writes state into the cached repo's gitignored .openlore (decisions); * safe but ordered (approve/reject need an id from a prior record). * llm — needs a model; driven only when OPENLORE_LIVE_LLM=1 (or via a no-LLM * dry-run path where the tool supports one). Otherwise SKIP-llm, still * counted as covered by the static registry. */ export type ToolKind = 'read' | 'mutating' | 'llm'; /** Deterministic facts derived from a repo's analysis, used to build tool args. */ export interface RepoFacts { /** Absolute path to the analyzed cached repo. */ directory: string; /** A real function/symbol name from the repo (e.g. a top hub). */ functionName?: string; /** A second real function name, for from→to / entry→target tools. */ secondFunction?: string; /** A real repo-relative source file path. */ filePath?: string; /** A search term known to exist in the repo. */ searchTerm?: string; /** A real spec domain, if the repo has specs (cloned OSS repos usually do not). */ specDomain?: string; /** A decision id captured from a prior record_decision run (mutating tools). */ decisionId?: string; } export interface ToolPlan { kind: ToolKind; /** * Build args for `dispatchTool(name, args, directory)`. Return `null` when the * facts needed to drive this tool realistically are unavailable on this repo * (e.g. no spec domain) — the runner records that as a derive-skip, distinct * from a missing driver entry. */ buildArgs: (f: RepoFacts) => Record | null; } export declare const TOOL_REGISTRY: Record; /** Tool names in TOOL_DEFINITIONS that have no driver entry — MUST be empty. */ export declare function uncoveredTools(): string[]; /** Registry entries that do not correspond to a real tool (stale) — MUST be empty. */ export declare function staleRegistryEntries(): string[]; //# sourceMappingURL=tool-driver.d.ts.map