Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 12 Jun 07:09
· 1 commit to main since this release

v0.6.0 — Exact grep semantics, token-efficient output, hierarchical ignore files

This release replaces the search engine and fixes two silent correctness bugs that could mislead AI agents, while cutting both memory usage and output token cost.

🔍 Search engine rewritten: exact grep semantics

The Bleve token-based engine had silent false negatives:

  • substring queries inside identifiers returned nothing (Mutex missed sync.RWMutex)
  • /regex/ queries matched files but returned zero lines (the line extractor treated the pattern as a literal)
  • multi-word queries OR-ed tokens while the line matcher required the full string

Search is now a direct in-memory line scan compiled to a single RE2 matcher — results are grep-identical with full recall, and memory drops to roughly the corpus size (the Bleve dependency tree is gone).

Query formats:

Format Behavior
plain text literal substring, case-insensitive
"quoted" exact literal, case-sensitive
/regex/ RE2 regular expression per line, case-insensitive by default

🪙 Token-efficient output

  • Overlapping match contexts merge into hunks (N: = match, N- = context, -- separator) — no more duplicated context lines
  • maxMatchesPerFile display cap (default 10) with ... +N more matches
  • New outputMode: content (default), files (paths only), count (paths + match counts) — use files/count when locations suffice
  • contextLines: 0 now works (was silently reset to 2)
  • New caseSensitive option
  • Explicit notice when the file limit truncates results

📂 Hierarchical ignore files

Nested .gitignore / .claudeignore files at every directory level are now respected with git's precedence rule (closest file wins, negations included). Previously only the root files were loaded — monorepo subprojects leaked build output into the index.

.env.* and *.env are now ignored by default so secrets never enter the index (--force-include overrides intentionally).

🔄 Index consistency hardening

  • Newly created directory trees (copy, unzip, git checkout) are watched recursively and files already inside are indexed — closes a race where content written before the watch attached was never indexed
  • Periodic sync verification is on by default (every 300s, --sync-interval 0 disables) as a self-healing net
  • .gitignore/.claudeignore changes now re-sync the index (newly-ignored files dropped, newly-unignored indexed)

🛠 MCP improvements

  • All read-only tools declare readOnlyHint so clients can skip permission prompts
  • codeindex_status reports version, watched directory count, and sync interval
  • Tool descriptions document the new grep semantics and token-saving guidance
  • Logging defaults to off (no log file unless --log-enabled)

⬆️ Upgrading

Drop-in replacement — rebuild or download the new binary and restart your MCP client session. Tool parameters are backward compatible; the search output format changed (hunks with N:/N- markers).