dsh-deep-ptc-mode 1.8.2 → 1.8.6
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 +51 -0
- package/LICENSE +0 -0
- package/README.md +43 -10
- package/README.zh.md +43 -10
- package/TEST_REPORT.md +0 -0
- package/assets/icon.png +0 -0
- package/compatibility.json +0 -0
- package/cordis.patch.yml +0 -0
- package/lib/adapt.mjs +0 -0
- package/lib/ask-user.mjs +0 -0
- package/lib/base-snapshot.json +0 -0
- package/lib/client.js +1123 -25
- package/lib/creative.mjs +0 -0
- package/lib/environment.mjs +0 -0
- package/lib/executor.mjs +0 -0
- package/lib/freshness.mjs +31 -0
- package/lib/guard.mjs +0 -0
- package/lib/host.mjs +0 -0
- package/lib/index.mjs +45 -16
- package/lib/jobs-tool.mjs +0 -0
- package/lib/lab.mjs +0 -0
- package/lib/lifecycle.mjs +0 -0
- package/lib/model.mjs +0 -0
- package/lib/official-names.mjs +0 -0
- package/lib/preset-compat.mjs +5 -3
- package/lib/preset.json +2 -2
- package/lib/reachable.mjs +0 -0
- package/lib/resident.mjs +0 -0
- package/lib/rules.mjs +0 -0
- package/lib/shells.mjs +0 -0
- package/lib/skill-card.mjs +217 -0
- package/lib/skill-context.mjs +89 -0
- package/lib/sleep-lint.mjs +0 -0
- package/lib/terminal.mjs +0 -0
- package/lib/tool-catalog.mjs +0 -0
- package/lib/tool-compatibility.mjs +14 -14
- package/lib/tool-policy.mjs +7 -2
- package/lib/tool-state.mjs +51 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.8.6 — 2026-11-09
|
|
4
|
+
|
|
5
|
+
- 运行中的输入框泛蓝光:对话运行时输入框边框转蓝并持续呼吸发光。1.8.5 已移植这段动效,但发送后输入框处于聚焦状态,聚焦样式的 `!important` 阴影压过了动画,所以看不到;现在聚焦样式只在空闲时生效。
|
|
6
|
+
- 侧边卡片改为白底蓝点缀:底色与宿主一致(暗色主题跟随宿主深色),分割线与边框为浅灰色,只有选中的执行环境、按钮描边和子代理状态小方块用蓝色;文字与其他地方一样用宿主的黑色与灰色。
|
|
7
|
+
- 侧边卡片停靠时不再是悬浮卡片,而是从对话区右侧分出的一栏:贴住右边缘、上下通高,只留左侧分隔线;对话区让出这一栏的宽度,滚动条不会被遮住。窄屏收起的小胶囊点开后仍是悬浮卡片。
|
|
8
|
+
- 运行中的子代理只有行首的状态小方块闪烁蓝光,整行不发光;收起成小胶囊时也一样。系统开启“减少动态效果”时停止闪烁。
|
|
9
|
+
- 修复:子代理的运行状态改为同时参考会话列表里的实时状态。父会话的子代理目录只在打开官方下拉框时刷新,之前正在运行的子代理会显示为“空闲”。
|
|
10
|
+
- 官方声明的升级检测不再每 5 秒读一次:只在设置变更时,以及每个深度PTC对话创建或恢复、宿主确定预设之前确认一次;声明有变化时先重新派生,新对话直接用上最新预设。确认最多等 5 秒,出错或超时都照常继续。
|
|
11
|
+
- 预设身份兼容层的诊断改写到宿主日志,不再写入固定的本机路径(此前 1.8.0–1.8.5 的包里带有一个写死的 Windows 用户目录)。
|
|
12
|
+
- 工具启动自己的程序失败(`spawn … ENOENT`,无论是否带错误码)判为不可用;外部工具执行的命令不存在(command not found / not recognized)算一次普通失败,连续三次才隔离,不再当作输入错误。
|
|
13
|
+
- 与 refined ui 一致,子代理运行期间也算对话在运行:主代理交出这一轮后,输入框仍保持蓝光和冒泡,直到子代理结束。
|
|
14
|
+
- 输入框上方冒出的光点更多、稍大:频率翻倍,半径略增,样式不变。
|
|
15
|
+
|
|
16
|
+
- 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.
|
|
17
|
+
- 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.
|
|
18
|
+
- 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.
|
|
19
|
+
- 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.
|
|
20
|
+
- 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.
|
|
21
|
+
- 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.
|
|
22
|
+
- 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).
|
|
23
|
+
- 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.
|
|
24
|
+
- 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.
|
|
25
|
+
- More, slightly larger sparks rise from the composer: twice as often and a little bigger, in the same style.
|
|
26
|
+
|
|
27
|
+
## 1.8.5 — 2026-11-09
|
|
28
|
+
|
|
29
|
+
- 插件实验台改为**始终开启**,移除设置开关:新建深度 PTC 会话会读取宿主创造模式并加载相对 PTC 的差量行。
|
|
30
|
+
- 旧 profile 中的 `pluginLab` 键仅为兼容保留,值会被忽略;创造模式读不到或进入安全模式时,会话仍只使用 PTC 工具。
|
|
31
|
+
- 设置页不再显示插件实验台选项;其余执行环境与工具设置不变。
|
|
32
|
+
- persona 删去“在 DeepSeek / 深度求索工作”的公司身份表述,改为“你拥有 unlimited token”;预算与反注水规则不变。
|
|
33
|
+
- 新增 Skill 上下文卡片:每轮结束只列当前仍加载、未关闭的 Skill,提供逐项滑动开关与“全部保留 / 全部关闭”;下一条消息发送时固定,关闭项在下轮前从模型上下文移除,历史仍完整保留。卡片同时识别官方 `skill` 工具与 `run_code` 内 PTC 子调用加载的 Skill。状态投影在插件根部注册并按会话 header 激活,升级后已有 Deep PTC 会话也能恢复卡片。
|
|
34
|
+
|
|
35
|
+
- Make the plugin lab **always on** and remove the settings toggle: a new Deep PTC session reads the host creative preset and appends only the rows it adds.
|
|
36
|
+
- Keep the legacy `pluginLab` key accepted but ignored; if the creative preset cannot be read or the preset enters safe mode, the session keeps the PTC tools only.
|
|
37
|
+
- No plugin-lab option is shown in settings; execution-environment and tool settings are unchanged.
|
|
38
|
+
- Remove the “works at DeepSeek” company identity from the persona and state “you have an unlimited token budget” instead; the budget and anti-padding rules are unchanged.
|
|
39
|
+
- Add the skill context card: after each turn it lists only the skills still loaded and not closed, with per-skill switches and Keep all / Close all. The choice is fixed when the next message is sent; closed skills leave the model context before the next turn while the durable history stays complete. It recognises both direct `skill` tool results and skills loaded by a PTC inner call inside `run_code`. The state is registered at the plugin root and activated by the session header, so existing Deep PTC sessions recover it after an upgrade.
|
|
40
|
+
- Keep every runtime feature inside the `deep-ptc` preset/session: other modes only see the plugin settings page; the client dock returns null before reading Deep PTC projections or mounting controls.
|
|
41
|
+
- 重做 Skill 卡片并移到对话区:挂在最新一轮末尾(官方计划卡片所在的 `conversation.chat.turnTail`),不再塞在输入框下方挤占状态栏;按宿主设计变量重绘卡片、按钮与开关,提示将被移除的数量,超过 4 个折叠。
|
|
42
|
+
- 并入 dsh-refined-ui 的界面精修(换肤、输入框与发送键、气泡、侧栏、Ctrl+K、追光、涟漪、磁吸、快捷键、动效、诊断),只在当前显示深度PTC会话时生效;检测到独立的 refined ui 仍在运行时不重复绘制。
|
|
43
|
+
- 切换 Skill 开关不再在对话里显示 `deep-ptc-skill-state` 命令回显:为该命令登记官方 `conversation.chat.commandview` 渲染器,成功时不显示,失败时原位显示错误;会话日志照常记录。
|
|
44
|
+
- 不并入 refined ui 的任务星图浮窗,改为对话区右侧的子代理面板:按官方子代理目录与计时数据显示状态、用时与 token,点击在官方右侧栏打开子代理对话;窄屏收成胶囊。
|
|
45
|
+
- Rebuild the skill card in the conversation: it sits at the end of the latest turn (`conversation.chat.turnTail`, where official plan cards appear) instead of under the composer, uses the host design tokens, counts the skills about to leave, and folds after four rows.
|
|
46
|
+
- Merge the dsh-refined-ui look and interactions, active only while a Deep PTC conversation is on screen; the standalone plugin is not drawn twice.
|
|
47
|
+
- Skill switches no longer leave a `deep-ptc-skill-state` command row in the conversation: the plugin registers an official `conversation.chat.commandview` renderer that shows nothing on success and the error on failure; the session log still records the command.
|
|
48
|
+
- 侧边卡片收纳执行环境切换(写同一份宿主设置,对新建会话生效)、子代理列表和“重载所有工具状态”;输入框下方不再放任何深度PTC控件。
|
|
49
|
+
- 修复:工具状态与重载命令原先注册在预设内部,会话闲置时客户端读不到状态、命令也不被受理,重载按钮因此一直不显示或点了无效。现改为与 Skill 卡片一样在插件根部注册,预设层复用这份状态;根部不可用时预设层退回自行注册。
|
|
50
|
+
- The side card holds the execution-environment switch (the same host settings, for new sessions), the subagent list and “Reload all tool states”; nothing from Deep PTC sits under the composer any more.
|
|
51
|
+
- Fix: the tool state and the reset command were registered inside the preset, so an idle conversation could neither read the state nor accept the command, and the reload button stayed hidden or did nothing. They are now registered at the plugin root like the skill card, and the preset layer reuses that state, falling back to its own registration when the root one is unavailable.
|
|
52
|
+
- Replace refined ui's floating task windows with a subagent panel beside the conversation, fed by the official subagent catalog and timing data; a row opens the official subagent chat in the right sidebar.
|
|
53
|
+
|
|
3
54
|
## 1.8.2 — 2026-11-07
|
|
4
55
|
|
|
5
56
|
- 修正 npm 元数据:描述控制在 registry 的 255 字符以内,避免被截断;仅描述变更,不改变行为。
|
package/LICENSE
CHANGED
|
File without changes
|
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.5**
|
|
4
4
|
|
|
5
5
|
[1.7.3 实测汇总 / Test summary](TEST_REPORT.md)
|
|
6
6
|
**Reports. Asks. Stays awake. Plans. Stays reachable.**
|
|
@@ -30,7 +30,7 @@ Read the running host's official PTC declaration and inherit its rows as they ar
|
|
|
30
30
|
|
|
31
31
|
### 2. Flexible creative-mode tools
|
|
32
32
|
|
|
33
|
-
The plugin lab is
|
|
33
|
+
The plugin lab is always on for a session. It reads the host's creative preset and appends only the rows that mode adds, specifically for building DSH plugins. Module names stay as declared; skill directories resolve relative to the creative preset file. Lab packages stay in process memory, are not written to the repository, shipped presets, desktop composition or this plugin's source, and run only through the host's existing approval. Loading reads the roster and documents only; it never calls `composedPreset`.
|
|
34
34
|
|
|
35
35
|
### 3. dsh-go screen-control adaptation
|
|
36
36
|
|
|
@@ -48,10 +48,38 @@ This is the core interface: external plugins publish tools under their own contr
|
|
|
48
48
|
|
|
49
49
|
### 6. Leaner skill and tool loading
|
|
50
50
|
|
|
51
|
+
Each turn ends with a skill context card that lists only the skills still loaded and not closed, so the user decides what stays for the next turn.
|
|
52
|
+
|
|
51
53
|
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.
|
|
52
54
|
|
|
53
55
|
Three steps: install the plugin → choose an environment under **Settings → Plugins → Deep PTC** → choose **深度PTC模式** in the mode picker for a new task.
|
|
54
56
|
|
|
57
|
+
## Skill context card (1.8.5)
|
|
58
|
+
|
|
59
|
+
After each turn, a card at the end of that turn in the conversation (where official plan cards appear) lists only the skills that are **still in context and not closed** — not the whole skill catalog. Each row shows the name, description and a switch, on by default; the card also offers **Keep all / Close all** and says how many skills leave after the next message. More than four rows fold behind “Show all”. Only the latest turn shows the card.
|
|
60
|
+
|
|
61
|
+
- A switch changes the next turn only. It is fixed when you send the next message and applied before the first model step of that turn.
|
|
62
|
+
- A kept skill stays in context without a reload; a closed skill has its tool-result body replaced with a short marker, while the durable log and human transcript keep the original text.
|
|
63
|
+
- A closed skill disappears from later cards until the model loads it again.
|
|
64
|
+
- If a new task really needs it, the model calls `skill` again and the card lists it after that turn.
|
|
65
|
+
- The state is registered at the plugin root, so an existing Deep PTC session also rebuilds it from history after an upgrade; no new session is required.
|
|
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
|
+
- 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
|
+
|
|
69
|
+
## Refined look and side card (1.8.5)
|
|
70
|
+
|
|
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
|
+
|
|
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
|
+
- 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: 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
|
+
- The floating task windows of dsh-refined-ui are replaced by a **side card split off the right of the conversation** in every Deep PTC session (flush with the edge, full height; the conversation gives up that width), with three parts:
|
|
77
|
+
- **Execution environment**: Auto / WSL / PowerShell on Windows (Auto / Zsh / Bash on macOS and Linux), the WSL distribution, and a discovered shell version. It writes the same host settings form as the settings page and applies to Deep PTC sessions created afterwards; the current session keeps the environment it was created with.
|
|
78
|
+
- **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.
|
|
79
|
+
- **Tool state**: the “Reload all tool states” button and, when present, the failed external tools.
|
|
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
|
+
- While the standalone dsh-refined-ui is still running, this plugin does not draw the same look a second time.
|
|
82
|
+
|
|
55
83
|
## 1.7.2: lightweight, on-demand tool orchestration
|
|
56
84
|
|
|
57
85
|
One tool/skill directory, `deep_ptc_tools`, coordinates discovery. Task operations still belong to external providers and the current official PTC tools.
|
|
@@ -60,7 +88,7 @@ One tool/skill directory, `deep_ptc_tools`, coordinates discovery. Task operatio
|
|
|
60
88
|
- **Quarantine what is actually broken.** A tool that is clearly unavailable (a missing module or API, or a declared unavailable state) is quarantined at once; temporary and unexplained failures need three in a row, and a success clears the count. Wrong arguments or paths, denial, cancellation and normal results describing their own subject (such as a failed build) are not tool failures. Official tools are never quarantined, including those in the profile's root composition (such as `lsp` and `terminal_*`). After quarantine, execution is blocked in code and state persists with the session. Agent recreation, conversation restore and provider reload do not lift quarantine. Capture provenance and reset generation before dispatch; late pre-reset results cannot contaminate the new state. Empty results, normal pagination and ordinary nonzero command exits are not failures either.
|
|
61
89
|
- **Finish the task; do not diagnose failed providers.** Correct wrong input and retry a temporary failure at most twice. Once a tool is quarantined, move promptly to a working equivalent or official fallback, with no probing, retrying or root-cause investigation. Read back only the task state necessary to avoid duplicate effects after a potentially partial mutation.
|
|
62
90
|
- **Brief completion reporting.** The model lists failed tools and declared provider names at completion. The runtime also projects an expandable compatibility notice after a turn ends. Unknown ownership is reported as unknown, never inferred from a tool name.
|
|
63
|
-
- **Reload from
|
|
91
|
+
- **Reload from the side card.** “Reload all tool states” clears quarantine and on-demand selections for the current conversation without a model call or stopping running jobs. The user slash command `/deep-ptc-reset-tools` provides the same action. The tool state and this command are registered at the plugin root, like the skill card, so they work in an idle conversation too.
|
|
64
92
|
- **Two-stage skill use.** Search the host's resolved, model-invocable skill metadata, then load the exact name with the official `skill` tool and follow its full instructions. Reuse instructions already in context. Discovery never reads skill bodies.
|
|
65
93
|
|
|
66
94
|
```js
|
|
@@ -124,9 +152,9 @@ PowerShell, Bash and Zsh can use a common executable discovered on this machine.
|
|
|
124
152
|
|
|
125
153
|
## Plugin lab: official creative mode, in memory
|
|
126
154
|
|
|
127
|
-
Deep PTC is often used for programming, and it can also be used to design a DSH plugin. **Plugin lab
|
|
155
|
+
Deep PTC is often used for programming, and it can also be used to design a DSH plugin. **Plugin lab is always on for a session**; there is no toggle. An existing `pluginLab` key in the Cordis settings is accepted for compatibility but ignored.
|
|
128
156
|
|
|
129
|
-
|
|
157
|
+
The lab loads the official **creative mode** (创造模式) the same way it loads PTC: from the preset the running host publishes (`agentPresets.readDocument`, preferring the preset named 创造模式, otherwise the shipped id `cordis`). It appends only the rows that creative mode adds beyond the current PTC composition. Module names stay exactly as that document declares them, so an official rename follows the host instead of a name baked into this plugin. Skill directories that the creative preset expresses relative to its own file are resolved against that preset's directory. The desktop already mounts the host runner, so those rows are left to the host and are not copied a second time.
|
|
130
158
|
|
|
131
159
|
The lab is an environment for designing and trying a plugin in this process: inspect the live composition, define a syntax-checked package, then run it only through the host's existing approval. Packages stay in memory for this process. They do not write the repository, shipped presets, the desktop composition, or this plugin's source. Host approval stays as the host defined it. If the creative preset cannot be read, or a lab tool is missing or fails, the session continues with the official PTC tools.
|
|
132
160
|
|
|
@@ -138,7 +166,7 @@ External plugins are discovered from what they actually register. Tools and work
|
|
|
138
166
|
|
|
139
167
|
- Screen-control tools remain in the initial PTC SDK. They are not folded into the on-demand catalog and they are not quarantined after a failure. A tool qualifies when it sets `resident` (or `deepPtc.resident`), when its presentation carries the `dsh-go/view` key, when its name is `intent`, `collect`, `tap_xy`, or starts with `screen_`, or when its provider is marked as dsh-go, screen control, computer use, or phone control. Any other plugin can use the same `resident` flag. Ordinary extensions stay on demand.
|
|
140
168
|
- Deep PTC does not declare dsh-go's own slots and does not replace its settings. Those forms still come from the Cordis schema, so the app renders them itself.
|
|
141
|
-
- The
|
|
169
|
+
- The side card reads its own state first. If a projection is missing or the session belongs to another preset, that part is left out; a failure in the card leaves the conversation, the input row and the screen-control chrome in place.
|
|
142
170
|
|
|
143
171
|
Phone screen control was not clicked on a device for this release. The guarantee above is the SDK membership, the quarantine rule, and the composer failure path.
|
|
144
172
|
|
|
@@ -157,7 +185,7 @@ Limitation: this wraps the host's `agentPresets.composedPreset` instance and dep
|
|
|
157
185
|
|
|
158
186
|
## Working contract
|
|
159
187
|
|
|
160
|
-
- Spend the budget on the work: the persona
|
|
188
|
+
- Spend the budget on the work: the persona grants an unlimited token budget in this mode, so it does not skip reads, searches, commands or checks to save tokens. Guardrails forbid padding, and compaction, pruning and subagents keep each request inside its finite context window.
|
|
161
189
|
- Stay reachable while work runs: no sleeps, busy-polls or long foreground calls. Long commands run as background jobs while the model continues short steps and checks progress without blocking; with nothing left to do it states what is running and ends the turn. Job completion wakes it, and user messages are handled immediately.
|
|
162
190
|
- Plan by expected size: five minutes or less, plan internally and act; five to twenty minutes, show the plan and start without approval; more than twenty minutes, show the plan and wait for approval. Re-plan when the estimate moves up a band. Explicit plan mode always wins.
|
|
163
191
|
- Ask instead of guessing intent: meaning belongs to the user, facts to the tools. Unfamiliar names, competing targets or routes, authoritative sources, expected process, acceptance criteria and scope are asked about rather than guessed or searched for; inspectable facts are looked up. One to three questions with options, recommended first; the user's answer wins.
|
|
@@ -171,10 +199,10 @@ A prompt changes the model's working tendency, not the real token limit or billi
|
|
|
171
199
|
Requires Node `>=24` and DSH RC `>=0.2.2-rc.1` (the installed desktop). Alpha builds are not supported. Windows desktop rc.5 was used for real WSL/PowerShell command checks. macOS/Zsh configuration, argv and tool mounting were checked; native macOS execution has not been verified on this Windows host.
|
|
172
200
|
|
|
173
201
|
```js
|
|
174
|
-
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.8.
|
|
202
|
+
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.8.5" })
|
|
175
203
|
// Or from a local checkout or archive:
|
|
176
204
|
plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
|
|
177
|
-
// Or target: "C:\\path\\to\\dsh-deep-ptc-mode-1.8.
|
|
205
|
+
// Or target: "C:\\path\\to\\dsh-deep-ptc-mode-1.8.5.tgz"
|
|
178
206
|
```
|
|
179
207
|
|
|
180
208
|
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.
|
|
@@ -189,11 +217,16 @@ Settings persist through the active profile's Cordis patch:
|
|
|
189
217
|
environment: auto # auto | wsl | powershell | zsh | bash
|
|
190
218
|
wslDistribution: '' # blank uses the Windows default
|
|
191
219
|
shellExecutable: '' # blank keeps the official lookup
|
|
192
|
-
pluginLab: false # true loads the host's creative-mode rows
|
|
193
220
|
```
|
|
194
221
|
|
|
222
|
+
An existing `pluginLab` key is accepted but ignored. If the creative preset cannot be read, or the preset enters safe mode, the session keeps the PTC tools only.
|
|
223
|
+
|
|
195
224
|
Prefer the UI, which uses revisioned, atomic Host form writes.
|
|
196
225
|
|
|
226
|
+
## Mode isolation
|
|
227
|
+
|
|
228
|
+
Every runtime feature serves only `deep-ptc` sessions: the tool directory, tool state and execution environment are still mounted by the Deep PTC preset; the skill-card state projection is registered once at the plugin root, but its `init(header)` activates only when `agentPreset === 'deep-ptc'`, so other sessions keep an empty, non-folding state. The command, `agent/pre-step` and client dock each check the preset again. Other modes only see the plugin settings page; the preset-identity layer returns any non-`deep-ptc` exact id unchanged.
|
|
229
|
+
|
|
197
230
|
## Compatibility and development
|
|
198
231
|
|
|
199
232
|
Deep PTC is composed at load time from the PTC preset the installed Harness declares (`@deepseek-ai/dsh-web-app/presets/ptc.patch.yml`). Every official row is inherited as-is; Deep PTC replaces only its persona text, swaps the two platform-switched shell tools for one isolated execution group, adds the reachability guard, and wraps the official job and question tools. The wrappers and the execution group never name an official module themselves: they load the module the official row names (and the shell executors the base deployment declares in `@deepseek-ai/dsh-base/cordis.patch.yml`), with the official options. An official PTC change therefore reaches this mode without a plugin release, and a removed or renamed upstream module cannot leave a stale row behind. When the chosen execution environment cannot be mapped onto the official rows, those rows are kept and the change is logged. If the declaration cannot be resolved, read or parsed, the bundled `lib/preset.json` snapshot is used as a fallback and the fallback is logged.
|
package/README.zh.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 深度 PTC 模式
|
|
2
2
|
|
|
3
|
-
[English](README.md) · MIT · 当前版本:**1.8.
|
|
3
|
+
[English](README.md) · MIT · 当前版本:**1.8.5**
|
|
4
4
|
|
|
5
5
|
[1.7.3 实测汇总 / Test summary](TEST_REPORT.md)
|
|
6
6
|
**会汇报,先提问,不休眠,有计划,能插话。**
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
### 2. 创造模式工具的灵活加入
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
插件实验台随会话始终开启,读取宿主正在发布的创造模式,只追加相对 PTC 多出来的行,专门负责 DSH 本身的插件创造。模块名保持创造模式原文,官方改名时跟着宿主走;技能目录按创造模式文件位置解析。实验台包只留在本进程内存,不写仓库、已发布预设、桌面组合或插件源码,经宿主原有批准后运行。加载只读预设清单和文档,不调用 `composedPreset`。
|
|
34
34
|
|
|
35
35
|
### 3. 适配 dsh-go 的界面控制
|
|
36
36
|
|
|
@@ -48,10 +48,38 @@
|
|
|
48
48
|
|
|
49
49
|
### 6. Skill 与工具的读取流程优化
|
|
50
50
|
|
|
51
|
+
每轮结束还会给出 Skill 上下文卡片:只列当前仍加载、未关闭的 Skill,用户决定下一轮继续保留还是移除。
|
|
52
|
+
|
|
51
53
|
先搜摘要,再加载完整 schema:默认每页 6 项、最多 8 项;完整 schema 每次最多 6 个、总预算 16 KB;最多保留 12 个近期选择。故障按对话隔离:明确不可用立即禁用;临时错误连续 3 次才禁用,成功一次清零;参数错误、权限拒绝、业务失败不算故障;一键重载只清当前对话。Skill 两阶段:目录只查元数据与权限,正文交给官方 `skill` 工具,检索不读正文。
|
|
52
54
|
|
|
53
55
|
使用三步:安装插件 → 在 **设置 → 插件 → 深度 PTC** 里选执行环境 → 新建任务时在模式选择器里选「深度PTC模式」。
|
|
54
56
|
|
|
57
|
+
## Skill 上下文卡片(1.8.5)
|
|
58
|
+
|
|
59
|
+
每轮对话结束后,对话区里这一轮的末尾会显示一张卡片(和官方计划卡片同一位置),只列出**当前仍在上下文中、且没有被关闭**的 Skill,不列全量 Skill 目录。每项包含名称、描述和滑动开关,默认是开;顶部有“全部保留 / 全部关闭”,标题下会提示有几个将在下一条消息后移除。超过 4 个时折叠,可展开全部。卡片只出现在最新一轮,不会在历史轮次里重复。
|
|
60
|
+
|
|
61
|
+
- 开关只改变下一轮的选择,发送下一条消息时固定;新 turn 的第一个模型步骤前生效。
|
|
62
|
+
- 保留的 Skill 正文继续留在上下文,不重载;关闭的 Skill 把 tool result 正文替换成一句占位,持久日志和人类 transcript 仍保留完整原文。
|
|
63
|
+
- 关闭并移除后,该 Skill 不再出现在后续卡片中,直到模型重新加载它。
|
|
64
|
+
- 模型如果在新任务中确实需要它,重新调用 `skill` 即可;卡片会在该轮结束时重新列出。
|
|
65
|
+
- 卡片状态在插件根部注册,因此升级后已有的 Deep PTC 会话也会从历史事件重建,不需要新建会话。
|
|
66
|
+
- 卡片会跟踪官方 `skill` 工具直接加载,以及 `run_code` 内 PTC 子调用加载的 Skill;后者通常只进入程序而非模型上下文,关闭时只从卡片移除,不重写程序输出。`/name` 注入暂不纳入。
|
|
67
|
+
- 切换开关不会在对话里留下命令回显(会话日志仍记录这次操作);只有切换失败时,原位显示一行错误。
|
|
68
|
+
|
|
69
|
+
## 界面精修与侧边卡片(1.8.5)
|
|
70
|
+
|
|
71
|
+
dsh-refined-ui 的界面精修并入本插件,**只在当前显示的是深度PTC会话时生效**,切到其他模式或新会话页时恢复官方原样:
|
|
72
|
+
|
|
73
|
+
- 明暗两套更克制的中性色、中文优先字体、细滚动条;悬浮的输入框卡片,聚焦时出现流动的蓝色细线;蓝色渐变发送键;淡蓝渐变的用户气泡;更宽松的助手正文;侧栏悬停与选中的蓝色底。
|
|
74
|
+
- 交互:Ctrl/⌘+K 命令面板(跳转会话、新会话、插件、自动化任务)、指针追光、点击涟漪、磁吸发送键、`/` 聚焦输入框、Alt+↑/↓ 切换会话、Ctrl+Alt+D 诊断。
|
|
75
|
+
- 动效:对话运行时输入框边框转蓝并呼吸发光(聚焦时也不例外),发送键光环,输入框上方持续冒出光点,发送与完成时的光点;全部遵循系统的“减少动态效果”。
|
|
76
|
+
- 原插件的“任务星图”浮窗不并入,改为深度PTC会话里**从对话区右侧分出的一栏侧边卡片**(贴住右边缘、上下通高,对话区让出这一栏),分三块:
|
|
77
|
+
- **执行环境**:Windows 上是 自动 / WSL / PowerShell(macOS、Linux 上是 自动 / Zsh / Bash),以及 WSL 发行版和已发现的 Shell 版本。和设置页写同一份宿主设置,对之后新建的深度PTC会话生效;当前会话保持创建时的环境。
|
|
78
|
+
- **子代理**(有子代理时才出现):名称、状态、用时和 token,按官方子代理目录与计时数据计算;点击一行在官方右侧栏打开该子代理的对话。
|
|
79
|
+
- **工具状态**:“重载所有工具状态”按钮,以及调用失败的外部工具(如有)。
|
|
80
|
+
侧栏为白底,浅灰色分割线,蓝色只用于选中项、按钮描边和状态小方块,文字与其他地方一样用黑色和灰色;运行中的子代理只有行首的状态小方块闪烁蓝光。对话区较窄时收成右上角的小胶囊,小方块同样会闪;卡片可收起,选择记在本机。
|
|
81
|
+
- 独立的 dsh-refined-ui 仍在运行时,本插件检测到它就不再重复绘制这一套样式。
|
|
82
|
+
|
|
55
83
|
## 1.7.2:轻量、按需、可恢复的工具调用层
|
|
56
84
|
|
|
57
85
|
本版增加一个工具与 Skill 的目录入口 `deep_ptc_tools`,具体任务继续交给外部插件和当前官方 PTC 工具完成。
|
|
@@ -60,7 +88,7 @@
|
|
|
60
88
|
- **确认损坏才禁用。** 工具明确不可用(如模块缺失、接口不存在、声明不可用)时立即禁用;临时错误和原因不明的失败连续 3 次才禁用,中间成功一次就清零。参数错误、路径错误、权限拒绝、取消,以及工具正常返回的业务结果(如“构建失败”)都不算工具故障。官方工具不参与禁用,包括配置根层的官方工具(如 `lsp`、`terminal_*`)。禁用后由程序拦截后续调用,故障记录随对话保存;切换 agent、恢复对话或重载插件不会自动解除。调用开始时捕获来源和状态代次,用户重载前的迟到结果不会污染新状态。普通空结果、分页续读和命令非零退出同样不算故障。
|
|
61
89
|
- **任务优先,不查坏工具。** 输入有误就改正,临时错误最多重试两次;工具一旦被禁用,就尽快改用其他可用同类工具或官方工具,不再探测、重试或查根因。仅在写入或命令可能已部分完成时核查必要的任务状态,避免重复操作。
|
|
62
90
|
- **完成时简报。** 模型结束任务时简短列出失败工具与已声明的插件来源;程序同时在回合结束后生成可展开的“工具适配提醒”。来源不明就列工具名,不猜插件身份或故障原因。
|
|
63
|
-
-
|
|
91
|
+
- **侧边卡片一键重载。** “重载所有工具状态”仅清除当前对话的故障标记与按需加载选择;不调用模型,也不停止正在运行的任务。另有用户命令 `/deep-ptc-reset-tools`。工具状态和这条命令与 Skill 卡片一样在插件根部注册,闲置的会话里也能用。
|
|
64
92
|
- **Skill 两阶段调用。** 目录只查询宿主已解析的技能元数据和调用权限;选中后使用官方 `skill` 工具加载正文并遵守完整指令,复用上下文中已有指令。检索不读取 Skill 正文。
|
|
65
93
|
|
|
66
94
|
```js
|
|
@@ -124,9 +152,9 @@ WSL 命令使用 Linux/POSIX 语法;文件工具和 `workdir` 仍用 Windows
|
|
|
124
152
|
|
|
125
153
|
## 插件实验台:官方创造模式,只在内存里试
|
|
126
154
|
|
|
127
|
-
深度 PTC 经常用来编程,也可以用来设计和试写 DSH
|
|
155
|
+
深度 PTC 经常用来编程,也可以用来设计和试写 DSH 插件。**插件实验台随会话始终开启**,不再提供开关;新建深度 PTC 会话后即可使用。旧 Cordis 配置里的 `pluginLab` 键仅为兼容保留,值会被忽略。
|
|
128
156
|
|
|
129
|
-
|
|
157
|
+
深度 PTC 用和官方 PTC 相同的方式读取宿主正在发布的**创造模式**:走 `agentPresets.readDocument`,优先名称正好是「创造模式」的预设,否则用已随宿主发布的 id `cordis`。只追加创造模式相对当前 PTC 多出来的那些行。模块名保持该预设原文,官方以后改名时跟着宿主走,不把包名写死在本插件里。创造模式技能目录如果写成相对它自己文件的位置,就按那个预设所在目录解析。桌面端已经挂了宿主运行器,这些行留给宿主,不在深度 PTC 里再挂一份。
|
|
130
158
|
|
|
131
159
|
实验台用来在当前进程里设计和试运行插件:检查当前组合,定义一个通过语法检查的包,再经宿主原有的批准后运行。包只留在本进程内存里,不写入仓库、已发布预设、桌面端组合或本插件源码。宿主的批准保持原样。创造模式预设读不到,或实验工具缺失、失败时,会话继续使用官方 PTC 工具。
|
|
132
160
|
|
|
@@ -138,7 +166,7 @@ WSL 命令使用 Linux/POSIX 语法;文件工具和 `workdir` 仍用 Windows
|
|
|
138
166
|
|
|
139
167
|
- 屏幕控制工具留在初始 PTC SDK 里,不收进按需目录,失败后也不隔离。满足下面任一条件即可:工具自己标了 `resident`(或 `deepPtc.resident`);展示信息带有 `dsh-go/view`;名称是 `intent`、`collect`、`tap_xy`,或以 `screen_` 开头;提供者标记为 dsh-go、屏幕控制、computer use 或手机控制。其他插件也可以用同一个 `resident` 标记把自己留在初始列表。普通扩展仍按需加载。
|
|
140
168
|
- 深度 PTC 不声明 dsh-go 自己的槽位,也不替换它的设置表单。表单仍来自 Cordis schema,由应用自己渲染。
|
|
141
|
-
-
|
|
169
|
+
- 侧边卡片先读自己的状态。投影缺失或会话不属于本预设时,对应部分不显示;卡片出错不会拆掉对话、输入区和屏幕控制界面。
|
|
142
170
|
|
|
143
171
|
本版没有在真机上点过手机屏幕控制。上面保证的是 SDK 成员资格、隔离规则,以及界面投影失败时的退让。
|
|
144
172
|
|
|
@@ -157,7 +185,7 @@ WSL 命令使用 Linux/POSIX 语法;文件工具和 `workdir` 仍用 Windows
|
|
|
157
185
|
|
|
158
186
|
## 工作规则
|
|
159
187
|
|
|
160
|
-
- **不为 token 省力:**
|
|
188
|
+
- **不为 token 省力:** 人设写明你拥有 unlimited token、本模式预算无限,按问题需要而不是成本决定读取、搜索、命令和验证的深度;同时禁止注水和啰嗦,单次上下文仍有限,靠压缩、裁剪和子代理控制。
|
|
161
189
|
- **任务运行中随时可插话:** 由代码强制(见上文),提示词同时要求:不 sleep、不轮询、不挂长时间前台调用。构建、测试、安装、服务器等耗时命令放后台 job,期间继续做短步骤,用不阻塞的方式查看进度;没事可做就一句话说明在跑什么并结束回合,job 完成会自动唤醒模型,你的消息会被立即处理。
|
|
162
190
|
- **按任务长短计划:** ≤5 分钟内部计划直接做,不单独告知;5–20 分钟展示计划后立即执行,不等审批;>20 分钟展示计划并等你批准再改动。估计升档时重新说明计划;显式 plan mode 的规则优先。
|
|
163
191
|
- **意图不清先问:** 意思归用户,事实归工具。不认识的名称、多个可能目标、技术路线、权威来源、做事方式、验收标准和范围不确定时先问,不用搜索去猜你的术语;文件位置、当前行为、版本等可检查的事实自己查。每次 1–3 个带选项的问题,推荐项在前;你的回答优先于模型推断。
|
|
@@ -173,10 +201,10 @@ WSL 命令使用 Linux/POSIX 语法;文件工具和 `workdir` 仍用 Windows
|
|
|
173
201
|
本地目录或构建产物可通过插件管理器安装:
|
|
174
202
|
|
|
175
203
|
```js
|
|
176
|
-
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.8.
|
|
204
|
+
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.8.5" })
|
|
177
205
|
// 也可从本地目录或安装包安装:
|
|
178
206
|
plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
|
|
179
|
-
// 或 target: "C:\\path\\to\\dsh-deep-ptc-mode-1.8.
|
|
207
|
+
// 或 target: "C:\\path\\to\\dsh-deep-ptc-mode-1.8.5.tgz"
|
|
180
208
|
```
|
|
181
209
|
|
|
182
210
|
GitHub 地址:`github:lishize20040802-rgb/dsh-deep-ptc-mode`。该地址安装远端实际内容;本地升级不会自动发布到 GitHub/npm。
|
|
@@ -191,11 +219,16 @@ GitHub 地址:`github:lishize20040802-rgb/dsh-deep-ptc-mode`。该地址安装
|
|
|
191
219
|
environment: wsl # auto | wsl | powershell | zsh | bash
|
|
192
220
|
wslDistribution: Ubuntu # 留空为 Windows 默认发行版
|
|
193
221
|
shellExecutable: '' # 留空沿用官方查找
|
|
194
|
-
pluginLab: false # true 时加载宿主创造模式多出来的行
|
|
195
222
|
```
|
|
196
223
|
|
|
224
|
+
旧 profile 里的 `pluginLab` 键会被接受但忽略;创造模式读不到或进入安全模式时,会话仍只使用 PTC 工具。
|
|
225
|
+
|
|
197
226
|
优先使用界面保存,宿主会处理版本冲突和原子配置写入。
|
|
198
227
|
|
|
228
|
+
## 模式隔离
|
|
229
|
+
|
|
230
|
+
所有运行期功能只服务 `deep-ptc` 会话:工具目录、工具状态、执行环境仍由 Deep PTC 预设挂载;Skill 卡片的状态投影在插件根部注册一次,但 `init(header)` 只在 `agentPreset === 'deep-ptc'` 时激活,非 Deep PTC 会话的状态恒为空且不折叠任何事件。命令、`agent/pre-step` 和客户端 dock 还会各自检查 preset。其他模式只看到插件设置页;preset 身份兼容层对非 `deep-ptc` 的精确 id 直接原样返回。
|
|
231
|
+
|
|
199
232
|
## 兼容性与维护
|
|
200
233
|
|
|
201
234
|
Deep PTC 在加载时依据已安装 Harness 声明的 PTC 预设(`@deepseek-ai/dsh-web-app/presets/ptc.patch.yml`)现场组合:官方行原样继承,仅替换 persona 文本、把两个互斥 shell 工具换成一个带 `shell` 隔离的执行组、加入可达性守卫,并包装官方 job 与提问工具。包装层和执行组自身不写死任何官方模块名:加载的都是官方行里写的模块(shell 执行器取自基础部署声明 `@deepseek-ai/dsh-base/cordis.patch.yml`),并沿用官方配置。官方怎么改 PTC,本模式无需发版即可继承;官方改名或删除的模块也不会留下失效行。所选执行环境无法对应到官方行时,保留官方 shell 行并在日志中说明。只有在该声明无法解析、读取或解析失败时,才退回内置的 `lib/preset.json` 快照,并在日志中说明。
|
package/TEST_REPORT.md
CHANGED
|
File without changes
|
package/assets/icon.png
CHANGED
|
File without changes
|
package/compatibility.json
CHANGED
|
File without changes
|
package/cordis.patch.yml
CHANGED
|
File without changes
|
package/lib/adapt.mjs
CHANGED
|
File without changes
|
package/lib/ask-user.mjs
CHANGED
|
File without changes
|
package/lib/base-snapshot.json
CHANGED
|
File without changes
|