dsh-minimal-ptc 0.4.7 → 0.5.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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 stardustlc
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 stardustlc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md CHANGED
@@ -1,65 +1,56 @@
1
- # dsh-minimal-ptc
2
-
3
- ![npm](https://img.shields.io/npm/v/dsh-minimal-ptc) ![downloads](https://img.shields.io/npm/dm/dsh-minimal-ptc) ![license](https://img.shields.io/github/license/STARDUSTLC666/dsh-minimal-ptc) ![stars](https://img.shields.io/github/stars/STARDUSTLC666/dsh-minimal-ptc?style=social)
4
-
5
- > Minimal prompt x full PTC capabilities — a cleaner coding agent.
6
- > Installing gives you a new agent mode: **Minimal PTC**, with Git Bash and persistent PowerShell on Windows, compatible with Harness 0.1.5-rc.2 and 0.1.6-alpha.1.
1
+ [中文](README.md)
7
2
 
8
- ## Highlights
9
-
10
- - **RL-aligned**: the whole system prompt is one sentence — `You are a helpful software engineer assistant.` — close to the compact instruction distribution used during RL fine-tuning, without long-prompt format bias or context noise.
11
- - **Complete PTC surface**: provides `run_code` SDK orchestration, files and search, Shell, Skills, plan mode, goals, subagents, Ralph, and web search/fetch; the general-purpose workflow tool stays hidden as in alpha.4.
12
- - **We / Let's reasoning**: the PTC SDK packs thinking and doing into one TypeScript program, orchestrating multi-step operations before executing them once. This matches the high-scoring Minimal trajectory in DeepSeek's official Project2 V4.1b runs (99/96), where reasoning is dominated by `we` / `let's` instead of the standard-like `let me` / `I` blocks seen at 91/92.
13
- - **Git Bash on Windows**: ships a preset-local Git Bash executor (GIT_BASH -> Program Files\Git -> LOCALAPPDATA\Git -> PATH). The bash tool is no longer disabled on Windows.
14
- - **Persistent PowerShell on Windows**: mirrors the `dsh-v0.1.5-rc.1` minimal preset; `pwsh` runs as a persistent PTY session, so cwd, variables, and functions survive across calls.
15
-
16
- ## Compatibility
3
+ # dsh-minimal-ptc
17
4
 
18
- Verified with official source builds of Harness `0.1.5-rc.2` and `0.1.6-alpha.1` on 2026-09-16: all 18 components load alongside ModLens, with passing tool schemas, skill registration, offline read-only calls, real Agent preset mounting, and plugin calls through `run_code`. Uses the `cordis.patch.yml` + `dsh.bundle.patch` bundle model. Node requirements are 22.19 or later within 22.x, or 24 or later. Live external-service workflows require separate configuration and validation.
5
+ Adds **Minimal PTC** to DeepSeek Harness: a concise system prompt with files, terminals, search, skills and installed plugin tools, orchestrated through `run_code`. Windows includes Git Bash and persistent PowerShell.
19
6
 
20
- Since 0.4.6, the plugin selects the workflow provider after host startup: `workflow-ptc` on 0.1.6 and `workflow-worker-thread` on 0.1.5. Managed presets refresh when the plugin version or host runtime family changes. Local edits on the same version and runtime, and user-created presets without a marker, remain untouched. Since 0.4.7, the preset restores the official 0.1.6 `ptc` rows `present` / `command-goal` / `tool-plugin-manager` (disabled) plus `modelSelectionSettings` on subagent spawn, and a startup health check guards the `reading 'prepare'` failure modes (see Troubleshooting).
7
+ ## Install and use
21
8
 
22
- The Minimal PTC preset also mounts in a real agent and assembles `run_code` as the model-facing tool while retaining installed plugin tools and Windows Git Bash. Uses the persona `prefix` field introduced in Harness 0.1.3; use plugin 0.4.3 with older Harness versions. Since 0.4.5, the preset update marker reads the package version automatically so upgrades cannot leave an older preset because of a stale hard-coded version.
9
+ Version 0.5.0 requires **Harness 0.1.7 or later**. Use `dsh-minimal-ptc@0.4.7` on Harness 0.1.5/0.1.6.
23
10
 
24
- ## Installation
11
+ ```bash
12
+ dsh plugin --profile web add dsh-minimal-ptc
13
+ ```
25
14
 
26
- 1. Add this package to a web profile (`package.json`):
15
+ Restart `dsh web`, start a new session and choose **极简 PTC 模式** (Minimal PTC) from the mode picker above the message box. Describe your task normally; no preset directory or YAML editing is required.
27
16
 
28
- ```json
29
- "dependencies": { "dsh-minimal-ptc": "^0.4.0" },
30
- "dsh": { "profile": { "bundles": [..., "dsh-minimal-ptc"] } }
31
- ```
17
+ For example: “Run this project’s tests, find the failures and fix them.” Existing email, calendar and other plugin tools remain available.
32
18
 
33
- Local development can use a link: `"dsh-minimal-ptc": "link:E://deepseek//dsh-minimal-ptc"`.
19
+ ## Changes in 0.5.0
34
20
 
35
- 2. Run `pnpm install` in the profile directory.
21
+ - Registers through the official Harness 0.1.7 declarative Agent preset service, fixing the missing mode after a host upgrade.
22
+ - Installs and updates the preset with the plugin. Existing user content in `.agent-presets/ptc-minimal` is preserved.
23
+ - Checks for conflicting runtime packages without flagging supported helpers such as `schemastery` and `cosmokit`.
24
+ - Uses `workflow-ptc` and retains plugin tools, Git Bash, persistent PowerShell, search, plans, goals and subagents.
36
25
 
37
- 3. Restart the web profile process. The host row materializes the bundled preset into `$DSH_HOME/.agent-presets/ptc-minimal`.
26
+ ## Compatibility and validation
38
27
 
39
- 4. Select **Minimal PTC** when starting a new session.
28
+ Tested on 2026-09-23 with official-source **Harness 0.1.7-alpha.2**, including a local `Symbol.for` tool-scheduler fix. All 18 plugins load together with passing tool contracts and skill registration. The real Web mode picker lists and selects the preset; a real agent mounts it with `run_code` as its model entry point while retaining plugin tools and the shell.
40
29
 
41
- ## Troubleshooting: `Cannot read properties of undefined (reading 'prepare')`
30
+ A real `run_code` call to the RSS plugin passed in a sandboxed Windows workspace and again after restart. The fixture owner has full control of the disposable directory so the host can apply sandbox permissions. External mail, databases and other services still require their own valid configuration.
42
31
 
43
- When every tool call (including `run_code`) fails with this error while sessions mount fine, the root cause is **two identities of the dsh-tools scheduler key (a Symbol) inside one process**. Two confirmed triggers:
32
+ Requires Node 22.19 or later within 22.x, or 24 or later.
44
33
 
45
- 1. **A duplicate core package inside a profile**: a third-party plugin lists `@deepseek-ai/*` under `dependencies` (it belongs in `peerDependencies`), a tarball install drags in transitive copies, or stale `node_modules` linger. Check:
34
+ ## Windows terminals
46
35
 
47
- ```bash
48
- # Any output means trouble (should be empty)
49
- ls ~/.dsh/profiles/*/node_modules/@deepseek-ai 2>/dev/null
50
- ```
36
+ A standard Git for Windows installation is detected automatically. For a custom location, set `GIT_BASH` to the full path of `bash.exe` before starting DSH. PowerShell sessions preserve their current directory, variables and functions.
51
37
 
52
- Fix: move the `@deepseek-ai` directory out of that profile's `node_modules` (or fix the offending plugin's dependencies and reinstall), then restart dsh.
38
+ Developers creating their own preset can use the bundled `ptc-minimal.patch.yml` as a reference; the executor module is `dsh-minimal-ptc/gitbash-executor`.
53
39
 
