kiri-mcp-server 0.9.9 → 0.11.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 +60 -7
- package/config/scoring-profiles.yml +82 -35
- package/dist/config/scoring-profiles.yml +82 -35
- package/dist/package.json +12 -1
- package/dist/src/client/proxy.js +81 -12
- package/dist/src/client/proxy.js.map +1 -1
- package/dist/src/daemon/daemon.js +91 -14
- package/dist/src/daemon/daemon.js.map +1 -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/abbreviations.d.ts +47 -0
- package/dist/src/server/abbreviations.d.ts.map +1 -0
- package/dist/src/server/abbreviations.js +71 -0
- package/dist/src/server/abbreviations.js.map +1 -0
- package/dist/src/server/boost-profiles.d.ts +63 -0
- package/dist/src/server/boost-profiles.d.ts.map +1 -0
- package/dist/src/server/boost-profiles.js +202 -0
- package/dist/src/server/boost-profiles.js.map +1 -0
- package/dist/src/server/config.d.ts +45 -0
- package/dist/src/server/config.d.ts.map +1 -0
- package/dist/src/server/config.js +146 -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 +35 -22
- package/dist/src/server/handlers.d.ts.map +1 -1
- package/dist/src/server/handlers.js +1993 -414
- 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 +119 -30
- 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 +61 -12
- package/dist/src/server/rpc.js.map +1 -1
- package/dist/src/server/rrf.d.ts +86 -0
- package/dist/src/server/rrf.d.ts.map +1 -0
- package/dist/src/server/rrf.js +108 -0
- package/dist/src/server/rrf.js.map +1 -0
- 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 -2
- 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/cli/args.d.ts +70 -0
- package/dist/src/shared/cli/args.d.ts.map +1 -0
- package/dist/src/shared/cli/args.js +84 -0
- package/dist/src/shared/cli/args.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/embedding/engine.d.ts +38 -0
- package/dist/src/shared/embedding/engine.d.ts.map +1 -0
- package/dist/src/shared/embedding/engine.js +6 -0
- package/dist/src/shared/embedding/engine.js.map +1 -0
- package/dist/src/shared/embedding/lsh-engine.d.ts +11 -0
- package/dist/src/shared/embedding/lsh-engine.d.ts.map +1 -0
- package/dist/src/shared/embedding/lsh-engine.js +14 -0
- package/dist/src/shared/embedding/lsh-engine.js.map +1 -0
- package/dist/src/shared/embedding/registry.d.ts +25 -0
- package/dist/src/shared/embedding/registry.d.ts.map +1 -0
- package/dist/src/shared/embedding/registry.js +50 -0
- package/dist/src/shared/embedding/registry.js.map +1 -0
- package/dist/src/shared/embedding/semantic-engine.d.ts +14 -0
- package/dist/src/shared/embedding/semantic-engine.d.ts.map +1 -0
- package/dist/src/shared/embedding/semantic-engine.js +50 -0
- package/dist/src/shared/embedding/semantic-engine.js.map +1 -0
- 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/models/model-manager.d.ts +38 -0
- package/dist/src/shared/models/model-manager.d.ts.map +1 -0
- package/dist/src/shared/models/model-manager.js +116 -0
- package/dist/src/shared/models/model-manager.js.map +1 -0
- package/dist/src/shared/models/model-manifest.d.ts +22 -0
- package/dist/src/shared/models/model-manifest.d.ts.map +1 -0
- package/dist/src/shared/models/model-manifest.js +24 -0
- package/dist/src/shared/models/model-manifest.js.map +1 -0
- 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/dist/src/shared/utils/validation.d.ts +14 -0
- package/dist/src/shared/utils/validation.d.ts.map +1 -0
- package/dist/src/shared/utils/validation.js +22 -0
- package/dist/src/shared/utils/validation.js.map +1 -0
- package/package.json +29 -20
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/)
|
|
@@ -55,6 +55,10 @@ Choose one of the following methods:
|
|
|
55
55
|
npm install -g kiri-mcp-server
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
## 📚 Documentation
|
|
59
|
+
|
|
60
|
+
- [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`).
|
|
61
|
+
|
|
58
62
|
> **Note**: This installs the `kiri` command globally. You can verify with `kiri --version`.
|
|
59
63
|
|
|
60
64
|
**Option B: Use npx (No Permanent Installation)**
|
|
@@ -188,6 +192,8 @@ The most powerful tool for getting started with unfamiliar code. Provide a task
|
|
|
188
192
|
|
|
189
193
|
Tip: Avoid leading command words like `find` or `show`; instead list concrete modules, files, and observed symptoms to keep rankings sharp.
|
|
190
194
|
|
|
195
|
+
> **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.
|
|
196
|
+
|
|
191
197
|
**v0.8.0 improvements:**
|
|
192
198
|
|
|
193
199
|
- **⚡ 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.
|
|
@@ -223,12 +229,12 @@ Tip: Avoid leading command words like `find` or `show`; instead list concrete mo
|
|
|
223
229
|
|
|
224
230
|
**Parameters:**
|
|
225
231
|
|
|
226
|
-
| Parameter | Type | Required | Description
|
|
227
|
-
| --------------- | ------- | -------- |
|
|
228
|
-
| `goal` | string | Yes | Task description or question about the code
|
|
229
|
-
| `limit` | number | No | Max snippets to return (default: 12, max: 20)
|
|
230
|
-
| `compact` | boolean | No | Return only metadata without preview (default: **true** in v0.8.0+, false in v0.7)
|
|
231
|
-
| `boost_profile` | string | No | File type boosting: `"default"` (prioritizes src/, blacklists docs/), `"docs"`
|
|
232
|
+
| Parameter | Type | Required | Description |
|
|
233
|
+
| --------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
234
|
+
| `goal` | string | Yes | Task description or question about the code |
|
|
235
|
+
| `limit` | number | No | Max snippets to return (default: 12, max: 20) |
|
|
236
|
+
| `compact` | boolean | No | Return only metadata without preview (default: **true** in v0.8.0+, false in v0.7) |
|
|
237
|
+
| `boost_profile` | string | No | File type boosting: `"default"` (prioritizes src/, blacklists docs/), `"docs"` (prioritizes .md/.yaml, includes docs/ directory), `"balanced"` (equal weight for docs and impl, NEW in v0.9.10), `"none"` (no boosting) |
|
|
232
238
|
|
|
233
239
|
### 2. files_search
|
|
234
240
|
|
|
@@ -259,6 +265,9 @@ Fast search across all indexed files. Supports multi-word queries, hyphenated te
|
|
|
259
265
|
- Multi-word: `"tools call implementation"` → Finds files containing ANY word
|
|
260
266
|
- Hyphenated: `"MCP-server-handler"` → Splits on hyphens and searches each part
|
|
261
267
|
- Single word: `"DuckDB"` → Exact match
|
|
268
|
+
- 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.
|
|
269
|
+
|
|
270
|
+
> **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
271
|
|
|
263
272
|
**Parameters:**
|
|
264
273
|
|
|
@@ -507,7 +516,17 @@ const db = await DuckDBClient.connect({
|
|
|
507
516
|
Control search ranking behavior with the `boost_profile` parameter:
|
|
508
517
|
|
|
509
518
|
- **`"default"`** (default): Prioritizes implementation files (`src/*.ts`) over documentation
|
|
519
|
+
- Implementation files get 30% boost, documentation files get 50% penalty
|
|
520
|
+
- Config files heavily penalized (95% reduction)
|
|
521
|
+
- `docs/` directory is blacklisted
|
|
510
522
|
- **`"docs"`**: Prioritizes documentation files (`*.md`) over implementation
|
|
523
|
+
- Documentation files get 50% boost, implementation files get 50% penalty
|
|
524
|
+
- `docs/` directory is included in search results
|
|
525
|
+
- **`"balanced"`** (NEW in v0.9.10): Equal weight for docs and implementation
|
|
526
|
+
- Both documentation and implementation files: no penalty/boost (1.0x)
|
|
527
|
+
- Config files: relaxed penalty (0.3x, compared to 0.05x in default)
|
|
528
|
+
- `docs/` directory is included in search results
|
|
529
|
+
- No path-specific multipliers (treats all `src/` equally)
|
|
511
530
|
- **`"none"`**: Pure BM25 scoring without file type adjustments
|
|
512
531
|
|
|
513
532
|
```typescript
|
|
@@ -517,6 +536,9 @@ files_search({ query: "authentication", boost_profile: "default" });
|
|
|
517
536
|
// Find documentation
|
|
518
537
|
files_search({ query: "setup guide", boost_profile: "docs" });
|
|
519
538
|
|
|
539
|
+
// Balanced search (docs and code equally weighted)
|
|
540
|
+
files_search({ query: "authentication design", boost_profile: "balanced" });
|
|
541
|
+
|
|
520
542
|
// Pure BM25 ranking without boosting
|
|
521
543
|
files_search({ query: "API", boost_profile: "none" });
|
|
522
544
|
```
|
|
@@ -744,6 +766,37 @@ See [docs/architecture.md](docs/architecture.md) for detailed technical informat
|
|
|
744
766
|
| **Precision @ 10** | ≥ 0.7 | ✅ 0.75 |
|
|
745
767
|
| **Token Reduction (compact)** | ≥ 90% | ✅ 95% (v0.8) |
|
|
746
768
|
|
|
769
|
+
### Evaluation & Quality Assurance
|
|
770
|
+
|
|
771
|
+
KIRI includes a **Golden Set Evaluation System** for tracking search accuracy over time using representative queries.
|
|
772
|
+
|
|
773
|
+
**Metrics:**
|
|
774
|
+
|
|
775
|
+
- **P@10** (Precision at K=10): Fraction of relevant results in top 10 (target: ≥0.70)
|
|
776
|
+
- **TFFU** (Time To First Useful): Time until first relevant result appears (target: ≤1000ms)
|
|
777
|
+
|
|
778
|
+
**For Developers:**
|
|
779
|
+
|
|
780
|
+
```bash
|
|
781
|
+
# Run benchmark evaluation (local only)
|
|
782
|
+
pnpm run eval:golden
|
|
783
|
+
|
|
784
|
+
# Verbose output
|
|
785
|
+
pnpm run eval:golden:verbose
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
The benchmark system evaluates 5+ representative queries across categories (bugfix, feature, refactor, infra, docs) and outputs:
|
|
789
|
+
|
|
790
|
+
- JSON: Detailed per-query results (`var/eval/latest.json`)
|
|
791
|
+
- Markdown: Summary table (`var/eval/latest.md`)
|
|
792
|
+
|
|
793
|
+
**Documentation:**
|
|
794
|
+
|
|
795
|
+
- [Golden Set Guide](tests/eval/goldens/README.md) - Query format, categories, adding queries
|
|
796
|
+
- [Results Recording](tests/eval/results/README.md) - Tracking improvements over time
|
|
797
|
+
|
|
798
|
+
See [docs/testing.md](docs/testing.md) for complete testing and evaluation guidelines.
|
|
799
|
+
|
|
747
800
|
### Community
|
|
748
801
|
|
|
749
802
|
- [GitHub Issues](https://github.com/CAPHTECH/kiri/issues) - Bug reports and feature requests
|
|
@@ -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
|
|
@@ -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.11.0",
|
|
4
4
|
"description": "KIRI context extraction platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@9.0.0",
|
|
@@ -63,12 +63,22 @@
|
|
|
63
63
|
"verify:tools": "tsx scripts/test/verify-all.ts --category tools",
|
|
64
64
|
"verify:watch": "tsx scripts/test/verify-all.ts --category watch",
|
|
65
65
|
"verify:eval": "tsx scripts/test/verify-all.ts --category eval",
|
|
66
|
+
"eval:golden": "tsx scripts/eval/run-golden.ts",
|
|
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",
|
|
66
74
|
"check": "pnpm run lint && pnpm run test",
|
|
67
75
|
"prepublishOnly": "pnpm run build"
|
|
68
76
|
},
|
|
69
77
|
"dependencies": {
|
|
70
78
|
"chokidar": "^4.0.3",
|
|
79
|
+
"csv-parse": "^5.5.6",
|
|
71
80
|
"duckdb": "^1.1.0",
|
|
81
|
+
"fast-deep-equal": "^3.1.3",
|
|
72
82
|
"gpt-tokenizer": "^3.2.0",
|
|
73
83
|
"p-queue": "^9.0.0",
|
|
74
84
|
"tree-sitter": "^0.22.0",
|
|
@@ -88,6 +98,7 @@
|
|
|
88
98
|
"eslint-config-prettier": "^9.1.0",
|
|
89
99
|
"eslint-plugin-import": "^2.29.1",
|
|
90
100
|
"execa": "^9.6.0",
|
|
101
|
+
"fast-check": "^4.3.0",
|
|
91
102
|
"lint-staged": "^15.2.10",
|
|
92
103
|
"prettier": "^3.3.3",
|
|
93
104
|
"simple-git-hooks": "^2.10.0",
|
package/dist/src/client/proxy.js
CHANGED
|
@@ -8,25 +8,94 @@
|
|
|
8
8
|
import * as net from "net";
|
|
9
9
|
import * as path from "path";
|
|
10
10
|
import * as readline from "readline";
|
|
11
|
-
import { parseArgs } from "util";
|
|
12
11
|
import packageJson from "../../package.json" with { type: "json" };
|
|
12
|
+
import { defineCli } from "../shared/cli/args.js";
|
|
13
13
|
import { getSocketPath } from "../shared/utils/socket.js";
|
|
14
14
|
import { startDaemon, isDaemonRunning, stopDaemon } from "./start-daemon.js";
|
|
15
|
+
/**
|
|
16
|
+
* CLI specification for kiri proxy
|
|
17
|
+
*/
|
|
18
|
+
const PROXY_CLI_SPEC = {
|
|
19
|
+
commandName: "kiri",
|
|
20
|
+
description: "KIRI MCP Client Proxy - Bridges stdio (MCP client) ↔ Unix socket (daemon)",
|
|
21
|
+
version: packageJson.version,
|
|
22
|
+
usage: "kiri [options]",
|
|
23
|
+
sections: [
|
|
24
|
+
{
|
|
25
|
+
title: "Repository / Database",
|
|
26
|
+
options: [
|
|
27
|
+
{
|
|
28
|
+
flag: "repo",
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Repository root path",
|
|
31
|
+
placeholder: "<path>",
|
|
32
|
+
default: ".",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
flag: "db",
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "Database file path (default: var/index.duckdb relative to --repo)",
|
|
38
|
+
placeholder: "<path>",
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: "Daemon Connection",
|
|
44
|
+
options: [
|
|
45
|
+
{
|
|
46
|
+
flag: "socket-path",
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "Unix socket path for daemon connection",
|
|
49
|
+
placeholder: "<path>",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: "Watch Mode",
|
|
55
|
+
options: [
|
|
56
|
+
{
|
|
57
|
+
flag: "watch",
|
|
58
|
+
type: "boolean",
|
|
59
|
+
description: "Enable watch mode for automatic re-indexing",
|
|
60
|
+
default: false,
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: "Security",
|
|
66
|
+
options: [
|
|
67
|
+
{
|
|
68
|
+
flag: "allow-degrade",
|
|
69
|
+
type: "boolean",
|
|
70
|
+
description: "Allow degraded mode without VSS/FTS extensions",
|
|
71
|
+
default: false,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
flag: "security-config",
|
|
75
|
+
type: "string",
|
|
76
|
+
description: "Security configuration file path",
|
|
77
|
+
placeholder: "<path>",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
flag: "security-lock",
|
|
81
|
+
type: "string",
|
|
82
|
+
description: "Security lock file path",
|
|
83
|
+
placeholder: "<path>",
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
examples: [
|
|
89
|
+
"kiri --repo /path/to/repo --db /path/to/index.duckdb",
|
|
90
|
+
"kiri --watch --allow-degrade",
|
|
91
|
+
"kiri --security-config config/security.yaml",
|
|
92
|
+
],
|
|
93
|
+
};
|
|
15
94
|
/**
|
|
16
95
|
* CLI引数をパース
|
|
17
96
|
*/
|
|
18
97
|
function parseProxyArgs() {
|
|
19
|
-
const { values } =
|
|
20
|
-
options: {
|
|
21
|
-
repo: { type: "string" },
|
|
22
|
-
db: { type: "string" },
|
|
23
|
-
"socket-path": { type: "string" },
|
|
24
|
-
watch: { type: "boolean", default: false },
|
|
25
|
-
"allow-degrade": { type: "boolean", default: false },
|
|
26
|
-
"security-config": { type: "string" },
|
|
27
|
-
"security-lock": { type: "string" },
|
|
28
|
-
},
|
|
29
|
-
});
|
|
98
|
+
const { values } = defineCli(PROXY_CLI_SPEC);
|
|
30
99
|
const repoRoot = path.resolve(values.repo || process.cwd());
|
|
31
100
|
const databasePath = path.resolve(values.db || path.join(repoRoot, "var", "index.duckdb"));
|
|
32
101
|
const socketPath = values["socket-path"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../../src/client/proxy.ts"],"names":[],"mappings":";A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