opencode-codebase-index 0.13.1 → 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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +22 -8
- 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 +3 -1
- package/scripts/link-local-mcp-bin.mjs +25 -0
- package/skill/SKILL.md +5 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-codebase-index",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Semantic codebase indexing and search for OpenCode - find code by meaning, not just keywords",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"eval:ci": "npx tsx src/cli.ts eval run --reindex --ci --budget benchmarks/budgets/default.json --against benchmarks/baselines/eval-baseline-summary.json",
|
|
48
48
|
"eval:ci:ollama": "npx tsx src/cli.ts eval run --config .github/eval-ollama-config.json --reindex --ci --budget benchmarks/budgets/default.json --against benchmarks/baselines/eval-baseline-summary.json",
|
|
49
49
|
"eval:compare": "npx tsx src/cli.ts eval compare",
|
|
50
|
+
"dev:link-mcp": "node scripts/link-local-mcp-bin.mjs",
|
|
50
51
|
"test": "vitest",
|
|
51
52
|
"pretest:run": "node scripts/run-build-native-with-rustflags.mjs",
|
|
52
53
|
"test:run": "vitest run",
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
"native/*.node",
|
|
62
63
|
"skill",
|
|
63
64
|
"commands",
|
|
65
|
+
"scripts/link-local-mcp-bin.mjs",
|
|
64
66
|
".codex-plugin",
|
|
65
67
|
".claude-plugin",
|
|
66
68
|
".mcp.json",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, rmSync, symlinkSync, writeFileSync } from "fs";
|
|
2
|
+
import { dirname, relative, resolve } from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
|
|
5
|
+
const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
6
|
+
const cliPath = resolve(root, "dist/cli.js");
|
|
7
|
+
const binDir = resolve(root, "node_modules/.bin");
|
|
8
|
+
const binPath = resolve(binDir, "opencode-codebase-index-mcp");
|
|
9
|
+
|
|
10
|
+
if (!existsSync(cliPath)) {
|
|
11
|
+
console.error("dist/cli.js is missing. Run `npm run build:ts` first.");
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
mkdirSync(binDir, { recursive: true });
|
|
16
|
+
rmSync(binPath, { force: true });
|
|
17
|
+
rmSync(`${binPath}.cmd`, { force: true });
|
|
18
|
+
|
|
19
|
+
if (process.platform === "win32") {
|
|
20
|
+
writeFileSync(`${binPath}.cmd`, `@echo off\r\nnode "%~dp0\\..\\..\\dist\\cli.js" %*\r\n`, "utf-8");
|
|
21
|
+
} else {
|
|
22
|
+
symlinkSync(relative(dirname(binPath), cliPath), binPath);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
console.log(`Linked ${binPath} -> ${cliPath}`);
|
package/skill/SKILL.md
CHANGED
|
@@ -69,6 +69,7 @@ Find WHERE code is. Returns metadata only (file, line, name, type).
|
|
|
69
69
|
|
|
70
70
|
```
|
|
71
71
|
codebase_peek(query="validation logic", chunkType="function", directory="src/utils")
|
|
72
|
+
codebase_peek(query="authentication flow", blameAuthor="jane@example.com")
|
|
72
73
|
```
|
|
73
74
|
|
|
74
75
|
### `codebase_search`
|
|
@@ -76,6 +77,7 @@ Find code with full content. Use when you need to see implementation.
|
|
|
76
77
|
|
|
77
78
|
```
|
|
78
79
|
codebase_search(query="error handling middleware", fileType="ts", contextLines=2)
|
|
80
|
+
codebase_search(query="rate limiter", blameSince="2025-01-01")
|
|
79
81
|
```
|
|
80
82
|
|
|
81
83
|
### `find_similar`
|
|
@@ -132,3 +134,6 @@ remove_knowledge_base(path="/path/to/docs")
|
|
|
132
134
|
| `chunkType` | `function`, `class`, `interface`, `type`, `method` |
|
|
133
135
|
| `directory` | `"src/api"`, `"tests"` |
|
|
134
136
|
| `fileType` | `"ts"`, `"py"`, `"rs"` |
|
|
137
|
+
| `blameAuthor` | `"jane@example.com"` or `"Jane Doe"` |
|
|
138
|
+
| `blameSha` | `"abc1234"` |
|
|
139
|
+
| `blameSince` | `"2025-01-01"` |
|