dsh-deep-ptc-mode 1.8.6 → 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 +30 -0
- package/README.md +25 -24
- package/README.zh.md +27 -24
- package/TEST_REPORT.md +3 -0
- package/lib/ask-user.mjs +6 -1
- package/lib/client.js +397 -81
- package/lib/creative.mjs +15 -34
- package/lib/executor.mjs +2 -47
- package/lib/index.mjs +11 -6
- package/lib/mapped-shell.mjs +39 -0
- package/lib/model.mjs +14 -7
- 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/shells.mjs +11 -1
- package/lib/skill-card.mjs +0 -0
- package/lib/skill-context.mjs +0 -0
- package/lib/sleep-lint.mjs +37 -4
- package/lib/tool-catalog.mjs +49 -15
- package/lib/tool-policy.mjs +78 -28
- package/lib/tool-state.mjs +0 -0
- package/lib/upstream.mjs +10 -5
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
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
|
+
|
|
19
|
+
## 1.8.7 — 2026-11-10
|
|
20
|
+
|
|
21
|
+
- 在深度 PTC 侧栏加入界面特效开关。关闭后即时撤掉界面美化和动画,设置保存在当前客户端。使用外部主题或 UI 插件时建议关闭。
|
|
22
|
+
- 新增后台任务卡片。默认最多六个位置,运行中的任务优先且最多五条,已结束最多三条。折叠入口占一个位置并显示隐藏数量。
|
|
23
|
+
- 合并 PTC 和创造模式的 Skill 目录,修复重复注册文件系统提供器后误退安全模式的问题。
|
|
24
|
+
- 修复 Electron 特效层覆盖窗口拖动区的问题,区分工具重载命令不可用和执行失败,并添加中英文插件详情。
|
|
25
|
+
- Windows 可填写 Niubash 的 `bash.exe` 路径来使用原生 Bash。受限模式可选 PowerShell。宿主最低版本为 DSH `0.2.2-rc.1`。
|
|
26
|
+
|
|
27
|
+
- Add a visual effects switch to the Deep PTC side card. It applies immediately and remembers the choice in the current client. Keep it off when using an external theme or UI plugin.
|
|
28
|
+
- Show background jobs in six preview positions. Up to five active jobs take priority over up to three finished jobs. The overflow row uses one position and shows the hidden count.
|
|
29
|
+
- Merge PTC and creative-mode skill directories into one filesystem provider to avoid an unnecessary fallback to safe mode.
|
|
30
|
+
- Restore Electron window dragging with effects enabled, distinguish unavailable reload commands from execution errors, and add English and Chinese plugin details.
|
|
31
|
+
- Support native Windows Bash through an explicit Niubash `bash.exe` path. Use PowerShell for confined Windows work. The minimum host version is DSH `0.2.2-rc.1`.
|
|
32
|
+
|
|
3
33
|
## 1.8.6 — 2026-11-09
|
|
4
34
|
|
|
5
35
|
- 运行中的输入框泛蓝光:对话运行时输入框边框转蓝并持续呼吸发光。1.8.5 已移植这段动效,但发送后输入框处于聚焦状态,聚焦样式的 `!important` 阴影压过了动画,所以看不到;现在聚焦样式只在空闲时生效。
|
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
|
|
|
@@ -26,7 +22,7 @@ Not every third-party plugin is guaranteed to fit: the interface is verified for
|
|
|
26
22
|
|
|
27
23
|
### 1. Dynamic preset and tool loading
|
|
28
24
|
|
|
29
|
-
Read the running host's official PTC declaration and inherit its rows as they are; only the persona, execution group, reachability guard, job wrapper and question wrapper are replaced. Rebuild only when the declaration or settings change
|
|
25
|
+
Read the running host's official PTC declaration and inherit its rows as they are; only the persona, execution group, reachability guard, job wrapper and question wrapper are replaced. Rebuild only when the declaration or settings change, checked when settings change and once before each Deep PTC conversation is created or resumed, with no polling timer; fall back to the bundled snapshot with a warning if it cannot be loaded, parsed or derived. An official upgrade can add tools without a release of this preset; existing sessions are not forcibly switched.
|
|
30
26
|
|
|
31
27
|
### 2. Flexible creative-mode tools
|
|
32
28
|
|
|
@@ -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
|
|
|
@@ -66,16 +62,20 @@ After each turn, a card at the end of that turn in the conversation (where offic
|
|
|
66
62
|
- The card tracks skills loaded directly through the official `skill` tool and skills loaded by a PTC inner call inside `run_code`. The latter usually reach the program rather than the model context, so closing one only removes it from the card, not from program output. `/name` injections are not covered yet.
|
|
67
63
|
- A switch leaves no command row in the conversation (the session log still records it); only a failed switch shows a short error line in place.
|
|
68
64
|
|
|
69
|
-
##
|
|
65
|
+
## Visual effects and side card
|
|
66
|
+
|
|
67
|
+
The Deep PTC mode label, settings, and conversation UI switch between Chinese and English with DSH **Settings → General → Language**.
|
|
70
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.
|
|
74
72
|
- Interactions: Ctrl/Cmd+K command palette (sessions, new session, plugins, automations), pointer spotlight, click ripple, magnetic send button, `/` to focus the composer, Alt+Up/Down to switch sessions, Ctrl+Alt+D diagnostics.
|
|
75
73
|
- Motion: while the conversation runs, the composer turns blue and breathes (also while focused), with a send-button ring and a steady stream of sparks rising above it; sparks on send and completion. Everything honours reduced motion.
|
|
76
|
-
-
|
|
77
|
-
- **Execution environment
|
|
74
|
+
- Each Deep PTC conversation has a **side card** on the right.
|
|
75
|
+
- **Execution environment** offers WSL, PowerShell, native Bash, or Zsh depending on the host. It writes the same host settings as the settings page and applies to newly created Deep PTC sessions.
|
|
76
|
+
- **Visual effects** toggles styling and animations immediately and saves the preference in the current client. Keep it off when using an external theme or UI plugin.
|
|
78
77
|
- **Subagents**, when there are any: name, state, duration and tokens from the official subagent catalog and timing data; a row opens that subagent's chat in the official right sidebar.
|
|
78
|
+
- **Background jobs** shows the current conversation's active and finished jobs. The card has six positions by default, with up to five active jobs first and up to three finished jobs. An expandable row uses one position and shows how many jobs it contains.
|
|
79
79
|
- **Tool state**: the “Reload all tool states” button and, when present, the failed external tools.
|
|
80
80
|
The column uses the host's background with light grey dividers, blue only for the selected option, button outlines and status squares, and the host's usual black and grey text; for a running subagent only its small status square flashes blue. In a narrow conversation the card folds into a small pill, whose status square flashes the same way. It can be collapsed, and that choice is kept on this machine.
|
|
81
81
|
- While the standalone dsh-refined-ui is still running, this plugin does not draw the same look a second time.
|
|
@@ -128,13 +128,14 @@ These rules apply only to Deep PTC sessions. They rely on the desktop "busy Ente
|
|
|
128
128
|
|
|
129
129
|
## Choose an execution environment
|
|
130
130
|
|
|
131
|
-
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.
|
|
132
132
|
|
|
133
133
|
| Selection | Host | Executor / tool |
|
|
134
134
|
| --- | --- | --- |
|
|
135
135
|
| Automatic | Windows / macOS / Linux | PowerShell on Windows, Zsh on macOS, Bash on Linux |
|
|
136
136
|
| WSL Bash | Windows | Explicit `wsl.exe ... --exec bash -lc`, tool `bash` |
|
|
137
137
|
| PowerShell | Windows | Official native PowerShell executor, tool `pwsh` |
|
|
138
|
+
| Native Bash | Windows | An absolute path to `bash.exe`, such as the Niubash binary bundled with `dsh-ops` |
|
|
138
139
|
| Zsh | macOS / Linux | `/bin/zsh -lc` on macOS; installed `zsh` on Linux; tool `zsh` |
|
|
139
140
|
| Native Bash | macOS / Linux | Official Bash executor, tool `bash` |
|
|
140
141
|
|
|
@@ -146,9 +147,9 @@ WSL source uses Linux/POSIX syntax, while file tools and `workdir` use Windows h
|
|
|
146
147
|
|
|
147
148
|
### Sandbox behavior
|
|
148
149
|
|
|
149
|
-
Native PowerShell
|
|
150
|
+
Native PowerShell and the macOS/Linux shells use Harness sandbox, approval and process management. On Windows, WSL and native Bash require execution already authorized as `danger-full-access`. Choose PowerShell for confined Windows work.
|
|
150
151
|
|
|
151
|
-
PowerShell, Bash and Zsh can use a
|
|
152
|
+
PowerShell, macOS/Linux Bash and Zsh can use a discovered executable. On Windows, native Bash accepts an absolute path to `bash.exe`, such as `<profile>/node_modules/dsh-ops/runtime/win32-x64/niubash/winuxcmd/bin/bash.exe`. If that path is unavailable, new sessions keep the official shell.
|
|
152
153
|
|
|
153
154
|
## Plugin lab: official creative mode, in memory
|
|
154
155
|
|
|
@@ -172,14 +173,14 @@ Phone screen control was not clicked on a device for this release. The guarantee
|
|
|
172
173
|
|
|
173
174
|
## 1.8.0: session-scoped preset identity
|
|
174
175
|
|
|
175
|
-
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`.
|
|
176
177
|
|
|
177
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.
|
|
178
|
-
- **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.
|
|
179
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.
|
|
180
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.
|
|
181
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.
|
|
182
|
-
-
|
|
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`.
|
|
183
184
|
|
|
184
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.
|
|
185
186
|
|
|
@@ -196,13 +197,13 @@ A prompt changes the model's working tendency, not the real token limit or billi
|
|
|
196
197
|
|
|
197
198
|
## Install or upgrade
|
|
198
199
|
|
|
199
|
-
Requires Node `>=24` and DSH
|
|
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.
|
|
200
201
|
|
|
201
202
|
```js
|
|
202
|
-
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" })
|
|
203
204
|
// Or from a local checkout or archive:
|
|
204
205
|
plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
|
|
205
|
-
// 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"
|
|
206
207
|
```
|
|
207
208
|
|
|
208
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 ·
|
|
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
|
|
|
@@ -26,7 +22,7 @@
|
|
|
26
22
|
|
|
27
23
|
### 1. 预设与工具的动态读取
|
|
28
24
|
|
|
29
|
-
运行时读取宿主正在发布的官方 PTC 声明,官方行原样继承;仅替换 persona、执行组、可达性守卫、job
|
|
25
|
+
运行时读取宿主正在发布的官方 PTC 声明,官方行原样继承;仅替换 persona、执行组、可达性守卫、job 与提问包装。在设置变更时、以及每个深度PTC对话创建或恢复之前确认一次声明,仅在声明或配置变化时重建,不再定时轮询;声明读不到/解析失败才用随包快照并记录日志。官方升级后无需为本模式发版即可继承新工具;新建会话使用新版,已有会话不强制切换。
|
|
30
26
|
|
|
31
27
|
### 2. 创造模式工具的灵活加入
|
|
32
28
|
|
|
@@ -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
|
|
|
@@ -66,16 +62,20 @@
|
|
|
66
62
|
- 卡片会跟踪官方 `skill` 工具直接加载,以及 `run_code` 内 PTC 子调用加载的 Skill;后者通常只进入程序而非模型上下文,关闭时只从卡片移除,不重写程序输出。`/name` 注入暂不纳入。
|
|
67
63
|
- 切换开关不会在对话里留下命令回显(会话日志仍记录这次操作);只有切换失败时,原位显示一行错误。
|
|
68
64
|
|
|
69
|
-
##
|
|
65
|
+
## 界面特效与侧边卡片
|
|
66
|
+
|
|
67
|
+
Deep PTC 的模式名称、设置页和会话界面会随 DSH「设置 → 通用 → 语言」在中文和英文之间切换。
|
|
70
68
|
|
|
71
69
|
dsh-refined-ui 的界面精修并入本插件,**只在当前显示的是深度PTC会话时生效**,切到其他模式或新会话页时恢复官方原样:
|
|
72
70
|
|
|
73
71
|
- 明暗两套更克制的中性色、中文优先字体、细滚动条;悬浮的输入框卡片,聚焦时出现流动的蓝色细线;蓝色渐变发送键;淡蓝渐变的用户气泡;更宽松的助手正文;侧栏悬停与选中的蓝色底。
|
|
74
72
|
- 交互:Ctrl/⌘+K 命令面板(跳转会话、新会话、插件、自动化任务)、指针追光、点击涟漪、磁吸发送键、`/` 聚焦输入框、Alt+↑/↓ 切换会话、Ctrl+Alt+D 诊断。
|
|
75
73
|
- 动效:对话运行时输入框边框转蓝并呼吸发光(聚焦时也不例外),发送键光环,输入框上方持续冒出光点,发送与完成时的光点;全部遵循系统的“减少动态效果”。
|
|
76
|
-
-
|
|
77
|
-
-
|
|
74
|
+
- 深度 PTC 会话在对话区右侧显示**侧边卡片**。
|
|
75
|
+
- **执行环境**可选择 WSL、PowerShell、原生 Bash 或 Zsh,选项取决于宿主系统。和设置页写同一份宿主设置,对之后新建的深度 PTC 会话生效。
|
|
76
|
+
- **界面特效**开关即时关闭界面美化与动画,选择保存在当前客户端。使用外部主题或 UI 插件时,建议关闭。
|
|
78
77
|
- **子代理**(有子代理时才出现):名称、状态、用时和 token,按官方子代理目录与计时数据计算;点击一行在官方右侧栏打开该子代理的对话。
|
|
78
|
+
- **后台任务**显示当前会话的运行和结束状态。默认最多六个位置,运行中优先且最多五条,已结束最多三条。超出部分合为一条可展开的记录,显示隐藏任务数量。
|
|
79
79
|
- **工具状态**:“重载所有工具状态”按钮,以及调用失败的外部工具(如有)。
|
|
80
80
|
侧栏为白底,浅灰色分割线,蓝色只用于选中项、按钮描边和状态小方块,文字与其他地方一样用黑色和灰色;运行中的子代理只有行首的状态小方块闪烁蓝光。对话区较窄时收成右上角的小胶囊,小方块同样会闪;卡片可收起,选择记在本机。
|
|
81
81
|
- 独立的 dsh-refined-ui 仍在运行时,本插件检测到它就不再重复绘制这一套样式。
|
|
@@ -128,25 +128,28 @@ const skills = await tools.deep_ptc_tools({ action: 'skills', query: 'build test
|
|
|
128
128
|
|
|
129
129
|
## 选择 WSL、PowerShell 或 macOS 工具
|
|
130
130
|
|
|
131
|
-
安装并加载后,打开 **设置 → 插件 → 深度 PTC
|
|
131
|
+
安装并加载后,打开 **设置 → 插件 → 深度 PTC**,选择执行环境并保存,再新建一个 **深度 PTC 模式**会话。
|
|
132
132
|
|
|
133
133
|
| 选项 | 宿主 | 实际执行方式 / 模型工具 |
|
|
134
134
|
| --- | --- | --- |
|
|
135
135
|
| 自动 | Windows / macOS / Linux | Windows 选 PowerShell,macOS 选 Zsh,Linux 选 Bash |
|
|
136
136
|
| WSL Bash | Windows | `wsl.exe ... --exec bash -lc`,工具名 `bash` |
|
|
137
137
|
| PowerShell | Windows | Harness 官方原生 PowerShell 执行器,工具名 `pwsh` |
|
|
138
|
+
| 原生 Bash | Windows | 填写 `bash.exe` 的绝对路径,可使用 `dsh-ops` 随包的 Niubash |
|
|
138
139
|
| Zsh | macOS / Linux | macOS 用 `/bin/zsh -lc`;Linux 用已安装的 `zsh`;工具名 `zsh` |
|
|
139
140
|
| 原生 Bash | macOS / Linux | Harness 官方 Bash 执行器,工具名 `bash` |
|
|
140
141
|
|
|
141
142
|
不适用于宿主的选项会禁用,运行时配置也会拒绝这些选择。WSL 发行版留空时使用 Windows 默认发行版,也可填写 `Ubuntu` 等已安装名称。Linux 上选择 Zsh 前需要安装 Zsh。
|
|
142
143
|
|
|
144
|
+
Windows 选择原生 Bash 时,可以填入 `<profile>/node_modules/dsh-ops/runtime/win32-x64/niubash/winuxcmd/bin/bash.exe` 的实际绝对路径。路径不可用时新会话保留官方 Shell。原生 Windows Bash 仅在宿主已授权的 `danger-full-access` 下执行,受限模式请选择 PowerShell。
|
|
145
|
+
|
|
143
146
|
**选择会改变实际执行器和模型看到的命令语法,不只改工具名称。** 执行器隔离在本 preset 中,不修改全局 shell,也不影响其他 preset。保存设置后,新会话使用新版本;已有会话和后台任务继续使用创建时的环境。切换环境时请新建会话,避免同一任务中途换方言。
|
|
144
147
|
|
|
145
148
|
WSL 命令使用 Linux/POSIX 语法;文件工具和 `workdir` 仍用 Windows 宿主路径。执行器用 `--cd` 进入目录,发行版、目录和命令分别作为 argv 传递,不额外拼接 shell 字符串。WSL 内的 PATH、代理等由所选发行版的登录 shell 配置决定,Windows 环境变量不会全部自动变成 Linux 环境变量。
|
|
146
149
|
|
|
147
150
|
### 沙箱边界
|
|
148
151
|
|
|
149
|
-
原生 PowerShell
|
|
152
|
+
原生 PowerShell 和 macOS/Linux 的 Shell 使用 Harness 的沙箱、审批和进程管理。Windows 的 WSL 与原生 Bash 仅在宿主已授权的 `danger-full-access` 下执行,受限模式请选择 PowerShell。
|
|
150
153
|
|
|
151
154
|
选择 PowerShell、Bash 或 Zsh 时,可以指定本机已经发现的常见可执行文件。留空则沿用官方查找顺序。WSL 仍只选择发行版。所选文件不存在时记一条警告并回到自动。PowerShell 的选择写入官方执行器的 `pwshPath`。Bash 和 Zsh 只改启动参数。
|
|
152
155
|
|
|
@@ -172,14 +175,14 @@ WSL 命令使用 Linux/POSIX 语法;文件工具和 `workdir` 仍用 Windows
|
|
|
172
175
|
|
|
173
176
|
## 1.8.0:会话级 preset 身份兼容
|
|
174
177
|
|
|
175
|
-
|
|
178
|
+
外部插件常用预设 ID 判断是否启用能力。只有用户选择深度 PTC 的会话会做这层适配。DSH 挂载 `deep-ptc`,并将这个预设 ID 写入会话记录。像 dsh-ops 这样依赖官方 ID 的插件通过 `composedPreset` 查询时会收到 `ptc`。
|
|
176
179
|
|
|
177
180
|
- **第一层(原生)**:不限制预设名称的外部插件拿 `deep-ptc`,直接可用;显式声明支持 `deep-ptc` 的插件也拿原生。
|
|
178
|
-
-
|
|
181
|
+
- **第二层(兼容别名)**:调用方规则要求官方预设 ID 时,默认返回 `ptc`。别名只用于这次身份查询。
|
|
179
182
|
- 宿主内部必须精确的调用(子代理 header、定时任务、注册表自身)始终拿 `deep-ptc`,不影响继承和调度。
|
|
180
183
|
- 普通 PTC 会话本来就返回 `ptc`,其他预设原样返回;官方 PTC 预设没有被替换,也没有改 DSH。
|
|
181
184
|
- 创造模式/插件实验台:加载只读宿主的预设清单和文档,不调用 `composedPreset`;实验台挂进深 PTC 会话的创造模式行若只认 `cordis`,第二层就返回 `cordis`,普通创造模式会话仍原样。
|
|
182
|
-
-
|
|
185
|
+
- `composedPreset` 每次只返回一个 ID。兼容层根据调用方的包内容或显式配置,在返回前决定用哪一层。宿主没有提供校验结果回调。设置里可用 `presetCompat`、`presetFallback`、`presetSupport` 调整。
|
|
183
186
|
|
|
184
187
|
局限:这是对 `agentPresets.composedPreset` 的实例包装,依赖宿主内部方法签名;DSH 升级后需要复核。按包内容探测是启发式的,插件如果在代码里用动态拼接的 id,可能识别不到。
|
|
185
188
|
|
|
@@ -196,15 +199,15 @@ WSL 命令使用 Linux/POSIX 语法;文件工具和 `workdir` 仍用 Windows
|
|
|
196
199
|
|
|
197
200
|
## 安装和升级
|
|
198
201
|
|
|
199
|
-
要求 Node `>=24`、DSH
|
|
202
|
+
要求 Node `>=24`、DSH `>=0.2.2-rc.1`。使用 `0.2.1-rc.5` 时,安装器会根据插件清单拒绝安装当前版本。macOS/Zsh 分支做了配置、工具挂载与参数测试,尚未在 macOS 真机执行。
|
|
200
203
|
|
|
201
204
|
本地目录或构建产物可通过插件管理器安装:
|
|
202
205
|
|
|
203
206
|
```js
|
|
204
|
-
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" })
|
|
205
208
|
// 也可从本地目录或安装包安装:
|
|
206
209
|
plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
|
|
207
|
-
// 或 target: "C:\\path\\to\\dsh-deep-ptc-mode-1.8.
|
|
210
|
+
// 或 target: "C:\\path\\to\\dsh-deep-ptc-mode-1.8.8.tgz"
|
|
208
211
|
```
|
|
209
212
|
|
|
210
213
|
GitHub 地址:`github:lishize20040802-rgb/dsh-deep-ptc-mode`。该地址安装远端实际内容;本地升级不会自动发布到 GitHub/npm。
|
|
@@ -253,7 +256,7 @@ npm pack
|
|
|
253
256
|
- `cordis.patch.yml`:宿主设置入口。
|
|
254
257
|
- `lib/index.mjs`:配置 schema、preset 注册和版本切换。
|
|
255
258
|
- `lib/model.mjs`:平台选择、参数、隔离配置和环境说明,以及从官方声明派生 preset。
|
|
256
|
-
- `lib/executor.mjs`:继承基础部署声明里的官方 bash 执行器,实现 WSL/Zsh
|
|
259
|
+
- `lib/executor.mjs`:继承基础部署声明里的官方 bash 执行器,实现 WSL/Zsh(执行器类在 `lib/mapped-shell.mjs`)。
|
|
257
260
|
- `lib/terminal.mjs`:运行官方声明指定的 shell 工具,等待可被用户消息打断,并提供 Zsh 方言与工具名。
|
|
258
261
|
- `lib/jobs-tool.mjs`、`lib/ask-user.mjs`:运行官方声明指定的 job 工具与提问工具,等待可被用户消息打断。
|
|
259
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
|
}
|