ralph-hero-knowledge-index 0.1.49 → 0.1.52
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/plugin.json +1 -1
- package/.mcp.json +1 -1
- package/README.md +12 -0
- package/coverage/coverage-summary.json +3 -3
- package/coverage/lcov-report/chunker.ts.html +1 -1
- package/coverage/lcov-report/config.ts.html +1 -1
- package/coverage/lcov-report/db.ts.html +1 -1
- package/coverage/lcov-report/embedder.ts.html +1 -1
- package/coverage/lcov-report/file-scanner.ts.html +1 -1
- package/coverage/lcov-report/format.ts.html +1 -1
- package/coverage/lcov-report/generate-indexes.ts.html +1 -1
- package/coverage/lcov-report/graph-builder.ts.html +1 -1
- package/coverage/lcov-report/graph-tools.ts.html +1 -1
- package/coverage/lcov-report/hybrid-search.ts.html +1 -1
- package/coverage/lcov-report/ignore.ts.html +1 -1
- package/coverage/lcov-report/index.html +16 -16
- package/coverage/lcov-report/index.ts.html +1 -1
- package/coverage/lcov-report/llm-client.ts.html +1 -1
- package/coverage/lcov-report/parser.ts.html +91 -34
- package/coverage/lcov-report/reindex.ts.html +69 -15
- package/coverage/lcov-report/reranker.ts.html +1 -1
- package/coverage/lcov-report/search.ts.html +1 -1
- package/coverage/lcov-report/traverse.ts.html +1 -1
- package/coverage/lcov-report/vector-search.ts.html +1 -1
- package/coverage/lcov.info +331 -318
- package/dist/parser.js +20 -1
- package/dist/parser.js.map +1 -1
- package/dist/reindex.js +25 -7
- package/dist/reindex.js.map +1 -1
- package/package.json +1 -1
- package/skills/capture/SKILL.md +52 -0
- package/skills/dream-loop/SKILL.md +77 -0
- package/src/__tests__/index.test.ts +5 -2
- package/src/__tests__/parser.test.ts +29 -0
- package/src/parser.ts +20 -1
- package/src/reindex.ts +25 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ralph-knowledge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.52",
|
|
4
4
|
"description": "Knowledge graph for ralph-hero: semantic search, relationship traversal, and document indexing across thoughts/ documents. Optional companion to ralph-hero.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Chad Dubiel",
|
package/.mcp.json
CHANGED
package/README.md
CHANGED
|
@@ -16,6 +16,18 @@ npm run reindex -- /path/to/roots # CLI override, see "Configuration"
|
|
|
16
16
|
|
|
17
17
|
A SQLite file is written to `~/.ralph-hero/knowledge.db` by default.
|
|
18
18
|
|
|
19
|
+
## Skills
|
|
20
|
+
|
|
21
|
+
| Skill | Purpose |
|
|
22
|
+
|-------|---------|
|
|
23
|
+
| `/ralph-knowledge:setup` | First-time index build, roots configuration, optional dream-loop bootstrap. |
|
|
24
|
+
| `/ralph-knowledge:capture` | In-flow memory capture — "remember this" distills the current insight/session into raw memories via `knowledge_remember`. |
|
|
25
|
+
| `/ralph-knowledge:dream-loop` | On-demand memory consolidation: ingest raw activity (Gemma lab logs, git history, llm-cli transcripts, Claude Code sessions), synthesize reflections. |
|
|
26
|
+
| `/ralph-knowledge:curate` | Human-gated promotion of recurring insights into the wiki tier. |
|
|
27
|
+
| `/ralph-knowledge:setup-obsidian` | Configure `thoughts/` as an Obsidian vault for browsing. |
|
|
28
|
+
|
|
29
|
+
The memory path is: **capture/ingest (raw) → dream-loop (reflection) → curate (wiki)**.
|
|
30
|
+
|
|
19
31
|
## Configuration
|
|
20
32
|
|
|
21
33
|
ralph-knowledge reads configuration from four sources. Each source can be
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{"total": {"lines":{"total":
|
|
1
|
+
{"total": {"lines":{"total":1532,"covered":1382,"skipped":0,"pct":90.2},"statements":{"total":1666,"covered":1489,"skipped":0,"pct":89.37},"functions":{"total":224,"covered":206,"skipped":0,"pct":91.96},"branches":{"total":957,"covered":782,"skipped":0,"pct":81.71},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":"Unknown"}}
|
|
2
2
|
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/chunker.ts": {"lines":{"total":91,"covered":85,"skipped":0,"pct":93.4},"functions":{"total":6,"covered":6,"skipped":0,"pct":100},"statements":{"total":94,"covered":88,"skipped":0,"pct":93.61},"branches":{"total":45,"covered":39,"skipped":0,"pct":86.66}}
|
|
3
3
|
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/config.ts": {"lines":{"total":34,"covered":32,"skipped":0,"pct":94.11},"functions":{"total":5,"covered":5,"skipped":0,"pct":100},"statements":{"total":36,"covered":34,"skipped":0,"pct":94.44},"branches":{"total":31,"covered":31,"skipped":0,"pct":100}}
|
|
4
4
|
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/db.ts": {"lines":{"total":134,"covered":130,"skipped":0,"pct":97.01},"functions":{"total":33,"covered":33,"skipped":0,"pct":100},"statements":{"total":140,"covered":135,"skipped":0,"pct":96.42},"branches":{"total":85,"covered":75,"skipped":0,"pct":88.23}}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/ignore.ts": {"lines":{"total":17,"covered":16,"skipped":0,"pct":94.11},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":19,"covered":18,"skipped":0,"pct":94.73},"branches":{"total":12,"covered":11,"skipped":0,"pct":91.66}}
|
|
13
13
|
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/index.ts": {"lines":{"total":200,"covered":178,"skipped":0,"pct":89},"functions":{"total":29,"covered":25,"skipped":0,"pct":86.2},"statements":{"total":219,"covered":193,"skipped":0,"pct":88.12},"branches":{"total":136,"covered":98,"skipped":0,"pct":72.05}}
|
|
14
14
|
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/llm-client.ts": {"lines":{"total":31,"covered":31,"skipped":0,"pct":100},"functions":{"total":6,"covered":5,"skipped":0,"pct":83.33},"statements":{"total":33,"covered":32,"skipped":0,"pct":96.96},"branches":{"total":13,"covered":13,"skipped":0,"pct":100}}
|
|
15
|
-
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/parser.ts": {"lines":{"total":
|
|
16
|
-
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/reindex.ts": {"lines":{"total":
|
|
15
|
+
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/parser.ts": {"lines":{"total":54,"covered":54,"skipped":0,"pct":100},"functions":{"total":6,"covered":6,"skipped":0,"pct":100},"statements":{"total":58,"covered":58,"skipped":0,"pct":100},"branches":{"total":46,"covered":41,"skipped":0,"pct":89.13}}
|
|
16
|
+
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/reindex.ts": {"lines":{"total":247,"covered":159,"skipped":0,"pct":64.37},"functions":{"total":18,"covered":9,"skipped":0,"pct":50},"statements":{"total":264,"covered":166,"skipped":0,"pct":62.87},"branches":{"total":114,"covered":74,"skipped":0,"pct":64.91}}
|
|
17
17
|
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/reranker.ts": {"lines":{"total":42,"covered":37,"skipped":0,"pct":88.09},"functions":{"total":7,"covered":6,"skipped":0,"pct":85.71},"statements":{"total":44,"covered":39,"skipped":0,"pct":88.63},"branches":{"total":22,"covered":18,"skipped":0,"pct":81.81}}
|
|
18
18
|
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/search.ts": {"lines":{"total":40,"covered":40,"skipped":0,"pct":100},"functions":{"total":12,"covered":12,"skipped":0,"pct":100},"statements":{"total":47,"covered":46,"skipped":0,"pct":97.87},"branches":{"total":24,"covered":23,"skipped":0,"pct":95.83}}
|
|
19
19
|
,"/home/runner/work/ralph-hero/ralph-hero/plugin/ralph-knowledge/src/traverse.ts": {"lines":{"total":15,"covered":15,"skipped":0,"pct":100},"functions":{"total":5,"covered":5,"skipped":0,"pct":100},"statements":{"total":19,"covered":18,"skipped":0,"pct":94.73},"branches":{"total":16,"covered":12,"skipped":0,"pct":75}}
|
|
@@ -940,7 +940,7 @@ export function chunkText(text: string, opts: ChunkerOptions = {}): Chunk[] {
|
|
|
940
940
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
941
941
|
Code coverage generated by
|
|
942
942
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
943
|
-
at 2026-
|
|
943
|
+
at 2026-06-12T02:31:22.247Z
|
|
944
944
|
</div>
|
|
945
945
|
<script src="prettify.js"></script>
|
|
946
946
|
<script>
|
|
@@ -385,7 +385,7 @@ export function loadConfig(): KnowledgeConfig {
|
|
|
385
385
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
386
386
|
Code coverage generated by
|
|
387
387
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
388
|
-
at 2026-
|
|
388
|
+
at 2026-06-12T02:31:22.247Z
|
|
389
389
|
</div>
|
|
390
390
|
<script src="prettify.js"></script>
|
|
391
391
|
<script>
|
|
@@ -1897,7 +1897,7 @@ export class KnowledgeDB {
|
|
|
1897
1897
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1898
1898
|
Code coverage generated by
|
|
1899
1899
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1900
|
-
at 2026-
|
|
1900
|
+
at 2026-06-12T02:31:22.247Z
|
|
1901
1901
|
</div>
|
|
1902
1902
|
<script src="prettify.js"></script>
|
|
1903
1903
|
<script>
|
|
@@ -763,7 +763,7 @@ export function prepareTextForEmbedding(
|
|
|
763
763
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
764
764
|
Code coverage generated by
|
|
765
765
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
766
|
-
at 2026-
|
|
766
|
+
at 2026-06-12T02:31:22.247Z
|
|
767
767
|
</div>
|
|
768
768
|
<script src="prettify.js"></script>
|
|
769
769
|
<script>
|
|
@@ -199,7 +199,7 @@ export function findMarkdownFiles(dir: string, matcher?: IgnoreMatcher): string[
|
|
|
199
199
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
200
200
|
Code coverage generated by
|
|
201
201
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
202
|
-
at 2026-
|
|
202
|
+
at 2026-06-12T02:31:22.247Z
|
|
203
203
|
</div>
|
|
204
204
|
<script src="prettify.js"></script>
|
|
205
205
|
<script>
|
|
@@ -295,7 +295,7 @@ export function formatTraverseResults(
|
|
|
295
295
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
296
296
|
Code coverage generated by
|
|
297
297
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
298
|
-
at 2026-
|
|
298
|
+
at 2026-06-12T02:31:22.247Z
|
|
299
299
|
</div>
|
|
300
300
|
<script src="prettify.js"></script>
|
|
301
301
|
<script>
|
|
@@ -946,7 +946,7 @@ export function generateIndexes(outDir: string, allDocs: ParsedDocument[]): void
|
|
|
946
946
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
947
947
|
Code coverage generated by
|
|
948
948
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
949
|
-
at 2026-
|
|
949
|
+
at 2026-06-12T02:31:22.247Z
|
|
950
950
|
</div>
|
|
951
951
|
<script src="prettify.js"></script>
|
|
952
952
|
<script>
|
|
@@ -292,7 +292,7 @@ export class GraphBuilder {
|
|
|
292
292
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
293
293
|
Code coverage generated by
|
|
294
294
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
295
|
-
at 2026-
|
|
295
|
+
at 2026-06-12T02:31:22.247Z
|
|
296
296
|
</div>
|
|
297
297
|
<script src="prettify.js"></script>
|
|
298
298
|
<script>
|
|
@@ -2821,7 +2821,7 @@ export function registerGraphTools(server: McpServer, db: KnowledgeDB): void {
|
|
|
2821
2821
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
2822
2822
|
Code coverage generated by
|
|
2823
2823
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
2824
|
-
at 2026-
|
|
2824
|
+
at 2026-06-12T02:31:22.247Z
|
|
2825
2825
|
</div>
|
|
2826
2826
|
<script src="prettify.js"></script>
|
|
2827
2827
|
<script>
|
|
@@ -1606,7 +1606,7 @@ export class HybridSearch {
|
|
|
1606
1606
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1607
1607
|
Code coverage generated by
|
|
1608
1608
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1609
|
-
at 2026-
|
|
1609
|
+
at 2026-06-12T02:31:22.247Z
|
|
1610
1610
|
</div>
|
|
1611
1611
|
<script src="prettify.js"></script>
|
|
1612
1612
|
<script>
|
|
@@ -316,7 +316,7 @@ export function loadIgnoreForRoot(
|
|
|
316
316
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
317
317
|
Code coverage generated by
|
|
318
318
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
319
|
-
at 2026-
|
|
319
|
+
at 2026-06-12T02:31:22.247Z
|
|
320
320
|
</div>
|
|
321
321
|
<script src="prettify.js"></script>
|
|
322
322
|
<script>
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">89.
|
|
26
|
+
<span class="strong">89.37% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>1489/1666</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">91.
|
|
40
|
+
<span class="strong">91.96% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>206/224</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">90.
|
|
47
|
+
<span class="strong">90.2% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>1382/1532</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -279,28 +279,28 @@
|
|
|
279
279
|
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
|
280
280
|
</td>
|
|
281
281
|
<td data-value="100" class="pct high">100%</td>
|
|
282
|
-
<td data-value="
|
|
282
|
+
<td data-value="58" class="abs high">58/58</td>
|
|
283
283
|
<td data-value="89.13" class="pct high">89.13%</td>
|
|
284
284
|
<td data-value="46" class="abs high">41/46</td>
|
|
285
285
|
<td data-value="100" class="pct high">100%</td>
|
|
286
|
-
<td data-value="
|
|
286
|
+
<td data-value="6" class="abs high">6/6</td>
|
|
287
287
|
<td data-value="100" class="pct high">100%</td>
|
|
288
|
-
<td data-value="
|
|
288
|
+
<td data-value="54" class="abs high">54/54</td>
|
|
289
289
|
</tr>
|
|
290
290
|
|
|
291
291
|
<tr>
|
|
292
292
|
<td class="file medium" data-value="reindex.ts"><a href="reindex.ts.html">reindex.ts</a></td>
|
|
293
|
-
<td data-value="
|
|
294
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
293
|
+
<td data-value="62.87" class="pic medium">
|
|
294
|
+
<div class="chart"><div class="cover-fill" style="width: 62%"></div><div class="cover-empty" style="width: 38%"></div></div>
|
|
295
295
|
</td>
|
|
296
|
-
<td data-value="
|
|
297
|
-
<td data-value="
|
|
296
|
+
<td data-value="62.87" class="pct medium">62.87%</td>
|
|
297
|
+
<td data-value="264" class="abs medium">166/264</td>
|
|
298
298
|
<td data-value="64.91" class="pct medium">64.91%</td>
|
|
299
299
|
<td data-value="114" class="abs medium">74/114</td>
|
|
300
300
|
<td data-value="50" class="pct medium">50%</td>
|
|
301
301
|
<td data-value="18" class="abs medium">9/18</td>
|
|
302
|
-
<td data-value="
|
|
303
|
-
<td data-value="
|
|
302
|
+
<td data-value="64.37" class="pct medium">64.37%</td>
|
|
303
|
+
<td data-value="247" class="abs medium">159/247</td>
|
|
304
304
|
</tr>
|
|
305
305
|
|
|
306
306
|
<tr>
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
372
372
|
Code coverage generated by
|
|
373
373
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
374
|
-
at 2026-
|
|
374
|
+
at 2026-06-12T02:31:22.247Z
|
|
375
375
|
</div>
|
|
376
376
|
<script src="prettify.js"></script>
|
|
377
377
|
<script>
|
|
@@ -2515,7 +2515,7 @@ server.connect(transport).catch(console.error);
|
|
|
2515
2515
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
2516
2516
|
Code coverage generated by
|
|
2517
2517
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
2518
|
-
at 2026-
|
|
2518
|
+
at 2026-06-12T02:31:22.247Z
|
|
2519
2519
|
</div>
|
|
2520
2520
|
<script src="prettify.js"></script>
|
|
2521
2521
|
<script>
|
|
@@ -478,7 +478,7 @@ export function createLlmClient(opts: LlmClientOptions = {}): LlmClient {
|
|
|
478
478
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
479
479
|
Code coverage generated by
|
|
480
480
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
481
|
-
at 2026-
|
|
481
|
+
at 2026-06-12T02:31:22.247Z
|
|
482
482
|
</div>
|
|
483
483
|
<script src="prettify.js"></script>
|
|
484
484
|
<script>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>58/58</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>6/6</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>54/54</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -228,7 +228,26 @@
|
|
|
228
228
|
<a name='L163'></a><a href='#L163'>163</a>
|
|
229
229
|
<a name='L164'></a><a href='#L164'>164</a>
|
|
230
230
|
<a name='L165'></a><a href='#L165'>165</a>
|
|
231
|
-
<a name='L166'></a><a href='#L166'>166</a
|
|
231
|
+
<a name='L166'></a><a href='#L166'>166</a>
|
|
232
|
+
<a name='L167'></a><a href='#L167'>167</a>
|
|
233
|
+
<a name='L168'></a><a href='#L168'>168</a>
|
|
234
|
+
<a name='L169'></a><a href='#L169'>169</a>
|
|
235
|
+
<a name='L170'></a><a href='#L170'>170</a>
|
|
236
|
+
<a name='L171'></a><a href='#L171'>171</a>
|
|
237
|
+
<a name='L172'></a><a href='#L172'>172</a>
|
|
238
|
+
<a name='L173'></a><a href='#L173'>173</a>
|
|
239
|
+
<a name='L174'></a><a href='#L174'>174</a>
|
|
240
|
+
<a name='L175'></a><a href='#L175'>175</a>
|
|
241
|
+
<a name='L176'></a><a href='#L176'>176</a>
|
|
242
|
+
<a name='L177'></a><a href='#L177'>177</a>
|
|
243
|
+
<a name='L178'></a><a href='#L178'>178</a>
|
|
244
|
+
<a name='L179'></a><a href='#L179'>179</a>
|
|
245
|
+
<a name='L180'></a><a href='#L180'>180</a>
|
|
246
|
+
<a name='L181'></a><a href='#L181'>181</a>
|
|
247
|
+
<a name='L182'></a><a href='#L182'>182</a>
|
|
248
|
+
<a name='L183'></a><a href='#L183'>183</a>
|
|
249
|
+
<a name='L184'></a><a href='#L184'>184</a>
|
|
250
|
+
<a name='L185'></a><a href='#L185'>185</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
232
251
|
<span class="cline-any cline-neutral"> </span>
|
|
233
252
|
<span class="cline-any cline-neutral"> </span>
|
|
234
253
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -278,10 +297,10 @@
|
|
|
278
297
|
<span class="cline-any cline-neutral"> </span>
|
|
279
298
|
<span class="cline-any cline-neutral"> </span>
|
|
280
299
|
<span class="cline-any cline-neutral"> </span>
|
|
281
|
-
<span class="cline-any cline-yes">
|
|
282
|
-
<span class="cline-any cline-yes">
|
|
300
|
+
<span class="cline-any cline-yes">20x</span>
|
|
301
|
+
<span class="cline-any cline-yes">88x</span>
|
|
283
302
|
<span class="cline-any cline-neutral"> </span>
|
|
284
|
-
<span class="cline-any cline-yes">
|
|
303
|
+
<span class="cline-any cline-yes">15x</span>
|
|
285
304
|
<span class="cline-any cline-neutral"> </span>
|
|
286
305
|
<span class="cline-any cline-neutral"> </span>
|
|
287
306
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -295,20 +314,20 @@
|
|
|
295
314
|
<span class="cline-any cline-neutral"> </span>
|
|
296
315
|
<span class="cline-any cline-neutral"> </span>
|
|
297
316
|
<span class="cline-any cline-neutral"> </span>
|
|
298
|
-
<span class="cline-any cline-yes">
|
|
317
|
+
<span class="cline-any cline-yes">226x</span>
|
|
299
318
|
<span class="cline-any cline-neutral"> </span>
|
|
300
319
|
<span class="cline-any cline-neutral"> </span>
|
|
301
|
-
<span class="cline-any cline-yes">
|
|
320
|
+
<span class="cline-any cline-yes">226x</span>
|
|
302
321
|
<span class="cline-any cline-neutral"> </span>
|
|
303
|
-
<span class="cline-any cline-yes">
|
|
322
|
+
<span class="cline-any cline-yes">226x</span>
|
|
304
323
|
<span class="cline-any cline-neutral"> </span>
|
|
305
|
-
<span class="cline-any cline-yes">
|
|
324
|
+
<span class="cline-any cline-yes">460x</span>
|
|
306
325
|
<span class="cline-any cline-neutral"> </span>
|
|
307
|
-
<span class="cline-any cline-yes">
|
|
308
|
-
<span class="cline-any cline-yes">
|
|
326
|
+
<span class="cline-any cline-yes">460x</span>
|
|
327
|
+
<span class="cline-any cline-yes">460x</span>
|
|
309
328
|
<span class="cline-any cline-neutral"> </span>
|
|
310
329
|
<span class="cline-any cline-neutral"> </span>
|
|
311
|
-
<span class="cline-any cline-yes">
|
|
330
|
+
<span class="cline-any cline-yes">460x</span>
|
|
312
331
|
<span class="cline-any cline-yes">32x</span>
|
|
313
332
|
<span class="cline-any cline-neutral"> </span>
|
|
314
333
|
<span class="cline-any cline-yes">32x</span>
|
|
@@ -320,20 +339,39 @@
|
|
|
320
339
|
<span class="cline-any cline-neutral"> </span>
|
|
321
340
|
<span class="cline-any cline-neutral"> </span>
|
|
322
341
|
<span class="cline-any cline-neutral"> </span>
|
|
323
|
-
<span class="cline-any cline-yes">
|
|
342
|
+
<span class="cline-any cline-yes">226x</span>
|
|
324
343
|
<span class="cline-any cline-neutral"> </span>
|
|
325
344
|
<span class="cline-any cline-neutral"> </span>
|
|
326
345
|
<span class="cline-any cline-neutral"> </span>
|
|
327
|
-
<span class="cline-any cline-yes">217x</span>
|
|
328
|
-
<span class="cline-any cline-yes">217x</span>
|
|
329
|
-
<span class="cline-any cline-yes">217x</span>
|
|
330
|
-
<span class="cline-any cline-yes">217x</span>
|
|
331
|
-
<span class="cline-any cline-yes">217x</span>
|
|
332
346
|
<span class="cline-any cline-neutral"> </span>
|
|
333
|
-
<span class="cline-any cline-yes">217x</span>
|
|
334
347
|
<span class="cline-any cline-neutral"> </span>
|
|
335
|
-
<span class="cline-any cline-
|
|
336
|
-
<span class="cline-any cline-
|
|
348
|
+
<span class="cline-any cline-neutral"> </span>
|
|
349
|
+
<span class="cline-any cline-neutral"> </span>
|
|
350
|
+
<span class="cline-any cline-neutral"> </span>
|
|
351
|
+
<span class="cline-any cline-neutral"> </span>
|
|
352
|
+
<span class="cline-any cline-neutral"> </span>
|
|
353
|
+
<span class="cline-any cline-neutral"> </span>
|
|
354
|
+
<span class="cline-any cline-neutral"> </span>
|
|
355
|
+
<span class="cline-any cline-yes">218x</span>
|
|
356
|
+
<span class="cline-any cline-yes">218x</span>
|
|
357
|
+
<span class="cline-any cline-neutral"> </span>
|
|
358
|
+
<span class="cline-any cline-yes">1x</span>
|
|
359
|
+
<span class="cline-any cline-yes">1x</span>
|
|
360
|
+
<span class="cline-any cline-yes">1x</span>
|
|
361
|
+
<span class="cline-any cline-neutral"> </span>
|
|
362
|
+
<span class="cline-any cline-neutral"> </span>
|
|
363
|
+
<span class="cline-any cline-neutral"> </span>
|
|
364
|
+
<span class="cline-any cline-neutral"> </span>
|
|
365
|
+
<span class="cline-any cline-yes">218x</span>
|
|
366
|
+
<span class="cline-any cline-yes">218x</span>
|
|
367
|
+
<span class="cline-any cline-yes">218x</span>
|
|
368
|
+
<span class="cline-any cline-yes">218x</span>
|
|
369
|
+
<span class="cline-any cline-yes">218x</span>
|
|
370
|
+
<span class="cline-any cline-neutral"> </span>
|
|
371
|
+
<span class="cline-any cline-yes">218x</span>
|
|
372
|
+
<span class="cline-any cline-neutral"> </span>
|
|
373
|
+
<span class="cline-any cline-yes">218x</span>
|
|
374
|
+
<span class="cline-any cline-yes">218x</span>
|
|
337
375
|
<span class="cline-any cline-yes">17x</span>
|
|
338
376
|
<span class="cline-any cline-neutral"> </span>
|
|
339
377
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -343,8 +381,8 @@
|
|
|
343
381
|
<span class="cline-any cline-neutral"> </span>
|
|
344
382
|
<span class="cline-any cline-neutral"> </span>
|
|
345
383
|
<span class="cline-any cline-neutral"> </span>
|
|
346
|
-
<span class="cline-any cline-yes">
|
|
347
|
-
<span class="cline-any cline-yes">
|
|
384
|
+
<span class="cline-any cline-yes">218x</span>
|
|
385
|
+
<span class="cline-any cline-yes">218x</span>
|
|
348
386
|
<span class="cline-any cline-yes">2x</span>
|
|
349
387
|
<span class="cline-any cline-yes">2x</span>
|
|
350
388
|
<span class="cline-any cline-yes">2x</span>
|
|
@@ -352,18 +390,18 @@
|
|
|
352
390
|
<span class="cline-any cline-neutral"> </span>
|
|
353
391
|
<span class="cline-any cline-neutral"> </span>
|
|
354
392
|
<span class="cline-any cline-neutral"> </span>
|
|
355
|
-
<span class="cline-any cline-yes">
|
|
356
|
-
<span class="cline-any cline-yes">
|
|
393
|
+
<span class="cline-any cline-yes">218x</span>
|
|
394
|
+
<span class="cline-any cline-yes">218x</span>
|
|
357
395
|
<span class="cline-any cline-neutral"> </span>
|
|
358
|
-
<span class="cline-any cline-yes">
|
|
396
|
+
<span class="cline-any cline-yes">218x</span>
|
|
359
397
|
<span class="cline-any cline-neutral"> </span>
|
|
360
398
|
<span class="cline-any cline-neutral"> </span>
|
|
361
399
|
<span class="cline-any cline-neutral"> </span>
|
|
362
400
|
<span class="cline-any cline-neutral"> </span>
|
|
363
401
|
<span class="cline-any cline-neutral"> </span>
|
|
364
|
-
<span class="cline-any cline-yes">
|
|
365
|
-
<span class="cline-any cline-yes">
|
|
366
|
-
<span class="cline-any cline-yes">
|
|
402
|
+
<span class="cline-any cline-yes">218x</span>
|
|
403
|
+
<span class="cline-any cline-yes">218x</span>
|
|
404
|
+
<span class="cline-any cline-yes">218x</span>
|
|
367
405
|
<span class="cline-any cline-yes">8x</span>
|
|
368
406
|
<span class="cline-any cline-yes">6x</span>
|
|
369
407
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -373,7 +411,7 @@
|
|
|
373
411
|
<span class="cline-any cline-neutral"> </span>
|
|
374
412
|
<span class="cline-any cline-neutral"> </span>
|
|
375
413
|
<span class="cline-any cline-neutral"> </span>
|
|
376
|
-
<span class="cline-any cline-yes">
|
|
414
|
+
<span class="cline-any cline-yes">218x</span>
|
|
377
415
|
<span class="cline-any cline-neutral"> </span>
|
|
378
416
|
<span class="cline-any cline-neutral"> </span>
|
|
379
417
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -488,9 +526,28 @@ export function extractUntypedWikilinks(
|
|
|
488
526
|
return edges;
|
|
489
527
|
}
|
|
490
528
|
|
|
529
|
+
/**
|
|
530
|
+
* Parse a frontmatter block, falling back to {} on invalid YAML.
|
|
531
|
+
*
|
|
532
|
+
* The corpus is hand- and agent-authored markdown from many roots; one
|
|
533
|
+
* unquoted `title: A: B` must not abort an entire reindex run. A document
|
|
534
|
+
* with broken frontmatter is still indexed — title comes from the body
|
|
535
|
+
* heading and memory_tier coerces to 'doc', per the forgiving-parser
|
|
536
|
+
* policy above.
|
|
537
|
+
*/
|
|
538
|
+
function parseFrontmatterForgiving(src: string, path: string): Record<string, any> {
|
|
539
|
+
try {
|
|
540
|
+
return parseYaml(src) ?? <span class="branch-1 cbranch-no" title="branch not covered" >{};</span>
|
|
541
|
+
} catch (e) {
|
|
542
|
+
const firstLine = (e as Error).message.split("\n")[0];
|
|
543
|
+
console.warn(`parseDocument: invalid YAML frontmatter in ${path} (${firstLine}); indexing with empty frontmatter`);
|
|
544
|
+
return {};
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
|
|
491
548
|
export function parseDocument(id: string, path: string, raw: string): ParsedDocument {
|
|
492
549
|
const fmMatch = raw.match(FRONTMATTER_RE);
|
|
493
|
-
const frontmatter = fmMatch ?
|
|
550
|
+
const frontmatter = fmMatch ? parseFrontmatterForgiving(fmMatch[1], path) : <span class="branch-1 cbranch-no" title="branch not covered" >{};</span>
|
|
494
551
|
const body = fmMatch ? raw.slice(fmMatch[0].length).trim() : <span class="branch-1 cbranch-no" title="branch not covered" >raw.trim();</span>
|
|
495
552
|
const titleMatch = body.match(TITLE_RE);
|
|
496
553
|
const title = titleMatch ? titleMatch[1].trim() : <span class="branch-1 cbranch-no" title="branch not covered" >id;</span>
|
|
@@ -565,7 +622,7 @@ export function parseDocument(id: string, path: string, raw: string): ParsedDocu
|
|
|
565
622
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
566
623
|
Code coverage generated by
|
|
567
624
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
568
|
-
at 2026-
|
|
625
|
+
at 2026-06-12T02:31:22.247Z
|
|
569
626
|
</div>
|
|
570
627
|
<script src="prettify.js"></script>
|
|
571
628
|
<script>
|