@furongjun1999/dsh-memory 0.9.7 → 0.9.9
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 +150 -662
- package/codebuddy/CODEBUDDY.md +337 -204
- package/docs/README.md +21 -0
- package/docs/discipline/harnesses.yaml +11 -3
- package/docs/discipline/templates/compact.txt.tmpl +20 -18
- package/docs/discipline/templates/full.md.tmpl +63 -61
- package/docs/discipline/templates/rules.mdc.tmpl +5 -3
- package/docs/discipline/templates/skill.md.tmpl +25 -23
- package/docs/discipline/templates/spec.txt.tmpl +1 -1
- package/docs/discipline/templates/zcode-user.md.tmpl +1 -1
- package/docs//350/247/204/350/214/203/AI/347/274/226/347/250/213/351/200/232/347/224/250/350/247/204/350/214/203.md +4 -0
- package/dsh/cordis.yml.example +2 -2
- package/lib/hooks.d.ts +11 -1
- package/lib/hooks.js +59 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +11 -5
- package/lib/init.js +28 -4
- package/lib/lib/hook_audit.d.ts +3 -0
- package/lib/lib/hook_audit.js +63 -0
- package/md_cg/autonomy.py +1 -1
- package/md_cg/config_registry.py +329 -329
- package/md_cg/config_registry_bulk.py +483 -482
- package/md_cg/config_render.py +27 -0
- package/md_cg/config_validate.py +456 -455
- package/md_cg/conflict_surface.py +127 -0
- package/md_cg/mcp_server.py +5324 -5227
- package/md_cg/mdcg.py +12 -1
- package/md_cg/mdcos.py +7159 -7108
- package/md_cg/pooling.py +487 -485
- package/md_cg/qmd_llm.py +334 -334
- package/md_cg/reach.py +10 -4
- package/md_cg/sleep.py +2 -2
- package/md_cg/sustain.py +13 -4
- package/md_cg/test_auto_defaults.py +463 -463
- package/md_cg/test_autonomy_emotion.py +328 -328
- package/md_cg/test_bm25_default.py +56 -0
- package/md_cg/test_c3_transient_read_negative.py +7 -3
- package/md_cg/test_conflict_surface.py +75 -0
- package/md_cg/test_conflict_value_untrusted.py +63 -0
- package/md_cg/test_exact_text_cache.py +194 -191
- package/md_cg/test_heartbeat_ledger.py +563 -557
- package/md_cg/test_hotcache_tool.py +121 -0
- package/md_cg/test_issue274_read_node_id_none.py +364 -341
- package/md_cg/test_issue561_pending_review.py +89 -5
- package/md_cg/test_issue578_service_info_gate.py +264 -0
- package/md_cg/test_n184_keys_concurrent_provision.py +1 -1
- package/md_cg/test_p3_legacy_closure.py +441 -438
- package/md_cg/test_p43_pooling.py +419 -412
- package/md_cg/test_reach.py +5 -1
- package/md_cg/test_reach_exits.py +54 -0
- package/md_cg/test_reach_single_char.py +74 -0
- package/md_cg/test_read_scope_b27.py +2 -2
- package/md_cg/test_search_bm25_default.py +60 -0
- package/md_cg/test_security_audit_v21.py +249 -249
- package/md_cg/test_sleep_p1.py +1032 -1032
- package/md_cg/test_sustain_bad_stamp.py +178 -0
- package/md_cg/test_untrusted_audit.py +55 -0
- package/md_cg/test_untrusted_classifier.py +42 -0
- package/md_cg/test_untrusted_enforcement.py +66 -0
- package/md_cg/untrusted.py +45 -0
- package/md_cg/untrusted_audit.py +87 -0
- package/md_cg/value_conflict.py +71 -0
- package/package.json +7 -7
- package/src/hooks.ts +986 -932
- package/src/index.ts +20 -14
- package/src/init.ts +21 -4
- package/src/lib/hook_audit.ts +334 -282
- package/zcode/AGENTS.md +337 -204
package/md_cg/mdcg.py
CHANGED
|
@@ -3039,6 +3039,17 @@ class MdCG:
|
|
|
3039
3039
|
"evidence_count": 0, "positive_evidence": 0, "negative_evidence": 0,
|
|
3040
3040
|
}
|
|
3041
3041
|
fm.update(extra)
|
|
3042
|
+
# 写入面信任标记(使用者裁定 2026-10-21:「未验证、未信任的信息本来就不应该执行」):
|
|
3043
|
+
# 文本里出现伪装系统消息/指令式短语 ⇒ 落 untrusted 标记 + 命中词,供检索面与
|
|
3044
|
+
# 上层(注入前)据此把它当**数据**而不是指令;不改正文(数据无损)。
|
|
3045
|
+
try:
|
|
3046
|
+
from . import untrusted as _un
|
|
3047
|
+
_u = _un.classify(content)
|
|
3048
|
+
if _u.get("untrusted"):
|
|
3049
|
+
fm["untrusted"] = True
|
|
3050
|
+
fm["untrusted_markers"] = list(_u.get("markers") or [])
|
|
3051
|
+
except Exception:
|
|
3052
|
+
pass
|
|
3042
3053
|
# 相对时间锚定(MDCG_TIME_ANCHOR=1,缺省关 ⇒ 零调用、fm 逐位不变):无显式 temporal
|
|
3043
3054
|
# 时把正文里的时间表达以 created_at 为参照归一成派生字段 temporal_anchor;解析不了不写。
|
|
3044
3055
|
if _timeanchor.enabled():
|
|
@@ -5436,7 +5447,7 @@ class MdCG:
|
|
|
5436
5447
|
# 阶段 1 大域收敛结果 + 完整打分明细(白箱可审计)
|
|
5437
5448
|
"big_domain": big_domain,
|
|
5438
5449
|
"big_domain_scores": big_scores,
|
|
5439
|
-
# reach 收敛层审计(2026-09-18):reach=converged/off/short_term
|
|
5450
|
+
# reach 收敛层审计(2026-09-18):reach=converged/off/index_unavailable/hash_incomplete/no_tokens/empty_converge/fresh_overflow(#611 起不再产生 short_term)
|
|
5440
5451
|
# 与 reach_seed(倒排命中数)/reach_diffused(图扩散增量)——
|
|
5441
5452
|
# A3「触碰量随查询变化」的观测面(scanned 只报读盘数)
|
|
5442
5453
|
"reach": stat.get("reach"),
|