54
- 2. **The 0.1.6-alpha host's own dual build outputs**: the `@deepseek-ai/dsh-tools` exports map routes `./types` and `./presentation` to a second compiled tree (`lib/types/*.js`) next to the bundle (`lib/index.js`) — the key splits even with zero extra copies. The root fix, in `packages/core/tools/src/index.ts`:
40
+ | Executor option | Default | Purpose |
41
+ | :-- | :-- | :-- |
42
+ | `shellPath` | auto-detected | Git Bash path |
43
+ | `timeoutMs` | 120000 | Per-command timeout in ms |
44
+ | `maxTimeoutMs` | 600000 | Maximum requested timeout |
45
+ | `maxOutputBytes` | 64000 | Output cap per call |
46
+ | `maxSpillBytes` | 67108864 | Output spill-to-disk cap |
47
+ | `graceMs` | 3000 | Grace period after timeout |
55
48
 
56
- ```ts
57
- Symbol('@deepseek-ai/dsh-tools.scheduler') → Symbol.for('@deepseek-ai/dsh-tools.scheduler')
58
- ```
49
+ ## Troubleshooting
59
50
 
60
- `Symbol.for` uses the global symbol registry, so the key stays identical across module instances and both triggers are disarmed.
51
+ If the mode is missing, confirm Harness is 0.1.7 or later and restart after installation. Recreating a retired preset directory will not help: the new host does not discover presets there.
61
52
 
