dsh-minimal-ptc 0.5.3 → 0.5.5

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 CHANGED
@@ -4,6 +4,16 @@
4
4
 
5
5
  [历史英文记录](docs/CHANGELOG.en.md)
6
6
 
7
+ ## 0.5.5 (2026-10-15)
8
+
9
+ - 修复 DSH 0.2.1-alpha.3 移除子代理 `toolFilter` 后预设挂载失败;子代理仍由官方定时工具拒绝使用提醒,主代理保持定时能力。
10
+ - 提供可直接复制使用的官方 Node 持久执行覆盖补丁与中英文指引,需 DSH 0.2.1-alpha.3 及以上;默认仍为每次独立执行。
11
+ - 明确持久模式的返回值、变量重声明和状态清理行为;读图、自动压缩与 `/compact` 保留官方宿主实现。
12
+
13
+ ## 0.5.4 (2026-10-05)
14
+
15
+ - 修复新版 DSH 并行启动时,定时服务就绪较晚导致整套极简 PTC 预设“加载失败”的问题。现在等待服务激活,再通过宿主加载官方定时工具;旧版宿主不会导入缺失的模块。
16
+
7
17
  ## 0.5.3 (2026-10-05)
8
18
 
9
19
  - 对齐官方 dsh-v0.2.1-alpha.1 PTC 的定时任务工具与子代理禁止调度规则,保留固定一句提示词、Windows Git Bash 和持久 PowerShell。
package/README.en.md CHANGED
@@ -8,6 +8,8 @@ Combine the official minimal prompt with PTC orchestration, plugin tools and Win
8
8
 
