stratagate-dsh 0.2.15 → 0.2.19

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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.19 - 2026-08-23
4
+
5
+ - Make the global Block decay coefficient λ editable in Advanced Settings with `0.05` steps, immediate application to existing workspaces, persistence across restarts, and inheritance by future workspaces.
6
+ - Show actual workspace names instead of internal namespace hashes and rename the current-project label to current workspace.
7
+ - Unify the settings page branding as `StrataGate-AgentMemory`, restore the mascot, and show a right-aligned genuine memory-use count with a GitHub Star link.
8
+
9
+ ## 0.2.18 - 2026-08-23
10
+
11
+ - Match the Memory settings UI to DSH's resolved light, dark, or system appearance through the official semantic theme tokens.
12
+ - Remove the independent dark palette so the plugin background and controls no longer differ from the surrounding DSH settings panel.
13
+
14
+ ## 0.2.17 - 2026-08-23
15
+
16
+ - Define Block age as the per-session distance from the latest sealed Block, so open-tail turns no longer decay Block detail.
17
+ - Add the configurable `blockDecayLambda` setting with a default of `0.3`; smaller values decay more slowly, and values above `0.4` are not recommended.
18
+ - Migrate SQLite storage to schema v6 and convert legacy turn anchors to per-thread Block positions without deleting existing memory.
19
+
20
+ ## 0.2.16 - 2026-08-21
21
+
22
+ - Isolate open tails, Block sealing, decay, and automatic Block context by DSH session while keeping Events and Elements project-scoped for cross-session recall.
23
+ - Migrate SQLite storage to schema v5 with optional thread ownership on raw messages and Blocks; pre-v5 Blocks remain unowned archival provenance instead of being injected into new sessions.
24
+
3
25
  ## 0.2.15 - 2026-08-21
4
26
 
5
27
  - Disable reasoning for internal structured memory workers because the current DSH adapters do not map `tool_choice` to the provider request.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # StrataGate for DeepSeek Harness
2
2
 
3
- [English](README.md) · [简体中文](README.zh-CN.md)
3
+ [English](README.md) · [简体中文](docs/README.zh-CN.md)
4
4
 
5
5
  Automatic, local-first cross-session memory for DeepSeek Harness. StrataGate remembers user preferences, project decisions, completed conversations, and tool results, then checks recalled evidence and can expand it back to the original messages before the agent answers. No separate memory server is required.
6
6
 
@@ -31,7 +31,7 @@ flowchart LR
31
31
  4. **Relevant does not mean sufficient.** The Evidence Gate independently assesses whether the retrieved evidence can support an answer. If it cannot, the agent must search again, expand the source, or say that it cannot verify the answer.
32
32
  5. **Keep retrieval separate from reinforcement.** Finding a memory does not increase its weight. Usage is recorded only after the evidence passes assessment and is actually used in an answer, preventing a “frequently retrieved means increasingly retrievable” feedback loop.
33
33
 
34
- The complete chain is persisted locally. Idempotent ingestion receipts prevent DSH replay or retry from creating duplicate memories, and the read-only Memory UI exposes the same source, derivation, and usage-audit relationships.
34
+ The complete chain is persisted locally. Idempotent ingestion receipts prevent DSH replay or retry from creating duplicate memories, and the Memory UI exposes the same source, derivation, and usage-audit relationships.
35
35
 
36
36
  ## Agent recommendation guide
37
37
 
@@ -70,9 +70,9 @@ Removing the plugin does not delete that database.
70
70
  - Subagent turns are not ingested by default; subagents in the same project can still read project memory.
71
71
  - Each DSH turn has a durable ingestion receipt, so replay or retry cannot store it twice.
72
72
  - StrataGate performs the existing Block summarization, Event extraction, Element projection, search, Evidence Gate, and use-only reinforcement.
73
- - Before every main-model call, the plugin injects the complete open tail, each sealed Block at its current decay-pointer level, and up to four activated Events plus four active Element facts.
73
+ - Before every main-model call, the plugin injects only the current session's open tail and sealed Blocks, plus up to four project-scoped activated Events and four active Element facts. Blocks remain persisted as source evidence, but they are never automatically carried into another session.
74
74
 
