@240xu/dsh-message-ops 0.47.1 → 0.47.2

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 CHANGED
@@ -2048,6 +2048,10 @@ applyScriptLive`),replace 语义由 `applySurfaceReplace` 唯一拥有。旧
2048
2048
 
2049
2049
  当前规模:**744 tests / 740 pass / 4 skip / 0 todo / 0 fail**(`npm test`)。
2050
2050
 
2051
+ 基准:`npm run bench:incremental`(离线合成事件,可复现增量派生成本);CI 每次在
2052
+ Node 22/24 上跑 20k 事件档并设 200ms 宽松上限(本地 revert 批 1.5ms / restore 批 1.9ms,
2053
+ 全量重算 49ms 是增量合并的 14.4×)。
2054
+
2051
2055
  真机验证记录见 [`docs/verification/`](docs/verification/README.md)(环境基线、复核手法、
2052
2056
  每轮逐项判定与证据)。最近一轮:0.46.1 在宿主 0.2.3-alpha.3 上的 P0 修复复验(9 项 PASS)
2053
2057
  与大日志增量派生实测。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@240xu/dsh-message-ops",
3
- "version": "0.47.1",
3
+ "version": "0.47.2",
4
4
  "description": "DSH web 插件:消息级回滚 / 删除 / 恢复 / 分叉 / 编辑重发(补 dsh 官方没有的部分)。",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -44,7 +44,9 @@
44
44
  "scripts": {
45
45
  "build:client": "node scripts/build-client.mjs",
46
46
  "test": "node --check src/client.js && node --test \"test/*.test.js\"",
47
- "prepack": "npm run build:client"
47
+ "prepack": "npm run build:client",
48
+ "bench:incremental": "node bench/incremental.mjs",
49
+ "bench": "node bench/derive.mjs"
48
50
  },
49
51
  "peerDependencies": {
50
52
  "@deepseek-ai/dsh-tools": "^0.1.0-rc.6 || ^0.2.0-rc.1 || ^0.2.2-rc.5 || ^0.2.3-alpha.3",
package/src/index.js CHANGED
@@ -1530,6 +1530,7 @@ async function runDiskWrite({ logPath, diag, plannedOf, scriptOf, resultOf }) {
1530
1530
  /** 测试钩子(非公开 API):直接驱动 list / search / text 与文件派生缓存。 */
1531
1531
  export const _internals = {
1532
1532
  errorStatusOf,
1533
+ deriveFromEvents,
1533
1534
  validateConfig,
1534
1535
  isConfiguredTrustedHost,
1535
1536
  setTrustedHostsForTests: hosts => {