dsh-better-dsh 0.0.0-stage → 0.10.0
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 +202 -0
- package/README.md +256 -2
- package/cordis.patch.yml +132 -0
- package/docs/DEVELOPMENT.md +541 -0
- package/docs/UI-KIT.md +150 -0
- package/docs/assets/architecture-dark.svg +7 -0
- package/docs/assets/architecture-light.svg +7 -0
- package/docs/assets/hero-dark.svg +13 -0
- package/docs/assets/hero-light.svg +13 -0
- package/docs/assets/plugins-dark.svg +7 -0
- package/docs/assets/plugins-light.svg +7 -0
- package/docs/assets/quickstart-dark.svg +7 -0
- package/docs/assets/quickstart-light.svg +7 -0
- package/docs/assets/settings-dark.svg +13 -0
- package/docs/assets/settings-light.svg +13 -0
- package/package.json +89 -4
- package/presets/eng/NOTICE +3 -0
- package/presets/eng/plugins/exit-guard/index.js +99 -0
- package/presets/eng/plugins/exit-guard/package.json +7 -0
- package/presets/eng/plugins/mode-instructions/index.js +88 -0
- package/presets/eng/plugins/mode-instructions/package.json +7 -0
- package/presets/eng-ptc.patch.yml +180 -0
- package/presets/eng.patch.yml +332 -0
- package/skills/brainstorming/SKILL.md +90 -0
- package/skills/brainstorming/spec-document-reviewer-prompt.md +50 -0
- package/skills/code-review/SKILL.md +90 -0
- package/skills/dev/SKILL.md +41 -0
- package/skills/diagnosing-bugs/SKILL.md +132 -0
- package/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +55 -0
- package/skills/exec/SKILL.md +78 -0
- package/skills/handoff/SKILL.md +23 -0
- package/skills/main-agent-driven-development/SKILL.md +64 -0
- package/skills/tdd/SKILL.md +34 -0
- package/skills/tdd/mocking.md +59 -0
- package/skills/tdd/tests.md +77 -0
- package/src/admission.js +36 -0
- package/src/client.js +843 -0
- package/src/config.js +351 -0
- package/src/dsh-home.js +38 -0
- package/src/index.js +191 -0
- package/src/migrate.js +714 -0
- package/src/owns-host.js +66 -0
- package/src/settings.js +195 -0
- package/third-party/LICENSE-MIT-dsh-standard-preset +21 -0
- package/third-party/NOTICE-mattpocock-skills +21 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,257 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/omdsh-dev/dsh-better-dsh/main/docs/assets/hero-dark.svg">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/omdsh-dev/dsh-better-dsh/main/docs/assets/hero-light.svg" width="100%" alt="Better DSH — 一个 bundle,五种能力">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
<h1 align="center">dsh-better-dsh</h1>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<strong>一个 bundle,五种能力。</strong><br>
|
|
12
|
+
DeepSeek Harness 的插件集合入口:一次安装,把五个独立插件装配进同一个 profile。
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://www.npmjs.com/package/dsh-better-dsh"><img src="https://img.shields.io/npm/v/dsh-better-dsh.svg" alt="npm 版本"></a>
|
|
17
|
+
<a href="LICENSE"><img alt="License" src="https://img.shields.io/github/license/omdsh-dev/dsh-better-dsh?color=blue"></a>
|
|
18
|
+
<a href="package.json"><img alt="Node >=24.9.0" src="https://img.shields.io/badge/node-%3E%3D24.9.0-339933?logo=node.js&logoColor=white"></a>
|
|
19
|
+
<a href="package.json"><img alt="DSH 0.2.2-rc.1" src="https://img.shields.io/badge/DSH-0.2.2--rc.1-4B32C3"></a>
|
|
20
|
+
<a href="https://github.com/omdsh-dev/dsh-better-dsh"><img alt="GitHub" src="https://img.shields.io/badge/GitHub-omdsh--dev-181717?logo=github"></a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<a href="#一分钟看懂">一分钟看懂</a> ·
|
|
25
|
+
<a href="#安装">安装</a> ·
|
|
26
|
+
<a href="#架构">架构</a> ·
|
|
27
|
+
<a href="#能力地图">能力地图</a> ·
|
|
28
|
+
<a href="#设置">设置</a> ·
|
|
29
|
+
<a href="#升级">升级</a> ·
|
|
30
|
+
<a href="#独立使用">独立使用</a> ·
|
|
31
|
+
<a href="#开发与发布">开发</a>
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
## 一分钟看懂
|
|
35
|
+
|
|
36
|
+
| | |
|
|
37
|
+
|---|---|
|
|
38
|
+
| **一次安装** | `dsh plugin add dsh-better-dsh` 之后,五个插件作为精确依赖自动安装,五行由 bundle patch 插入。 |
|
|
39
|
+
| **五个独立插件** | goal、subagent、compact、ask-user、ptc 各自有独立的 npm 包、仓库、设置页和生命周期;也可以单独安装。 |
|
|
40
|
+
| **一份设置** | Better DSH 详情页的「集成设置」聚合五个设置页;保存写回同一份 profile,不产生第二份配置。 |
|
|
41
|
+
| **一套工作流** | 流程技能、两套工程预设、长期目标、CLI 子代理、压缩与提问增强,开箱即用。 |
|
|
42
|
+
| **纯 ESM** | 零构建步骤;浏览器半边是直接加载的 closure factory。 |
|
|
43
|
+
| **Apache-2.0** | 六个仓库统一使用 Apache License 2.0。 |
|
|
44
|
+
|
|
45
|
+
## 安装
|
|
46
|
+
|
|
47
|
+
<p align="center">
|
|
48
|
+
<picture>
|
|
49
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/omdsh-dev/dsh-better-dsh/main/docs/assets/quickstart-dark.svg">
|
|
50
|
+
<img src="https://raw.githubusercontent.com/omdsh-dev/dsh-better-dsh/main/docs/assets/quickstart-light.svg" width="100%" alt="安装 Better DSH 的四个步骤">
|
|
51
|
+
</picture>
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
需要 Node.js `>=24.9.0`;验收基线是 DSH `0.2.2-rc.1`。
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
# npm
|
|
58
|
+
dsh plugin --profile <profile> add dsh-better-dsh@0.10.0
|
|
59
|
+
|
|
60
|
+
# 或从 GitHub tag 安装
|
|
61
|
+
dsh plugin --profile <profile> add github:omdsh-dev/dsh-better-dsh#v0.10.0
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
> 安装、升级或换包后必须**重启对应 profile**;只刷新网页不够。
|
|
65
|
+
>
|
|
66
|
+
> 不要同时显式添加 Better DSH 和独立插件 bundle:行实例仍只有一个,但 DSH 0.2.2-rc.1 会把同一 id 的配置写入拒绝为只读。只保留一个显式入口。
|
|
67
|
+
|
|
68
|
+
本轮版本:**Better DSH `0.10.0`**,搭配 goal `0.4.1`、subagent `0.5.0`、compact `0.3.1`、ask-user `0.3.1`、ptc `0.2.0`。
|
|
69
|
+
|
|
70
|
+
## 架构
|
|
71
|
+
|
|
72
|
+
<p align="center">
|
|
73
|
+
<picture>
|
|
74
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/omdsh-dev/dsh-better-dsh/main/docs/assets/architecture-dark.svg">
|
|
75
|
+
<img src="https://raw.githubusercontent.com/omdsh-dev/dsh-better-dsh/main/docs/assets/architecture-light.svg" width="100%" alt="Better DSH 架构:一次安装,五条稳定行">
|
|
76
|
+
</picture>
|
|
77
|
+
</p>
|
|
78
|
+
|
|
79
|
+
Better DSH 只做三件事:
|
|
80
|
+
|
|
81
|
+
1. **装配**:把五个插件的稳定行插入当前 profile;
|
|
82
|
+
2. **收口**:提供流程技能、两套工程预设、后台任务退出守卫;
|
|
83
|
+
3. **迁移**:把旧 Apollo 配置幂等地补进新的插件行。
|
|
84
|
+
|
|
85
|
+
每个插件仍然是独立包:自己的 npm 名、自己的行 id、自己的设置页、自己的生命周期。Better DSH 不复制它们的实现,也不产生第二份配置。
|
|
86
|
+
|
|
87
|
+
<details>
|
|
88
|
+
<summary><strong>五条稳定行与包名</strong></summary>
|
|
89
|
+
|
|
90
|
+
| 行 id | npm 包 | 拥有什么 |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| `apollo-skills` | `dsh-better-dsh` | 流程技能、工程预设、后台 job 守卫、旧配置迁移 |
|
|
93
|
+
| `dsh-better-goal` | `dsh-better-goal` | 长期目标、暂停、轮数策略 |
|
|
94
|
+
| `dsh-better-subagent` | `@oh-my-dsh/dsh-better-subagent` | CLI 子代理、`wait_subagent`、运行中子代理守卫、模型分档 |
|
|
95
|
+
| `dsh-better-compact` | `dsh-better-compact` | native / goal / handoff 压缩、预算、摘要路由、诊断 |
|
|
96
|
+
| `dsh-better-ask-user` | `dsh-better-ask-user` | 提问等待、输入续期、Markdown/移动端卡片、超时 |
|
|
97
|
+
| `dsh-better-ptc` | `dsh-better-ptc` | ask-user 与 subagent 共享的 PTC deadline 豁免单例 |
|
|
98
|
+
|
|
99
|
+
Better DSH 的 bundle patch 直接声明这些行;DSH 不会自动应用传递依赖的 bundle patch,所以需要在这里重复同一组稳定行。行 id 与设置命名空间保持不变,改名不会破坏旧 profile。
|
|
100
|
+
</details>
|
|
101
|
+
|
|
102
|
+
## 能力地图
|
|
103
|
+
|
|
104
|
+
<p align="center">
|
|
105
|
+
<picture>
|
|
106
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/omdsh-dev/dsh-better-dsh/main/docs/assets/plugins-dark.svg">
|
|
107
|
+
<img src="https://raw.githubusercontent.com/omdsh-dev/dsh-better-dsh/main/docs/assets/plugins-light.svg" width="100%" alt="Better DSH 能力地图">
|
|
108
|
+
</picture>
|
|
109
|
+
</p>
|
|
110
|
+
|
|
111
|
+
- **[dsh-better-goal](https://github.com/omdsh-dev/dsh-better-goal)**:长期目标、暂停与轮数策略;
|
|
112
|
+
- **[dsh-better-subagent](https://github.com/omdsh-dev/dsh-better-subagent)**(`@oh-my-dsh/dsh-better-subagent`):Codex / Claude 可续接 CLI 子代理、`wait_subagent`、运行中子代理守卫、模型分档;
|
|
113
|
+
- **[dsh-better-compact](https://github.com/omdsh-dev/dsh-better-compact)**:native / goal / file-handoff 三种压缩模式与只读诊断;
|
|
114
|
+
- **[dsh-better-ask-user](https://github.com/omdsh-dev/dsh-better-ask-user)**:提问等待、输入续期、Markdown/移动端卡片、超时行为;
|
|
115
|
+
- **[dsh-better-ptc](https://github.com/omdsh-dev/dsh-better-ptc)**:ask-user 与 subagent 共享的 PTC deadline 豁免单例。
|
|
116
|
+
|
|
117
|
+
<details>
|
|
118
|
+
<summary><strong>流程技能</strong></summary>
|
|
119
|
+
|
|
120
|
+
| 技能 | 用途 |
|
|
121
|
+
|---|---|
|
|
122
|
+
| `/brainstorming` | 把大型需求设计为获批的主 Spec 与子 Spec |
|
|
123
|
+
| `/exec` | 按依赖分波:worktree → 并行子代理实现 → 审查 → 验证与合并 |
|
|
124
|
+
| `/dev` | 实现与审查节点的 prompt、报告结构与失败契约 |
|
|
125
|
+
| `/main-agent-driven-development` | 实现一个边界明确的单个任务 |
|
|
126
|
+
| `/tdd` | 测试先行、红绿循环、测试边界与反模式 |
|
|
127
|
+
| `/diagnosing-bugs` | 先建立反馈循环,再定位和修复根因 |
|
|
128
|
+
| `/code-review` | 并行检查仓库标准与原始需求,并排报告 |
|
|
129
|
+
| `/handoff` | 把当前上下文整理为交接文档;仅由用户手动触发 |
|
|
130
|
+
|
|
131
|
+
技能需要在所选预设中挂载 DSH 的技能工具;两套工程预设已挂载。
|
|
132
|
+
</details>
|
|
133
|
+
|
|
134
|
+
<details>
|
|
135
|
+
<summary><strong>两套工程预设</strong></summary>
|
|
136
|
+
|
|
137
|
+
| 预设(ID) | 适合 | 关键差异 |
|
|
138
|
+
|---|---|---|
|
|
139
|
+
| 工程模式(旧版,不建议使用)— `eng` | 编码 / 基础设施任务 | 原生工具调用;保留 workflow 工具 |
|
|
140
|
+
| 工程(PTC)模式 — `eng-ptc` | 多步、循环、需要过滤汇总的任务 | 工具经 `run_code` 的 TypeScript SDK 调用;与官方 PTC 模式一致不提供 workflow |
|
|
141
|
+
|
|
142
|
+
两套预设共用 Better DSH 的通用工程纪律(KISS、证据先行、修复根因、防过度设计与过度防御、权限与依赖边界、命令与进程纪律)。**委派规则与模型分档不在 Better DSH**:由 better-subagent 在 `agent/created` 时按预设与活配置注册自己的 prompt section。完整组装结果见 [prompts/eng.md](prompts/eng.md) 与 [prompts/eng-ptc.md](prompts/eng-ptc.md)。
|
|
143
|
+
|
|
144
|
+
在 PTC 模式里,`wait_subagent` / `ask_user_question` / `exit_plan_mode` 的等待不消耗 `run_code` 的 elapsed budget;普通嵌套工具仍按原预算计时。单例 `dsh-better-ptc` 行自身注册 `exit_plan_mode`,ask-user 与 subagent 各自注册另外两个工具。**计划审批无限期等待、不自动批准、不受普通提问超时/默认选择影响**;外层取消、会话中断及卸载仍有效。
|
|
145
|
+
</details>
|
|
146
|
+
|
|
147
|
+
## 设置
|
|
148
|
+
|
|
149
|
+
<p align="center">
|
|
150
|
+
<picture>
|
|
151
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/omdsh-dev/dsh-better-dsh/main/docs/assets/settings-dark.svg">
|
|
152
|
+
<img src="https://raw.githubusercontent.com/omdsh-dev/dsh-better-dsh/main/docs/assets/settings-light.svg" width="100%" alt="Better DSH 集成设置">
|
|
153
|
+
</picture>
|
|
154
|
+
</p>
|
|
155
|
+
|
|
156
|
+
Better DSH 包详情里的「集成设置」按 Core、Subagents、Compaction、Goals、Questions 组织。切换页面保留草稿,保存后订阅宿主新值与 revision;每个区复用独立插件自己的配置组件。
|
|
157
|
+
|
|
158
|
+
- **保存即生效**:`exitGuard`、子代理行、增强 goal 轮数策略这类 volatile 字段不需要重挂。
|
|
159
|
+
- **需要重载**:goal 实现选择、原生参数、compact 引擎快照、安装 / 升级 / 换包。界面会明确标注。
|
|
160
|
+
- **只保留一个入口**:同时显式添加 Better DSH 与独立 bundle 会让同一 id 的行配置变为只读。
|
|
161
|
+
|
|
162
|
+
<details>
|
|
163
|
+
<summary><strong>五行设置与生效方式</strong></summary>
|
|
164
|
+
|
|
165
|
+
| 行 | 所属包 | 主要设置 | 生效 |
|
|
166
|
+
|---|---|---|---|
|
|
167
|
+
| `apollo-skills` | Better DSH | `exitGuard`(只拦运行中后台 job)、`declareOwnsHost` | volatile 保存;`declareOwnsHost` 装配时读取,需重载 profile |
|
|
168
|
+
| `dsh-better-subagent` | better-subagent | `childExitGuard`、`tiers.*`、两个 CLI 后端、`subagents.eng/global`、`trustedHosts` | volatile,保存即生效 |
|
|
169
|
+
| `dsh-better-compact` | better-compact | 模式、auto、阈值/headroom/保留、摘要模型、重试、模型规则 | volatile 保存;引擎快照需重载 profile |
|
|
170
|
+
| `dsh-better-goal` | goal | 实现选择(增强/原生)、轮数策略、原生参数 | 轮数策略保存即生效;实现与原生参数需重载 profile |
|
|
171
|
+
| `dsh-better-ask-user` | ask-user | 等待时长、输入续期、普通/Goal 超时行为 | volatile,保存即生效;旧 goal 值一次性迁移 |
|
|
172
|
+
|
|
173
|
+
运行中子代理的拦截与 Better DSH 的后台 job 守卫是**两个独立开关**;任意一个关闭都不影响原生工具。原生 `subagent` / `subagent_fork` / `send_message` / `interrupt_agent` 注册表不变。
|
|
174
|
+
</details>
|
|
175
|
+
|
|
176
|
+
## 升级
|
|
177
|
+
|
|
178
|
+
> 本轮从 Apollo `0.9.0` 升级到 Better DSH `0.10.0`:包名、部分设置键和依赖名变化;旧 profile 的配置由幂等迁移补齐,不删除旧值。
|
|
179
|
+
|
|
180
|
+
```sh
|
|
181
|
+
# 旧入口
|
|
182
|
+
dsh plugin --profile <profile> remove @menghuan1918/dsh-apollo
|
|
183
|
+
# 新入口
|
|
184
|
+
dsh plugin --profile <profile> add dsh-better-dsh@0.10.0
|
|
185
|
+
# subagent 独立安装的用户
|
|
186
|
+
dsh plugin --profile <profile> remove @menghuan1918/dsh-better-subagent
|
|
187
|
+
dsh plugin --profile <profile> add @oh-my-dsh/dsh-better-subagent@0.5.0
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
<details>
|
|
191
|
+
<summary><strong>迁移规则与旧配置兼容</strong></summary>
|
|
192
|
+
|
|
193
|
+
0.6.0 把提问等待从 better-goal 移到独立的 dsh-better-ask-user,并把 PTC deadline 豁免移到共享 dsh-better-ptc;better-goal 的旧 `questionTimeoutSeconds` 仍可读取,ask-user 行会做一次性迁移。旧 profile 不需要手工重填配置:Better DSH 启动后在 settings/loader 可用时运行一次**幂等迁移**([src/migrate.js](src/migrate.js))。
|
|
194
|
+
|
|
195
|
+
- **目标行已有的显式用户值优先**;迁移只补缺失字段,不覆盖你在新设置页里改过的值。显式 `false` / `0` / `""` / `[]` 都是值。
|
|
196
|
+
- 旧 `exitGuard` 的初值同时复制到 better-subagent 的 `childExitGuard`;Better DSH 自己的 `exitGuard` 继续作为后台 job/通用守卫开关,之后两者可独立配置。
|
|
197
|
+
- 旧原生 `compaction-basic` 的显式配置补进 better-compact;目标缺失的模式采用默认 `goal`。
|
|
198
|
+
- `trustedHosts` 经宿主 configEditor 写到目标行 raw config,不绕过字段限制。
|
|
199
|
+
- 迁移**不删除**旧配置、不复制 CLI 身份 KV、不复制 goal 状态;写入后重读验证,失败/目标行尚不可写时明确报告“待迁移/需重载”。
|
|
200
|
+
- 旧 `apollo-skills` 行里的 `tiers` / `subagents` / `trustedHosts` 降级为 deprecated、运行时无效,只为装载旧 profile 与迁移保留。
|
|
201
|
+
|
|
202
|
+
升级后重启 profile;迁移写入的压缩设置需要再重载一次才会被运行中的引擎采用。
|
|
203
|
+
</details>
|
|
204
|
+
|
|
205
|
+
## 独立使用
|
|
206
|
+
|
|
207
|
+
五个插件都可以单独安装;独立安装和 Better DSH 组合使用的是**同一组稳定行**。
|
|
208
|
+
|
|
209
|
+
```sh
|
|
210
|
+
dsh plugin --profile <profile> add dsh-better-goal@0.4.1
|
|
211
|
+
dsh plugin --profile <profile> add @oh-my-dsh/dsh-better-subagent@0.5.0
|
|
212
|
+
dsh plugin --profile <profile> add dsh-better-compact@0.3.1
|
|
213
|
+
dsh plugin --profile <profile> add dsh-better-ask-user@0.3.1 dsh-better-ptc@0.2.0
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
<details>
|
|
217
|
+
<summary><strong>组合安装、只读限制与回退</strong></summary>
|
|
218
|
+
|
|
219
|
+
| 组合 | 结果 |
|
|
220
|
+
|---|---|
|
|
221
|
+
| 只有 Better DSH | 插入 goal / subagent / compact companion+engine / ask-user / ptc 行;工程预设内带 compact engine |
|
|
222
|
+
| 只有独立 bundle | 各自插入同样的行;没有 Better DSH 的工程预设、技能或 job 守卫 |
|
|
223
|
+
| Better DSH + 独立 bundle 同时显式选中 | Loader 仍按行 id 只激活一行实例,但 DSH 0.2.2-rc.1 会拒绝为同一 id 写入配置:行可读、配置只读 |
|
|
224
|
+
|
|
225
|
+
恢复方法:**只保留一个显式入口**,然后重启 profile。不要为了“多一层保险”同时安装两套入口。
|
|
226
|
+
|
|
227
|
+
- 移除独立 bundle **不会**移除 Better DSH 仍然装配的同一稳定行;反之亦然。按“有效 row 的来源”判断,而不是 bundle 名。
|
|
228
|
+
- 彻底移除压缩增强:从组合中移除 Better DSH,或把预设/组合改回原生压缩。只禁用独立 compact bundle 不会恢复 Better DSH 预设内的 engine 行。
|
|
229
|
+
</details>
|
|
230
|
+
|
|
231
|
+
## 开发与发布
|
|
232
|
+
|
|
233
|
+
- 开发文档:[docs/DEVELOPMENT.md](docs/DEVELOPMENT.md)
|
|
234
|
+
- UI kit:[docs/UI-KIT.md](docs/UI-KIT.md)
|
|
235
|
+
- API / 迁移实现:[src/](src/)
|
|
236
|
+
- 测试:`npm test`;运行时冒烟:`npm run smoke`
|
|
237
|
+
|
|
238
|
+
<details>
|
|
239
|
+
<summary><strong>提示词归属、Specs 与发布顺序</strong></summary>
|
|
240
|
+
|
|
241
|
+
**提示词归属**:工程纪律由 Better DSH 提供;委派规则、模型分档和子代理提示词由 better-subagent 在 `agent/created` 时注册;目标与提问提示词由对应插件拥有。Better DSH 不重复生成子插件已经拥有的 prompt section。
|
|
242
|
+
|
|
243
|
+
**发布顺序**:先发布独立包,再发布 Better DSH(精确依赖必须已存在):
|
|
244
|
+
|
|
245
|
+
1. `dsh-better-ptc@0.2.0`(不变)
|
|
246
|
+
2. `dsh-better-ask-user@0.3.1`
|
|
247
|
+
3. `dsh-better-compact@0.3.1`
|
|
248
|
+
4. `dsh-better-goal@0.4.1`
|
|
249
|
+
5. `@oh-my-dsh/dsh-better-subagent@0.5.0`
|
|
250
|
+
6. `dsh-better-dsh@0.10.0`
|
|
251
|
+
|
|
252
|
+
各仓库使用 npm trusted publishing(OIDC);创建对应 GitHub Release 会发布 tag 指向的版本。旧包 `@menghuan1918/dsh-apollo` 与 `@menghuan1918/dsh-better-subagent` 已标记 deprecate,仅作为历史入口保留。
|
|
253
|
+
</details>
|
|
254
|
+
|
|
255
|
+
## 许可
|
|
256
|
+
|
|
257
|
+
[Apache License 2.0](LICENSE)。Better DSH 与五个附属插件仓库统一使用 Apache-2.0。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# dsh-apollo bundle patch: inserts the host-plane rows this package needs into
|
|
2
|
+
# the profile roster. Applied as a profile bundle layer (the first entry of the
|
|
3
|
+
# `dsh.bundle.patch` array in package.json — the eng/eng-ptc preset patches in
|
|
4
|
+
# presets/ load after it); activate with
|
|
5
|
+
# `dsh plugin --profile <name> add dsh-better-dsh`.
|
|
6
|
+
#
|
|
7
|
+
# Apollo 0.6.0 is an integration bundle. The subagent, compaction, question-wait
|
|
8
|
+
# and PTC-exemption features are owned by independent plugins, and Apollo
|
|
9
|
+
# repeats their *same stable rows* here because DSH does not auto-apply a
|
|
10
|
+
# transitive dependency's bundle patch (`dsh plugin add` only selects directly
|
|
11
|
+
# installed bundles):
|
|
12
|
+
#
|
|
13
|
+
# - `@oh-my-dsh/dsh-better-subagent` owns the Codex/Claude CLI subagents,
|
|
14
|
+
# `wait_subagent`, the running-child exit guard, the subagent settings page
|
|
15
|
+
# and every subagent-specific prompt section;
|
|
16
|
+
# - `dsh-better-compact` (host companion) + `dsh-better-compact/engine`
|
|
17
|
+
# (engine row) own compaction; the native host-plane `compaction-basic` is
|
|
18
|
+
# disabled here exactly like the standalone bundle, and the eng/eng-ptc
|
|
19
|
+
# presets carry the engine row inside their own compaction realm;
|
|
20
|
+
# - `dsh-better-goal` keeps owning the goal domain;
|
|
21
|
+
# - `dsh-better-ask-user` owns the question wait, input extension, Web card
|
|
22
|
+
# and timeout behavior; `dsh-better-ptc` is the singleton PTC exemption
|
|
23
|
+
# service shared by the ask-user and subagent rows.
|
|
24
|
+
#
|
|
25
|
+
# Selecting both the standalone bundle and Apollo still loads one instance: the
|
|
26
|
+
# Loader keys entries by row id. The same rule makes the double-explicit-bundle
|
|
27
|
+
# combination unaddressable in DSH 0.2.1-rc.2 (the config editor excludes
|
|
28
|
+
# duplicate ids), so prefer one explicit entry; see docs/DEVELOPMENT.md.
|
|
29
|
+
#
|
|
30
|
+
# ── goal domain: independent dsh-better-goal row ────────────────────────────
|
|
31
|
+
# The native goal service, round driver, /goal command, model-facing tool and
|
|
32
|
+
# GoalBar UI are disabled below and replaced by dsh-better-goal's own stable
|
|
33
|
+
# row. Disabling or removing the standalone dsh-better-goal bundle does NOT
|
|
34
|
+
# disable this row; goal remains available through Apollo.
|
|
35
|
+
- id: goal
|
|
36
|
+
disabled: true
|
|
37
|
+
- id: goal-round-driver
|
|
38
|
+
disabled: true
|
|
39
|
+
- id: command-goal
|
|
40
|
+
disabled: true
|
|
41
|
+
- id: tool-goal
|
|
42
|
+
disabled: true
|
|
43
|
+
- id: ui-goal
|
|
44
|
+
disabled: true
|
|
45
|
+
|
|
46
|
+
- insert:
|
|
47
|
+
- id: dsh-better-goal
|
|
48
|
+
name: dsh-better-goal
|
|
49
|
+
|
|
50
|
+
# ── compaction: independent dsh-better-compact rows ─────────────────────────
|
|
51
|
+
# Same stable rows/ids as the standalone bundle. `compaction-basic` is the
|
|
52
|
+
# native host-plane default; Web compositions already disable it and mount
|
|
53
|
+
# compaction inside each preset, while headless compositions keep this
|
|
54
|
+
# disabled row so exactly one compaction service exists. The host-plane engine
|
|
55
|
+
# detects a preset-owned engine and stays out of the way.
|
|
56
|
+
- id: compaction-basic
|
|
57
|
+
disabled: true
|
|
58
|
+
|
|
59
|
+
- insert:
|
|
60
|
+
- id: dsh-better-compact
|
|
61
|
+
name: dsh-better-compact
|
|
62
|
+
|
|
63
|
+
- id: dsh-better-compact-engine
|
|
64
|
+
name: dsh-better-compact/engine
|
|
65
|
+
|
|
66
|
+
# ── subagent enhancement: independent dsh-better-subagent row ───────────────
|
|
67
|
+
# One host-plane row owns the CLI adapters/routing bridge, the `wait_subagent`
|
|
68
|
+
# tool, the running-child exit guard, `/better-subagent/api/*` (+ the
|
|
69
|
+
# `/apollo/api/*` read aliases) and the subagent prompt sections. It does not
|
|
70
|
+
# replace the native subagent registry: create/fork/message/interrupt still
|
|
71
|
+
# come from the host tools.
|
|
72
|
+
- insert:
|
|
73
|
+
- id: dsh-better-subagent
|
|
74
|
+
name: '@oh-my-dsh/dsh-better-subagent'
|
|
75
|
+
|
|
76
|
+
# ── question wait + PTC exemption: independent rows ─────────────────────────
|
|
77
|
+
# The official Web card is disabled by the ask-user bundle; repeat the disable
|
|
78
|
+
# and the two stable rows here for the same transitive-dependency reason.
|
|
79
|
+
# dsh-better-ptc is a singleton: ask-user and better-subagent both insert the
|
|
80
|
+
# same row id, and the Loader keeps one service and one runtime wrapper.
|
|
81
|
+
- id: ui-user-questions
|
|
82
|
+
disabled: true
|
|
83
|
+
|
|
84
|
+
- insert:
|
|
85
|
+
- id: dsh-better-ptc
|
|
86
|
+
name: dsh-better-ptc
|
|
87
|
+
|
|
88
|
+
- id: dsh-better-ask-user
|
|
89
|
+
name: dsh-better-ask-user
|
|
90
|
+
|
|
91
|
+
# ── Apollo host row ─────────────────────────────────────────────────────────
|
|
92
|
+
# The apollo-skills row is one row on purpose. The row's module specifier must
|
|
93
|
+
# be this package's npm name (`dsh-better-dsh`), not a short alias,
|
|
94
|
+
# because the browser half (`dsh.client` → exports "./client") is discovered
|
|
95
|
+
# from the row's package manifest: `dsh-client-modules` accepts a bare or
|
|
96
|
+
# two-segment scoped specifier, resolves the row to its manifest, and requires
|
|
97
|
+
# that manifest's `name` to match the row exactly. A row named `dsh-apollo`
|
|
98
|
+
# would resolve host code only if an alias existed, then silently lose the
|
|
99
|
+
# client half (the manifest name no longer matches). The page-side closure id
|
|
100
|
+
# is the manifest package name too. It rejects a second active row resolving to
|
|
101
|
+
# the same package name ("resolves from multiple active Loader sources").
|
|
102
|
+
#
|
|
103
|
+
# Apollo 0.5.0 keeps only the responsibilities that were not migrated:
|
|
104
|
+
# 1. the packaged skills/ tree on the skill registry's global layer;
|
|
105
|
+
# 2. the formal row Config (src/config.js) with its minimal browser page —
|
|
106
|
+
# the background-job `exitGuard` switch and the `declareOwnsHost`
|
|
107
|
+
# deployment flag, plus deprecated load-only fields kept so old profiles
|
|
108
|
+
# load during migration;
|
|
109
|
+
# 3. the one-time legacy `exitGuard` import and the one-time old-config
|
|
110
|
+
# migration into dsh-better-subagent / dsh-better-compact (src/migrate.js);
|
|
111
|
+
# 4. the `declareOwnsHost` index tap.
|
|
112
|
+
# The PTC deadline exemption is now owned by the independent dsh-better-ptc
|
|
113
|
+
# singleton row, not this package.
|
|
114
|
+
# It no longer registers `/apollo/api/*` (dsh-better-subagent owns those read
|
|
115
|
+
# aliases) and no longer implements CLI protocols, subagent routing, the wait
|
|
116
|
+
# tool, tier/delegation prompt generation or the child exit guard.
|
|
117
|
+
#
|
|
118
|
+
# Row config — two classes of fields (details in README, section 设置与权限):
|
|
119
|
+
# - volatile, editable from the Web form: `exitGuard` (background jobs only)
|
|
120
|
+
# and the deprecated `tiers.*` / `subagents.*` / `exitGuard`-era fields that
|
|
121
|
+
# the migration reads; every deprecated field is inert at runtime;
|
|
122
|
+
# - deployment flags, hand-written here, never edited from the Web form:
|
|
123
|
+
# `trustedHosts` (deprecated, load-only; the new plugin owns its own
|
|
124
|
+
# `trustedHosts`), `declareOwnsHost` (the boot global above; off by
|
|
125
|
+
# default, enable only behind a trusted proxy).
|
|
126
|
+
#
|
|
127
|
+
# Presets are separate bundle-patch rows (presets/eng.patch.yml,
|
|
128
|
+
# presets/eng-ptc.patch.yml): a preset is an `insert` of a
|
|
129
|
+
# `@deepseek-ai/dsh-agent-preset` row read straight from that file.
|
|
130
|
+
- insert:
|
|
131
|
+
- id: apollo-skills
|
|
132
|
+
name: 'dsh-better-dsh'
|