opencode-codebase-index 0.3.0 → 0.3.2
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 +24 -0
- package/dist/index.cjs +573 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +573 -15
- 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.linux-arm64-gnu.node +0 -0
- package/native/codebase-index-native.linux-x64-gnu.node +0 -0
- package/native/codebase-index-native.win32-x64-msvc.node +0 -0
- package/package.json +3 -1
- package/skill/SKILL.md +15 -0
package/README.md
CHANGED
|
@@ -117,6 +117,8 @@ graph TD
|
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
1. **Parsing**: We use `tree-sitter` to intelligently parse your code into meaningful blocks (functions, classes, interfaces). JSDoc comments and docstrings are automatically included with their associated code.
|
|
120
|
+
|
|
121
|
+
**Supported Languages**: TypeScript, JavaScript, Python, Rust, Go, Java, C#, Ruby, Bash, C, C++, JSON, TOML, YAML
|
|
120
122
|
2. **Chunking**: Large blocks are split with overlapping windows to preserve context across chunk boundaries.
|
|
121
123
|
3. **Embedding**: These blocks are converted into vector representations using your configured AI provider.
|
|
122
124
|
4. **Storage**: Embeddings are stored in SQLite (deduplicated by content hash) and vectors in `usearch` with F16 quantization for 50% memory savings. A branch catalog tracks which chunks exist on each branch.
|
|
@@ -196,6 +198,14 @@ Checks if the index is ready and healthy.
|
|
|
196
198
|
### `index_health_check`
|
|
197
199
|
Maintenance tool to remove stale entries from deleted files and orphaned embeddings/chunks from the database.
|
|
198
200
|
|
|
201
|
+
### `index_metrics`
|
|
202
|
+
Returns collected metrics about indexing and search performance. Requires `debug.enabled` and `debug.metrics` to be `true`.
|
|
203
|
+
- **Metrics include**: Files indexed, chunks created, cache hit rate, search timing breakdown, GC stats, embedding API call stats.
|
|
204
|
+
|
|
205
|
+
### `index_logs`
|
|
206
|
+
Returns recent debug logs with optional filtering.
|
|
207
|
+
- **Parameters**: `category` (optional: `search`, `embedding`, `cache`, `gc`, `branch`), `level` (optional: `error`, `warn`, `info`, `debug`), `limit` (default: 50).
|
|
208
|
+
|
|
199
209
|
## 🎮 Slash Commands
|
|
200
210
|
|
|
201
211
|
The plugin automatically registers these slash commands:
|
|
@@ -230,6 +240,11 @@ Zero-config by default (uses `auto` mode). Customize in `.opencode/codebase-inde
|
|
|
230
240
|
"minScore": 0.1,
|
|
231
241
|
"hybridWeight": 0.5,
|
|
232
242
|
"contextLines": 0
|
|
243
|
+
},
|
|
244
|
+
"debug": {
|
|
245
|
+
"enabled": false,
|
|
246
|
+
"logLevel": "info",
|
|
247
|
+
"metrics": false
|
|
233
248
|
}
|
|
234
249
|
}
|
|
235
250
|
```
|
|
@@ -256,6 +271,15 @@ Zero-config by default (uses `auto` mode). Customize in `.opencode/codebase-inde
|
|
|
256
271
|
| `minScore` | `0.1` | Minimum similarity score (0-1). Lower = more results |
|
|
257
272
|
| `hybridWeight` | `0.5` | Balance between keyword (1.0) and semantic (0.0) search |
|
|
258
273
|
| `contextLines` | `0` | Extra lines to include before/after each match |
|
|
274
|
+
| **debug** | | |
|
|
275
|
+
| `enabled` | `false` | Enable debug logging and metrics collection |
|
|
276
|
+
| `logLevel` | `"info"` | Log level: `error`, `warn`, `info`, `debug` |
|
|
277
|
+
| `logSearch` | `true` | Log search operations with timing breakdown |
|
|
278
|
+
| `logEmbedding` | `true` | Log embedding API calls (success, error, rate-limit) |
|
|
279
|
+
| `logCache` | `true` | Log cache hits and misses |
|
|
280
|
+
| `logGc` | `true` | Log garbage collection operations |
|
|
281
|
+
| `logBranch` | `true` | Log branch detection and switches |
|
|
282
|
+
| `metrics` | `false` | Enable metrics collection (indexing stats, search timing, cache performance) |
|
|
259
283
|
|
|
260
284
|
### Embedding Providers
|
|
261
285
|
The plugin automatically detects available credentials in this order:
|