dsh-deep-ptc-mode 1.8.5 → 1.8.7
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 +38 -0
- package/README.md +14 -11
- package/README.zh.md +15 -10
- package/lib/client.js +287 -57
- package/lib/creative.mjs +15 -34
- package/lib/freshness.mjs +31 -0
- package/lib/index.mjs +39 -16
- package/lib/model.mjs +14 -7
- package/lib/preset-compat.mjs +5 -3
- package/lib/shells.mjs +11 -1
- package/lib/skill-card.mjs +0 -0
- package/lib/skill-context.mjs +0 -0
- package/lib/tool-policy.mjs +7 -2
- package/lib/tool-state.mjs +0 -0
- package/lib/upstream.mjs +0 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.8.7 — 2026-11-10
|
|
4
|
+
|
|
5
|
+
- 在深度 PTC 侧栏加入界面特效开关。关闭后即时撤掉界面美化和动画,设置保存在当前客户端。使用外部主题或 UI 插件时建议关闭。
|
|
6
|
+
- 新增后台任务卡片。默认最多六个位置,运行中的任务优先且最多五条,已结束最多三条。折叠入口占一个位置并显示隐藏数量。
|
|
7
|
+
- 合并 PTC 和创造模式的 Skill 目录,修复重复注册文件系统提供器后误退安全模式的问题。
|
|
8
|
+
- 修复 Electron 特效层覆盖窗口拖动区的问题,区分工具重载命令不可用和执行失败,并添加中英文插件详情。
|
|
9
|
+
- Windows 可填写 Niubash 的 `bash.exe` 路径来使用原生 Bash。受限模式可选 PowerShell。宿主最低版本为 DSH `0.2.2-rc.1`。
|
|
10
|
+
|
|
11
|
+
- 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.
|
|
12
|
+
- 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.
|
|
13
|
+
- Merge PTC and creative-mode skill directories into one filesystem provider to avoid an unnecessary fallback to safe mode.
|
|
14
|
+
- Restore Electron window dragging with effects enabled, distinguish unavailable reload commands from execution errors, and add English and Chinese plugin details.
|
|
15
|
+
- 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`.
|
|
16
|
+
|
|
17
|
+
## 1.8.6 — 2026-11-09
|
|
18
|
+
|
|
19
|
+
- 运行中的输入框泛蓝光:对话运行时输入框边框转蓝并持续呼吸发光。1.8.5 已移植这段动效,但发送后输入框处于聚焦状态,聚焦样式的 `!important` 阴影压过了动画,所以看不到;现在聚焦样式只在空闲时生效。
|
|
20
|
+
- 侧边卡片改为白底蓝点缀:底色与宿主一致(暗色主题跟随宿主深色),分割线与边框为浅灰色,只有选中的执行环境、按钮描边和子代理状态小方块用蓝色;文字与其他地方一样用宿主的黑色与灰色。
|
|
21
|
+
- 侧边卡片停靠时不再是悬浮卡片,而是从对话区右侧分出的一栏:贴住右边缘、上下通高,只留左侧分隔线;对话区让出这一栏的宽度,滚动条不会被遮住。窄屏收起的小胶囊点开后仍是悬浮卡片。
|
|
22
|
+
- 运行中的子代理只有行首的状态小方块闪烁蓝光,整行不发光;收起成小胶囊时也一样。系统开启“减少动态效果”时停止闪烁。
|
|
23
|
+
- 修复:子代理的运行状态改为同时参考会话列表里的实时状态。父会话的子代理目录只在打开官方下拉框时刷新,之前正在运行的子代理会显示为“空闲”。
|
|
24
|
+
- 官方声明的升级检测不再每 5 秒读一次:只在设置变更时,以及每个深度PTC对话创建或恢复、宿主确定预设之前确认一次;声明有变化时先重新派生,新对话直接用上最新预设。确认最多等 5 秒,出错或超时都照常继续。
|
|
25
|
+
- 预设身份兼容层的诊断改写到宿主日志,不再写入固定的本机路径(此前 1.8.0–1.8.5 的包里带有一个写死的 Windows 用户目录)。
|
|
26
|
+
- 工具启动自己的程序失败(`spawn … ENOENT`,无论是否带错误码)判为不可用;外部工具执行的命令不存在(command not found / not recognized)算一次普通失败,连续三次才隔离,不再当作输入错误。
|
|
27
|
+
- 与 refined ui 一致,子代理运行期间也算对话在运行:主代理交出这一轮后,输入框仍保持蓝光和冒泡,直到子代理结束。
|
|
28
|
+
- 输入框上方冒出的光点更多、稍大:频率翻倍,半径略增,样式不变。
|
|
29
|
+
|
|
30
|
+
- The composer glows blue while the conversation runs. 1.8.5 carried the animation, but the composer keeps focus after sending and the focus style's `!important` shadow beat the animation; the focus style now applies only when idle.
|
|
31
|
+
- The side card is white with blue accents: the host's own background (dark themes follow the host), light grey dividers and borders, and blue only on the selected environment, button outlines and the subagent status squares; text keeps the host's black and grey as elsewhere.
|
|
32
|
+
- Docked, the side card is no longer a floating card but a column split off the right of the conversation: flush with the edge, full height, with only a left divider. The conversation gives up that width, so its scrollbar stays visible. Opened from the narrow-window pill it is still a floating card.
|
|
33
|
+
- For a running subagent only the small status square flashes blue; the row itself does not glow, and the folded pill behaves the same. Reduced motion stops the flashing.
|
|
34
|
+
- Fix: a subagent's running state also follows the live session list. The parent's subagent catalog refreshes only when the official dropdown opens, so a running subagent used to show as idle.
|
|
35
|
+
- The upstream-declaration check no longer reads every 5 seconds: it runs when settings change and once before each Deep PTC conversation is created or resumed, right before the host resolves its preset; a changed declaration is re-derived first, so the new conversation gets the fresh preset. The check waits at most 5 seconds and never blocks on an error.
|
|
36
|
+
- The preset identity layer logs through the host logger instead of a fixed path on one machine (1.8.0–1.8.5 shipped a hard-coded Windows user directory).
|
|
37
|
+
- A tool that cannot start its own program (`spawn … ENOENT`, with or without the code) is unavailable; a command an external tool ran that is not installed (command not found / not recognized) is an ordinary failure, quarantined only after three in a row, instead of wrong input.
|
|
38
|
+
- As in dsh-refined-ui, a running subagent keeps the conversation working: after the main agent hands off its turn, the composer keeps its glow and bubbles until the subagent finishes.
|
|
39
|
+
- More, slightly larger sparks rise from the composer: twice as often and a little bigger, in the same style.
|
|
40
|
+
|
|
3
41
|
## 1.8.5 — 2026-11-09
|
|
4
42
|
|
|
5
43
|
- 插件实验台改为**始终开启**,移除设置开关:新建深度 PTC 会话会读取宿主创造模式并加载相对 PTC 的差量行。
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Deep PTC mode
|
|
2
2
|
|
|
3
|
-
[中文](README.zh.md) · MIT · **1.8.
|
|
3
|
+
[中文](README.zh.md) · MIT · **1.8.7**
|
|
4
4
|
|
|
5
5
|
[1.7.3 实测汇总 / Test summary](TEST_REPORT.md)
|
|
6
6
|
**Reports. Asks. Stays awake. Plans. Stays reachable.**
|
|
@@ -26,7 +26,7 @@ Not every third-party plugin is guaranteed to fit: the interface is verified for
|
|
|
26
26
|
|
|
27
27
|
### 1. Dynamic preset and tool loading
|
|
28
28
|
|
|
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
|
|
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, 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
30
|
|
|
31
31
|
### 2. Flexible creative-mode tools
|
|
32
32
|
|
|
@@ -66,18 +66,20 @@ After each turn, a card at the end of that turn in the conversation (where offic
|
|
|
66
66
|
- 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
67
|
- 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
68
|
|
|
69
|
-
##
|
|
69
|
+
## Visual effects and side card
|
|
70
70
|
|
|
71
71
|
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
72
|
|
|
73
73
|
- 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
74
|
- 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
|
-
- Motion:
|
|
76
|
-
-
|
|
77
|
-
- **Execution environment
|
|
75
|
+
- 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
|
+
- Each Deep PTC conversation has a **side card** on the right.
|
|
77
|
+
- **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.
|
|
78
|
+
- **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
79
|
- **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.
|
|
80
|
+
- **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
81
|
- **Tool state**: the “Reload all tool states” button and, when present, the failed external tools.
|
|
80
|
-
In a narrow conversation the card folds into a small pill. It can be collapsed, and that choice is kept on this machine.
|
|
82
|
+
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
83
|
- While the standalone dsh-refined-ui is still running, this plugin does not draw the same look a second time.
|
|
82
84
|
|
|
83
85
|
## 1.7.2: lightweight, on-demand tool orchestration
|
|
@@ -135,6 +137,7 @@ Open **Settings → Plugins → Deep PTC**, choose an environment, save, and cre
|
|
|
135
137
|
| Automatic | Windows / macOS / Linux | PowerShell on Windows, Zsh on macOS, Bash on Linux |
|
|
136
138
|
| WSL Bash | Windows | Explicit `wsl.exe ... --exec bash -lc`, tool `bash` |
|
|
137
139
|
| PowerShell | Windows | Official native PowerShell executor, tool `pwsh` |
|
|
140
|
+
| Native Bash | Windows | An absolute path to `bash.exe`, such as the Niubash binary bundled with `dsh-ops` |
|
|
138
141
|
| Zsh | macOS / Linux | `/bin/zsh -lc` on macOS; installed `zsh` on Linux; tool `zsh` |
|
|
139
142
|
| Native Bash | macOS / Linux | Official Bash executor, tool `bash` |
|
|
140
143
|
|
|
@@ -146,9 +149,9 @@ WSL source uses Linux/POSIX syntax, while file tools and `workdir` use Windows h
|
|
|
146
149
|
|
|
147
150
|
### Sandbox behavior
|
|
148
151
|
|
|
149
|
-
Native PowerShell
|
|
152
|
+
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
153
|
|
|
151
|
-
PowerShell, Bash and Zsh can use a
|
|
154
|
+
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
155
|
|
|
153
156
|
## Plugin lab: official creative mode, in memory
|
|
154
157
|
|
|
@@ -196,10 +199,10 @@ A prompt changes the model's working tendency, not the real token limit or billi
|
|
|
196
199
|
|
|
197
200
|
## Install or upgrade
|
|
198
201
|
|
|
199
|
-
Requires Node `>=24` and DSH
|
|
202
|
+
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
203
|
|
|
201
204
|
```js
|
|
202
|
-
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.8.
|
|
205
|
+
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.8.7" })
|
|
203
206
|
// Or from a local checkout or archive:
|
|
204
207
|
plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
|
|
205
208
|
// Or target: "C:\\path\\to\\dsh-deep-ptc-mode-1.8.5.tgz"
|
package/README.zh.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 深度 PTC 模式
|
|
2
2
|
|
|
3
|
-
[English](README.md) · MIT ·
|
|
3
|
+
[English](README.md) · MIT · 当前版本 **1.8.7**
|
|
4
4
|
|
|
5
5
|
[1.7.3 实测汇总 / Test summary](TEST_REPORT.md)
|
|
6
6
|
**会汇报,先提问,不休眠,有计划,能插话。**
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
### 1. 预设与工具的动态读取
|
|
28
28
|
|
|
29
|
-
运行时读取宿主正在发布的官方 PTC 声明,官方行原样继承;仅替换 persona、执行组、可达性守卫、job
|
|
29
|
+
运行时读取宿主正在发布的官方 PTC 声明,官方行原样继承;仅替换 persona、执行组、可达性守卫、job 与提问包装。在设置变更时、以及每个深度PTC对话创建或恢复之前确认一次声明,仅在声明或配置变化时重建,不再定时轮询;声明读不到/解析失败才用随包快照并记录日志。官方升级后无需为本模式发版即可继承新工具;新建会话使用新版,已有会话不强制切换。
|
|
30
30
|
|
|
31
31
|
### 2. 创造模式工具的灵活加入
|
|
32
32
|
|
|
@@ -66,18 +66,20 @@
|
|
|
66
66
|
- 卡片会跟踪官方 `skill` 工具直接加载,以及 `run_code` 内 PTC 子调用加载的 Skill;后者通常只进入程序而非模型上下文,关闭时只从卡片移除,不重写程序输出。`/name` 注入暂不纳入。
|
|
67
67
|
- 切换开关不会在对话里留下命令回显(会话日志仍记录这次操作);只有切换失败时,原位显示一行错误。
|
|
68
68
|
|
|
69
|
-
##
|
|
69
|
+
## 界面特效与侧边卡片
|
|
70
70
|
|
|
71
71
|
dsh-refined-ui 的界面精修并入本插件,**只在当前显示的是深度PTC会话时生效**,切到其他模式或新会话页时恢复官方原样:
|
|
72
72
|
|
|
73
73
|
- 明暗两套更克制的中性色、中文优先字体、细滚动条;悬浮的输入框卡片,聚焦时出现流动的蓝色细线;蓝色渐变发送键;淡蓝渐变的用户气泡;更宽松的助手正文;侧栏悬停与选中的蓝色底。
|
|
74
74
|
- 交互:Ctrl/⌘+K 命令面板(跳转会话、新会话、插件、自动化任务)、指针追光、点击涟漪、磁吸发送键、`/` 聚焦输入框、Alt+↑/↓ 切换会话、Ctrl+Alt+D 诊断。
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
75
|
+
- 动效:对话运行时输入框边框转蓝并呼吸发光(聚焦时也不例外),发送键光环,输入框上方持续冒出光点,发送与完成时的光点;全部遵循系统的“减少动态效果”。
|
|
76
|
+
- 深度 PTC 会话在对话区右侧显示**侧边卡片**。
|
|
77
|
+
- **执行环境**可选择 WSL、PowerShell、原生 Bash 或 Zsh,选项取决于宿主系统。和设置页写同一份宿主设置,对之后新建的深度 PTC 会话生效。
|
|
78
|
+
- **界面特效**开关即时关闭界面美化与动画,选择保存在当前客户端。使用外部主题或 UI 插件时,建议关闭。
|
|
78
79
|
- **子代理**(有子代理时才出现):名称、状态、用时和 token,按官方子代理目录与计时数据计算;点击一行在官方右侧栏打开该子代理的对话。
|
|
80
|
+
- **后台任务**显示当前会话的运行和结束状态。默认最多六个位置,运行中优先且最多五条,已结束最多三条。超出部分合为一条可展开的记录,显示隐藏任务数量。
|
|
79
81
|
- **工具状态**:“重载所有工具状态”按钮,以及调用失败的外部工具(如有)。
|
|
80
|
-
|
|
82
|
+
侧栏为白底,浅灰色分割线,蓝色只用于选中项、按钮描边和状态小方块,文字与其他地方一样用黑色和灰色;运行中的子代理只有行首的状态小方块闪烁蓝光。对话区较窄时收成右上角的小胶囊,小方块同样会闪;卡片可收起,选择记在本机。
|
|
81
83
|
- 独立的 dsh-refined-ui 仍在运行时,本插件检测到它就不再重复绘制这一套样式。
|
|
82
84
|
|
|
83
85
|
## 1.7.2:轻量、按需、可恢复的工具调用层
|
|
@@ -135,18 +137,21 @@ const skills = await tools.deep_ptc_tools({ action: 'skills', query: 'build test
|
|
|
135
137
|
| 自动 | Windows / macOS / Linux | Windows 选 PowerShell,macOS 选 Zsh,Linux 选 Bash |
|
|
136
138
|
| WSL Bash | Windows | `wsl.exe ... --exec bash -lc`,工具名 `bash` |
|
|
137
139
|
| PowerShell | Windows | Harness 官方原生 PowerShell 执行器,工具名 `pwsh` |
|
|
140
|
+
| 原生 Bash | Windows | 填写 `bash.exe` 的绝对路径,可使用 `dsh-ops` 随包的 Niubash |
|
|
138
141
|
| Zsh | macOS / Linux | macOS 用 `/bin/zsh -lc`;Linux 用已安装的 `zsh`;工具名 `zsh` |
|
|
139
142
|
| 原生 Bash | macOS / Linux | Harness 官方 Bash 执行器,工具名 `bash` |
|
|
140
143
|
|
|
141
144
|
不适用于宿主的选项会禁用,运行时配置也会拒绝这些选择。WSL 发行版留空时使用 Windows 默认发行版,也可填写 `Ubuntu` 等已安装名称。Linux 上选择 Zsh 前需要安装 Zsh。
|
|
142
145
|
|
|
146
|
+
Windows 选择原生 Bash 时,可以填入 `<profile>/node_modules/dsh-ops/runtime/win32-x64/niubash/winuxcmd/bin/bash.exe` 的实际绝对路径。路径不可用时新会话保留官方 Shell。原生 Windows Bash 仅在宿主已授权的 `danger-full-access` 下执行,受限模式请选择 PowerShell。
|
|
147
|
+
|
|
143
148
|
**选择会改变实际执行器和模型看到的命令语法,不只改工具名称。** 执行器隔离在本 preset 中,不修改全局 shell,也不影响其他 preset。保存设置后,新会话使用新版本;已有会话和后台任务继续使用创建时的环境。切换环境时请新建会话,避免同一任务中途换方言。
|
|
144
149
|
|
|
145
150
|
WSL 命令使用 Linux/POSIX 语法;文件工具和 `workdir` 仍用 Windows 宿主路径。执行器用 `--cd` 进入目录,发行版、目录和命令分别作为 argv 传递,不额外拼接 shell 字符串。WSL 内的 PATH、代理等由所选发行版的登录 shell 配置决定,Windows 环境变量不会全部自动变成 Linux 环境变量。
|
|
146
151
|
|
|
147
152
|
### 沙箱边界
|
|
148
153
|
|
|
149
|
-
原生 PowerShell
|
|
154
|
+
原生 PowerShell 和 macOS/Linux 的 Shell 使用 Harness 的沙箱、审批和进程管理。Windows 的 WSL 与原生 Bash 仅在宿主已授权的 `danger-full-access` 下执行,受限模式请选择 PowerShell。
|
|
150
155
|
|
|
151
156
|
选择 PowerShell、Bash 或 Zsh 时,可以指定本机已经发现的常见可执行文件。留空则沿用官方查找顺序。WSL 仍只选择发行版。所选文件不存在时记一条警告并回到自动。PowerShell 的选择写入官方执行器的 `pwshPath`。Bash 和 Zsh 只改启动参数。
|
|
152
157
|
|
|
@@ -196,12 +201,12 @@ WSL 命令使用 Linux/POSIX 语法;文件工具和 `workdir` 仍用 Windows
|
|
|
196
201
|
|
|
197
202
|
## 安装和升级
|
|
198
203
|
|
|
199
|
-
要求 Node `>=24`、DSH
|
|
204
|
+
要求 Node `>=24`、DSH `>=0.2.2-rc.1`。使用 `0.2.1-rc.5` 时,安装器会根据插件清单拒绝安装当前版本。macOS/Zsh 分支做了配置、工具挂载与参数测试,尚未在 macOS 真机执行。
|
|
200
205
|
|
|
201
206
|
本地目录或构建产物可通过插件管理器安装:
|
|
202
207
|
|
|
203
208
|
```js
|
|
204
|
-
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.8.
|
|
209
|
+
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.8.7" })
|
|
205
210
|
// 也可从本地目录或安装包安装:
|
|
206
211
|
plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
|
|
207
212
|
// 或 target: "C:\\path\\to\\dsh-deep-ptc-mode-1.8.5.tgz"
|