stratagate-dsh 0.2.35 → 0.2.37
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 +26 -16
- package/LICENSE +21 -21
- package/README.md +336 -133
- package/README.zh-CN.md +400 -0
- package/dist/client.js +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +583 -150
- package/dist/index.js.map +1 -1
- package/docs/ARCHITECTURE.md +244 -0
- package/docs/DSH.md +191 -0
- package/docs/{README.zh-CN.md → DSH.zh-CN.md} +30 -27
- package/docs/EVALUATION.md +179 -0
- package/docs/EXTERNAL_MEMORY_IMPORT.zh-CN.md +54 -0
- package/docs/assets/stratagate-avatar.png +0 -0
- package/docs/assets/stratagate-how-it-works.en.png +0 -0
- package/docs/assets/stratagate-how-it-works.zh-CN.png +0 -0
- package/docs/assets/stratagate-knowledge-graph.png +0 -0
- package/docs/assets/stratagate-memory-structure.png +0 -0
- package/docs/assets/stratagate-short-term-memory.png +0 -0
- package/package.json +176 -153
- package/screenshots.json +4 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# Evaluation record and reporting rules
|
|
2
|
+
|
|
3
|
+
This document separates completed development experiments from benchmark claims. Every public score should state the dataset scope, question categories, extraction model, answer model, Judge model, prompt, repetitions, and whether the memory state was created inside the same run.
|
|
4
|
+
|
|
5
|
+
## Final round-eight `conv-26` result
|
|
6
|
+
|
|
7
|
+
The latest completed run covers one LoCoMo conversation, `conv-26`: 419 messages, 35 sessions, and 152 category 1–4 questions. StrataGate completed all 152 answers and all 1,520 Judge decisions with no unrecovered question failure.
|
|
8
|
+
|
|
9
|
+
> [!IMPORTANT]
|
|
10
|
+
> This is a single-conversation directional comparison, not a full LoCoMo score or a cross-project leaderboard. StrataGate and Mem0 used the same questions, answer model, Judge, prompt, parser, and repetitions, but different memory-construction, retrieval, embedding, and answer-context pipelines. The comparison does not isolate memory architecture as one causal variable.
|
|
11
|
+
|
|
12
|
+
### Overall result
|
|
13
|
+
|
|
14
|
+
| Metric | StrataGate final R8 | Mem0 base | StrataGate - Mem0 |
|
|
15
|
+
| --- | ---: | ---: | ---: |
|
|
16
|
+
| Ten-Judge mean accuracy | **80.4606%** | 63.2237% | **+17.2369 pp** |
|
|
17
|
+
| Standard deviation across Judge runs | 0.5138 pp | 0.9045 pp | -0.3907 pp |
|
|
18
|
+
| Judge-run range | 79.6053%–81.5789% | 61.8421%–65.1316% | — |
|
|
19
|
+
| Majority-correct questions | **121 / 152** | 96 / 152 | **+25** |
|
|
20
|
+
| Majority accuracy | **79.61%** | 63.1579% | **+16.45 pp** |
|
|
21
|
+
|
|
22
|
+
The ± values describe repeated Judge variation on one fixed answer set. They are not confidence intervals across LoCoMo conversations.
|
|
23
|
+
|
|
24
|
+
### Mean accuracy by category
|
|
25
|
+
|
|
26
|
+
| Category | Questions | StrataGate final R8 | Mem0 base | StrataGate - Mem0 |
|
|
27
|
+
| --- | ---: | ---: | ---: | ---: |
|
|
28
|
+
| Multi-hop | 32 | **66.5625%** | 61.5625% | +5.0000 pp |
|
|
29
|
+
| Temporal | 37 | **74.8649%** | 34.5946% | **+40.2703 pp** |
|
|
30
|
+
| Open-domain | 13 | 83.0769% | **84.6154%** | -1.5385 pp |
|
|
31
|
+
| Single-hop | 70 | **89.2857%** | 75.1429% | **+14.1428 pp** |
|
|
32
|
+
|
|
33
|
+
The largest observed difference is temporal. Mem0's local base run often anchored relative dates from the 2023 conversation to the 2026 experiment date. StrataGate retained source timestamps and could fall back to the original messages. This mechanism is consistent with the gap, but the paired result is not an ablation and does not prove that timestamps or raw fallback caused the full difference.
|
|
34
|
+
|
|
35
|
+
### Paired majority outcomes
|
|
36
|
+
|
|
37
|
+
| Outcome | Questions |
|
|
38
|
+
| --- | ---: |
|
|
39
|
+
| Both correct | 80 |
|
|
40
|
+
| StrataGate correct, Mem0 wrong | 41 |
|
|
41
|
+
| StrataGate wrong, Mem0 correct | 16 |
|
|
42
|
+
| Both wrong | 15 |
|
|
43
|
+
|
|
44
|
+
### Protocol matrix
|
|
45
|
+
|
|
46
|
+
| Field | StrataGate final R8 | Mem0 base |
|
|
47
|
+
| --- | --- | --- |
|
|
48
|
+
| Dataset scope | `conv-26`, categories 1–4, 152 questions | Same IDs, order, text, gold answers, and categories |
|
|
49
|
+
| Memory construction | Fresh build from 419 timestamped messages with `gpt-5.6-sol`; 17 blocks, 97 events, 4 elements | Fresh build with `gpt-5.6-sol`; 173 final memories |
|
|
50
|
+
| Retrieval and assessment | BM25/RRF event and fact-level element tools, raw-message fallback, four-round budget, five-field evidence gate | Two speaker searches, top-30 each; no graph |
|
|
51
|
+
| Answer model | `gpt-5.6-sol`, `reasoning_effort=low` | Same |
|
|
52
|
+
| Judge | `gpt-5.6-sol`, ten repeats, concurrency 1 | Same model, prompt, parser, and repeats |
|
|
53
|
+
| Judge prompt SHA-256 | `44fb3d8f7a1f37b2430772cf90518a32172e4056b7a0dec085402763fd179b9f` | Same |
|
|
54
|
+
| Answer context and prompt | StrataGate-specific | Mem0-specific |
|
|
55
|
+
| Embedding | No vector retrieval in the evaluated event/element search | `text-embedding-3-small`, 1536 dimensions |
|
|
56
|
+
|
|
57
|
+
Mem0 used the local base SDK version 0.1.97 pinned to commit `2b58775c17eb1c1b7532242b7154af6744102280`, with Graph, Cloud, and Platform v3 disabled. It processed 419 source messages through two speaker views and completed all 428 write units.
|
|
58
|
+
|
|
59
|
+
The StrataGate run recorded 2,065 successful model responses and 14 bodyless socket failures during extraction. All 14 failures were recovered from checkpoints, no completed question was replayed, and every successful response reported `gpt-5.6-sol`. The Mem0 run retained 187 historical failed-attempt traces, all recovered; its generated summary reports `passed=false` because it treats those bodyless attempts as missing `response.model`, even though successful responses returned the expected model. Completion and clean-transport acceptance are reported separately.
|
|
60
|
+
|
|
61
|
+
The public aggregates are:
|
|
62
|
+
|
|
63
|
+
- [`benchmarks/locomo-conv26-r8-final.json`](../benchmarks/locomo-conv26-r8-final.json) for final R8, its prior-round comparisons, and remaining-error stages;
|
|
64
|
+
- [`benchmarks/locomo-conv26-sol-mem0-paired.json`](../benchmarks/locomo-conv26-sol-mem0-paired.json) for the earlier round-seven/Mem0 pairing retained as historical evidence;
|
|
65
|
+
- [`benchmarks/locomo-conv26-development.json`](../benchmarks/locomo-conv26-development.json) for R1–R5.
|
|
66
|
+
|
|
67
|
+
Raw requests and per-question traces are not copied into this public repository.
|
|
68
|
+
|
|
69
|
+
| Source artifact | SHA-256 |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| Final R8 `summary.json` | `3e29d985fcdd88a385c106838c3046808c476affb63679c2e02601b5a2006656` |
|
|
72
|
+
| Final R8 `checkpoint.json` | `82a2f5be362369c72aff39c7d6eaf9b5b6904ccba15a186aef1e7ff770ff79db` |
|
|
73
|
+
| Final R8 `source-snapshot.patch` | `5eed8bd5fd7b316ad2aaf4b142992bac31c427ea81cbb1f7ab1e81449e08e581` |
|
|
74
|
+
| Mem0 `summary.json` | `88f39b729546c6f343e51a11ad8f80bc1eea06ba831f33008fad779b04962927` |
|
|
75
|
+
| Mem0 `paired-comparison.json` | `27b604692364f24600d9513d8d2b91da9b52245a4574f581afb0afc6f00ee7fc` |
|
|
76
|
+
| Mem0 `protocol-audit.json` | `c1e39714eb08a775f9cbe12d0a43de6d825c142991840eab329398d1b9d744eb` |
|
|
77
|
+
|
|
78
|
+
## Development sequence
|
|
79
|
+
|
|
80
|
+
All recorded rounds used the same `conv-26` development slice, but the model and scoring protocols changed. R1–R5 used `gpt-4o-mini` extraction with a GPT-4o answerer/Judge setup. R7 and R8 used ten `gpt-5.6-sol` Judge decisions per question. R6 stopped at a 123-question snapshot and has no final score.
|
|
81
|
+
|
|
82
|
+
| Run | Main intervention | Reported result | Protocol note |
|
|
83
|
+
| --- | --- | ---: | --- |
|
|
84
|
+
| R1 | Initial layered blocks and event cards | 67 / 152 (44.08%) | Temporal accuracy 18.92% |
|
|
85
|
+
| R2 | Multiple event cards per block and explicit occurrence time | 77 / 152 (50.66%) | Temporal accuracy rose to 45.95% |
|
|
86
|
+
| R3 | Extraction, read tools, and per-batch assessment changed together | 116 / 152 (76.32%) | One adoption-rule violation; strict result 115 / 152 (75.66%) |
|
|
87
|
+
| R4 | Bounded five-field assessment context | 118 / 152 (77.63%) | Zero recorded adoption violations and about 10.35% fewer QA tokens than R3 |
|
|
88
|
+
| R5 | Larger structured retrieval scratchpad | 97 / 152 (63.82%) | Reproducible regression led to restoring the smaller gate |
|
|
89
|
+
| R6 | Mini-model sensitivity run | incomplete | 123-question snapshot only; no final score |
|
|
90
|
+
| R7 | Sol retrieval, assessment, answer, and Judge | 71.9737% mean; 111 / 152 majority | Reused a state extracted with `gpt-4o-mini`; not end-to-end Sol |
|
|
91
|
+
| R8 initial | Fresh end-to-end Sol extraction and hybrid event/element retrieval | 70.3289% mean; 107 / 152 majority | Repeated card searches frequently exhausted the budget |
|
|
92
|
+
| **R8 final** | Fresh end-to-end Sol state with raw fallback and retrieval fixes | **80.4606% mean; 121 / 152 majority** | Best completed result on this slice |
|
|
93
|
+
|
|
94
|
+
The sequence supports several engineering conclusions, not a single cumulative causal curve:
|
|
95
|
+
|
|
96
|
+
1. Explicit occurrence time improved temporal questions on the fixed early-round protocol.
|
|
97
|
+
2. A small, enforceable evidence gate performed better than a larger structured scratchpad.
|
|
98
|
+
3. Model and Judge changes materially affect scores; at least one fixed answer moved from 10 / 10 correct under the mini Judge to 0 / 10 under the Sol Judge.
|
|
99
|
+
4. Retrieval strategy matters more than raw search count. Repeating the same card search can be worse than changing channel and checking the original source.
|
|
100
|
+
5. Element-card value remains unresolved. Final R8 used `search_elements` on only four questions; all four were correct, but this usage-conditioned subset is too small and selected to support a causal claim.
|
|
101
|
+
|
|
102
|
+
## Initial R8 versus final R8
|
|
103
|
+
|
|
104
|
+
| Metric | Initial R8 | Final R8 | Change |
|
|
105
|
+
| --- | ---: | ---: | ---: |
|
|
106
|
+
| Ten-Judge mean | 70.3289% | **80.4606%** | **+10.1317 pp** |
|
|
107
|
+
| Majority correct | 107 / 152 | **121 / 152** | **+14** |
|
|
108
|
+
| Retrieval rounds | 215 | **146** | -69 (-32.1%) |
|
|
109
|
+
| Assessment calls | 237 | **146** | -91 (-38.4%) |
|
|
110
|
+
| Total tokens | 6,692,417 | **4,088,324** | -2,604,093 (-38.9%) |
|
|
111
|
+
| Official-equivalent cost | $33.907499 | **$21.406145** | -$12.501354 (-36.9%) |
|
|
112
|
+
|
|
113
|
+
Question-level majority transitions were: 95 both correct, 26 final-R8-only correct, 12 initial-R8-only correct, and 19 both wrong.
|
|
114
|
+
|
|
115
|
+
The initial run had 19 questions with at least three `search_events` calls; only 2 were majority-correct. Final R8 answered 15 of those same questions correctly, with 12 using raw-message fallback. A representative temporal question asked when Caroline gave a school speech: the initial run repeatedly searched event cards and abstained, while final R8 fell back to the source message dated 2023-06-09, resolved “last week,” and received 10 / 10 correct Judge votes.
|
|
116
|
+
|
|
117
|
+
This is strong diagnostic evidence that the old repeated-search path was defective. It is not a clean ablation: retrieval policy, filters, element result shape, and freshly extracted memory contents all changed.
|
|
118
|
+
|
|
119
|
+
## Remaining-error analysis
|
|
120
|
+
|
|
121
|
+
Final R8 has 31 majority-wrong questions. Their observable failure stage is:
|
|
122
|
+
|
|
123
|
+
| Failure stage | Questions | Multi-hop | Temporal | Open-domain | Single-hop |
|
|
124
|
+
| --- | ---: | ---: | ---: | ---: | ---: |
|
|
125
|
+
| Direct answer without retrieval | 15 | 5 | 3 | 2 | 5 |
|
|
126
|
+
| Retrieval marked `sufficient`, final answer wrong | 14 | 6 | 6 | 0 | 2 |
|
|
127
|
+
| Retrieval remained `partial` at the limit | 2 | 0 | 1 | 0 | 1 |
|
|
128
|
+
| **Total** | **31** | **11** | **10** | **2** | **8** |
|
|
129
|
+
|
|
130
|
+
The two largest problems are therefore not a lack of retrieval rounds:
|
|
131
|
+
|
|
132
|
+
- **Direct-answer risk:** 15 wrong answers bypassed retrieval entirely. These include missed list facts, wrong event details, and unanchored relative dates.
|
|
133
|
+
- **False sufficiency:** 14 answers passed the evidence gate but were still wrong. The selected material was often related but belonged to an adjacent event, or it supported only part of a requested list.
|
|
134
|
+
|
|
135
|
+
Recurring patterns include:
|
|
136
|
+
|
|
137
|
+
- choosing the wrong research topic or the wrong pottery event;
|
|
138
|
+
- resolving a relative date against the wrong message or returning “next month” without an absolute anchor;
|
|
139
|
+
- omitting one item from books, instruments, purchases, or attended events;
|
|
140
|
+
- using a generally plausible reason instead of the event-specific reason requested;
|
|
141
|
+
- open-domain Judge disagreements where the memory evidence supports more than one cautious inference.
|
|
142
|
+
|
|
143
|
+
The next diagnostic should inject the gold-evidence raw block while keeping the answer and Judge protocol fixed. That oracle split will distinguish retrieval/selection failure from answer reasoning and temporal-calculation failure. Before increasing the retrieval budget, the implementation should also gate direct temporal/multi-hop answers, tighten `sufficient` against adjacent events, and add completeness checks for list questions.
|
|
144
|
+
|
|
145
|
+
## Reporting checklist
|
|
146
|
+
|
|
147
|
+
Before treating two scores as comparable, freeze and report:
|
|
148
|
+
|
|
149
|
+
- dataset version and conversation/question scope;
|
|
150
|
+
- included categories;
|
|
151
|
+
- extraction code and model;
|
|
152
|
+
- retrieval code, tools, budgets, and prompts;
|
|
153
|
+
- answer model, temperature, and reasoning configuration;
|
|
154
|
+
- Judge prompt, model, temperature, parser, and repetitions;
|
|
155
|
+
- provider and returned-model audit;
|
|
156
|
+
- memory-state provenance;
|
|
157
|
+
- retries, missing responses, and checkpoint completion;
|
|
158
|
+
- exact numerator and denominator, not only a rounded percentage.
|
|
159
|
+
|
|
160
|
+
## What the current evidence supports
|
|
161
|
+
|
|
162
|
+
The current evidence supports these narrow claims:
|
|
163
|
+
|
|
164
|
+
- on `conv-26` and the tested configurations, final R8 scored 121 / 152 by majority vote and Mem0 base scored 96 / 152;
|
|
165
|
+
- the largest observed paired category difference was temporal, while Mem0 remained slightly higher on open-domain questions;
|
|
166
|
+
- the final R8 retrieval policy avoided a measured repeated-event-search failure mode while using fewer rounds, tokens, and cost;
|
|
167
|
+
- explicit occurrence time, an enforceable evidence gate, and raw-source access are useful components on this development slice;
|
|
168
|
+
- remaining errors are split mainly between direct answers that skipped retrieval and retrieved evidence incorrectly marked sufficient;
|
|
169
|
+
- completed per-question checkpoints and request traces are necessary to distinguish model behavior from transport failure.
|
|
170
|
+
|
|
171
|
+
It does not yet support these broader claims:
|
|
172
|
+
|
|
173
|
+
- state of the art on LoCoMo;
|
|
174
|
+
- generalization across the full LoCoMo dataset;
|
|
175
|
+
- architectural superiority under a shared end-to-end retrieval and context protocol;
|
|
176
|
+
- a single-component causal explanation for the final R8 gain;
|
|
177
|
+
- a causal benefit from element cards without disabled/forced/fixed-state ablations.
|
|
178
|
+
|
|
179
|
+
The next credible milestone is a fixed-state component ablation, followed by the same frozen end-to-end protocol across more conversations and then the full dataset.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# 外部 AI 记忆导入
|
|
2
|
+
|
|
3
|
+
StrataGate 提供 `importExternalMemory()` 编排外部记忆迁移:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
外部 AI JSON
|
|
7
|
+
↓ extractor(候选 Event)
|
|
8
|
+
每个候选 Event → searchEvents()(确定性 BM25,Top-K)
|
|
9
|
+
↓ decider(ADD / MERGE / SUPERSEDE / CONFLICT / IGNORE)
|
|
10
|
+
写入新的规范 Event,保留来源和 supersedes/conflicts 关系
|
|
11
|
+
↓
|
|
12
|
+
只为新 Event 创建元素/知识图谱投影任务
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 最小接入
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import {
|
|
19
|
+
EXTERNAL_MEMORY_EXPORT_PROMPT_ZH_CN,
|
|
20
|
+
StrataGate,
|
|
21
|
+
externalMemoryJsonExtractor,
|
|
22
|
+
} from '@diqier/stratagate';
|
|
23
|
+
|
|
24
|
+
// 把 EXTERNAL_MEMORY_EXPORT_PROMPT_ZH_CN 交给外部 AI,并把它返回的 JSON 放入 text。
|
|
25
|
+
const result = await memory.importExternalMemory({
|
|
26
|
+
text,
|
|
27
|
+
extractor: externalMemoryJsonExtractor,
|
|
28
|
+
topK: 5,
|
|
29
|
+
decider: async ({ candidate, matches }) => {
|
|
30
|
+
// 这里通常调用你的 LLM;它只能从 matches 中选择 existingEventIds。
|
|
31
|
+
// 返回的 MERGE/SUPERSEDE 会创建新 Event,不会覆盖旧 Event。
|
|
32
|
+
return {
|
|
33
|
+
action: matches.length === 0 ? 'ADD' : 'MERGE',
|
|
34
|
+
existingEventIds: matches.slice(0, 1).map(({ event }) => event.id),
|
|
35
|
+
mergedCandidate: candidate,
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`decider` 的 `matches` 已经被限制为 `topK` 条;即使模型返回其它事件 ID,库也会丢弃这些越界引用。`IGNORE` 只留下审计记录,不会写入 Event。`CONFLICT` 会在新旧事件两侧建立对称的 `conflictsWithEventIds`。
|
|
42
|
+
|
|
43
|
+
## 给外部 AI 的提示词
|
|
44
|
+
|
|
45
|
+
直接使用导出的 `EXTERNAL_MEMORY_EXPORT_PROMPT_ZH_CN`。它要求外部 AI 只输出 `stratagate.external-memory.v2` JSON,并区分 `memoryKind`(instruction/preference/fact/event)与 `category`,同时特别约束时间:
|
|
46
|
+
|
|
47
|
+
- `mentionedAt`(被提及时间)与 `happenedStart/happenedEnd`(实际发生/计划时间)分开;
|
|
48
|
+
- 没有明确时间或可靠参照时,不填写日期,不把当前时间、导出时间或聊天顺序当作事件时间;
|
|
49
|
+
- 保留 `originalText`,用 `precision` 和 `basis` 标记粒度与依据;
|
|
50
|
+
- “上周”等相对时间只有在能依据已知消息时间唯一换算时才转换,否则保持 `unknown`。
|
|
51
|
+
|
|
52
|
+
如果外部 AI 仍然返回 Markdown 代码块,`parseExternalMemoryExport()` 会自动去除围栏;其它非 JSON 文本会被拒绝,避免把模型解释误写进记忆。
|
|
53
|
+
|
|
54
|
+
用于第二阶段裁决的系统提示词可使用 `EXTERNAL_MEMORY_DECIDER_PROMPT_ZH_CN`。它明确规定了五种写入动作的边界,并要求模型只能引用本次 Top-K 结果中的事件 ID。
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,153 +1,176 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "stratagate-dsh",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Automatic local-first cross-session memory for DeepSeek Harness with source-traceable recall",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./client": {
|
|
14
|
-
"types": "./dist/client.d.ts",
|
|
15
|
-
"default": "./dist/client.js"
|
|
16
|
-
},
|
|
17
|
-
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
18
|
-
"./package.json": "./package.json"
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
"dist",
|
|
22
|
-
"cordis.patch.yml",
|
|
23
|
-
"README.md",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"dsh
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
|
|
153
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "stratagate-dsh",
|
|
3
|
+
"version": "0.2.37",
|
|
4
|
+
"description": "Automatic local-first cross-session memory for DeepSeek Harness with source-traceable recall",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./client": {
|
|
14
|
+
"types": "./dist/client.d.ts",
|
|
15
|
+
"default": "./dist/client.js"
|
|
16
|
+
},
|
|
17
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"cordis.patch.yml",
|
|
23
|
+
"README.md",
|
|
24
|
+
"README.zh-CN.md",
|
|
25
|
+
"docs",
|
|
26
|
+
"screenshots.json",
|
|
27
|
+
"CHANGELOG.md",
|
|
28
|
+
"LICENSE"
|
|
29
|
+
],
|
|
30
|
+
"workspaces": [
|
|
31
|
+
"packages/*",
|
|
32
|
+
"integrations/*"
|
|
33
|
+
],
|
|
34
|
+
"dsh": {
|
|
35
|
+
"bundle": {
|
|
36
|
+
"patch": "./cordis.patch.yml"
|
|
37
|
+
},
|
|
38
|
+
"client": {
|
|
39
|
+
"inject": [
|
|
40
|
+
"@deepseek-ai/dsh-client-runtime"
|
|
41
|
+
],
|
|
42
|
+
"platform": "web"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "npm run build:core && npm run build:dsh && npm run build:workbuddy",
|
|
47
|
+
"build:dsh": "tsup && node scripts/build-client.mjs",
|
|
48
|
+
"build:core": "npm run build --workspace @diqier/stratagate",
|
|
49
|
+
"build:workbuddy": "npm run build --workspace stratagate-workbuddy",
|
|
50
|
+
"check": "npm run check:core && npm run check:dsh && npm run check:workbuddy",
|
|
51
|
+
"check:dsh": "tsc -p tsconfig.json --noEmit",
|
|
52
|
+
"check:core": "npm run check --workspace @diqier/stratagate",
|
|
53
|
+
"check:workbuddy": "npm run check --workspace stratagate-workbuddy",
|
|
54
|
+
"test": "npm run test:core && npm run test:dsh && npm run test:workbuddy",
|
|
55
|
+
"test:dsh": "vitest run --config vitest.config.ts",
|
|
56
|
+
"test:core": "npm run test --workspace @diqier/stratagate",
|
|
57
|
+
"test:workbuddy": "npm run test --workspace stratagate-workbuddy",
|
|
58
|
+
"verify:dsh": "npm run build:dsh && node scripts/verify-package.mjs",
|
|
59
|
+
"verify:workbuddy": "npm run verify:package --workspace stratagate-workbuddy",
|
|
60
|
+
"test:watch": "vitest --config vitest.config.ts",
|
|
61
|
+
"prepare": "npm run build:dsh"
|
|
62
|
+
},
|
|
63
|
+
"keywords": [
|
|
64
|
+
"memory",
|
|
65
|
+
"dsh",
|
|
66
|
+
"deepseek",
|
|
67
|
+
"plugin",
|
|
68
|
+
"agent",
|
|
69
|
+
"cross-session",
|
|
70
|
+
"evidence",
|
|
71
|
+
"deepseek-harness",
|
|
72
|
+
"dsh-plugin",
|
|
73
|
+
"agent-memory",
|
|
74
|
+
"cross-session-memory",
|
|
75
|
+
"persistent-memory",
|
|
76
|
+
"project-memory",
|
|
77
|
+
"conversation-memory",
|
|
78
|
+
"long-term-memory",
|
|
79
|
+
"local-first",
|
|
80
|
+
"time-decay",
|
|
81
|
+
"usage-reinforcement",
|
|
82
|
+
"source-traceability",
|
|
83
|
+
"source-tracing",
|
|
84
|
+
"evidence-gate"
|
|
85
|
+
],
|
|
86
|
+
"repository": {
|
|
87
|
+
"type": "git",
|
|
88
|
+
"url": "git+https://github.com/diqierjia/StrataGate-AgentMemory.git"
|
|
89
|
+
},
|
|
90
|
+
"bugs": {
|
|
91
|
+
"url": "https://github.com/diqierjia/StrataGate-AgentMemory/issues"
|
|
92
|
+
},
|
|
93
|
+
"homepage": "https://github.com/diqierjia/StrataGate-AgentMemory#readme",
|
|
94
|
+
"license": "MIT",
|
|
95
|
+
"dshWorkshop": {
|
|
96
|
+
"schema": "omdsh-workshop-package/v1",
|
|
97
|
+
"type": "plugin",
|
|
98
|
+
"integration": {
|
|
99
|
+
"protocol": "harness-profile",
|
|
100
|
+
"artifact": "cordis.patch.yml"
|
|
101
|
+
},
|
|
102
|
+
"install": {
|
|
103
|
+
"mode": "transactional",
|
|
104
|
+
"adapter": "profile-bundle",
|
|
105
|
+
"failurePolicy": "generation-rollback",
|
|
106
|
+
"touchesCurrentBeforeActivation": false
|
|
107
|
+
},
|
|
108
|
+
"lifecycle": {
|
|
109
|
+
"activation": "restart-profile",
|
|
110
|
+
"dispose": "supported"
|
|
111
|
+
},
|
|
112
|
+
"compatibility": {
|
|
113
|
+
"dshVersions": [
|
|
114
|
+
"0.1.0-rc.6",
|
|
115
|
+
"0.1.0-rc.7"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
"permissions": [
|
|
119
|
+
"harness:tool",
|
|
120
|
+
"filesystem:read",
|
|
121
|
+
"filesystem:write",
|
|
122
|
+
"network:none",
|
|
123
|
+
"subprocess:none",
|
|
124
|
+
"shell:none",
|
|
125
|
+
"python:none",
|
|
126
|
+
"credentials:none"
|
|
127
|
+
],
|
|
128
|
+
"capability": {
|
|
129
|
+
"id": "memory_search_events",
|
|
130
|
+
"kind": "tool",
|
|
131
|
+
"invocation": "Invoke memory_search_events with a project-memory query after profile activation.",
|
|
132
|
+
"expected": "The DSH tool registry exposes memory_search_events and returns an evidence-gated retrieval batch."
|
|
133
|
+
},
|
|
134
|
+
"evidence": {
|
|
135
|
+
"install": "tests/plugin.test.ts",
|
|
136
|
+
"failureIsolation": null,
|
|
137
|
+
"hotReload": null,
|
|
138
|
+
"remove": null
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"publishConfig": {
|
|
142
|
+
"access": "public"
|
|
143
|
+
},
|
|
144
|
+
"engines": {
|
|
145
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
146
|
+
},
|
|
147
|
+
"peerDependencies": {
|
|
148
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
149
|
+
"@deepseek-ai/dsh-agent-default-model": ">=0.1.0-rc.6 <0.2.0",
|
|
150
|
+
"@deepseek-ai/dsh-llm": ">=0.1.0-rc.6 <0.2.0",
|
|
151
|
+
"@deepseek-ai/dsh-session": ">=0.1.0-rc.6 <0.2.0",
|
|
152
|
+
"@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.6 <0.2.0",
|
|
153
|
+
"@deepseek-ai/dsh-tools": ">=0.1.0-rc.6 <0.2.0",
|
|
154
|
+
"@deepseek-ai/schemastery": "^3.18.1"
|
|
155
|
+
},
|
|
156
|
+
"devDependencies": {
|
|
157
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
158
|
+
"@deepseek-ai/dsh-agent-default-model": ">=0.1.0-rc.6 <0.2.0",
|
|
159
|
+
"@deepseek-ai/dsh-llm": ">=0.1.0-rc.6 <0.2.0",
|
|
160
|
+
"@deepseek-ai/dsh-session": ">=0.1.0-rc.6 <0.2.0",
|
|
161
|
+
"@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.6 <0.2.0",
|
|
162
|
+
"@deepseek-ai/dsh-tools": ">=0.1.0-rc.6 <0.2.0",
|
|
163
|
+
"@deepseek-ai/schemastery": "^3.18.1",
|
|
164
|
+
"@types/node": "^22.0.0",
|
|
165
|
+
"cytoscape": "^3.34.1",
|
|
166
|
+
"cytoscape-fcose": "^2.2.0",
|
|
167
|
+
"esbuild": "^0.28.2",
|
|
168
|
+
"tsup": "^8.5.0",
|
|
169
|
+
"typescript": "^5.7.0",
|
|
170
|
+
"vitest": "^3.0.0"
|
|
171
|
+
},
|
|
172
|
+
"dependencies": {
|
|
173
|
+
"ngraph.graph": "^20.1.2",
|
|
174
|
+
"ngraph.leiden": "^0.3.0"
|
|
175
|
+
}
|
|
176
|
+
}
|
package/screenshots.json
ADDED