Skip to content

v0.2.1

Latest

Choose a tag to compare

@S2thend S2thend released this 27 Aug 21:53
· 2 commits to main since this release

v0.2.1

Changed

The snapshot engine moves to filesnap 0.4.0.
Its new capture --declared-window <TURNS|unlimited> bounds how long a path the edit
API declared keeps being scanned after the turn that declared it. This plugin passes
nothing and keeps the engine's default of 99 turns, so captures cover what they
covered before.

A 0.x minor means "breaking", so the contract was diffed rather than trusted:

  • every subcommand this plugin drives — capture, declare, log, restore,
    undo, status — is unchanged but for that one added optional flag;
  • the JSON Lines envelope is still v: 1;
  • 0.4.0 reads a store written by 0.3.1 — the same turns come back with the same
    manifest hashes. Existing rewind points survive the upgrade.

The client manifest names packages that exist. dsh.client.inject still listed
@deepseek-ai/dsh-client-runtime, which the harness removed, and did not name what
actually carries the services this plugin injects — ctx.slots from
dsh-client-ui-renderer, ctx.sessions from dsh-api-session-controller.

This is a correction, not a repair, and that was checked before it was claimed: with
the 0.2.0 manifest, on a harness that has none of that package, the browser half still
loads. 0.2.0 is not broken in the field. What this fixes is a declaration that was
quietly false, and would stop being harmless the day the loader gets stricter.

Added

  • Compared with the other dsh rewind plugins
    — eight plugins across two grids, every claim checked against the published package,
    with the three ways a rewind can lose your work called out first.
  • What happens if the rewind itself is interrupted — the axis none of those grids
    covers. A restore here deletes only against a tombstone, so "I could not read it"
    never becomes "it was not there"; the rescue point exists before the first byte
    lands; the store is outside your project; and a turn whose capture failed is absent
    from the list rather than listed and refused on use.
  • A roadmap, and a
    note where the argument is made that gc, delete and doctor are engine commands
    this plugin does not expose yet — with the invocation that works today.
  • CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, and issue and pull-request templates.
    Issues and pull requests are welcome.

Fixed — development only

The harness moved on: resolveSessionPreset is gone, sessionProjections.restore
takes the session header as a fourth argument, and the chat slots split into
packages/client/ui-chat while ctx.slots moved to packages/client/ui-renderer.
Building against a current harness works again, and harness:link now says which
failure it hit — a package the harness removed is not a checkout you forgot to build,
and reporting both the same way sent this project's CI looking in the wrong place.

None of this changes what the published plugin does at runtime. The imports that
follow the split are type-only, and both slot names it registers into exist on either
side of it.


变更

快照引擎升级到 filesnap 0.4.0
它新增的 capture --declared-window <TURNS|unlimited> 用来限定:一个由编辑 API 声明过
的路径,在最后一次声明它的那一轮之后还会被扫描多久。本插件不传这个参数,沿用引擎默认的
99 轮,所以捕获范围和之前一致。

0.x 的 minor 意味着"破坏性",所以契约是逐项对过的,不是默认它兼容:

  • 插件驱动的六个子命令 —— capturedeclarelogrestoreundostatus
    —— 除那一个新增的可选参数外完全没变;
  • JSON Lines 信封仍然是 v: 1;
  • 0.4.0 能读 0.3.1 写下的 store —— 同样的轮次回来了,manifest 哈希也一样。
    已有的回退点不会因为升级而失效。

客户端 manifest 现在只写真实存在的包。 dsh.client.inject 里还留着
@deepseek-ai/dsh-client-runtime(已被 harness 删除),却没写出真正提供所需服务的那两个
—— ctx.slots 来自 dsh-client-ui-renderer,ctx.sessions 来自
dsh-api-session-controller

这是订正,不是修复,而且是先验证再下结论的:用 0.2.0 的 manifest、在一个根本没有那个
包的 harness 上,浏览器那半照样加载。0.2.0 在线上没有坏。 这次改掉的是一处悄悄失真的
声明 —— 等哪天加载器变严格,它就不再无害了。

新增

  • 和其他 dsh rewind 插件的对比
    —— 八个插件、两张表格,每一条都对着已发布的包核实过,并把"会让你丢工作"的三种情况放在
    最前面。
  • 如果回退过程本身被中断 —— 那两张表都没覆盖的维度。这里的还原只在有 tombstone 授权
    时才删文件,所以"读不到"永远不等于"它不存在";救援点在第一个字节落盘之前就已存在;存储
    不在你的项目里;捕获失败的那一轮根本不出现在列表里,而不是列出来、点了再报错。
  • 路线图,
    以及在论证发生的地方直接说明:gcdeletedoctor 是引擎的命令,插件还没暴露出来
    —— 并给出今天就能用的调用方式。
  • CONTRIBUTINGCODE_OF_CONDUCTSECURITY,以及 issue 与 PR 模板。欢迎提
    issue 和 PR。

修复 —— 仅影响开发

harness 往前走了:resolveSessionPreset 没了,sessionProjections.restore 多了第四个
参数(会话 header),chat slots 拆进了 packages/client/ui-chat,ctx.slots 挪到了
packages/client/ui-renderer。现在对着新版 harness 能正常构建了;并且 harness:link
会说清楚到底是哪一种失败 —— "harness 删掉了这个包"和"你忘了构建"是两回事,把它们报成
同一句话,曾把本项目的 CI 指向了错误的方向。

这些都不改变已发布插件的运行时行为。 跟随拆分而调整的 import 全是 type-only,而插件
注册的两个 slot 名在拆分前后都存在。

Full Changelog: v0.2.0...v0.2.1