@deepseek-ai/dsh 0.0.1-rc.1 → 0.0.1-rc.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/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write apps/cli/README.md
5
- README.md: 4fae5338a89ce12c2620e123530acf883ae9efff
6
- README.zh.md: a2d086b8ff12fb07f2446fc4162de09739bcdeab
5
+ README.md: 9a8d722b044ed5d8e31e3c27e54f8c9ef0839f82
6
+ README.zh.md: dc40a4a6f54f99507bccb6b989aee0015e9604b3
package/README.md CHANGED
@@ -9,7 +9,7 @@ The `dsh` command is the product launcher for profiles: ordered stacks of plugin
9
9
  | Command | Purpose |
10
10
  |---|---|
11
11
  | `dsh --profile <name>` | Boot the named profile under `$DSH_HOME/profiles/<name>`. |
12
- | `dsh --profile headless "task"` | Run one fresh persisted session, print the final answer, and exit. |
12
+ | `dsh --profile headless "job"` | Run one fresh persisted session, print the final answer, and exit. |
13
13
  | `dsh web` | Alias of `--profile web`. |
14
14
  | `dsh plugin --profile <name> <pnpm args>` | Manage a profile's plugins by forwarding to pnpm in the profile directory. |
15
15
 
@@ -21,7 +21,7 @@ The launcher parses only its own flags and hands everything after them to the bo
21
21
 
22
22
  ```sh
23
23
  dsh --profile web --port 8080 # --port belongs to the web app
24
- dsh --profile tui --resume <id> # --resume belongs to the terminal app
24
+ dsh --profile tui --resume <id> # example, assuming the tui profile is installed; --resume belongs to the terminal app
25
25
  dsh --profile headless "run the tests"
26
26
  dsh --profile web --help # the web app's flags, not the launcher's
27
27
  dsh --help # the launcher's own help
@@ -29,10 +29,19 @@ dsh --help # the launcher's own help
29
29
 
30
30
  ## Profiles
31
31
 
32
- A profile directory holds a `package.json` (out-of-tree plugin dependencies plus the profile manifest `dsh.profile` with its ordered `bundles` list) and a `cordis.patch.yml` (the user's own patch layer, hot-reloaded on long-lived surfaces). The tree composes over an empty root: each bundle's patch in `dsh.profile.bundles` order, then the profile's `cordis.patch.yml`, then the home-level `$DSH_HOME/cordis.patch.yml`, then `--patch` overlays. Bundles named in `dsh.profile.bundles` resolve from the dsh installation first (`@deepseek-ai/dsh-base`, `@deepseek-ai/dsh-web-app`, `@deepseek-ai/dsh-headless`), then from the profile's own `node_modules`, where pnpm installs out-of-tree plugins. Use `--dump-default-config` and `--dump-config` to inspect the composed tree without booting it.
32
+ A profile directory holds a `package.json` (out-of-tree plugin dependencies plus the profile manifest `dsh.profile` with its ordered `bundles` list) and a `cordis.patch.yml` (the user's own patch layer).
33
33
 
34
- The [CLI behavior reference](reference/README.md) owns exact layer precedence, flags, shutdown behavior, deployment defaults, and the source launcher.
34
+ The tree composes over an empty root:
35
+ - each bundle's patch in `dsh.profile.bundles` order
36
+ - then the profile's `cordis.patch.yml`, then the home-level `$DSH_HOME/cordis.patch.yml`
37
+ - then `--patch` overlays
38
+
39
+ Bundles named in `dsh.profile.bundles` resolve from the dsh installation first (`@deepseek-ai/dsh-base`, `@deepseek-ai/dsh-web-app`, `@deepseek-ai/dsh-headless`), then from the profile's own `node_modules`, where pnpm installs out-of-tree plugins.
40
+
41
+ Use `--dump-default-config` and `--dump-config` to inspect the composed tree without booting it.
42
+
43
+ The [CLI behavior reference](reference/README.md) owns exact layer precedence, flags, shutdown behavior, deployment defaults, and source execution.
35
44
 
36
45
  ## Development
37
46
 
38
- Production runs require built package and frontend artifacts. From a checkout, `pnpm run dsh` runs the TypeScript entry and forwards arguments; the [source-launcher reference](reference/README.md#source-launcher) describes the PATH symlink and module-resolution contract.
47
+ Production runs require built package and frontend artifacts. From the repository root, run `pnpm run build` separately, then use `pnpm dsh <args...>` to run the TypeScript entry and forward every argument; the [source-execution reference](reference/README.md#source-execution) owns the module-resolution contract.
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@
9
9
  | 命令 | 用途 |
10
10
  |---|---|
11
11
  | `dsh --profile <name>` | 启动位于 `$DSH_HOME/profiles/<name>` 的指定 profile。 |
12
- | `dsh --profile headless "task"` | 运行一个新的持久化会话,打印最终答案并退出。 |
12
+ | `dsh --profile headless "job"` | 运行一个新的持久化会话,打印最终答案并退出。 |
13
13
  | `dsh web` | `--profile web` 的别名。 |
14
14
  | `dsh plugin --profile <name> <pnpm args>` | 通过在 profile 目录中转发给 pnpm 来管理该 profile 的插件。 |
15
15
 
@@ -21,7 +21,7 @@
21
21
 
22
22
  ```sh
