Skip to content

v0.4.6: DSH Session event API compatibility

Choose a tag to compare

@Grivn Grivn released this 02 Sep 17:08
b2b589e

中文

v0.4.6 修复 DSH 0.1.2-alpha.4 新会话出现的 agent.session.events is not iterable 错误,同时覆盖最新 alpha.5 接口,并继续以 DSH 0.1.1-rc.2 作为稳定、推荐的基线。Issue #156、PR #159。

修复

  • Session 事件读取现在检测能力而非版本字符串。稳定版 DSH 0.1.1-rc.2 继续使用 events[];DSH 0.1.2-alpha.4 与 alpha.5 使用 snapshotEvents() 和 eventAt()。
  • 生命周期回放、回合检测与子 Agent 诊断共用同一兼容层,使完整读取与索引读取在受支持版本上遵循同一份持久历史契约。
  • 遇到未知的未来 Session 形态时会明确失败,不会静默地把持久历史当作空数据。

升级与兼容性

在所属 DSH profile 中安装 dsh-mnemon@0.4.6,然后重启。DSH 0.1.1-rc.2 仍是稳定的 registry 基线与推荐安装目标;DSH 0.1.2-alpha.4 和最新 alpha.5 是预览兼容目标。兼容路径依据 Session 实际提供的能力选择,不依赖预发布版本标签。

记忆数据、存储路径、Pack 格式、Provider 凭据、RPC 权限、设置、生产依赖和会话投影状态均不变,无需迁移或删除缓存。v0.4.4 的投影兼容性与 v0.4.5 的 Better Sidebar 集成保持不变;本补丁不包含无关的 v0.5 开发内容。

验证

  • 实现与发布候选在 Node 24.18.0 与 pnpm 10.13.1 下通过完整 pnpm run verify:654 项测试通过,1 项 Windows 专用测试在 macOS 跳过。110 个构建文件的确定性检查、Headless 激活、10 个 Node 兼容公开入口、117 个文件的包内容、publint 和 attw 均通过。
  • PR #159、发布 PR #160 与合并后主线的 Linux Node 22.19/24、Windows Node 24 与源码链接 DSH 0.1.2-alpha.5 CI 任务全部通过。
  • 隔离的真实 WebUI profile 先在 DSH alpha.4 与已发布 Mnemon 0.4.4 上复现错误,再使用本修复分别在 alpha.4、alpha.5 与稳定 rc.2 上完成合成会话。三个修复后场景的浏览器控制台均为 0 个 error、0 个 warning,Host 日志也没有 error、warn 或 not iterable 匹配。详见环境记录与截图。

回滚

在同一 profile 中重新安装 dsh-mnemon@0.4.5 并重启,无需转换数据。在 DSH 0.1.2-alpha.4 或 alpha.5 上回滚后,原 Session 接口错误可能再次出现;如需继续对话,应同时将 DSH 恢复为稳定的 0.1.1-rc.2。

上一版:v0.4.5。

English

v0.4.6 fixes new conversations that fail with agent.session.events is not iterable on DSH 0.1.2-alpha.4. It also covers the latest alpha.5 API while retaining DSH 0.1.1-rc.2 as the stable, recommended baseline. Issue #156, PR #159.

Fixes

  • Session event reads now use capability detection instead of version strings. Stable DSH 0.1.1-rc.2 continues to use events[]; DSH 0.1.2-alpha.4 and alpha.5 use snapshotEvents() and eventAt().
  • Lifecycle replay, turn detection, and subagent diagnostics share the same compatibility layer, so complete and indexed durable history follow one contract across the supported releases.
  • An unknown future Session shape fails explicitly instead of silently treating durable history as empty.

Upgrade and compatibility

Install dsh-mnemon@0.4.6 in the owning DSH profile and restart it. DSH 0.1.1-rc.2 remains the stable registry baseline and recommended installation target. DSH 0.1.2-alpha.4 and the latest alpha.5 are preview compatibility targets; support is selected by the available Session capabilities rather than prerelease labels.

Memory data, storage paths, Pack formats, Provider credentials, RPC authority, settings, production dependencies, and session projection state are unchanged. No migration or cache deletion is required. The v0.4.4 projection compatibility and v0.4.5 Better Sidebar integration remain intact, and this patch contains no unrelated v0.5 development work.

Verification

  • The implementation and release candidate passed complete pnpm run verify on Node 24.18.0 with pnpm 10.13.1: 654 tests passed and one Windows-only test was skipped on macOS. All 110 deterministic build files, Headless activation, all ten Node-compatible public entries, the 117-file package contents, publint, and attw passed.
  • PR #159, release PR #160, and merged-main CI all passed Linux Node 22.19/24, Windows Node 24, and source-linked DSH 0.1.2-alpha.5 jobs.
  • Isolated real WebUI profiles reproduced the failure with published Mnemon 0.4.4 on DSH alpha.4, then completed synthetic conversations with this fix on alpha.4, alpha.5, and stable rc.2. All three corrected runs reported zero browser-console errors and warnings, and their Host logs contained no error, warn, or not iterable matches. See the environment record and screenshots.

Rollback

Reinstall dsh-mnemon@0.4.5 in the same profile and restart it. No data conversion is needed. On DSH 0.1.2-alpha.4 or alpha.5, the original Session API error can return after that rollback; return DSH to stable 0.1.1-rc.2 as well if continued conversations are required.

Previous release: v0.4.5.

Release PR #160 · Full changelog

发布后验证 / Post-publication verification

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

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

正式包包含 117 个文件,其中 116 个与本地已验证候选逐字节一致。仅 client.js 的 6 条 CSS 虚拟模块 region 注释使用了不同的构建根路径;归一化路径后整文件完全一致,全部执行代码、CSS、声明和元数据保持一致。

The published package contains 117 files, of which 116 match the locally verified candidate byte-for-byte. Only six CSS virtual-module region comments in client.js use a different build-root path; the complete file matches after path normalization, with all executable code, CSS, declarations, and metadata unchanged.

通过 registry 名称在全新隔离目录安装 dsh-mnemon@0.4.6 后,版本正确,全部 10 个 Node 兼容公开入口均成功导入。此前保留的稳定 rc.2、alpha.4 与 alpha.5 WebUI 场景及截图对应的候选执行内容已由上述逐文件对照覆盖。

A fresh registry-name installation of dsh-mnemon@0.4.6 reported the correct version and imported all ten Node-compatible public entries. The executable candidate covered by the preserved stable rc.2, alpha.4, and alpha.5 WebUI scenarios and screenshots is accounted for by the file comparison above.

Registry tarball SHA-256: 7c3fe374313998a00966b67e327a1c2730eac7f48f8a09ff95716da64ca17c11.