Skip to content

v0.4.4: DSH session projection compatibility

Choose a tag to compare

@Grivn Grivn released this 31 Aug 17:23
a990d45

中文

v0.4.4 修复旧版 DSH 宿主读取会话历史时出现的 Cannot read properties of undefined (reading 'parse') 错误。Issue #147、PR #149。

修复

  • 子 Agent 本地 token 用量投影同时提供旧版 schema / view 和新版 stateSchema / wire 接口,共用同一个 wire schema 和 view 函数。
  • 两代 registry 均支持活跃会话、脱离会话后的历史回放和检查点恢复。子 Agent 总量仍排除父级与祖先用量,同一步骤的重复样本继续替换而非累加。
  • 安全忽略格式错误的事件载荷,同时保持与 DSH 0.1.2-alpha.1 源码接口兼容。

升级与兼容性

在所属 DSH profile 中安装 dsh-mnemon@0.4.4,然后重启。DSH 0.1.1-rc.2 仍为 registry 开发基线;DSH 0.1.2-alpha.1 仍为源码兼容性目标。旧版兼容性测试使用已发布的 DSH 0.1.0-rc.8 投影 registry。

投影状态仍为 stateVersion: 1,存储格式不变,无需迁移或删除缓存。记忆数据、存储路径、Pack 格式、Provider 凭据、RPC 权限、设置和生产依赖均不变。旧版 registry 别名仅为开发测试夹具,不作为运行时依赖发布。

Sidebar 与可选 Builtin 入口保持 v0.4.3 的行为。本补丁不包含 UI 布局改动或 v0.5 开发内容。

验证

兼容性测试以真实会话运行新旧 DSH registry,覆盖空快照、活跃与脱离会话回放、重复用量样本、检查点恢复、跨代检查点、变更通知和过期状态重算。可复现命令见开发指南。

  • 发布候选在 Node 24.18.0 与 pnpm 10.13.1 下通过完整 pnpm run verify:647 项测试通过,1 项 Windows 专用测试在 macOS 跳过。108 个构建文件的确定性检查、包含 35 个工具与 5 个代表性 Mnemon 工具的 Headless 激活、设置迁移与重启、10 个 Node 兼容公开入口、publint 和 attw 均通过。
  • 使用已发布的新旧 ApiProxy 和投影 registry 完成 32 次真实 HTTP 对照请求。未修改的 v0.4.3 源码复现了旧版历史尾部请求失败;v0.4.4 通过普通与子 Agent 会话、活跃与脱离会话历史、分页对照,并保持新版宿主的投影结果正确。
  • 将包含 115 个文件的 tarball 安装到两个隔离的 DSH 0.1.1-rc.2 Web profile,分别使用原生界面和 Web UI 0.3.9,并搭配官方 Mnemon CLI 0.2.6。两次安装的全部文件均与打包产物一致,10 个 Node 入口均可导入。版本 0.4.4、中英文四个主页面、任务看板往返均通过;原生界面的合成会话在浏览器重载后仍能完整读取历史。未观察到浏览器错误;Web UI 既有的 Host session/list 警告仍存在。测试仅使用临时数据和本地模型桩,没有访问个人记忆或调用付费模型。

回滚

在同一 profile 中重新安装 dsh-mnemon@0.4.3 并重启,无需转换数据,但旧版 DSH 宿主可能再次遇到会话历史读取失败。

上一版:v0.4.3。

English

v0.4.4 fixes session history requests that fail with Cannot read properties of undefined (reading 'parse') on older DSH hosts. Issue #147, PR #149.

Fixes

  • The child-local token-usage projection now exposes both the legacy schema / view contract and the newer stateSchema / wire contract, sharing one wire schema and view function.
  • Live sessions, detached history replay, and restored checkpoints keep working across both registry generations. Parent and ancestor usage remains excluded from child totals, and repeated samples for one step replace rather than accumulate.
  • Malformed event payloads are ignored safely. The implementation also remains compatible with the DSH 0.1.2-alpha.1 source contract.

Upgrade and compatibility

