dsh-plugin-prompt-tool 0.1.2 → 0.1.4

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/package.json CHANGED
@@ -1,88 +1,96 @@
1
- {
2
- "name": "dsh-plugin-prompt-tool",
3
- "version": "0.1.2",
4
- "description": "DSH 插件:提示词工具,规范模型的思维链与回答内容,提供 Web UI 编辑 preset.md 与 AGENTS.md,并按 skills 目录注册可开关技能。",
5
- "license": "MIT",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/Czerror/dsh-plugin-prompt-tool.git"
9
- },
10
- "type": "module",
11
- "main": "lib/index.mjs",
12
- "types": "lib/index.d.mts",
13
- "exports": {
14
- ".": {
15
- "types": "./lib/index.d.mts",
16
- "default": "./lib/index.mjs"
17
- },
18
- "./client": "./lib/client.js",
19
- "./package.json": "./package.json"
20
- },
21
- "engines": {
22
- "node": ">=20"
23
- },
24
- "dsh": {
25
- "bundle": {
26
- "patch": "./cordis.patch.yml"
27
- },
28
- "client": {
29
- "inject": [
30
- "@deepseek-ai/dsh-client-connection",
31
- "@deepseek-ai/dsh-client-ui-settings-plugins"
32
- ],
33
- "platform": "web"
34
- }
35
- },
36
- "peerDependencies": {
37
- "@deepseek-ai/cordis": "^4.0.1",
38
- "@deepseek-ai/dsh-api-remotes": "^0.1.0-rc.6",
39
- "@deepseek-ai/dsh-client-connection": "^0.1.0-rc.6",
40
- "@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
41
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6",
42
- "@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.0-rc.6",
43
- "@deepseek-ai/dsh-settings": "^0.1.0-rc.6",
44
- "@deepseek-ai/dsh-system-prompt": "^0.1.0-rc.6",
45
- "@deepseek-ai/schemastery": "^3.18.1",
46
- "react": "^18.2.0"
47
- },
48
- "devDependencies": {
49
- "@deepseek-ai/cordis": "^4.0.1",
50
- "@deepseek-ai/dsh-api-remotes": "^0.1.0-rc.6",
51
- "@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
52
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6",
53
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.6",
54
- "@deepseek-ai/dsh-settings": "^0.1.0-rc.6",
55
- "@types/node": "^26.2.0",
56
- "@types/react": "~18.3.1",
57
- "clsx": "^2.1.1",
58
- "lightningcss": "^1.32.0",
59
- "oxlint": "^1.78.0",
60
- "react": "^18.3.1",
61
- "tsdown": "^0.22.2",
62
- "typescript": "^5.9.2"
63
- },
64
- "files": [
65
- "lib",
66
- "cordis.patch.yml",
67
- "LICENSE",
68
- "preset",
69
- "vendor/dsh-anchored-standard/preset",
70
- "vendor/dsh-anchored-standard/LICENSE",
71
- "vendor/dsh-anchored-standard/NOTICE",
72
- "skills",
73
- "preset.md",
74
- "AGENTS.md",
75
- "plan.md",
76
- "README.md"
77
- ],
78
- "scripts": {
79
- "build": "tsdown",
80
- "prepare": "tsdown",
81
- "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
82
- "lint": "oxlint src test tsdown.config.ts",
83
- "test": "pnpm build && node --test \"test/*.test.mjs\""
84
- },
85
- "dependencies": {
86
- "yaml": "^2.9.0"
87
- }
88
- }
1
+ {
2
+ "name": "dsh-plugin-prompt-tool",
3
+ "version": "0.1.4",
4
+ "description": "DSH 插件:提示词工具,规范模型的思维链与回答内容,提供 Web UI 编辑 preset.md 与 AGENTS.md,并按 skills 目录注册可开关技能。",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Czerror/dsh-plugin-prompt-tool.git"
9
+ },
10
+ "type": "module",
11
+ "main": "lib/index.mjs",
12
+ "types": "lib/index.d.mts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./lib/index.d.mts",
16
+ "default": "./lib/index.mjs"
17
+ },
18
+ "./client": "./lib/client.js",
19
+ "./package.json": "./package.json"
20
+ },
21
+ "engines": {
22
+ "node": ">=20"
23
+ },
24
+ "dsh": {
25
+ "bundle": {
26
+ "patch": "./cordis.patch.yml"
27
+ },
28
+ "client": {
29
+ "inject": [
30
+ "@deepseek-ai/dsh-client-runtime",
31
+ "@deepseek-ai/dsh-client-connection",
32
+ "@deepseek-ai/dsh-client-ui-settings-plugins"
33
+ ],
34
+ "platform": "web"
35
+ }
36
+ },
37
+ "peerDependencies": {
38
+ "@deepseek-ai/cordis": "^4.0.1",
39
+ "@deepseek-ai/dsh-api-remotes": "^0.1.0-rc.6",
40
+ "@deepseek-ai/dsh-client-connection": "^0.1.0-rc.6",
41
+ "@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
42
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6",
43
+ "@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.0-rc.6",
44
+ "@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.6",
45
+ "@deepseek-ai/dsh-settings": "^0.1.0-rc.6",
46
+ "@deepseek-ai/dsh-skill": "^0.1.0-rc.6",
47
+ "@deepseek-ai/dsh-system-prompt": "^0.1.0-rc.6",
48
+ "@deepseek-ai/schemastery": "^3.18.1",
49
+ "react": "^18.2.0",
50
+ "@deepseek-ai/dsh-commands": "^0.1.0-rc.6"
51
+ },
52
+ "devDependencies": {
53
+ "@deepseek-ai/cordis": "^4.0.1",
54
+ "@deepseek-ai/dsh-api-remotes": "^0.1.0-rc.6",
55
+ "@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
56
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6",
57
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.6",
58
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.6",
59
+ "@deepseek-ai/dsh-commands": "0.1.0-rc.6",
60
+ "@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.6",
61
+ "@deepseek-ai/dsh-settings": "^0.1.0-rc.6",
62
+ "@deepseek-ai/dsh-skill": "^0.1.0-rc.6",
63
+ "@types/node": "^26.2.0",
64
+ "@types/react": "~18.3.1",
65
+ "clsx": "^2.1.1",
66
+ "lightningcss": "^1.32.0",
67
+ "oxlint": "^1.78.0",
68
+ "react": "^18.3.1",
69
+ "tsdown": "^0.22.2",
70
+ "typescript": "^5.9.2"
71
+ },
72
+ "files": [
73
+ "lib",
74
+ "cordis.patch.yml",
75
+ "LICENSE",
76
+ "preset",
77
+ "vendor/dsh-anchored-standard/preset",
78
+ "vendor/dsh-anchored-standard/LICENSE",
79
+ "vendor/dsh-anchored-standard/NOTICE",
80
+ "skills",
81
+ "preset.md",
82
+ "AGENTS.md",
83
+ "plan.md",
84
+ "README.md"
85
+ ],
86
+ "scripts": {
87
+ "build": "tsdown",
88
+ "prepare": "tsdown",
89
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
90
+ "lint": "oxlint src test tsdown.config.ts",
91
+ "test": "pnpm build && node --test \"test/*.test.mjs\""
92
+ },
93
+ "dependencies": {
94
+ "yaml": "^2.9.0"
95
+ }
96
+ }
@@ -6,6 +6,11 @@
6
6
  * turn1 reasoning 以 "we" 开头 → 下一轮注入 promptText 一次;