62
- **Since 0.4.7 this plugin self-checks at startup**: if a profile holds core-package copies, or the host still uses a module-local Symbol key (unpatched), it logs a warning with the matching remediation. Warnings never block startup.
53
+ If every tool fails with `Cannot read properties of undefined (reading 'prepare')`, check startup logs for duplicate runtime packages. Update the plugin bringing in extra `dsh-tools` / `cordis` copies and reinstall dependencies. Do not remove the entire `@deepseek-ai` directory: public helpers are supported dependencies. Another confirmed cause is the host loading two tool build outputs with a module-local scheduler `Symbol`; source builds can use `Symbol.for('@deepseek-ai/dsh-tools.scheduler')` and rebuild.
63
54
 
64
55
  ## Uninstall
65
56
 
@@ -67,36 +58,7 @@ When every tool call (including `run_code`) fails with this error while sessions
67
58
  dsh plugin --profile web remove dsh-minimal-ptc
68
59
  ```
69
60
 
70
- Then restart the web service. To clean up fully, also remove the plugin entry from your profile `cordis.patch.yml` if you overrode it.
71
-
72
-
73
- ## Capabilities
74
-
75
- - Web search and page fetch are enabled via `tool-web` (`fetch: true`).
76
- - Subagents and Ralph are enabled; the general-purpose workflow tool remains hidden in PTC mode.
77
- - `subagent_codex` and `subagent_claude_code` providers are disabled by default; remove their `disabled: true` lines to expose them.
78
-
79
- ## Windows Git Bash configuration
80
-
81
- The preset-local Git Bash executor can be overridden in `agent.cordis.yml` under `gitbash-executor`:
82
-
83
- | Option | Default | Meaning |
84
- | :-- | :-- | :-- |
85
- | `shellPath` | auto-detected | Fixed Git Bash path (e.g. `C:\\Program Files\\Git\\bin\\bash.exe`) |
86
- | `timeoutMs` | 120000 | Per-command timeout (ms) |
87
- | `maxTimeoutMs` | 600000 | Maximum timeout a request may ask for |
88
- | `maxOutputBytes` | 64000 | Per-call output cap |
89
- | `maxSpillBytes` | 67108864 | Output spill-to-disk cap |
90
- | `graceMs` | 3000 | Grace period after timeout |
91
-
92
- Detection order: `GIT_BASH` -> `Program Files\\Git` -> `Program Files (x86)\\Git` -> `LOCALAPPDATA\\Programs\\Git` -> PATH.
93
-
94
- ## Materialization policy
95
-
96
- - No target directory -> write all preset files and a version marker.
97
- - Plugin version or host runtime family changes -> refresh managed files.
98
- - Directory exists without a marker (treated as user-created) -> leave it untouched.
99
- - Upgrading: bump `version` in `package.json`; the marker reads it automatically.
61
+ Restart the Web service afterward.
100
62
 
101
63
  ## License
102
64
 
package/README.md CHANGED
@@ -1,72 +1,56 @@
1
- # dsh-minimal-ptc
2
-
3
- ![npm](https://img.shields.io/npm/v/dsh-minimal-ptc) ![downloads](https://img.shields.io/npm/dm/dsh-minimal-ptc) ![license](https://img.shields.io/github/license/STARDUSTLC666/dsh-minimal-ptc) ![stars](https://img.shields.io/github/stars/STARDUSTLC666/dsh-minimal-ptc?style=social)
4
-
5
- > 极简提示词 × PTC 全能力 —— 一个更"干净"的编码 Agent。
6
- > 安装即获得新的 Agent 模式:**极简 PTC 模式**;Windows 自动启用 Git Bash 与持久 PowerShell,兼容 Harness 0.1.5-rc.2 和 0.1.6-alpha.1。
1
+ [English](README.en.md)
7
2
 
8
- ## 卖点
9
-
10
- - **对齐 RL 训练**:系统提示词只有一句 `You are a helpful software engineer assistant.`,
11
- 贴近 RL 微调时的简洁指令分布,没有长提示词带来的格式偏置与上下文噪音,
12
- 让模型按训练时的节奏干活。
13
- - **PTC 工具面完整**:提供 `run_code` SDK 多步编排、文件读写与检索、Shell、
14
- Skills、计划、目标、子代理、Ralph 与网页搜索/抓取;按 alpha.4 默认隐藏通用 workflow 工具。
15
- - **We / Let's 思维链**:PTC SDK 把"想"和"做"装进一个 TypeScript 程序,
16
- 多步操作先编排、再一次执行。这与 DeepSeek 官方跑分环境(Project2 V4.1b)中
17
- Minimal 高分轨迹一致:99/96 的两跑以 `we` / `let's` 为主,而不是
18
- Standard/PTC 常见的 `let me` / `I` 长块。
19
- - **Windows 保持 bash**:预设内置 Git Bash executor(自动探测 GIT_BASH → Program Files\Git → LOCALAPPDATA\Git → PATH),`bash` 工具不再在 Windows 上被禁用。
20
- - **Windows 持久 PowerShell**:对齐 `dsh-v0.1.5-rc.1` 的 minimal 预设,`pwsh` 使用持久 PTY 会话,cwd、变量、函数跨调用保留。
21
-
22
- ## 兼容性
3
+ # dsh-minimal-ptc
23
4
 
