kiri-mcp-server 0.10.0 → 0.12.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 +52 -10
- package/config/kiri.yml +25 -0
- package/config/scoring-profiles.yml +82 -35
- package/dist/config/kiri.yml +25 -0
- package/dist/config/scoring-profiles.yml +82 -35
- package/dist/package.json +9 -1
- package/dist/src/indexer/cli.d.ts.map +1 -1
- package/dist/src/indexer/cli.js +712 -98
- package/dist/src/indexer/cli.js.map +1 -1
- package/dist/src/indexer/git.d.ts.map +1 -1
- package/dist/src/indexer/git.js +41 -3
- package/dist/src/indexer/git.js.map +1 -1
- package/dist/src/indexer/migrations/repo-merger.d.ts +33 -0
- package/dist/src/indexer/migrations/repo-merger.d.ts.map +1 -0
- package/dist/src/indexer/migrations/repo-merger.js +67 -0
- package/dist/src/indexer/migrations/repo-merger.js.map +1 -0
- package/dist/src/indexer/schema.d.ts +66 -0
- package/dist/src/indexer/schema.d.ts.map +1 -1
- package/dist/src/indexer/schema.js +337 -0
- package/dist/src/indexer/schema.js.map +1 -1
- package/dist/src/server/boost-profiles.d.ts +6 -5
- package/dist/src/server/boost-profiles.d.ts.map +1 -1
- package/dist/src/server/boost-profiles.js +138 -0
- package/dist/src/server/boost-profiles.js.map +1 -1
- package/dist/src/server/config-loader.d.ts +9 -0
- package/dist/src/server/config-loader.d.ts.map +1 -0
- package/dist/src/server/config-loader.js +121 -0
- package/dist/src/server/config-loader.js.map +1 -0
- package/dist/src/server/config.d.ts +47 -0
- package/dist/src/server/config.d.ts.map +1 -0
- package/dist/src/server/config.js +157 -0
- package/dist/src/server/config.js.map +1 -0
- package/dist/src/server/context.d.ts +29 -0
- package/dist/src/server/context.d.ts.map +1 -1
- package/dist/src/server/context.js +26 -1
- package/dist/src/server/context.js.map +1 -1
- package/dist/src/server/handlers/snippets-get.d.ts +36 -0
- package/dist/src/server/handlers/snippets-get.d.ts.map +1 -0
- package/dist/src/server/handlers/snippets-get.js +120 -0
- package/dist/src/server/handlers/snippets-get.js.map +1 -0
- package/dist/src/server/handlers.d.ts +33 -20
- package/dist/src/server/handlers.d.ts.map +1 -1
- package/dist/src/server/handlers.js +1805 -370
- package/dist/src/server/handlers.js.map +1 -1
- package/dist/src/server/indexBootstrap.d.ts.map +1 -1
- package/dist/src/server/indexBootstrap.js +49 -2
- package/dist/src/server/indexBootstrap.js.map +1 -1
- package/dist/src/server/main.d.ts.map +1 -1
- package/dist/src/server/main.js +7 -0
- package/dist/src/server/main.js.map +1 -1
- package/dist/src/server/profile-selector.d.ts +33 -0
- package/dist/src/server/profile-selector.d.ts.map +1 -0
- package/dist/src/server/profile-selector.js +291 -0
- package/dist/src/server/profile-selector.js.map +1 -0
- package/dist/src/server/rpc.d.ts.map +1 -1
- package/dist/src/server/rpc.js +60 -10
- package/dist/src/server/rpc.js.map +1 -1
- package/dist/src/server/runtime.d.ts.map +1 -1
- package/dist/src/server/runtime.js +14 -4
- package/dist/src/server/runtime.js.map +1 -1
- package/dist/src/server/scoring.d.ts +7 -1
- package/dist/src/server/scoring.d.ts.map +1 -1
- package/dist/src/server/scoring.js +121 -21
- package/dist/src/server/scoring.js.map +1 -1
- package/dist/src/server/services/index.d.ts +24 -0
- package/dist/src/server/services/index.d.ts.map +1 -0
- package/dist/src/server/services/index.js +20 -0
- package/dist/src/server/services/index.js.map +1 -0
- package/dist/src/server/services/repo-repository.d.ts +61 -0
- package/dist/src/server/services/repo-repository.d.ts.map +1 -0
- package/dist/src/server/services/repo-repository.js +93 -0
- package/dist/src/server/services/repo-repository.js.map +1 -0
- package/dist/src/server/services/repo-resolver.d.ts +28 -0
- package/dist/src/server/services/repo-resolver.d.ts.map +1 -0
- package/dist/src/server/services/repo-resolver.js +62 -0
- package/dist/src/server/services/repo-resolver.js.map +1 -0
- package/dist/src/shared/duckdb.d.ts.map +1 -1
- package/dist/src/shared/duckdb.js +21 -1
- package/dist/src/shared/duckdb.js.map +1 -1
- package/dist/src/shared/fs/safePath.d.ts +7 -0
- package/dist/src/shared/fs/safePath.d.ts.map +1 -0
- package/dist/src/shared/fs/safePath.js +23 -0
- package/dist/src/shared/fs/safePath.js.map +1 -0
- package/dist/src/shared/tokenizer.d.ts +1 -1
- package/dist/src/shared/tokenizer.d.ts.map +1 -1
- package/dist/src/shared/tokenizer.js +97 -15
- package/dist/src/shared/tokenizer.js.map +1 -1
- package/dist/src/shared/utils/glob.d.ts +5 -0
- package/dist/src/shared/utils/glob.d.ts.map +1 -0
- package/dist/src/shared/utils/glob.js +22 -0
- package/dist/src/shared/utils/glob.js.map +1 -0
- package/dist/src/shared/utils/retry.d.ts +8 -0
- package/dist/src/shared/utils/retry.d.ts.map +1 -0
- package/dist/src/shared/utils/retry.js +20 -0
- package/dist/src/shared/utils/retry.js.map +1 -0
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Intelligent code context extraction for LLMs via Model Context Protocol
|
|
4
4
|
|
|
5
|
-
[](package.json)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://www.typescriptlang.org/)
|
|
8
8
|
[](https://modelcontextprotocol.io/)
|
|
@@ -20,11 +20,22 @@
|
|
|
20
20
|
- **📝 Phrase-Aware**: Recognizes compound terms (kebab-case, snake_case) for precise matching
|
|
21
21
|
- **🔒 Concurrency-Safe** _(v0.9.7+)_: Per-database queues, canonicalized DuckDB paths, and bootstrap-safe locking prevent FTS rebuild conflicts and keep locks consistent across symlinks—even on first run
|
|
22
22
|
|
|
23
|
-
## 🆕 What
|
|
23
|
+
## 🆕 What's New in v0.12.0
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
25
|
+
### 🔧 Improvements
|
|
26
|
+
|
|
27
|
+
- **Request Tracing**: Added optional `requestId` parameter to `context_bundle` for debugging and tracing
|
|
28
|
+
- **Tokenizer Enhancement**: Improved keyword extraction with camelCase/snake_case variant support
|
|
29
|
+
- **Path Penalties**: Configurable path penalties via config files for fine-tuned search results
|
|
30
|
+
|
|
31
|
+
### 🐛 Bug Fixes
|
|
32
|
+
|
|
33
|
+
- **TypeScript Compatibility**: Fixed build errors related to `exactOptionalPropertyTypes`
|
|
34
|
+
- **Search Precision**: Improved candidate trimming to only affect fallback-only results
|
|
35
|
+
|
|
36
|
+
### 📚 Documentation
|
|
37
|
+
|
|
38
|
+
- Added path penalties user and developer guides (EN/JA)
|
|
28
39
|
|
|
29
40
|
## ⚙️ Prerequisites
|
|
30
41
|
|
|
@@ -43,6 +54,27 @@ npm --version # Should be >= v9.0.0
|
|
|
43
54
|
git --version # Should be >= v2.0
|
|
44
55
|
```
|
|
45
56
|
|
|
57
|
+
## ⚠️ Troubleshooting
|
|
58
|
+
|
|
59
|
+
### Migration or Database Issues
|
|
60
|
+
|
|
61
|
+
If you encounter issues after upgrading (database corruption, migration failures, etc.), the simplest solution is to delete the database and let KIRI recreate it:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# For MCP users (Claude Code, Codex CLI, etc.)
|
|
65
|
+
# 1. Restart your MCP client to stop the KIRI server
|
|
66
|
+
# 2. Delete the database
|
|
67
|
+
rm -rf .kiri/
|
|
68
|
+
# 3. Restart your MCP client - KIRI will automatically reindex
|
|
69
|
+
|
|
70
|
+
# For CLI/Daemon users
|
|
71
|
+
pkill -f "kiri.*daemon" # Stop daemon if running
|
|
72
|
+
rm -rf .kiri/ # Delete database
|
|
73
|
+
kiri --repo . --db .kiri/index.duckdb --full # Reindex
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
> **Note**: Deleting the database is safe - it only removes the index, not your source code. KIRI will automatically rebuild the index on next startup. For MCP users, no manual reindexing is needed.
|
|
77
|
+
|
|
46
78
|
## 🚀 Quick Start for MCP Users
|
|
47
79
|
|
|
48
80
|
### Step 1: Install KIRI
|
|
@@ -55,6 +87,11 @@ Choose one of the following methods:
|
|
|
55
87
|
npm install -g kiri-mcp-server
|
|
56
88
|
```
|
|
57
89
|
|
|
90
|
+
## 📚 Documentation
|
|
91
|
+
|
|
92
|
+
- [Authoring Docs for KIRI Search](docs/documentation-best-practices.md) – best practices for writing metadata-rich, link-aware documentation so that `context_bundle` and the docs vs. docs-plain benchmark maintain high precision. Includes guidance on querying custom front-matter keys via `meta.<key>:<value>` (for example, `meta.id:runbook-001`).
|
|
93
|
+
- [Path Penalties (User Guide)](docs/user/path-penalties.md) – `.kiri/config.yaml` と環境変数でパス倍率を設定する手順、優先順位、正規化ルール、適用タイミングをまとめたユーザー向けガイド。
|
|
94
|
+
|
|
58
95
|
> **Note**: This installs the `kiri` command globally. You can verify with `kiri --version`.
|
|
59
96
|
|
|
60
97
|
**Option B: Use npx (No Permanent Installation)**
|
|
@@ -188,6 +225,8 @@ The most powerful tool for getting started with unfamiliar code. Provide a task
|
|
|
188
225
|
|
|
189
226
|
Tip: Avoid leading command words like `find` or `show`; instead list concrete modules, files, and observed symptoms to keep rankings sharp.
|
|
190
227
|
|
|
228
|
+
> **Docs search tip:** Set `boost_profile: "docs"` and include metadata filters when the target lives under `docs/`. Front matter keys are queryable via `meta.<key>:<value>` or `frontmatter.<key>:<value>` — e.g., `meta.id:runbook-001`, `tag:degrade`, `category:operations`. Use `docmeta.<key>:<value>` (or legacy `metadata.<key>`) when you want strict doc-only filtering. See the [Metadata alias reference](docs/documentation-best-practices.md#metadata-aliases--filters) for the full list. This keeps `context_bundle` aligned with the docs vs docs-plain benchmark expectations.
|
|
229
|
+
|
|
191
230
|
**v0.8.0 improvements:**
|
|
192
231
|
|
|
193
232
|
- **⚡ Compact mode default (BREAKING)**: `compact: true` is now default, reducing token usage by ~95% (55K → 2.5K tokens). Set `compact: false` to restore full preview mode.
|
|
@@ -259,6 +298,9 @@ Fast search across all indexed files. Supports multi-word queries, hyphenated te
|
|
|
259
298
|
- Multi-word: `"tools call implementation"` → Finds files containing ANY word
|
|
260
299
|
- Hyphenated: `"MCP-server-handler"` → Splits on hyphens and searches each part
|
|
261
300
|
- Single word: `"DuckDB"` → Exact match
|
|
301
|
+
- Metadata filter: `meta.<key>:<value>` / `frontmatter.<key>:<value>` matches front matter (e.g., `meta.id:runbook-001`); `tag:<value>` / `category:<value>` remain shorthand aliases for those standard keys. Use `docmeta.<key>:<value>` (or `metadata.<key>`) when you need strict doc-only filtering.
|
|
302
|
+
|
|
303
|
+
> **Docs search tip:** Combine `boost_profile: "docs"` (either by parameter or CLI flag) with metadata filters for Markdown corpora. Refer to the [Metadata alias reference](docs/documentation-best-practices.md#metadata-aliases--filters) when issuing `files_search` requests so the same filters you use in benchmarks carry over to ad-hoc queries, and switch to `docmeta.*` when you want docs only.
|
|
262
304
|
|
|
263
305
|
**Parameters:**
|
|
264
306
|
|
|
@@ -751,11 +793,11 @@ See [docs/architecture.md](docs/architecture.md) for detailed technical informat
|
|
|
751
793
|
|
|
752
794
|
### Performance
|
|
753
795
|
|
|
754
|
-
| Metric | Target | Current
|
|
755
|
-
| ----------------------------- | ------ |
|
|
756
|
-
| **Time to First Result** | ≤ 1.0s | ✅ 0.8s
|
|
757
|
-
| **Precision @ 10** | ≥ 0.7 |
|
|
758
|
-
| **Token Reduction (compact)** | ≥ 90% | ✅ 95% (v0.8)
|
|
796
|
+
| Metric | Target | Current |
|
|
797
|
+
| ----------------------------- | ------ | --------------------------------------------------------------------------------------- |
|
|
798
|
+
| **Time to First Result** | ≤ 1.0s | ✅ 0.8s |
|
|
799
|
+
| **Precision @ 10** | ≥ 0.7 | ⚠️ 0.25 (2025-11-21, dataset v2025-11-docs-plain, K=10, see var/eval/2025-11-21-k10.md) |
|
|
800
|
+
| **Token Reduction (compact)** | ≥ 90% | ✅ 95% (v0.8) |
|
|
759
801
|
|
|
760
802
|
### Evaluation & Quality Assurance
|
|
761
803
|
|
package/config/kiri.yml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
path_penalties:
|
|
2
|
+
# Reduce noisy auxiliary packages
|
|
3
|
+
- prefix: ".eslint-plugin-local/"
|
|
4
|
+
multiplier: 0.1
|
|
5
|
+
- prefix: "cli/"
|
|
6
|
+
multiplier: 0.25
|
|
7
|
+
- prefix: "cli/src/"
|
|
8
|
+
multiplier: 0.2
|
|
9
|
+
- prefix: "extensions/"
|
|
10
|
+
multiplier: 0.15
|
|
11
|
+
- prefix: "tests/eval/"
|
|
12
|
+
multiplier: 0.05
|
|
13
|
+
- prefix: "datasets/"
|
|
14
|
+
multiplier: 0.05
|
|
15
|
+
- prefix: "tests/"
|
|
16
|
+
multiplier: 0.3
|
|
17
|
+
- prefix: "examples/"
|
|
18
|
+
multiplier: 0.1
|
|
19
|
+
- prefix: "fixtures/"
|
|
20
|
+
multiplier: 0.1
|
|
21
|
+
- prefix: "testdata/"
|
|
22
|
+
multiplier: 0.1
|
|
23
|
+
# Suppress repo-local baseline fixtures that surface via fallback
|
|
24
|
+
- prefix: "packages/assay-kit/baseline-tests"
|
|
25
|
+
multiplier: 0.05
|
|
@@ -1,57 +1,104 @@
|
|
|
1
|
-
# Scoring weight profiles for context_bundle
|
|
2
|
-
# Each profile defines weights for different ranking signals
|
|
3
|
-
|
|
4
1
|
default:
|
|
5
|
-
textMatch: 1.0 # Text/keyword match weight (increased to prioritize literal matches)
|
|
6
|
-
pathMatch: 1.5 # Path-based match weight (new - prioritizes files with keywords in paths)
|
|
7
|
-
editingPath: 2.0 # Currently editing file weight
|
|
8
|
-
dependency: 0.6 # Dependency relationship weight (increased to prioritize connected implementation files)
|
|
9
|
-
proximity: 0.25 # Same directory weight
|
|
10
|
-
structural: 0.6 # Structural similarity weight (reduced to prevent false positives from similar structure)
|
|
11
|
-
docPenaltyMultiplier: 0.5 # Multiplicative penalty for docs (0.5 = 50% reduction)
|
|
12
|
-
configPenaltyMultiplier: 0.05 # Multiplicative penalty for config files (0.05 = 95% reduction)
|
|
13
|
-
implBoostMultiplier: 1.3 # Multiplicative boost for implementation files (1.3 = 30% boost)
|
|
14
|
-
|
|
15
|
-
bugfix:
|
|
16
2
|
textMatch: 1.0
|
|
17
|
-
pathMatch: 1.
|
|
3
|
+
pathMatch: 1.2
|
|
4
|
+
editingPath: 1.8
|
|
5
|
+
dependency: 1.0
|
|
6
|
+
proximity: 0.3
|
|
7
|
+
structural: 0.9
|
|
8
|
+
docPenaltyMultiplier: 0.6
|
|
9
|
+
configPenaltyMultiplier: 0.05
|
|
10
|
+
implBoostMultiplier: 1.5
|
|
11
|
+
blacklistPenaltyMultiplier: 0.01
|
|
12
|
+
testPenaltyMultiplier: 0.02
|
|
13
|
+
lockPenaltyMultiplier: 0.01
|
|
14
|
+
feature:
|
|
15
|
+
textMatch: 1.0
|
|
16
|
+
pathMatch: 1.4
|
|
18
17
|
editingPath: 1.8
|
|
19
|
-
dependency:
|
|
18
|
+
dependency: 1.1
|
|
20
19
|
proximity: 0.35
|
|
21
|
-
structural: 0.
|
|
20
|
+
structural: 0.95
|
|
22
21
|
docPenaltyMultiplier: 0.5
|
|
23
22
|
configPenaltyMultiplier: 0.05
|
|
24
|
-
implBoostMultiplier: 1.
|
|
25
|
-
|
|
23
|
+
implBoostMultiplier: 1.5
|
|
24
|
+
blacklistPenaltyMultiplier: 0.01
|
|
25
|
+
testPenaltyMultiplier: 0.02
|
|
26
|
+
lockPenaltyMultiplier: 0.01
|
|
27
|
+
bugfix:
|
|
28
|
+
textMatch: 1.0
|
|
29
|
+
pathMatch: 1.3
|
|
30
|
+
editingPath: 1.6
|
|
31
|
+
dependency: 1.2
|
|
32
|
+
proximity: 0.3
|
|
33
|
+
structural: 0.85
|
|
34
|
+
docPenaltyMultiplier: 0.5
|
|
35
|
+
configPenaltyMultiplier: 0.05
|
|
36
|
+
implBoostMultiplier: 1.4
|
|
37
|
+
blacklistPenaltyMultiplier: 0.01
|
|
38
|
+
testPenaltyMultiplier: 0.02
|
|
39
|
+
lockPenaltyMultiplier: 0.01
|
|
40
|
+
debug:
|
|
41
|
+
textMatch: 1.0
|
|
42
|
+
pathMatch: 1.3
|
|
43
|
+
editingPath: 1.7
|
|
44
|
+
dependency: 1.2
|
|
45
|
+
proximity: 0.35
|
|
46
|
+
structural: 0.9
|
|
47
|
+
docPenaltyMultiplier: 0.5
|
|
48
|
+
configPenaltyMultiplier: 0.05
|
|
49
|
+
implBoostMultiplier: 1.45
|
|
50
|
+
blacklistPenaltyMultiplier: 0.01
|
|
51
|
+
testPenaltyMultiplier: 0.02
|
|
52
|
+
lockPenaltyMultiplier: 0.01
|
|
53
|
+
api:
|
|
54
|
+
textMatch: 1.0
|
|
55
|
+
pathMatch: 1.5
|
|
56
|
+
editingPath: 1.8
|
|
57
|
+
dependency: 1.0
|
|
58
|
+
proximity: 0.3
|
|
59
|
+
structural: 0.95
|
|
60
|
+
docPenaltyMultiplier: 0.55
|
|
61
|
+
configPenaltyMultiplier: 0.05
|
|
62
|
+
implBoostMultiplier: 1.4
|
|
63
|
+
blacklistPenaltyMultiplier: 0.01
|
|
64
|
+
testPenaltyMultiplier: 0.02
|
|
65
|
+
lockPenaltyMultiplier: 0.01
|
|
66
|
+
editor:
|
|
67
|
+
textMatch: 1.0
|
|
68
|
+
pathMatch: 1.4
|
|
69
|
+
editingPath: 1.9
|
|
70
|
+
dependency: 1.0
|
|
71
|
+
proximity: 0.4
|
|
72
|
+
structural: 0.9
|
|
73
|
+
docPenaltyMultiplier: 0.6
|
|
74
|
+
configPenaltyMultiplier: 0.05
|
|
75
|
+
implBoostMultiplier: 1.4
|
|
76
|
+
blacklistPenaltyMultiplier: 0.01
|
|
77
|
+
testPenaltyMultiplier: 0.02
|
|
78
|
+
lockPenaltyMultiplier: 0.01
|
|
26
79
|
testfail:
|
|
27
80
|
textMatch: 1.0
|
|
28
81
|
pathMatch: 1.5
|
|
29
82
|
editingPath: 1.6
|
|
30
|
-
dependency: 0.85
|
|
83
|
+
dependency: 0.85
|
|
31
84
|
proximity: 0.3
|
|
32
|
-
structural: 0.
|
|
85
|
+
structural: 0.8
|
|
33
86
|
docPenaltyMultiplier: 0.5
|
|
34
87
|
configPenaltyMultiplier: 0.05
|
|
35
88
|
implBoostMultiplier: 1.3
|
|
36
|
-
|
|
89
|
+
blacklistPenaltyMultiplier: 0.01
|
|
90
|
+
testPenaltyMultiplier: 0.2 # testfailではテストファイルへのペナルティを緩和(80%削減、他は98%削減)
|
|
91
|
+
lockPenaltyMultiplier: 0.01
|
|
37
92
|
typeerror:
|
|
38
93
|
textMatch: 1.0
|
|
39
94
|
pathMatch: 1.5
|
|
40
95
|
editingPath: 1.4
|
|
41
96
|
dependency: 0.6
|
|
42
|
-
proximity: 0.4
|
|
43
|
-
structural: 0.6
|
|
44
|
-
docPenaltyMultiplier: 0.5
|
|
45
|
-
configPenaltyMultiplier: 0.05
|
|
46
|
-
implBoostMultiplier: 1.3
|
|
47
|
-
|
|
48
|
-
feature:
|
|
49
|
-
textMatch: 1.0
|
|
50
|
-
pathMatch: 1.5
|
|
51
|
-
editingPath: 1.5
|
|
52
|
-
dependency: 0.45 # Lower: new features less dependent
|
|
53
|
-
proximity: 0.5 # Higher: features cluster spatially
|
|
54
|
-
structural: 0.6 # Reduced: focus on actual feature files
|
|
97
|
+
proximity: 0.4
|
|
98
|
+
structural: 0.6
|
|
55
99
|
docPenaltyMultiplier: 0.5
|
|
56
100
|
configPenaltyMultiplier: 0.05
|
|
57
101
|
implBoostMultiplier: 1.3
|
|
102
|
+
blacklistPenaltyMultiplier: 0.01
|
|
103
|
+
testPenaltyMultiplier: 0.02
|
|
104
|
+
lockPenaltyMultiplier: 0.01
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
path_penalties:
|
|
2
|
+
# Reduce noisy auxiliary packages
|
|
3
|
+
- prefix: ".eslint-plugin-local/"
|
|
4
|
+
multiplier: 0.1
|
|
5
|
+
- prefix: "cli/"
|
|
6
|
+
multiplier: 0.25
|
|
7
|
+
- prefix: "cli/src/"
|
|
8
|
+
multiplier: 0.2
|
|
9
|
+
- prefix: "extensions/"
|
|
10
|
+
multiplier: 0.15
|
|
11
|
+
- prefix: "tests/eval/"
|
|
12
|
+
multiplier: 0.05
|
|
13
|
+
- prefix: "datasets/"
|
|
14
|
+
multiplier: 0.05
|
|
15
|
+
- prefix: "tests/"
|
|
16
|
+
multiplier: 0.3
|
|
17
|
+
- prefix: "examples/"
|
|
18
|
+
multiplier: 0.1
|
|
19
|
+
- prefix: "fixtures/"
|
|
20
|
+
multiplier: 0.1
|
|
21
|
+
- prefix: "testdata/"
|
|
22
|
+
multiplier: 0.1
|
|
23
|
+
# Suppress repo-local baseline fixtures that surface via fallback
|
|
24
|
+
- prefix: "packages/assay-kit/baseline-tests"
|
|
25
|
+
multiplier: 0.05
|
|
@@ -1,57 +1,104 @@
|
|
|
1
|
-
# Scoring weight profiles for context_bundle
|
|
2
|
-
# Each profile defines weights for different ranking signals
|
|
3
|
-
|
|
4
1
|
default:
|
|
5
|
-
textMatch: 1.0 # Text/keyword match weight (increased to prioritize literal matches)
|
|
6
|
-
pathMatch: 1.5 # Path-based match weight (new - prioritizes files with keywords in paths)
|
|
7
|
-
editingPath: 2.0 # Currently editing file weight
|
|
8
|
-
dependency: 0.6 # Dependency relationship weight (increased to prioritize connected implementation files)
|
|
9
|
-
proximity: 0.25 # Same directory weight
|
|
10
|
-
structural: 0.6 # Structural similarity weight (reduced to prevent false positives from similar structure)
|
|
11
|
-
docPenaltyMultiplier: 0.5 # Multiplicative penalty for docs (0.5 = 50% reduction)
|
|
12
|
-
configPenaltyMultiplier: 0.05 # Multiplicative penalty for config files (0.05 = 95% reduction)
|
|
13
|
-
implBoostMultiplier: 1.3 # Multiplicative boost for implementation files (1.3 = 30% boost)
|
|
14
|
-
|
|
15
|
-
bugfix:
|
|
16
2
|
textMatch: 1.0
|
|
17
|
-
pathMatch: 1.
|
|
3
|
+
pathMatch: 1.2
|
|
4
|
+
editingPath: 1.8
|
|
5
|
+
dependency: 1.0
|
|
6
|
+
proximity: 0.3
|
|
7
|
+
structural: 0.9
|
|
8
|
+
docPenaltyMultiplier: 0.6
|
|
9
|
+
configPenaltyMultiplier: 0.05
|
|
10
|
+
implBoostMultiplier: 1.5
|
|
11
|
+
blacklistPenaltyMultiplier: 0.01
|
|
12
|
+
testPenaltyMultiplier: 0.02
|
|
13
|
+
lockPenaltyMultiplier: 0.01
|
|
14
|
+
feature:
|
|
15
|
+
textMatch: 1.0
|
|
16
|
+
pathMatch: 1.4
|
|
18
17
|
editingPath: 1.8
|
|
19
|
-
dependency:
|
|
18
|
+
dependency: 1.1
|
|
20
19
|
proximity: 0.35
|
|
21
|
-
structural: 0.
|
|
20
|
+
structural: 0.95
|
|
22
21
|
docPenaltyMultiplier: 0.5
|
|
23
22
|
configPenaltyMultiplier: 0.05
|
|
24
|
-
implBoostMultiplier: 1.
|
|
25
|
-
|
|
23
|
+
implBoostMultiplier: 1.5
|
|
24
|
+
blacklistPenaltyMultiplier: 0.01
|
|
25
|
+
testPenaltyMultiplier: 0.02
|
|
26
|
+
lockPenaltyMultiplier: 0.01
|
|
27
|
+
bugfix:
|
|
28
|
+
textMatch: 1.0
|
|
29
|
+
pathMatch: 1.3
|
|
30
|
+
editingPath: 1.6
|
|
31
|
+
dependency: 1.2
|
|
32
|
+
proximity: 0.3
|
|
33
|
+
structural: 0.85
|
|
34
|
+
docPenaltyMultiplier: 0.5
|
|
35
|
+
configPenaltyMultiplier: 0.05
|
|
36
|
+
implBoostMultiplier: 1.4
|
|
37
|
+
blacklistPenaltyMultiplier: 0.01
|
|
38
|
+
testPenaltyMultiplier: 0.02
|
|
39
|
+
lockPenaltyMultiplier: 0.01
|
|
40
|
+
debug:
|
|
41
|
+
textMatch: 1.0
|
|
42
|
+
pathMatch: 1.3
|
|
43
|
+
editingPath: 1.7
|
|
44
|
+
dependency: 1.2
|
|
45
|
+
proximity: 0.35
|
|
46
|
+
structural: 0.9
|
|
47
|
+
docPenaltyMultiplier: 0.5
|
|
48
|
+
configPenaltyMultiplier: 0.05
|
|
49
|
+
implBoostMultiplier: 1.45
|
|
50
|
+
blacklistPenaltyMultiplier: 0.01
|
|
51
|
+
testPenaltyMultiplier: 0.02
|
|
52
|
+
lockPenaltyMultiplier: 0.01
|
|
53
|
+
api:
|
|
54
|
+
textMatch: 1.0
|
|
55
|
+
pathMatch: 1.5
|
|
56
|
+
editingPath: 1.8
|
|
57
|
+
dependency: 1.0
|
|
58
|
+
proximity: 0.3
|
|
59
|
+
structural: 0.95
|
|
60
|
+
docPenaltyMultiplier: 0.55
|
|
61
|
+
configPenaltyMultiplier: 0.05
|
|
62
|
+
implBoostMultiplier: 1.4
|
|
63
|
+
blacklistPenaltyMultiplier: 0.01
|
|
64
|
+
testPenaltyMultiplier: 0.02
|
|
65
|
+
lockPenaltyMultiplier: 0.01
|
|
66
|
+
editor:
|
|
67
|
+
textMatch: 1.0
|
|
68
|
+
pathMatch: 1.4
|
|
69
|
+
editingPath: 1.9
|
|
70
|
+
dependency: 1.0
|
|
71
|
+
proximity: 0.4
|
|
72
|
+
structural: 0.9
|
|
73
|
+
docPenaltyMultiplier: 0.6
|
|
74
|
+
configPenaltyMultiplier: 0.05
|
|
75
|
+
implBoostMultiplier: 1.4
|
|
76
|
+
blacklistPenaltyMultiplier: 0.01
|
|
77
|
+
testPenaltyMultiplier: 0.02
|
|
78
|
+
lockPenaltyMultiplier: 0.01
|
|
26
79
|
testfail:
|
|
27
80
|
textMatch: 1.0
|
|
28
81
|
pathMatch: 1.5
|
|
29
82
|
editingPath: 1.6
|
|
30
|
-
dependency: 0.85
|
|
83
|
+
dependency: 0.85
|
|
31
84
|
proximity: 0.3
|
|
32
|
-
structural: 0.
|
|
85
|
+
structural: 0.8
|
|
33
86
|
docPenaltyMultiplier: 0.5
|
|
34
87
|
configPenaltyMultiplier: 0.05
|
|
35
88
|
implBoostMultiplier: 1.3
|
|
36
|
-
|
|
89
|
+
blacklistPenaltyMultiplier: 0.01
|
|
90
|
+
testPenaltyMultiplier: 0.2 # testfailではテストファイルへのペナルティを緩和(80%削減、他は98%削減)
|
|
91
|
+
lockPenaltyMultiplier: 0.01
|
|
37
92
|
typeerror:
|
|
38
93
|
textMatch: 1.0
|
|
39
94
|
pathMatch: 1.5
|
|
40
95
|
editingPath: 1.4
|
|
41
96
|
dependency: 0.6
|
|
42
|
-
proximity: 0.4
|
|
43
|
-
structural: 0.6
|
|
44
|
-
docPenaltyMultiplier: 0.5
|
|
45
|
-
configPenaltyMultiplier: 0.05
|
|
46
|
-
implBoostMultiplier: 1.3
|
|
47
|
-
|
|
48
|
-
feature:
|
|
49
|
-
textMatch: 1.0
|
|
50
|
-
pathMatch: 1.5
|
|
51
|
-
editingPath: 1.5
|
|
52
|
-
dependency: 0.45 # Lower: new features less dependent
|
|
53
|
-
proximity: 0.5 # Higher: features cluster spatially
|
|
54
|
-
structural: 0.6 # Reduced: focus on actual feature files
|
|
97
|
+
proximity: 0.4
|
|
98
|
+
structural: 0.6
|
|
55
99
|
docPenaltyMultiplier: 0.5
|
|
56
100
|
configPenaltyMultiplier: 0.05
|
|
57
101
|
implBoostMultiplier: 1.3
|
|
102
|
+
blacklistPenaltyMultiplier: 0.01
|
|
103
|
+
testPenaltyMultiplier: 0.02
|
|
104
|
+
lockPenaltyMultiplier: 0.01
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kiri-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "KIRI context extraction platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@9.0.0",
|
|
@@ -65,12 +65,20 @@
|
|
|
65
65
|
"verify:eval": "tsx scripts/test/verify-all.ts --category eval",
|
|
66
66
|
"eval:golden": "tsx scripts/eval/run-golden.ts",
|
|
67
67
|
"eval:golden:verbose": "tsx scripts/eval/run-golden.ts --verbose",
|
|
68
|
+
"assay:evaluate": "tsx scripts/assay/run-evaluation.ts",
|
|
69
|
+
"assay:compare": "tsx scripts/assay/run-comparison.ts",
|
|
70
|
+
"assay:compare:help": "tsx scripts/assay/run-comparison.ts --help",
|
|
71
|
+
"assay:baseline": "tsx scripts/assay/baseline.ts",
|
|
72
|
+
"assay:profile-matrix": "tsx scripts/assay/run-profile-matrix.ts",
|
|
73
|
+
"assay:report-matrix": "tsx scripts/assay/report-matrix.ts",
|
|
68
74
|
"check": "pnpm run lint && pnpm run test",
|
|
69
75
|
"prepublishOnly": "pnpm run build"
|
|
70
76
|
},
|
|
71
77
|
"dependencies": {
|
|
72
78
|
"chokidar": "^4.0.3",
|
|
79
|
+
"csv-parse": "^5.5.6",
|
|
73
80
|
"duckdb": "^1.1.0",
|
|
81
|
+
"fast-deep-equal": "^3.1.3",
|
|
74
82
|
"gpt-tokenizer": "^3.2.0",
|
|
75
83
|
"p-queue": "^9.0.0",
|
|
76
84
|
"tree-sitter": "^0.22.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/indexer/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/indexer/cli.ts"],"names":[],"mappings":"AAgCA,UAAU,cAAc;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAw9CD,wBAAsB,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkWvE"}
|