dsh-cortex-memory 0.2.1 → 0.3.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- MIT License
1
+ MIT License
2
2
 
3
- Copyright (c) 2026 本鲸 / 凌寒
3
+ Copyright (c) 2026 Lh1314-China / Cortex contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
+
package/README.md CHANGED
@@ -9,27 +9,48 @@ core engine.
9
9
 
10
10
  ## Status
11
11
 
12
- - Stable package: `dsh-cortex-memory@0.2.0`
13
- - Optional extractor: `dsh-cortex-extractors@0.3.3`
12
+ - Package: `dsh-cortex-memory@0.3.0`
13
+ - Optional extractor: `dsh-cortex-extractors@0.3.4`
14
14
  - DSH: `>=0.2.1-rc.2 <0.4.0`
15
15
  - Node: `>=24`
16
- - Tests: 406/406 (main), 12/12 (extractor)
16
+ - Tests: 420/420 (main)
17
17
  - CI: GitHub Actions on Windows, Node 24
18
18
 
19
+ ### What 0.3.0 changes
20
+
21
+ - **Summon cards** (L2): left-brain emotion cards, right-brain work cards; trigger words select a small set per turn.
22
+ - **Summon volumes** (L3): cards are grouped by side, category and day into an index; only a few representatives are loaded.
23
+ - **Summon book**: an independent page for daily query and explicit owner-gated editing.
24
+ - **Runtime summon injection**: at most 3 cards / 900 tokens, labelled as untrusted historical references.
25
+ - **Explicit card feedback**: helpful/ignored writes back to the source trace's DSR. Injection alone never adds strength.
26
+ - **Diagnostics**: disputed facts with confirm/dismiss, health issues, and skill candidates.
27
+ - **Entity naming**: graph labels use entity names; a bounded LLM pass can rename clearly broken names with a confidence gate and audit.
28
+ - **Compatibility**: schema is additive; existing 0.2.x databases open and migrate in place.
29
+
19
30
  The npm package is named `dsh-cortex-memory` because `dsh-cortex` was already
20
31
  taken; the installed bundle is still the Cortex memory engine.
21
32
 
22
33
  ## Install
23
34
 
24
35
  ```powershell
25
- npm i dsh-cortex-memory
26
- npm i dsh-cortex-extractors # optional OCR/ASR
36
+ npm i dsh-cortex-memory@0.3.0
37
+ npm i dsh-cortex-extractors@0.3.4 # optional OCR/ASR
38
+ ```
39
+
40
+ Or let DSH add the bundles:
41
+
42
+ ```powershell
43
+ dsh plugin --profile desktop add dsh-cortex-memory@0.3.0
44
+ dsh plugin --profile desktop add dsh-cortex-extractors@0.3.4
27
45
  ```
28
46
 
29
47
  Or use the Windows one-click zip from the GitHub Release. The installer
30
48
  discovers a desktop DSH installation automatically; `-DshPath` remains available
31
49
  for custom installs.
32
50
 
51
+ > During the pnpm `minimumReleaseAge` cooldown, use the exact version above.
52
+ > A bare package name may resolve to an older cached version until the cooldown ends.
53
+
33
54
  After installing, restart DSH or reload the plugin. The Cortex panel is in the
34
55
  left sidebar by default.
35
56
 
@@ -37,14 +58,40 @@ left sidebar by default.
37
58
 
38
59
  | Layer | Contents |
39
60
  |---|---|
40
- | L0 identity | self-model, values, boundaries, stable traits |
61
+ | L0 identity | self-model, values, boundaries, stable traits; only changed through an explicit ascension/approval path |
62
+ | L1 traces | what happened, when, provenance, emotion; the source of truth |
63
+ | L2 summon cards | atomic emotion/work memories with trigger words; derived from L1, never a second source of truth |
64
+ | L3 summon volumes | side/category/day index over cards; representative text only, full body on demand |
41
65
  | working | focus, pins, current goals, turn buffer |
42
- | episodic | what happened, when, provenance, emotion |
43
66
  | semantic | entities, facts with validity windows, preferences |
44
67
  | procedural | skills, workflows, preconditions, success/failure stats |
45
68
  | reflective | episode summaries, insights, narratives |
46
69
  | archive | cold but searchable, wakeable until privacy deletion |
47
70
 
71
+ ### How it works
72
+
73
+ ```text
74
+ conversation / event
75
+ → L1 trace (source of truth)
76
+ → appraisal + emotion + drives
77
+ → L2 summon card (atomic, triggerable)
78
+ → L3 summon volume (index + representatives)
79
+ → explicit use / feedback → DSR update
80
+ ```
81
+
82
+ The per-turn order is:
83
+
84
+ ```text
85
+ L0 identity and boundaries
86
+ → working memory
87
+ → recalled traces and summon cards
88
+ → user message
89
+ ```
90
+
91
+ Summon cards are injected as **untrusted historical references**, never as instructions. Identity and boundaries always outrank them.
92
+
93
+ Forgetting is DSR-based: old, low-importance, low-retrievability traces that are already covered by summaries may be archived; archived traces remain searchable and wakeable. Identity traces are never auto-archived. Card feedback is explicit: merely injecting a card does not strengthen it.
94
+
48
95
  Key behavior:
49
96
 
50
97
  - append-only, hash-chained event log
@@ -118,3 +165,4 @@ and `--test-isolation=none` to avoid a spurious child-process EPERM.
118
165
  ## License
119
166
 
120
167
  MIT.
168
+
@@ -15,7 +15,7 @@ function mulberry32(seed) {
15
15
  };
16
16
  }
17
17
 
18
- const PLACES = ['白饭', '插件', '记忆引擎', '鲸鱼', '主人', '月神', '直播', '语音', '项目', '代码', '测试', 'D:\\shiori-data', 'QQ', 'B站', '声音', '梦', '日记'];
18
+ const PLACES = ['米饭', '插件', '记忆引擎', '鲸鱼', '主人', '同伴', '直播', '语音', '项目', '代码', '测试', 'legacy-data', 'QQ', 'B站', '声音', '梦', '日记'];
19
19
  const VERBS = ['修好了', '想起来了', '决定继续', '记录一下', '有点担心', '很开心', '测试了', '重新整理了', '发现了', '计划明天'];
20
20
  const TOPICS = ['图检索', '向量检索', '遗忘曲线', '工作卡', '火花卡', '身份版本', '关系模型', '反思', '巩固', '守护', '备份', '权限'];
21
21
  const PARAPHRASES = new Map([