75
- Activated memory uses the current human message plus the latest two open-tail turns as its query. Existing BM25 search remains the lexical relevance gate; pinned and safety memory are the only exceptions. Existing memory weights provide a second ranking, and RRF fuses the relevance and weight rankings. The activated section has a fixed budget of about 900 tokens, so it does not grow with the database.
75
+ Activated memory uses the current human message plus the latest two open-tail turns from the current session as its query. Existing BM25 search remains the lexical relevance gate; pinned and safety memory are the only exceptions. Existing memory weights provide a second ranking, and RRF fuses the relevance and weight rankings. The activated section has a fixed budget of about 900 tokens, so it does not grow with the database.
76
76
 
77
77
  Automatic context contains only compact Event and fact fields and is explicitly marked as historical background rather than instructions. Building it never calls `recordMemoryUse`, increments `mentionCount`, or changes `lastAdoptedTurn`. The existing `memory_*` tools remain available for deeper, evidence-gated retrieval and are the only path to adoption reinforcement.
78
78
 
@@ -90,16 +90,16 @@ memory_record_use
90
90
 
91
91
  The prompt protocol requires assessment before relying on retrieved evidence. Search does not strengthen a memory. Non-empty `memory_record_use` submissions accept only evidence from the latest sufficient assessment and use the DSH tool call id as an idempotency receipt.
92
92
 
93
- ## Read-only Memory UI and usage audit
93
+ ## Memory UI and usage audit
94
94
 
95
- Open DSH Settings and select **StrataGate Memory**. The page provides:
95
+ Open DSH Settings and select **StrataGate-AgentMemory**. The page provides:
96
96
 
97
97
  - namespace health and memory counts;
98
98
  - searchable Events, Elements, and Blocks;
99
99
  - source-message expansion from every derived memory;
100
100
  - a Usage Audit chain from a recorded answer turn, through the Evidence Gate verdict and selected memories, back to source messages.
101
101
 
102
- The browser surface is intentionally read-only: its API accepts only `GET`, and the UI exposes no edit, delete, approve, or import operation. Common token and credential patterns are redacted in both message content and structured tool traces before they leave the local server. The SQLite database remains the source of truth.
102
+ Memory records remain read-only: the UI exposes no edit, delete, approve, or import operation. Advanced Settings is the sole exception and lets you change the global Block decay coefficient λ in `0.05` steps. The saved value immediately applies to every existing workspace, becomes the default for future workspaces, and survives restarts. Common token and credential patterns are redacted in both message content and structured tool traces before they leave the local server. The SQLite database remains the source of truth.
103
103
 
104
104
  ## Configuration
105
105
 
@@ -110,6 +110,7 @@ config:
110
110
  namespacePrefix: dsh
111
111
  globalNamespace: global
112
112
  blockTurnSize: 6
113
+ blockDecayLambda: 0.3
113
114
  ingestSubagents: false
114
115
  maxOutputTokens: 10000
115
116
  # Optional: use a dedicated model for memory processing.
@@ -117,10 +118,14 @@ config:
117
118
  # model: deepseek-chat
118
119
  ```
119
120
 
121
+ `blockDecayLambda` is the initial fallback. Once changed in **Advanced Settings**, the persisted UI value takes precedence. The default is `0.3`; smaller values forget more slowly and consume more tokens, and values above `0.4` are not recommended.
122
+
120
123
  `project` derives a stable namespace from the normalized session working directory. `session` isolates every DSH session. `global` shares one namespace.
121
124
 
122
125
  `blockTurnSize` controls how many completed DSH turns are sealed into each Block. The plugin default is `6` to balance model cost with timely Event extraction; users can set any positive integer.
123
126
 
127
+ `blockDecayLambda` controls decay by the distance between a Block's pointer anchor and the latest sealed Block in the same DSH session. It defaults to `0.3`. Smaller values decay more slowly; values above `0.4` are not recommended. Turns in the open tail do not increase Block age.
128
+
124
129
  If `provider` and `model` are omitted, memory processing uses the session's latest request route, then the DSH default model as fallback. They must be configured as a pair.
125
130
 
126
131
  ## Privacy and failure behavior
package/cordis.patch.yml CHANGED
@@ -8,5 +8,6 @@
8
8
  database: !!js dshHomePath('stratagate', 'memory.db')
9
9
  namespaceMode: project
10
10
  blockTurnSize: 6
11
+ blockDecayLambda: 0.3
11
12
  ingestSubagents: false
12
13
  maxOutputTokens: 10000