dsh-deep-ptc-mode 1.8.7 → 1.8.8
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/CHANGELOG.md +16 -0
- package/README.md +15 -17
- package/README.zh.md +16 -18
- package/TEST_REPORT.md +3 -0
- package/lib/ask-user.mjs +6 -1
- package/lib/client.js +164 -41
- package/lib/executor.mjs +2 -47
- package/lib/index.mjs +2 -2
- package/lib/mapped-shell.mjs +39 -0
- package/lib/official-names.mjs +34 -14
- package/lib/preset-compat.mjs +128 -65
- package/lib/reachable.mjs +20 -4
- package/lib/rules.mjs +4 -3
- package/lib/sleep-lint.mjs +37 -4
- package/lib/tool-catalog.mjs +49 -15
- package/lib/tool-policy.mjs +78 -28
- package/lib/upstream.mjs +10 -5
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.8.8 — 2026-11-10
|
|
4
|
+
|
|
5
|
+
- 模式选择器、会话模式标签、设置页、侧栏和命令面板随 DSH 的语言设置切换中英文。切换语言会保留当前预设选择和未保存的表单输入。
|
|
6
|
+
- 第三方插件通过同一套两层规则识别预设。适配优先使用 `deep-ptc`,需要兼容时默认返回 `ptc` 别名。DSH 仍实际挂载 `deep-ptc`。探测现在覆盖 `dist`,忽略注释和无关比较,并在插件升级后刷新。
|
|
7
|
+
- 工具隔离要求错误消息明确标注 HTTP 状态。带 `ERR_MODULE_NOT_FOUND` 或 `MODULE_NOT_FOUND` 的模块加载失败会立即隔离,工具内部缺陷累计三次才隔离。
|
|
8
|
+
- PowerShell 等待检测识别真正的 `Start-Job` 和 `Start-ThreadJob` 脚本块,继续检查同一条命令里的前台等待。
|
|
9
|
+
- `ask_user_question` 要求正数超时。若宿主提问记录为空或结构不兼容,保留官方等待。结构不兼容时记录一次诊断。
|
|
10
|
+
- 映射执行器抽到独立模块,并合并宿主执行器的兼容性检查。
|
|
11
|
+
|
|
12
|
+
- The mode picker, conversation preset label, settings, sidebar, and command palette follow DSH's Chinese or English language setting. Switching languages preserves the selected preset and unsaved form input.
|
|
13
|
+
- Third-party plugins share a two-layer preset check. It prefers `deep-ptc` and defaults to the `ptc` alias when compatibility is needed. DSH still mounts `deep-ptc`. Detection covers `dist` packages, ignores comments and unrelated comparisons, and refreshes after plugin updates.
|
|
14
|
+
- Tool quarantine requires an explicit HTTP status in error text. Module load failures carrying `ERR_MODULE_NOT_FOUND` or `MODULE_NOT_FOUND` quarantine immediately. Defects inside a tool still require three consecutive failures.
|
|
15
|
+
- PowerShell wait detection recognises actual `Start-Job` and `Start-ThreadJob` script blocks and still checks foreground waits in the same command.
|
|
16
|
+
- `ask_user_question` requires a positive timeout. Empty or incompatible host question records preserve the official wait, and incompatible records are logged once.
|
|
17
|
+
- The mapped executor now lives in a standalone module with a shared check for the host executor interface.
|
|
18
|
+
|
|
3
19
|
## 1.8.7 — 2026-11-10
|
|
4
20
|
|
|
5
21
|
- 在深度 PTC 侧栏加入界面特效开关。关闭后即时撤掉界面美化和动画,设置保存在当前客户端。使用外部主题或 UI 插件时建议关闭。
|
package/README.md
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
# Deep PTC mode
|
|
2
2
|
|
|
3
|
-
[中文](README.zh.md) · MIT · **1.8.
|
|
3
|
+
[中文](README.zh.md) · MIT · **1.8.8**
|
|
4
4
|
|
|
5
|
-
[
|
|
6
|
-
**Reports. Asks. Stays awake. Plans. Stays reachable.**
|
|
7
|
-
**Five basics, one mode; everything is a plugin, with the official preset always as the fallback.**
|
|
5
|
+
[Changelog](CHANGELOG.md) · [Test report](TEST_REPORT.md)
|
|
8
6
|
|
|
9
|
-
Deep PTC is
|
|
7
|
+
Deep PTC is a DeepSeek Harness agent mode with progress reports, clarifying questions, task-size planning, and interruptible background work. It builds on the installed official PTC preset with selectable shells, on-demand tools and skills, and a two-layer preset identity adapter for third-party plugins.
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Not every third-party plugin is guaranteed to fit: the interface is verified for dsh-ops and reused by other plugins, but a plugin still has to support the installed host and publish its tools under the expected contract.
|
|
9
|
+
In 1.8.8 the mode picker, settings, and conversation UI follow DSH's Chinese or English language setting. This release also refines tool quarantine, PowerShell wait detection, and third-party preset detection.
|
|
14
10
|
|
|
15
11
|
## Five basic problems
|
|
16
12
|
|
|
@@ -40,11 +36,11 @@ Screen-control tools stay in the initial PTC SDK, are not moved on demand, and a
|
|
|
40
36
|
|
|
41
37
|
WSL Bash, PowerShell (including discovered 5.1 and 7 executables), Zsh and native Bash are supported. The choice applies to this preset only and does not change the global shell; sandbox, approval and process management stay official. WSL currently requires the host-authorized `danger-full-access` mode.
|
|
42
38
|
|
|
43
|
-
### 5. External plugin
|
|
39
|
+
### 5. External plugin tools and workflows
|
|
44
40
|
|
|
45
41
|
This is the core interface: external plugins publish tools under their own contract; Deep PTC discovers them, loads them on demand, quarantines failures per conversation and falls back to official PTC. Extensions must support the installed host and publish into the `deep-ptc` scope; Deep PTC does not depend on any specific plugin or replace the executor.
|
|
46
42
|
|
|
47
|
-
|
|
43
|
+
Third-party plugins that query `composedPreset` share the same compatibility rules. The tested dsh-ops package recognises only `minimal/standard/ptc/cordis`, so its query receives `ptc` in a session that DSH mounts as `deep-ptc`. Quarantine applies only to tools attributed to external providers.
|
|
48
44
|
|
|
49
45
|
### 6. Leaner skill and tool loading
|
|
50
46
|
|
|
@@ -52,7 +48,7 @@ Each turn ends with a skill context card that lists only the skills still loaded
|
|
|
52
48
|
|
|
53
49
|
Search summaries first, then load full schemas: six entries per page by default (maximum eight), up to six schemas within a 16 KB budget per load, and up to twelve recent selections. Quarantine persists with the conversation: clear unavailability blocks immediately; temporary failures need three in a row and a success clears the count; wrong arguments, denial and normal business failures are not tool failures; one reset clears only the current conversation. Skills load in two stages: discovery reads metadata and invocation permission only; the official `skill` tool loads the body.
|
|
54
50
|
|
|
55
|
-
|
|
51
|
+
Install the plugin, choose an environment under **Settings → Plugins → Deep PTC**, and select **Deep PTC Mode** for a new conversation.
|
|
56
52
|
|
|
57
53
|
## Skill context card (1.8.5)
|
|
58
54
|
|
|
@@ -68,6 +64,8 @@ After each turn, a card at the end of that turn in the conversation (where offic
|
|
|
68
64
|
|
|
69
65
|
## Visual effects and side card
|
|
70
66
|
|
|
67
|
+
The Deep PTC mode label, settings, and conversation UI switch between Chinese and English with DSH **Settings → General → Language**.
|
|
68
|
+
|
|
71
69
|
The look from dsh-refined-ui is part of this plugin and applies **only while the conversation on screen is a Deep PTC session**; other modes and the new-session page keep the official look.
|
|
72
70
|
|
|
73
71
|
- Calmer light and dark neutrals, a Chinese-first font stack, slim scrollbars, a floating composer card with a flowing blue hairline on focus, a blue gradient send button, soft blue user bubbles, roomier assistant text, and a blue wash on hovered and selected sidebar rows.
|
|
@@ -130,7 +128,7 @@ These rules apply only to Deep PTC sessions. They rely on the desktop "busy Ente
|
|
|
130
128
|
|
|
131
129
|
## Choose an execution environment
|
|
132
130
|
|
|
133
|
-
Open **Settings → Plugins → Deep PTC**, choose an environment, save, and create a new
|
|
131
|
+
Open **Settings → Plugins → Deep PTC**, choose an environment, save, and create a new **Deep PTC Mode** session.
|
|
134
132
|
|
|
135
133
|
| Selection | Host | Executor / tool |
|
|
136
134
|
| --- | --- | --- |
|
|
@@ -175,14 +173,14 @@ Phone screen control was not clicked on a device for this release. The guarantee
|
|
|
175
173
|
|
|
176
174
|
## 1.8.0: session-scoped preset identity
|
|
177
175
|
|
|
178
|
-
External plugins often
|
|
176
|
+
External plugins often use the preset ID to enable capabilities. The adapter runs only for sessions using Deep PTC. DSH mounts `deep-ptc` and records that preset ID on the session. A plugin such as dsh-ops that relies on official preset IDs receives `ptc` when it queries `composedPreset`.
|
|
179
177
|
|
|
180
178
|
- **Layer 1 (native)**: an external plugin that does not limit preset names receives `deep-ptc` and works as-is; a plugin that explicitly declares support for `deep-ptc` also receives the native id.
|
|
181
|
-
- **Layer 2 (
|
|
179
|
+
- **Layer 2 (compatibility alias)** returns `ptc` by default when the caller's gate requires an official preset ID. The alias applies to that query.
|
|
182
180
|
- Host calls that must stay exact (subagent child headers, scheduled session creation, the registry itself) always receive `deep-ptc`, so inheritance and scheduling are unaffected.
|
|
183
181
|
- A normal PTC session already returns `ptc`; every other preset is returned unchanged. The official PTC preset is not replaced, and DSH is not modified.
|
|
184
182
|
- Creative mode and the plugin lab: loading reads the host roster and documents only, never `composedPreset`. A creative row mounted into a Deep PTC session that accepts only `cordis` gets `cordis`; a normal creative session is unchanged.
|
|
185
|
-
-
|
|
183
|
+
- `composedPreset` returns one ID per call. The adapter selects a layer from the caller's package or explicit settings before returning. The host exposes no callback for the caller's validation result. The settings are `presetCompat`, `presetFallback` and `presetSupport`.
|
|
186
184
|
|
|
187
185
|
Limitation: this wraps the host's `agentPresets.composedPreset` instance and depends on its internal signature, so re-check after a DSH upgrade. The per-package probe is heuristic; dynamically assembled ids may not be recognised.
|
|
188
186
|
|
|
@@ -202,10 +200,10 @@ A prompt changes the model's working tendency, not the real token limit or billi
|
|
|
202
200
|
Requires Node `>=24` and DSH `>=0.2.2-rc.1`. The installer rejects the current package on DSH `0.2.1-rc.5` based on its manifest. macOS/Zsh checks cover configuration, argv and tool mounting.
|
|
203
201
|
|
|
204
202
|
```js
|
|
205
|
-
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.8.
|
|
203
|
+
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.8.8" })
|
|
206
204
|
// Or from a local checkout or archive:
|
|
207
205
|
plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
|
|
208
|
-
// Or target: "C:\\path\\to\\dsh-deep-ptc-mode-1.8.
|
|
206
|
+
// Or target: "C:\\path\\to\\dsh-deep-ptc-mode-1.8.8.tgz"
|
|
209
207
|
```
|
|
210
208
|
|
|
211
209
|
Repository locator: `github:lishize20040802-rgb/dsh-deep-ptc-mode`. It installs content actually published there; a local upgrade does not publish to GitHub or npm.
|
package/README.zh.md
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
# 深度 PTC 模式
|
|
2
2
|
|
|
3
|
-
[English](README.md) · MIT · 当前版本 **1.8.
|
|
3
|
+
[English](README.md) · MIT · 当前版本 **1.8.8**
|
|
4
4
|
|
|
5
|
-
[
|
|
6
|
-
**会汇报,先提问,不休眠,有计划,能插话。**
|
|
7
|
-
**五个基本问题,一套模式;一切皆插件,官方始终兜底。**
|
|
5
|
+
[更新日志](CHANGELOG.md) · [测试报告](TEST_REPORT.md)
|
|
8
6
|
|
|
9
|
-
深度 PTC
|
|
7
|
+
深度 PTC 是 DeepSeek Harness 的 Agent 模式,支持进度汇报、澄清提问、按任务规模制定计划,以及可插话的后台任务。它以已安装的官方 PTC 预设为基础,提供可选执行环境、按需加载工具和 Skill,以及面向第三方插件的两层预设身份适配。
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
不承诺适配所有第三方插件:接口对已测试场景(dsh-ops)负责,其他插件走同一接口,具体仍取决于插件自身是否支持当前宿主、是否按契约发布工具。
|
|
9
|
+
1.8.8 的模式选择器、设置页和会话界面会随 DSH 设置自动切换中英文。本版还改进了工具故障隔离、PowerShell 等待检测和第三方预设识别。
|
|
14
10
|
|
|
15
11
|
## 五个基本问题
|
|
16
12
|
|
|
@@ -40,11 +36,11 @@
|
|
|
40
36
|
|
|
41
37
|
支持 WSL Bash、PowerShell(含 5.1 与 7 的可执行文件选择)、Zsh、原生 Bash。只对本模式生效,不改全局 shell;沙箱、审批和进程管理仍用官方实现。WSL 目前仅支持宿主已授权的 `danger-full-access`。
|
|
42
38
|
|
|
43
|
-
### 5.
|
|
39
|
+
### 5. 外部插件工具与工作流
|
|
44
40
|
|
|
45
41
|
这是深度 PTC 的核心接口:外部插件按自己的契约发布工具,深度 PTC 负责发现、按需加载、隔离故障,并在失败时回到官方 PTC。外部插件需支持当前宿主,并在 `deep-ptc` 作用域中发布工具;深度 PTC 不把任何插件写成依赖,也不替换执行器。
|
|
46
42
|
|
|
47
|
-
|
|
43
|
+
通过 `composedPreset` 查询预设的第三方插件使用同一套兼容规则。以实测的 dsh-ops 为例,它只认 `minimal/standard/ptc/cordis`,所以在深度 PTC 会话里收到兼容 ID `ptc`,宿主实际挂载的仍是 `deep-ptc`。只有能明确归属的外部工具才会进入故障隔离。
|
|
48
44
|
|
|
49
45
|
### 6. Skill 与工具的读取流程优化
|
|
50
46
|
|
|
@@ -52,7 +48,7 @@
|
|
|
52
48
|
|
|
53
49
|
先搜摘要,再加载完整 schema:默认每页 6 项、最多 8 项;完整 schema 每次最多 6 个、总预算 16 KB;最多保留 12 个近期选择。故障按对话隔离:明确不可用立即禁用;临时错误连续 3 次才禁用,成功一次清零;参数错误、权限拒绝、业务失败不算故障;一键重载只清当前对话。Skill 两阶段:目录只查元数据与权限,正文交给官方 `skill` 工具,检索不读正文。
|
|
54
50
|
|
|
55
|
-
|
|
51
|
+
安装插件,在 **设置 → 插件 → 深度 PTC** 选择执行环境,然后新建会话并选择 **深度 PTC 模式**。
|
|
56
52
|
|
|
57
53
|
## Skill 上下文卡片(1.8.5)
|
|
58
54
|
|
|
@@ -68,6 +64,8 @@
|
|
|
68
64
|
|
|
69
65
|
## 界面特效与侧边卡片
|
|
70
66
|
|
|
67
|
+
Deep PTC 的模式名称、设置页和会话界面会随 DSH「设置 → 通用 → 语言」在中文和英文之间切换。
|
|
68
|
+
|
|
71
69
|
dsh-refined-ui 的界面精修并入本插件,**只在当前显示的是深度PTC会话时生效**,切到其他模式或新会话页时恢复官方原样:
|
|
72
70
|
|
|
73
71
|
- 明暗两套更克制的中性色、中文优先字体、细滚动条;悬浮的输入框卡片,聚焦时出现流动的蓝色细线;蓝色渐变发送键;淡蓝渐变的用户气泡;更宽松的助手正文;侧栏悬停与选中的蓝色底。
|
|
@@ -130,7 +128,7 @@ const skills = await tools.deep_ptc_tools({ action: 'skills', query: 'build test
|
|
|
130
128
|
|
|
131
129
|
## 选择 WSL、PowerShell 或 macOS 工具
|
|
132
130
|
|
|
133
|
-
安装并加载后,打开 **设置 → 插件 → 深度 PTC
|
|
131
|
+
安装并加载后,打开 **设置 → 插件 → 深度 PTC**,选择执行环境并保存,再新建一个 **深度 PTC 模式**会话。
|
|
134
132
|
|
|
135
133
|
| 选项 | 宿主 | 实际执行方式 / 模型工具 |
|
|
136
134
|
| --- | --- | --- |
|
|
@@ -177,14 +175,14 @@ WSL 命令使用 Linux/POSIX 语法;文件工具和 `workdir` 仍用 Windows
|
|
|
177
175
|
|
|
178
176
|
## 1.8.0:会话级 preset 身份兼容
|
|
179
177
|
|
|
180
|
-
|
|
178
|
+
外部插件常用预设 ID 判断是否启用能力。只有用户选择深度 PTC 的会话会做这层适配。DSH 挂载 `deep-ptc`,并将这个预设 ID 写入会话记录。像 dsh-ops 这样依赖官方 ID 的插件通过 `composedPreset` 查询时会收到 `ptc`。
|
|
181
179
|
|
|
182
180
|
- **第一层(原生)**:不限制预设名称的外部插件拿 `deep-ptc`,直接可用;显式声明支持 `deep-ptc` 的插件也拿原生。
|
|
183
|
-
-
|
|
181
|
+
- **第二层(兼容别名)**:调用方规则要求官方预设 ID 时,默认返回 `ptc`。别名只用于这次身份查询。
|
|
184
182
|
- 宿主内部必须精确的调用(子代理 header、定时任务、注册表自身)始终拿 `deep-ptc`,不影响继承和调度。
|
|
185
183
|
- 普通 PTC 会话本来就返回 `ptc`,其他预设原样返回;官方 PTC 预设没有被替换,也没有改 DSH。
|
|
186
184
|
- 创造模式/插件实验台:加载只读宿主的预设清单和文档,不调用 `composedPreset`;实验台挂进深 PTC 会话的创造模式行若只认 `cordis`,第二层就返回 `cordis`,普通创造模式会话仍原样。
|
|
187
|
-
-
|
|
185
|
+
- `composedPreset` 每次只返回一个 ID。兼容层根据调用方的包内容或显式配置,在返回前决定用哪一层。宿主没有提供校验结果回调。设置里可用 `presetCompat`、`presetFallback`、`presetSupport` 调整。
|
|
188
186
|
|
|
189
187
|
局限:这是对 `agentPresets.composedPreset` 的实例包装,依赖宿主内部方法签名;DSH 升级后需要复核。按包内容探测是启发式的,插件如果在代码里用动态拼接的 id,可能识别不到。
|
|
190
188
|
|
|
@@ -206,10 +204,10 @@ WSL 命令使用 Linux/POSIX 语法;文件工具和 `workdir` 仍用 Windows
|
|
|
206
204
|
本地目录或构建产物可通过插件管理器安装:
|
|
207
205
|
|
|
208
206
|
```js
|
|
209
|
-
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.8.
|
|
207
|
+
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.8.8" })
|
|
210
208
|
// 也可从本地目录或安装包安装:
|
|
211
209
|
plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
|
|
212
|
-
// 或 target: "C:\\path\\to\\dsh-deep-ptc-mode-1.8.
|
|
210
|
+
// 或 target: "C:\\path\\to\\dsh-deep-ptc-mode-1.8.8.tgz"
|
|
213
211
|
```
|
|
214
212
|
|
|
215
213
|
GitHub 地址:`github:lishize20040802-rgb/dsh-deep-ptc-mode`。该地址安装远端实际内容;本地升级不会自动发布到 GitHub/npm。
|
|
@@ -258,7 +256,7 @@ npm pack
|
|
|
258
256
|
- `cordis.patch.yml`:宿主设置入口。
|
|
259
257
|
- `lib/index.mjs`:配置 schema、preset 注册和版本切换。
|
|
260
258
|
- `lib/model.mjs`:平台选择、参数、隔离配置和环境说明,以及从官方声明派生 preset。
|
|
261
|
-
- `lib/executor.mjs`:继承基础部署声明里的官方 bash 执行器,实现 WSL/Zsh
|
|
259
|
+
- `lib/executor.mjs`:继承基础部署声明里的官方 bash 执行器,实现 WSL/Zsh(执行器类在 `lib/mapped-shell.mjs`)。
|
|
262
260
|
- `lib/terminal.mjs`:运行官方声明指定的 shell 工具,等待可被用户消息打断,并提供 Zsh 方言与工具名。
|
|
263
261
|
- `lib/jobs-tool.mjs`、`lib/ask-user.mjs`:运行官方声明指定的 job 工具与提问工具,等待可被用户消息打断。
|
|
264
262
|
- `lib/host.mjs`:通过已安装运行时解析这些官方模块。
|
package/TEST_REPORT.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# 1.7.3 实测汇总 / Test summary
|
|
2
2
|
|
|
3
|
+
> 1.8.8 在 Windows 和 Node 24 上通过 171 项自动化测试,覆盖中英切换、预设识别和工具隔离。DSH 槽位测试验证了模式选择器的本地化。下方保留 1.7.3 的桌面实测记录。
|
|
4
|
+
> Version 1.8.8 passes 171 automated tests on Windows and Node 24, including language switching, preset identity, and tool quarantine. A DSH slot check verifies preset-picker localization. The desktop audits below document 1.7.3.
|
|
5
|
+
|
|
3
6
|
日期 / Date: 2026-11-05。测试宿主:Windows 桌面 DSH 0.2.2-rc.1 + WSL Ubuntu、Node 24。此版本是测试样本,运行时不据此固定工具清单。
|
|
4
7
|
|
|
5
8
|
## 中文
|
package/lib/ask-user.mjs
CHANGED
|
@@ -16,7 +16,12 @@ export const Config = z.object({
|
|
|
16
16
|
// and a message the user writes instead ends the wait early.
|
|
17
17
|
export async function apply(ctx, config) {
|
|
18
18
|
const watch = steeringWatch(ctx);
|
|
19
|
+
let warned = false;
|
|
20
|
+
const reshaped = () => {
|
|
21
|
+
if (!warned) ctx.logger.warn('Deep PTC: the question service changed shape; a question the user writes past now waits out its timeout');
|
|
22
|
+
warned = true;
|
|
23
|
+
};
|
|
19
24
|
await applyOfficial(ctx, config.upstream, config.options, child => adaptContext(child, {
|
|
20
|
-
userQuestions: questions => steerableQuestions(questions, watch),
|
|
25
|
+
userQuestions: questions => steerableQuestions(questions, watch, reshaped),
|
|
21
26
|
}), config.overrides);
|
|
22
27
|
}
|