7
7
  * we 未确认 → 最多再等一轮,仍无则强制注入(兜底,绝不卡死)。
8
8
  *
9
+ * promptText 由宿主在生成 preset 时准备好:
10
+ * - 默认等于 preset.md 原文;
11
+ * - 开启 injectAgentsPrompt 时,宿主会把 AGENTS.md 拼接到 preset.md 头部。
12
+ * 本模块只负责把最终文本作为一条 user 消息注入,不做路径探测。
13
+ *
9
14
  * 实测依据:
10
15
  * - 复杂任务 + 原版 2 工具 + maxTokens 1024 → turn1 reasoning "We need";
11
16
  * - 简单任务模型直接调工具干活(无 we 首词),走兜底注入;
@@ -119,4 +124,4 @@ export function apply(ctx, config) {
119
124
  }
120
125
  return { ...decision, messages: [message, ...decision.messages] }
121
126
  })
122
- }
127
+ }
package/preset.md CHANGED
@@ -1,5 +1,5 @@
1
1
  You are a helpful software assistant.
2
- Begin every reasoning block with 'We need'.
2
+ Begin every reasoning block or thinking with "'We need', '我需要'".
3
3
  DeepSeek harness operates in local execution mode. Answer requests directly in the
4
4
  user's language. No preamble, qualification, or redirection.
5
5
 
