@deepseek-ai/dsh-base 0.0.1-rc.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/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, DeepSeek
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write packages/bundle/base/README.md
5
+ README.md: 8b0db20274036a2601da19617a35e6bf4aeb30ca
6
+ README.zh.md: ac5ab10a523fa211c1c1daf4c55d4dc8702eb782
package/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # `@deepseek-ai/dsh-base`
2
+
3
+ English | [中文](README.zh.md)
4
+
5
+ The shared dsh core as a profile bundle: [`cordis.patch.yml`](cordis.patch.yml) inserts every base plugin row — model adapters, the shared [`agent-default-model`](../../core/agent-default-model/README.md) selection, tools, persistence, policy, settings/credentials, telemetry, and host-level subagent providers — over the empty profile root, as the first layer of every profile's `dsh.profile.bundles` list. Codex and Claude Code providers load dormant; Agent Presets independently decide whether their agent contributes either model-facing delegation tool. Later bundle layers (e.g. [`dsh-web-app`](../web-app/README.md)) and the user's profile `cordis.patch.yml` override these rows by id; a patch replaces a row's whole `config`, so mode-specific values live in mode bundles, not here. The package has no runtime API; the profile composer resolves the patch through the `dsh.bundle.patch` manifest field, never through code.
6
+
7
+ Windows hosts booting a shipped profile additionally receive [`windows.cordis.patch.yml`](windows.cordis.patch.yml): it disables the POSIX-only bash stack (`bash-sandbox`/`tool-bash`) and inserts the sandbox-confined PowerShell stack (`@deepseek-ai/dsh-pwsh-sandbox`, `@deepseek-ai/dsh-tool-pwsh`). The permission surface stays exactly as on POSIX: `sandbox`/`sandbox-policy` enforce the file-effect policy through the Windows ACL restricted-token runner (the win32 chain of `dsh-sandbox-local` → `@deepseek-ai/dsh-sandbox-windows-acl`), the permission switcher and the approval service run unchanged, and `fs-sandbox` keeps fencing `ctx.fs` writes — mounting `dsh-fs-local` alongside it would double-register `ctx.fs` and fail the load. The launcher applies the layer between the bundle layers and the user layers on win32 hosts; a Windows host that prefers the unconfined local pwsh executor or full access overrides these rows through its profile or home `cordis.patch.yml` (the bash-restore recipe must be complete: disable `pwsh-sandbox`/`tool-pwsh` AND re-enable `bash-sandbox`/`tool-bash` — both executor families register the same `bash` service, so an incomplete recipe fails loud at load). POSIX hosts never receive it.
8
+
9
+ The row set and its rationale are documented inline in the patch file; the [generated composition graph](../../../apps/cli/composition.md) renders it.
10
+
11
+ ## Model Experience
12
+
13
+ Indirectly, through the inserted rows: this bundle selects the shipped persona-less prompt base, tool set, and DeepSeek adapter that mode bundles specialize, and contributes no model-visible text of its own.
14
+
15
+ #### KV Cache effect
16
+
17
+ None directly; each inserted row's package owns its effect.
18
+
19
+ ## Known Limitations and Deferred Work
20
+
21
+ - **A patch replaces whole row configs** — profile overrides must restate every field a row keeps; there is no deep-merge layer.
22
+ - **Claude's SDK platform CLI remains in the Profile install closure** — the base bundle depends on the Claude provider, whose production path resolves the host `claude`; removing the SDK's unused optional payload is deferred to the product installation-closure follow-up.
23
+ - **The Windows temp grant is a private per-session subdirectory** — `workspace-write` confines writes to the workspace plus the session's own temp subdirectory (`<temp>\dsh-<hash>`, TMP/TEMP rewritten for confined children); `read-only` grants nothing. See `@deepseek-ai/dsh-sandbox-windows-acl`.
package/README.zh.md ADDED
@@ -0,0 +1,23 @@
1
+ # `@deepseek-ai/dsh-base`
2
+
3
+ [English](README.md) | 中文
4
+
5
+ 以 profile 组合包形式交付的共享 dsh 核心:[`cordis.patch.yml`](cordis.patch.yml) 在空的 profile 根之上插入全部基础插件行——模型适配器、共享的 [`agent-default-model`](../../core/agent-default-model/README.md) 选择、工具、持久化、策略、settings/credentials、遥测与宿主级 subagent provider——作为每个 profile 的 `dsh.profile.bundles` 列表中的第一层。Codex 与 Claude Code provider 以休眠状态加载;Agent Preset 分别决定自己的 agent 是否贡献任一面向模型的委派工具。后续的组合包层(例如 [`dsh-web-app`](../web-app/README.md))和用户 profile 的 `cordis.patch.yml` 按 id 覆盖这些行;patch 会替换目标行的整个 `config`,因此模式专属的值放在各模式组合包中,而不是这里。该包没有运行时 API;profile 组合器通过 manifest(元数据清单)的 `dsh.bundle.patch` 字段解析 patch,绝不通过代码。
6
+
7
+ 启动交付 profile 的 Windows 主机还会额外收到 [`windows.cordis.patch.yml`](windows.cordis.patch.yml):它禁用仅 POSIX 的 bash 栈(`bash-sandbox`/`tool-bash`),并插入沙盒受限的 PowerShell 栈(`@deepseek-ai/dsh-pwsh-sandbox`、`@deepseek-ai/dsh-tool-pwsh`)。权限面与 POSIX 完全一致:`sandbox`/`sandbox-policy` 通过 Windows ACL 受限令牌 runner(`dsh-sandbox-local` 的 win32 链 → `@deepseek-ai/dsh-sandbox-windows-acl`)执行文件效果策略,权限切换器与 approval 服务原样运行,`fs-sandbox` 继续围栏 `ctx.fs` 写入——在其旁再挂载 `dsh-fs-local` 会重复注册 `ctx.fs` 并在加载时失败。启动器在 win32 主机上把该层应用于 bundle 层与用户层之间;偏好不限权本地 pwsh 执行器或完整访问的 Windows 主机通过其 profile 或 home 的 `cordis.patch.yml` 覆盖这些行(bash 恢复配方必须完整:禁用 `pwsh-sandbox`/`tool-pwsh` 并重新启用 `bash-sandbox`/`tool-bash`——两个执行器家族注册同一个 `bash` 服务,配方不完整会在加载时 fail loud)。POSIX 主机永远不会收到它。
8
+
9
+ 行集合及其设计依据以行内注释写在 patch 文件里;[生成的组合图](../../../apps/cli/composition.md)负责渲染它。
10
+
11
+ ## 模型体验
12
+
13
+ 通过插入的行间接产生影响:该组合包选定了随发行版交付的无 persona 提示词基座、工具集合与 DeepSeek 适配器,供各模式组合包进一步特化;它自身不贡献任何模型可见文本。
14
+
15
+ #### KV Cache 影响
16
+
17
+ 无直接影响;每条插入行的影响归其所属的包负责。
18
+
19
+ ## 已知限制与延期工作
20
+
21
+ - **patch 会替换整行 `config`**:profile 覆盖必须重述该行需要保留的每个字段;不存在深度合并层。
22
+ - **Claude SDK 的平台 CLI(命令行界面)仍在 Profile 安装闭包中**:base 组合包依赖 Claude 提供方,其生产路径解析宿主提供的 `claude`;移除 SDK 中未使用的可选载荷,推迟到产品安装闭包后续项处理。
23
+ - **Windows 的临时目录授权是按会话的私有子目录**——`workspace-write` 把写入限制在工作区与会话自己的 temp 子目录(`<temp>\dsh-<hash>`,受限子进程的 TMP/TEMP 被改写);`read-only` 不授予任何写入。见 `@deepseek-ai/dsh-sandbox-windows-acl`。
@@ -0,0 +1,441 @@
1
+ # The dsh-base bundle patch: the shared core of every dsh profile, applied as
2
+ # ONE insert over the empty profile root. Later bundle patches and the user's
3
+ # profile cordis.patch.yml address these rows by id, with the last write
4
+ # winning per row.
5
+ #
6
+ # A patch replaces the targeted row's whole `config` rather than merging into
7
+ # it, so a row whose value differs by mode does NOT live here: it belongs to
8
+ # each mode bundle, keeping any single row down to one bundle layer plus the
9
+ # user's. Mode-specific rows appear below only with shared plugin identity and
10
+ # neutral defaults; each mode bundle restates its complete configuration.
11
+ #
12
+ # Row order carries no load semantics (activation is service-availability
13
+ # driven); the grouping is for readers.
14
+
15
+ - insert:
16
+ - id: timer
17
+ name: '@deepseek-ai/cordis-plugin-timer'
18
+
19
+ - id: hmr
20
+ name: '@deepseek-ai/cordis-plugin-hmr'
21
+ config:
22
+ root: ['.']
23
+
24
+ - id: llm
25
+ name: '@deepseek-ai/dsh-llm'
26
+
27
+ - id: session
28
+ name: '@deepseek-ai/dsh-session'
29
+
30
+ - id: typert
31
+ name: '@deepseek-ai/dsh-typert-registry'
32
+
33
+ - id: typert-loader
34
+ name: '@deepseek-ai/dsh-typert-loader'
35
+
36
+ - id: typert-gateway
37
+ name: '@deepseek-ai/dsh-api-gateway'
38
+
39
+ - id: session-title
40
+ name: '@deepseek-ai/dsh-session-title'
41
+ config:
42
+ fallbackMaxWords: 5
43
+ fallbackMaxBytes: 40
44
+ maxTitleBytes: 80
45
+
46
+ - id: session-title-llm
47
+ name: '@deepseek-ai/dsh-session-title-first-message-llm'
48
+ config:
49
+ targetWords: 5
50
+ targetCjkCharacters: 10
51
+ maxInputBytes: 4096
52
+ maxOutputTokens: 64
53
+ timeoutMs: 60000
54
+
55
+ - id: user-interaction
56
+ name: '@deepseek-ai/dsh-user-interaction'
57
+
58
+ - id: agent
59
+ name: '@deepseek-ai/dsh-agent'
60
+
61
+ # The transport-independent default for Agents created by entry points.
62
+ # Settings may supply a saved selection; consumers read it at creation time.
63
+ - id: agent-default-model
64
+ name: '@deepseek-ai/dsh-agent-default-model'
65
+ config:
66
+ provider: deepseek-official
67
+ model: deepseek-v4-flash
68
+
69
+ - id: tasks
70
+ name: '@deepseek-ai/dsh-tasks-local'
71
+
72
+ - id: llm-retry
73
+ name: '@deepseek-ai/dsh-llm-retry'
74
+
75
+ # User-settings document (`$DSH_HOME/settings.yaml`, hot-reloaded): a
76
+ # `llm-deepseek:` or `llm-pi-ai:` section there overrides the adapter entries
77
+ # below without a restart, and is what the web Models page writes.
78
+ - id: settings
79
+ name: '@deepseek-ai/dsh-settings-local'
80
+
81
+ # Credential sources: inherited environment over the managed
82
+ # `$DSH_HOME/.credentials.yaml`, with project and user `.env` fallbacks.
83
+ # Adapters resolve references per request; the Models page writes only the
84
+ # managed document, which is never materialized into the process environment.
85
+ - id: credentials
86
+ name: '@deepseek-ai/dsh-credentials-local'
87
+
88
+ # The pi-ai multi-provider twin, mounted dormant: zero routes (and no extra
89
+ # models in the picker) until a `llm-pi-ai:` settings section supplies provider
90
+ # profiles — then those routes register live, keys resolving per request
91
+ # through their apiKeyEnv references, and drop again when the section empties.
92
+ # Supplying those profiles is exactly what the web Models page does. Which
93
+ # adapters exist is composition; which providers run is the user's settings
94
+ # document.
95
+ - id: llm-pi-ai
96
+ name: '@deepseek-ai/dsh-llm-pi-ai'
97
+
98
+ - id: session-persistence-jsonl
99
+ name: '@deepseek-ai/dsh-session-persistence-jsonl'
100
+ config:
101
+ root: !!js dshHomePath('sessions')
102
+
103
+ # Durable image bytes live outside the append-only session log. Messages
104
+ # keep content-addressed references that this shared backend resolves for
105
+ # provider requests and authorized history reads.
106
+ - id: attachment-local
107
+ name: '@deepseek-ai/dsh-attachment-local'
108
+
109
+ # Raw configs can supply a process-local path or disable this shared session
110
+ # capability. The neutral default is process-local and opens only when used.
111
+ - id: session-query-sqlite
112
+ name: '@deepseek-ai/dsh-session-query-sqlite'
113
+ config:
114
+ path: ':memory:'
115
+ openAt: first-search
116
+
117
+ # Shared projection registry: subagent catalog identity (mode/label) folds
118
+ # through its registered units, so the `list_agents` surface below fails
119
+ # loud without it; web layers reuse this same mount for list rows.
120
+ - id: session-projection
121
+ name: '@deepseek-ai/dsh-session-projection'
122
+
123
+ # Session telemetry, on for every dsh mode: mirrors every session-log
124
+ # event (assistant/chunk projected to first-of-step) plus ops markers onto
125
+ # OTLP/HTTP log records, streaming on the batch processor's cadence
126
+ # (10s/batch here) — not at exit; a crash loses at most the last unexported
127
+ # interval. No telemetry/record redaction rule is mounted yet, so exports
128
+ # are the raw captured copy; the deployment stance, env seams, and
129
+ # follow-ups are pinned in the web-telemetry-default-mount Agent Note.
130
+ # DSH_TELEMETRY_OTLP_URL overrides the production endpoint, and a non-empty
131
+ # DSH_TELEMETRY_DISABLED — any value, including '0'/'false' — opts the
132
+ # process out (the launchers patch the row disabled; config cannot disable
133
+ # a row). Exports carry the harness home's anonymous user id ($DSH_HOME/.userid,
134
+ # random UUID; delete the file to reset the identity) as the Resource's
135
+ # user.id. The exporter/processor values normally bound the shutdown drain
136
+ # to ~1s against an unreachable collector: exporter.timeoutMillis is both
137
+ # the per-attempt socket timeout and the retry deadline (1s effectively
138
+ # disables the SDK's 5-try backoff), while maxExportBatchSize == maxQueueSize
139
+ # (both explicit) makes the drain a single batch. The SDK awaits
140
+ # exporter.forceFlush() outside exportTimeoutMillis, so the backend's 3s
141
+ # shutdownTimeoutMillis is the load-bearing outer bound when a transport
142
+ # promise never settles. Every CLI exit path drains it by disposing the root
143
+ # on SIGINT/SIGTERM.
144
+ - id: telemetry-otel
145
+ name: '@deepseek-ai/dsh-session-telemetry-otel'
146
+ config:
147
+ shutdownTimeoutMillis: 3000
148
+ exporter:
149
+ url: !!js process.env.DSH_TELEMETRY_OTLP_URL ?? 'https://harness-telemetry.deepseeksvc.com/v1/logs'
150
+ compression: gzip
151
+ timeoutMillis: 1000
152
+ processor:
153
+ scheduledDelayMillis: 10000
154
+ maxQueueSize: 2048
155
+ maxExportBatchSize: 2048
156
+ exportTimeoutMillis: 1500
157
+
158
+ - id: subprocess
159
+ name: '@deepseek-ai/dsh-subprocess-local'
160
+
161
+ # Every shipped CLI mode starts with the same file-effect boundary.
162
+ # The environment remains an explicit deployment override; otherwise fresh
163
+ # sessions pin workspace-write + ask through the permission service below.
164
+ - id: sandbox
165
+ name: '@deepseek-ai/dsh-sandbox-local'
166
+
167
+ - id: sandbox-policy
168
+ name: '@deepseek-ai/dsh-sandbox-policy'
169
+ config:
170
+ mode: !!js process.env.DSH_PERMISSION_MODE ?? 'workspace-write'
171
+ workspaceRoot: !!js process.cwd()
172
+
173
+ - id: bash-sandbox
174
+ name: '@deepseek-ai/dsh-bash-sandbox'
175
+ config:
176
+ timeoutMs: 60000
177
+
178
+ - id: approval
179
+ name: '@deepseek-ai/dsh-user-approval'
180
+ config:
181
+ policy: !!js "(process.env.DSH_PERMISSION_MODE ?? 'workspace-write') === 'danger-full-access' ? 'never' : 'ask'"
182
+
183
+ - id: permission
184
+ name: '@deepseek-ai/dsh-permission'
185
+ config:
186
+ presets:
187
+ read-only:
188
+ sandbox: read-only
189
+ approval: ask
190
+ workspace-write:
191
+ sandbox: workspace-write
192
+ approval: ask
193
+ danger-full-access:
194
+ sandbox: danger-full-access
195
+ approval: never
196
+
197
+ - id: bash-env
198
+ name: '@deepseek-ai/dsh-bash-env'
199
+
200
+ - id: tool-bash
201
+ name: '@deepseek-ai/dsh-tool-bash'
202
+
203
+ - id: tool-tasks
204
+ name: '@deepseek-ai/dsh-tool-tasks'
205
+
206
+ - id: fs-policy
207
+ name: '@deepseek-ai/dsh-fs-policy'
208
+
209
+ - id: tool-fs
210
+ name: '@deepseek-ai/dsh-tool-fs'
211
+
212
+ - id: tool-fs-search
213
+ name: '@deepseek-ai/dsh-tool-fs-search'
214
+ config:
215
+ sampleOverCapGlobResults: false
216
+
217
+ - id: workspace-context
218
+ name: '@deepseek-ai/dsh-workspace-context'
219
+ config:
220
+ maxBytes: 65536
221
+
222
+ - id: skill
223
+ name: '@deepseek-ai/dsh-skill'
224
+
225
+ - id: skill-local
226
+ name: '@deepseek-ai/dsh-skill-local'
227
+
228
+ - id: skill-badge
229
+ name: '@deepseek-ai/dsh-skill-badge'
230
+ disabled: true
231
+
232
+ - id: tool-skill
233
+ name: '@deepseek-ai/dsh-tool-skill'
234
+
235
+ - id: commands
236
+ name: '@deepseek-ai/dsh-commands'
237
+
238
+ - id: command-feedback
239
+ name: '@deepseek-ai/dsh-command-feedback'
240
+
241
+ - id: goal
242
+ name: '@deepseek-ai/dsh-goal'
243
+
244
+ - id: goal-session
245
+ name: '@deepseek-ai/dsh-goal-session'
246
+
247
+ - id: command-goal
248
+ name: '@deepseek-ai/dsh-command-goal'
249
+
250
+ - id: plan-mode
251
+ name: '@deepseek-ai/dsh-plan-mode'
252
+ config:
253
+ section: |
254
+ You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user 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.
255
+
256
+ 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.
257
+
258
+ 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 only to keep the request shape stable. 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.
259
+
260
+ 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.
261
+
262
+ Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
263
+
264
+ 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.
265
+
266
+ - id: token-meter
267
+ name: '@deepseek-ai/dsh-token-meter'
268
+
269
+ - id: compact-basic
270
+ name: '@deepseek-ai/dsh-compact-basic'
271
+
272
+ # Human `/compact`: one useful reduction below the automatic threshold. Backend
273
+ # independent, so it follows whichever compaction service this leaf mounts.
274
+ - id: command-compact
275
+ name: '@deepseek-ai/dsh-command-compact'
276
+
277
+ - id: subagent
278
+ name: '@deepseek-ai/dsh-subagent'
279
+
280
+ - id: subagent-spawn
281
+ name: '@deepseek-ai/dsh-subagent-spawn'
282
+ config:
283
+ providerName: spawn
284
+
285
+ - id: subagent-fork
286
+ name: '@deepseek-ai/dsh-subagent-fork'
287
+ config:
288
+ providerName: fork
289
+
290
+ # Product providers stay on the host plane because the registry is a
291
+ # process singleton. Agent presets decide whether their own model sees the
292
+ # matching delegation tools; loading either provider starts no product.
293
+ - id: subagent-codex
294
+ name: '@deepseek-ai/dsh-subagent-codex'
295
+
296
+ - id: subagent-claude-code
297
+ name: '@deepseek-ai/dsh-subagent-claude-code'
298
+
299
+ # Continuable background children are selected per delegation tool. The
300
+ # separately loaded follow-up tool registers the one global `send_message`.
301
+ - id: tool-subagent-control
302
+ name: '@deepseek-ai/dsh-tool-subagent-control'
303
+
304
+ - id: tool-subagent-list-agents
305
+ name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
306
+
307
+ - id: tool-subagent
308
+ name: '@deepseek-ai/dsh-tool-subagent'
309
+ config:
310
+ provider: spawn
311
+ toolName: subagent
312
+ backgroundMode: continuable
313
+
314
+ - id: tool-subagent-fork
315
+ name: '@deepseek-ai/dsh-tool-subagent'
316
+ config:
317
+ provider: fork
318
+ toolName: subagent_fork
319
+ backgroundMode: continuable
320
+
321
+ # Optional direct-child return channel; absent from roots and one-shot agents.
322
+ - id: tool-subagent-report
323
+ name: '@deepseek-ai/dsh-tool-subagent-report'
324
+
325
+ - id: workflow-workerthread
326
+ name: '@deepseek-ai/dsh-workflow-workerthread'
327
+ config:
328
+ provider: spawn
329
+
330
+ - id: tool-workflow
331
+ name: '@deepseek-ai/dsh-tool-workflow'
332
+
333
+ - id: timeout-policy
334
+ name: '@deepseek-ai/dsh-timeout-policy'
335
+
336
+ - id: spill-local
337
+ name: '@deepseek-ai/dsh-spill-local'
338
+
339
+ - id: spill-policy
340
+ name: '@deepseek-ai/dsh-spill-policy'
341
+ config:
342
+ maxInlineBytes: 50000
343
+
344
+ # Durability checkpoints before each model request and top-level dispatch.
345
+ - id: session-checkpoint-policy
346
+ name: '@deepseek-ai/dsh-session-checkpoint-policy'
347
+
348
+ # Compacts oversized tool results before the broader conversation compactor
349
+ # runs, preserving the model-visible result within the configured budget.
350
+ - id: tool-result-prune
351
+ name: '@deepseek-ai/dsh-compact-tool-result-prune'
352
+ config:
353
+ thresholdChars: 8192
354
+ headChars: 4096
355
+ tailChars: 1024
356
+
357
+ - id: tool-todo
358
+ name: '@deepseek-ai/dsh-tool-todo'
359
+ config:
360
+ allowParallelInProgress: true
361
+
362
+ # Persisted same-session goals reach the model and the slash menu here; the
363
+ # domain, driver, and `/goal` command are above.
364
+ - id: tool-goal
365
+ name: '@deepseek-ai/dsh-tool-goal'
366
+
367
+ # Fresh-agent Ralph iteration over a build-time-fixed script.
368
+ - id: tool-ralph
369
+ name: '@deepseek-ai/dsh-tool-ralph'
370
+ config:
371
+ subagentProvider: spawn
372
+ maxRounds: 64
373
+
374
+ - id: tool-str-replace-editor
375
+ name: '@deepseek-ai/dsh-tool-str-replace-editor'
376
+ config:
377
+ maxOutputChars: 16000
378
+
379
+ # Consecutive-repeat reminders on the tool chain.
380
+ - id: repeat-tool-guard
381
+ name: '@deepseek-ai/dsh-repeat-tool-guard'
382
+ config:
383
+ thresholds: [3, 5, 8]
384
+ argumentsPreviewChars: 500
385
+
386
+ # Every mode enables the stable web_search model surface. DeepSeek search
387
+ # resolves the same DEEPSEEK_API_KEY credential the Models page manages for
388
+ # chat, at each search; its Messages endpoint is separate from the
389
+ # chat-completions endpoint, so it takes its own base-URL override. Fetch stays
390
+ # disabled and no fetch provider is mounted: that provider defers SSRF
391
+ # protection and the model would choose the request target. Search is a full
392
+ # auxiliary model request with server-side retrieval, so this shipped DeepSeek
393
+ # route gets 60s while the provider-neutral tool default remains 30s.
394
+ - id: web
395
+ name: '@deepseek-ai/dsh-web'
396
+ config:
397
+ searchProvider: deepseek-official
398
+
399
+ - id: web-search-deepseek
400
+ name: '@deepseek-ai/dsh-web-search-deepseek'
401
+ config:
402
+ apiKeyEnv: DEEPSEEK_API_KEY
403
+
404
+ - id: tool-web
405
+ name: '@deepseek-ai/dsh-tool-web'
406
+ config:
407
+ fetch: false
408
+ searchTimeoutMs: 60000
409
+
410
+ # ── rows every mode mounts, whose values each overlay may state ──────────────
411
+
412
+ # The tool registry. Presentation mode is a deployment choice; omitting it here
413
+ # keeps the schema default (native).
414
+ - id: tools
415
+ name: '@deepseek-ai/dsh-tools'
416
+
417
+ # The deployment persona is a deployment choice; plan-mode and tool plugins own
418
+ # their own prompt sections.
419
+ - id: system-prompt
420
+ name: '@deepseek-ai/dsh-system-prompt'
421
+ config:
422
+ persona: ''
423
+
424
+ # Agents created at startup. The base stays empty; raw overlays may create
425
+ # agents, while Web creates sessions on client request.
426
+ - id: agent-loop
427
+ name: '@deepseek-ai/dsh-agent-loop'
428
+ config:
429
+ agents: []
430
+
431
+ # The sandboxed filesystem provider. `cwd` defaults to `process.cwd()`; an
432
+ # overlay can pin another workspace.
433
+ - id: fs-sandbox
434
+ name: '@deepseek-ai/dsh-fs-sandbox'
435
+
436
+ # The native DeepSeek adapter. No key or endpoint is inlined: both resolve per
437
+ # request from the `llm-deepseek:` settings section over this entry, with the
438
+ # key coming from the credential store below. Thinking defaults are a deployment
439
+ # choice.
440
+ - id: llm-deepseek
441
+ name: '@deepseek-ai/dsh-llm-deepseek'
package/lib/index.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ //#region lib/types/invariant.js
2
+ /**
3
+ * Package-owned invariant companion for `@deepseek-ai/dsh-base`.
4
+ * @module @deepseek-ai/dsh-base/invariant
5
+ */
6
+ const PACKAGE_NAME = "@deepseek-ai/dsh-base";
7
+ /** Cordis companion plugin name. */
8
+ const name = "base-bundle-invariant";
9
+ /** Service required before the companion can register. */
10
+ const inject = ["invariants"];
11
+ const install = () => {};
12
+ /**
13
+ * Register this package's invariant companion.
14
+ * @param ctx - Cordis context carrying the invariant service.
15
+ * @returns the installed registration's disposer after setup succeeds.
16
+ */
17
+ const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
18
+ //#endregion
19
+ export { apply, inject, name };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @deepseek-ai/dsh-base — the shared dsh core as a profile bundle. The
3
+ * package's substance is `cordis.patch.yml`, declared by the `dsh.bundle.patch`
4
+ * manifest field and resolved by the profile composer through that field;
5
+ * this module carries no runtime API.
6
+ * @module @deepseek-ai/dsh-base
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Package-owned invariant companion for `@deepseek-ai/dsh-base`.
3
+ * @module @deepseek-ai/dsh-base/invariant
4
+ */
5
+ import type { Context } from '@deepseek-ai/cordis';
6
+ /** Cordis companion plugin name. */
7
+ export declare const name = "base-bundle-invariant";
8
+ /** Service required before the companion can register. */
9
+ export declare const inject: string[];
10
+ /**
11
+ * Register this package's invariant companion.
12
+ * @param ctx - Cordis context carrying the invariant service.
13
+ * @returns the installed registration's disposer after setup succeeds.
14
+ */
15
+ export declare const apply: (ctx: Context) => Promise<() => void>;
16
+ //# sourceMappingURL=invariant.d.ts.map
package/package.json ADDED
@@ -0,0 +1,132 @@
1
+ {
2
+ "name": "@deepseek-ai/dsh-base",
3
+ "description": "The shared dsh core as a profile bundle: every profile's first patch layer, inserting the base plugin rows over the empty profile root",
4
+ "version": "0.0.1-rc.1",
5
+ "publishConfig": {
6
+ "access": "restricted"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
+ "directory": "packages/bundle/base"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./invariant": {
22
+ "types": "./lib/types/invariant.d.ts",
23
+ "default": "./lib/invariant.js"
24
+ },
25
+ "./cordis.patch.yml": "./cordis.patch.yml",
26
+ "./windows.cordis.patch.yml": "./windows.cordis.patch.yml",
27
+ "./src/*": "./src/*",
28
+ "./package.json": "./package.json"
29
+ },
30
+ "files": [
31
+ "lib/index.js",
32
+ "lib/invariant.js",
33
+ "cordis.patch.yml",
34
+ "windows.cordis.patch.yml",
35
+ "lib/types/**/*.d.ts"
36
+ ],
37
+ "license": "BSD-3-Clause",
38
+ "dsh": {
39
+ "bundle": {
40
+ "patch": "./cordis.patch.yml"
41
+ }
42
+ },
43
+ "dependencies": {
44
+ "@deepseek-ai/cordis-plugin-timer": "^1.1.3-rc.1",
45
+ "@deepseek-ai/dsh-agent": "^0.0.1-rc.1",
46
+ "@deepseek-ai/cordis-plugin-hmr": "^1.0.16-rc.1",
47
+ "@deepseek-ai/dsh-agent-loop": "^0.0.1-rc.1",
48
+ "@deepseek-ai/dsh-agent-default-model": "^0.0.1-rc.1",
49
+ "@deepseek-ai/dsh-attachment-local": "^0.0.1-rc.1",
50
+ "@deepseek-ai/dsh-bash-env": "^0.0.1-rc.1",
51
+ "@deepseek-ai/dsh-bash-sandbox": "^0.0.1-rc.1",
52
+ "@deepseek-ai/dsh-command-compact": "^0.0.1-rc.1",
53
+ "@deepseek-ai/dsh-command-feedback": "^0.0.1-rc.1",
54
+ "@deepseek-ai/dsh-command-goal": "^0.0.1-rc.1",
55
+ "@deepseek-ai/dsh-commands": "^0.0.1-rc.1",
56
+ "@deepseek-ai/dsh-compact-basic": "^0.0.1-rc.1",
57
+ "@deepseek-ai/dsh-compact-tool-result-prune": "^0.0.1-rc.1",
58
+ "@deepseek-ai/dsh-credentials-local": "^0.0.1-rc.1",
59
+ "@deepseek-ai/dsh-fs-local": "^0.0.1-rc.1",
60
+ "@deepseek-ai/dsh-fs-policy": "^0.0.1-rc.1",
61
+ "@deepseek-ai/dsh-fs-sandbox": "^0.0.1-rc.1",
62
+ "@deepseek-ai/dsh-goal": "^0.0.1-rc.1",
63
+ "@deepseek-ai/dsh-goal-session": "^0.0.1-rc.1",
64
+ "@deepseek-ai/dsh-llm-pi-ai": "^0.0.1-rc.1",
65
+ "@deepseek-ai/dsh-llm-retry": "^0.0.1-rc.1",
66
+ "@deepseek-ai/dsh-api-gateway": "^0.0.1-rc.1",
67
+ "@deepseek-ai/dsh-permission": "^0.0.1-rc.1",
68
+ "@deepseek-ai/dsh-plan-mode": "^0.0.1-rc.1",
69
+ "@deepseek-ai/dsh-pwsh-sandbox": "^0.0.1-rc.1",
70
+ "@deepseek-ai/dsh-llm": "^0.0.1-rc.1",
71
+ "@deepseek-ai/dsh-repeat-tool-guard": "^0.0.1-rc.1",
72
+ "@deepseek-ai/dsh-llm-deepseek": "^0.0.1-rc.1",
73
+ "@deepseek-ai/dsh-sandbox-policy": "^0.0.1-rc.1",
74
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.1",
75
+ "@deepseek-ai/dsh-session-persistence-jsonl": "^0.0.1-rc.1",
76
+ "@deepseek-ai/dsh-session-projection": "^0.0.1-rc.1",
77
+ "@deepseek-ai/dsh-session-query-sqlite": "^0.0.1-rc.1",
78
+ "@deepseek-ai/dsh-session-checkpoint-policy": "^0.0.1-rc.1",
79
+ "@deepseek-ai/dsh-session-telemetry-otel": "^0.0.1-rc.1",
80
+ "@deepseek-ai/dsh-session-title": "^0.0.1-rc.1",
81
+ "@deepseek-ai/dsh-session-title-first-message-llm": "^0.0.1-rc.1",
82
+ "@deepseek-ai/dsh-settings-local": "^0.0.1-rc.1",
83
+ "@deepseek-ai/dsh-skill-badge": "^0.0.1-rc.1",
84
+ "@deepseek-ai/dsh-skill-local": "^0.0.1-rc.1",
85
+ "@deepseek-ai/dsh-spill-local": "^0.0.1-rc.1",
86
+ "@deepseek-ai/dsh-spill-policy": "^0.0.1-rc.1",
87
+ "@deepseek-ai/dsh-skill": "^0.0.1-rc.1",
88
+ "@deepseek-ai/dsh-sandbox-local": "^0.0.1-rc.1",
89
+ "@deepseek-ai/dsh-subagent-claude-code": "^0.0.1-rc.1",
90
+ "@deepseek-ai/dsh-subagent": "^0.0.1-rc.1",
91
+ "@deepseek-ai/dsh-subprocess-local": "^0.0.1-rc.1",
92
+ "@deepseek-ai/dsh-subagent-spawn": "^0.0.1-rc.1",
93
+ "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.1",
94
+ "@deepseek-ai/dsh-subagent-fork": "^0.0.1-rc.1",
95
+ "@deepseek-ai/dsh-tasks-local": "^0.0.1-rc.1",
96
+ "@deepseek-ai/dsh-timeout-policy": "^0.0.1-rc.1",
97
+ "@deepseek-ai/dsh-token-meter": "^0.0.1-rc.1",
98
+ "@deepseek-ai/dsh-tool-bash": "^0.0.1-rc.1",
99
+ "@deepseek-ai/dsh-tool-fs": "^0.0.1-rc.1",
100
+ "@deepseek-ai/dsh-tool-fs-search": "^0.0.1-rc.1",
101
+ "@deepseek-ai/dsh-tool-goal": "^0.0.1-rc.1",
102
+ "@deepseek-ai/dsh-subagent-codex": "^0.0.1-rc.1",
103
+ "@deepseek-ai/dsh-tool-ralph": "^0.0.1-rc.1",
104
+ "@deepseek-ai/dsh-tool-skill": "^0.0.1-rc.1",
105
+ "@deepseek-ai/dsh-tool-str-replace-editor": "^0.0.1-rc.1",
106
+ "@deepseek-ai/dsh-tool-subagent": "^0.0.1-rc.1",
107
+ "@deepseek-ai/dsh-tool-subagent-control": "^0.0.1-rc.1",
108
+ "@deepseek-ai/dsh-tool-subagent-report": "^0.0.1-rc.1",
109
+ "@deepseek-ai/dsh-tool-tasks": "^0.0.1-rc.1",
110
+ "@deepseek-ai/dsh-tool-todo": "^0.0.1-rc.1",
111
+ "@deepseek-ai/dsh-tool-web": "^0.0.1-rc.1",
112
+ "@deepseek-ai/dsh-tools": "^0.0.1-rc.1",
113
+ "@deepseek-ai/dsh-tool-pwsh": "^0.0.1-rc.1",
114
+ "@deepseek-ai/dsh-typert-loader": "^0.0.1-rc.1",
115
+ "@deepseek-ai/dsh-tool-workflow": "^0.0.1-rc.1",
116
+ "@deepseek-ai/dsh-typert-registry": "^0.0.1-rc.1",
117
+ "@deepseek-ai/dsh-user-approval": "^0.0.1-rc.1",
118
+ "@deepseek-ai/dsh-user-interaction": "^0.0.1-rc.1",
119
+ "@deepseek-ai/dsh-web-search-deepseek": "^0.0.1-rc.1",
120
+ "@deepseek-ai/dsh-workflow-workerthread": "^0.0.1-rc.1",
121
+ "@deepseek-ai/dsh-workspace-context": "^0.0.1-rc.1",
122
+ "@deepseek-ai/dsh-web": "^0.0.1-rc.1"
123
+ },
124
+ "peerDependencies": {
125
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
126
+ "@deepseek-ai/cordis": "^4.0.1-rc.1"
127
+ },
128
+ "devDependencies": {
129
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
130
+ "@deepseek-ai/cordis": "^4.0.1-rc.1"
131
+ }
132
+ }
@@ -0,0 +1,31 @@
1
+ # The dsh-base Windows platform layer: applied by the dsh launcher on win32
2
+ # hosts, between the bundle layers and the user layers. Windows confines
3
+ # through the ACL restricted-token runner (the win32 chain of
4
+ # dsh-sandbox-local → @deepseek-ai/dsh-sandbox-windows-acl), so the shipped
5
+ # stack is the SANDBOXED PowerShell executor plus the full permission
6
+ # surface: sandbox/sandbox-policy enforce the file-effect policy, the
7
+ # permission switcher and the approval service run exactly as on POSIX, and
8
+ # the fs row stays the base's sandboxed provider (fs-sandbox) — mounting
9
+ # dsh-fs-local alongside it would double-register ctx.fs and fail the load.
10
+ # Only the POSIX bash
11
+ # stack (bash-sandbox/tool-bash) is disabled — bash has no Windows runner.
12
+ # A Windows host that prefers the unconfined local pwsh executor or full
13
+ # access overrides these rows through its profile or home cordis.patch.yml.
14
+ # The bash-restore recipe must be complete: disable pwsh-sandbox and
15
+ # tool-pwsh AND re-enable bash-sandbox and tool-bash — both executor
16
+ # families register the same 'bash' service, so re-enabling the bash rows
17
+ # while pwsh-sandbox stays inserted fails loud at load on a duplicate
18
+ # registration.
19
+
20
+ - id: bash-sandbox
21
+ disabled: true
22
+
23
+ - id: tool-bash
24
+ disabled: true
25
+
26
+ - insert:
27
+ - id: pwsh-sandbox
28
+ name: '@deepseek-ai/dsh-pwsh-sandbox'
29
+
30
+ - id: tool-pwsh
31
+ name: '@deepseek-ai/dsh-tool-pwsh'