@furongjun1999/dsh-memory 0.9.10 → 0.9.13
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 +195 -150
- package/lib/hooks.d.ts +23 -2
- package/lib/hooks.js +96 -22
- package/lib/index.d.ts +3 -0
- package/lib/index.js +12 -1
- package/lib/tools.d.ts +8 -0
- package/lib/tools.js +32 -5
- package/md_cg/config_registry_bulk.py +6 -0
- package/md_cg/config_validate.py +6 -0
- package/md_cg/mcp_server.py +147 -11
- package/md_cg/mdcg.py +67 -3
- package/md_cg/mdcos.py +108 -1
- package/md_cg/refindex.py +11 -4
- package/md_cg/test_c8_search_rrf_gates.py +511 -502
- package/md_cg/test_domain_granularity.py +68 -0
- package/md_cg/test_exact_text_cache.py +12 -4
- package/md_cg/test_issue623_fullwidth_symmetry.py +66 -0
- package/md_cg/test_issue644_637_636.py +84 -0
- package/md_cg/test_p28_refcheck.py +7 -7
- package/md_cg/test_retr_gates_prodpath.py +11 -1
- package/md_cg/test_search_async.py +84 -0
- package/md_cg/test_search_prefilter.py +85 -0
- package/md_cg/tokens.py +5 -1
- package/package.json +113 -113
- package/scripts/workspace_index.py +2 -0
- package/src/hooks.ts +105 -23
- package/src/index.ts +15 -1
- package/src/tools.ts +37 -6
package/md_cg/refindex.py
CHANGED
|
@@ -423,11 +423,18 @@ def _domain_of(it: dict) -> str:
|
|
|
423
423
|
两者混成一个字段就会重演普查里的退化:实例名嵌进条件字段 → 3037 桶 /
|
|
424
424
|
3048 节点(99.9% 单例桶),路由等于失效。
|
|
425
425
|
|
|
426
|
-
|
|
427
|
-
|
|
426
|
+
取**整条相对路径**(2026-10-21 采纳外部用户 miyu 的修复一)。
|
|
427
|
+
|
|
428
|
+
为什么不再取首段:真实知识树常见形态是「少数顶层目录 + 其下大量子树」,
|
|
429
|
+
例如 default-kb/{shorinwiki,kb}。取首段时只有 2 个桶、99 篇文档全压在一个
|
|
430
|
+
桶里 ⇒ 巨桶占比 97.2%、期望扫描 94.6%,路由等于失效(外部实测:改整路径后
|
|
431
|
+
桶数 2→60、最大桶 97.2%→5.8%、期望扫描 94.6%→2.7%)。
|
|
432
|
+
|
|
433
|
+
安全性:docindex.node_id 只哈希 path#heading_path,**不含本域键**,
|
|
434
|
+
故改域只换桶、节点 id 完全不变,不产生重复节点。
|
|
428
435
|
"""
|
|
429
436
|
path = it.get("path") or ""
|
|
430
|
-
return path
|
|
437
|
+
return path or "orphan"
|
|
431
438
|
|
|
432
439
|
|
|
433
440
|
|
|
@@ -1189,4 +1196,4 @@ def rebuild(cg, *, ledger: "Ledger" = None, only_roots=None, max_files: int = 50
|
|
|
1189
1196
|
out["errors"].append(f"{root} [{kind}]:{exc}")
|
|
1190
1197
|
if ledger is not None:
|
|
1191
1198
|
ledger.save()
|
|
1192
|
-
return out
|
|
1199
|
+
return out
|