24
- 已在官方源码构建的 Harness `0.1.5-rc.2` 和 `0.1.6-alpha.1` 上验证(2026-09-16):18 个组件与 ModLens 同载,工具 schema、技能注册、离线只读调用、真实 Agent 预设挂载及 `run_code` 调用插件工具通过。采用 `cordis.patch.yml` + `dsh.bundle.patch` 组合包模型。Node 要求为 22.19 及以上的 22.x,或 24 及以上。外部服务的实际业务操作需按各组件配置单独验证。
5
+ 给 DeepSeek Harness 添加「极简 PTC 模式」:使用简短的系统提示词,保留文件、终端、搜索、技能与已安装插件,通过 `run_code` 编排多步操作。Windows 支持 Git Bash 和持久 PowerShell。
25
6
 
26
- 0.4.6 起,插件等待宿主启动完成后选择工作流运行时:0.1.6 使用 `workflow-ptc`,0.1.5 保留 `workflow-worker-thread`。受管理的预设会在插件版本或运行时种类变化时刷新;同版本、同运行时的本地修改以及无版本标记的自建预设保持不变。0.4.7 起预设补齐官方 0.1.6 `ptc` 的 `present` / `command-goal` / `tool-plugin-manager`(默认关闭)行与 subagent 的 `modelSelectionSettings`,并新增启动健康检查(见下文故障排查)。
7
+ ## 安装和使用
27
8
 
28
- 另已在真实 agent 中挂载极简 PTC 预设并组装模型工具:模型入口为 `run_code`,安装的插件工具和 Windows Git Bash 均可用。沿用 0.1.3 起的 persona `prefix` 字段;更旧的 Harness 请使用插件 0.4.3。0.4.5 起,预设更新标记自动读取包版本,避免升级后仍保留旧预设。
9
+ 0.5.0 需要 **Harness 0.1.7 及以上**。仍使用 Harness 0.1.5/0.1.6 时,请安装 `dsh-minimal-ptc@0.4.7`。
29
10
 
30
- ## 安装
11
+ ```bash
12
+ dsh plugin --profile web add dsh-minimal-ptc
13
+ ```
31
14
 
32
- 1. 把本包加入 web profile(`package.json`):
15
+ 重启 `dsh web`,新建会话,在输入框上方的模式列表中选择 **极简 PTC 模式**,然后像平时一样描述任务。无需创建预设目录或修改 YAML。
33
16
 
34
- ```json
35
- "dependencies": { "dsh-minimal-ptc": "^0.4.0" },
36
- "dsh": { "profile": { "bundles": [..., "dsh-minimal-ptc"] } }
37
- ```
17
+ 例如:「检查这个项目的测试,找出失败原因并修复。」已有的邮件、日历等插件也可按原来的方式使用。
38
18
 
39
- 本地开发也可以用 link:`"dsh-minimal-ptc": "link:E://deepseek//dsh-minimal-ptc"`。
19
+ ## 0.5.0 的变化
40
20
 
