dsh-code 1.0.2 → 1.0.3
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.en.md +21 -13
- package/README.md +21 -13
- package/lib/index.mjs +1156 -720
- package/lib/types/app.d.ts +2 -0
- package/lib/types/editor-keys.d.ts +105 -0
- package/lib/types/git-workflow.d.ts +6 -2
- package/lib/types/model-capabilities.d.ts +82 -0
- package/lib/types/provider-settings.d.ts +7 -0
- package/lib/types/render/lines.d.ts +25 -0
- package/lib/types/render/markdown.d.ts +1 -1
- package/lib/types/render/projection.d.ts +15 -1
- package/lib/types/render/text.d.ts +15 -9
- package/lib/types/render/width.d.ts +29 -0
- package/lib/types/session-directory.d.ts +27 -0
- package/lib/types/settings-file.d.ts +33 -0
- package/lib/types/store.d.ts +10 -0
- package/lib/types/subagents.d.ts +13 -3
- package/package.json +159 -159
- package/src/app.ts +1104 -1041
- package/src/editor-keys.ts +371 -0
- package/src/git-workflow.ts +10 -6
- package/src/index.ts +1637 -1523
- package/src/model-capabilities.ts +318 -0
- package/src/provider-settings.ts +16 -0
- package/src/render/lines.ts +403 -356
- package/src/render/markdown.ts +4 -7
- package/src/render/projection.ts +63 -40
- package/src/render/text.ts +152 -150
- package/src/render/width.ts +189 -0
- package/src/session-directory.ts +56 -0
- package/src/settings-file.ts +56 -0
- package/src/store.ts +26 -7
- package/src/subagents.ts +39 -6
package/README.en.md
CHANGED
|
@@ -7,7 +7,7 @@ English | [中文](README.md)
|
|
|
7
7
|
<p align="center"><img alt="Typing SVG" src="https://readme-typing-svg.herokuapp.com?font=JetBrains+Mono&weight=500&size=22&duration=4000&pause=700&color=4176E6&center=true&vCenter=true&width=680&lines=DeepSeek+Harness+Code;Terminal+Coding+Interface+for+the+DSH+Core"></p>
|
|
8
8
|
<p align="center">
|
|
9
9
|
<a href="https://github.com/deepseek-ai/deepseek-harness"><img alt="DeepSeek Harness" src="https://img.shields.io/badge/DeepSeek-Harness-4176E6?style=for-the-badge&logo=deepseek&logoColor=white&labelColor=1c1917"></a>
|
|
10
|
-
<a href="https://www.npmjs.com/package/@deepseek-ai/dsh"><img alt="dsh version" src="https://img.shields.io/badge/dsh-0.1.1--rc.2-4176E6?style=for-the-badge&logo=deepseek&logoColor=white&labelColor=1c1917"></a>
|
|
10
|
+
<a href="https://www.npmjs.com/package/@deepseek-ai/dsh"><img alt="dsh version" src="https://img.shields.io/badge/dsh-0.1.1--rc.2-4176E6?style=for-the-badge&logo=deepseek&logoColor=white&labelColor=1c1917"></a>
|
|
11
11
|
<a href="https://github.com/UNLINEARITY/dsh-code/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/UNLINEARITY/dsh-code?label=Stars&style=for-the-badge&logo=github&logoColor=white&color=4176E6&labelColor=1c1917"></a>
|
|
12
12
|
<a href="https://www.npmjs.com/package/dsh-code"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-code?label=npm&style=for-the-badge&logo=npm&color=cb3837&labelColor=1c1917"></a>
|
|
13
13
|
<a href="https://github.com/UNLINEARITY/dsh-code/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/UNLINEARITY/dsh-code?label=License&style=for-the-badge&logo=opensourceinitiative&color=4176E6&labelColor=1c1917"></a>
|
|
@@ -23,21 +23,21 @@ DeepSeek Harness registers models, tools, storage, policies, and interfaces as p
|
|
|
23
23
|
|
|
24
24
|
## 2. Quick start
|
|
25
25
|
|
|
26
|
-
Requires Node `^22.19 || >=24` and the preview `dsh` CLI (current release line: `@deepseek-ai/dsh@0.1.1-rc.2`). You can still enter the TUI, browse sessions, and use non-model features without configuring a model; press `a` in `/model` to manage API keys, OAuth, and device-code sign-in.
|
|
26
|
+
Requires Node `^22.19 || >=24` and the preview `dsh` CLI (current release line: `@deepseek-ai/dsh@0.1.1-rc.2`). You can still enter the TUI, browse sessions, and use non-model features without configuring a model; press `a` in `/model` to manage API keys, OAuth, and device-code sign-in.
|
|
27
27
|
|
|
28
28
|
### 1. Install and update
|
|
29
29
|
|
|
30
30
|
Use the same commands for the initial installation and subsequent updates:
|
|
31
31
|
|
|
32
32
|
```sh
|
|
33
|
-
npm install -g @deepseek-ai/dsh@0.1.1-rc.2 dsh-code@1.0.
|
|
33
|
+
npm install -g @deepseek-ai/dsh@0.1.1-rc.2 dsh-code@1.0.3
|
|
34
34
|
npm install -g pnpm
|
|
35
|
-
dsh plugin --profile cli add dsh-code@1.0.
|
|
35
|
+
dsh plugin --profile cli add dsh-code@1.0.3
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
> Note: pnpm ignores packages published less than 24 hours ago, so use the exact version `dsh-code@1.0.
|
|
38
|
+
> Note: pnpm ignores packages published less than 24 hours ago, so use the exact version `dsh-code@1.0.3` on release day; the version may be omitted after 24 hours. npm installation is not affected.
|
|
39
39
|
>
|
|
40
|
-
> Version alignment: dsh-code 1.0.
|
|
40
|
+
> Version alignment: dsh-code 1.0.3 targets dsh `0.1.1-rc.2`, with every Harness dependency pinned exactly to `0.1.1-rc.2`. Keep the global dsh CLI and dsh-code aligned instead of mixing release candidates. rc.2 removes the old DeepSeek setting `maxRequestImageBytes`.
|
|
41
41
|
|
|
42
42
|
### 2. Launch commands
|
|
43
43
|
|
|
@@ -76,8 +76,8 @@ DSH-Code brings DSH Agents, models, tools, and durable sessions directly into th
|
|
|
76
76
|
|
|
77
77
|
- Select an independent Agent Preset for each session to compose tools, prompt sections, skills, context compaction, plan mode, and subagent capabilities
|
|
78
78
|
- Use `/mode` to select `standard`, `code`, `minimal`, `cordis`, or a user-defined Preset
|
|
79
|
-
- Use `/model` to switch models and manage providers, API keys, OAuth/device-code sign-in, endpoints, available models, and context windows
|
|
80
|
-
- In the `/model` provider list, Enter manages a manual API key, `l` starts sign-in, and `o` logs out after confirmation
|
|
79
|
+
- Use `/model` to switch models and manage providers, API keys, OAuth/device-code sign-in, endpoints, available models, and context windows
|
|
80
|
+
- In the `/model` provider list, Enter manages a manual API key, `l` starts sign-in, and `o` logs out after confirmation
|
|
81
81
|
- Automatically load commands and skills available in DSH; use `/help` to find them and `/plugin` to inspect extension status
|
|
82
82
|
- Use plans, goals, todos, permissions, sandboxes, subagents, and additional instructions while a task is running
|
|
83
83
|
|
|
@@ -102,8 +102,8 @@ Levels above `high` include `xhigh`, `x-high`, `very-high`, `max`, `maximum`, an
|
|
|
102
102
|
|
|
103
103
|
### 4. Coding workflow
|
|
104
104
|
|
|
105
|
-
- Use `@` to reference workspace files or existing sessions; selecting PNG, JPEG, WebP, or GIF files attaches the real image automatically
|
|
106
|
-
- Attach images through the initial prompt, repeated `--image` arguments, or by dragging one or more images into the terminal
|
|
105
|
+
- Use `@` to reference workspace files or existing sessions; selecting PNG, JPEG, WebP, or GIF files attaches the real image automatically
|
|
106
|
+
- Attach images through the initial prompt, repeated `--image` arguments, or by dragging one or more images into the terminal
|
|
107
107
|
- Inspect changes by file with `/diff`, and start a read-only code review with `/review`
|
|
108
108
|
- Copy the latest complete response with `/copy`, and inspect full history and tool details with Ctrl+O
|
|
109
109
|
- Handle tool approvals, structured questions, plan reviews, multiple selections, and custom answers
|
|
@@ -142,7 +142,7 @@ The following built-in commands are available inside the TUI. Additional Harness
|
|
|
142
142
|
| Command | Purpose |
|
|
143
143
|
| --- | --- |
|
|
144
144
|
| `/mode [preset]` | Inspect or select the current session's Agent Preset |
|
|
145
|
-
| `/model` | Switch models and manage providers, API keys, browser sign-in, endpoints, and available models |
|
|
145
|
+
| `/model` | Switch models and manage providers, API keys, browser sign-in, endpoints, and available models |
|
|
146
146
|
| `/effort` | Adjust the current model's reasoning effort |
|
|
147
147
|
| `/permission [preset]` | Inspect or switch the permission Preset |
|
|
148
148
|
| `/subagent` | Select the model used when a subagent performs a task |
|
|
@@ -164,6 +164,7 @@ The following built-in commands are available inside the TUI. Additional Harness
|
|
|
164
164
|
| --- | --- |
|
|
165
165
|
| `/plugin [query]` | Inspect loaded extensions and their status |
|
|
166
166
|
| `/statusline` | Select the items displayed in the status bar |
|
|
167
|
+
| `/vscode-keys` | Pass Ctrl+R through VS Code-family terminals (idempotent user-level keybindings.json write) |
|
|
167
168
|
| `/theme` | Switch the terminal color theme |
|
|
168
169
|
| `/help` | View key bindings, built-in commands, Harness commands, and user skills |
|
|
169
170
|
| `/quit` | Exit DSH-Code |
|
|
@@ -175,9 +176,9 @@ The following built-in commands are available inside the TUI. Additional Harness
|
|
|
175
176
|
| `Enter` | Submit the current input |
|
|
176
177
|
| `Up` / `Down` | Recall the previous or next input-history entry |
|
|
177
178
|
| `Tab` | Complete commands, skills, or `@` references |
|
|
178
|
-
| `@` | Reference workspace files or existing sessions; image files are sent as attachments |
|
|
179
|
+
| `@` | Reference workspace files or existing sessions; image files are sent as attachments |
|
|
179
180
|
| `Ctrl+O` | Inspect full history and tool details |
|
|
180
|
-
| `Ctrl+R` | Fold or expand model reasoning |
|
|
181
|
+
| `Ctrl/Alt+R` | Fold or expand model reasoning; run /vscode-keys first in VS Code-family terminals to pass Ctrl+R through |
|
|
181
182
|
| `Shift+Tab` | Cycle through permission Presets |
|
|
182
183
|
| `Delete` | Cancel the newest queued message when the composer is empty |
|
|
183
184
|
| `Ctrl+K` | Delete from the cursor to the end of the line |
|
|
@@ -187,6 +188,13 @@ The following built-in commands are available inside the TUI. Additional Harness
|
|
|
187
188
|
| `Ctrl+C` | Cancel a task, clear the input, or exit, depending on the current state |
|
|
188
189
|
| `Ctrl+D` | Exit DSH-Code |
|
|
189
190
|
|
|
191
|
+
#### Status indicators
|
|
192
|
+
|
|
193
|
+
| Indicator | Trigger |
|
|
194
|
+
| --- | --- |
|
|
195
|
+
| `✻ Deep diving...` | The turn is running while nothing is streaming (waiting for the first token, gaps during tool runs); an elapsed clock appears after 15 seconds |
|
|
196
|
+
| `✻ Thinking…` | Model reasoning is streaming; collapsed into the shimmer marker by default, expand with `Ctrl/Alt+R` |
|
|
197
|
+
|
|
190
198
|
## 4. How DSH-Code integrates with DSH
|
|
191
199
|
|
|
192
200
|
### 1. Runtime composition
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<p align="center"><img alt="Typing SVG" src="https://readme-typing-svg.herokuapp.com?font=JetBrains+Mono&weight=500&size=22&duration=4000&pause=700&color=4176E6&center=true&vCenter=true&width=680&lines=DeepSeek+Harness+Code;DSH+%E5%86%85%E6%A0%B8%E7%9A%84%E7%BB%88%E7%AB%AF%E7%BC%96%E7%A0%81%E7%95%8C%E9%9D%A2"></p>
|
|
8
8
|
<p align="center">
|
|
9
9
|
<a href="https://github.com/deepseek-ai/deepseek-harness"><img alt="DeepSeek Harness" src="https://img.shields.io/badge/DeepSeek-Harness-4176E6?style=for-the-badge&logo=deepseek&logoColor=white&labelColor=1c1917"></a>
|
|
10
|
-
<a href="https://www.npmjs.com/package/@deepseek-ai/dsh"><img alt="dsh version" src="https://img.shields.io/badge/dsh-0.1.1--rc.2-4176E6?style=for-the-badge&logo=deepseek&logoColor=white&labelColor=1c1917"></a>
|
|
10
|
+
<a href="https://www.npmjs.com/package/@deepseek-ai/dsh"><img alt="dsh version" src="https://img.shields.io/badge/dsh-0.1.1--rc.2-4176E6?style=for-the-badge&logo=deepseek&logoColor=white&labelColor=1c1917"></a>
|
|
11
11
|
<a href="https://github.com/UNLINEARITY/dsh-code/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/UNLINEARITY/dsh-code?label=Stars&style=for-the-badge&logo=github&logoColor=white&color=4176E6&labelColor=1c1917"></a>
|
|
12
12
|
<a href="https://www.npmjs.com/package/dsh-code"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-code?label=npm&style=for-the-badge&logo=npm&color=cb3837&labelColor=1c1917"></a>
|
|
13
13
|
<a href="https://github.com/UNLINEARITY/dsh-code/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/UNLINEARITY/dsh-code?label=License&style=for-the-badge&logo=opensourceinitiative&color=4176E6&labelColor=1c1917"></a>
|
|
@@ -23,21 +23,21 @@ DeepSeek Harness 将模型、工具、存储、策略和界面作为插件,通
|
|
|
23
23
|
|
|
24
24
|
## 二、快速开始
|
|
25
25
|
|
|
26
|
-
需要 Node `^22.19 || >=24` 和预览版 `dsh` CLI(当前版本线:`@deepseek-ai/dsh@0.1.1-rc.2`)。未配置模型时仍可进入 TUI、查看会话和使用非模型功能;在 `/model` 中按 `a` 可管理 API key、OAuth 与设备码登录。
|
|
26
|
+
需要 Node `^22.19 || >=24` 和预览版 `dsh` CLI(当前版本线:`@deepseek-ai/dsh@0.1.1-rc.2`)。未配置模型时仍可进入 TUI、查看会话和使用非模型功能;在 `/model` 中按 `a` 可管理 API key、OAuth 与设备码登录。
|
|
27
27
|
|
|
28
28
|
### 1. 安装与更新
|
|
29
29
|
|
|
30
30
|
初次安装和更新使用同一组指令:
|
|
31
31
|
|
|
32
32
|
```sh
|
|
33
|
-
npm install -g @deepseek-ai/dsh@0.1.1-rc.2 dsh-code@1.0.
|
|
33
|
+
npm install -g @deepseek-ai/dsh@0.1.1-rc.2 dsh-code@1.0.3
|
|
34
34
|
npm install -g pnpm
|
|
35
|
-
dsh plugin --profile cli add dsh-code@1.0.
|
|
35
|
+
dsh plugin --profile cli add dsh-code@1.0.3
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
> 提示:pnpm 会忽略发布不足 24 小时的包,因此发布首日请使用精确版本 `dsh-code@1.0.
|
|
38
|
+
> 提示:pnpm 会忽略发布不足 24 小时的包,因此发布首日请使用精确版本 `dsh-code@1.0.3`;24 小时后可省略版本号。npm 安装不受此限制。
|
|
39
39
|
>
|
|
40
|
-
> 版本对齐:dsh-code 1.0.
|
|
40
|
+
> 版本对齐:dsh-code 1.0.3 面向 dsh `0.1.1-rc.2` 构建,全部 Harness 依赖均精确锁定为 `0.1.1-rc.2`。请保持全局 dsh 与 dsh-code 同步,避免宿主与插件混用候选版本。rc.2 已删除旧的 DeepSeek 配置项 `maxRequestImageBytes`。
|
|
41
41
|
|
|
42
42
|
### 2. 启动指令
|
|
43
43
|
|
|
@@ -76,8 +76,8 @@ DSH-Code 的重点是让 DSH 的 Agent、模型、工具和持久会话可以直
|
|
|
76
76
|
|
|
77
77
|
- 每个会话可以选择独立的 Agent Preset,用于组合工具、提示词、技能、上下文压缩、plan mode 和 subagent 能力
|
|
78
78
|
- 使用 `/mode` 选择 `standard`、`code`、`minimal`、`cordis` 或用户自定义 Preset
|
|
79
|
-
- 使用 `/model` 切换模型,管理 provider、API key、OAuth/设备码登录、endpoint、可用模型和上下文窗口
|
|
80
|
-
- 在 `/model` 的 provider 列表中,Enter 管理手动 API key,`l` 发起登录,`o` 经确认后退出登录
|
|
79
|
+
- 使用 `/model` 切换模型,管理 provider、API key、OAuth/设备码登录、endpoint、可用模型和上下文窗口
|
|
80
|
+
- 在 `/model` 的 provider 列表中,Enter 管理手动 API key,`l` 发起登录,`o` 经确认后退出登录
|
|
81
81
|
- 自动加载 DSH 中可用的命令与技能;使用 `/help` 查看入口,使用 `/plugin` 检查扩展状态
|
|
82
82
|
- 支持 plan、goal、todo、权限、sandbox、subagent 和运行中的补充指令
|
|
83
83
|
|
|
@@ -102,8 +102,8 @@ DSH-Code 的重点是让 DSH 的 Agent、模型、工具和持久会话可以直
|
|
|
102
102
|
|
|
103
103
|
### 4. 编码工作流
|
|
104
104
|
|
|
105
|
-
- 使用 `@` 引用工作区文件或已有会话;选择 PNG、JPEG、WebP、GIF 时会自动作为真实图片附件
|
|
106
|
-
- 支持启动 prompt、多个 `--image` 参数,以及从终端拖入一张或多张图片
|
|
105
|
+
- 使用 `@` 引用工作区文件或已有会话;选择 PNG、JPEG、WebP、GIF 时会自动作为真实图片附件
|
|
106
|
+
- 支持启动 prompt、多个 `--image` 参数,以及从终端拖入一张或多张图片
|
|
107
107
|
- 使用 `/diff` 按文件检查改动,使用 `/review` 发起只读代码审查
|
|
108
108
|
- 使用 `/copy` 复制最近一条完整回复,使用 Ctrl+O 查看完整历史和工具详情
|
|
109
109
|
- 支持工具审批、结构化提问、plan review、多选和自定义答案
|
|
@@ -142,7 +142,7 @@ dsh --profile cli --session my-id # 使用指定 id 新建会话
|
|
|
142
142
|
| 命令 | 用途 |
|
|
143
143
|
| --- | --- |
|
|
144
144
|
| `/mode [preset]` | 查看或选择当前会话的 Agent Preset |
|
|
145
|
-
| `/model` | 切换模型,管理 provider、API key、网页登录、endpoint 和可用模型 |
|
|
145
|
+
| `/model` | 切换模型,管理 provider、API key、网页登录、endpoint 和可用模型 |
|
|
146
146
|
| `/effort` | 调整当前模型的 reasoning effort |
|
|
147
147
|
| `/permission [preset]` | 查看或切换权限 Preset |
|
|
148
148
|
| `/subagent` | 选择 subagent 执行任务时使用的模型 |
|
|
@@ -164,6 +164,7 @@ dsh --profile cli --session my-id # 使用指定 id 新建会话
|
|
|
164
164
|
| --- | --- |
|
|
165
165
|
| `/plugin [query]` | 查看已加载扩展及其状态 |
|
|
166
166
|
| `/statusline` | 选择状态栏显示的项目 |
|
|
167
|
+
| `/vscode-keys` | 将 Ctrl+R 放行进 VS Code 系终端(幂等写入用户级 keybindings.json) |
|
|
167
168
|
| `/theme` | 切换终端配色主题 |
|
|
168
169
|
| `/help` | 查看快捷键、内置命令、Harness 命令和用户技能 |
|
|
169
170
|
| `/quit` | 退出 DSH-Code |
|
|
@@ -175,9 +176,9 @@ dsh --profile cli --session my-id # 使用指定 id 新建会话
|
|
|
175
176
|
| `Enter` | 提交当前输入 |
|
|
176
177
|
| `Up` / `Down` | 召回上一条或下一条输入记录 |
|
|
177
178
|
| `Tab` | 补全命令、技能或 `@` 引用 |
|
|
178
|
-
| `@` | 引用工作区文件或已有会话;图片文件自动作为附件发送 |
|
|
179
|
+
| `@` | 引用工作区文件或已有会话;图片文件自动作为附件发送 |
|
|
179
180
|
| `Ctrl+O` | 查看完整历史与工具详情 |
|
|
180
|
-
| `Ctrl+R` |
|
|
181
|
+
| `Ctrl/Alt+R` | 折叠或展开思考过程;VS Code 系终端先运行 /vscode-keys 放行 Ctrl+R |
|
|
181
182
|
| `Shift+Tab` | 循环切换权限 Preset |
|
|
182
183
|
| `Delete` | 输入框为空时,取消最新一条排队消息 |
|
|
183
184
|
| `Ctrl+K` | 删除光标到行尾的内容 |
|
|
@@ -187,6 +188,13 @@ dsh --profile cli --session my-id # 使用指定 id 新建会话
|
|
|
187
188
|
| `Ctrl+C` | 依次用于取消任务、清空输入或退出 |
|
|
188
189
|
| `Ctrl+D` | 退出 DSH-Code |
|
|
189
190
|
|
|
191
|
+
#### 状态指示
|
|
192
|
+
|
|
193
|
+
| 指示 | 触发条件 |
|
|
194
|
+
| --- | --- |
|
|
195
|
+
| `✻ Deep diving...` | 回合运行中且当前没有内容流出(等待首个输出、工具执行间隙);超过 15 秒追加计时 |
|
|
196
|
+
| `✻ Thinking…` | 模型思考内容正在流出;默认折叠为动效占位行,`Ctrl/Alt+R` 展开正文 |
|
|
197
|
+
|
|
190
198
|
## 四、DSH-Code 如何接入 DSH
|
|
191
199
|
|
|
192
200
|
### 1. 运行时组合
|