dsh-more 0.1.0 → 0.1.1

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/CONTRIBUTING.md CHANGED
@@ -270,6 +270,19 @@ pnpm run check
270
270
  pnpm run package:check
271
271
  ```
272
272
 
273
+ 适配官方 macOS 桌面端时,另外运行已安装桌面包的真实运行时检查:
274
+
275
+ ```sh
276
+ pnpm run test:desktop
277
+ DSH_MORE_DESKTOP_ASAR='/Applications/DeepSeek Harness.app/Contents/Resources/app.asar' pnpm exec vitest run src/patches/projectless-tasks/native-factory.test.tsx
278
+ ```
279
+
280
+ `test:desktop` 默认使用 `/Applications/DeepSeek Harness.app`,可通过 `DSH_MORE_DESKTOP_APP` 指定其他安装位置。它在临时 `DSH_HOME` 中启动安装包自带的 Host,用本地模型替身验证导出内容、编辑后续跑、删除消息后重建、分组持久化、会话物理删除、模型能力保存与冲突处理、标题中间件。不会读取用户 profile、调用外部模型或修改用户会话。该检查验证真实 SDK 与后端行为;发布前仍应重载实际桌面窗口,验证功能入口、弹窗、导航和文件下载。
281
+
282
+ DSH 0.1.7 的会话菜单提供 `sidebar.workspaces.session.menu.item`。优先通过共享 `platform/dsh/client/session-menu.tsx` 注册动作,直接使用该行的 `sessionId`;不要用点击原生归档按钮来获取目标会话。新版原生归档回调由菜单子插槽独立注入,且菜单包含快捷键文本,旧的父组件拦截与整行文字匹配不再可靠。旧版 DSH 才使用原有 DOM 适配。
283
+
284
+ 只有需要跨补丁开关保留的被动生命周期信息,才使用 HostPatch 的 `observe()`;其 disposer 在整个插件卸载时执行。例如永久删除必须跟踪补丁关闭期间创建的 Agent 句柄,才能在重新开启后安全释放写入锁。实际用户操作仍由 `setup()` 和启用状态控制的 API 执行。方法包装必须保留调用者的 `this`,避免改变 Cordis 的资源所属作用域。
285
+
273
286
  说明:
274
287
 
275
288
  - `build`、`typecheck` 和 `test` 都会自动运行生成器;
package/README.md CHANGED
@@ -6,7 +6,7 @@ Practical, independently switchable patches for missing context and history cont
6
6
 
7
7
  `dsh-more` integrates with the existing DSH interface instead of adding a separate management dashboard. Its current patch set can edit a user message and restart from that point, remove one message while preserving the surrounding context, and permanently delete a session while leaving native archive behavior intact.
8
8
 
9
- > **Compatibility:** the current release targets DeepSeek Harness `0.1.5-rc.2` and requires Node.js `>= 24`. DSH is still a release candidate, so upgrades may require changes in the centralized adapter layer described below.
9
+ > **Compatibility:** development dependencies target DeepSeek Harness `0.1.5-rc.2` and require Node.js `>= 24`. The current source has also been verified in a local linked installation of the official macOS desktop `0.1.7-rc.2`. DSH is still a release candidate, so upgrades may require adapter changes.
10
10
 
11
11
  ## Features
12
12
 
@@ -252,13 +252,15 @@ The repository does not currently contain a full browser end-to-end suite agains
252
252
 
253
253
  ## Compatibility notes
254
254
 
255
+ See the [desktop verification record](./docs/desktop-compatibility.md) for the actual macOS `0.1.7-rc.2` window checks. The desktop adapter navigates through `uiWorkspace.openSession()`, reads current selection from `retainedBy.mainView`, and temporarily retains newly created Sessions until their drafts can be transferred. Independent tasks, edit/delete handoffs, and current-session deletion share this adapter.
256
+
255
257
  Development and host dependency ranges use `^0.1.5-rc.2`; the lockfile records the versions currently verified. The adapters and tests cover the current session format, message provenance, `main.conversation` slot, and JSONL persistence snapshots and location capability. For an existing local linked install, rebuild, restart DSH, and reload the page to load both the new Host and Client.
256
258
 
257
259
  - The current dependency set targets DSH `0.1.5-rc.2`; pre-release API or DOM changes can require adapter updates.
258
260
  - In-product DSH More copy is currently primarily Simplified Chinese, although native Copy/Archive selectors recognize both Chinese and English labels.
259
261
  - Message actions operate only on ordinary user messages and assistant messages still present in the current model surface; editing requires a completed owning turn.
260
262
  - Permanent deletion requires a `jsonl` backend with a valid location capability. Its current `locate` hook is internal; the adapter checks its presence and result. Tests cover plain and Zstandard-compressed session files.
261
- - Unloading a live session uses tracked public Agent handles. With handle-based persistence, deletion refuses an already-live session whose Agent handle was not tracked and asks for a DSH restart, preserving write ownership and file locks.
263
+ - Unloading a live session uses tracked public Agent handles. Passive tracking spans the plugin lifetime, including periods when deletion is disabled, and preserves the caller's Cordis ownership. A live writer that predates the plugin's observation is still refused with a restart instruction, preserving write ownership and file locks.
262
264
 
263
265
  ## License
264
266
 
package/README.zh-CN.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  `dsh-more` 不创建平行的“管理中心”,而是把能力直接嵌入 DSH 现有界面。当前补丁可以编辑用户消息并从该处重新开始、在保留前后上下文的前提下删除单条消息,以及在不改变原生归档语义的情况下永久删除会话。
8
8
 
9
- > **兼容性:** 当前发布面向 DeepSeek Harness `0.1.5-rc.2`,要求 Node.js `>= 24`。DSH 仍是 RC 版本,升级后可能需要调整下文所述的集中适配层。
9
+ > **兼容性:** 开发依赖基线为 DeepSeek Harness `0.1.5-rc.2`,要求 Node.js `>= 24`。当前源码也已在官方 macOS 桌面端 `0.1.7-rc.2` 本地链接安装中验证。DSH 仍是 RC 版本,升级后可能需要调整集中适配层。
10
10
 
11
11
  ## 功能概览
12
12
 
@@ -16,6 +16,7 @@
16
16
  | 单条消息删除 | 用户和助手消息操作区 | 删除所选 model-surface 节点;只有工具调用/结果配对需要时才扩大范围;重建存活上下文并打开子会话 | 开启 |
17
17
  | 永久删除会话 | 原生“归档会话”旁的独立菜单项 | 停止并卸载目标会话,移除其精确 JSONL 持久化目录,从 Workspace 脱离并增量同步列表 | 开启 |
18
18
  | 模型能力配置 | 设置 → 模型 → 模型能力 | 按模型配置识图、可选思考类型及接口参数格式,不自动猜测能力 | 开启 |
19
+ | 加速 | 输入框工具栏与 `/fast` 命令 | 开关当前会话的加速。响应更快,但会更快消耗额度 | 开启 |
19
20
 
20
21
  补丁开关位于 **设置 → 插件 → 插件配置 → DSH More**,修改后实时生效,无需重新构建插件。
21
22
 
@@ -252,13 +253,15 @@ DSH 的 `^0.1.5-rc.2` 接受后续 `0.1.x` 正式版本和 `0.1.5` 的更新 RC
252
253
 
253
254
  ## 兼容性说明
254
255
 
256
+ 官方 macOS 桌面端 `0.1.7-rc.2` 的实际窗口验证记录见 [桌面端兼容检查](./docs/desktop-compatibility.md)。新版使用 `uiWorkspace.openSession()` 导航,以 `retainedBy.mainView` 识别当前会话;创建后通过临时 Session reference 等待草稿可用,完成交接后释放。独立任务、消息编辑/删除后的跳转和当前会话删除共用该适配。
257
+
255
258
  开发与宿主依赖统一使用 `^0.1.5-rc.2`,锁文件记录当前已验证版本。已适配新版会话格式、消息来源字段、`main.conversation` 插槽,以及 JSONL 后端的持久化快照和定位能力。已有本地链接安装在重新构建后,需要重启 DSH 并刷新页面以加载新的 Host 和 Client。
256
259
 
257
260
  - 当前依赖面向 DSH `0.1.5-rc.2`;预发布 API 或 DOM 变化可能要求更新 adapter。
258
261
  - DSH More 的产品内文案目前以简体中文为主;对 DSH 原生 Copy/Archive 元素的定位同时识别中英文标签。
259
262
  - 消息操作只面向仍在当前 model surface 中的普通用户消息和助手消息;编辑要求所属轮次已经完成。
260
263
  - 永久删除只支持提供有效定位能力的 `jsonl` 后端;当前后端的 `locate` 为内部接口,调用前会检查能力及返回值,测试覆盖普通和 Zstandard 压缩会话文件。
261
- - 卸载实时会话时使用插件追踪到的公开 Agent handle。新版持久化后端仍持有写入句柄、但插件未追踪到对应 Agent handle 时,会拒绝删除并提示重启 DSH,避免遗留写入锁。
264
+ - 卸载实时会话时使用插件追踪到的公开 Agent handle。被动句柄跟踪覆盖整个插件生命周期,开关关闭期间创建的会话也可在重新开启后安全删除,且不会改变调用者的 Cordis 资源所有权。若会话在插件加载前就已持有未被观察到的写入句柄,仍会拒绝删除并提示重启 DSH,避免遗留写入锁。
262
265
 
263
266
  ## 许可证
264
267