opencode-codebase-index 0.13.2 → 0.14.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 +5 -2
- package/commands/peek.md +4 -0
- package/commands/search.md +4 -0
- package/dist/cli.cjs +597 -398
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +595 -396
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +531 -322
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +529 -320
- package/dist/index.js.map +1 -1
- package/dist/pi-extension.cjs +638 -395
- package/dist/pi-extension.cjs.map +1 -1
- package/dist/pi-extension.js +638 -395
- package/dist/pi-extension.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 +1 -1
- package/skill/SKILL.md +5 -0
package/README.md
CHANGED
|
@@ -393,6 +393,7 @@ The plugin exposes these tools to the OpenCode agent:
|
|
|
393
393
|
- **Use for**: Discovery, understanding flows, finding logic when you don't know the names.
|
|
394
394
|
- **Example**: `"find the middleware that sanitizes input"`
|
|
395
395
|
- **Ranking path**: hybrid retrieval → fusion (`search.fusionStrategy`) → deterministic rerank (`search.rerankTopN`) → filters
|
|
396
|
+
- **Blame filters**: when `indexing.gitBlame.enabled` is `true`, filter with `blameAuthor`, `blameSha`, or `blameSince`.
|
|
396
397
|
|
|
397
398
|
**Writing good queries:**
|
|
398
399
|
|
|
@@ -411,6 +412,7 @@ The plugin exposes these tools to the OpenCode agent:
|
|
|
411
412
|
- **Example output**:
|
|
412
413
|
```
|
|
413
414
|
[1] function "validatePayment" at src/billing.ts:45-67 (score: 0.92)
|
|
415
|
+
abc1234 | Jane Doe | 2025-03-14 | billing: validate payment state
|
|
414
416
|
[2] class "PaymentProcessor" at src/processor.ts:12-89 (score: 0.87)
|
|
415
417
|
|
|
416
418
|
Use Read tool to examine specific files.
|
|
@@ -450,7 +452,7 @@ Returns recent debug logs with optional filtering.
|
|
|
450
452
|
|
|
451
453
|
### `call_graph`
|
|
452
454
|
|
|
453
|
-
Query the call graph to find callers or callees of a function/method. Automatically built during indexing for TypeScript, JavaScript, Python, Go, Rust, PHP, Apex, Zig, GDScript, and
|
|
455
|
+
Query the call graph to find callers or callees of a function/method. Automatically built during indexing for TypeScript, JavaScript, Python, Go, Rust, PHP, Apex, Zig, GDScript, MATLAB, and Bash.
|
|
454
456
|
|
|
455
457
|
- **Use for**: Understanding code flow, tracing dependencies, impact analysis.
|
|
456
458
|
- **Parameters**: `name` (function name), `direction` (`callers` or `callees`), `symbolId` (required for `callees`, returned by previous queries), `relationshipType` (optional: `Call`, `MethodCall`, `Constructor`, `Import`, `Inherits`, `Implements`).
|
|
@@ -786,6 +788,7 @@ String values in `codebase-index.json` can reference environment variables with
|
|
|
786
788
|
| `maxDepth` | `5` | Max directory traversal depth. `-1` = unlimited, `0` = only files in root dir, `1` = one level of subdirectories, etc. |
|
|
787
789
|
| `maxFilesPerDirectory` | `100` | Max files to index per directory. Always picks the smallest files first. |
|
|
788
790
|
| `fallbackToTextOnMaxChunks` | `true` | When a file exceeds `maxChunksPerFile`, fallback to text-based (line-by-line) chunking instead of skipping the rest of the file. |
|
|
791
|
+
| `gitBlame.enabled` | `false` | Annotate changed chunks with `git blame` commit SHA, author, author email, commit timestamp, and summary. Enables `blameAuthor`, `blameSha`, and `blameSince` filters. |
|
|
789
792
|
| **search** | | |
|
|
790
793
|
| `maxResults` | `20` | Maximum results to return |
|
|
791
794
|
| `minScore` | `0.1` | Minimum similarity score (0-1). Lower = more results |
|
|
@@ -1175,7 +1178,7 @@ The Rust native module handles performance-critical operations:
|
|
|
1175
1178
|
- **usearch**: High-performance vector similarity search with F16 quantization
|
|
1176
1179
|
- **SQLite**: Persistent storage for embeddings, chunks, branch catalog, symbols, and call edges
|
|
1177
1180
|
- **BM25 inverted index**: Fast keyword search for hybrid retrieval
|
|
1178
|
-
- **Call graph extraction**: Tree-sitter query-based extraction of function calls, method calls, constructors, and imports (TypeScript/JavaScript, Python, Go, Rust, PHP, Apex, Zig, GDScript, MATLAB)
|
|
1181
|
+
- **Call graph extraction**: Tree-sitter query-based extraction of function calls, method calls, constructors, and imports (TypeScript/JavaScript, Python, Go, Rust, PHP, Apex, Zig, GDScript, MATLAB, Bash)
|
|
1179
1182
|
- **xxhash**: Fast content hashing for change detection
|
|
1180
1183
|
|
|
1181
1184
|
Rebuild with: `npm run build:native` (requires Rust toolchain)
|
package/commands/peek.md
CHANGED
|
@@ -11,6 +11,9 @@ The first part is the search query. Look for optional parameters:
|
|
|
11
11
|
- `type=X` or mentions "functions"/"classes"/"methods" → set chunkType
|
|
12
12
|
- `dir=X` or "in folder X" → set directory filter
|
|
13
13
|
- File extensions like ".ts", "typescript", ".py" → set fileType
|
|
14
|
+
- `author=X` or `blameAuthor=X` → set blameAuthor filter
|
|
15
|
+
- `sha=X` or `blameSha=X` → set blameSha filter
|
|
16
|
+
- `since=YYYY-MM-DD` or `blameSince=YYYY-MM-DD` → set blameSince filter
|
|
14
17
|
|
|
15
18
|
Call `codebase_peek` with the parsed arguments.
|
|
16
19
|
|
|
@@ -18,6 +21,7 @@ Examples:
|
|
|
18
21
|
- `/peek authentication logic` → query="authentication logic"
|
|
19
22
|
- `/peek error handling limit=5` → query="error handling", limit=5
|
|
20
23
|
- `/peek validation functions` → query="validation", chunkType="function"
|
|
24
|
+
- `/peek auth logic author=jane@example.com since=2025-01-01` → query="auth logic", blameAuthor="jane@example.com", blameSince="2025-01-01"
|
|
21
25
|
|
|
22
26
|
If the index doesn't exist, run `index_codebase` first.
|
|
23
27
|
|
package/commands/search.md
CHANGED
|
@@ -11,6 +11,9 @@ The first part is the search query. Look for optional parameters:
|
|
|
11
11
|
- `type=X` or mentions "functions"/"classes"/"methods" → set chunkType
|
|
12
12
|
- `dir=X` or "in folder X" → set directory filter
|
|
13
13
|
- File extensions like ".ts", "typescript", ".py" → set fileType
|
|
14
|
+
- `author=X` or `blameAuthor=X` → set blameAuthor filter
|
|
15
|
+
- `sha=X` or `blameSha=X` → set blameSha filter
|
|
16
|
+
- `since=YYYY-MM-DD` or `blameSince=YYYY-MM-DD` → set blameSince filter
|
|
14
17
|
|
|
15
18
|
Call `codebase_search` with the parsed arguments.
|
|
16
19
|
|
|
@@ -18,6 +21,7 @@ Examples:
|
|
|
18
21
|
- `/search authentication logic` → query="authentication logic"
|
|
19
22
|
- `/search error handling limit=5` → query="error handling", limit=5
|
|
20
23
|
- `/search validation functions` → query="validation", chunkType="function"
|
|
24
|
+
- `/search auth logic author=jane@example.com since=2025-01-01` → query="auth logic", blameAuthor="jane@example.com", blameSince="2025-01-01"
|
|
21
25
|
|
|
22
26
|
If the index doesn't exist, run `index_codebase` first.
|
|
23
27
|
|