dsh-more 0.1.0 → 0.1.2
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 +13 -0
- package/README.md +26 -7
- package/README.zh-CN.md +40 -7
- package/cordis.patch.yml +2 -0
- package/dist/client.js +876 -303
- package/dist/fast-mode.js +34 -0
- package/dist/index.js +324 -35
- package/dist/types/generated/host-settings-schema.d.ts +21 -17
- package/dist/types/generated/patch-catalog.d.ts +16 -0
- package/dist/types/kernel/client/activation.d.ts +2 -2
- package/dist/types/kernel/host/activation.d.ts +1 -0
- package/dist/types/kernel/host/patch.d.ts +2 -0
- package/dist/types/kernel/host/settings.d.ts +7 -3
- package/dist/types/patches/fast-mode/client/index.d.ts +19 -0
- package/dist/types/patches/fast-mode/client/styles.d.ts +1 -0
- package/dist/types/patches/fast-mode/host/index.d.ts +26 -0
- package/dist/types/patches/fast-mode/host/settings.d.ts +6 -0
- package/dist/types/patches/fast-mode/shared.d.ts +17 -0
- package/dist/types/patches/model-capabilities/client/index.d.ts +1 -1
- package/dist/types/patches/projectless-tasks/client/adapter.d.ts +2 -3
- package/dist/types/patches/projectless-tasks/client/create-task.d.ts +2 -2
- package/dist/types/patches/projectless-tasks/client/groups.d.ts +2 -2
- package/dist/types/patches/projectless-tasks/client/new-session.d.ts +2 -1
- package/dist/types/patches/terminal-clipboard/client/clipboard.d.ts +5 -0
- package/dist/types/patches/terminal-clipboard/client/index.d.ts +2 -0
- package/dist/types/patches/terminal-clipboard/client/terminal.d.ts +17 -0
- package/dist/types/patches/terminal-clipboard/host/index.d.ts +2 -0
- package/dist/types/patches/terminal-clipboard/shared.d.ts +1 -0
- package/dist/types/platform/dsh/client/runtime.d.ts +20 -2
- package/dist/types/platform/dsh/client/session-menu.d.ts +10 -0
- package/dist/types/platform/dsh/client/settings.d.ts +15 -1
- package/dist/types/platform/dsh/identity.d.ts +1 -1
- package/docs/desktop-compatibility.md +158 -0
- package/dsh.plugin.json +2 -2
- package/package.json +72 -61
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
|
|
9
|
+
> **Compatibility:** the development/test baseline is DeepSeek Harness `0.2.1-rc.2`. All patches and existing peer ranges are preserved. Type, feature and isolated Host checks pass against the target RC; Windows path/build/script fixes are not a claim of Windows Desktop end-to-end verification. Node.js 24+ is recommended; the package engine also allows Node.js 22.19+.
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
@@ -16,6 +16,10 @@ Practical, independently switchable patches for missing context and history cont
|
|
|
16
16
|
| Delete one message | User- and assistant-message action rows | Removes the selected model-surface node, expands only when tool call/result pairing requires it, rebuilds the surviving context, and opens a child session | On |
|
|
17
17
|
| Permanently delete session | Separate item beside the native Archive action | Stops and unloads the target session, removes its exact JSONL persistence directory, detaches it from workspaces, and synchronizes the lists incrementally | On |
|
|
18
18
|
| Model capabilities | Settings → Models → Model capabilities | Configure image support, selectable thinking types and parameter formats per model | On |
|
|
19
|
+
| Fast mode | Composer toolbar and `/fast` | Toggle faster model service for the current session (may consume quota faster) | On |
|
|
20
|
+
| Markdown export | Conversation toolbar / More menu | Export messages and tool results with Windows-safe download filenames | On |
|
|
21
|
+
| Automatic titles | After the first request | Generate a title using the current model, preserving manual names | On |
|
|
22
|
+
| Independent tasks and grouping | Workspace picker / session menu | Create an independent task with its draft intact; group sessions without changing their working directories | On |
|
|
19
23
|
|
|
20
24
|
Patch switches live under **Settings → Plugins → Plugin configuration → DSH More** and take effect without rebuilding the plugin.
|
|
21
25
|
|
|
@@ -24,11 +28,24 @@ Patch switches live under **Settings → Plugins → Plugin configuration → DS
|
|
|
24
28
|
### Requirements
|
|
25
29
|
|
|
26
30
|
- Node.js `>= 24`
|
|
27
|
-
- A working `dsh` CLI and a Web profile
|
|
31
|
+
- A working `dsh` CLI and a Web or Desktop profile on DeepSeek Harness `0.2.1-rc.2`
|
|
28
32
|
- Access to the npm registry that publishes `dsh-more`
|
|
29
33
|
|
|
30
34
|
pnpm is needed only when installing or developing from source. For a published release, use the DSH plugin command so the package is installed into the selected DSH profile; do not install it globally with `npm install -g`.
|
|
31
35
|
|
|
36
|
+
### Windows: install this unreleased fix
|
|
37
|
+
|
|
38
|
+
The existing npm release is not this working-tree fix. Build a tarball with `pnpm install --frozen-lockfile`, `pnpm run check`, `pnpm run test:runtime`, then `npm pack`, or copy the resulting tarball from another machine.
|
|
39
|
+
|
|
40
|
+
For Desktop, initialize the app once, fully quit it, and use the **Desktop-supplied `dsh` command** (verify `Get-Command dsh` and `dsh --version`) to run:
|
|
41
|
+
|
|
42
|
+
```powershell
|
|
43
|
+
dsh plugin --profile desktop add "C:\Downloads\dsh-more-0.1.1.tgz"
|
|
44
|
+
dsh plugin --profile desktop list dsh-more --depth 0
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The generic npm CLI rejects the reserved Desktop profile; use the installed Desktop carrier instead of replacing its profile. For a browser Web service, use `--profile web` and restart the original `dsh web`. Web and Desktop profiles are separate. Reopen Desktop / reload the browser and check all DSH More switches. Quote paths containing spaces or non-ASCII characters. Windows Desktop manual acceptance is still required; see the [compatibility record](./docs/desktop-compatibility.md).
|
|
48
|
+
|
|
32
49
|
### Install the latest release from npm
|
|
33
50
|
|
|
34
51
|
```sh
|
|
@@ -235,14 +252,14 @@ Generated source, `dist/`, and tarballs are not committed. `prepack` runs the co
|
|
|
235
252
|
|
|
236
253
|
### Dependency updates
|
|
237
254
|
|
|
238
|
-
`package.json`
|
|
255
|
+
`package.json` declares compatible Host peer ranges, but pins the DSH development SDK to `0.2.1-rc.2` (with Cordis 4.0.5, Schemastery 3.18.5 and Zod 4.4.3). `pnpm-lock.yaml` preserves the verified graph. When changing the SDK baseline, update these pins together, reinstall, and validate:
|
|
239
256
|
|
|
240
257
|
```sh
|
|
241
258
|
pnpm update
|
|
242
259
|
pnpm run check
|
|
243
260
|
```
|
|
244
261
|
|
|
245
|
-
|
|
262
|
+
DSH Host peers use `^0.1.5-rc.2 || ^0.2.0-rc.2 || ^0.2.1-alpha.5`. The `^0.2.1-alpha.5` range includes `0.2.1-rc.2` on the same version tuple, without bypassing compatibility checks. Prereleases on other version tuples still require verification.
|
|
246
263
|
|
|
247
264
|
### Verification scope
|
|
248
265
|
|
|
@@ -252,13 +269,15 @@ The repository does not currently contain a full browser end-to-end suite agains
|
|
|
252
269
|
|
|
253
270
|
## Compatibility notes
|
|
254
271
|
|
|
255
|
-
|
|
272
|
+
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.
|
|
273
|
+
|
|
274
|
+
Development uses the pinned `0.2.1-rc.2` SDK; Host peer ranges preserve existing RC/alpha compatibility. The removed `webRuntime` service is no longer required; requests use the authenticated Connection Fetch registry. Settings adapters support ConfigForms/SettingsForms and the previous APIs. 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
275
|
|
|
257
|
-
- The current
|
|
276
|
+
- The current test baseline is DSH `0.2.1-rc.2`; future pre-release API or DOM changes can require adapter updates. Run `pnpm run test:runtime` for isolated RC Host integration checks (temporary profile and fake model; no user history or credentials).
|
|
258
277
|
- In-product DSH More copy is currently primarily Simplified Chinese, although native Copy/Archive selectors recognize both Chinese and English labels.
|
|
259
278
|
- 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
279
|
- 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.
|
|
280
|
+
- 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
281
|
|
|
263
282
|
## License
|
|
264
283
|
|
package/README.zh-CN.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
`dsh-more` 不创建平行的“管理中心”,而是把能力直接嵌入 DSH 现有界面。当前补丁可以编辑用户消息并从该处重新开始、在保留前后上下文的前提下删除单条消息,以及在不改变原生归档语义的情况下永久删除会话。
|
|
8
8
|
|
|
9
|
-
> **兼容性:**
|
|
9
|
+
> **兼容性:** 开发与测试基线为 DeepSeek Harness `0.2.1-rc.2`。保留全部补丁及已有 peer 兼容范围,已通过目标 RC 的类型、功能和隔离 Host 验收;Windows 路径、构建与脚本兼容修复不等同于 Windows Desktop 实机逐项验收。推荐 Node.js 24+;包引擎也允许 Node.js 22.19+。
|
|
10
10
|
|
|
11
11
|
## 功能概览
|
|
12
12
|
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
| 单条消息删除 | 用户和助手消息操作区 | 删除所选 model-surface 节点;只有工具调用/结果配对需要时才扩大范围;重建存活上下文并打开子会话 | 开启 |
|
|
17
17
|
| 永久删除会话 | 原生“归档会话”旁的独立菜单项 | 停止并卸载目标会话,移除其精确 JSONL 持久化目录,从 Workspace 脱离并增量同步列表 | 开启 |
|
|
18
18
|
| 模型能力配置 | 设置 → 模型 → 模型能力 | 按模型配置识图、可选思考类型及接口参数格式,不自动猜测能力 | 开启 |
|
|
19
|
+
| 加速 | 输入框工具栏与 `/fast` 命令 | 开关当前会话的加速。响应更快,但会更快消耗额度 | 开启 |
|
|
20
|
+
| Markdown 导出 | 会话工具栏 / 更多操作 | 导出消息与工具结果,下载文件名兼容 Windows | 开启 |
|
|
21
|
+
| 自动标题 | 新会话首次需求后 | 用当前模型生成标题,保留手动命名 | 开启 |
|
|
22
|
+
| 独立任务与手动归组 | 工作区下拉框 / 会话菜单 | 保留草稿创建独立任务;归组不改变工作目录 | 开启 |
|
|
19
23
|
|
|
20
24
|
补丁开关位于 **设置 → 插件 → 插件配置 → DSH More**,修改后实时生效,无需重新构建插件。
|
|
21
25
|
|
|
@@ -24,11 +28,38 @@
|
|
|
24
28
|
### 环境要求
|
|
25
29
|
|
|
26
30
|
- Node.js `>= 24`
|
|
27
|
-
- 可正常使用的 `dsh` CLI
|
|
31
|
+
- 可正常使用的 `dsh` CLI,以及 DeepSeek Harness `0.2.1-rc.2` 的 Web 或 Desktop profile
|
|
28
32
|
- 能访问发布 `dsh-more` 的 npm registry
|
|
29
33
|
|
|
30
34
|
只有从源码安装或参与开发时才需要 pnpm。安装已发布版本时,应通过 DSH 插件命令把包加入指定 profile;不要使用 `npm install -g` 全局安装。
|
|
31
35
|
|
|
36
|
+
### Windows 安装本次修复(尚未发布到 npm)
|
|
37
|
+
|
|
38
|
+
不要把 npm 上的旧包当成本次修复版。可将本仓库构建的 `dsh-more-0.1.1.tgz` 复制到 Windows 后安装;也可在 Windows 源码目录执行:
|
|
39
|
+
|
|
40
|
+
```powershell
|
|
41
|
+
node --version
|
|
42
|
+
pnpm install --frozen-lockfile
|
|
43
|
+
pnpm run check
|
|
44
|
+
pnpm run test:runtime
|
|
45
|
+
npm pack
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- **桌面应用**:先启动 Desktop 一次完成初始化,再完整退出。使用 **Desktop 安装附带的 `dsh` 命令**,确认 `dsh --version` 为 `0.2.1-rc.2`,然后安装到 `desktop` profile:
|
|
49
|
+
|
|
50
|
+
```powershell
|
|
51
|
+
Get-Command dsh | Select-Object Source
|
|
52
|
+
dsh --version
|
|
53
|
+
dsh plugin --profile desktop add "C:\Downloads\dsh-more-0.1.1.tgz"
|
|
54
|
+
dsh plugin --profile desktop list dsh-more --depth 0
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
若提示 desktop 由 Electron 专属管理,说明调用的是 npm 安装的通用 CLI,而非 Desktop 的配套命令;请切换命令来源,不要重建或覆盖 Desktop profile。
|
|
58
|
+
|
|
59
|
+
- **浏览器 Web 服务**:改用 `dsh plugin --profile web add "C:\Downloads\dsh-more-0.1.1.tgz"`,之后重启原来的 `dsh web`。
|
|
60
|
+
|
|
61
|
+
安装后重新打开 Desktop / 刷新 Web 页面,在 **设置 → 插件 → 插件配置 → DSH More** 确认所有补丁开关。Web 与 Desktop 是不同 profile,安装到 web 不会自动影响桌面应用。路径含空格或中文时务必加引号。本次没有修改用户 DSH 安装或会话,也没有发布 npm;Windows 实机逐项验收仍需执行,见[兼容记录](./docs/desktop-compatibility.md)。
|
|
62
|
+
|
|
32
63
|
### 从 npm 安装最新版
|
|
33
64
|
|
|
34
65
|
```sh
|
|
@@ -235,14 +266,14 @@ pnpm run package # 构建并生成 npm tarball
|
|
|
235
266
|
|
|
236
267
|
### 依赖更新
|
|
237
268
|
|
|
238
|
-
`package.json`
|
|
269
|
+
`package.json` 的宿主 peer 使用兼容范围;DSH 开发 SDK 则固定为 `0.2.1-rc.2`,并同步固定 Cordis 4.0.5、Schemastery 3.18.5 与 Zod 4.4.3,避免不同版本类型混用。`pnpm-lock.yaml` 保留已验证依赖图。更换 SDK 基线时应一起更新这些固定版本,重新安装并验证:
|
|
239
270
|
|
|
240
271
|
```sh
|
|
241
272
|
pnpm update
|
|
242
273
|
pnpm run check
|
|
243
274
|
```
|
|
244
275
|
|
|
245
|
-
DSH
|
|
276
|
+
宿主 DSH peer 使用 `^0.1.5-rc.2 || ^0.2.0-rc.2 || ^0.2.1-alpha.5`。其中 `^0.2.1-alpha.5` 包含同一版本基线的 `0.2.1-rc.2`,不需要禁用版本检查;不同版本基线的预发布版仍需重新验证。
|
|
246
277
|
|
|
247
278
|
### 验证范围
|
|
248
279
|
|
|
@@ -252,13 +283,15 @@ DSH 的 `^0.1.5-rc.2` 接受后续 `0.1.x` 正式版本和 `0.1.5` 的更新 RC
|
|
|
252
283
|
|
|
253
284
|
## 兼容性说明
|
|
254
285
|
|
|
255
|
-
|
|
286
|
+
官方 macOS 桌面端 `0.1.7-rc.2` 的实际窗口验证记录见 [桌面端兼容检查](./docs/desktop-compatibility.md)。新版使用 `uiWorkspace.openSession()` 导航,以 `retainedBy.mainView` 识别当前会话;创建后通过临时 Session reference 等待草稿可用,完成交接后释放。独立任务、消息编辑/删除后的跳转和当前会话删除共用该适配。
|
|
287
|
+
|
|
288
|
+
开发 SDK 固定在 `0.2.1-rc.2`;宿主 peer 保留已有 RC/alpha 兼容范围。插件不再强依赖已移除的 `webRuntime`,请求走受认证的 Connection Fetch registry;设置层同时兼容 ConfigForms/SettingsForms 与旧接口。已适配新版会话格式、消息来源字段、`main.conversation` 插槽,以及 JSONL 后端的持久化快照和定位能力。已有本地链接安装在重新构建后,需要重启 DSH 并刷新页面以加载新的 Host 和 Client。
|
|
256
289
|
|
|
257
|
-
-
|
|
290
|
+
- 当前测试基线为 DSH `0.2.1-rc.2`;后续预发布 API 或 DOM 变化仍可能要求更新 adapter。`pnpm run test:runtime` 会用临时 profile 和模型替身运行隔离 RC Host 验收,不使用用户历史或密钥。
|
|
258
291
|
- DSH More 的产品内文案目前以简体中文为主;对 DSH 原生 Copy/Archive 元素的定位同时识别中英文标签。
|
|
259
292
|
- 消息操作只面向仍在当前 model surface 中的普通用户消息和助手消息;编辑要求所属轮次已经完成。
|
|
260
293
|
- 永久删除只支持提供有效定位能力的 `jsonl` 后端;当前后端的 `locate` 为内部接口,调用前会检查能力及返回值,测试覆盖普通和 Zstandard 压缩会话文件。
|
|
261
|
-
- 卸载实时会话时使用插件追踪到的公开 Agent handle
|
|
294
|
+
- 卸载实时会话时使用插件追踪到的公开 Agent handle。被动句柄跟踪覆盖整个插件生命周期,开关关闭期间创建的会话也可在重新开启后安全删除,且不会改变调用者的 Cordis 资源所有权。若会话在插件加载前就已持有未被观察到的写入句柄,仍会拒绝删除并提示重启 DSH,避免遗留写入锁。
|
|
262
295
|
|
|
263
296
|
## 许可证
|
|
264
297
|
|