dsh-deep-ptc-mode 1.2.0 → 1.3.0
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/LICENSE +0 -0
- package/README.md +52 -80
- package/README.zh.md +61 -83
- package/assets/icon.png +0 -0
- package/compatibility.json +5 -0
- package/cordis.patch.yml +7 -226
- package/lib/client.js +111 -0
- package/lib/environment.mjs +14 -0
- package/lib/executor.mjs +34 -0
- package/lib/index.mjs +29 -0
- package/lib/lifecycle.mjs +30 -0
- package/lib/model.mjs +77 -0
- package/lib/preset.json +209 -0
- package/lib/terminal.mjs +41 -0
- package/package.json +70 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.3.0 — 2026-10-30
|
|
4
|
+
|
|
5
|
+
- Add bilingual settings for Automatic, WSL Bash, Windows PowerShell, native Zsh and native Bash. WSL distribution is optional. Unsupported choices are disabled according to the host platform.
|
|
6
|
+
- Isolate executors inside the preset. Settings apply to new sessions; existing sessions and jobs retain their revision. Global shell configuration stays independent.
|
|
7
|
+
- Launch WSL explicitly with separate argv entries. Reuse official process, terminal and approval implementations. Refuse confined WSL execution before spawning.
|
|
8
|
+
- Allow focused fact lookup before semantic questions, preserve authorization when work takes longer, and distinguish finite jobs from servers and unregistered external tasks.
|
|
9
|
+
- Add verification stopping conditions and collect delegated results through the actual tool's channel.
|
|
10
|
+
- Remove unsupported unlimited-budget and DeepSeek-employment claims. Reduce the persona from about 2,203 to 1,091 English words.
|
|
11
|
+
- Add upstream composition checks, platform/argv tests, revision lifecycle tests and rendered settings-form tests.
|
|
12
|
+
- Raise the minimum DSH version to `0.2.1-rc.5`, the runtime used for integration verification.
|
|
13
|
+
|
|
14
|
+
## 1.2.0
|
|
15
|
+
|
|
16
|
+
Previous persona-only PTC preset with semantic questions, duration-based planning, progress updates and delegation instructions.
|
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -1,112 +1,84 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Deep PTC mode
|
|
2
2
|
|
|
3
|
-
[
|
|
4
|
-
[](https://www.npmjs.com/package/dsh-deep-ptc-mode)
|
|
5
|
-
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
3
|
+
[中文](README.zh.md) · MIT · **1.3.0**
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
A collaborative DeepSeek Harness PTC preset with visible progress, focused fact lookup, semantic clarification, scoped work, evidence-based verification and lifecycle-aware background jobs.
|
|
8
6
|
|
|
9
|
-
##
|
|
7
|
+
## Choose an execution environment
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
Open **Settings → Plugins → Deep PTC**, choose an environment, save, and create a new **深度PTC模式** session.
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
| Selection | Host | Executor / tool |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| Automatic | Windows / macOS / Linux | PowerShell on Windows, Zsh on macOS, Bash on Linux |
|
|
14
|
+
| WSL Bash | Windows | Explicit `wsl.exe ... --exec bash -lc`, tool `bash` |
|
|
15
|
+
| PowerShell | Windows | Official native PowerShell executor, tool `pwsh` |
|
|
16
|
+
| Zsh | macOS / Linux | `/bin/zsh -lc` on macOS; installed `zsh` on Linux; tool `zsh` |
|
|
17
|
+
| Native Bash | macOS / Linux | Official Bash executor, tool `bash` |
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
- **No token anxiety.** Reads, searches, commands and verification are the work, not a cost to cut.
|
|
17
|
-
- **Ask what it means.** Unknown names, unresolved referents, competing technical routes, unclear sources and unstated expectations about process get asked about first — the model asks the user, not a search engine. One to three concrete questions, options with the recommended one first.
|
|
18
|
-
- **Converge, then build.** The answers turn into a one-paragraph plan with success criteria and an explicit "not doing" list; scope does not grow past what was agreed.
|
|
19
|
-
- **Plan by size.** Five minutes or less is planned internally and executed. Five to twenty minutes gets the plan written out, then work starts without waiting for approval. More than twenty minutes gets the plan written out and approved before any work. Plan mode's own rules still win.
|
|
20
|
-
- **Wait without blocking.** Never sleeps and never holds one long foreground call. A long command, build, test run or external job runs in the background with its job id noted, and the turn ends; a finished job or a user message wakes the model at once, so the user can redirect it while it waits. When no job will finish, `schedule_create` provides the reminder instead of a timer.
|
|
21
|
-
- **Delegate when the work splits.** Small sequential work stays with one agent; genuinely independent pieces, broad exploration, parallel verification or an independent reviewer can become subagents or an Agent Team.
|
|
22
|
-
- **DeepSeek's unlimited token budget.** The persona says the budget is unlimited and turns it into depth and verification — with guardrails against padding, rambling updates and context overflow.
|
|
19
|
+
Unsupported choices are disabled according to the Host, not the browser OS, and rejected by the Host schema. Leave the WSL distribution blank for the Windows default or enter an installed name such as `Ubuntu`. Zsh must be installed when selected on Linux.
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
The selection changes the real executor, tool contract and environment instructions. Executors live in a preset-local `shell` realm, independent of the global shell and other presets. Settings register a new preset revision for new sessions. Existing sessions and background jobs retain their revision: create a new session to change environment safely.
|
|
25
22
|
|
|
26
|
-
|
|
23
|
+
WSL source uses Linux/POSIX syntax, while file tools and `workdir` use Windows host paths. Distribution, cwd and source are distinct argv entries passed through `wsl.exe --cd`; no surrounding shell string is assembled. Login-shell configuration in the selected distribution controls Linux PATH and proxy setup. Windows environment variables are not all automatically exported into Linux.
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
| --- | --- |
|
|
30
|
-
| Head down and silent, one big hand-off at the end | One short sentence before every `run_code` says what is about to be checked, changed or verified. At real milestones — first pass of inspection, plan fixed, a batch of edits done, tests run, direction changed — the update is a little longer. If two or three tool calls go by without a word, the agent stops and reports where it is. |
|
|
31
|
-
| Skimping on tools and verification to save tokens | Tool calls are the work, not a cost: no skipping a read, a search, a command or a check to save tokens. Related calls are batched into one `run_code` program, verification is matched to the task, and scope is not expanded beyond the user's success criteria. |
|
|
32
|
-
| Guessing at what the user meant | Ask about meaning, not permission. An unknown preset, plugin, product or codename; an unresolved "that thing we did last time"; several materially different technical routes; an unclear source of truth, environment or version; or an unstated expectation about process — each gets a question to the user before any work starts. Searching the workspace for the user's own terminology is explicitly ruled out. Questions go through `ask_user_question` from a `run_code` program, 1–3 at a time, options with the recommended one first, and a generous `timeoutMs` (for example 600000) so the wait is not cut off. "I don't know" is a valid answer and hands the choice to the model; a real answer outranks the model's inference. |
|
|
33
|
-
| Doing more than was asked | Scope is treated as part of intent: the smallest change that satisfies the confirmed criteria, no unrequested features, refactors or abstractions, and verification sized to the change rather than turned into a new project. If the work seems to need more, the model asks before expanding it, and its plan states what it is deliberately not doing. |
|
|
34
|
-
| Treating every task the same way | The expected time to finish chooses the planning behavior. Five minutes or less: plan internally and execute. Five to twenty minutes: write the plan out, start at once without waiting for approval, and stay open to redirection. More than twenty minutes: write the plan out and ask for approval before any work. When the estimate crosses a band the behavior moves with it, boundary estimates round up, and plan mode's own `exit_plan_mode` rules always win. |
|
|
35
|
-
| Doing everything alone | Small sequential work stays with one agent. The model opens a subagent or an Agent Team when the work splits into genuinely independent pieces, a broad exploration would flood its context, parts can be inspected or verified in parallel, or an independent reader would catch what it cannot see. When it opens a team it leads it: one responsibility per teammate, a complete brief, disjoint write scopes on shared tasks, no duplicate work, and every result collected and verified before the report. |
|
|
36
|
-
| Sleeping or blocking through a long wait | Never waits by sleeping, and never holds one long foreground call open. A long command, build, test run or external job is started in the background, the job id is noted, and the turn ends: a finished job or a user message wakes the model at once, so the user can redirect it while it waits. When nothing will finish on its own, `schedule_create` provides the reminder instead of a timer. |
|
|
37
|
-
| Reading "unlimited" as licence to pad or overflow | The same section caps the budget as well as granting it. No padding, repetition or filler; progress updates stay to one short line unless a real milestone is reached; "Length follows what the user needs to act on, not how much work you did". The context window of a single request is still finite, so tool output stays bounded and compaction, the result pruner and sub-agents keep long work inside the window. |
|
|
25
|
+
### Sandbox behavior
|
|
38
26
|
|
|
39
|
-
|
|
27
|
+
Native PowerShell, Bash and Zsh use Harness sandbox, approval and process management. WSL currently supports only execution already authorized as `danger-full-access`. Confined Windows policies are refused before execution, without fallback or permission changes. The plugin does not authorize escalation.
|
|
40
28
|
|
|
41
|
-
|
|
29
|
+
## Working contract
|
|
42
30
|
|
|
43
|
-
|
|
31
|
+
- Report milestones and keep active work visible about every 30–60 seconds at tool boundaries. Combine trivial reads instead of narrating every call.
|
|
32
|
+
- Make a focused read-only lookup for unfamiliar installed names and locations. Ask when meaning remains ambiguous or consequential user choices change the work; search cannot define intent.
|
|
33
|
+
- Plan internally for small linear tasks and show concise plans for larger work. Duration does not revoke existing authorization. Explicit plan mode keeps its read-only and approval requirements.
|
|
34
|
+
- Use current evidence and verify changed behavior. Finish when acceptance criteria and relevant checks are satisfied; repeat checks for new changes, failures or conflicting evidence.
|
|
35
|
+
- Distinguish finite jobs, long-lived services and external tasks without Harness notifications. Check server readiness and continue validation. Collect relevant results before declaring completion.
|
|
36
|
+
- Delegate independent work deliberately, define disjoint write scopes and collect results through the actual tool's channel.
|
|
44
37
|
|
|
45
|
-
|
|
38
|
+
This expresses a working preference, not a grant of extra tokens, different billing or greater model capacity. Prompt compliance and quality gains still need real-task evaluation.
|
|
46
39
|
|
|
47
|
-
|
|
40
|
+
## Install or upgrade
|
|
48
41
|
|
|
49
|
-
|
|
50
|
-
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.2.0" })
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
**From GitHub.** In the desktop app open **Plugins → Install plugin** and paste:
|
|
54
|
-
|
|
55
|
-
```text
|
|
56
|
-
github:lishize20040802-rgb/dsh-deep-ptc-mode
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Or from an agent session that has the `plugin_manager` tool:
|
|
60
|
-
|
|
61
|
-
```js
|
|
62
|
-
plugin_manager({ action: "install_bundle", target: "github:lishize20040802-rgb/dsh-deep-ptc-mode" })
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
**From a local checkout** (development):
|
|
42
|
+
Requires Node `>=24` and DSH `>=0.2.1-rc.5`. 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.
|
|
66
43
|
|
|
67
44
|
```js
|
|
45
|
+
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.3.0" })
|
|
46
|
+
// Or from a local checkout or archive:
|
|
68
47
|
plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
|
|
48
|
+
// Or target: "C:\\path\\to\\dsh-deep-ptc-mode-1.3.0.tgz"
|
|
69
49
|
```
|
|
70
50
|
|
|
71
|
-
|
|
51
|
+
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.
|
|
72
52
|
|
|
73
|
-
|
|
53
|
+
Installing the same bundle updates it. Upgrading from the persona-only release requires a Host plugin reload; reopen the app if the settings card has not appeared. Installation does not change the default mode for unrelated new sessions.
|
|
74
54
|
|
|
75
|
-
|
|
55
|
+
Settings persist through the active profile's Cordis patch:
|
|
76
56
|
|
|
77
|
-
```
|
|
78
|
-
|
|
57
|
+
```yaml
|
|
58
|
+
- id: deep-ptc-settings
|
|
59
|
+
config:
|
|
60
|
+
environment: auto # auto | wsl | powershell | zsh | bash
|
|
61
|
+
wslDistribution: '' # blank uses the Windows default
|
|
79
62
|
```
|
|
80
63
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## Files
|
|
64
|
+
Prefer the UI, which uses revisioned, atomic Host form writes.
|
|
84
65
|
|
|
85
|
-
|
|
86
|
-
- `package.json` — the bundle manifest: `dsh.bundle.patch` points at the patch above, and `engines.dsh` is the compatibility floor.
|
|
87
|
-
- `assets/icon.png` — the storefront/market icon.
|
|
66
|
+
## Compatibility and development
|
|
88
67
|
|
|
89
|
-
|
|
68
|
+
The rc.5 PTC template has 23 top-level rows. The template differs only in persona; runtime composition replaces the two platform-switched shell tools with one isolated execution group. Planning, compaction, pruning, web and delegation settings stay intact.
|
|
90
69
|
|
|
91
|
-
|
|
92
|
-
- The unlimited-budget section sits immediately before the tool-use rules, where it changes how much effort the model spends, and it carries two guardrails — no verbosity and a finite per-request context — so the framing cannot be read as permission to pad or overflow. A prompt that only said "tokens are unlimited" would trade one failure mode (skimping) for another (rambling).
|
|
93
|
-
- No extra plugin injects mechanical progress notes. The 1017 model's problem is expression, not capability; a prompt contract plus PTC's batched call rhythm is enough, and it avoids additional runtime cost.
|
|
94
|
-
- The child-plugin list is kept identical to the shipped PTC declaration. It was compared against the preset installed with dsh-web-app **0.2.1-rc.5**: same 23 rows, same configs, same plan-mode text, same disabled rows (workflow and plugin-manager tools stay disabled exactly as PTC ships them). Only the persona differs, so no official PTC capability is dropped or retuned by this plugin.
|
|
95
|
-
- The deployment-level `system-prompt` is untouched, so only sessions that select this preset are affected.
|
|
96
|
-
- The asking section separates user-owned semantics from inspectable facts on purpose. A prompt that only said "ask more" would have the model interrupting the user for facts one `read` would settle; a prompt that only said "inspect before asking" reproduces the original failure, where an unfamiliar name in the request is guessed at or searched for instead of being asked about. The rule is: meaning goes to the user, mechanics go to the tools.
|
|
97
|
-
- Planning by expected size replaces both extremes — a plan dumped for every edit, and no plan for a day-long job — with a band that matches the risk. The bands are written on the expected completion time, including verification; a boundary estimate rounds up because one approval costs less than a large piece of work started against the wrong plan; and plan mode's `exit_plan_mode` approval always outranks these bands, with `ask_user_question` used only as the outside-plan-mode fallback for the over-twenty-minute band.
|
|
98
|
-
- Waiting is contract-level and needs no runtime plugin. A sleep or one long foreground poll inside `run_code` blocks the step, and steering messages are only claimed at a step boundary, so the contract forbids long in-turn waits: long work goes to a background job and the turn ends, where the job-finished notice and the user's next message both resume the agent immediately. `schedule_create` covers waits with no job to finish. This keeps the user in control without adding a new host service or changing the agent loop.
|
|
99
|
-
- Delegation is described conditionally and adds no plugin rows. Agent Team tools (`spawn_teammate`, `team_task_*`, `wait_agent`, …) are host-plane tools supplied by the host's experimental Agent Team bundle, not something a preset can mount; on a host without that bundle the preset's own `subagent` / `subagent_fork` rows remain the delegation surface. The contract therefore tells the model to use the delegation tools its catalog actually lists, and to lead a team when it opens one.
|
|
100
|
-
- Version 1.2.0 adds the three behaviors: delegating by the shape of the work; asking about meaning — names, referents, routes, sources and expected process — before guessing, with scope convergence so asking cannot be skipped in favor of doing more work; planning by expected size, where only work estimated over twenty minutes waits for approval; and waiting without blocking — background jobs and an ended turn instead of sleeps, so a user message or a finished job resumes the work at once.
|
|
70
|
+
Version 1.3.0 adds Host/browser code and is no longer persona-only. `compatibility.json` records the verified upstream and fixture hash. The engines range is an installation floor, not proof that every future release was tested.
|
|
101
71
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
72
|
+
```sh
|
|
73
|
+
npm ci
|
|
74
|
+
npm run check
|
|
75
|
+
npm test
|
|
76
|
+
npm run check:upstream -- /path/to/the/new/upstream/ptc.patch.yml
|
|
77
|
+
npm pack
|
|
78
|
+
```
|
|
107
79
|
|
|
108
|
-
|
|
80
|
+
The checker parses `!!js` as data, compares nested upstream settings and fails on drift requiring review. Tests cover platforms, argv boundaries, confined WSL refusal, atomic settings writes and stale revisions, plus preset replacement and cleanup. Real-task evaluations should measure successful completion, unnecessary questions, scope expansion, background-work collection and latency.
|
|
109
81
|
|
|
110
|
-
|
|
82
|
+
Main files: `cordis.patch.yml` is the settings entry; `lib/index.mjs` manages revisions; `lib/model.mjs` builds isolated execution configurations; `lib/executor.mjs` adapts WSL/Zsh; `lib/terminal.mjs` provides the Zsh tool; `lib/client.js` owns the bilingual settings card; `lib/preset.json` contains the persona and official PTC template.
|
|
111
83
|
|
|
112
|
-
|
|
84
|
+
Uninstall with `plugin_manager` action `remove_bundle`, target `dsh-deep-ptc-mode`. Local link installations depend on their source directory: uninstall before deleting it.
|
package/README.zh.md
CHANGED
|
@@ -1,117 +1,95 @@
|
|
|
1
|
-
# 深度PTC
|
|
1
|
+
# 深度 PTC 模式
|
|
2
2
|
|
|
3
|
-
[
|
|
4
|
-
[](https://www.npmjs.com/package/dsh-deep-ptc-mode)
|
|
5
|
-
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
3
|
+
[English](README.md) · MIT · 当前版本:**1.3.0**
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
DeepSeek Harness 的协作型 PTC preset:持续汇报、先查证再澄清、控制改动范围、充分验证并及时收尾。1.3.0 增加可以自由选择的执行环境。
|
|
8
6
|
|
|
9
|
-
##
|
|
7
|
+
## 选择 WSL、PowerShell 或 macOS 工具
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
安装并加载后,打开 **设置 → 插件 → 深度 PTC**,选择执行环境并保存,再新建一个「深度PTC模式」会话。
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
| 选项 | 宿主 | 实际执行方式 / 模型工具 |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| 自动 | Windows / macOS / Linux | Windows 选 PowerShell,macOS 选 Zsh,Linux 选 Bash |
|
|
14
|
+
| WSL Bash | Windows | `wsl.exe ... --exec bash -lc`,工具名 `bash` |
|
|
15
|
+
| PowerShell | Windows | Harness 官方原生 PowerShell 执行器,工具名 `pwsh` |
|
|
16
|
+
| Zsh | macOS / Linux | macOS 用 `/bin/zsh -lc`;Linux 用已安装的 `zsh`;工具名 `zsh` |
|
|
17
|
+
| 原生 Bash | macOS / Linux | Harness 官方 Bash 执行器,工具名 `bash` |
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
- **不为 token 焦虑**:读取、搜索、命令和验证是工作本身,不是该省的成本。
|
|
17
|
-
- **问清语义**:不认识的名称或指代、相差很大的技术路线、来源与环境、用户心里预设的做事方式,一律先问用户——问的是「意思」,不是「许可」;每次 1–3 个具体问题,带选项、推荐项在前。
|
|
18
|
-
- **先收敛再动手**:答案回来先复述目标、做法、验收标准与「明确不做」的清单,范围不越界,不顺手加功能或重构。
|
|
19
|
-
- **按耗时定计划**:≤5 分钟的任务内部计划、直接执行;5–20 分钟把计划写给用户但不求批准、立即开工;>20 分钟输出计划并请求批准。plan 模式的规则始终优先。
|
|
20
|
-
- **等待不阻塞**:不 sleep、不把一次前台调用挂很久。长命令、构建、测试或外部任务放后台并记下 job id,然后结束回合;任务完成通知或用户消息都会立刻把模型唤醒,等待期间用户随时可以改方向。没有任务会自己完成时用 `schedule_create` 设提醒,而不是定时器等。
|
|
21
|
-
- **该拆就拆**:小而线性的任务一个人做完;真正互相独立、探索面大、可并行验证或需要独立复核时,开子 agent 或智能体团队。
|
|
22
|
-
- **DeepSeek 无限 token 预算**:明写预算无限,并把它转化成深度与验证——同时用护栏挡住注水、啰嗦的进度更新和上下文撑爆。
|
|
19
|
+
不适用于宿主的选项会禁用,运行时配置也会拒绝这些选择。WSL 发行版留空时使用 Windows 默认发行版,也可填写 `Ubuntu` 等已安装名称。Linux 上选择 Zsh 前需要安装 Zsh。
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
**选择会改变实际执行器和模型看到的命令语法,不只改工具名称。** 执行器隔离在本 preset 中,不修改全局 shell,也不影响其他 preset。保存设置后,新会话使用新版本;已有会话和后台任务继续使用创建时的环境。切换环境时请新建会话,避免同一任务中途换方言。
|
|
25
22
|
|
|
26
|
-
|
|
23
|
+
WSL 命令使用 Linux/POSIX 语法;文件工具和 `workdir` 仍用 Windows 宿主路径。执行器用 `--cd` 进入目录,发行版、目录和命令分别作为 argv 传递,不额外拼接 shell 字符串。WSL 内的 PATH、代理等由所选发行版的登录 shell 配置决定,Windows 环境变量不会全部自动变成 Linux 环境变量。
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
| --- | --- |
|
|
30
|
-
| 埋头干活、全程不吭声,最后一次性交工 | 每次 `run_code` 前用一句话说明要检查、修改或验证什么;关键节点(摸清现状、定下方案、改完一批、验证之后、改变方向)给稍长的更新;连续两三个工具调用没有出声就必须停下来汇报 |
|
|
31
|
-
| 为了省 token 不用工具、不验证 | 明确“工具调用是工作本身,不是成本”,不为省 token 跳过读取、搜索、命令或验证;相关调用批量放进一个 `run_code`,按任务需要验证、不过度扩张 |
|
|
32
|
-
| 猜用户到底是什么意思 | 问的是「意思」,不是「许可」。不认识的 preset、插件、产品、代号;说不清的「上次那个」;几条会导向不同工作量的技术路线;不确定哪个仓库、环境或版本才是真源;或者不知道用户心里是否已有预设的做事方式——都在动手前先问用户。用项目搜索去猜用户自己的术语,被明确禁止。提问走 `run_code` 里的 `ask_user_question`,每次 1–3 个,带选项、推荐项在前,并给足 `timeoutMs`(如 600000)避免等待被截断。用户答「不知道」也是一种答案,此时由模型自行决定;用户答了,答案优先于模型推断。 |
|
|
33
|
-
| 做得比要求多 | 范围属于意图的一部分:只做满足已确认标准的最小改动,不追加用户没要的功能、重构或抽象,验证按改动量匹配而不是另起一个工程。觉得需要多做时先问再扩,计划里写明「明确不做」什么。 |
|
|
34
|
-
| 不管什么任务都用同一种开工方式 | 按预计完成时间(含验证)分档:5 分钟以内内部计划后直接做;5–20 分钟把计划写给用户、立即开工、不等批准,并随时接受用户改方向;20 分钟以上先出计划、请求批准再动手。估计跨档就换档,边界向上取整;plan 模式里 `exit_plan_mode` 的批准规则始终优先,plan 模式外只有 >20 分钟档才用 `ask_user_question` 兜底请求批准。 |
|
|
35
|
-
| 什么都自己扛 | 小而线性的任务自己做完;当工作能拆成真正独立的几块、大范围探索会撑爆上下文、几部分可以并行检查或验证、或者需要一个独立读者来发现模型自己看不见的问题时,才开子 agent 或智能体团队。开团队就当 lead:每个成员一个明确职责、完整 brief、共享任务板上写清互不重叠的写入范围、不重复成员的活、结果收齐并验证后再汇报。 |
|
|
36
|
-
| 用 sleep 或长时间前台调用硬等 | 不靠 sleep 等待,也不挂一个很久的前台调用。长命令、构建、测试或外部任务放后台、记下 job id、结束回合:任务完成通知或用户消息都会立刻把模型唤醒,等待期间用户随时可以改方向。没有任务会自己完成时用 `schedule_create` 设提醒,而不是定时器。 |
|
|
37
|
-
| 把「无限预算」读成可以注水或撑爆上下文 | 同一段既给预算也设上限:不注水、不重复、不写废话;进度更新除真正的里程碑外只留一句话;「长度取决于用户需要据此做什么,而不是你干了多少活」。单次请求的上下文窗口仍然是有限的——工具输出保持有界,压缩、结果裁剪与子 agent 把长任务关在窗口内 |
|
|
25
|
+
### 沙箱边界
|
|
38
26
|
|
|
39
|
-
|
|
27
|
+
原生 PowerShell、Bash 和 Zsh 继续使用 Harness 的沙箱、审批和进程管理。WSL 跨越 Windows/Linux 边界,目前仅支持宿主已经授权的 `danger-full-access` 执行;`read-only` 或 `workspace-write` 调用在启动命令前失败。插件不会自行升权、改变默认权限或悄悄换 shell。
|
|
40
28
|
|
|
41
|
-
|
|
29
|
+
## 工作规则
|
|
42
30
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
31
|
+
- **进度可见:** 开始前说明目的,在发现、方案变化、委派和验证等节点汇报。活跃工作约 30–60 秒没有更新时,在工具步骤边界补充一句;连续的简单读取可以合并。
|
|
32
|
+
- **先查证,再问真正的歧义:** 可在相关安装目录或工作区做一轮有限的只读定位;仍有多个候选、私人术语无法解释或关键偏好影响路线时及时询问。搜索不替用户定义意图。
|
|
33
|
+
- **计划和授权分开:** 小任务内部计划后执行;复杂任务展示简短计划并继续。耗时增加不使先前授权失效;范围或关键决策变化时才重新确认。显式 plan mode 的只读和批准规则优先。
|
|
34
|
+
- **充分验证并停止:** 查当前证据,验证改动触及的行为和边界。验收标准满足、相关检查通过且关键疑点解决后交付;出现新变化或失败才重新检查。
|
|
35
|
+
- **按任务生命周期等待:** 构建和测试可作为完成型 job;服务器启动后检查就绪并继续验收;外部 task id 不被假定为 Harness job。收齐相关结果后才能声称完成。
|
|
36
|
+
- **按需委派:** 只在任务确实可拆分或需要独立复核时使用。按实际工具提供的消息、job 或团队等待渠道收集结果,不硬性要求不存在的工具名。
|
|
46
37
|
|
|
47
|
-
|
|
38
|
+
本模式表达充分使用能力的工作偏好,不授予额外 token,不修改模型或计费,也不保证模型每次完全遵守提示词。效果需要实际任务评测。
|
|
48
39
|
|
|
49
|
-
##
|
|
40
|
+
## 安装和升级
|
|
50
41
|
|
|
51
|
-
要求 DSH `>=
|
|
42
|
+
要求 Node `>=24`、DSH `>=0.2.1-rc.5`。1.3.0 已用 Windows 桌面端 rc.5 做 WSL/PowerShell 命令验证。macOS/Zsh 分支做了配置、工具挂载与参数测试,尚未在 macOS 真机执行。
|
|
52
43
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
```js
|
|
56
|
-
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.2.0" })
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**从 GitHub 安装**:桌面端打开 **插件 → 安装插件**,粘贴:
|
|
60
|
-
|
|
61
|
-
```text
|
|
62
|
-
github:lishize20040802-rgb/dsh-deep-ptc-mode
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
或在带 `plugin_manager` 工具的会话里:
|
|
66
|
-
|
|
67
|
-
```js
|
|
68
|
-
plugin_manager({ action: "install_bundle", target: "github:lishize20040802-rgb/dsh-deep-ptc-mode" })
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**从本地目录安装**(开发用):
|
|
44
|
+
本地目录或构建产物可通过插件管理器安装:
|
|
72
45
|
|
|
73
46
|
```js
|
|
47
|
+
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.3.0" })
|
|
48
|
+
// 也可从本地目录或安装包安装:
|
|
74
49
|
plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
|
|
50
|
+
// 或 target: "C:\\path\\to\\dsh-deep-ptc-mode-1.3.0.tgz"
|
|
75
51
|
```
|
|
76
52
|
|
|
77
|
-
|
|
53
|
+
GitHub 地址:`github:lishize20040802-rgb/dsh-deep-ptc-mode`。该地址安装远端实际内容;本地升级不会自动发布到 GitHub/npm。
|
|
78
54
|
|
|
79
|
-
|
|
55
|
+
已有旧版时,安装同一个 bundle 即更新。从只有 persona 的旧版切到 1.3.0,需要宿主重新加载插件;桌面端若未出现设置卡片,可重新打开应用。安装不会将其他新任务的默认模式改为深度 PTC。
|
|
80
56
|
|
|
81
|
-
|
|
57
|
+
设置持久化到当前 profile 的 Cordis patch:
|
|
82
58
|
|
|
83
|
-
```
|
|
84
|
-
|
|
59
|
+
```yaml
|
|
60
|
+
- id: deep-ptc-settings
|
|
61
|
+
config:
|
|
62
|
+
environment: wsl # auto | wsl | powershell | zsh | bash
|
|
63
|
+
wslDistribution: Ubuntu # 留空为 Windows 默认发行版
|
|
85
64
|
```
|
|
86
65
|
|
|
87
|
-
|
|
66
|
+
优先使用界面保存,宿主会处理版本冲突和原子配置写入。
|
|
88
67
|
|
|
89
|
-
##
|
|
68
|
+
## 兼容性与维护
|
|
90
69
|
|
|
91
|
-
|
|
92
|
-
- `package.json` — bundle 清单:`dsh.bundle.patch` 指向上面的补丁,`engines.dsh` 是兼容性下限。
|
|
93
|
-
- `assets/icon.png` — 插件市场/卡片图标。
|
|
70
|
+
1.3.0 将上游 rc.5 的 23 项 PTC 配置保存为 `lib/preset.json`。除 persona 外,模板与该上游一致;运行时仅将两个互斥 shell 工具替换为一个带 `shell` 隔离的执行组。计划模式、压缩、裁剪、网页与子代理等其他配置保持一致。
|
|
94
71
|
|
|
95
|
-
|
|
72
|
+
本版增加了必要的宿主/浏览器代码,不再是仅靠 persona 的声明式插件。`compatibility.json` 记录已验证上游和 fixture 哈希;`engines` 是安装下限,不能证明之后所有宿主都经过测试。
|
|
96
73
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
- 没有另写插件做机械化的进度注入:1017 的问题是表达习惯而不是能力缺失,提示词契约 + PTC 的批量调用节奏足够,也避免额外运行时负担。
|
|
105
|
-
- 1.2.0 新增三件事:按工作形状决定是否委派;先问语义——名称、指代、路线、来源、做事流程——再动手,并用范围收敛防止「用多干活代替问清楚」;按预计耗时决定计划强度,只有估计超过 20 分钟的工作才等批准;以及等待不阻塞——用后台任务和结束回合代替 sleep,用户消息或任务完成都会立刻把模型唤醒。
|
|
106
|
-
|
|
107
|
-
## 卸载
|
|
108
|
-
|
|
109
|
-
`plugin_manager` 的 `remove_bundle`,目标为本 bundle 的包名 `dsh-deep-ptc-mode`。删掉本目录不会立刻影响已安装副本,但更新与重装会失败,建议按顺序处理。
|
|
74
|
+
```sh
|
|
75
|
+
npm ci
|
|
76
|
+
npm run check
|
|
77
|
+
npm test
|
|
78
|
+
npm run check:upstream -- /path/to/ptc.patch.yml
|
|
79
|
+
npm pack
|
|
80
|
+
```
|
|
110
81
|
|
|
111
|
-
|
|
82
|
+
检查器不会执行 YAML 的 `!!js`;比较官方插件结构、plan mode 和压缩等嵌套配置,发现差异即失败并要求复核。测试覆盖平台选择、命令边界、受限 WSL 拒绝、设置表单原子保存及并发版本约束,以及 preset 版本更换与清理。真实任务评测仍应记录成功率、无必要提问、范围控制、后台收尾和耗时。
|
|
112
83
|
|
|
113
|
-
|
|
84
|
+
## 文件和卸载
|
|
114
85
|
|
|
115
|
-
|
|
86
|
+
- `cordis.patch.yml`:宿主设置入口。
|
|
87
|
+
- `lib/index.mjs`:配置 schema、preset 注册和版本切换。
|
|
88
|
+
- `lib/model.mjs`:平台选择、参数、隔离配置和环境说明。
|
|
89
|
+
- `lib/executor.mjs`:复用官方进程/沙箱语义的 WSL/Zsh 执行器。
|
|
90
|
+
- `lib/terminal.mjs`:复用官方终端工具,提供 Zsh 方言与工具名。
|
|
91
|
+
- `lib/client.js`:中英文设置卡片。
|
|
92
|
+
- `lib/preset.json`:persona 和上游 PTC 模板。
|
|
93
|
+
- `test/`、`scripts/check.mjs`、`compatibility.json`:回归与上游差异检查。
|
|
116
94
|
|
|
117
|
-
|
|
95
|
+
卸载使用插件管理器的 `remove_bundle`,目标为 `dsh-deep-ptc-mode`。本地 link 安装直接依赖源目录,应先卸载再删除目录。
|
package/assets/icon.png
CHANGED
|
File without changes
|