opencode-codebase-index 0.19.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@
10
10
  "name": "codebase-index",
11
11
  "description": "Semantic code search and codebase graph tools for Claude Code",
12
12
  "source": "./",
13
- "version": "0.19.0"
13
+ "version": "0.20.0"
14
14
  }
15
15
  ]
16
16
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebase-index",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Semantic code search and codebase graph tools for Claude Code",
5
5
  "displayName": "Codebase Index",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebase-index",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Semantic code search and codebase graph tools for Codex",
5
5
  "author": {
6
6
  "name": "Kenneth",
package/README.md CHANGED
@@ -536,7 +536,7 @@ Maintenance tool to remove stale entries from deleted files and orphaned embeddi
536
536
  ### `index_metrics`
537
537
  Returns collected metrics about indexing and search performance. Operational metrics require `debug.enabled` and `debug.metrics` to be `true`.
538
538
  - **Metrics include**: Files indexed, chunks created, cache hit rate, search timing breakdown, GC stats, embedding API call stats.
539
- - **Privacy-safe effectiveness metrics**: Set top-level `effectivenessMetrics.enabled` to `true`. This path does not enable debug logging. It records only fixed route/host/outcome counters and bounded result-count, latency, token-budget, and returned-token histograms. Counters are disabled by default, memory-only, fixed-cardinality, and process-lifetime across Indexer replacement and configuration-watcher refresh. One process-wide collector aggregates opted-in calls without project or repository identity dimensions. It never retains queries, response text, source, symbols, paths, repository names, user identity, or stable identifiers.
539
+ - **Privacy-safe effectiveness metrics**: Set top-level `effectivenessMetrics.enabled` to `true`. This path does not enable debug logging. It records fixed route/host/outcome counters, bounded aggregate histograms, and bounded per-route outcome, result-count, latency, and returned-token histograms. The per-route views make it possible to compare route reliability and cost without retaining request data. Counters are disabled by default, memory-only, fixed-cardinality, and process-lifetime across Indexer replacement and configuration-watcher refresh. One process-wide collector aggregates opted-in calls without project or repository identity dimensions. It never retains queries, response text, source, symbols, paths, repository names, user identity, or stable identifiers.
540
540
  - **Effectiveness-only privacy boundary**: With only `effectivenessMetrics.enabled` set, `debug.enabled` remains `false`, `index_logs` remains disabled, operational debug metrics remain off, and no query, path, source, secret, or response text is emitted by metrics output or written to index files. Only the bounded aggregate snapshot is returned by `index_metrics`.
541
541
  - **Debug logging is separate**: Explicitly enabling `debug.enabled` with `debug.logSearch` preserves the existing diagnostic behavior and may retain raw queries and repository details in memory. Do not enable debug search logs when only privacy-safe aggregates are wanted.
542
542
  - **Reset**: Pass `reset: true` to clear both operational and process-wide effectiveness metrics before returning the new zeroed snapshot. Process exit also clears effectiveness metrics because they are never persisted.
@@ -801,6 +801,7 @@ Zero-config by default (uses `auto` mode). Customize in `.opencode/codebase-inde
801
801
  "autoIndexMaxRetries": 5, // Transient interprocess lock retries (0-10)
802
802
  "autoIndexRetryDelayMs": 100, // Initial exponential lock retry delay
803
803
  "watchFiles": true, // Re-index on file changes
804
+ "pauseBackgroundIndexingOnBattery": false, // Defer background indexing on macOS battery power
804
805
  "maxFileSize": 1048576, // Max file size in bytes (default: 1MB)
805
806
  "maxChunksPerFile": 100, // Max chunks per file
806
807
  "semanticOnly": false, // Only index functions/classes (skip blocks)
@@ -843,7 +844,7 @@ Zero-config by default (uses `auto` mode). Customize in `.opencode/codebase-inde
843
844
  "logEmbedding": true, // Log embedding API calls
844
845
  "logCache": true, // Log cache hits/misses
845
846
  "logGc": true, // Log garbage collection
846
- "logBranch": true, // Log branch detection
847
+ "logBranch": true, // Log branch detection and switches to index_logs (no stdout output)
847
848
  "metrics": false // Enable operational metrics collection
848
849
  },
