@menghuan1918/dsh-apollo 0.5.3 → 0.6.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 +23 -14
- package/cordis.patch.yml +26 -5
- package/docs/DEVELOPMENT.md +26 -18
- package/package.json +6 -4
- package/presets/eng.patch.yml +2 -1
- package/src/index.js +5 -3
package/README.md
CHANGED
|
@@ -24,13 +24,15 @@
|
|
|
24
24
|
|
|
25
25
|
## 这是什么
|
|
26
26
|
|
|
27
|
-
Apollo 是 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH
|
|
27
|
+
Apollo 是 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)的**插件集合入口**:安装一次,同时得到流程技能、两套工程预设,并把五个各自独立发布、可单独使用的插件装配进同一个 profile:
|
|
28
28
|
|
|
29
|
-
- **[`dsh-better-goal`](https://github.com/Menghuan1918/dsh-better-goal)
|
|
29
|
+
- **[`dsh-better-goal`](https://github.com/Menghuan1918/dsh-better-goal)**:长期目标、暂停与轮数策略;
|
|
30
30
|
- **[`@menghuan1918/dsh-better-subagent`](https://github.com/Menghuan1918/dsh-better-subagent)**:Codex / Claude 可续接 CLI 子代理、`wait_subagent`、运行中子代理守卫、模型分档与子代理提示词;
|
|
31
|
-
- **[`dsh-better-compact`](https://github.com/Menghuan1918/dsh-better-compact)**:native / goal / file-handoff
|
|
31
|
+
- **[`dsh-better-compact`](https://github.com/Menghuan1918/dsh-better-compact)**:native / goal / file-handoff 三种压缩模式与只读诊断;
|
|
32
|
+
- **[`dsh-better-ask-user`](https://github.com/Menghuan1918/dsh-better-ask-user)**:提问等待、输入续期、Markdown/移动端卡片、超时行为与旧 goal 等待迁移;
|
|
33
|
+
- **[`dsh-better-ptc`](https://github.com/Menghuan1918/dsh-better-ptc)**:ask-user 与 subagent 共享的 PTC deadline 豁免单例。
|
|
32
34
|
|
|
33
|
-
> **0.
|
|
35
|
+
> **0.6.0 的所有权变化**:提问等待从 better-goal 拆到 better-ask-user;PTC deadline 豁免从 Apollo 主行拆到共享 better-ptc。Apollo 只做**装配、通用工程纪律、后台任务退出守卫、旧配置迁移**。Apollo 也不再注册 `/apollo/api/*` —— 该前缀由 better-subagent 作为只读兼容别名拥有。
|
|
34
36
|
|
|
35
37
|
```mermaid
|
|
36
38
|
flowchart TB
|
|
@@ -76,6 +78,8 @@ flowchart TB
|
|
|
76
78
|
| 工程模式 — `eng` | 编码 / 基础设施任务 | 原生工具调用;保留 workflow 工具 |
|
|
77
79
|
| 工程(PTC)模式 — `eng-ptc` | 多步、循环、需要过滤汇总的任务 | 工具经 `run_code` 的 TypeScript SDK 调用;与官方 PTC 模式一致不提供 workflow |
|
|
78
80
|
|
|
81
|
+
在 PTC 模式里,`wait_subagent` / `ask_user_question` 的等待不消耗 `run_code` 的 elapsed budget;普通嵌套工具仍按原预算计时。该豁免由单例 `dsh-better-ptc` 行提供,ask-user 与 subagent 各自向同一服务注册。提问等待由 dsh-better-ask-user 统一管理,默认 120 秒;在它的行设置里可改为 `-1`,普通会话与 goal active 可分别选原 pending 或超时默认选择。两套预设的 `tool-ask-user` 不再固定 `timeout: -1`。
|
|
82
|
+
|
|
79
83
|
两套预设共用 Apollo 的通用工程纪律(KISS、证据先行、修复根因、防过度设计与过度防御、权限与依赖边界、命令与进程纪律)。**委派规则与模型分档不在 Apollo**:由 better-subagent 在 `agent/created` 时按预设与活配置注册自己的 prompt section。完整组装结果见 [prompts/eng.md](prompts/eng.md) 与 [prompts/eng-ptc.md](prompts/eng-ptc.md)。
|
|
80
84
|
|
|
81
85
|
两套预设的压缩组里,原生 `compaction-basic` 被替换为 `dsh-better-compact/engine`(与独立 bundle 完全相同的稳定行),保留 `command-compact` 与 `tool-result-pruner`。工程模式不提供自动化任务工具;退出守卫默认关闭,只检查本会话仍运行的后台 job,不管理 pm2、systemd、nohup 等外部进程。
|
|
@@ -86,15 +90,15 @@ flowchart TB
|
|
|
86
90
|
|
|
87
91
|
```sh
|
|
88
92
|
# npm 安装(发布后)
|
|
89
|
-
dsh plugin --profile <profile> add @menghuan1918/dsh-apollo@0.
|
|
93
|
+
dsh plugin --profile <profile> add @menghuan1918/dsh-apollo@0.6.1
|
|
90
94
|
|
|
91
95
|
# 或从 GitHub main 源码安装(备选)
|
|
92
96
|
dsh plugin --profile <profile> add github:Menghuan1918/dsh-apollo
|
|
93
97
|
```
|
|
94
98
|
|
|
95
|
-
>
|
|
99
|
+
> **发布状态**:Apollo `0.6.1` 与 `dsh-better-ask-user@0.1.3` 已发布;`dsh-better-ptc@0.1.0` 已发布。提交的 manifest 使用精确 npm 版本,**没有** `file:` / `link:` / Git 说明符。发布顺序见[发布顺序](#发布顺序)。
|
|
96
100
|
|
|
97
|
-
安装、升级或换包都会改变运行的代码,必须重启对应 profile 的 DSH
|
|
101
|
+
安装、升级或换包都会改变运行的代码,必须重启对应 profile 的 DSH 进程;只刷新网页不够。目标行、子代理行、压缩行、共享 PTC 行与 ask-user 行由 Apollo 的 bundle patch 插入,不需要再单独 `add` 五个子包。
|
|
98
102
|
|
|
99
103
|
> **不要重复添加**:已经显式选中 better-subagent / better-compact bundle 的 profile,再加 Apollo 会形成“双显式来源”。Loader 仍只激活一行,但 DSH 0.2.1-rc.2 会把同一 id 的配置写入拒绝为只读(见[独立使用与组合安装](#独立使用与组合安装))。只保留一个显式入口。
|
|
100
104
|
|
|
@@ -102,14 +106,14 @@ dsh plugin --profile <profile> add github:Menghuan1918/dsh-apollo
|
|
|
102
106
|
|
|
103
107
|
```sh
|
|
104
108
|
dsh plugin --profile <profile> remove dsh-apollo
|
|
105
|
-
dsh plugin --profile <profile> add @menghuan1918/dsh-apollo@0.
|
|
109
|
+
dsh plugin --profile <profile> add @menghuan1918/dsh-apollo@0.6.1
|
|
106
110
|
```
|
|
107
111
|
|
|
108
112
|
> `dsh-apollo` 只是旧入口名;unscoped 的 `dsh-apollo` 已被其他项目占用,不要从 npm 安装它。
|
|
109
113
|
|
|
110
114
|
## 从 0.4.x 升级
|
|
111
115
|
|
|
112
|
-
0.
|
|
116
|
+
0.6.0 把提问等待从 better-goal 移到独立的 dsh-better-ask-user,并把 PTC deadline 豁免移到共享 dsh-better-ptc;better-goal 的旧 `questionTimeoutSeconds` 仍可读取,ask-user 行会做一次性迁移。旧 profile 不需要手工重填配置:Apollo 启动后在 settings/loader 可用时运行一次**幂等迁移**([src/migrate.js](src/migrate.js));ask-user 行的迁移会在其设置服务就绪后运行。
|
|
113
117
|
|
|
114
118
|
> **0.5.1 迁移修复**:如果旧 profile patch 的 `apollo-skills` 覆盖还带历史名称 `name: dsh-apollo`,DSH 会把 `name` 当 guard 并跳过该覆盖,导致有效配置看起来仍是默认值。0.5.1 从 `configEditor.configuration().override` 恢复这些显式值(含 `false` / `0` / `""` / `[]`),再合并到迁移来源;被跳过的旧预设覆盖(`preset-eng` / `preset-eng-ptc`)同样处理。无需手工修改旧行;升级后重启 profile 即可。
|
|
115
119
|
|
|
@@ -145,9 +149,10 @@ flowchart LR
|
|
|
145
149
|
| `apollo-skills` | Apollo | `exitGuard`(**只**拦运行中后台 job) | volatile,保存即生效 |
|
|
146
150
|
| `dsh-better-subagent` | better-subagent | `childExitGuard`、`tiers.*`、两个 CLI 后端、`subagents.eng/global` | volatile,保存即生效 |
|
|
147
151
|
| `dsh-better-compact` | better-compact | 模式、auto、阈值/headroom/保留、摘要模型、重试、模型策略 | volatile 保存;**引擎快照需重载 profile** |
|
|
148
|
-
| `dsh-better-goal` | goal |
|
|
152
|
+
| `dsh-better-goal` | goal | 轮数策略 | volatile,保存即生效 |
|
|
153
|
+
| `dsh-better-ask-user` | ask-user | 等待时长、输入续期、普通/Goal 超时行为 | volatile,保存即生效;旧 goal 值一次性迁移 |
|
|
149
154
|
|
|
150
|
-
- Apollo
|
|
155
|
+
- Apollo 的最小行页只保留后台任务退出守卫与迁移说明;PTC deadline 豁免由独立的 `dsh-better-ptc` 单例行拥有,没有设置页。
|
|
151
156
|
- 子代理页、压缩页分别由两个独立包自己的浏览器半边注册;它们也注册 Apollo 集成槽别名(`@menghuan1918/dsh-apollo#<row>`、`dsh-apollo#<row>`),独立与集成共用同一份实现,不产生三份配置。
|
|
152
157
|
- 运行中子代理的拦截与 Apollo 的后台 job 守卫是**两个独立开关**;任意一个关闭都不影响原生工具。
|
|
153
158
|
- 原生 `subagent` / `subagent_fork` / `send_message` / `interrupt_agent` 注册表不变;better-subagent 只是在它上面加路由、等待工具与提示词,不拆第二套 registry。
|
|
@@ -159,6 +164,7 @@ flowchart LR
|
|
|
159
164
|
| Apollo `exitGuard`、子代理行、goal 行设置 | 保存后即时生效 |
|
|
160
165
|
| better-compact 设置 | 保存后写入 profile;重启 profile 后引擎采用新快照 |
|
|
161
166
|
| 安装 / 升级 / 移除 bundle、修改预设或顶层 patch | 重启对应 profile 的 DSH 进程 |
|
|
167
|
+
| 共享 PTC 行 / ask-user 行 / 预设内 `tool-ask-user` 行 | 重启对应 profile 的 DSH 进程(host 逻辑与预设不热更) |
|
|
162
168
|
| 已有 CLI 子代理的模型 / effort / profile / 可执行文件 / 初始目录 | 创建时固定;改设置只影响新任务 |
|
|
163
169
|
| 已有 CLI 子代理的权限 | 每轮读取最新设置 |
|
|
164
170
|
|
|
@@ -172,6 +178,9 @@ dsh plugin --profile <profile> add @menghuan1918/dsh-better-subagent@0.1.0
|
|
|
172
178
|
|
|
173
179
|
# 只装压缩
|
|
174
180
|
dsh plugin --profile <profile> add dsh-better-compact@0.1.1
|
|
181
|
+
|
|
182
|
+
# 只装提问增强(同时需要共享 PTC 行)
|
|
183
|
+
dash plugin --profile <profile> add dsh-better-ask-user@0.1.3 dsh-better-ptc@0.1.0
|
|
175
184
|
```
|
|
176
185
|
|
|
177
186
|
独立安装时的行、页面和提示词与 Apollo 集成完全相同;行 id/name 也是同一组稳定值。区别只在**由谁插入这些行**:Apollo 的 bundle patch 自己携带同样的行,因为 DSH 不会自动应用传递依赖的 bundle patch。
|
|
@@ -226,20 +235,20 @@ dsh plugin --profile <profile> remove dsh-better-compact
|
|
|
226
235
|
- `package.json` 的 `files` 只列入 `docs/DEVELOPMENT.md`,并额外用 [.npmignore](.npmignore) 排除 `docs/specs/`;
|
|
227
236
|
- `tests/packaging.test.mjs` 直接运行 `npm pack --dry-run --json`,断言发布清单没有 Specs、测试、脚本、快照或 tarball。
|
|
228
237
|
|
|
229
|
-
|
|
238
|
+
发布顺序:**先发布并验证五个独立包(`dsh-better-ask-user@0.1.3`、`dsh-better-ptc@0.1.0`、`@menghuan1918/dsh-better-subagent@0.2.0`、`dsh-better-goal@0.2.1`、`dsh-better-compact@0.1.2`),再发布 Apollo 0.6.1**。Apollo 的精确依赖指向尚不存在的版本时,`npm install` 会失败;不要用开发 `file:`/`link:` 依赖发布。各子仓各自有 trusted publishing workflow;Apollo 的 [release workflow](.github/workflows/release.yml) 只发布本包。
|
|
230
239
|
|
|
231
240
|
## 验证状态(诚实记录)
|
|
232
241
|
|
|
233
242
|
在本实现提交时验证过(命令与结果见 [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md)):
|
|
234
243
|
|
|
235
244
|
- `npm test`:配置/装配/漂移/迁移纯函数/settings/客户端/prompt/发布清单全部通过,含真实 temp-profile 迁移测试;
|
|
236
|
-
- `npm run prompts`:用发布布局复制 Apollo +
|
|
245
|
+
- `npm run prompts`:用发布布局复制 Apollo + 五个独立包,由真实 headless 宿主重新生成两份快照;
|
|
237
246
|
- `npm pack --dry-run --json`:发布清单无 Specs/tests/scripts/prompts/tarball;
|
|
238
247
|
- `node scripts/runtime-smoke.mjs apollo|standalone|both`:临时 profile + 脚本化 LLM 适配器(无凭据),覆盖单实例行、旧配置迁移、eng 回合、native subagent create/wait、手动 `/compact`、inspect、真实后台 job 退出守卫、保存→`requiresReload`→重启→`activeConfig`、独立组合与双显式 bundle 的只读限制。
|
|
239
248
|
|
|
240
249
|
**未验证 / 明确限制**:
|
|
241
250
|
|
|
242
|
-
-
|
|
251
|
+
- 五个独立包与 Apollo 的 0.6.1 配套版本均已发布;临时 profile 验证通过。
|
|
243
252
|
- 未修改或重启用户当前运行的 profile,未验证当前 GUI(`http://127.0.0.1:3384`)的设置页/卡片;S3 视觉设置页的 GUI 验收归 S3/最终宿主验收。
|
|
244
253
|
- 未运行真实 Codex/Claude CLI 的真实模型回合(那属于两个子包自己的验证;Apollo 侧本轮只用脚本化适配器)。
|
|
245
254
|
- 真实模型摘要保真、缓存命中率与跨版本预设漂移仍需按实际环境复验。
|
package/cordis.patch.yml
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
# presets/ load after it); activate with
|
|
5
5
|
# `dsh plugin --profile <name> add @menghuan1918/dsh-apollo`.
|
|
6
6
|
#
|
|
7
|
-
# Apollo 0.
|
|
8
|
-
# are owned by
|
|
9
|
-
# rows* here because DSH does not auto-apply a
|
|
10
|
-
# patch (`dsh plugin add` only selects directly
|
|
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):
|
|
11
12
|
#
|
|
12
13
|
# - `@menghuan1918/dsh-better-subagent` owns the Codex/Claude CLI subagents,
|
|
13
14
|
# `wait_subagent`, the running-child exit guard, the subagent settings page
|
|
@@ -16,7 +17,10 @@
|
|
|
16
17
|
# (engine row) own compaction; the native host-plane `compaction-basic` is
|
|
17
18
|
# disabled here exactly like the standalone bundle, and the eng/eng-ptc
|
|
18
19
|
# presets carry the engine row inside their own compaction realm;
|
|
19
|
-
# - `dsh-better-goal` keeps owning the goal domain
|
|
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.
|
|
20
24
|
#
|
|
21
25
|
# Selecting both the standalone bundle and Apollo still loads one instance: the
|
|
22
26
|
# Loader keys entries by row id. The same rule makes the double-explicit-bundle
|
|
@@ -69,6 +73,21 @@
|
|
|
69
73
|
- id: dsh-better-subagent
|
|
70
74
|
name: '@menghuan1918/dsh-better-subagent'
|
|
71
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
|
+
|
|
72
91
|
# ── Apollo host row ─────────────────────────────────────────────────────────
|
|
73
92
|
# The apollo-skills row is one row on purpose. The row's module specifier must
|
|
74
93
|
# be this package's npm name (`@menghuan1918/dsh-apollo`), not a short alias,
|
|
@@ -90,6 +109,8 @@
|
|
|
90
109
|
# 3. the one-time legacy `exitGuard` import and the one-time old-config
|
|
91
110
|
# migration into dsh-better-subagent / dsh-better-compact (src/migrate.js);
|
|
92
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.
|
|
93
114
|
# It no longer registers `/apollo/api/*` (dsh-better-subagent owns those read
|
|
94
115
|
# aliases) and no longer implements CLI protocols, subagent routing, the wait
|
|
95
116
|
# tool, tier/delegation prompt generation or the child exit guard.
|
package/docs/DEVELOPMENT.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
面向维护者、集成者和需要排查装配问题的用户。用户安装与配置请看 [README](../README.md);本文保留 DSH 插件的实现细节、旧配置迁移、组合安装边界与验证方法。
|
|
4
4
|
|
|
5
|
-
当前实现版本:`0.
|
|
5
|
+
当前实现版本:`0.6.1`;npm 包名是 `@menghuan1918/dsh-apollo`。纯 ESM,无构建步骤;宿主浏览器半边是直接加载的闭包工厂。
|
|
6
6
|
|
|
7
7
|
## 目录
|
|
8
8
|
|
|
@@ -33,9 +33,11 @@
|
|
|
33
33
|
|
|
34
34
|
| 依赖 | 版本 | 所有权 |
|
|
35
35
|
|---|---|---|
|
|
36
|
-
| `dsh-better-goal` | `0.2.
|
|
37
|
-
| `@menghuan1918/dsh-better-subagent` | `0.
|
|
36
|
+
| `dsh-better-goal` | `0.2.1` | 目标域(`questionTimeoutSeconds` 已弃用、仅保留读取) |
|
|
37
|
+
| `@menghuan1918/dsh-better-subagent` | `0.2.0` | 子代理 CLI/等待/child guard/分档/设置页;注册 `wait_subagent` PTC 豁免 |
|
|
38
38
|
| `dsh-better-compact` | `0.1.2` | 压缩 companion + engine + 设置页/诊断 |
|
|
39
|
+
| `dsh-better-ask-user` | `0.1.3` | 官方 `ask_user_question` contract + 默认等待;注册 PTC 豁免;旧 goal 等待迁移 |
|
|
40
|
+
| `dsh-better-ptc` | `0.1.0` | 单例 PTC deadline 豁免服务 |
|
|
39
41
|
| `@deepseek-ai/schemastery` | `~3.18.4` | Apollo 行 Config |
|
|
40
42
|
| `react` | peer | 宿主提供 |
|
|
41
43
|
|
|
@@ -80,7 +82,7 @@ npm install
|
|
|
80
82
|
|
|
81
83
|
## Apollo 行:保留与弃用
|
|
82
84
|
|
|
83
|
-
`apollo-skills` 是 Apollo
|
|
85
|
+
`apollo-skills` 是 Apollo 的主宿主插件行,0.5.0 后只承担:
|
|
84
86
|
|
|
85
87
|
1. 向技能注册表的全局层注册包内 `skills/*/SKILL.md`(rank 600,用户技能根可覆盖);
|
|
86
88
|
2. 挂载正式行 Config([src/config.js](../src/config.js))与最小浏览器行页;
|
|
@@ -89,6 +91,8 @@ npm install
|
|
|
89
91
|
|
|
90
92
|
**不再负责**:CLI 协议/适配/身份 KV、`wait_subagent`、能力/模型/路由 HTTP 探针、子代理设置页、模型分档与委派提示词生成、运行中子代理退出判断。Apollo 不注册任何 HTTP 路由;`/apollo/api/*` 由 better-subagent 作为只读兼容别名拥有,重复注册同一 `(kind, path)` 会被 webServer 拒绝。
|
|
91
93
|
|
|
94
|
+
PTC deadline 豁免由独立的 `dsh-better-ptc` 单例行提供(无浏览器半边、无设置页):它包裹挂载的 PTC runtime 的 prototype `run`,在已注册工具(`wait_subagent` / `ask_user_question`)在途时暂停 `run_code` 的 elapsed budget,返回后继续剩余预算;普通嵌套工具仍消耗预算。ask-user 与 subagent 都只插入同一个稳定行并调用 `ctx.betterPtc.register(...)`,Loader 去重保证只有一份服务和一层包装。没有 `ptcRuntime` 或 runtime 不提供 numeric timeout 时注册为 no-op。
|
|
95
|
+
|
|
92
96
|
### 配置分类
|
|
93
97
|
|
|
94
98
|
```js
|
|
@@ -158,7 +162,8 @@ npm install
|
|
|
158
162
|
- `tool-jobs.maxConsecutiveWakes = 5000`;
|
|
159
163
|
- `tool-result-pruner` 阈值是上游 2 倍(16384/8192/2048);
|
|
160
164
|
- 保留 `eng-exit-guard`、`eng-mode-instructions` 两个本地插件;
|
|
161
|
-
- 原生 delegation 工具行、tool-subagent 行保持一份,作为宿主 registry
|
|
165
|
+
- 原生 delegation 工具行、tool-subagent 行保持一份,作为宿主 registry 的消费者;
|
|
166
|
+
- `tool-ask-user` 不再固定 `timeout`:基础行保留为 fallback/shadow 探针,新 ask-user 宿主行在每个 Agent 上注册 `ask_user_question` 影子,等待时长与超时行为来自 ask-user 行设置。
|
|
162
167
|
|
|
163
168
|
`eng-ptc` 是 eng 的拷贝,差异恰为上游 `ptc` 相对 `standard` 的差异:`tool-presentation { mode: ptc }`、`workflow-ptc` / `tool-workflow` disabled。0.5.0 起不再有 `eng-mode-instructions` 的 `ptc` 开关;better-subagent 自己识别 `eng-ptc` 追加 fan-out 规则。
|
|
164
169
|
|
|
@@ -313,10 +318,10 @@ DSH_PACKAGE_ROOT="/…/node_modules/@deepseek-ai/dsh" npm run prompts
|
|
|
313
318
|
### npm 安装
|
|
314
319
|
|
|
315
320
|
```sh
|
|
316
|
-
dsh plugin --profile <profile> add @menghuan1918/dsh-apollo@0.
|
|
321
|
+
dsh plugin --profile <profile> add @menghuan1918/dsh-apollo@0.6.1
|
|
317
322
|
```
|
|
318
323
|
|
|
319
|
-
|
|
324
|
+
包发布后即可用此命令安装,并带入五个精确依赖、应用三份 bundle patch。安装后需要重启对应 profile 的 DSH 进程。0.6.1 与 ask-user 0.1.3 已发布,临时 profile 验证通过。
|
|
320
325
|
|
|
321
326
|
### GitHub 源码安装
|
|
322
327
|
|
|
@@ -324,20 +329,23 @@ dsh plugin --profile <profile> add @menghuan1918/dsh-apollo@0.5.2
|
|
|
324
329
|
dsh plugin --profile <profile> add github:Menghuan1918/dsh-apollo
|
|
325
330
|
```
|
|
326
331
|
|
|
327
|
-
GitHub main 仍是源码安装选项。它同样按 `package.json`
|
|
332
|
+
GitHub main 仍是源码安装选项。它同样按 `package.json` 解析精确依赖;五个子包在 registry 可取得前,源码安装会因依赖 404 失败。
|
|
328
333
|
|
|
329
334
|
### 本地 link 安装
|
|
330
335
|
|
|
331
336
|
```sh
|
|
332
337
|
cd /absolute/path/to/dsh-apollo
|
|
333
|
-
npm install
|
|
334
|
-
|
|
338
|
+
# 五个子包尚未发布时不要直接 npm install(会因精确依赖 404 失败)。
|
|
339
|
+
# 先把本地目录/tarball 装进 Apollo 的 node_modules;本工作区已经就绪。
|
|
340
|
+
npm install --no-save /absolute/path/to/dsh-better-ptc /absolute/path/to/dsh-better-ask-user \
|
|
341
|
+
/absolute/path/to/dsh-better-subagent /absolute/path/to/dsh-better-goal \
|
|
342
|
+
/absolute/path/to/dsh-better-compact
|
|
335
343
|
dsh plugin --profile <profile> add link:/absolute/path/to/dsh-apollo
|
|
336
344
|
```
|
|
337
345
|
|
|
338
346
|
注意:
|
|
339
347
|
|
|
340
|
-
- `dsh plugin add link:` 只链接 Apollo 本身,不会代装它的依赖;必须先 `npm install
|
|
348
|
+
- `dsh plugin add link:` 只链接 Apollo 本身,不会代装它的依赖;必须先 `npm install`(子包未发布时用本地目录/tarball `--no-save` 仅作验证);
|
|
341
349
|
- 不要提交 `file:` / `link:` / Git 依赖;发布版必须保持精确 npm 版本;
|
|
342
350
|
- 不需要启动额外服务或构建 Web 资源;宿主提供 React。
|
|
343
351
|
|
|
@@ -347,7 +355,7 @@ dsh plugin --profile <profile> add link:/absolute/path/to/dsh-apollo
|
|
|
347
355
|
dsh --profile <profile> --dump-config
|
|
348
356
|
```
|
|
349
357
|
|
|
350
|
-
应看到 `apollo-skills`、`dsh-better-goal`、`dsh-better-compact`、`dsh-better-compact-engine`、`dsh-better-subagent`
|
|
358
|
+
应看到 `apollo-skills`、`dsh-better-goal`、`dsh-better-compact`、`dsh-better-compact-engine`、`dsh-better-subagent`、`dsh-better-ptc`、`dsh-better-ask-user` 行和两个工程预设;`ui-user-questions` 应被禁用。若缺少独立插件的行,先确认依赖是否安装;若同时显式选中了独立 bundle,参考上面的只读限制。
|
|
351
359
|
|
|
352
360
|
### 升级
|
|
353
361
|
|
|
@@ -368,9 +376,9 @@ dsh plugin --profile <profile> remove @menghuan1918/dsh-apollo
|
|
|
368
376
|
|
|
369
377
|
两个子仓和 Apollo 都用 GitHub Release 触发 `.github/workflows/release.yml`,通过 npm trusted publishing(OIDC)发布,仓库里不存 npm token。tag 必须是 `v<package.json 的 version>`,CI 会先校验再跑测试和 `npm publish --provenance`。
|
|
370
378
|
|
|
371
|
-
1. 先发布
|
|
372
|
-
2. 在官方 registry(`https://registry.npmjs.org
|
|
373
|
-
3. 再把 Apollo 的精确依赖指向已发布版本,推 main 并发布 Apollo Release
|
|
379
|
+
1. 先发布 `dsh-better-ptc@0.1.0`、`dsh-better-ask-user@0.1.3`、`@menghuan1918/dsh-better-subagent@0.2.0`、`dsh-better-goal@0.2.1`、`dsh-better-compact@0.1.2`(各自仓库的 Release);
|
|
380
|
+
2. 在官方 registry(`https://registry.npmjs.org/`)确认五个版本可取得、可安装;
|
|
381
|
+
3. 再把 Apollo 的精确依赖指向已发布版本,推 main 并发布 Apollo Release(本轮为 `v0.6.1`);
|
|
374
382
|
4. 子包版本可取得前,不要把指向它们的精确依赖推到 Apollo main,否则 `npm install` / GitHub 源码安装会 404。
|
|
375
383
|
|
|
376
384
|
## 测试与冒烟
|
|
@@ -429,7 +437,7 @@ DSH_PACKAGE_ROOT=/path/to/node_modules/@deepseek-ai/dsh node scripts/runtime-smo
|
|
|
429
437
|
- 本仓库不运行真实 Codex/Claude CLI;两个子包各自的 `cli-smoke` / runtime smoke 负责真实 CLI 生命周期。
|
|
430
438
|
- 真实模型摘要保真、缓存命中率、S3 可视化页面的 GUI 验收不在 Apollo 侧冒烟内。
|
|
431
439
|
- 未修改用户当前运行的 profile,未验证当前 GUI;当前 URL 以执行时 runtime context 为准。
|
|
432
|
-
- 单元测试通过不等于 registry
|
|
440
|
+
- 单元测试通过不等于 registry 发布/安装路径通过;五个子包的目标版本尚未发布,registry 安装路径未验证。
|
|
433
441
|
|
|
434
442
|
## 历史兼容
|
|
435
443
|
|
|
@@ -461,11 +469,11 @@ DSH_PACKAGE_ROOT=/path/to/node_modules/@deepseek-ai/dsh node scripts/runtime-smo
|
|
|
461
469
|
| 文件 | 职责 |
|
|
462
470
|
|---|---|
|
|
463
471
|
| [package.json](../package.json) | 包元数据、bundle patch 顺序、浏览器注入、精确依赖 |
|
|
464
|
-
| [cordis.patch.yml](../cordis.patch.yml) | 原生 goal/compaction
|
|
472
|
+
| [cordis.patch.yml](../cordis.patch.yml) | 原生 goal/compaction/官方 Web 提问卡片禁用;goal、compact companion/engine、subagent、shared ptc、ask-user、`apollo-skills` 顶层行 |
|
|
465
473
|
| [presets/eng.patch.yml](../presets/eng.patch.yml) / [presets/eng-ptc.patch.yml](../presets/eng-ptc.patch.yml) | 两套预设的行清单唯一事实源 |
|
|
466
474
|
| [presets/eng/plugins/exit-guard/index.js](../presets/eng/plugins/exit-guard/index.js) | job-only 退出守卫 |
|
|
467
475
|
| [presets/eng/plugins/mode-instructions/index.js](../presets/eng/plugins/mode-instructions/index.js) | 工程纪律 + job 守卫提示词 |
|
|
468
|
-
| [src/index.js](../src/index.js) |
|
|
476
|
+
| [src/index.js](../src/index.js) | 主宿主行入口:技能 provider、settings、迁移 |
|
|
469
477
|
| [src/config.js](../src/config.js) | 正式配置 schema、deprecated 字段、规整与活配置读取 |
|
|
470
478
|
| [src/settings.js](../src/settings.js) | 行页面策略、旧文件导入、legacyImport 就绪 Promise |
|
|
471
479
|
| [src/owns-host.js](../src/owns-host.js) | `declareOwnsHost` index tap(唯一 web helper) |
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@menghuan1918/dsh-apollo",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "DSH plugin bundle: workflow skills, engineering presets, independent better-goal / better-subagent / better-compact integration, and a minimal job exit guard. Pure ESM, no build step.",
|
|
3
|
+
"version": "0.6.1",
|
|
4
|
+
"description": "DSH plugin bundle: workflow skills, engineering presets, independent better-goal / better-subagent / better-compact / better-ask-user integration, and a minimal job exit guard. Pure ESM, no build step.",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -54,9 +54,11 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@deepseek-ai/schemastery": "~3.18.4",
|
|
57
|
-
"@menghuan1918/dsh-better-subagent": "0.
|
|
57
|
+
"@menghuan1918/dsh-better-subagent": "0.2.0",
|
|
58
|
+
"dsh-better-ask-user": "0.1.3",
|
|
58
59
|
"dsh-better-compact": "0.1.2",
|
|
59
|
-
"dsh-better-goal": "0.2.
|
|
60
|
+
"dsh-better-goal": "0.2.1",
|
|
61
|
+
"dsh-better-ptc": "0.1.0"
|
|
60
62
|
},
|
|
61
63
|
"peerDependencies": {
|
|
62
64
|
"react": "^18.2.0"
|
package/presets/eng.patch.yml
CHANGED
|
@@ -147,7 +147,8 @@
|
|
|
147
147
|
# domain is owned by the independent dsh-better-goal plugin row in the
|
|
148
148
|
# top-level patch: it registers one `goal` tool and one `/goal` command
|
|
149
149
|
# per Agent, hides any legacy goal tools a preset still carries, and has
|
|
150
|
-
# its own Plugins row for round limits
|
|
150
|
+
# its own Plugins row for round limits. Question waits live in the
|
|
151
|
+
# independent dsh-better-ask-user row. The two
|
|
151
152
|
# removed rows remain deliberate removals in tests/upstream-drift.test.mjs,
|
|
152
153
|
# which asserts they still exist upstream before filtering them out.
|
|
153
154
|
|
package/src/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Apollo's single host row registers bundled skills, its own minimal row
|
|
3
|
-
* settings,
|
|
4
|
-
* dsh-better-subagent / dsh-better-compact rows. Presets
|
|
5
|
-
* bundle patches. Browser code remains a no-build
|
|
3
|
+
* settings, the one-time old-config migration into the independent
|
|
4
|
+
* dsh-better-subagent / dsh-better-compact / dsh-better-ask-user rows. Presets
|
|
5
|
+
* are still delivered by bundle patches. Browser code remains a no-build
|
|
6
|
+
* closure factory. The PTC deadline exemption is owned by the independent
|
|
7
|
+
* dsh-better-ptc singleton row, not this package.
|
|
6
8
|
*
|
|
7
9
|
* Apollo no longer implements subagent CLI protocols/routing, the wait tool,
|
|
8
10
|
* capability/model HTTP probes, tier/delegation prompt generation or the child
|