dsh-super-code 0.0.9 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -117
- package/client/index.js +233 -100
- package/lib/dsh/index.d.ts +0 -1
- package/lib/dsh/index.d.ts.map +1 -1
- package/lib/dsh/index.js +3 -0
- package/lib/dsh/index.js.map +1 -1
- package/lib/dsh/preset-installation.d.ts +43 -0
- package/lib/dsh/preset-installation.d.ts.map +1 -0
- package/lib/dsh/preset-installation.js +193 -0
- package/lib/dsh/preset-installation.js.map +1 -0
- package/package.json +13 -15
package/README.md
CHANGED
|
@@ -1,162 +1,110 @@
|
|
|
1
1
|
# dsh-super-code
|
|
2
2
|
|
|
3
|
-
DeepSeek Harness
|
|
3
|
+
一个更快、更节省、更准确的 DeepSeek Harness 编码插件。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
在选定的 SWE-bench Pro hard-100 评测中,平均耗时减少约 36%,每题输入 token 减少约 17%,正确率提高 5 个百分点。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
A faster, more accurate, and more cost-effective DeepSeek Harness plug-in component.
|
|
8
8
|
|
|
9
|
-
SWE-bench
|
|
9
|
+
On the selected SWE-bench Pro hard-100 evaluation, average elapsed time decreased by about 36%, input tokens per task by about 17%, and accuracy increased by 5 percentage points.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|---|---:|---:|
|
|
13
|
-
| 正确率 | 99% | 99% |
|
|
14
|
-
| 平均总 token | 737,421 | 419,145(-43%) |
|
|
15
|
-
| 平均耗时 | 314 秒 | 89 秒(-72%) |
|
|
11
|
+
## 介绍 · Introduction
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
`dsh-super-code` 是 DeepSeek Harness 的编码插件,提供一个可直接使用的 `super-code` Agent 预设。
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
`dsh-super-code` is a coding plugin for DeepSeek Harness with one ready-to-use `super-code` Agent preset.
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
它会根据任务选择调研、设计、开发、验证和优化方法,简单任务直接完成,复杂任务按需组织工作。
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
dsh plugin --profile web add dsh-super-code
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
插件注册唯一的 `super-code` preset 并设为默认;宿主自带和用户自定义 preset 仍可用。插件不再增加预设切换控件;宿主原生预设入口及已开始会话的组合不可变规则保持不变。
|
|
28
|
-
|
|
29
|
-
项目与 npm 包统一命名为 `dsh-super-code`,源码仓库为 [ArtlexYoung/dsh-super-code](https://github.com/ArtlexYoung/dsh-super-code)。本地改名不代表新包已发布到 npm。已有安装需更新包引用和 preset 根目录路径;新任务档案使用新包名标识,仍可读取更名前的档案。0.0.9 移除旧 `SuperAgent*` / `ctx.superAgent` API、旧模型池设置及 `core/*` 通配出口,不提供兼容包装;历史 runner 使用冻结旧包。已保存档案的读取、`superAgentUsage` 用量字段与侧栏资源协议仍保持原值,避免丢失已有记录。
|
|
30
|
-
|
|
31
|
-
```json
|
|
32
|
-
{ "request": { "agentPreset": "super-code" } }
|
|
33
|
-
```
|
|
19
|
+
It selects research, design, development, verification, and optimization methods as needed for each task.
|
|
34
20
|
|
|
35
|
-
|
|
21
|
+
## 在 DeepSeek Harness 中安装 · Installation
|
|
36
22
|
|
|
37
|
-
|
|
23
|
+
要求 DeepSeek Harness 0.1.5-rc.1 或更高版本。
|
|
38
24
|
|
|
39
|
-
|
|
40
|
-
| --- | --- | --- |
|
|
41
|
-
| research 调研 | 有证据的事实、诊断、技术判断 | 调查、集成 |
|
|
42
|
-
| design 设计 | 可实施的产品、接口、算法或架构方案 | 产品、架构、算法 |
|
|
43
|
-
| develop 开发 | 功能、修复、重构、迁移、集成 | 产品、bug 修复、架构、集成 |
|
|
44
|
-
| verify 测试 | 测试、审查发现、验收证据 | 测试、集成 |
|
|
45
|
-
| optimize 优化 | 有测量依据的改进 | 性能、算法、架构、质量 |
|
|
25
|
+
Requires DeepSeek Harness 0.1.5-rc.1 or later.
|
|
46
26
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
按需加载优化的是全任务成本,不是单次文本长度:已知方法可直接读取,无需先查询团队目录;专项返回仅保留交付目标和完整方法。上下文已包含有效指导、任务状态或执行结果时不重复取回,独立读取尽量同批;缺失、过期或存疑的信息仍需检查。工具调用不等于模型请求,但额外往返通常会再次计入输入上下文和输出,缓存部分也依供应商计费。实际收益应比较全部请求的累计费用、次数及延迟,不能用少几百字符代替效果评测。
|
|
50
|
-
|
|
51
|
-
只解释或设计不授权改代码。独立、有收益的工作可用宿主 subagent 并行执行;共享文件需要单一写入者或隔离工作区。成员只在范围相关、上下文仍有效时复用;短简报明确目标、所有权、约束、验收和预算,负责人继续本地工作并整合结果。交付简要说明产物、实际执行的检查和剩余缺口,不强制回答模板。这些是指导要求,不是新增调度或自动验收机制。
|
|
52
|
-
|
|
53
|
-
### 可选的具体指导
|
|
54
|
-
|
|
55
|
-
默认使用标准指导。不按模型名字猜测强弱,不自动切换模型。部署方可在 preset 的 `super-code` 插件配置中显式指定需要更具体提醒的精确路由:
|
|
56
|
-
|
|
57
|
-
```yaml
|
|
58
|
-
guidedRoutes:
|
|
59
|
-
- provider: your-provider
|
|
60
|
-
model: your-exact-model
|
|
27
|
+
```bash
|
|
28
|
+
dsh plugin --profile web add dsh-super-code
|
|
61
29
|
```
|
|
62
30
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## 长对话与任务档案
|
|
31
|
+
安装后在 Harness 的 “设置”-“Agent 预设” 中选择 `super-code`,模型、权限和工具继续使用 Harness 的配置。
|
|
66
32
|
|
|
67
|
-
`
|
|
33
|
+
After installation, select `super-code` in "Settings" - "Agent Presets" in Harness; models, permissions, and tools use the Harness configuration.
|
|
68
34
|
|
|
69
|
-
|
|
35
|
+
若安装后找不到预设,插件会在首次加载时尝试安装一份用户预设。也可打开“设置”→“插件”→“插件配置”中的 **Super Code** 查看状态并手动安装;名称冲突时换个名称即可,已有预设不会被覆盖。用户副本不会自动更新,删除后也不会在重启时自动重装。
|
|
70
36
|
|
|
71
|
-
-
|
|
72
|
-
- `source`:通过用户事件序号取回原文。动态上下文包含任务目录、最近用户事件序号和焦点任务的紧凑视图:保留全部要求、验收、决策和来源序号,不重复原文;最多展示最近 3 条有效证据,预算不足时优先省略证据并标明数量,可通过 `read(view: full)` 读取完整档案。硬约束不静默截断,必需字段超预算的更新会明确失败。
|
|
73
|
-
- `archive/archives/history/restore`:完成或取消的任务可归档;每页最多扫描 4,096 个事件、返回 10 个归档摘要,每 256 条让出执行并检查取消。稀疏历史在工具内部继续查找,达到上限返回 `nextBeforeSeq` 和 `done`;`done: false` 不能解释成没有记录。历史全文留在宿主日志。用户要求继续时,恢复工具要求新的用户来源和检查后的代码版本;保留约束、清空旧决策并让旧证据失效,不自动启动工作。
|
|
74
|
-
- `delegate/validate_member`:简报绑定会话、任务身份、要求版本、代码版本和成员责任。过期、失败、取消或未确认停止的返回不可评审。`reviewable` 只表示可以交给负责人核对,不等于已验收。成员无须猜测费用:缺失费用返回 `accounting.kind: unavailable`;可选自报费用标为 `model-reported`,预算结论仍为 `unknown`,不会被当作宿主认证或硬预算执行。
|
|
75
|
-
- `evidence`:已有引用时传 `record:{callSeq,resultSeq}` 或 `{ref}`,两次索引读取回查本会话配对记录。长输出默认保留首尾并明确省略中间,最多 8,000 个 UTF-16 单元;短输出完整返回,参数预览最多 2,000 单元。需要原始输出时使用返回的 `readMore`,或 `record:{ref,offset:0}` 连续分页;偏移由工具返回,不需要猜测,原始日志不变。此处“完整”只指已记录文本,不保证原工具未截断或执行了全部测试。不知道序号时省略 `record`,按需列出最多 12 条调用/返回身份;参数预览最多 240 单元并标明截断,按 `callId/turn/step` 配对并检查参数。目录每页最多扫描 4,096 条、每 256 条让出执行;通过 `eventSeq: nextBeforeSeq` 继续。跨会话、缺失或不匹配引用不可用;不执行命令、不维护新账本,工具返回不等于测试通过或当前代码已验证。
|
|
37
|
+
If the preset is missing, the plugin attempts a one-time user-preset installation on first load. Open **Super Code** under “Settings” → “Plugins” → “Plugin configuration” to check its status or install manually. Choose another name if it is taken. Existing presets are preserved; user copies are not automatically updated or reinstalled after deletion.
|
|
76
38
|
|
|
77
|
-
|
|
39
|
+
[版本记录 · Changelog](docs/CHANGELOG.md)
|
|
78
40
|
|
|
79
|
-
|
|
41
|
+
[](docs/images/preset-settings.png)
|
|
80
42
|
|
|
81
|
-
|
|
43
|
+
当前版本不使用三模型池,也不需要单独配置插件模型。在 Harness“设置”→“模型”中配置提供方,再从对话输入框下方选择模型和推理等级;已有可用配置时直接沿用。插件跟随当前会话的模型,子 Agent 在未单独覆盖时继承父 Agent 的选择。
|
|
82
44
|
|
|
83
|
-
|
|
45
|
+
The current version has no three-pool model configuration. Configure a provider under Harness “Settings” → “Models”, then select the model and reasoning effort below the message input. Existing working settings can be reused. The plugin follows the current session model, and child Agents inherit their parent's selection unless explicitly overridden.
|
|
84
46
|
|
|
85
|
-
|
|
47
|
+
## 效果 · Results
|
|
86
48
|
|
|
87
|
-
|
|
49
|
+
SWE-bench Pro hard-100,使用 `deepseek-v4.1-flash`、reasoning `high`、原生 DSH Web RPC 和官方评分器。
|
|
88
50
|
|
|
89
|
-
|
|
51
|
+
SWE-bench Pro hard-100 with `deepseek-v4.1-flash`, reasoning `high`, native DSH Web RPC, and the official grader.
|
|
90
52
|
|
|
91
|
-
|
|
53
|
+
> 提示:
|
|
54
|
+
> SWE-bench Pro 是面向真实软件工程任务的高难度评测集。每道题都来自真实开源仓库,通常需要理解现有代码、修改多个文件、运行测试并根据失败结果继续修复,评测结果以官方测试是否通过为准。这里选取其中难度最高的 100 道题,重点观察长任务中的正确率、调用次数、token 和耗时。
|
|
55
|
+
>
|
|
56
|
+
> SWE-bench Pro is a challenging benchmark for real-world software engineering tasks. Each task comes from a real open-source repository and typically requires understanding existing code, editing multiple files, running tests, and iterating on failures. The official test result is the pass criterion. This evaluation uses the 100 hardest selected tasks to measure accuracy, model calls, token usage, and elapsed time on long-running tasks.
|
|
57
|
+
>
|
|
58
|
+
> 经过预评测,`DSH minimal` 预设和 `deepseek-v4.1-flash` 的 `high` 思考强度取得了最高正确率,因此将它们作为统一比较基准。
|
|
59
|
+
>
|
|
60
|
+
> In preliminary runs, the `DSH minimal` preset with `deepseek-v4.1-flash` at `high` reasoning achieved the highest accuracy, so it is used as the common baseline.
|
|
92
61
|
|
|
93
|
-
|
|
62
|
+
这批结果来自 `0.0.9` 候选;`0.1.0` 沿用该历史基准,未重新执行完整 100 题评测。
|
|
94
63
|
|
|
95
|
-
|
|
64
|
+
These results are from the `0.0.9` candidate. Version `0.1.0` retains this historical benchmark; the full 100-task evaluation has not been rerun for this release.
|
|
96
65
|
|
|
97
|
-
|
|
66
|
+
| 指标 / Metric | DSH minimal | super-code 0.0.9 | 优化幅度 / Change |
|
|
67
|
+
|---|---:|---:|---:|
|
|
68
|
+
| 有效评分 / Valid scores | 100/100 | 100/100 | **持平 / 0%** |
|
|
69
|
+
| 通过题数 / Passed | 41 | 46 | **+12.2%** |
|
|
70
|
+
| 正确率 / Accuracy | 41% | 46% | **+5 个百分点 / +5 pp** |
|
|
71
|
+
| 平均模型调用/题 / Model calls per task | 124.85 | 92.78 | **-25.7%** |
|
|
72
|
+
| 平均工具调用/题 / Tool calls per task | 126.54 | 115.41 | **-8.9%** |
|
|
73
|
+
| 每题平均总输入 token / Average total input tokens per task | 11,477,170 | 9,525,316 | **-17.0%** |
|
|
74
|
+
| 每题平均总输出 token / Average total output tokens per task | 100,877 | 97,901 | **-3.0%** |
|
|
75
|
+
| 缓存命中率 / Cache hit rate | 99.360% | 99.329% | **-0.031%** |
|
|
76
|
+
| 平均测试时长 / Average test time | 25.49 分钟 / min | 16.27 分钟 / min | **-36.2%** |
|
|
98
77
|
|
|
99
|
-
|
|
78
|
+
> 因为输入和输出 token 均有减少,因此缓存命中率略微下降是可以接受的,属于正常波动范围。
|
|
79
|
+
>
|
|
80
|
+
> Since both input and output token usage decrease, the slight drop in cache hit rate is acceptable and within normal variation.
|
|
100
81
|
|
|
101
|
-
|
|
82
|
+
> Token 指标按每道题的历史明细计算:先分别合计该题已记录模型调用的输入(含缓存)和输出 token,再对 100 道题取平均,包含多轮调用和上下文增长;未返回用量的请求不作估算,不代表完整账单费用。
|
|
83
|
+
>
|
|
84
|
+
> Token metrics are calculated from task histories: input (including cached tokens) and output tokens are summed separately across recorded model calls for each task, then averaged over 100 tasks. This includes multi-turn calls and context growth. Requests without reported usage are not estimated; these figures do not represent complete billing costs.
|
|
102
85
|
|
|
103
|
-
|
|
86
|
+
测试题号和每题明细见 [`eval/results/swebench-pro-final-100/`](eval/results/swebench-pro-final-100/),详细文档见 [`docs/`](docs/)。
|
|
104
87
|
|
|
105
|
-
|
|
88
|
+
Task IDs and per-task details are available in [`eval/results/swebench-pro-final-100/`](eval/results/swebench-pro-final-100); detailed documentation is in [`docs/`](docs/).
|
|
106
89
|
|
|
107
|
-
|
|
90
|
+
## 使用 · Usage
|
|
108
91
|
|
|
109
|
-
|
|
92
|
+
安装后,在 DeepSeek Harness 的“设置”→“Agent 预设”中选择 `super-code`。创建任务后,插件会按任务复杂度组织调研、实现和验证;复杂任务可在右侧 Agent 执行树中查看进度,点击节点查看对应的执行内容和用量。
|
|
110
93
|
|
|
111
|
-
`
|
|
94
|
+
After installation, select `super-code` under “Settings” → “Agent Presets” in DeepSeek Harness. The plugin organizes research, implementation, and verification according to task complexity; for complex tasks, use the Agent execution tree on the right to inspect progress, execution details, and usage.
|
|
112
95
|
|
|
113
|
-
|
|
96
|
+
[](docs/images/agent-tree.png)
|
|
114
97
|
|
|
115
|
-
|
|
98
|
+
截图来自全新隔离会话中的 DSH 网页版,展示 hard-100 难度排名第一题 `task-099`(`future-architect/vuls` 的 OS 生命周期预警)的初步调研:一个主 Agent 与三个子 Agent 分别核查 EOL/版本解析、告警链路和测试边界。图中保留了整个右侧栏,包括状态、用量、缓存率和缩放操作;这是协作展示,不代表该题已修复或通过评分。
|
|
116
99
|
|
|
117
|
-
|
|
118
|
-
npm run build
|
|
119
|
-
npm run eval:super-code -- manifest.json measurements.jsonl
|
|
120
|
-
# 安装后:super-code-eval manifest.json measurements.jsonl
|
|
121
|
-
```
|
|
100
|
+
Captured from a fresh, isolated DSH web session, the full sidebar shows initial investigation of the highest-ranked hard-100 task, `task-099` (`future-architect/vuls`, OS lifecycle warnings). A lead Agent and three child Agents investigate EOL/version parsing, the warning pipeline, and test boundaries. Status, usage, cache hit rate, and zoom controls are all visible. This is a collaboration example, not a claim that the task was fixed or passed grading.
|
|
122
101
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
manifest 与逐行输入类型见 `src/core/evaluation.ts` 或包内声明。必须固定任务、模型、推理、评分器、工具、资源、环境及 Harness 条件,并在运行前明确 `gates`,例如:
|
|
126
|
-
|
|
127
|
-
```json
|
|
128
|
-
{ "minAccuracyUplift": 0, "maxLostSuccesses": 0, "minCostReduction": 0.1 }
|
|
129
|
-
```
|
|
102
|
+
拖动空白处平移,滚轮或按钮缩放,点击节点在侧边栏新标签中查看详情。插件界面跟随 Harness 的中英文语言设置。
|
|
130
103
|
|
|
131
|
-
|
|
104
|
+
Drag empty space to pan, use the wheel or buttons to zoom, and click a node to open its details in a sidebar tab. The plugin follows the Harness Chinese/English language setting.
|
|
132
105
|
|
|
133
|
-
|
|
106
|
+
## 感谢 · Thanks
|
|
134
107
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
## 开发
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
npm install
|
|
141
|
-
npm run typecheck
|
|
142
|
-
npm test
|
|
143
|
-
npm run build
|
|
144
|
-
node --check client/index.js
|
|
145
|
-
npm pack --dry-run
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
设计和隔离宿主验证资料放在 `.development/`,历史数据与模型 runner 在本地 `eval/`;两者不进入 Git/npm。`provider:health` 依赖本地 `eval/runners/provider-health.mjs`。本地旧 runner 属于历史协议,不直接用于新 v3 发布判定;不要修改历史结果适配新协议。离线验收命令不启动模型。
|
|
149
|
-
|
|
150
|
-
```text
|
|
151
|
-
presets/super-code/ # 唯一产品预设
|
|
152
|
-
src/core/teams.ts # 五团队与共享方法
|
|
153
|
-
src/core/task-memory.ts # 有界工作集和要求修订
|
|
154
|
-
src/core/delegation.ts # 委派简报与结果版本核对
|
|
155
|
-
src/core/evaluation.ts # v3 版本配对与请求计费
|
|
156
|
-
src/dsh/super-code.ts # scoped 工具与动态上下文
|
|
157
|
-
src/task-memory-store.ts # 会话写屏障与持久化确认
|
|
158
|
-
src/evaluate.ts # 离线评测 CLI
|
|
159
|
-
client/index.js # 宿主 Web slots
|
|
160
|
-
```
|
|
108
|
+
感谢 DeepSeek Harness、SWE-bench Pro 及所有开源项目维护者。
|
|
161
109
|
|
|
162
|
-
|
|
110
|
+
Thanks to the DeepSeek Harness team, SWE-bench Pro contributors, and all open-source maintainers.
|