23
23
  dsh --profile web --port 8080 # --port belongs to the web app
24
- dsh --profile tui --resume <id> # --resume belongs to the terminal app
24
+ dsh --profile tui --resume <id> # example, assuming the tui profile is installed; --resume belongs to the terminal app
25
25
  dsh --profile headless "run the tests"
26
26
  dsh --profile web --help # the web app's flags, not the launcher's
27
27
  dsh --help # the launcher's own help
@@ -29,10 +29,19 @@ dsh --help # the launcher's own help
29
29
 
30
30
  ## Profile
31
31
 
32
- profile 目录包含一个 `package.json`(树外插件依赖,加上 profile manifest(元数据清单)`dsh.profile` 及其有序的 `bundles` 列表)和一个 `cordis.patch.yml`(用户自己的 patch 层,在长期运行的 surface 上热重载)。配置树在空根之上组合:先按 `dsh.profile.bundles` 顺序应用各组合包的 patch,然后是 profile 的 `cordis.patch.yml`,然后是 home 级的 `$DSH_HOME/cordis.patch.yml`,然后是 `--patch` overlay。`dsh.profile.bundles` 中列出的组合包先从 dsh 安装目录解析(`@deepseek-ai/dsh-base`、`@deepseek-ai/dsh-web-app`、`@deepseek-ai/dsh-headless`),再从 profile 自己的 `node_modules` 解析;pnpm 把树外插件安装在后者。使用 `--dump-default-config` 和 `--dump-config` 可在不启动的情况下检查组合后的配置树。
32
+ profile 目录包含一个 `package.json`(树外插件依赖,加上 profile manifest(元数据清单)`dsh.profile` 及其有序的 `bundles` 列表)和一个 `cordis.patch.yml`(用户自己的 patch 层)。
33
33
 
34
- [CLI(命令行界面)行为参考](reference/README.md)负责确切的层优先级、flag、关闭行为、部署默认值和源码启动器。
34
+ 配置树在空根之上组合:
35
+ - 先按 `dsh.profile.bundles` 顺序应用各组合包的 patch
36
+ - 然后是 profile 的 `cordis.patch.yml`,然后是 home 级的 `$DSH_HOME/cordis.patch.yml`
37
+ - 最后是 `--patch` overlay
38
+
39
+ `dsh.profile.bundles` 中列出的组合包先从 dsh 安装目录解析(`@deepseek-ai/dsh-base`、`@deepseek-ai/dsh-web-app`、`@deepseek-ai/dsh-headless`),再从 profile 自己的 `node_modules` 解析;pnpm 把树外插件安装在后者。
40
+
41
+ 使用 `--dump-default-config` 和 `--dump-config` 可在不启动的情况下检查组合后的配置树。
42
+
43
+ [CLI(命令行界面)行为参考](reference/README.md)负责确切的层优先级、flag、关闭行为、部署默认值和源码执行。
35
44
 
36
45
  ## 开发
37
46
 