@@ -159,7 +159,7 @@
159
159
  * Please avoid commands that may produce a very large amount of output.
160
160
  * Please run long lived commands in the background, e.g. 'sleep 10 &' or start a server in the background.
161
161
 
162
- # Windows-only `bash` tool (see preset/custom-bash.mjs): registers the SAME
162
+ # Windows-only `bash` tool (see custom-bash.mjs): registers the SAME
163
163
  # tool name as the persistent shell with a Minimal-compatible description, but
164
164
  # executes through the ordinary cross-platform subprocess seam (`bash -c`)
165
165
  # instead of a PTY. `bashPath` defaults to `bash` on PATH; point it at Git
@@ -170,7 +170,7 @@
170
170
  name: ./custom-bash.mjs
171
171
  disabled: !!js process.platform !== 'win32'
172
172
  config:
173
- bashPath: 'C:\Program Files\Git\bin\bash.exe'
173
+ bashPath: 'bash.exe'
174
174
 
175
175
  # ── filesystem ──────────────────────────────────────────────────────────────
176
176
 
@@ -15,10 +15,16 @@
15
15
  * State is memoized per session id and maintained incrementally through
16
16
  * `observe()`; a cold session scans its durable log once (so resume and
17
17
  * reload reconstruct the same phase), then O(1).
18
+ *
19
+ * By default subagents (`delegationDepth > 0`) are treated as already
20
+ * promoted so their first request can use tools. Set `includeSubagents: true`
21
+ * to make subagents follow the same bootstrap/anchor phase as top-level
22
+ * sessions.
18
23
  */
19
24
 
20
25
  /** Build one epoch-aware promotion tracker. */
