Skip to main content

Module ctx_search

Module ctx_search 

Source

Structs§

SearchOutcome
Result of a search: the rendered output plus both baseline figures.

Constants§

NATIVE_GREP_BASELINE_FACTOR
Modeled baseline for the estimated savings series (GL #479 D1): a native agent grep tool ships matches with surrounding context lines, per-file headers and line numbers, which is roughly 2.5x the tokens of the bare match lines lean-ctx observes. This factor is a documented model assumption — it feeds stats.json (“estimated”) only. The signed savings ledger (“verified”) records observed_tokens without any factor applied.

Functions§

handle
Back-compat shim: the pre-#870 8-arg entry point. Delegates to handle_filtered with no exclude filters. New callers pass the two exclude args directly.
handle_filtered
Searches files for a regex pattern with compressed output and monorepo scope hints.