9
9
  [![npm](https://img.shields.io/npm/v/dsh-minimal-ptc)](https://www.npmjs.com/package/dsh-minimal-ptc) [![downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-minimal-ptc-downloads.svg)](https://www.npmjs.com/package/dsh-minimal-ptc)
10
10
 
11
+ Feedback and contributions are welcome: report [issues](https://github.com/STARDUSTLC666/dsh-minimal-ptc/issues) or submit [pull requests](https://github.com/STARDUSTLC666/dsh-minimal-ptc/pulls).
12
+
11
13
  ## What it does
12
14
 
13
15
  - Use the official run_code entry for multi-step tool calls.
package/README.md CHANGED
@@ -8,6 +8,8 @@
8
8
 
9
9
  [![npm](https://img.shields.io/npm/v/dsh-minimal-ptc)](https://www.npmjs.com/package/dsh-minimal-ptc) [![downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-minimal-ptc-downloads.svg)](https://www.npmjs.com/package/dsh-minimal-ptc)
10
10
 
11
+ 欢迎使用,遇到问题或有改进建议,请提交 [issues](https://github.com/STARDUSTLC666/dsh-minimal-ptc/issues) 和 [PR](https://github.com/STARDUSTLC666/dsh-minimal-ptc/pulls)。
12
+
11
13
  ## 功能
12
14
 
13
15
  - 以官方 run_code 入口编排多步工具调用。
@@ -4,6 +4,10 @@
4
4
 
5
5
  These English notes preserve the earlier translations. The main changelog contains the consolidated version history.
6
6
 
7
+ ## 0.5.4 (2026-10-05)
8
+
9
+ - Wait for the Host schedule service before importing its official tools. Fixes a parallel startup race that marked the whole preset as failed; hosts without scheduling never import the unavailable module.
10
+
7
11
  ## 0.5.3 (2026-10-05)
8
12
 
9
13
  - Align with dsh-v0.2.1-alpha.1 PTC scheduling tools and subagent scheduling restrictions while preserving the one-line prompt and Windows shells.
package/docs/USAGE.en.md CHANGED
@@ -6,11 +6,11 @@
6
6
 
7
7
  The primary minimal PTC agent can use official scheduling tools. Spawn/fork subagents follow official restrictions against creating, listing, updating or deleting schedules. Minimal mode still omits runtime context, time prompts and AGENTS instructions.
8
8
 
9
- Scheduling tools activate only when the host provides its `schedule` service. Older hosts skip this module and retain their existing PTC capabilities; do not install duplicate DSH core packages.
9
+ Scheduling tools wait for the host's `schedule` service to activate, avoiding preset failures during parallel startup. Older hosts skip the scheduling module and retain existing PTC capabilities; do not install duplicate core packages. The retired subagent `toolFilter` field is no longer passed. Official scheduling tools reject delegated callers at execution time.
10
10
 
11
11
  ## Install and use
12
12
 
13
- Version 0.5.x requires **Harness 0.1.7 or later**. The current official comparison baseline is **0.2.0-rc.2**. Use `dsh-minimal-ptc@0.4.7` on Harness 0.1.5/0.1.6.
13
+ Version 0.5.x requires **Harness 0.1.7 or later**. This iteration compares the official **0.2.1-alpha.3** source. Use `dsh-minimal-ptc@0.4.7` on Harness 0.1.5/0.1.6.
14
14
 
15
15
  ```bash
16
16
  dsh plugin --profile web add dsh-minimal-ptc
@@ -22,7 +22,7 @@ For example: “Run this project’s tests, find the failures and fix them.” E
22
22
 
23
23
  ## Official presets and extensions
24
24
 
25
- The core prompt matches the official Minimal preset. PTC presentation and the `run_code` entry follow the official PTC preset, registered through the host's declarative preset service. Compare [Minimal](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/bundle/web-app/presets/minimal.patch.yml) and [PTC](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/bundle/web-app/presets/ptc.patch.yml).
25
+ The core prompt matches the official Minimal preset. PTC presentation and the `run_code` entry follow the official PTC preset, registered through the host's declarative preset service. Compare [Minimal](https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.2.1-alpha.3/packages/bundle/web-app/presets/minimal.patch.yml) and [PTC](https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.2.1-alpha.3/packages/bundle/web-app/presets/ptc.patch.yml).
26
26
 
27
27
  The following extensions make its defaults differ from the stock PTC preset:
28
28
 
@@ -33,6 +33,20 @@ The following extensions make its defaults differ from the stock PTC preset:
33
33
 
34
34
  The host provides tool implementations. The plugin does not bundle a second core runtime or override host approval policy. See [validation records](VALIDATION.md) for the scope of the comparison.
35
35
 
36
+ ## Optional: retain intermediate Node state
37
+
38
+ DSH 0.2.1-alpha.3 adds the official `persistent-in-memory` Node execution mode. The default remains `per-call`; this plugin does not automatically change the shared provider.
39
+
40
+ Copy the bundled `presets/ptc-minimal/persistent-node.patch.yml` to a convenient location and run `dsh --profile web --patch <path>`. Alternatively, save this override as a local YAML file:
41
+
42
+ ```yaml
43
+ - id: ptc-runtime
44
+ config:
45
+ executionMode: persistent-in-memory
46
+ ```
47
+
48
+ This configures the host's shared Node provider while retaining independent state for each Agent. Return a final JSON expression rather than top-level `return`. Repeating a `let`/`const` declaration fails; assign to an existing variable or choose a new name. Restarting, switching modes or terminating the runtime clears its state; save important results to files. Image reading, automatic compaction and `/compact` use the host's official implementations.
49
+
36
50
  ## Windows terminals
37
51
 
38
52
  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.
package/docs/USAGE.md CHANGED
@@ -6,11 +6,11 @@
6
6
 
7
7
  极简 PTC 的主代理现在可使用官方定时任务;spawn / fork 子代理保持官方限制,不可创建、列举、更新或删除任务。极简模式仍不注入运行时上下文、时间提示或 AGENTS 指令。
8
8
 
9
- 定时工具只在宿主提供 `schedule` 服务时启用。旧版宿主会跳过这个模块,继续使用原有 PTC 能力;无需另外安装 DSH 核心包。
9
+ 定时工具等待宿主的 `schedule` 服务激活后启用,避免启动顺序导致模式加载失败。旧版宿主会跳过官方定时模块,继续使用原有 PTC 能力;无需另外安装 DSH 核心包。新版已移除子代理 `toolFilter` 参数,本插件不再传入该字段;官方定时工具会在执行入口拒绝委派子代理使用提醒。
10
10
 
11
11
  ## 安装和使用
12
12
 
13
- 0.5.x 需要 **Harness 0.1.7 及以上**,当前官方核对基线为 **0.2.0-rc.2**。仍使用 Harness 0.1.5/0.1.6 时,请安装 `dsh-minimal-ptc@0.4.7`。
13
+ 0.5.x 需要 **Harness 0.1.7 及以上**,本次对照 **0.2.1-alpha.3** 的官方源码。仍使用 Harness 0.1.5/0.1.6 时,请安装 `dsh-minimal-ptc@0.4.7`。
14
14
 
15
15
  ```bash
16
16
  dsh plugin --profile web add dsh-minimal-ptc
@@ -22,7 +22,7 @@ dsh plugin --profile web add dsh-minimal-ptc
22
22
 
23
23
  ## 官方预设与扩展
24
24
 
25
- 核心提示词与官方 Minimal 一致,PTC 工具展示与 `run_code` 入口沿用官方 PTC,通过官方声明式预设服务注册。对照源码:[Minimal](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/bundle/web-app/presets/minimal.patch.yml)、[PTC](https://github.com/deepseek-ai/deepseek-harness/blob/639ed015397290b3745d163aafe02ffee4aa3f84/packages/bundle/web-app/presets/ptc.patch.yml)。
25
+ 核心提示词与官方 Minimal 一致,PTC 工具展示与 `run_code` 入口沿用官方 PTC,通过官方声明式预设服务注册。对照源码:[Minimal](https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.2.1-alpha.3/packages/bundle/web-app/presets/minimal.patch.yml)、[PTC](https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.2.1-alpha.3/packages/bundle/web-app/presets/ptc.patch.yml)。
26
26
 
27
27
  本插件保留以下扩展,因此与官方 PTC 的默认开关并非完全相同:
28
28
 
@@ -33,6 +33,20 @@ dsh plugin --profile web add dsh-minimal-ptc
33
33
 
34
34
  工具实现由宿主提供,插件不捆绑另一份核心运行时,也不覆盖宿主审批规则。核对范围见[验证记录](VALIDATION.md)。
35
35
 
36
+ ## 可选:保留 Node 中间变量
37
+
38
+ DSH 0.2.1-alpha.3 起,官方 Node 执行器可在同一 Agent 的多次 `run_code` 之间保留变量、函数和已导入模块。默认仍是每次独立执行;本插件不会自动切换宿主的执行模式。
39
+
40
+ 需要时,将包内 `presets/ptc-minimal/persistent-node.patch.yml` 复制到方便的位置,执行 `dsh --profile web --patch <该文件路径>`。也可以把以下覆盖配置保存为本机 YAML 文件后使用:
41
+
42
+ ```yaml
43
+ - id: ptc-runtime
44
+ config:
45
+ executionMode: persistent-in-memory
46
+ ```
47
+
48
+ 此开关作用于宿主共享的 Node provider,每个 Agent 各自保存状态。持久模式用最后一个 JSON 表达式返回结果,不能在顶层使用 `return`;重复声明同名 `let` / `const` 会报错,可改为赋值或使用新变量名。重启、切换执行模式或执行器被终止后状态会清空,重要结果仍应保存到文件。读图、自动压缩和 `/compact` 沿用宿主提供的官方实现。
49
+
36
50
  ## Windows 终端
37
51
 
38
52
  安装常规版 Git for Windows 后会自动找到 Git Bash。若安装在自定义位置,可设置 `GIT_BASH` 为 `bash.exe` 的完整路径,再启动 DSH。PowerShell 会话会保留当前目录、变量和函数。
@@ -2,6 +2,14 @@
2
2
 
3
3
  本页整理原 README 的历史验证说明,保留当时的版本、日期与范围。自动测试、启动检查、浏览器操作和真实服务验收分别记录,不能相互替代。更详细的版本验收文件仍保留在仓库中。
4
4
 
5
+ ## 2026-10-05:0.5.4 启动与可见操作
6
+
7
+ - Windows 自动测试:22 通过、1 按环境跳过。覆盖旧宿主不导入定时模块、服务延迟到达及模块失败的回报。
8
+ - 官方 npm Harness `0.2.1-alpha.1` 的实际网页中选择「极简 PTC 模式」,通过 `run_code` 调用 SQL,返回 `preset_ok = 1`,并列出 `schedule_create/list/delete/update` 四个官方工具。
9
+ - 工具调用由验证专用脚本选择,未测试模型自主选择工具。全部操作位于隔离配置和合成项目,不涉及用户数据。
10
+ - 本环境「工作区内修改」遇到 `SetNamedSecurityInfoW failed (Win32 5): grantWrite`;上述执行成功发生在隔离会话的「完全权限」模式,之后已恢复原模式。默认权限下的 Windows 沙箱执行仍记为受阻,不建议以降低日常权限来解决。
11
+ - RC2 的完整插件契约验证通过,保留旧宿主兼容;桌面原生窗口未在本轮重新操作。
12
+
5
13
  ## 2026-10-02:0.5.2 与官方 RC2 源码核对
6
14
 
7
15
  - 官方基线:Harness `0.2.0-rc.2`,提交 `639ed015397290b3745d163aafe02ffee4aa3f84`。
package/lib/index.js CHANGED
@@ -60,7 +60,7 @@ function materialize(logger, modernRuntime) {
60
60
  return
61
61
  }
62
62
 
63
- for (const file of ['agent.cordis.yml', 'preset.yml', 'gitbash-executor.mjs']) {
63
+ for (const file of ['agent.cordis.yml', 'preset.yml', 'gitbash-executor.mjs', 'schedule-tools.mjs']) {
64
64
  let content = readFileSync(join(presetSourceDir, file), 'utf8')
65
65
  if (modernRuntime && file === 'agent.cordis.yml') {
66
66
  content = content.replaceAll('workflow-worker-thread', 'workflow-ptc')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-minimal-ptc",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "把官方极简提示词与 PTC 编排组合起来,提供完整插件工具和 Windows 终端适配。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -10,7 +10,9 @@
10
10
  },
11
11
  "./cordis.patch.yml": "./cordis.patch.yml",
12
12
  "./package.json": "./package.json",
13
- "./gitbash-executor": "./presets/ptc-minimal/gitbash-executor.mjs"
13
+ "./gitbash-executor": "./presets/ptc-minimal/gitbash-executor.mjs",
14
+ "./schedule-tools": "./presets/ptc-minimal/schedule-tools.mjs",
15
+ "./persistent-node.patch.yml": "./presets/ptc-minimal/persistent-node.patch.yml"
14
16
  },
15
17
  "files": [
16
18
  "lib",
@@ -120,8 +120,7 @@
120
120
  name: '@deepseek-ai/dsh-tool-jobs'
121
121
 
122
122
  - id: tool-schedule
123
- name: '@deepseek-ai/dsh-tool-schedule'
124
- disabled: !!js "!ctx.get('schedule')"
123
+ name: ./schedule-tools.mjs
125
124
 
126
125
  # ── skills ──────────────────────────────────────────────────────────────────
127
126
 
@@ -218,12 +217,6 @@
218
217
  toolName: subagent
219
218
  modelSelectionSettings: true
220
219
  backgroundMode: continuable
221
- toolFilter:
222
- deny:
223
- - schedule_create
224
- - schedule_delete
225
- - schedule_list
226
- - schedule_update
227
220
 
228
221
  - id: tool-subagent-fork
229
222
  name: '@deepseek-ai/dsh-tool-subagent'
@@ -231,12 +224,6 @@
231
224
  provider: fork
232
225
  toolName: subagent_fork
233
226
  backgroundMode: continuable
234
- toolFilter:
235
- deny:
236
- - schedule_create
237
- - schedule_delete
238
- - schedule_list
239
- - schedule_update
240
227
 
241
228
  # Product providers are host-plane singletons. Remove `disabled` from
242
229
  # either ordinary tool row to expose that product to agents on this preset.
@@ -0,0 +1,6 @@
1
+ # Optional host-provider configuration for DSH 0.2.1-alpha.3 and newer.
2
+ # Apply with `dsh --profile web --patch <this-file>`; the default remains per-call.
3
+ # This configures the shared Node provider. Each Agent's retained state is isolated.
4
+ - id: ptc-runtime
5
+ config:
6
+ executionMode: persistent-in-memory
@@ -0,0 +1,12 @@
1
+ // Optional Host capability: wait for the service instead of evaluating its
2
+ // current readiness in a Loader `disabled` expression. The official module
3
+ // is resolved by the Host so this preset never bundles a second core copy.
4
+ export const name = 'ptc-minimal-schedule-tools'
5
+ export const inject = ['tools']
6
+
7
+ export function apply(ctx) {
8
+ ctx.inject(['schedule'], async (scheduleCtx) => {
9
+ const exports = await scheduleCtx.loader.import('@deepseek-ai/dsh-tool-schedule')
10
+ scheduleCtx.plugin(scheduleCtx.loader.unwrapExports(exports))
11
+ })
12
+ }
@@ -130,10 +130,9 @@
130
130
  name: '@deepseek-ai/dsh-tool-jobs'
131
131
 
132
132
  - id: tool-schedule
133
- name: '@deepseek-ai/dsh-tool-schedule'
134
- # Older hosts have no schedule service or module. Disabled rows
135
- # are never imported; enable only when the host supplies it.
136
- disabled: !!js "!ctx.get('schedule')"
133
+ # Wait for service activation; do not freeze an early readiness
134
+ # check into a disabled row while the Host is still booting.
135
+ name: dsh-minimal-ptc/schedule-tools
137
136
 
138
137
  # ── skills ──────────────────────────────────────────────────────────────────
139
138
 
@@ -230,12 +229,6 @@
230
229
  toolName: subagent
231
230
  modelSelectionSettings: true
232
231
  backgroundMode: continuable
233
- toolFilter:
234
- deny:
235
- - schedule_create
236
- - schedule_delete
237
- - schedule_list
238
- - schedule_update
239
232
 
240
233
  - id: tool-subagent-fork
241
234
  name: '@deepseek-ai/dsh-tool-subagent'
@@ -243,12 +236,6 @@
243
236
  provider: fork
244
237
  toolName: subagent_fork
245
238
  backgroundMode: continuable
246
- toolFilter:
247
- deny:
248
- - schedule_create
249
- - schedule_delete
250
- - schedule_list
251
- - schedule_update
252
239
 
253
240
  # Product providers are host-plane singletons. Remove `disabled` from
254
241
  # either ordinary tool row to expose that product to agents on this preset.