opencode-codebase-index 0.9.0 → 0.10.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.
- package/README.md +4 -2
- package/dist/cli.cjs +6 -5
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +6 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +171 -90
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +171 -90
- package/dist/index.js.map +1 -1
- package/native/codebase-index-native.darwin-arm64.node +0 -0
- package/native/codebase-index-native.darwin-x64.node +0 -0
- package/native/codebase-index-native.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -575,7 +575,8 @@ Zero-config by default (uses `auto` mode). Customize in `.opencode/codebase-inde
|
|
|
575
575
|
"rrfK": 60, // RRF smoothing constant
|
|
576
576
|
"rerankTopN": 20, // Deterministic rerank depth
|
|
577
577
|
"contextLines": 0, // Extra lines before/after match
|
|
578
|
-
"routingHints": true
|
|
578
|
+
"routingHints": true, // Runtime nudges for local discovery/definition queries
|
|
579
|
+
"routingHintRole": "system" // system | developer (message role used for hints)
|
|
579
580
|
},
|
|
580
581
|
"reranker": {
|
|
581
582
|
"enabled": false,
|
|
@@ -646,6 +647,7 @@ String values in `codebase-index.json` can reference environment variables with
|
|
|
646
647
|
| `rerankTopN` | `20` | Deterministic rerank depth cap. Applies lightweight name/path/chunk-type rerank to top-N only |
|
|
647
648
|
| `contextLines` | `0` | Extra lines to include before/after each match |
|
|
648
649
|
| `routingHints` | `true` | Inject lightweight runtime hints for local conceptual discovery and definition lookups. Set to `false` to disable plugin-side routing nudges. |
|
|
650
|
+
| `routingHintRole` | `"system"` | Message role used when injecting routing hints: `"system"` (default) or `"developer"`. |
|
|
649
651
|
| **reranker** | | Optional second-stage model reranker for the top candidate pool |
|
|
650
652
|
| `enabled` | `false` | Turn external reranking on/off |
|
|
651
653
|
| `provider` | `"custom"` | Hosted shortcuts: `cohere`, `jina`, or `custom` |
|
|
@@ -676,7 +678,7 @@ These warnings improve observability but do **not** change the recovery behavior
|
|
|
676
678
|
### Retrieval ranking behavior
|
|
677
679
|
|
|
678
680
|
- `codebase_search` and `codebase_peek` use the hybrid path: semantic + keyword retrieval → fusion (`fusionStrategy`) → deterministic rerank (`rerankTopN`) → optional external reranker (`reranker`) → filtering.
|
|
679
|
-
- 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.
|
|
681
|
+
- 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.routingHintRole` to `"developer"` if your client/runtime expects developer-role guidance instead of system-role guidance.
|
|
680
682
|
- `find_similar` stays semantic-only: semantic retrieval + deterministic rerank only (no keyword retrieval, no RRF).
|
|
681
683
|
- For compatibility rollbacks, set `search.fusionStrategy` to `"weighted"` to use the legacy weighted fusion path.
|
|
682
684
|
- 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.
|
package/dist/cli.cjs
CHANGED
|
@@ -794,7 +794,8 @@ function getDefaultSearchConfig() {
|
|
|
794
794
|
rrfK: 60,
|
|
795
795
|
rerankTopN: 20,
|
|
796
796
|
contextLines: 0,
|
|
797
|
-
routingHints: true
|
|
797
|
+
routingHints: true,
|
|
798
|
+
routingHintRole: "system"
|
|
798
799
|
};
|
|
799
800
|
}
|
|
800
801
|
function getDefaultRerankerBaseUrl(provider) {
|
|
@@ -915,7 +916,8 @@ function parseConfig(raw) {
|
|
|
915
916
|
rrfK: typeof rawSearch.rrfK === "number" ? Math.max(1, Math.floor(rawSearch.rrfK)) : defaultSearch.rrfK,
|
|
916
917
|
rerankTopN: typeof rawSearch.rerankTopN === "number" ? Math.min(200, Math.max(0, Math.floor(rawSearch.rerankTopN))) : defaultSearch.rerankTopN,
|
|
917
918
|
contextLines: typeof rawSearch.contextLines === "number" ? Math.min(50, Math.max(0, rawSearch.contextLines)) : defaultSearch.contextLines,
|
|
918
|
-
routingHints: typeof rawSearch.routingHints === "boolean" ? rawSearch.routingHints : defaultSearch.routingHints
|
|
919
|
+
routingHints: typeof rawSearch.routingHints === "boolean" ? rawSearch.routingHints : defaultSearch.routingHints,
|
|
920
|
+
routingHintRole: rawSearch.routingHintRole === "developer" || rawSearch.routingHintRole === "system" ? rawSearch.routingHintRole : defaultSearch.routingHintRole
|
|
919
921
|
};
|
|
920
922
|
const rawDebug = input.debug && typeof input.debug === "object" ? input.debug : {};
|
|
921
923
|
const debug = {
|
|
@@ -10088,9 +10090,8 @@ async function main() {
|
|
|
10088
10090
|
process.on("SIGINT", shutdown);
|
|
10089
10091
|
process.on("SIGTERM", shutdown);
|
|
10090
10092
|
}
|
|
10091
|
-
main().catch((
|
|
10092
|
-
|
|
10093
|
-
console.error(`Fatal: ${message}`);
|
|
10093
|
+
main().catch((_error) => {
|
|
10094
|
+
console.error("Fatal: failed to start MCP server (check config and network)");
|
|
10094
10095
|
process.exit(1);
|
|
10095
10096
|
});
|
|
10096
10097
|
//# sourceMappingURL=cli.cjs.map
|