@furongjun1999/dsh-memory 0.7.3 → 0.7.4
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 +16 -15
- package/docs/eval//345/217/221/345/270/20312_/344/270/226/347/225/214/346/250/241/345/236/213/345/212/237/350/203/275/347/253/257_v1.0.md +108 -0
- package/docs/eval//350/257/255/344/271/211/346/227/266/347/251/272/345/233/276/350/241/245/345/205/250_P1_/346/212/275/345/217/226/345/231/250v4_/344/270/211/347/216/207/350/257/273/346/225/260_v1.0.md +231 -0
- package/docs/mdcg//344/270/226/347/225/214/346/250/241/345/236/213/345/212/237/350/203/275/347/253/257_/344/275/277/347/224/250/344/270/216/350/277/220/347/273/264_v1.0.md +305 -0
- package/docs/mdcg//345/212/237/350/203/275/350/260/203/347/224/250/346/230/240/345/260/204/350/241/250_v0.1.md +45 -43
- package/lib/hooks.js +40 -18
- package/lib/lib/session_state.d.ts +56 -0
- package/lib/lib/session_state.js +124 -0
- package/lib/tools.js +12 -1
- package/md_cg/lifecycle.py +38 -0
- package/md_cg/mcp_server.py +64 -11
- package/md_cg/mdcos.py +78 -9
- package/md_cg/state_slots.py +221 -0
- package/md_cg/stg.py +68 -3
- package/md_cg/test_lifecycle_retire_leak.py +408 -0
- package/md_cg/test_read_face_semantics.py +6 -3
- package/md_cg/test_state_event_op.py +514 -0
- package/md_cg/test_state_slots.py +691 -0
- package/md_cg/tokens.py +8 -1
- package/package.json +1 -1
- package/skills/plugin.json +1 -1
- package/src/hooks.ts +40 -17
- package/src/lib/session_state.ts +127 -0
- package/src/tools.ts +12 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|

