@yolk_vat-y/dsh-project-memory 0.6.10 → 0.6.11
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 +37 -0
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/client/client.js +8 -3
- package/client/client.js.map +1 -1
- package/package.json +9 -9
- package/src/auto-inject.js +8 -2
- package/src/client/MemoryView.tsx +8 -4
- package/src/commands/insight-actions.js +20 -0
- package/src/enhancer.js +4 -2
- package/src/insight-store.js +51 -17
- package/src/lazy.js +13 -2
- package/src/ops.js +74 -4
- package/src/setup/taskbridge.js +34 -10
- package/src/store.js +72 -12
- package/src/tools/forget.js +5 -5
- package/src/tools/index-doc.js +2 -2
- package/src/tools/index-repo.js +2 -2
- package/src/tools/lesson-tools.js +25 -24
- package/src/tools/query-memory.js +6 -5
- package/src/tools/remember.js +5 -5
- package/src/tools/stats.js +1 -1
- package/src/tools/task-tools.js +8 -8
- package/src/tools/watch-repo.js +6 -5
- package/src/util/fs.js +10 -2
- package/src/util/patch.js +28 -0
- package/src/util/search.js +11 -1
- package/src/util/task-view.js +3 -1
- package/src/util/text.js +2 -0
- package/src/watch.js +11 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
1
|
+
## 0.6.11 (2026-11-06)
|
|
2
|
+
**兼容**:`format.json` 仅在成功从旧版 store 迁移时多一个可选的 `migratedFrom: 'legacy'` 标记(旧版本读到会忽略);无新增配置键,无破坏性 store 变更。
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### 修复(2026-11-05 审计)
|
|
6
|
+
|
|
7
|
+
- **旧版 store 迁移不再删库**:`entries.json` 有数据、`index.json` 缺失/无 `files` 时,`load()` 保护性跳过后 `save()` 不再补写 `format.json`;成功迁移的标记带 `migratedFrom: 'legacy'`,没有标记的旧 `format.json` 也不会触发清理。
|
|
8
|
+
- **锁回收失败不再同步忙等**:stale 分支补 deadline 与 10ms 等待;只读目录 / Windows 持续占用下 `acquireDirLock()` 按 `timeoutMs` 返回 `null`,不再挂死 `save()` / 退出 flush。
|
|
9
|
+
- **懒索引的 L2 增强不再被覆盖**:`onFileObserved()` 移到 `commitFileUpdates()` 之后(与 `index_repo` / watch 同序);单文件读取后 `enhanced: true` 与类型符号都能落盘。
|
|
10
|
+
- **`global.json` 缺失/不可读不再清空整库**:读不到磁盘文档时保留内存副本重写,不再把“空 doc”当成对端删光。
|
|
11
|
+
- **experience 迁移保留并发写入**:锁内重读的 `insights.json` 作为合并基线,不再用等锁前的快照整份覆盖。
|
|
12
|
+
- **`reinjectItemsAfter` 恢复生效**:条目级冷却到期时绕过块级指纹去重,历史被外部裁剪后能按配置重发。
|
|
13
|
+
- **动作识别覆盖包装器与 npm 前置 flag**:`sudo -E rm`、`nice -n 10 npm publish`、`time -p`、`stdbuf -oL`、`npm --registry/--access/--otp … publish`、`(rm …)` / `{ …; }` / `if …; then …` 都归一成正确 op。
|
|
14
|
+
- **流式检索按词边界计 TF**:`cat` 不再命中 `concatenate`,与 token 化 IDF 同源。
|
|
15
|
+
- **面板删除同步清 `vectors.json`**(与 `forget` 一致);`watch_repo` 回报的 interval 与真实定时器一致(0/负数 clamp 成 1s)。
|
|
16
|
+
- **git 与非 git 扫描口径统一**:深度边界与 `DEFAULT_IGNORE` 只作用于目录段,`git init` 前后语料一致。
|
|
17
|
+
- **增强队列按 store 身份去重**:多项目同名文件不再互相顶掉。
|
|
18
|
+
- **畸形 `task.steps` / `fileMeta` 归一**:不会让绑定会话的整条注入与任务列表一起抛错。
|
|
19
|
+
- **面板记忆列表在 `root` / 绑定任务变化后重取**;编辑 procedure 不再把合成摘要写进 `body`。
|
|
20
|
+
- **空提交不再创建空 store**;`save_lesson` 改 `kind` 时清掉旧 kind 专属字段;`truncate()` 的缺省上限与 `timeAgo()` 的非法时间不再输出 `undefined` / `NaN天前`。
|
|
21
|
+
|
|
22
|
+
**测试**:新增 `test/audit-2026-11-05.test.mjs`(19 项:迁移保护/并发合并/畸形任务/global 缺失/锁超时/lazy 顺序/队列身份/reinject/ops/词边界/向量清理/watch/scan/kind/空提交/truncate)。`npm test` **977 项 / 58 个文件**全绿、`npm run typecheck` 通过;`npm run build:client` 后 `client/` 与源码一致。
|
|
23
|
+
|
|
24
|
+
**工具描述统一为英文,并写清「改而不是新建」**:12 个工具的描述与参数说明此前中英混排(3 中 / 9 英),现在全部英文。两处措辞补上更新优先:`save_lesson` 直说「看到的记忆记错、过时或不够用时,带 id 再写一次就地覆盖,别另建一条」;`query_memory` 补一句「查询后顺手用 id 更新过时、记错的条目」。
|
|
25
|
+
|
|
26
|
+
schema 预算守卫从「字符 ≤ 5600」改成「token 估算 ≤ 1800」(中文字符约 1 token/字,其余约 4 字符/token)。同一份内容实测:中文 4854 字符 / ~1772 token,英文 6734 字符 / ~1684 token——字符少不代表 token 少,按 token 判才选得对(这次英文略低,故取英文)。
|
|
27
|
+
|
|
28
|
+
### 适配 dsh 0.2.2-rc.1
|
|
29
|
+
|
|
30
|
+
**开发依赖对齐新宿主**:`dsh-tools` / `dsh-llm` / 四个 client 包从 `0.2.1-rc.2` 升到 `0.2.2-rc.1`,`@deepseek-ai/cordis` 从 `^4.0.4`(实际装 4.0.5)升到 `^4.1.0` —— 0.2.2 的 client 包 peer 已是 `~4.1.0`,旧依赖下的全绿只证明了 0.2.1 兼容。`package-lock.json` 同步重新生成。
|
|
31
|
+
|
|
32
|
+
**逐项核对 0.2.2 的接口变更**:`agent/pre-step`(dispatcher 仍注入 `agent`)、`session/event` / `session/disposed`、v4 消息 source 准入(仍拒 `kind: 'plugin'`、接受生产者自有 kind)、`ctx.tools.register`、`ctx.inject(['commands'])`、`workingDirectory.get(session)`、`sessions.list` 快照(`byId` + `retainedBy.mainView` + `blank`)、`shell.overlay` / `conversation.chat.commandview` 槽位、`remote.commands` 扁平服务、`ctx.configForms.get`、`inputTriggers.registerSource` —— 均未变;投影帧改 `changes[]`、已释放单元保留检查点、`session.list` 摘要去掉 contextPressure/contextBreakdown、LLM `purpose` 改为类型级声明、Loader 条目树改 `commit(change)` —— 插件都没读这些面。
|
|
33
|
+
|
|
34
|
+
**补齐 `apply_patch` 的文件追踪**:这个 0.2.2 的可选工具只收整段补丁文本(`input`),路径写在 `*** Add/Update/Delete File:` 与 `*** Move to:` 行里。TaskBridge 与动作平面此前只认 `file_path`/`path`,开启该工具后跨文件补丁会漏记任务热点、审计也指不到具体文件;现在都从正文提取路径(相对会话当前工作目录再归一到项目根,项目外丢弃)。
|
|
35
|
+
|
|
36
|
+
**实测**:`npm test` 全绿、`npm run typecheck` 通过、`npm run build:client` 产物与源码一致;0.2.2-rc.1 的 web profile 里工具注册、skill 注册与 pre-step 注入均正常。
|
|
37
|
+
|
|
1
38
|
## 0.6.10 (2026-11-04)
|
|
2
39
|
|
|
3
40
|
**兼容**:无新增配置键,无 store 格式变更。一处判据变化:`memoryDir` 只接受项目根内的相对路径,越界值(`.`、`..`、含 `..` 段、绝对路径)回落到默认目录并告警一次(此前会静默把 store 放到根上或根外)。
|
package/README.md
CHANGED
|
@@ -285,7 +285,7 @@ These commands are for **maintaining the plugin code** — regular users do not
|
|
|
285
285
|
|
|
286
286
|
```bash
|
|
287
287
|
npm install
|
|
288
|
-
npm test #
|
|
288
|
+
npm test # 977 tests
|
|
289
289
|
npm run eval:injection # synthetic pool P/R: precision 0.93 / recall 1.00, + a 3-scenario hint-only group
|
|
290
290
|
npm run eval:injection -- --store .dsh-project-memory/insights.json # replay on YOUR store; control group is a hard gate
|
|
291
291
|
npm run selfcheck:triggers # which entries can still push, which declarations are dead (reads your local store)
|
package/README.zh-CN.md
CHANGED
|
@@ -283,7 +283,7 @@ node scripts/bench.mjs /你的/项目路径 [--json] [--samples 100] [--no-pdf]
|
|
|
283
283
|
|
|
284
284
|
```bash
|
|
285
285
|
npm install
|
|
286
|
-
npm test #
|
|
286
|
+
npm test # 977 项测试
|
|
287
287
|
npm run eval:injection # 合成池 P/R:精确率 0.93 / 召回率 1.00,另有 3 个 hint-only 场景
|
|
288
288
|
npm run eval:injection -- --store .dsh-project-memory/insights.json # 用你自己的 store 重放;对照组是硬闸门
|
|
289
289
|
npm run selfcheck:triggers # 哪些条目还推得动、哪些声明是死的(读你本地的 store)
|
package/client/client.js
CHANGED
|
@@ -1883,7 +1883,12 @@ window.__ModuleLoader__.load({
|
|
|
1883
1883
|
return;
|
|
1884
1884
|
}
|
|
1885
1885
|
loadRef.current(0, 30, false);
|
|
1886
|
-
}, [
|
|
1886
|
+
}, [
|
|
1887
|
+
scope,
|
|
1888
|
+
sessionId,
|
|
1889
|
+
root,
|
|
1890
|
+
boundTaskId
|
|
1891
|
+
]);
|
|
1887
1892
|
(0, react.useEffect)(() => {
|
|
1888
1893
|
if (nextOffset === null || typeof IntersectionObserver === "undefined") return;
|
|
1889
1894
|
const sentinel = sentinelRef.current;
|
|
@@ -1918,7 +1923,7 @@ window.__ModuleLoader__.load({
|
|
|
1918
1923
|
}
|
|
1919
1924
|
};
|
|
1920
1925
|
const rowToForm = (row) => {
|
|
1921
|
-
const main = row.kind === "lesson" ? row.fix : row.kind === "experience" ? row.solution : row.kind === "decision" ? row.reason : row.body;
|
|
1926
|
+
const main = row.kind === "lesson" ? row.fix : row.kind === "experience" ? row.solution : row.kind === "decision" ? row.reason : row.kind === "procedure" ? "" : row.body;
|
|
1922
1927
|
const body = main && main !== row.title ? main : "";
|
|
1923
1928
|
return {
|
|
1924
1929
|
title: row.title || "",
|
|
@@ -1977,7 +1982,7 @@ window.__ModuleLoader__.load({
|
|
|
1977
1982
|
if (form.kind === "lesson") fields.pattern = title;
|
|
1978
1983
|
if (form.kind === "decision") fields.choice = title;
|
|
1979
1984
|
if (form.kind === "experience") fields.problem = title;
|
|
1980
|
-
if (form.body.trim()) {
|
|
1985
|
+
if (form.kind !== "procedure" && form.body.trim()) {
|
|
1981
1986
|
if (form.kind === "lesson") fields.fix = form.body.trim();
|
|
1982
1987
|
else if (form.kind === "decision") fields.reason = form.body.trim();
|
|
1983
1988
|
else if (form.kind === "experience") fields.solution = form.body.trim();
|