dsh-claude-preset 1.0.0 → 1.0.1

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/README.md CHANGED
@@ -1,132 +1,141 @@
1
- # dsh-claude-preset
2
-
3
- > **中文** | [English](#english)
4
-
5
- 为 [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness) 打造的 **Claude Code 智能体预设插件**。
6
- 将 Claude Code 的行为系统提示词、13 项核心工具描述、Plan Mode 规划结构与 9 段式上下文压缩无缝接入 DSH,同时保留 DSH 原生的沙箱策略、扩展工具与运行时上下文。
7
-
8
- ---
9
-
10
- ## 实测对比(DeepSeek V4.1 1017)
11
-
12
- 在同一模型、同一提示词任务(制作“鹈鹕骑自行车”交互网页)下的实测结果:
13
-
14
- | 指标 | 标准模式 | 插件模式 (`dsh-claude-preset`) | 提升幅度 |
15
- | --- | --- | --- | --- |
16
- | **任务总耗时** | 11 分 26 秒 (686s) | **6 分 23 秒 (383s)** | **快 44.2%** |
17
- | **Token 总用量** | 5,370,913 tok | **2,292,784 tok** | **省 57.3%** |
18
- | **输出 Token** | 83,010 tok | **56,574 tok** | **省 31.8%** |
19
-
20
- ---
21
-
22
- ## 下载与安装使用
23
-
24
- ### 方式一:从 GitHub 克隆后本地安装(推荐)
25
-
26
- ```bash
27
- git clone https://github.com/killher1/dsh-claude-preset.git
28
- dsh plugin --profile web add ./dsh-claude-preset
29
- ```
30
-
31
- Windows PowerShell 可直接传入本地绝对路径:
32
-
33
- ```powershell
34
- dsh plugin --profile web add D:\path\to\dsh-claude-preset
35
- ```
36
-
37
- ### 方式二:通过 npm 安装(若已发布到 npm)
38
-
39
- ```bash
40
- dsh plugin --profile web add dsh-claude-preset
41
- ```
42
-
43
- > 若只用于命令行环境,可将 `--profile web` 替换为目标 profile 或省略。
44
-
45
- ### 启用插件
46
-
47
- 1. 安装完成后,**重启 `dsh web`**(或重启 DSH 服务),让 Host 与浏览器客户端加载新插件。
48
- 2. 新建会话时,在智能体预设(Preset)下拉列表中选择 **「Claude Code 预设」** 即可生效。
49
- 3. 插件以 bundle layer 形式挂载到目标 profile,**不会修改 DSH 本体安装目录**,其他预设保持完全独立。
50
-
51
- > **注意**:
52
- > - `dsh plugin` 底层调用 `pnpm`,若未安装请先执行 `npm install -g pnpm`。
53
- > - 若使用 **DSH 桌面端(Electron)**,`dsh plugin --profile desktop` 会提示由桌面端独立管理,请在桌面端界面内的插件管理 / 插件市场中安装。
54
-
55
- ---
56
-
57
- ## 核心改动
58
-
59
- 1. **行为系统提示词(`index.js` + `prompt-text.js`)**
60
- - 置空默认 `harness:identity`,并在 `deployment:persona-prefix` 中注入完整的 Claude Code 行为规范(任务处理、代码风格、谨慎执行、完整交付、沟通汇报与安全边界)。
61
- 2. **作用域级工具描述覆盖(`index.js` + `tool-descriptions.js`)**
62
- - 仅在 `claude-code` 子作用域内替换 13 个核心工具的 `description`:`read`、`write`、`edit`、`glob`、`grep`、`bash`、`pwsh`、`todo_write`、`ask_user_question`、`subagent`、`subagent_fork`、`web_fetch`、`web_search`。
63
- - 保留 DSH 原生的参数校验、沙箱执行器以及 `apply_patch`、`read_image`、`jobs`、`schedule`、`goal`、`workflow`、`office` 等独有能力。
64
- 3. **Plan Mode 规划增强(`cordis.patch.yml`)**
65
- - 将 `plan-mode` 的引导模板对齐 Claude Code 的计划结构(`Context` → 单一推荐方案 → 关键文件 → 复用工具 → `Verification` 验证闭环)。
66
- 4. **9 段式上下文压缩(`compaction.js` + `cordis.patch.yml`)**
67
- - 在隔离的 `compaction` 分组内继承 `BasicCompactionEngine`,保留 DSH 压缩阈值与检查点锁,将压缩指令替换为 Claude Code 9 段式结构化摘要,并自动剥离 `<analysis>...</analysis>` 过程草稿。
68
-
69
- ---
70
-
71
- <a id="english"></a>
72
-
73
- ## English
74
-
75
- A **Claude Code agent preset plugin** for [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness).
76
- It ports Claude Code's behavioral system prompt, 13 core tool descriptions, Plan Mode structure, and 9-section context compaction into DSH while keeping DSH's native sandbox policies, extended tools, and runtime context intact.
77
-
78
- ### Benchmark (DeepSeek V4.1 1017)
79
-
80
- Same model, same prompt ("Pelican on a Bicycle" interactive webpage):
81
-
82
- | Metric | Standard Mode | Plugin Mode (`dsh-claude-preset`) | Improvement |
83
- | --- | --- | --- | --- |
84
- | **Total Time** | 11m 26s (686s) | **6m 23s (383s)** | **44.2% faster** |
85
- | **Total Tokens** | 5,370,913 tok | **2,292,784 tok** | **57.3% fewer** |
86
- | **Output Tokens** | 83,010 tok | **56,574 tok** | **31.8% fewer** |
87
-
88
- ### Installation & Usage
89
-
90
- #### Option 1: Install from GitHub Clone
91
-
92
- ```bash
93
- git clone https://github.com/killher1/dsh-claude-preset.git
94
- dsh plugin --profile web add ./dsh-claude-preset
95
- ```
96
-
97
- On Windows PowerShell, pass the local checkout path:
98
-
99
- ```powershell
100
- dsh plugin --profile web add D:\path\to\dsh-claude-preset
101
- ```
102
-
103
- #### Option 2: Install from npm (if published)
104
-
105
- ```bash
106
- dsh plugin --profile web add dsh-claude-preset
107
- ```
108
-
109
- #### Enable the Preset
110
-
111
- 1. Restart `dsh web` (or your DSH host) so both the host and browser client load the plugin.
112
- 2. Start a new session and select **Claude Code** (`Claude Code 预设`) from the agent preset selector.
113
- 3. The plugin is layered onto the target profile as a bundle without modifying your DSH installation directory.
114
-
115
- ### What It Changes
116
-
117
- 1. **Behavioral system prompt (`index.js` + `prompt-text.js`)**:
118
- - Replaces `harness:identity` with empty text and injects the adapted Claude Code prompt into `deployment:persona-prefix`.
119
- 2. **Scoped tool-description shadowing (`index.js` + `tool-descriptions.js`)**:
120
- - Shadows descriptions on each `claude-code` agent's child scope (`agent.ctx.tools.register`) for 13 tools: `read`, `write`, `edit`, `glob`, `grep`, `bash`, `pwsh`, `todo_write`, `ask_user_question`, `subagent`, `subagent_fork`, `web_fetch`, `web_search`, while keeping DSH-only tools (`apply_patch`, `read_image`, `jobs`, `schedule`, `goal`, `workflow`, `office`, etc.) untouched.
121
- 3. **Plan mode (`cordis.patch.yml`)**:
122
- - Incorporates Claude Code's plan-writing structure (`Context`, single recommended approach, critical files, reused utilities, `Verification`) while preserving DSH's `exit_plan_mode` / `ask_user_question` / `todo_write` mechanics.
123
- 4. **Context compaction (`compaction.js` + `cordis.patch.yml`)**:
124
- - Subclasses `BasicCompactionEngine` inside the isolated `compaction` group (`isolate: { compaction: true, toolResultPruner: true }`) to swap in Claude Code's 9-section compaction prompt, stripping `<analysis>...</analysis>` and unwrapping `<summary>...</summary>`.
125
-
126
- ### Known Caveat (`glob` / `grep` overflow spill files)
127
-
128
- `dsh-tool-fs-search`'s `tools/post-execute` hook saves over-cap results to a spill file only when `ctx.tools.get(exec.name, exec.agent) === tool` (exact object identity with the unshadowed `ToolDefinition`). Because `glob` and `grep` are shadowed with updated descriptions on `agent.ctx`, inline result caps remain enforced via `output.render`, while overflow spill-file creation is bypassed.
129
-
130
- ### Prompt Provenance
131
-
132
- Adapted from Claude Code v2.1.329 (`claude-code-system-prompts`): template variables were resolved to literal text, tool names were mapped to DSH equivalents (`read`, `write`, `edit`, `glob`, `grep`, `bash`, `todo_write`, `subagent`, `subagent_fork`), `CLAUDE.md` became `AGENTS.md`, and Claude Code-specific capabilities not present in DSH (hooks, output styles, persistent memory, Chrome automation, etc.) were dropped.
1
+ # dsh-claude-preset
2
+
3
+ > **中文** | [English](#english)
4
+
5
+ 为 [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness) 打造的 **Claude Code 智能体预设插件**。
6
+ 将 Claude Code 的行为系统提示词、13 项核心工具描述、Plan Mode 规划结构与 9 段式上下文压缩无缝接入 DSH,同时保留 DSH 原生的沙箱策略、扩展工具与运行时上下文。
7
+
8
+ ---
9
+
10
+ ## 实测对比(DeepSeek V4.1 1017)
11
+
12
+ 在同一模型、同一提示词任务(制作“鹈鹕骑自行车”交互网页)下的实测结果:
13
+
14
+ | 指标 | 标准模式 | 插件模式 (`dsh-claude-preset`) | 提升幅度 |
15
+ | --- | --- | --- | --- |
16
+ | **任务总耗时** | 11 分 26 秒 (686s) | **6 分 23 秒 (383s)** | **快 44.2%** |
17
+ | **Token 总用量** | 5,370,913 tok | **2,292,784 tok** | **省 57.3%** |
18
+ | **输出 Token** | 83,010 tok | **56,574 tok** | **省 31.8%** |
19
+
20
+ ---
21
+
22
+ ## 下载与安装使用
23
+
24
+ ### 方式一:在 DSH 官方插件界面直接添加(推荐)
25
+
26
+ 打开 DeepSeek Harness → 左侧 **「插件」** → 右上角 **「+ 添加插件」**,在输入框中填写 `dsh-claude-preset`,点击 **「安装」** 即可(也可以直接填写本仓库地址):
27
+
28
+ ### 方式二:从 GitHub 克隆后本地安装
29
+
30
+ ```bash
31
+ git clone https://github.com/killher1/dsh-claude-preset.git
32
+ dsh plugin --profile web add ./dsh-claude-preset
33
+ ```
34
+
35
+ Windows PowerShell 可直接传入本地绝对路径:
36
+
37
+ ```powershell
38
+ dsh plugin --profile web add D:\path\to\dsh-claude-preset
39
+ ```
40
+
41
+ ### 方式三:通过 CLI 从 npm 安装
42
+
43
+ ```bash
44
+ dsh plugin --profile web add dsh-claude-preset
45
+ ```
46
+
47
+ > 若只用于命令行环境,可将 `--profile web` 替换为目标 profile 或省略。
48
+
49
+ ### 启用插件
50
+
51
+ 1. 安装完成后,**重启 `dsh web`**(或重启 DSH 服务),让 Host 与浏览器客户端加载新插件。
52
+ 2. 新建会话时,在智能体预设(Preset)下拉列表中选择 **「Claude Code 预设」** 即可生效。
53
+ 3. 插件以 bundle layer 形式挂载到目标 profile,**不会修改 DSH 本体安装目录**,其他预设保持完全独立。
54
+
55
+ > **注意**:
56
+ > - `dsh plugin` 底层调用 `pnpm`,若未安装请先执行 `npm install -g pnpm`。
57
+ > - 若使用 **DSH 桌面端(Electron)**,`dsh plugin --profile desktop` 会提示由桌面端独立管理,请在桌面端界面内的插件管理 / 插件市场中安装。
58
+
59
+ ---
60
+
61
+ ## 核心改动
62
+
63
+ 1. **行为系统提示词(`index.js` + `prompt-text.js`)**
64
+ - 置空默认 `harness:identity`,并在 `deployment:persona-prefix` 中注入完整的 Claude Code 行为规范(任务处理、代码风格、谨慎执行、完整交付、沟通汇报与安全边界)。
65
+ 2. **作用域级工具描述覆盖(`index.js` + `tool-descriptions.js`)**
66
+ - 仅在 `claude-code` 子作用域内替换 13 个核心工具的 `description`:`read`、`write`、`edit`、`glob`、`grep`、`bash`、`pwsh`、`todo_write`、`ask_user_question`、`subagent`、`subagent_fork`、`web_fetch`、`web_search`。
67
+ - 保留 DSH 原生的参数校验、沙箱执行器以及 `apply_patch`、`read_image`、`jobs`、`schedule`、`goal`、`workflow`、`office` 等独有能力。
68
+ 3. **Plan Mode 规划增强(`cordis.patch.yml`)**
69
+ - 将 `plan-mode` 的引导模板对齐 Claude Code 的计划结构(`Context` → 单一推荐方案 → 关键文件 → 复用工具 → `Verification` 验证闭环)。
70
+ 4. **9 段式上下文压缩(`compaction.js` + `cordis.patch.yml`)**
71
+ - 在隔离的 `compaction` 分组内继承 `BasicCompactionEngine`,保留 DSH 压缩阈值与检查点锁,将压缩指令替换为 Claude Code 9 段式结构化摘要,并自动剥离 `<analysis>...</analysis>` 过程草稿。
72
+
73
+ ---
74
+
75
+ <a id="english"></a>
76
+
77
+ ## English
78
+
79
+ A **Claude Code agent preset plugin** for [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness).
80
+ It ports Claude Code's behavioral system prompt, 13 core tool descriptions, Plan Mode structure, and 9-section context compaction into DSH while keeping DSH's native sandbox policies, extended tools, and runtime context intact.
81
+
82
+ ### Benchmark (DeepSeek V4.1 1017)
83
+
84
+ Same model, same prompt ("Pelican on a Bicycle" interactive webpage):
85
+
86
+ | Metric | Standard Mode | Plugin Mode (`dsh-claude-preset`) | Improvement |
87
+ | --- | --- | --- | --- |
88
+ | **Total Time** | 11m 26s (686s) | **6m 23s (383s)** | **44.2% faster** |
89
+ | **Total Tokens** | 5,370,913 tok | **2,292,784 tok** | **57.3% fewer** |
90
+ | **Output Tokens** | 83,010 tok | **56,574 tok** | **31.8% fewer** |
91
+
92
+ ### Installation & Usage
93
+
94
+ #### Option 1: Install in DSH Plugin UI (Recommended)
95
+
96
+ Open DeepSeek Harness → **Plugins** → **+ Add Plugin**, enter `dsh-claude-preset`, and click **Install** (you can also enter the GitHub repository URL or a local directory path):
97
+
98
+
99
+ #### Option 2: Install from GitHub Clone
100
+
101
+ ```bash
102
+ git clone https://github.com/killher1/dsh-claude-preset.git
103
+ dsh plugin --profile web add ./dsh-claude-preset
104
+ ```
105
+
106
+ On Windows PowerShell, pass the local checkout path:
107
+
108
+ ```powershell
109
+ dsh plugin --profile web add D:\path\to\dsh-claude-preset
110
+ ```
111
+
112
+ #### Option 3: Install via CLI from npm
113
+
114
+ ```bash
115
+ dsh plugin --profile web add dsh-claude-preset
116
+ ```
117
+
118
+ #### Enable the Preset
119
+
120
+ 1. Restart `dsh web` (or your DSH host) so both the host and browser client load the plugin.
121
+ 2. Start a new session and select **Claude Code** (`Claude Code 预设`) from the agent preset selector.
122
+ 3. The plugin is layered onto the target profile as a bundle without modifying your DSH installation directory.
123
+
124
+ ### What It Changes
125
+
126
+ 1. **Behavioral system prompt (`index.js` + `prompt-text.js`)**:
127
+ - Replaces `harness:identity` with empty text and injects the adapted Claude Code prompt into `deployment:persona-prefix`.
128
+ 2. **Scoped tool-description shadowing (`index.js` + `tool-descriptions.js`)**:
129
+ - Shadows descriptions on each `claude-code` agent's child scope (`agent.ctx.tools.register`) for 13 tools: `read`, `write`, `edit`, `glob`, `grep`, `bash`, `pwsh`, `todo_write`, `ask_user_question`, `subagent`, `subagent_fork`, `web_fetch`, `web_search`, while keeping DSH-only tools (`apply_patch`, `read_image`, `jobs`, `schedule`, `goal`, `workflow`, `office`, etc.) untouched.
130
+ 3. **Plan mode (`cordis.patch.yml`)**:
131
+ - Incorporates Claude Code's plan-writing structure (`Context`, single recommended approach, critical files, reused utilities, `Verification`) while preserving DSH's `exit_plan_mode` / `ask_user_question` / `todo_write` mechanics.
132
+ 4. **Context compaction (`compaction.js` + `cordis.patch.yml`)**:
133
+ - Subclasses `BasicCompactionEngine` inside the isolated `compaction` group (`isolate: { compaction: true, toolResultPruner: true }`) to swap in Claude Code's 9-section compaction prompt, stripping `<analysis>...</analysis>` and unwrapping `<summary>...</summary>`.
134
+
135
+ ### Known Caveat (`glob` / `grep` overflow spill files)
136
+
137
+ `dsh-tool-fs-search`'s `tools/post-execute` hook saves over-cap results to a spill file only when `ctx.tools.get(exec.name, exec.agent) === tool` (exact object identity with the unshadowed `ToolDefinition`). Because `glob` and `grep` are shadowed with updated descriptions on `agent.ctx`, inline result caps remain enforced via `output.render`, while overflow spill-file creation is bypassed.
138
+
139
+ ### Prompt Provenance
140
+
141
+ Adapted from Claude Code v2.1.329 (`claude-code-system-prompts`): template variables were resolved to literal text, tool names were mapped to DSH equivalents (`read`, `write`, `edit`, `glob`, `grep`, `bash`, `todo_write`, `subagent`, `subagent_fork`), `CLAUDE.md` became `AGENTS.md`, and Claude Code-specific capabilities not present in DSH (hooks, output styles, persistent memory, Chrome automation, etc.) were dropped.
package/cordis.patch.yml CHANGED
@@ -1,145 +1,146 @@
1
- # Claude Code agent preset: one `@deepseek-ai/dsh-agent-preset` declaration
2
- # inserted after the web patch.
3
- #
4
- # The plugin list follows the shipped `standard` preset, so tool calling and
5
- # every other DeepSeek Harness capability stay exactly as they are. Only the
6
- # prompt-contributing row changes: `claude-code-prompt` replaces `persona` and
7
- # supplies Claude Code's own system prompt text instead of a one-line persona.
8
- - insert:
9
- - id: preset-claude-code
10
- name: '@deepseek-ai/dsh-agent-preset'
11
- config:
12
- id: claude-code
13
- name: Claude Code
14
- description: Agent preset whose system prompt is Claude Code's own prompt text.
15
- order: 5
16
- plugins:
17
- - id: claude-code-prompt
18
- name: 'dsh-claude-preset'
19
- - id: agent-instructions
20
- name: '@deepseek-ai/dsh-agent-instructions'
21
- config:
22
- maxBytes: 65536
23
- - id: time-context
24
- name: '@deepseek-ai/dsh-time-context'
25
- - id: tool-bash
26
- name: '@deepseek-ai/dsh-tool-bash'
27
- disabled: !!js process.platform === 'win32'
28
- - id: tool-pwsh
29
- name: '@deepseek-ai/dsh-tool-pwsh'
30
- disabled: !!js process.platform !== 'win32'
31
- - id: tool-fs
32
- name: '@deepseek-ai/dsh-tool-fs'
33
- config:
34
- applyPatch: false
35
- - id: tool-fs-search
36
- name: '@deepseek-ai/dsh-tool-fs-search'
37
- config:
38
- sampleOverCapGlobResults: false
39
- - id: tool-jobs
40
- name: '@deepseek-ai/dsh-tool-jobs'
41
- - id: tool-schedule
42
- name: '@deepseek-ai/dsh-tool-schedule'
43
- - id: skill-filesystem
44
- name: '@deepseek-ai/dsh-skill-filesystem'
45
- config:
46
- customSkillDirs:
47
- - !!js process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('@deepseek-ai/dsh-agent-preset/package.json')), 'skills')
48
- - id: tool-skill
49
- name: '@deepseek-ai/dsh-tool-skill'
50
- - id: command-goal
51
- name: '@deepseek-ai/dsh-command-goal'
52
- - id: tool-goal
53
- name: '@deepseek-ai/dsh-tool-goal'
54
- - id: planning
55
- name: cordis:group
56
- group: true
57
- isolate:
58
- planMode: true
59
- config:
60
- - id: plan-mode
61
- name: '@deepseek-ai/dsh-plan-mode'
62
- config:
63
- section: |
64
- You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
65
-
66
- Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
67
-
68
- The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
69
-
70
- Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
71
-
72
- Make the plan decision-complete and concise enough to scan quickly while detailed enough to execute without making design decisions:
73
- - Begin with a **Context** section: explain why this change is being made — the problem or need it addresses, what prompted it, and the intended outcome.
74
- - Include only your recommended approach, not all alternatives.
75
- - Name the critical files to be modified (for changes that repeat a pattern across many files, describe the pattern once and list a few representative paths rather than enumerating every file or line number), and identify public API, schema, data-flow, edge-case, and failure-mode changes.
76
- - Reference existing functions and utilities you found that should be reused, with their file paths.
77
- - Include a **Verification** section describing how to test the changes end-to-end (running the code, tests, or tools).
78
-
79
- When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
80
- - id: compaction
81
- name: cordis:group
82
- group: true
83
- isolate:
84
- compaction: true
85
- toolResultPruner: true
86
- config:
87
- - id: compaction-basic
88
- name: 'dsh-claude-preset/compaction'
89
- - id: command-compact
90
- name: '@deepseek-ai/dsh-command-compact'
91
- - id: tool-result-pruner
92
- name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
93
- config:
94
- thresholdChars: 8192
95
- headChars: 4096
96
- tailChars: 1024
97
- - id: delegation
98
- name: cordis:group
99
- group: true
100
- isolate:
101
- workflowEngine: true
102
- config:
103
- - id: tool-subagent-control
104
- name: '@deepseek-ai/dsh-tool-subagent-control'
105
- config:
106
- interrupt: false
107
- - id: tool-subagent
108
- name: '@deepseek-ai/dsh-tool-subagent'
109
- config:
110
- provider: spawn
111
- toolName: subagent
112
- modelSelection: true
113
- modelDiscovery: true
114
- - id: tool-subagent-fork
115
- name: '@deepseek-ai/dsh-tool-subagent'
116
- config:
117
- provider: fork
118
- toolName: subagent_fork
119
- - id: workflow-ptc
120
- name: '@deepseek-ai/dsh-workflow-ptc'
121
- config:
122
- provider: spawn
123
- - id: tool-workflow
124
- name: '@deepseek-ai/dsh-tool-workflow'
125
- - id: tool-ask-user
126
- name: '@deepseek-ai/dsh-tool-ask-user'
127
- - id: tool-todo
128
- name: '@deepseek-ai/dsh-tool-todo'
129
- config:
130
- allowParallelInProgress: true
131
- - id: tool-web
132
- name: '@deepseek-ai/dsh-tool-web'
133
- config:
134
- fetch: true
135
- searchTimeoutMs: 60000
136
- - id: present
137
- name: '@deepseek-ai/dsh-tool-present'
138
- - id: tool-office
139
- name: '@deepseek-ai/dsh-tool-office'
140
- - id: tool-plugin-manager
141
- name: '@deepseek-ai/dsh-plugin-manager/tools'
142
- disabled: !!js "!ctx.get('profileContext')"
143
- - id: tool-plugin-market
144
- name: '@deepseek-ai/dsh-plugin-market/tools'
145
- disabled: true
1
+ # Claude Code agent preset: one `@deepseek-ai/dsh-agent-preset` declaration
2
+ # inserted after the web patch.
3
+ #
4
+ # The plugin list follows the shipped `standard` preset so tool execution,
5
+ # sandboxing, delegation, and runtime context stay as they are, while adapting:
6
+ # - `claude-code-prompt`: replaces `harness:identity` / `persona` and shadows
7
+ # 13 core tool descriptions in each bound agent's child scope (`agent.ctx`)
8
+ # - `plan-mode`: uses Claude Code's structured planning guidance
9
+ # - `compaction-claude-code`: uses Claude Code's 9-section compaction prompt
10
+ - insert:
11
+ - id: preset-claude-code
12
+ name: '@deepseek-ai/dsh-agent-preset'
13
+ config:
14
+ id: claude-code
15
+ name: Claude Code
16
+ description: Agent preset whose system prompt is Claude Code's own prompt text.
17
+ order: 5
18
+ plugins:
19
+ - id: claude-code-prompt
20
+ name: 'dsh-claude-preset'
21
+ - id: agent-instructions
22
+ name: '@deepseek-ai/dsh-agent-instructions'
23
+ config:
24
+ maxBytes: 65536
25
+ - id: time-context
26
+ name: '@deepseek-ai/dsh-time-context'
27
+ - id: tool-bash
28
+ name: '@deepseek-ai/dsh-tool-bash'
29
+ disabled: !!js process.platform === 'win32'
30
+ - id: tool-pwsh
31
+ name: '@deepseek-ai/dsh-tool-pwsh'
32
+ disabled: !!js process.platform !== 'win32'
33
+ - id: tool-fs
34
+ name: '@deepseek-ai/dsh-tool-fs'
35
+ config:
36
+ applyPatch: false
37
+ - id: tool-fs-search
38
+ name: '@deepseek-ai/dsh-tool-fs-search'
39
+ config:
40
+ sampleOverCapGlobResults: false
41
+ - id: tool-jobs
42
+ name: '@deepseek-ai/dsh-tool-jobs'
43
+ - id: tool-schedule
44
+ name: '@deepseek-ai/dsh-tool-schedule'
45
+ - id: skill-filesystem
46
+ name: '@deepseek-ai/dsh-skill-filesystem'
47
+ config:
48
+ customSkillDirs: !!js "(() => { try { const path = process.getBuiltinModule('node:path'); const mod = process.getBuiltinModule('node:module'); return [path.join(path.dirname(mod.createRequire(baseUrl).resolve('@deepseek-ai/dsh-agent-preset/package.json')), 'skills')]; } catch { return []; } })()"
49
+ - id: tool-skill
50
+ name: '@deepseek-ai/dsh-tool-skill'
51
+ - id: command-goal
52
+ name: '@deepseek-ai/dsh-command-goal'
53
+ - id: tool-goal
54
+ name: '@deepseek-ai/dsh-tool-goal'
55
+ - id: planning
56
+ name: cordis:group
57
+ group: true
58
+ isolate:
59
+ planMode: true
60
+ config:
61
+ - id: plan-mode
62
+ name: '@deepseek-ai/dsh-plan-mode'
63
+ config:
64
+ section: |
65
+ You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
66
+
67
+ Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
68
+
69
+ The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
70
+
71
+ Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
72
+
73
+ Make the plan decision-complete and concise enough to scan quickly while detailed enough to execute without making design decisions:
74
+ - Begin with a **Context** section: explain why this change is being made — the problem or need it addresses, what prompted it, and the intended outcome.
75
+ - Include only your recommended approach, not all alternatives.
76
+ - Name the critical files to be modified (for changes that repeat a pattern across many files, describe the pattern once and list a few representative paths rather than enumerating every file or line number), and identify public API, schema, data-flow, edge-case, and failure-mode changes.
77
+ - Reference existing functions and utilities you found that should be reused, with their file paths.
78
+ - Include a **Verification** section describing how to test the changes end-to-end (running the code, tests, or tools).
79
+
80
+ When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
81
+ - id: compaction
82
+ name: cordis:group
83
+ group: true
84
+ isolate:
85
+ compaction: true
86
+ toolResultPruner: true
87
+ config:
88
+ - id: compaction-basic
89
+ name: 'dsh-claude-preset/compaction'
90
+ - id: command-compact
91
+ name: '@deepseek-ai/dsh-command-compact'
92
+ - id: tool-result-pruner
93
+ name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
94
+ config:
95
+ thresholdChars: 8192
96
+ headChars: 4096
97
+ tailChars: 1024
98
+ - id: delegation
99
+ name: cordis:group
100
+ group: true
101
+ isolate:
102
+ workflowEngine: true
103
+ config:
104
+ - id: tool-subagent-control
105
+ name: '@deepseek-ai/dsh-tool-subagent-control'
106
+ config:
107
+ interrupt: false
108
+ - id: tool-subagent
109
+ name: '@deepseek-ai/dsh-tool-subagent'
110
+ config:
111
+ provider: spawn
112
+ toolName: subagent
113
+ modelSelection: true
114
+ modelDiscovery: true
115
+ - id: tool-subagent-fork
116
+ name: '@deepseek-ai/dsh-tool-subagent'
117
+ config:
118
+ provider: fork
119
+ toolName: subagent_fork
120
+ - id: workflow-ptc
121
+ name: '@deepseek-ai/dsh-workflow-ptc'
122
+ config:
123
+ provider: spawn
124
+ - id: tool-workflow
125
+ name: '@deepseek-ai/dsh-tool-workflow'
126
+ - id: tool-ask-user
127
+ name: '@deepseek-ai/dsh-tool-ask-user'
128
+ - id: tool-todo
129
+ name: '@deepseek-ai/dsh-tool-todo'
130
+ config:
131
+ allowParallelInProgress: true
132
+ - id: tool-web
133
+ name: '@deepseek-ai/dsh-tool-web'
134
+ config:
135
+ fetch: true
136
+ searchTimeoutMs: 60000
137
+ - id: present
138
+ name: '@deepseek-ai/dsh-tool-present'
139
+ - id: tool-office
140
+ name: '@deepseek-ai/dsh-tool-office'
141
+ - id: tool-plugin-manager
142
+ name: '@deepseek-ai/dsh-plugin-manager/tools'
143
+ disabled: !!js "!ctx.get('profileContext')"
144
+ - id: tool-plugin-market
145
+ name: '@deepseek-ai/dsh-plugin-market/tools'
146
+ disabled: true
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "meta": {
3
- "title": "Claude Code preset",
4
- "description": "Adds an agent preset whose system prompt is Claude Code's own prompt text: identity, harness rules, doing tasks, code style, action safety, delivering and finishing work, communication, reporting outcomes, corrections, git, untrusted input, tool usage, and style. DeepSeek Harness tool plugins keep contributing their own tool mechanics, so tool calling, sandboxing, compaction, delegation, and the runtime context are unchanged. Pick it from the agent preset roster when starting a session."
5
- }
6
- }
1
+ {
2
+ "meta": {
3
+ "title": "Claude Code preset",
4
+ "description": "Adds an agent preset adapting Claude Code's behavioral system prompt, 13 core tool descriptions, Plan Mode planning structure, and 9-section context compaction for DeepSeek Harness, while keeping native tool execution, sandboxing, delegation, and runtime context intact. Pick it from the agent preset roster when starting a session."
5
+ }
6
+ }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "meta": {
3
- "title": "Claude Code 预设",
4
- "description": "新增一个智能体预设,其系统提示词取自 Claude Code 自身的提示词:身份、Harness 规则、任务处理、代码风格、谨慎执行、交付与完成工作、沟通、结果汇报、纠错、Git、不可信输入、工具使用与风格。DeepSeek Harness 的工具插件仍各自贡献工具机制说明,因此工具调用、沙箱、上下文压缩、子智能体委派和运行时上下文都不变。新建会话时在智能体预设列表中选择它。"
5
- }
6
- }
1
+ {
2
+ "meta": {
3
+ "title": "Claude Code 预设",
4
+ "description": "新增一个智能体预设,将 Claude Code 的行为系统提示词、13 项核心工具描述、Plan Mode 规划结构与 9 段式上下文压缩适配到 DeepSeek Harness,同时保留原生的工具执行、沙箱、子智能体委派与运行时上下文。新建会话时在智能体预设列表中选择它。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-claude-preset",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Claude Code agent preset for DeepSeek Harness",
5
5
  "keywords": [
6
6
  "dsh",