41
- 2. 在 profile 目录执行 `pnpm install`。
21
+ - 使用 Harness 0.1.7 官方的声明式 Agent 预设注册方式,修复升级后模式消失的问题。
22
+ - 预设随插件安装和更新;保留用户旧的 `.agent-presets/ptc-minimal` 目录,不覆盖其中的自定义内容。
23
+ - 启动检查只提示会影响工具运行的核心包副本,不再把 `schemastery`、`cosmokit` 等正常依赖误报为冲突。
24
+ - 使用新版 `workflow-ptc`,保留插件工具、Git Bash、持久 PowerShell、搜索、计划、目标与子代理能力。
42
25
 
43
- 3. 重启 web profile 进程:宿主行会把内置预设物化到
44
- `$DSH_HOME/.agent-presets/ptc-minimal`。
26
+ ## 兼容性与验证
45
27
 
46
- 4. 新建会话时选择 **极简 PTC 模式**。
28
+ 2026-09-23 在官方源码构建的 **Harness 0.1.7-alpha.2** 上验证(含本地工具调度器 `Symbol.for` 修复):18 个插件同载,工具契约与技能注册通过;极简 PTC 出现在实际网页模式列表中并可选择,真实 Agent 挂载后以 `run_code` 为模型入口,保留插件工具与 Shell。
47
29
 
48
- ## 故障排查:`Cannot read properties of undefined (reading 'prepare')`
30
+ 已在沙箱开启的 Windows 隔离工作区通过 `run_code` 实际调用 RSS 插件,重启后再次通过。测试工作区由当前用户拥有完整管理权限,以便宿主设置沙箱权限;外部邮箱、数据库等业务仍需各插件的有效配置。
49
31
 
50
- 每次工具调用(含 `run_code`)都以这个错误失败、且会话在挂载期一切正常时,根因是 **dsh-tools 的调度器键(一个 Symbol)在进程内出现了两个身份**。两个已确认的触发路径:
32
+ Node 要求为 22.19 及以上的 22.x,或 24 及以上。
51
33
 
52
- 1. **profile 里多装了一份核心包**:某个第三方插件把 `@deepseek-ai/*` 写进了 `dependencies`(应为 `peerDependencies`)、tarball 安装拖入传递副本,或旧 `node_modules` 残留。检查:
34
+ ## Windows 终端
53
35
 
54
- ```bash
55
- # 任一命令有输出即为中招(应为空)
56
- ls ~/.dsh/profiles/*/node_modules/@deepseek-ai 2>/dev/null
57
- ```
36
+ 安装常规版 Git for Windows 后会自动找到 Git Bash。若安装在自定义位置,可设置 `GIT_BASH` 为 `bash.exe` 的完整路径,再启动 DSH。PowerShell 会话会保留当前目录、变量和函数。
58
37
 
59
- 修复:把该 profile `node_modules` 下的 `@deepseek-ai` 目录移走(或整改插件依赖后重装),重启 dsh。
38
+ 开发者如需自建预设,可参考包内的 `ptc-minimal.patch.yml`,执行器模块为 `dsh-minimal-ptc/gitbash-executor`。
60
39
 
61
- 2. **0.1.6-alpha 宿主自身的双构建产物**:`@deepseek-ai/dsh-tools` 的 exports 把 `./types`、`./presentation` 子路径指向第二套编译输出(`lib/types/*.js`),与打包产物 `lib/index.js` 并存时调度器键同样分裂——即使没有装任何多余副本也会中招。根治办法是把 `packages/core/tools/src/index.ts` 里的
40
+ | 执行器选项 | 默认值 | 作用 |
41
+ | :-- | :-- | :-- |
42
+ | `shellPath` | 自动探测 | 指定 Git Bash 路径 |
43
+ | `timeoutMs` | 120000 | 单次命令超时,毫秒 |
44
+ | `maxTimeoutMs` | 600000 | 允许请求的最长超时 |
45
+ | `maxOutputBytes` | 64000 | 单次输出上限 |
46
+ | `maxSpillBytes` | 67108864 | 输出落盘上限 |
47
+ | `graceMs` | 3000 | 超时后的退出宽限时间 |
62
48
 
63
- ```ts
64
- Symbol('@deepseek-ai/dsh-tools.scheduler') → Symbol.for('@deepseek-ai/dsh-tools.scheduler')
65
- ```
49
+ ## 排错
66
50
 
67
- `Symbol.for` 走全局符号注册表,跨模块实例恒等,两类触发路径同时免疫。
51
+ 模式未出现时,先确认 DSH 为 0.1.7 及以上且安装后已重启。不要通过重建旧预设目录解决,新宿主不再从该目录发现预设。
68
52
 