Install dsh-mnemon@0.4.4 in the owning DSH profile and restart it. DSH 0.1.1-rc.2 remains the registry development baseline; DSH 0.1.2-alpha.1 remains a source compatibility target. Legacy compatibility tests use the published DSH 0.1.0-rc.8 projection registry.

Projection state stays at stateVersion: 1 with the same stored format. No migration or cache deletion is required. Memory data, storage paths, Pack formats, Provider credentials, RPC authority, settings, and production dependencies are unchanged. The legacy registry alias is only a development test fixture and is not shipped as a runtime dependency.

Sidebar and optional Builtin placement keep the v0.4.3 behavior. This patch contains no UI layout changes or v0.5 development work.

Verification

The compatibility suite runs real legacy and current DSH registries with real sessions, covering empty snapshots, attached and detached replay, duplicate usage samples, checkpoint restoration, cross-generation checkpoints, change notifications, and obsolete-state refolding. See the development guide for reproducible commands.

  • The release candidate passed complete pnpm run verify on Node 24.18.0 with pnpm 10.13.1: 647 tests passed and one Windows-only test was skipped on macOS. All 108 deterministic build files, Headless activation with 35 tools and five representative Mnemon tools, settings migration and restart, ten Node-compatible public entries, publint, and attw passed.
  • A real HTTP comparison made 32 requests through the published legacy/current ApiProxy and projection registries. The unmodified v0.4.3 source reproduced the legacy history-tail failure; v0.4.4 passed ordinary/child sessions, attached/detached histories, and pagination controls while retaining correct projections on newer hosts.
  • The 115-file tarball was installed in two isolated DSH 0.1.1-rc.2 Web profiles, native and with Web UI 0.3.9, using official Mnemon CLI 0.2.6. Both installations matched every packed file and imported all ten Node entries. Version 0.4.4, all four pages in Chinese and English, and Task Board round trips passed. A synthetic native conversation survived a browser reload with its history intact. No browser errors were observed; the Web UI's existing Host session/list warning remains. Tests used temporary data and a local model stub, without personal memory or paid model calls.

Rollback

Reinstall dsh-mnemon@0.4.3 in the same profile and restart it. No data conversion is needed, but older DSH hosts can encounter the session history failure again.

Previous release: v0.4.3.

Release PR #150 · Full changelog

发布后验证 / Post-publication verification

npm 发布流水线与合并后主线 CI均成功,包含 DSH alpha 源码兼容性验证;npm latest 已指向 0.4.4。下载正式 tarball 后,SHA-512 完整性及 registry SHA-1 校验均通过。

The npm publication workflow and merged-main CI both succeeded, including DSH alpha source compatibility. npm latest resolves to 0.4.4; the downloaded tarball passed its SHA-512 integrity and registry SHA-1 checks.

正式包有 115 个文件,其中 114 个与本地实测候选逐字节一致。client.js 只有 6 条 CSS 虚拟模块区域注释的构建路径不同;全部执行代码、CSS、声明和元数据保持一致。

The published package contains 115 files, of which 114 match the tested candidate byte-for-byte. Only six CSS virtual-module region comments in client.js use different build checkout paths; all executable code, CSS, declarations, and metadata match.

通过 registry 名称 dsh-mnemon@0.4.4 在全新隔离原生 DSH Web profile 安装后,115 个文件均与校验后的正式 tarball 完全一致;版本 0.4.4、四个主页面和全部 10 个 Node 公开入口均再次通过,浏览器错误为 0。候选产物的中英文、Web UI 0.3.9、会话历史重载和旧版接口对照结果见上文。

A fresh registry-name installation of dsh-mnemon@0.4.4 in an isolated native DSH Web profile matched all 115 verified tarball files. Version 0.4.4, all four main pages, and all ten public Node entries passed again, with zero browser errors. Candidate checks for both languages, Web UI 0.3.9, history after reload, and legacy HTTP compatibility are recorded above.

Registry tarball SHA-256: 8ddeca6524aeed0bcaf8d9060226ded86952379c5a15fefb34a8dd3ababe47b8.