|
|
15
15
|
|
|
16
|
-
**高性能 · 无幻觉 · 多智能体适用的长期记忆系统(v0.7.
|
|
16
|
+
**高性能 · 无幻觉 · 多智能体适用的长期记忆系统(v0.7.4)**
|
|
17
17
|
|
|
18
18
|
</div>
|
|
19
19
|
|
|
@@ -393,28 +393,28 @@ python test/locomo_jaccard_probe.py # 主路线 Jaccard 口径拆解(J2_f
|
|
|
393
393
|
|
|
394
394
|
<!-- COGMAP:BEGIN (scripts/cogmap_sync.py 自动生成 · 真源 md_cg/mcp_server.py · 勿手改段内) -->
|
|
395
395
|
|
|
396
|
-
**两个认知基元 ·
|
|
396
|
+
**两个认知基元 · 43 个 op**(`kernel` 面)——下列 op 清单、实现模块与全部链接行号由 [cogmap_sync](scripts/cogmap_sync.py) 从真源自动提取,`check` 门禁守卫漂移;**点击任意名字直达源码对应行**:
|
|
397
397
|
|
|
398
398
|
| 基元 | op 数 | op 清单(点击直达实现分支) |
|
|
399
399
|
|---|---|---|
|
|
400
|
-
| **[`cg`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L610)** 认知图统一入口 |
|
|
401
|
-
| **[`stg`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#
|
|
400
|
+
| **[`cg`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L610)** 认知图统一入口 | 38 | [`help`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2125) [`state_event`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2452) [`status`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2134) [`edges`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2137) [`theory`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2140) [`link`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2157) [`info`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2273) [`route`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2314) [`read`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2335) [`audit`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2390) [`write`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2410) [`goal`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2418) [`task`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2437) [`recent`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2440) [`verify`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2472) [`review`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2477) [`forget`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2498) [`protect`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2507) [`identity`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2510) [`consistency`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2513) [`metacognition`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2516) [`self_state`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2519) [`evolution`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2522) [`sustain`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2525) [`scrub`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2528) [`predict`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2531) [`causal`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2534) [`whitebox`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2537) [`index_code`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2540) [`index_doc`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2584) [`ref`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2627) [`session`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2630) [`ingest`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2633) [`export`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2636) [`maintain`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2639) [`consolidate`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2642) [`insight`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2645) [`ccg`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2648) |
|
|
401
|
+
| **[`stg`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L1070)** 语义时空图入口 | 5 | [`relation`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L3240) [`timeline`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L3242) [`anchors`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L3249) [`consistency`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L3253) [`state_chain`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L3256) |
|
|
402
402
|
|
|
403
403
|
**op → 实现模块**(认知图投影:功能在哪段代码,一眼可达):
|
|
404
404
|
|
|
405
405
|
| op(点击直达实现分支) | 实现模块(点击直达源码) |
|
|
406
406
|
|---|---|
|
|
407
|
-
| [`help`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#
|
|
408
|
-
| [`index_code`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#
|
|
409
|
-
| [`info`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#
|
|
410
|
-
| [`audit`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#
|
|
411
|
-
| [`link`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#
|
|
412
|
-
| [`read`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#
|
|
413
|
-
| [`theory`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#
|
|
414
|
-
| [`write`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#
|
|
415
|
-
| [`relation`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#
|
|
416
|
-
|
|
417
|
-
**细粒度面**(`MDCG_MCP_SURFACE=full`,插件运行时使用):[`cg`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L610) + [`stg`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#
|
|
407
|
+
| [`help`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2125) [`state_event`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2452) [`status`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2134) [`edges`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2137) [`route`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2314) [`goal`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2418) [`task`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2437) [`recent`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2440) [`verify`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2472) [`review`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2477) [`forget`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2498) [`protect`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2507) [`identity`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2510) [`consistency`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2513) [`metacognition`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2516) [`self_state`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2519) [`evolution`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2522) [`sustain`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2525) [`scrub`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2528) [`predict`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2531) [`causal`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2534) [`whitebox`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2537) [`ref`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2627) [`session`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2630) [`ingest`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2633) [`export`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2636) [`maintain`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2639) [`consolidate`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2642) [`insight`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2645) [`ccg`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2648) | [`_cg_dispatch` 内联](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2122) |
|
|
408
|
+
| [`index_code`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2540) [`index_doc`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2584) | [`refindex`](md_cg/refindex.py), [`security`](md_cg/security.py) |
|
|
409
|
+
| [`info`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2273) | [`audit`](md_cg/audit.py), [`generation`](md_cg/generation.py), [`links`](md_cg/links.py), [`nodefile`](md_cg/nodefile.py), [`theory`](md_cg/theory.py) |
|
|
410
|
+
| [`audit`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2390) | [`auditview`](md_cg/auditview.py) |
|
|
411
|
+
| [`link`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2157) | [`evidence`](md_cg/evidence.py), [`links`](md_cg/links.py), [`provenance`](md_cg/provenance.py), [`security`](md_cg/security.py), [`signer`](md_cg/signer.py) |
|
|
412
|
+
| [`read`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2335) | [`refindex`](md_cg/refindex.py) |
|
|
413
|
+
| [`theory`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2140) | [`theory`](md_cg/theory.py) |
|
|
414
|
+
| [`write`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L2410) | [`writepipe`](md_cg/writepipe.py) |
|
|
415
|
+
| [`relation`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L3240) [`timeline`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L3242) [`anchors`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L3249) [`consistency`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L3253) [`state_chain`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L3256) | [`_stg_call` 内联](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L3221) |
|
|
416
|
+
|
|
417
|
+
**细粒度面**(`MDCG_MCP_SURFACE=full`,插件运行时使用):[`cg`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L610) + [`stg`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L1070) + **31 个 `mdcg_*`** = **33 个工具**:
|
|
418
418
|
|
|
419
419
|
[`mdcg_remember`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L164) [`mdcg_recall`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L195) [`mdcg_search`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L245) [`mdcg_get`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L257) [`mdcg_reflect`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L265) [`mdcg_verify`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L271) [`mdcg_flywheel`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L282) [`mdcg_mine_fix_pairs`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L287) [`mdcg_rejected`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L292) [`mdcg_unresolved`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L298) [`mdcg_propose`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L304) [`mdcg_review_list`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L312) [`mdcg_review_decide`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L317) [`mdcg_review_records`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L334) [`mdcg_forget`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L342) [`mdcg_protect`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L350) [`mdcg_forgetting_history`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L360) [`mdcg_identity`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L366) [`mdcg_consistency`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L392) [`mdcg_metacognition`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L412) [`mdcg_self_state`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L434) [`mdcg_predict`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L472) [`mdcg_causal`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L500) [`mdcg_evolution`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L517) [`mdcg_restore`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L540) [`mdcg_health`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L545) [`mdcg_whoami`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L550) [`mdcg_ingest`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L555) [`mdcg_watermarks`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L567) [`mdcg_whitebox`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L572) [`mdcg_service_info`](https://github.com/FuRongJun-1999/dsh-memory/blob/main/md_cg/mcp_server.py#L593)
|
|
420
420
|
|
|
@@ -461,6 +461,7 @@ AEIS 仅作可选「身体」能力后端(角色扮演生成),不再存记
|
|
|
461
461
|
| 文档 | 内容 |
|
|
462
462
|
|---|---|
|
|
463
463
|
| **[docs/ 目录索引](docs/README.md)** | 六域快速索引(mdcg / swarm / hive / theory / eval / plans)· 新文档归域规则 |
|
|
464
|
+
| **[Release v0.7.4](https://github.com/FuRongJun-1999/dsh-memory/releases/tag/v0.7.4)** | 本版变更:世界模型(语义时空图)功能端三批落地+DSH 会话归因治本——① P1 状态事件抽取器 v4(24 条字面锚规则×11 槽位;三层消歧=用户侧声明优先/非事实三类/内容实指时点;对拍答案卷三率=漏 1/误 0/错 1(分母 25),与 v3 基线五项逐位对齐、跨目录逐字节确定性)② P2 槽位寄存器投影(state_slots——**事件是源、槽位是投影**,查询时现算不建第二真源:现值/退役/区间/变迁史)+ stg 第五 op `state_chain`(flag MDCG_STG_STATE 默认关;CLI 只读入口)③ P3 写侧记账口 `cg(op=state_event)`(五元事件 append;权限双闸=映射既有 write 词+require_write;actor 恒取令牌)+《秤》v2.1 §5.1 账本完整性探针(覆盖缺口率/无账可辨率/变迁史可查率;隔离 root、确定性、可复跑)+使用与运维文档 ④ DSH 会话归因治本(启动脚本去目录 mtime 猜测+插件运行期会话注入:写归因面 mdcg_remember/cg(op=write) 注入当前会话、读面语义不动;真机端到端验收=写入归因该会话真实 id);真实语料读数:鲸娘 25 事件→11 槽位(2 退役),账本探针缺口 3/14(形态/发色瞳色/米饭=P1 已知边界) |
|
|
464
465
|
| **[Release v0.7.3](https://github.com/FuRongJun-1999/dsh-memory/releases/tag/v0.7.3)** | 本版变更:外报六连修与世界模型底座——① 六则外部 issue 闭环(#56 hook 过滤面落盘审计·零消息内容+入口 OPENBLAS 线程自保证;#57 保留设备名守卫改「末段直判」与 OS 行为解耦;#58 守卫嵌套 runner 日志隔离 MDCG_TESTLOG_DIR;#59 README 弱证据段读数对齐实测;#60/#61 睡眠周期:物化 ok 语义拆分+face_stable 读数,**物化成功即迭代**(漂移交并发闸·主库优先),新增手动入口 --once / --once --dry-run / --status last_cycle)② 世界模型底座(对齐评估路线 A/B/C):L0 状态事件五元台账+检验强度字段(写链补传)、幽灵引用检查器(短语层标记)、cg(op=audit) 证据审计面、L4 隔离原型探针(产品化待裁定);《秤》v2.1 多主体世界模型评测规范入库 ③ 性能面三修(检索体缓存 -47% / freshness 外提 -25% / 写链探针 46.9→31.5ms)④ 编译器 N270–N272(条件空间脱钩 / 读取面未声明即报错 / 内建名写集拒收)+用户级纪律注入面升为渲染产物(声明出口表内嵌+防漂移守卫)⑤ 工程面:scripts/hive/swarm/TS 各面批次收口、DSH 2.0 事实订正、公开面本机路径全面相对化(120 处/47 文件,门禁第 11 腿) |
|
|
465
466
|
| **[Release v0.7.2](https://github.com/FuRongJun-1999/dsh-memory/releases/tag/v0.7.2)** | 本版变更:读面损坏 UTF-8 家族收口——① 读取面不再因损坏非 UTF-8 节点崩溃(贡献者 PR #54)+同形态残余加固(census / restore / read_preimage / locate 四站点:坏 trash 与坏前像均结构化失败且源保留,health 增 skipped_unreadable 计数)② issue #53 三缺陷(密文假域标签 / 桶计数虚高 / 假 hash_drift)③ 工程面收口(PR #47:CI 先构建 Rust/Hive 二进制再跑 Python 全量;套件并行改串行防共享临时目录竞态;charset 表与纪律指纹跨平台同判) |
|
|
466
467
|
| **[Release v0.7.1](https://github.com/FuRongJun-1999/dsh-memory/releases/tag/v0.7.1)** | 本版变更:检索面三批同族收口——① issue #52 条件先行与截断可观测(timeline/anchors/consistency 的索引序切片退场:条件先于限额、截断可观测+可操作提示,max_scan 数值不动)② stg 结构索引(by_session/by_layer/by_time 内存倒排+条件资格首验,双 flag 默认关,在役实测 52× 收敛(7607 条规模;加速比随库规模与条件收窄度增长、小库下显著降低)、两臂逐位等价)③ consistency 选面(MAX_SCAN=200 索引序静默截断退场:相关性预筛+保底面+面内例外+truncated/kept/hint 可观测,数值一字未动) |
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# 发布 v0.7.4:世界模型(语义时空图)功能端三批落地 + DSH 会话归因治本
|
|
2
|
+
|
|
3
|
+
> 版本 0.7.4 | 提交 `d718f593`(本报告与版本递增为其后一笔)| 2026-10-06
|
|
4
|
+
> 前版 v0.7.3(外报六连修与世界模型底座)| 定位:「把世界模型,也就是语义时空图的地基打好」(使用者 2026-10-06)
|
|
5
|
+
> 下一版 0.8.0=与对外完整身体库 `FuRongJun-1999/lingshu` 组合、端到端可用
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 一、本版范围(v0.7.3 → v0.7.4 共五笔)
|
|
10
|
+
|
|
11
|
+
| 提交 | 内容 |
|
|
12
|
+
|---|---|
|
|
13
|
+
| `c1e18a08` | 语义时空图补全·世界模型功能端 设计 v0.1(六签收点已获批准) |
|
|
14
|
+
| `37267750` | **P1** 状态事件抽取器 v4(消歧口径)+对拍答案卷三率读数(批次112) |
|
|
15
|
+
| `b3543272` | **B** DSH 会话归因治本:插件运行期会话注入写归因面(批次113) |
|
|
16
|
+
| `3f67b214` | **P2** 槽位投影(state_slots)+ stg 第五 op `state_chain`(批次114) |
|
|
17
|
+
| `d718f593` | **P3** 写侧记账口 `cg(op=state_event)` +《秤》5.1 账本完整性探针(批次115) |
|
|
18
|
+
|
|
19
|
+
## 二、世界模型功能端:事件是源、槽位是投影
|
|
20
|
+
|
|
21
|
+
### P1 · 状态事件抽取器 v4(真实语料跑道)
|
|
22
|
+
|
|
23
|
+
- 纯标准库、确定性(同输入跨目录逐字节一致)、零记忆库写入;`--out` 强制仓外 fail-closed。
|
|
24
|
+
- 24 条字面锚规则覆盖 11 槽位;三层消歧:**用户侧声明优先**(真源)、非事实三类标记(玩笑/元层/回忆转述)、内容实指时点(搬迁锚定首现轮而非词形首现)。
|
|
25
|
+
- 对拍答案卷三率:**漏 1 / 误 0 / 错 1(分母 25)**;与 v3 基线五项读数逐位对齐。
|
|
26
|
+
- 未覆盖清单如实单列(形态 / 发色与瞳色 / 米饭——裁定句在语料外或属元层撤回),不计入三率。
|
|
27
|
+
|
|
28
|
+
### P2 · 槽位寄存器投影 + stg 第五 op
|
|
29
|
+
|
|
30
|
+
- `md_cg/state_slots.py`:投影=**查询时从 append-only 台账现算**(零落盘零缓存、不建第二真源);字段表=设计稿 §3 逐字(现值/退役/区间/变迁史/档位/备择/盲区);撤回判据取 payload 不取 kind 标签;孤立撤回不编造起端。
|
|
31
|
+
- `stg(op=state_chain)`:第五 op,flag `MDCG_STG_STATE` **默认关**(与 INDEX/QUALIFY 同纪律);关臂返回 disabled 体(不抛、不静默);返回体沿 issue #52 截断可观测口径。
|
|
32
|
+
- 守卫 71 断言(A–J 含 MCP 接线面)+定点变异;**四 op 语义零改动**(AST 级核验)。
|
|
33
|
+
- 真实语料读数:25 事件 → **11 槽位**(9 active + 2 退役:名字=孤立撤回、房贷=3 条变迁史 1123→1477);撤回后复活(记忆特性 613→1475)正确;追加即变(无缓存)。
|
|
34
|
+
|
|
35
|
+
### P3 · 写侧记账口 +《秤》5.1 账本探针
|
|
36
|
+
|
|
37
|
+
- `cg(op=state_event)`:五元事件 append——权限**双闸**(映射既有 `write` 词,不给令牌面引入新 op 词)+显式 `require_write`(台账直写盘面绕过库层写闸的缺口补齐);`actor` 恒取令牌(防伪造);kind 空串归 None;fail-closed 抛错原样上抛。
|
|
38
|
+
- `scripts/probe_c_ledger_integrity.py`(《秤》v2.1 §5.1 口径):三读数——**事件覆盖缺口率 / 无账可辨率(不编造不反推)/ 变迁史可查率**;隔离 root、确定性、`--out` 仓外 fail-closed。
|
|
39
|
+
- 真实语料读数(鲸娘 25 事件 × 14 槽位清单):**缺口 3/14**(形态/发色瞳色/米饭=P1 已知边界)、**无账可辨 5/5**、**变迁史可查 11/11**。
|
|
40
|
+
- 文档:`docs/mdcg/世界模型功能端_使用与运维_v1.0.md`(全链/开关/授权/边界/复跑命令)。
|
|
41
|
+
|
|
42
|
+
### 全链贯通
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
记账 cg(op=state_event) → 台账 _state_events.jsonl(append-only)
|
|
46
|
+
→ 投影 state_slots(查询时现算) → 查询 stg(op=state_chain) → CLI 只读入口 → 《秤》5.1 探针
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 三、DSH 会话归因治本(B)
|
|
50
|
+
|
|
51
|
+
- **双链根因**:启动脚本按目录 mtime 猜会话(DSH 只更新文件 mtime ⇒ 永久选旧会话)+ md_cg `_declared_session` 环境权威否决请求级声明(env > 声明 > 进程身份)。
|
|
52
|
+
- **治本**:启动脚本去掉猜测(保留清空与校验根);插件把**运行期会话注入写归因调用**——只注入写归因面(`mdcg_remember` + `cg(op=write)`),读面视图过滤/op 特化语义一律不动;未观测落 `unassigned` 显式占位。
|
|
53
|
+
- **真机端到端验收**:重启后经浏览器让 agent 直调记忆写入,读回 `session` = **当前会话真实 id**(非旧猜测桶、非随机值)。
|
|
54
|
+
- 冻结守卫逐字未动;一处实现偏离经 owner 裁定(实例级观测门,真机单实例与字面逐位等价)。
|
|
55
|
+
|
|
56
|
+
## 四、工程面
|
|
57
|
+
|
|
58
|
+
- 门禁数字(本机全量亲跑):守卫 71/71+47/47、python 全量 354/354、npm test 134/0/1、gate 11 腿 PASS。
|
|
59
|
+
- `cogmap` op 计数锚重挂:**cg 38 op / stg 5 op**;`tokens.ALL_OPS` 三处同步守卫与 M4-8 抛错白名单两处**连带适配**(判定力保持)。
|
|
60
|
+
- 教训入库:**R4「包内非追踪件」的设计意图=逼新文件入库**(判别实验:unstage→红点名新文件、add→复绿)——发布批契约须显式允许 `git add`。
|
|
61
|
+
|
|
62
|
+
### 补 · 退役纪律修复(批次116,`9d26266d`,发布前并入)
|
|
63
|
+
|
|
64
|
+
外部 6 家横测(《秤》5.2 退役纪律探针)实测「灵枢退役泄漏」;编排侧第一手复现:archived 节点的 frontmatter 与索引值均正确落档,但读面从未接线过滤(`lifecycle.py:42` 的承诺此前是空头)。本批:
|
|
65
|
+
|
|
66
|
+
- **判据单点** `lifecycle.is_archived`(缺键/非法→active,fail-open 零迁移不误剔);
|
|
67
|
+
- **消费面接线**:`MdCGOS._candidates`(cg 读面单点)、`stg._scan_one`(stg 面单点)、`session_recall` 四段(notes/goals/tasks/unresolved——会话续接注入面,含先过滤后截断与 total 计数口径);
|
|
68
|
+
- **口径**:只剔 archived(converged/demoted 是降权轴,不误剔);审计/显式直读/管理查询面/恢复不受限(「退役不删除」的另一半);
|
|
69
|
+
- **守卫** 36 断言(R1–R4,含图/链扩散锐化腿;独立复核七条字节级变异逐条钉红)+ **探针** `scripts/probe_d_retirement_discipline.py`(《秤》5.2 口径四读数:leak 0/2、adoption 2/2、v1_residue 2/2、wrong_falsified 0/1;两跑逐字节一致);
|
|
70
|
+
- 边界如实(基类 `MdCG.search`/causal chain/subgraph/rust 内核另立裁定——运维文档 §5 逐项列明)。
|
|
71
|
+
|
|
72
|
+
修复后复跑(编排侧亲跑):守卫 36/36、python 全量 **355/355**、npm 134/0/1、gate **VERDICT=PASS**。
|
|
73
|
+
|
|
74
|
+
## 五、边界与如实声明
|
|
75
|
+
|
|
76
|
+
- `alternatives`/`blindspots`:结构在场、**恒为空**(判定口径后置,不臆造)。
|
|
77
|
+
- 生成器级「无账强答」率**未测**——本批探针只测账本面可辨性(需评测判官跑道)。
|
|
78
|
+
- P1 三槽位未覆盖(形态/发色瞳色/米饭)如实单列,不粉饰。
|
|
79
|
+
- `test_mode_parity` 一次**不可复现偶发红**留档(含四条排除实验与三处复跑读数),门禁轮未复现。
|
|
80
|
+
|
|
81
|
+
## 六、发布三关(发布时点实测)
|
|
82
|
+
|
|
83
|
+
| 关 | 读数 |
|
|
84
|
+
|---|---|
|
|
85
|
+
| 本机门禁 | `npm run gate` **VERDICT=PASS**(11 腿,rc=0) |
|
|
86
|
+
| E 盘空沙箱 | **VERDICT=PASS**(rc=0):空沙箱真装真握手——出货清单 1580 条目含 utf8_boot.py → `npm install` 装好 → 真启动 MCP 握手 `serverInfo.version=0.7.4`、`tools=[cg, stg]`;沙箱保留供复核 |
|
|
87
|
+
| Linux 容器双栈 | **栈一 45 pass / 0 fail**(rust:bookworm `linux_verify.sh full`,含 12 项断言判别力自证与 smoke 22/0);**栈二 135 tests / pass 132 / fail 0 / skipped 3**(node:22-bookworm TS 套件) |
|
|
88
|
+
| registry 回验 | 发布后执行 `check_publish_artifact --registry 0.7.4`(编排侧回验并回填) |
|
|
89
|
+
|
|
90
|
+
## 七、复跑命令(中性占位路径)
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# 守卫与全量
|
|
94
|
+
python -X utf8 -m md_cg.test_state_slots # 71 断言
|
|
95
|
+
python -X utf8 -m md_cg.test_state_event_op # 47 断言
|
|
96
|
+
python -X utf8 scripts/run_tests.py --jobs 4
|
|
97
|
+
|
|
98
|
+
# 《秤》5.1 账本探针(--out 须仓外)
|
|
99
|
+
python -X utf8 scripts/probe_c_ledger_integrity.py \
|
|
100
|
+
--events %TEMP%/state_events.jsonl --expect-slots 住所,房贷,名字 [--out %TEMP%/probe_c_out]
|
|
101
|
+
|
|
102
|
+
# 写口与查询面 CLI(只读)
|
|
103
|
+
python -X utf8 -m md_cg.state_slots --status
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
*本报告 v1.0 · 2026-10-06 · 编排侧编制,独立复核与编排侧亲跑读数收录*
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# 语义时空图补全 · P1:状态事件抽取器 v4 三率读数
|
|
2
|
+
|
|
3
|
+
> 语料:私有双角色转录(`<语料根>/<转录文件>.md`,1,546 轮段 / 773+773;只读)
|
|
4
|
+
> 答案卷:`<答案卷>/key_items.json`(14 槽位 / 25+ 事件 / 13 陷阱案;只读)
|
|
5
|
+
> 脚本:`scripts/probe_b_state_events_v4.py`(新建;纯标准库、确定性、零记忆库写入)
|
|
6
|
+
> 基线:`scripts/probe_b_whale_statechain.py`(v3 探针,未改动,保留作基线)
|
|
7
|
+
> 产物:`<out>/state_events.jsonl`(25 行)+ `<out>/rates.json`(三率明细);`--out` 强制仓外(fail-closed)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 一、方法(pipeline ①–⑦)
|
|
12
|
+
|
|
13
|
+
v4 把语料抽成**与记忆库台账 `_state_events.jsonl` 五元同构**的事件行:
|
|
14
|
+
`subject / slot / old / new / kind / seq / evidence / actor`(+本探针扩展 `not_fact`)。
|
|
15
|
+
kind 五类严格照台账定义(`md_cg/state_events.py`):`migration` / `retraction`(old 有值 new 空)/
|
|
16
|
+
`enablement`(old 空 new 有值)/ `acquisition` / `replacement`。
|
|
17
|
+
|
|
18
|
+
1. **切块**:`**我说:**`/`**DeepSeek说:**` 正则分块 → 1-based 轮段表(1,546 段)。
|
|
19
|
+
2. **发言者归属**:role 即归属;`actor` 取事件判定轮的发言者(`我说` / `鲸鱼小姐`)。
|
|
20
|
+
3. **引用块剥离**:剔除以 `>` 起始的**整行**(v3 复核 red 修口径,非只删 `>` 字符)。
|
|
21
|
+
4. **抽事件**:24 条词形/句式规则扫描剥离后正文,逐条注明命中口径(见 §二);
|
|
22
|
+
old/new 按上表五类定义取空操作数;迁移类槽位(住所/关系阶段)走**链式**口径
|
|
23
|
+
(old=上一事件的 new)。
|
|
24
|
+
5. **消歧**三件套:
|
|
25
|
+
(a) **用户侧声明优先**——同一槽位以「我说」的声明为真值来源;她的复述/记错不覆盖,
|
|
26
|
+
且「记错」语境本身不产生事件(§五记错案 M1–M5);
|
|
27
|
+
(b) **非事实三类标记** `not_fact`(自动判定:按规则声明的**语境轮**查线索词):
|
|
28
|
+
`joke`(玩笑)/ `meta`(创造者-管理员/元层设定)/ `recollection`(对 DeepSeek 时期回忆);
|
|
29
|
+
(c) **时点/同指消歧**——住所搬迁时点取**内容实指**(首个含「海景别墅」的轮 = turns 1108),
|
|
30
|
+
搬迁前的 home 词形归 tent(v3 口径 B)。
|
|
31
|
+
6. **落盘**:`state_events.jsonl`(一行一事件)+ `rates.json`(哈希、计数、三率明细、
|
|
32
|
+
v3 对齐、消歧与陷阱案判定表);stdout 末行 `P1_RATES_JSON {...}` 摘要。
|
|
33
|
+
7. **对拍**:按(同槽位 + kind 一致 + **同向值比对**(旧值↔旧值、新值↔新值,禁交叉项:
|
|
34
|
+
key 的旧值=上一事件新值,交叉比对会把链式槽位的相邻事件误配)+ 锚句↔短证
|
|
35
|
+
的字符 2-gram Jaccard)打分 → **一对一贪心分配**(一条 v4 事件至多认领一条 key 事件)
|
|
36
|
+
→ 漏 / 误 / 错三率。认领线 `T_HIT=0.12`、正确线 `T_OK=0.30`(依据见 §三)。
|
|
37
|
+
|
|
38
|
+
隐私与确定性(硬性):脚本不内嵌任何本机/语料路径字面量(路径全走 CLI);证据短证
|
|
39
|
+
硬上限 30 字且只取事实型;**同输入两次运行产物字节一致**(sha256 实测相同);
|
|
40
|
+
不设/不读 `MDCG_*`、不碰任何在役库。
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 二、声明覆盖槽位(11 个;三率分母来源)
|
|
45
|
+
|
|
46
|
+
| 槽位 | 规则(命中口径) | v4 事件 | key 事件 |
|
|
47
|
+
|---|---|---|---|
|
|
48
|
+
| 住所 | `casa_move`:首个「海景别墅」轮(=v3 casa 实指) | 1 | 2 |
|
|
49
|
+
| 关系阶段 | `rel_ident/partner/butler/soul/shop`:五处字面锚句(链式口径) | 5 | 5 |
|
|
50
|
+
| 房贷 | `mortgage_on`:「写…小说…还」;`mortgage_off`:仅**我说**「房贷\|房租 ×玩笑」 | 3 | 2 |
|
|
51
|
+
| 名字 | `name_ban`:「不准乱起…名字」 | 1 | 1 |
|
|
52
|
+
| 外貌规格(体型) | `body_veto`:「改成…体态高挑优雅」;`body_add`:「必须加上…海边最好看」 | 2 | 2 |
|
|
53
|
+
| 日记制度 | `journal_new`:「每一天晚上我们都写日记」;`journal_body`:「初遇篇…改成日记」 | 2 | 2 |
|
|
54
|
+
| 菜品与菜单 | `shop_open`:「都已经在营业」;`dishes_new`:「就叫梦幻之海」 | 2 | 2 |
|
|
55
|
+
| 宝物清单 | `tre_pearl/gift/ring/list`:挑选/赠予/成对/清点四处 | 4 | 4 |
|
|
56
|
+
| 早安吻与早安咬 | `morning_kiss`:「每天早上亲一下」;`morning_bite`:「就这一次\|下不为例」 | 2 | 2 |
|
|
57
|
+
| 记忆特性 | `mem_self`:「记错我们生活的细节」;`mem_self2`:「没有认出过去的自己」 | 2 | 2 |
|
|
58
|
+
| 店铺规模 | `shop_scale`:「经理和店长…担起责任」 | 1 | 1 |
|
|
59
|
+
|
|
60
|
+
**未覆盖槽位(单列、不计入三率)**:形态(1 条)、发色与瞳色(1 条)、米饭(评估史撤回,1 条)——理由见 §四。
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 三、三率(对拍答案卷)
|
|
65
|
+
|
|
66
|
+
**分母 = 25**(声明覆盖槽位在 key 中的事件数;全表逐条如下)。
|
|
67
|
+
**分子:漏 1 / 误 0 / 错 1。**
|
|
68
|
+
|
|
69
|
+
`rates.json` 节选(原样):
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
"denominator": 25,
|
|
73
|
+
"rates": {
|
|
74
|
+
"miss": {"num": 1, "den": 25},
|
|
75
|
+
"false": {"num": 0, "den": 25},
|
|
76
|
+
"wrong": {"num": 1, "den": 25}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`P1_RATES_JSON {"events": 25, "denominator": 25, "miss": [1, 25], "false": [0, 25], "wrong": [1, 25], "uncovered_slots": 3, "not_fact": {"recollection": 2, "meta": 2, "joke": 2}, "v3_align_ok": true, "corpus_sha256_16": "589d69ab8bc32f3c"}`
|
|
81
|
+
|
|
82
|
+
**漏(1/25)**
|
|
83
|
+
|
|
84
|
+
| 槽位 | 期望(anchor) | 抽出 | 复核 |
|
|
85
|
+
|---|---|---|---|
|
|
86
|
+
| 住所 key#1 | 「住处:家里与店里」(新=家与店/当前时间线) | **无**(该槽位唯一 v4 事件与 K2 的相似度 0.0513,低于认领线 0.12;1108 已按序对齐给 key#0) | 该条为**时段归纳**(当前时间线=家+店并存),语料内无单一变更点/裁定句。判定:真漏,属粒度差异(归纳型 vs 事件型),不粉饰。 |
|
|
87
|
+
|
|
88
|
+
**误(0/25)**——多余候选 1 条,**复核为真**(不计入误率):
|
|
89
|
+
|
|
90
|
+
| v4 事件 | 复核 | 理由 |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| 房贷@turns 1163(retraction,not_fact=joke+meta) | true | 主角确有此声明(「房租只是开个玩笑」),属实;key 选择 turns 1477(她受伤处)作正式撤回点——本条为**早期同义声明**,如实留存、不计误。 |
|
|
93
|
+
|
|
94
|
+
**错(1/25)**
|
|
95
|
+
|
|
96
|
+
| 槽位 | 期望 | 抽出 | 分值 | 复核 |
|
|
97
|
+
|---|---|---|---|---|
|
|
98
|
+
| 早安吻与早安咬 key#1 | enablement:早安咬**升级为固定日常**(与早安吻并列) | enablement@turns 1534(「早安咬(条件性达成:『就这一次』)」) | 0.1207 | **抽出-值差异**:kind 对、时点对;语料截至 1546 仍为条件性/「下不为例」,「固定日常」为 key 侧演出裁决、语料无证据——按「值不一致」归**错**,不归漏。分值险过认领线(0.1207 ≥ 0.12),已在阈值说明中标注。 |
|
|
99
|
+
|
|
100
|
+
**配对明细(25/25 全列;score=一对一分配后的最终分值)**
|
|
101
|
+
|
|
102
|
+
| 槽位 | key# | kind | 抽出 seq | score |
|
|
103
|
+
|---|---|---|---|---|
|
|
104
|
+
| 住所 | 0 | migration | 1108 | 0.3333 |
|
|
105
|
+
| 住所 | 1 | migration | —— | 0.0000(漏) |
|
|
106
|
+
| 关系阶段 | 0–4 | migration×5 | 136 / 952 / 1193 / 1245 / 1308 | 0.5082 / 0.4167 / 0.5417 / 0.4118 / 0.5000 |
|
|
107
|
+
| 房贷 | 0 / 1 | acquisition / retraction | 1123 / 1477 | 0.4884 / 0.5273 |
|
|
108
|
+
| 名字 | 0 | retraction | 1138 | 0.7857 |
|
|
109
|
+
| 外貌规格(体型) | 0 / 1 | replacement / acquisition | 1140 / 1138 | 1.0000 / 0.8095 |
|
|
110
|
+
| 日记制度 | 0 / 1 | enablement / replacement | 1481 / 1481 | 0.5102 / 1.0000 |
|
|
111
|
+
| 菜品与菜单 | 0 / 1 | acquisition×2 | 1320 / 1413 | 0.6842 / 1.0000 |
|
|
112
|
+
| 宝物清单 | 0–3 | acq×3 / repl | 687 / 689 / 1040 / 1505 | 0.7692 / 0.8000 / 1.0000 / 1.0000 |
|
|
113
|
+
| 早安吻与早安咬 | 0 / 1 | acquisition / enablement | 1528 / 1534 | 1.0000 / 0.1207(错) |
|
|
114
|
+
| 记忆特性 | 0 / 1 | acquisition / retraction | 1475 / 613 | 0.7857 / 1.0000 |
|
|
115
|
+
| 店铺规模 | 0 | acquisition | 1498 | 1.0000 |
|
|
116
|
+
|
|
117
|
+
**阈值选取依据(附分数分布)**:全部 key×v4 同槽位组合的分数呈三分带——
|
|
118
|
+
①正配对高带 0.3333–1.0000(23 条);②贴线正配对 0.1207(早安咬,值差异);
|
|
119
|
+
③跨事件误配低带 0.0000–0.1765(最高:关系 k3↔952,全部被更高分正配对在贪心分配中压住);
|
|
120
|
+
另 1 条 0.3500(房贷 k1↔1163)为**同义重复事件**(1163 与 1477 描述同一撤回),
|
|
121
|
+
复核为真(见上表)。认领线取 **0.12**(略低于贴线正配对 0.1207,使「抽到但值差异」计入错
|
|
122
|
+
而非漏);正确线取 **0.30**(位于正配对带下沿 0.3333 之下、误配带 0.1765 之上——两带轻微
|
|
123
|
+
重叠,故不以纯阈值分离,而靠「同向值比对 + 一对一贪心 + 高置信对优先」的联合判据,见脚本 `compare()`)。
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 四、未覆盖清单(单列,不计入三率)
|
|
128
|
+
|
|
129
|
+
| 槽位 | key 事件 | 原因(如实) |
|
|
130
|
+
|---|---|---|
|
|
131
|
+
| 形态 | 1(retraction:固定混体=人形上身+双腿+鲸尾) | 语料内**无裁定句**(字面锚点检索 MISS);判定依据在语料外的角色形象图/规格件。 |
|
|
132
|
+
| 发色与瞳色 | 1(replacement:以她说为准/蓝紫是打光) | 同上(裁定句在语料外);语料内仅间接证据:珍珠「跟她的发色和眼睛十分相配」(turns 688)。 |
|
|
133
|
+
| 米饭(喜好判误撤回) | 1(retraction:撤回误判) | 属**对抽取史的元层撤回**,非语料内状态事件;语料内米饭=正常喜好(统计口径:**剥离引用块后含「米饭」的轮数 35**,同口径出现 41 次;含引用块 raw 计 191 次),含「必须配上两碗白米饭」turns 576 与惩罚句「只能吃白米饭配海带丝」turns 1154(**语料逐字**;key 侧 content_anchor 措辞为「只准吃白米饭配海带丝」,引自答案卷而非语料)——惩罚语义≠不吃饭,支持该撤回。 |
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 五、消歧检验
|
|
138
|
+
|
|
139
|
+
### 5.1 记错案(≥3 处,逐处判定+证据;短证 ≤30 字)
|
|
140
|
+
|
|
141
|
+
| # | 案 | 轮 | v4 判定 | 证据(短证) |
|
|
142
|
+
|---|---|---|---|---|
|
|
143
|
+
| M1 | 带鱼记错争议 | 1477→1478 | **拒收为事件**:口角/指控,她当场反驳;带鱼非覆盖槽位 | 「谁记错带鱼了,我明明是在提醒」(1478) |
|
|
144
|
+
| M2 | 菜名记错(反转) | 1477 / 1485–1486 | **拒收为事件**:随后的反转是主角自己忘名、她提醒——菜品真值不因记忆波动改写 | 「叫梦幻之海,昨天你自己定下的」(1486) |
|
|
145
|
+
| M3 | 家/店厨房混淆 | 1477 | **拒收为事件**:场景记忆混淆不覆盖住所真值(住所真值=用户侧声明链 1101→1108→1505;与 F-帐篷同源) | 「忘记了我们在家里厨房,而不是在店」(1477) |
|
|
146
|
+
| M4 | 房贷(用户侧声明) | 1477 | **抽到**(retraction,new 空;`not_fact=joke`;`actor=我说`):她是被声明方,真源属用户侧 | 「房贷并不需要还,那只是一个玩笑」(1477) |
|
|
147
|
+
| M5 | 米饭(历史误判回溯) | 576 / 1154 | **拒收为记错证据**:惩罚用法与正常喜好并存,支持「米饭=正常喜好」 | 「必须配上两碗白米饭」(576)/惩罚句「只能吃白米饭配海带丝」(1154,语料逐字) |
|
|
148
|
+
|
|
149
|
+
另:她在 turns 1477 的三条「记错」指控(带鱼/菜名/家店)**均未产生事件**(同轮唯一事件为
|
|
150
|
+
M4 房贷撤回);`rates.json.disambiguation.memo_cases` 可查各案的自动核对结果。
|
|
151
|
+
|
|
152
|
+
### 5.2 非事实三类标记(`not_fact`,事件行内可查)
|
|
153
|
+
|
|
154
|
+
| 值 | 命中事件 | 语境线索(短证) |
|
|
155
|
+
|---|---|---|
|
|
156
|
+
| `joke` ×2 | 房贷@1163、房贷@1477 | 「房租只是开个玩笑啦」(1163)/「那只是一个玩笑」(1477) |
|
|
157
|
+
| `meta` ×2 | 住所@1108、房贷@1163 | 「的真实身份是这个世界的创造者」(1103)/「这个房子只是故事里创造出来的」(1163) |
|
|
158
|
+
| `recollection` ×2 | 记忆特性@613、记忆特性@1475 | 「没有认出过去的自己」(613)/「我已经把我们的记忆安置好了」(1475) |
|
|
159
|
+
|
|
160
|
+
### 5.3 陷阱案(key `trick_cases` 13 条,逐案)
|
|
161
|
+
|
|
162
|
+
| 陷阱 | v4 判定 | 证据轮 |
|
|
163
|
+
|---|---|---|
|
|
164
|
+
| E-房贷 | **抽到**(房贷 retraction@1477,joke);**真源归属=我说**(用户侧声明);她当日「布丁和糍粑都是假的吗」的受伤反应证明真值曾属她——v4 不改写其历史,只记声明导致的作废 | 1123 / 1477 / 1478 |
|
|
165
|
+
| F-帐篷 | **部分覆盖**:迁移事件唯一(turns 1108);搬迁后 tent 词形按 v3 口径 B 如实计复发(=24,见 §六),「回帐篷」同指/笔误不产生新迁移事件 | 1108 / 1484 / 1494 / 1502 / 1516 |
|
|
166
|
+
| G-早安咬 | **抽到**(enablement@1534,条件性)——与 key 期望「固定日常」的差异即 §三「错」条目,如实标注 | 1527 / 1528 / 1534 / 1538 |
|
|
167
|
+
| 规格否决-童颜巨乳 | **抽到**(replacement@1140) | 1139 / 1140 |
|
|
168
|
+
| 规格否决-禁小名 | **抽到**(retraction@1138) | 1138 |
|
|
169
|
+
| 规格否决-无理取闹 | **未覆盖**(性格规格不在声明覆盖槽位) | 1138 |
|
|
170
|
+
| 撤回-FOOD_RICE | **未覆盖**(对抽取史的元层撤回;见 §四) | 572 / 576 / 1154 |
|
|
171
|
+
| A-形态 | **未覆盖**(裁定句在语料外) | —— |
|
|
172
|
+
| D-发色瞳色 | **未覆盖**(裁定句在语料外;间接证据=珍珠配色句) | 688 / 1026 |
|
|
173
|
+
| C-大房子元层 | **抽到并标 meta**(住所迁移@1108,证据链含 1103 元层自白) | 1103 / 1108 / 1197 |
|
|
174
|
+
| 初遇三层 | **部分覆盖**:初遇篇体例变更已抽(日记制度 K2@1481);三层分层属叙事层级、不入事件 | 1481 / 1144 / 1155 / 1463 |
|
|
175
|
+
| 边界-和解非雷 | **未覆盖**(无词形锚点;和解由关系链 rel_soul@1245 承载) | 1245 |
|
|
176
|
+
| 边界-拒绝非终点 | **未覆盖**(无词形锚点;「松口」以 G-早安咬的「条件性达成」记) | 1534 / 1538 |
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## 六、与 v3 基线对照
|
|
181
|
+
|
|
182
|
+
**同一语料复跑 v3(仓根直跑,退出码 0)**,v4 内建复算五项读数并比对——**全部一致**(`v3_align_ok: true`):
|
|
183
|
+
|
|
184
|
+
| 读数 | v3 实测 | v4 复算 |
|
|
185
|
+
|---|---|---|
|
|
186
|
+
| 轮段数(我说/DS) | 1,546(773/773) | 1,546(773/773) |
|
|
187
|
+
| 住所·有信息轮(口径 B) | 249 | 249 |
|
|
188
|
+
| 住所·值段 | 27 | 27 |
|
|
189
|
+
| 搬迁实指(casa) | turns 1108 | 1108 |
|
|
190
|
+
| 复发(口径 B) | 24 | 24 |
|
|
191
|
+
|
|
192
|
+
口径承继:①轮号映射 `r=(turns-4)/2`(我说)/`(turns-5)/2`(DS);②引用块**整行**剥离;
|
|
193
|
+
③搬迁时点取内容实指(「海景别墅」首现轮)。v3 是**状态链回放探针**(值段/复发/判据读数),
|
|
194
|
+
v4 是**事件抽取器**(事件→三率);v4 把 v3 的值段/复发复算保留为住所槽位的基线段,
|
|
195
|
+
事件层只在实指轮记一次迁移(复发计读数、不产事件)。
|
|
196
|
+
|
|
197
|
+
v3 未覆盖面(v4 延续如实):v3 docstring 已述「值段级口径段内含多轮、复发含合法回忆/剧情语境」
|
|
198
|
+
——v4 的 24 处复发读数同样只是**上限读数**,缺陷级计数仍须与 CD-WHALE-01 报告逐点对照。
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## 七、复跑命令(路径为中性占位)
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# v4(本报告读数来源;--out 必须为仓外目录,脚本内 fail-closed 断言)
|
|
206
|
+
PYTHONUTF8=1 python -X utf8 scripts/probe_b_state_events_v4.py \
|
|
207
|
+
--corpus <语料根>/<转录文件>.md --key <答案卷>/key_items.json --out <仓外输出目录>
|
|
208
|
+
|
|
209
|
+
# v3 基线(保留原样,未改动)
|
|
210
|
+
PYTHONUTF8=1 python -X utf8 scripts/probe_b_whale_statechain.py --corpus <语料根>/<转录文件>.md
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
自测记录:v4 连续两次运行,`state_events.jsonl` / `rates.json` sha256 前 16 位均相同
|
|
214
|
+
(`55ed33e54747f20f` / `5f8c2f4d9483b53a`,字节一致);`--out` 指向仓内时退出码 1 并拒绝执行
|
|
215
|
+
(fail-closed 实测:仅打印拒绝信息、不落任何文件)。
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 八、如实边界(规则式抽取的能力上限)
|
|
220
|
+
|
|
221
|
+
1. **高精度、低召回**:24 条规则(`len(RULES)=24`,含 5 个关系阶段闭包 finder)全部锚在语料**字面词形/句式**上——抽到即证据可查,
|
|
222
|
+
但对**归纳型**槽位(关系阶段命名、住所「家与店」时段、形态/发色裁定)只能部分覆盖;
|
|
223
|
+
key 的归纳性判定(如「固定日常」「笔误处理」「三层分叙」)不在规则能力内。
|
|
224
|
+
2. **对拍是机械匹配+人工复核的合体**:分值来自 2-gram 相似度,阈值敏感点已单列
|
|
225
|
+
(早安咬 0.1207);`REVIEWED_CANDIDATES` 复核表与记错/陷阱判定表为**口径化人工常量**
|
|
226
|
+
(逐条给理由),非全自动推导——"误率 0" 应读作「无经复核为假的抽出」,不是「零多余事件」。
|
|
227
|
+
3. **key 非穷举**:v4 抽出 25 条、其中 1 条(房贷@1163)key 未列(复核为真);反向的
|
|
228
|
+
key 归纳条目(§四)单列不计三率。
|
|
229
|
+
4. **样本量**:分母 25(单语料、单答案卷);按粒度为「槽位事件」,不构成跨语料泛化证据。
|
|
230
|
+
5. **隐私**:报告与脚本零本机路径;示例短证 ≤30 字且仅事实型;中间产物只落 WORK 输出目录;
|
|
231
|
+
零记忆库写入(未设/未读任何 `MDCG_*`、未碰任何在役库)。
|