38
- 生产运行需要已构建的包与前端产物。在 checkout 中,`pnpm run dsh` 会运行 TypeScript 入口并转发参数;[源码启动器参考](reference/README.md#source-launcher)说明 PATH 符号链接和模块解析契约。
47
+ 生产运行需要已构建的包与前端产物。请在仓库根目录单独运行 `pnpm run build`,然后使用 `pnpm dsh <args...>` 运行 TypeScript 入口并转发所有参数;模块解析约定由[源码执行参考](reference/README.md#source-execution)负责。
@@ -1,6 +1,6 @@
1
1
  # The `code` agent preset: the standard coding agent, presented as Code Mode.
2
2
  #
3
- # Everything in `standard` is here unchanged. What is added is the `tool-mode`
3
+ # Everything in `standard` is here unchanged. What is added is the `tool-presentation`
4
4
  # row: instead of one tool call per action, the model writes a TypeScript
5
5
  # program against a generated SDK and `run_code` executes it, so a sequence
6
6
  # that would be five round trips becomes one.
@@ -34,22 +34,27 @@
34
34
  text: >-
35
35
  You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.
36
36
 
37
- - id: workspace-context
38
- name: '@deepseek-ai/dsh-workspace-context'
37
+ - id: agent-instructions
38
+ name: '@deepseek-ai/dsh-agent-instructions'
39
39
  config:
40
40
  maxBytes: 65536
41
41
 
42
42
  # ── shell ───────────────────────────────────────────────────────────────────
43
43
 
44
- # `bash-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
44
+ # `shell-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
45
45
  # publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
46
46
  # the criterion for host-plane ownership — injection resolves before any session
47
47
  # exists, so there is no agent to key by. Behind a preset realm those variables
48
- # never reached the model's shell at all. `tool-bash` consumes the host registry
49
- # from here; the executor behind it (`bash-sandbox`) is host-plane too, where the
50
- # sandbox policy owns it.
48
+ # never reached the model's shell at all. Both shell tools consume the host
49
+ # registry from here; their executors (`bash-sandbox`/`pwsh-sandbox`) are
50
+ # host-plane too.
51
51
  - id: tool-bash
52
52
  name: '@deepseek-ai/dsh-tool-bash'
53
+ disabled: !!js process.platform === 'win32'
54
+
55
+ - id: tool-pwsh
56
+ name: '@deepseek-ai/dsh-tool-pwsh'
57
+ disabled: !!js process.platform !== 'win32'
53
58
 
54
59
  # ── filesystem ──────────────────────────────────────────────────────────────
55
60
 
@@ -63,27 +68,27 @@
63
68
  config:
64
69
  sampleOverCapGlobResults: false
65
70
 
66
- # ── background tasks ────────────────────────────────────────────────────────
71
+ # ── background jobs ────────────────────────────────────────────────────────
67
72
 
68
73
  # Only the model-facing controls. The task REGISTRY stays on the host plane:
69
74
  # its producers sit outside any realm this file could put it in — `tool-bash`
70
75
  # above resolves it with `ctx.get`, and an entry-local realm here is invisible
71
- # to every sibling row, so `run_in_background` would answer "background tasks
76
+ # to every sibling row, so `run_in_background` would answer "background jobs
72
77
  # unavailable" while these controls sat in the catalog. The registry is keyed by
73
78
  # owning agent anyway, so one host instance serves every session. What a preset
74
79
  # chooses is whether its agent can collect and stop background work at all.
75
- - id: tool-tasks
76
- name: '@deepseek-ai/dsh-tool-tasks'
80
+ - id: tool-jobs
81
+ name: '@deepseek-ai/dsh-tool-jobs'
77
82
 
78
83
  # ── skills ──────────────────────────────────────────────────────────────────
79
84
 
80
85
  # The skill REGISTRY lives in the host composition and is layered per scope:
81
86
  # these rows register into THIS preset's layer of it, so they need no realm.
82
- # `skill-local` contributes local-root discovery for agents on this preset, and
87
+ # `skill-filesystem` contributes local-root discovery for agents on this preset, and
83
88
  # `tool-skill` gives them the catalog and loader; the merged catalog also
84
89
  # carries whatever the deployment registered globally (repository plugins).
85
- - id: skill-local
86
- name: '@deepseek-ai/dsh-skill-local'
90
+ - id: skill-filesystem
91
+ name: '@deepseek-ai/dsh-skill-filesystem'
87
92
 
88
93
  - id: tool-skill
89
94
  name: '@deepseek-ai/dsh-tool-skill'
@@ -127,27 +132,30 @@
127
132
 
128
133
  # ── compaction ──────────────────────────────────────────────────────────────
129
134
 
130
- # `compact-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
135
+ # `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
131
136
  # share this realm rather than sit outside it.
137
+ #
138
+ # `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
139
+ # plane, and the rows here resolve that one instance. It takes no configuration,
140
+ # keys every fold by Session, and owns the context-meter projection units the
141
+ # browser reads for every session — behind a realm those units would come and go
142
+ # with whichever presets happen to be mounted. What a preset chooses is whether
143
+ # its agent compacts at all, which is `compaction-basic` below.
132
144
  - id: compaction
133
145
  name: cordis:group
134
146
  group: true
135
147
  isolate:
136
- tokenMeter: true
137
- compact: true
138
- toolResultPrune: true
148
+ compaction: true
149
+ toolResultPruner: true
139
150
  config:
140
- - id: token-meter
141
- name: '@deepseek-ai/dsh-token-meter'
142
-
143
- - id: compact-basic
144
- name: '@deepseek-ai/dsh-compact-basic'
151
+ - id: compaction-basic
152
+ name: '@deepseek-ai/dsh-compaction-basic'
145
153
 
146
154
  - id: command-compact
147
155
  name: '@deepseek-ai/dsh-command-compact'
148
156
 
149
- - id: tool-result-prune
150
- name: '@deepseek-ai/dsh-compact-tool-result-prune'
157
+ - id: tool-result-pruner
158
+ name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
151
159
  config:
152
160
  thresholdChars: 8192
153
161
  headChars: 4096
@@ -168,7 +176,7 @@
168
176
  name: cordis:group
169
177
  group: true
170
178
  isolate:
171
- workflows: true
179
+ workflowEngine: true
172
180
  config:
173
181
  - id: tool-subagent-control
174
182
  name: '@deepseek-ai/dsh-tool-subagent-control'
@@ -211,8 +219,8 @@
211
219
  enableRunInBackground: false
212
220
  maxDepth: provider-managed
213
221
 
214
- - id: workflow-workerthread
215
- name: '@deepseek-ai/dsh-workflow-workerthread'
222
+ - id: workflow-worker-thread
223
+ name: '@deepseek-ai/dsh-workflow-worker-thread'
216
224
  config:
217
225
  provider: spawn
218
226
 
@@ -248,7 +256,7 @@
248
256
  # Code Mode for this agent alone. The row waits for the host's `codeRuntime`
249
257
  # rather than assuming it: a deployment that composes no TypeScript runtime
250
258
  # fails this preset at mount, naming this id, instead of at the first request.
251
- - id: tool-mode
252
- name: '@deepseek-ai/dsh-agent-tool-mode'
259
+ - id: tool-presentation
260
+ name: '@deepseek-ai/dsh-agent-tool-presentation'
253
261
  config:
254
262
  mode: code
@@ -1,3 +1,3 @@
1
- name: 代码模式
1
+ name: PTC 模式
2
2
  description: 具备标准模式的全部能力,并通过 Code Mode SDK 呈现工具,让模型用一个 TypeScript 程序组合多步操作。
3
3
  order: 2
@@ -24,26 +24,31 @@
24
24
 
25
25
  Two planes decide where an edit belongs. The HOST composition holds the registries and anything shared across sessions — persistence, the sandbox and approval stack, the model route, the subagent registry and its backends. An AGENT PRESET holds what one session contributes to those registries: its tools, its persona, its prompt sections. A row that publishes a service belongs in the host composition, or inside an `isolate` realm if the preset genuinely owns that service and nothing outside one agent reads it.
26
26
 
27
- Presets you author live under `${DSH_HOME:-$HOME/.dsh}/.agent-presets/<id>/`, one directory per preset. NEVER edit or delete the shipped preset install (the `agent-presets` directory beside the deployment's own config): it belongs to the deployment, an upgrade overwrites it, and corrupting the `cordis` preset would disable this very mode. To change what a shipped preset does, copy its composition into a new preset directory and edit the copy.
27
+ Presets you author live one directory per preset under `${DSH_HOME:-$HOME/.dsh}/.agent-presets/<id>/`; the roster reports each preset's real path, so take the one you edit from there. NEVER edit or delete the shipped preset install (the `agent-presets` directory beside the deployment's own config): it belongs to the deployment, an upgrade overwrites it, and corrupting the `cordis` preset would disable this very mode. To change what a shipped preset does, copy its composition into a new preset directory and edit the copy.
28
28
 
29
29
  Load the `editing-cordis-compositions` skill before writing or changing a composition.
30
30
 
31
- - id: workspace-context
32
- name: '@deepseek-ai/dsh-workspace-context'
31
+ - id: agent-instructions
32
+ name: '@deepseek-ai/dsh-agent-instructions'
33
33
  config:
34
34
  maxBytes: 65536
35
35
 
36
36
  # ── shell ───────────────────────────────────────────────────────────────────
37
37
 
38
- # `bash-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
38
+ # `shell-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
39
39
  # publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
40
40
  # the criterion for host-plane ownership — injection resolves before any session
41
41
  # exists, so there is no agent to key by. Behind a preset realm those variables
42
- # never reached the model's shell at all. `tool-bash` consumes the host registry
43
- # from here; the executor behind it (`bash-sandbox`) is host-plane too, where the
44
- # sandbox policy owns it.
42
+ # never reached the model's shell at all. Both shell tools consume the host
43
+ # registry from here; their executors (`bash-sandbox`/`pwsh-sandbox`) are
44
+ # host-plane too.
45
45
  - id: tool-bash
46
46
  name: '@deepseek-ai/dsh-tool-bash'
47
+ disabled: !!js process.platform === 'win32'
48
+
49
+ - id: tool-pwsh
50
+ name: '@deepseek-ai/dsh-tool-pwsh'
51
+ disabled: !!js process.platform !== 'win32'
47
52
 
48
53
  # ── filesystem ──────────────────────────────────────────────────────────────
49
54
 
@@ -57,17 +62,17 @@
57
62
  config:
58
63
  sampleOverCapGlobResults: false
59
64
 
60
- # ── background tasks ────────────────────────────────────────────────────────
65
+ # ── background jobs ────────────────────────────────────────────────────────
61
66
 
62
67
  # Only the model-facing controls. The task REGISTRY stays on the host plane:
63
68
  # its producers sit outside any realm this file could put it in — `tool-bash`
64
69
  # above resolves it with `ctx.get`, and an entry-local realm here is invisible
65
- # to every sibling row, so `run_in_background` would answer "background tasks
70
+ # to every sibling row, so `run_in_background` would answer "background jobs
66
71
  # unavailable" while these controls sat in the catalog. The registry is keyed by
67
72
  # owning agent anyway, so one host instance serves every session. What a preset
68
73
  # chooses is whether its agent can collect and stop background work at all.
69
- - id: tool-tasks
70
- name: '@deepseek-ai/dsh-tool-tasks'
74
+ - id: tool-jobs
75
+ name: '@deepseek-ai/dsh-tool-jobs'
71
76
 
72
77
  # ── goals ───────────────────────────────────────────────────────────────────
73
78
 
@@ -108,27 +113,30 @@
108
113
 
109
114
  # ── compaction ──────────────────────────────────────────────────────────────
110
115
 
111
- # `compact-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
116
+ # `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
112
117
  # share this realm rather than sit outside it.
118
+ #
119
+ # `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
120
+ # plane, and the rows here resolve that one instance. It takes no configuration,
121
+ # keys every fold by Session, and owns the context-meter projection units the
122
+ # browser reads for every session — behind a realm those units would come and go
123
+ # with whichever presets happen to be mounted. What a preset chooses is whether
124
+ # its agent compacts at all, which is `compaction-basic` below.
113
125
  - id: compaction
114
126
  name: cordis:group
115
127
  group: true
116
128
  isolate:
117
- tokenMeter: true
118
- compact: true
119
- toolResultPrune: true
129
+ compaction: true
130
+ toolResultPruner: true
120
131
  config:
121
- - id: token-meter
122
- name: '@deepseek-ai/dsh-token-meter'
123
-
124
- - id: compact-basic
125
- name: '@deepseek-ai/dsh-compact-basic'
132
+ - id: compaction-basic
133
+ name: '@deepseek-ai/dsh-compaction-basic'
126
134
 
127
135
  - id: command-compact
128
136
  name: '@deepseek-ai/dsh-command-compact'
129
137
 
130
- - id: tool-result-prune
131
- name: '@deepseek-ai/dsh-compact-tool-result-prune'
138
+ - id: tool-result-pruner
139
+ name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
132
140
  config:
133
141
  thresholdChars: 8192
134
142
  headChars: 4096
@@ -155,7 +163,7 @@
155
163
  name: cordis:group
156
164
  group: true
157
165
  isolate:
158
- workflows: true
166
+ workflowEngine: true
159
167
  config:
160
168
  - id: tool-subagent-control
161
169
  name: '@deepseek-ai/dsh-tool-subagent-control'
@@ -198,8 +206,8 @@
198
206
  enableRunInBackground: false
199
207
  maxDepth: provider-managed
200
208
 
201
- - id: workflow-workerthread
202
- name: '@deepseek-ai/dsh-workflow-workerthread'
209
+ - id: workflow-worker-thread
210
+ name: '@deepseek-ai/dsh-workflow-worker-thread'
203
211
  config:
204
212
  provider: spawn
205
213
 
@@ -244,8 +252,8 @@
244
252
  # Both rows register into THIS preset's layer of the host skill registry, so
245
253
  # they need no realm; the agent's merged catalog also carries whatever the
246
254
  # deployment registered globally (repository plugins).
247
- - id: skill-local
248
- name: '@deepseek-ai/dsh-skill-local'
255
+ - id: skill-filesystem
256
+ name: '@deepseek-ai/dsh-skill-filesystem'
249
257
  config:
250
258
  customSkillDirs:
251
259
  - !!js "process.getBuiltinModule('node:url').fileURLToPath(new URL('skills/', baseUrl))"