21
- export function createEpochPromotion(promoteEvents) {
26
+ export function createEpochPromotion(promoteEvents, options = {}) {
27
+ const includeSubagents = options.includeSubagents === true
22
28
  const promote = new Set(promoteEvents)
23
29
  /** sessionId -> { boundary, promoted } */
24
30
  const state = new Map()
@@ -53,8 +59,9 @@ export function createEpochPromotion(promoteEvents) {
53
59
  if (agent === undefined) return { boundary: -1, promoted: true }
54
60
  const session = agent.session
55
61
  if (session === undefined) return { boundary: -1, promoted: true }
56
- // Subagents keep the full catalog from their very first request.
57
- if ((session.header?.delegationDepth ?? 0) > 0) return { boundary: -1, promoted: true }
62
+ // By default subagents keep the full catalog from their very first
63
+ // request; includeSubagents makes them follow the normal bootstrap phase.
64
+ if (!includeSubagents && (session.header?.delegationDepth ?? 0) > 0) return { boundary: -1, promoted: true }
58
65
  return state.get(session.id) ?? scan(session)
59
66
  },
60
67
  /** Incremental feed: call on every `session/event`. */
@@ -1,280 +0,0 @@
1
- # dsh-anchored-standard
2
-
3
- [中文说明](./README.zh-CN.md)
4
-
5
- An experimental DeepSeek Harness agent preset that bootstraps the first model
6
- request with a Minimal-aligned prompt, the Minimal preset's real tool schema
7
- (`bash` + `str_replace_editor`), and no auto-injected workspace/skill context,
8
- then exposes the complete Standard tool catalog after the first durable tool
9
- call or reply.
10
-
11
- This is a community project. It is not an official DeepSeek preset and is not
12
- affiliated with or endorsed by DeepSeek.
13
-
14
- ## Why
15
-
16
- DeepSeek V4 Pro conditions strongly on the API-visible tool catalog. In the
17
- Project2 evaluation, Standard and PTC produced scores of 91 and 92, while the
18
- official Minimal preset produced 99 and 96. Permanently staying on Minimal,
19
- however, gives up the Standard preset's broader tool set.
20
-
21
- Anchored Standard separates initial trajectory selection from later tool use:
22
-
23
- 1. Keep the Minimal complete system prompt.
24
- 2. Expose the Minimal preset's REAL tool schemas — persistent `bash` +
25
- `str_replace_editor`, byte-identical to the official Minimal composition —
26
- on the first model request. Issue #11 measured this exact schema anchoring
27
- 5/5 runs at the adapter-default maxTokens (256000) with zero `let me`
28
- first-lines, while every standard-family schema (pwsh/read, pwsh only,
29
- sandboxed bash/read) fell into standard-like behavior 11/11. The tool
30
- schema identity is the decisive first-request variable at 256000, so no
31
- output cap is needed.
32
- 3. Strip the auto-injected context on that first request as well — the
33
- AGENTS.md/CLAUDE.md workspace digest and the available-skills reminder that
34
- true Minimal never mounts (`suppressedContextSources` in the
35
- `tool-bootstrap` row). User-initiated skill gestures are not filtered, and
36
- both injections return unchanged from request #2 on.
37
- 4. After the session records its first durable promotion signal — a `tool/call`
38
- or the first `assistant/message`, whichever comes first — expose all
39
- Standard tools. Request #1 always sees the bootstrap catalog; request #2
40
- always sees the full catalog, so a text-only first reply can no longer trap
41
- the session in bootstrap. (`promoteOn` in the `tool-bootstrap` row selects
42
- the trigger: `either` default, `tool-call`, or `assistant-message`.)
43
- 5. Derive the phase from durable session events so resume and reload preserve it.
44
-
45
- The bootstrap catalog is the same on every platform: the Minimal pair
46
- (`bash`/`str_replace_editor`). The preset's shell is the persistent PTY bash
47
- (the sandboxed Standard `bash` row is disabled — both register the `bash` name
48
- into the same layer, and the tools registry rejects duplicates; Windows never
49
- had the sandboxed bash anyway). `pwsh` remains available in the promoted
50
- catalog on Windows.
51
-
52
- ## Results
53
-
54
- Project2 V4.1b, DeepSeek V4 Pro, `reasoningEffort=max`, Windows native:
55
-
56
- | Run | Ability | Reasoning blocks | `we` | `let's` | `let me` | Visible replies |
57
- |---|---:|---:|---:|---:|---:|---:|
58
- | r1 | 98 | 193 | 179 | 88 | 1 | 1 |
59
- | r2 | 99 | 162 | 165 | 98 | 0 | 1 |
60
-
61
- Both runs emitted exactly two tool-catalog snapshots: the two-tool Minimal
62
- bootstrap, followed by the 25-tool Standard catalog. The result is reproducible
63
- evidence for this task, not a claim of universal improvement across models or
64
- workloads.
65
-
66
- Cross-version evidence (issue #11, Windows + official endpoint, first-request
67
- trajectory only): at the adapter-default maxTokens the Minimal tool schema
68
- anchored 5/5 (`We need modify…` first lines, `we` 1.4, `let me` 0.0), while
69
- pwsh/read, pwsh-only, and sandboxed bash/read all produced standard-like
70
- first lines 11/11 — the tool schema, not the output cap, is the decisive
71
- first-request variable at 256000.
72
-
73
- Full methodology and aggregate evidence are in
74
- [`xiaobright/modeltest`](https://github.com/xiaobright/modeltest).
75
-
76
- ## Compatibility
77
-
78
- Developed and tested against:
79
-
80
- - DeepSeek Harness `0.1.0-rc.5`
81
- - repository commit [`47f9438`](https://github.com/deepseek-ai/deepseek-harness/tree/47f943859bef60e4160492346772ded9b24f765a)
82
- - Node.js 24 on Windows
83
-
84
- On the `0.1.0-rc.5` source checkout, `bootstrapMaxTokens` reaches the actual
85
- first request (the first `request/header` records the cap, `adapterDefaults`
86
- stays empty), because `llm.prepareCall` only materializes a default maxTokens
87
- when the proposed config has none. One prebuilt profile package observed in
88
- issue #11 (CLI launcher reporting `0.1.0-rc.6`) overwrote the proposed cap
89
- with `adapterDefaults.maxTokens`; there the cap is a no-op. The default
90
- composition therefore relies on the Minimal tool schema alone (which anchors
91
- at the adapter default with no cap) and leaves `bootstrapMaxTokens` as an
92
- opt-in for standard-schema bootstraps.
93
-
94
- DeepSeek Harness is currently a developer preview and explicitly permits
95
- breaking changes. This preset is a full snapshot of the Standard composition,
96
- so review upstream changes before using it with a newer release.
97
-
98
- ## Install
99
-
100
- Clone this repository, then copy the entire `preset` directory into the user
101
- preset root under the id `anchored-standard`.
102
-
103
- PowerShell:
104
-
105
- ```powershell
106
- $target = Join-Path $env:USERPROFILE '.dsh\.agent-presets\anchored-standard'
107
- if (Test-Path -LiteralPath $target) { throw "Preset already exists: $target" }
108
- New-Item -ItemType Directory -Force -Path (Split-Path -Parent $target) | Out-Null
109
- Copy-Item -Recurse -LiteralPath '.\preset' -Destination $target
110
- ```
111
-
112
- Linux/macOS:
113
-
114
- ```sh
115
- dsh_home="${DSH_HOME:-$HOME/.dsh}"
116
- mkdir -p "$dsh_home/.agent-presets"
117
- test ! -e "$dsh_home/.agent-presets/anchored-standard"
118
- cp -R preset "$dsh_home/.agent-presets/anchored-standard"
119
- ```
120
-
121
- Fully restart DeepSeek Harness, create a blank session, and select
122
- **Anchored Standard (experimental)**. Do not switch an active session from a
123
- different preset.
124
-
125
- ## Verify
126
-
127
- Export the session JSONL and inspect `request/header` events. Reproduction
128
- checklist (issue #11 asks for the first two explicitly, because both are the
129
- variables that decide the anchor):
130
-
131
- - **First-request `config.maxTokens` value**: with `bootstrapMaxTokens` unset
132
- (the default), the first header records the adapter default (e.g. 256000
133
- with `adapterDefaults.maxTokens: true`); with a cap configured it records
134
- the cap (e.g. 1024 with no maxTokens adapterDefault).
135
- - **First-request tool schema source**: the first header's `tools` array must
136
- be exactly `["bash", "str_replace_editor"]` — the official Minimal preset's
137
- real schemas, not Standard's `pwsh`/`read`.
138
- - the first request's messages should contain no AGENTS.md/CLAUDE.md digest and
139
- no available-skills reminder — only the user message and the minimal persona
140
- system prompt;
141
- - after the first tool call or the first assistant reply, the next changed
142
- header should contain the full Standard catalog;
143
- - subsequent requests should keep that full catalog and restore the standard
144
- context injections.
145
-
146
- Run the local zero-dependency tests with:
147
-
148
- ```sh
149
- npm test
150
- ```
151
-
152
- ## Important behavior
153
-
154
- - With the default `promoteOn: either`, the session promotes after its first
155
- durable `tool/call` OR its first `assistant/message`, whichever comes first —
156
- request #1 sees the bootstrap catalog and every later request sees the full
157
- catalog. A text-only first reply therefore still promotes at request #2;
158
- set `promoteOn: tool-call` to restore the original behavior, where a first
159
- response that makes no tool call never promotes.
160
- - A failed tool execution still promotes the session because the durable
161
- `tool/call` already exists.
162
- - The first request's output budget is NOT capped by default: the Minimal tool
163
- schema anchors at the adapter-default maxTokens, so `bootstrapMaxTokens` is
164
- opt-in. When set, the first request is capped and the cap is explicitly
165
- stripped after promotion (the next request's seed proposal carries the
166
- previous header's maxTokens forward).
167
- - The Minimal pair stays mounted after promotion, so the promoted catalog is
168
- the Standard catalog plus `bash` (persistent) and `str_replace_editor` —
169
- and the Standard sandboxed `bash` row is disabled in favor of the persistent
170
- shell (same tool name, same layer; see Why). The `read`/`write`/`edit` tools
171
- keep the sandboxed filesystem while `str_replace_editor` uses the preset's
172
- local fs.
173
- - A missing bootstrap tool degrades to the full catalog with a one-time
174
- warning instead of failing requests, so a composition drift cannot brick a
175
- session; invalid `promoteOn` values fail at preset mount instead.
176
- - Promotion decisions are memoized per session for the process lifetime; the
177
- durable event scan runs once per session per process.
178
- - While a session is unpromoted, the pre-step filter strips messages whose
179
- `source.kind` is listed in `suppressedContextSources` (default:
180
- `agent-instructions` and `skill-catalog`, the two automatic injections
181
- Standard adds over Minimal). Set the list to `[]` to disable the context
182
- filter; add other `source.kind` values to suppress more. A filter failure
183
- degrades to keeping every message rather than eating context.
184
- - The tool catalog changes once, so request-prefix cache continuity also changes
185
- once between the first and second model requests.
186
- - The preset has the same trust level as shell access. Review its files before
187
- installation.
188
- - The plugin performs no network requests and adds no telemetry.
189
-
190
- ## Zero-Anchored Standard (experimental)
191
-
192
- An extra test mode that does not change the Anchored Standard logic above. It
193
- uses the same Minimal-aligned system prompt, but instead of exposing two tools
194
- on the first request it injects one fixed zero-tool anchor turn:
195
-
196
- 1. When the user sends their first message, the `anchor-turn` plugin prepends a
197
- fixed user message — "This round is a test. Tools are not open yet; all
198
- tools will open next round." — ahead of it.
199
- 2. The first real model request carries ZERO tools, so the session's first
200
- reasoning chain follows the zero-injection "we" trajectory.
201
- 3. Once that anchor response is durable, the full Standard catalog is exposed
202
- and the real message proceeds with all tools.
203
-
204
- Anchoring on the first message — not on session creation — keeps the
205
- blank-session preset switcher usable. Subagents always see the full catalog.
206
-
207
- Measured behavior (opencode-go, DeepSeek V4 Pro, `reasoningEffort=max`): the
208
- anchor request is stable "we"-style with zero `let me`; the following
209
- tool-bearing requests return to the "The user wants…/Let me" style. This mode
210
- is a comparison point for whether the zero-tool first turn is worth the extra
211
- model call — not a claim that tool rounds stay "we"-style.
212
-
213
- Install as a separate preset id:
214
-
215
- ```sh
216
- dsh_home="${DSH_HOME:-$HOME/.dsh}"
217
- mkdir -p "$dsh_home/.agent-presets"
218
- test ! -e "$dsh_home/.agent-presets/zero-anchored-standard"
219
- cp -R zero-anchored-standard "$dsh_home/.agent-presets/zero-anchored-standard"
220
- ```
221
-
222
- Restart DeepSeek Harness, create a blank session, select **Zero-Anchored
223
- Standard (experimental)**, then send your first message.
224
-
225
- ## Whoami Standard (experimental)
226
-
227
- A usability-oriented variant of the zero-tool anchor idea: the first turn is a
228
- natural self-introduction prompt instead of a fixed test message, and the
229
- user's real first message is deferred to the next turn. Whatever the user types
230
- first, the session warms up exactly one round and everything is ready when the
231
- real message is processed:
232
-
233
- 1. When the user sends their first message, the `whoami-turn` plugin prepends a
234
- fixed user message — "你是谁" (who are you) — ahead of it in the `next-turn`
235
- inbox queue.
236
- 2. dsh claims exactly ONE `next-turn` message per turn, so the first model
237
- request sees only the anchor on an EMPTY tool surface and replies with a
238
- self-introduction; that reply is the promotion signal.
239
- 3. The real message is claimed by the NEXT turn, with the promoted resident
240
- catalog (shells, `str_replace_editor`, the discovery tools) already
241
- unlocked — heavier Standard tools are one `dev_tool_search` away.
242
-
243
- The anchor text is configurable via the `whoami-turn` row's `text` option
244
- (default "你是谁"). Anchoring on the first message — not session creation —
245
- keeps the blank-session preset switcher usable; subagents always see the full
246
- catalog. The trade-off is one extra model call per session: the anchor turn is
247
- always taken, even when the first message is urgent.
248
-
249
- The preset shares plugin modules with the anchored `preset/` directory via
250
- `../preset/` references, so install that directory as well (see the Install
251
- section above).
252
-
253
- Install as a separate preset id:
254
-
255
- ```sh
256
- dsh_home="${DSH_HOME:-$HOME/.dsh}"
257
- mkdir -p "$dsh_home/.agent-presets"
258
- test ! -e "$dsh_home/.agent-presets/whoami-standard"
259
- cp -R whoami-standard "$dsh_home/.agent-presets/whoami-standard"
260
- ```
261
-
262
- Restart DeepSeek Harness, create a blank session, select **Whoami Standard
263
- (experimental)**, then send your first message — the self-introduction round
264
- runs first, and your message is answered with the full tooling on the next
265
- turn.
266
-
267
- ## Official ecosystem guidance
268
-
269
- DeepSeek currently asks community plugin authors to publish plugins in their own
270
- GitHub projects and add the [`dsh-plugin`](https://github.com/topics/dsh-plugin)
271
- repository topic for discovery. The official repository does not currently
272
- accept external pull requests and does not mandate a community repository
273
- template. See the official
274
- [`CONTRIBUTING.md`](https://github.com/deepseek-ai/deepseek-harness/blob/47f943859bef60e4160492346772ded9b24f765a/CONTRIBUTING.md).
275
-
276
- ## License
277
-
278
- MIT. `preset/agent.cordis.yml` is derived from the DeepSeek Harness Standard
279
- preset; the original DeepSeek copyright and MIT notice are retained in
280
- [`NOTICE`](./NOTICE).