/** * Pass-1 extraction worker entry (change: optimize-parallel-extraction-pool). * * One instance of this module runs per pool worker. It holds this thread's own * tree-sitter parser and grammar singletons (the module-level caches in * `call-graph.ts` are per-module-registry, so a worker thread gets its own set for * free) and answers one request at a time: * * parent → { type: 'extract', id, file } worker → { type: 'result', id, value } * | { type: 'failed', id, message } * * It contains NO extraction logic of its own — it calls the same * `dispatchFileExtract` the serial lane calls, which is what makes the two lanes * provably identical rather than merely similar. * * Two honesty rules are implemented here: * * - **Startup probe.** The extractors return an empty result (they do not throw) when a * grammar cannot be loaded, so a worker whose bindings failed would silently contribute * nothing to the graph. Before accepting work this thread parses a known-good snippet in * the language the parent named and requires the expected node and edge; a worker that * cannot do that reports itself `unhealthy` and is dropped. This is a FAST-FAIL, not the * guarantee: it covers one language, and the pool's per-language unproven-silence guard * is what actually makes an empty result trustworthy. * - **Log relay.** A grammar that is genuinely unavailable warns once per thread. Left * alone that prints N times, interleaves with the parent's spinner, and — because a * worker inherits no console patching — could write to a stdout that is carrying * JSON-RPC. So the logger is redirected to the parent, which dedupes and prints once. */ /** * Probe sources, per language: one function containing one call — the minimum that proves a * real parse produced both a node and an edge. * * The parent picks which language to probe from the build's OWN files, because every * grammar is an optional dependency: probing TypeScript in a Python repo could disable the * pool over a grammar that repo never needed. A language absent from this table simply * skips the probe — the per-language unproven-silence guard in the pool still covers it, * so the probe is a fast-fail optimization, never the sole line of defense. */ export declare const PROBES: Record; //# sourceMappingURL=extraction-worker.d.ts.map