69
- **本插件自 0.4.7 起在启动时自动体检**:发现 profile 内核心包副本、或宿主仍使用模块本地 Symbol 键(未打上述补丁)时,会在日志里给出对应警告与修复指引(只警告,不阻断启动)。
53
+ 若每个工具都报 `Cannot read properties of undefined (reading 'prepare')`,查看启动日志中的核心包冲突提示。应升级带入额外 `dsh-tools` / `cordis` 副本的插件并重新安装依赖;不要删除整个 `@deepseek-ai` 目录,官方的公共辅助包属于正常依赖。另一个已确认原因是宿主同时加载两份工具构建产物且调度器键使用模块局部 `Symbol`;源码构建可将其改为 `Symbol.for('@deepseek-ai/dsh-tools.scheduler')` 后重新构建。
70
54
 
71
55
  ## 卸载
72
56
 
@@ -74,41 +58,8 @@
74
58
  dsh plugin --profile web remove dsh-minimal-ptc
75
59
  ```
76
60
 
77
- 卸载后重启 Web 服务。如需彻底清理,可再手动删除自己 profile `cordis.patch.yml` 中覆盖的插件行。
78
-
79
-
80
- ## Windows Git Bash 配置
81
-
82
- 预设内置的 Git Bash executor 可在 `agent.cordis.yml` 的 `gitbash-executor` 行覆盖:
83
-
84
- | 配置 | 默认 | 说明 |
85
- | :-- | :-- | :-- |
86
- | `shellPath` | 自动探测 | 固定 Git Bash 路径(如 `C:\\Program Files\\Git\\bin\\bash.exe`) |
87
- | `timeoutMs` | 120000 | 单次命令超时(毫秒) |
88
- | `maxTimeoutMs` | 600000 | 请求可要求的最大超时 |
89
- | `maxOutputBytes` | 64000 | 单次输出上限 |
90
- | `maxSpillBytes` | 67108864 | 输出溢出落盘上限 |
91
- | `graceMs` | 3000 | 超时后的宽限时间 |
92
-
93
- 自动探测顺序:`GIT_BASH` → `Program Files\\Git` → `Program Files (x86)\\Git` → `LOCALAPPDATA\\Programs\\Git` → PATH。
94
-
95
- ## 目录结构
96
-
97
- ```
98
- dsh-minimal-ptc/
99
- ├── cordis.patch.yml # 插入宿主行(物化预设)
100
- ├── lib/index.js # 宿主插件:物化 ptc-minimal 预设到用户预设根目录
101
- └── presets/ptc-minimal/ # 内置 Agent 模式(极简提示词 + PTC 全能力)
102
- ├── agent.cordis.yml
103
- ├── gitbash-executor.mjs # Windows Git Bash 探测与执行器(零依赖)
104
- └── preset.yml
105
- ```
106
-
107
- ## 说明
108
-
109
- - 物化策略:目标目录不存在时写入全部文件;插件版本或宿主运行时种类变化时刷新受管理文件;无标记的自建预设不覆盖。
110
- - 升级插件只需更新 `package.json` 的版本;预设标记自动读取该版本。
61
+ 重启 Web 服务后生效。
111
62
 
112
- ## 许可证
63
+ ## License
113
64
 
114
65
  MIT
package/cordis.patch.yml CHANGED
@@ -1,8 +1,8 @@
1
- # dsh-minimal-ptc 组合包补丁:向 profile 插入本插件的宿主行。
2
- #
3
- # 宿主行(name: dsh-minimal-ptc)在启动时把内置的 ptc-minimal 预设
4
- # 物化到用户预设根目录($DSH_HOME/.agent-presets/ptc-minimal),
5
- # 安装即获得「极简 PTC 模式」Agent 模式。
6
- - insert:
7
- - id: ptc-minimal-preset
8
- name: 'dsh-minimal-ptc'
1
+ # dsh-minimal-ptc 组合包补丁:向 profile 插入本插件的宿主行。
2
+ #
3
+ # 宿主行(name: dsh-minimal-ptc)在启动时把内置的 ptc-minimal 预设
4
+ # 物化到用户预设根目录($DSH_HOME/.agent-presets/ptc-minimal),
5
+ # 安装即获得「极简 PTC 模式」Agent 模式。
6
+ - insert:
7
+ - id: ptc-minimal-preset
8
+ name: 'dsh-minimal-ptc'