849
850
  "effectivenessMetrics": {
@@ -884,6 +885,7 @@ String values in `codebase-index.json` can reference environment variables with
884
885
  | `autoIndexMaxRetries` | `5` | Maximum transient interprocess lock retries (0-10) for background automatic indexing. |
885
886
  | `autoIndexRetryDelayMs` | `100` | Initial exponential lock retry delay in milliseconds (10-10000). |
886
887
  | `watchFiles` | `true` | Re-index when files change |
888
+ | `pauseBackgroundIndexingOnBattery` | `false` | On macOS, defer automatic startup and watcher-triggered indexing while using battery power, then run one pending incremental update after AC power returns. Manual `index_codebase` requests remain available. This option has no effect on other platforms. |
887
889
  | `maxFileSize` | `1048576` | Skip files larger than this (bytes). Default: 1MB |
888
890
  | `maxChunksPerFile` | `100` | Maximum chunks to index per file (controls token costs for large files) |
889
891
  | `semanticOnly` | `false` | When `true`, only index semantic nodes (functions, classes) and skip generic blocks |
@@ -905,7 +907,7 @@ String values in `codebase-index.json` can reference environment variables with
905
907
  | `rrfK` | `60` | RRF smoothing constant. Higher values flatten rank impact, lower values prioritize top-ranked candidates more strongly |
906
908
  | `rerankTopN` | `20` | Deterministic rerank depth cap. Applies lightweight name/path/chunk-type rerank to top-N only |
907
909
  | `contextLines` | `0` | Extra lines to include before/after each match |
908
- | `routingHints` | `true` | Inject lightweight runtime hints for local conceptual discovery and definition lookups. Set to `false` to disable plugin-side routing nudges. |
910
+ | `routingHints` | `true` | Inject lightweight runtime hints for local conceptual discovery, broad repository coding tasks, and definition lookups. Set to `false` to disable plugin-side routing nudges. |
909
911
  | `routingGraphHandoffHints` | `false` | When `true`, conceptual discovery hints also say to use graph tools (including OMO CodeGraph) after semantic discovery identifies relevant symbols. |
910
912
  | `routingHintRole` | `"system"` | Message role used when injecting routing hints: `"system"` (default) or `"developer"`. |
911
913
  | **reranker** | | Optional second-stage model reranker for the top candidate pool |
@@ -923,7 +925,7 @@ String values in `codebase-index.json` can reference environment variables with
923
925
  | `logEmbedding` | `true` | Log embedding API calls (success, error, rate-limit) |
924
926
  | `logCache` | `true` | Log cache hits and misses |
925
927
  | `logGc` | `true` | Log garbage collection operations |
926
- | `logBranch` | `true` | Log branch detection and switches |
928
+ | `debug.logBranch` | `true` | Record branch detection and switches in `index_logs` when `debug.enabled` is also `true`; never prints routine branch changes to stdout |
927
929
  | `metrics` | `false` | Enable metrics collection (indexing stats, search timing, cache performance) |
928
930
  | **effectivenessMetrics** | | |
929
931
  | `enabled` | `false` | Independently opt in to memory-only, fixed-cardinality repository-tool effectiveness counters. Does not enable debug logs; stores no queries, response text, code, symbols, paths, repo names, user identity, or stable identifiers. |
@@ -940,7 +942,7 @@ These warnings improve observability but do **not** change the recovery behavior
940
942
  ### Retrieval ranking behavior
941
943
 
942
944
  - `codebase_search` and `codebase_peek` use the hybrid path: semantic + keyword retrieval → fusion (`fusionStrategy`) → deterministic rerank (`rerankTopN`) → optional external reranker (`reranker`) → filtering.
943
- - When `search.routingHints` is enabled (default), the plugin adds tiny per-turn runtime hints for local conceptual discovery and definition queries. Conceptual discovery is nudged toward `codebase_peek` / `codebase_search`, while definition questions are nudged toward `implementation_lookup`. Exact identifier and unrelated operational tasks are left alone. Set `search.routingGraphHandoffHints` to `true` to add opt-in graph/OMO CodeGraph handoff wording, and set `search.routingHintRole` to `"developer"` if your client/runtime expects developer-role guidance instead of system-role guidance.
945
+ - When `search.routingHints` is enabled (default), the plugin adds a tiny, one-shot runtime hint for matching local conceptual discovery, broad repository coding tasks such as fixing or investigating code, and definition queries. A hint is emitted at most once per user message, so tool-call loops do not repeatedly add it. Conceptual and broad-task prompts are nudged toward `codebase_context` first, with `codebase_peek` / `codebase_search` for targeted follow-up, while definition questions are nudged toward `implementation_lookup`. Exact identifier and unrelated operational tasks are left alone. Set `search.routingGraphHandoffHints` to `true` to add opt-in graph/OMO CodeGraph handoff wording, and set `search.routingHintRole` to `"developer"` if your client/runtime expects developer-role guidance instead of system-role guidance.
944
946
  - `find_similar` stays semantic-only: semantic retrieval + deterministic rerank only (no keyword retrieval, no RRF).
945
947
  - For compatibility rollbacks, set `search.fusionStrategy` to `"weighted"` to use the legacy weighted fusion path.
946
948
  - When enabled, the external reranker sees path metadata plus a bounded on-disk code snippet for each candidate so it can distinguish real implementations from docs/tests more reliably.