Skip to content

Releases

v0.1.3 — 修复 @path 引用导致会话历史永久无法加载

Choose a tag to compare

@hatsuyuki0103 hatsuyuki0103 released this 10 Sep 07:40

v0.1.3 — 修复:@path 引用会让会话历史永久无法加载

这是一个必须升级的版本。 0.1.2 及更早版本只要用过一次 @ 引用,该会话的历史就再也打不开。

问题

插件注入的 user/message 把引用路径写进了 source:

{ "kind": "at-file-mention", "relative": "src/index.ts" }

MessageSourceMap 的「可合并扩展」只是类型层承诺。会话日志边界会逐键校验 source,而格式迁移是全有或全无的,所以一条坏消息就让整份会话产物被拒绝:

形状 拒绝原因
{ kind: 'at-file-mention', relative } at-file-mention 不是已登记的 source kind → cannot safely transform unclassified message source(在当前 v3 路径上同样拒绝)
{ kind: 'plugin', relative } 缺少 plugin 名且多出 relative → ... source has unexpected member "relative"

表现就是 GUI 报 历史加载失败:... cannot safely transform unclassified message source; source v0 artifact remains unchanged,并且 source v0 artifact remains unchanged —— 原文件不动,历史永远读不出来。

修复

改为注入 Harness 承认的形状:

{ "kind": "plugin", "plugin": "dsh-at-any" }
  • 删除自造的 at-file-mention 类型合并与 relative 成员。
  • 引用路径没有丢:它本来就完整存在于消息内容里 —— <workspace-reference path="…" kind="file|directory" />。
  • 新增回归用例:source 的键必须恰为 ['kind','plugin'],且序列化结果不得包含路径。

已经被写坏的会话怎么救

仅升级插件不会让已损坏的历史自动恢复(坏 source 已经落盘)。随包附带上修复工具:

node tools/repair-session-sources.mjs --self-test
node tools/repair-session-sources.mjs --check   ~/.dsh/sessions
node tools/repair-session-sources.mjs --dry-run ~/.dsh/sessions
node tools/repair-session-sources.mjs --apply   ~/.dsh/sessions

工具的保证:

  • 只改 source,其余一律不动;被引用的路径仍留在消息内容里;
  • 落盘前先写逐字节 sha256 校验的备份,再让真实迁移链校验重建结果,校验不过就保留原文件并报错退出;
  • 覆盖所有代际命名(session.jsonl 与 session.v<N>.jsonl,压缩或非压缩),并明确报出后端实际加载哪一代(旧的低代际文件可能就躺在正在使用的那份旁边);
  • 找不到 Harness 迁移目录时 fail closed(拒绝执行),而不是降级成无验证写入;确需覆盖请显式传 --no-validate;
  • --self-test 在临时目录用合成坏会话验证以上全部保证。

其它

  • README.md 安装命令与版本号更新到 v0.1.3(此前仍停留在 v0.1.0)。
  • dsh.plugin.json 版本号与 package.json 对齐(此前滞后于 0.1.1)。
  • tools/ 纳入包发布文件列表。

安装 / 升级(安装后需重启 dsh web):

dsh plugin --profile web add https://github.com/hatsuyuki0103/dsh-at-any/archive/refs/tags/v0.1.3.tar.gz

完整变更:v0.1.2...v0.1.3

v0.1.2 - dsh 0.1.2-rc.1 client API migration

Choose a tag to compare

@hatsuyuki0103 hatsuyuki0103 released this 07 Sep 06:38

Fixes the client half failing to load on dsh 0.1.2-rc.1: the old bundle required @deepseek-ai/dsh-client-runtime, which that release removed.

  • snapshot store now comes from @deepseek-ai/dsh-client-store (createSnapshotStore / SnapshotStore / ObservableSnapshot), served by the shell's static-module seed table
  • type faces migrated: SessionId -> @deepseek-ai/dsh-session/types, client Context -> @deepseek-ai/cordis, ISessions -> @deepseek-ai/dsh-api-session-controller/client; slot and standard-kit augmentations are now pulled in explicitly (ui-renderer, ui-session, ui-workspace)
  • opening a referenced file goes through the session/openWorkspacePath Remote namespace, replacing the removed connection.api.host.openPath channel
  • picker row icons narrowed to the 0.1.2 'file' | 'folder' | 'session' union
  • dev dependencies moved off stale 0.1.0-rc.7 workspace links onto npm 0.1.2-rc.1 packages; tsc --noEmit is green again
  • build.mjs runs tsc through node (Windows spawnSync cannot resolve the .bin shim)

Install (web profile): add "dsh-at-any": "file:/dsh-at-any" to dependencies and "dsh-at-any" to dsh.profile.bundles, run pnpm install, then restart dsh web.

v0.1.1 - bin/ dirs indexed (same-name files all visible)

Choose a tag to compare

@hatsuyuki0103 hatsuyuki0103 released this 18 Aug 03:18

Fix: removed �in from DEFAULT_IGNORE_DIRS - script dirs (bin/.sh, bin/.bat) are source, not build output; @ now shows every same-name file (e.g. both bin/run-.sh and sh/run-.sh).

v0.1.0 - @ all file formats, no truncation

Choose a tag to compare

@hatsuyuki0103 hatsuyuki0103 released this 17 Aug 13:23

Fork of dsh-at-file (MIT). Fixes the index truncation bug (default cap 5000 dropped .java/.vue files in large workspaces) and indexes every source format. Replaces dsh-at-file.