dsh-agency-agents 0.3.1 → 0.3.4
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 +1 -0
- package/client.js +21 -4
- package/docs/DETAIL.md +1 -51
- package/docs/DETAIL.zh.md +1 -0
- package/docs/PUBLISHING.md +1 -0
- package/docs/preview.svg +34 -0
- package/locale/zh.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -285,6 +285,7 @@ node --test
|
|
|
285
285
|
|
|
286
286
|
| 迁移 | 做了什么 | 证据 |
|
|
287
287
|
|---|---|---|
|
|
288
|
+
| **插件 0.3.3(修复浏览器端注册)** | 包名改为 `dsh-agency-agents` 后,`client.js` 的 `__ModuleLoader__.load({ id })` 仍是旧名,导致整包客户端加载失败(页面同步报错、面板与配置入口消失);已把 id 对齐包名,并新增 `plugins.bundle.config` / `plugins.row.config` 两个原生配置入口 | 刷新后 Plugins → Agency Agents 详情页出现配置区,行也有「配置」入口;工具与面板恢复 |
|
|
288
289
|
| **插件 0.3.1(补回配置入口)** | 把配置页注册到 DSH 插件页的原生槽 `plugins.row.config`(键 `dsh-agency-agents#agency-agents`):页面 chrome、表单状态与写入全部由宿主提供(`form.mutate` → 配置文档),插件不再有 `/settings` 接口或偏好文件 | Plugins → Agency Agents → 行右侧「配置」可编辑全部 16 个字段;Token 为 secret 字段,读取脱敏 |
|
|
289
290
|
| **插件 0.2.2 → 0.3.0(交接 DSH 统一管理)** | ① 删除插件自管的设置页/保存按钮/`preferences.json` 与 `/settings` 接口;② 16 个配置字段全部回到 DSH 的插件配置页(`Config` → Loader 行),Token 改为 `role('secret')` 配置字段(读取脱敏);③ 旧技能维护动作移入面板(检测到才显示);④ 补 `LICENSE`、`icon`、打包元数据,`pnpm pack` 产物可安装并加载 | 单测 87 pass;`pnpm pack` 34 个文件;tarball 装进临时工程 + 加载 `Config({})` 成功;插件重载后 5 个工具注册 |
|
|
290
291
|
| **0.2.2-rc.5 → 0.2.3-alpha.2**(本插件 0.2.1 → 0.2.2) | ① `dsh-tools` peer+dev → `0.2.3-alpha.2`,`schemastery` → `~3.20.0-alpha.1`(宿主已升到 3.20.0-alpha.1);② `engines.dsh` 按官方新规范改为 `^0.2.3-alpha.2`(caret + prerelease 下界);③ 全量测试对 0.2.3-alpha.2 SDK 重跑;④ 适配**新增强制鉴权**:`dsh-host-authentication-token` 让所有路由默认 `auth: 'required'`,我们把插件路由显式声明为 `required`,并给客户端补了 401 专属提示("此页面未通过 DSH 鉴权") | `node --test` → 81 pass;`index.js` 在 schemastery 3.20.0-alpha.1 下可加载且 `Config({})` 正常;无 cookie 探针 → `GET /agency-agents/api/v1/ping` = **401 `unauthorized`**(证明路由已注册且受鉴权保护);5 个工具在 0.2.3-alpha.2 上注册成功、`agency_roles_search` 实际调用成功 |
|
package/client.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* lazy factory, and every side effect lives inside `apply`.
|
|
11
11
|
*/
|
|
12
12
|
window.__ModuleLoader__.load({
|
|
13
|
-
id: '
|
|
13
|
+
id: 'dsh-agency-agents',
|
|
14
14
|
factory(require) {
|
|
15
15
|
const React = require('react')
|
|
16
16
|
const h = React.createElement
|
|
@@ -533,8 +533,22 @@ animation:aag-spin .8s linear infinite}
|
|
|
533
533
|
*/
|
|
534
534
|
function AgencyConfigPage(props) {
|
|
535
535
|
const t = typeof props.t === 'function' ? props.t : key => key
|
|
536
|
-
const
|
|
537
|
-
|
|
536
|
+
const provided = props.form
|
|
537
|
+
// The row page passes a Host-owned form; the bundle page does not, so fall
|
|
538
|
+
// back to the shared client ConfigForms service for the same namespace.
|
|
539
|
+
const fetchForm = React.useCallback(() => {
|
|
540
|
+
const service = ctx0.get('configForms')
|
|
541
|
+
return service?.get?.('agency-agents')
|
|
542
|
+
}, [])
|
|
543
|
+
const [form] = React.useState(() => provided ?? fetchForm())
|
|
544
|
+
const [fallback, setFallback] = React.useState(undefined)
|
|
545
|
+
React.useEffect(() => {
|
|
546
|
+
if (provided !== undefined || form === undefined) return undefined
|
|
547
|
+
setFallback(form.getSnapshot())
|
|
548
|
+
return form.subscribe(() => setFallback(form.getSnapshot()))
|
|
549
|
+
}, [provided, form])
|
|
550
|
+
const snapshot = provided?.state ?? fallback
|
|
551
|
+
const values = snapshot?.value
|
|
538
552
|
const [draft, setDraft] = React.useState(undefined)
|
|
539
553
|
const [busy, setBusy] = React.useState(false)
|
|
540
554
|
const [notice, setNotice] = React.useState(undefined)
|
|
@@ -563,7 +577,7 @@ animation:aag-spin .8s linear infinite}
|
|
|
563
577
|
)
|
|
564
578
|
}
|
|
565
579
|
if (form === undefined) return h('p', { className: 'aag-configHint' }, t('config.unavailable'))
|
|
566
|
-
if (
|
|
580
|
+
if (snapshot?.status !== 'ready' || draft === undefined) return h(Skeleton)
|
|
567
581
|
|
|
568
582
|
const persist = async ops => {
|
|
569
583
|
setBusy(true)
|
|
@@ -1638,6 +1652,9 @@ animation:aag-spin .8s linear infinite}
|
|
|
1638
1652
|
ctx.slots.inject('plugins.row.config', () =>
|
|
1639
1653
|
ctx.slots.register({ name: 'plugins.row.config', key: 'dsh-agency-agents#agency-agents', locale: NS }, AgencyConfigPage),
|
|
1640
1654
|
)
|
|
1655
|
+
ctx.slots.inject('plugins.bundle.config', () =>
|
|
1656
|
+
ctx.slots.register({ name: 'plugins.bundle.config', key: 'dsh-agency-agents', locale: NS }, AgencyConfigPage),
|
|
1657
|
+
)
|
|
1641
1658
|
},
|
|
1642
1659
|
}
|
|
1643
1660
|
},
|
package/docs/DETAIL.md
CHANGED
|
@@ -1,51 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
## 这是什么
|
|
4
|
-
|
|
5
|
-
一个 DSH 插件,把 [agency-agents](https://github.com/msitarzewski/agency-agents) 的角色库接进 DeepSeek Harness:
|
|
6
|
-
|
|
7
|
-
- 左侧栏一级入口 + 主面板(原生 `sidebar.panellist` / `main` 槽);
|
|
8
|
-
- 283 个专家角色的浏览、搜索、详情(含来源文件);
|
|
9
|
-
- 4 个协作流程(runbook)与"按流程组建团队";
|
|
10
|
-
- 团队编排(Lead / Specialist / Reviewer / Integrator + 任务 DAG + 写入范围);
|
|
11
|
-
- 一键创建 Session、预填提示词、打开 DSH 原生 Team 模式;
|
|
12
|
-
- 上游同步:条件请求、快照校验、原子发布、失败回退。
|
|
13
|
-
|
|
14
|
-
## 为什么值得装
|
|
15
|
-
|
|
16
|
-
| 不用它 | 用它 |
|
|
17
|
-
|---|---|
|
|
18
|
-
| 283 个角色各做成一个 Skill,目录清单每轮多约 15k token | 角色正文**按需**读取,主上下文只看见 5 个工具(schema 合计约 2,174 token/轮) |
|
|
19
|
-
| 手工记住 283 个名字与边界 | 按 division / 关键词 / runbook 检索,带职责与交付物 |
|
|
20
|
-
| 手工拼多 Agent 提示词,容易重复写同一片文件 | 自动给 DAG、依赖与互不重叠的 `writeScope` |
|
|
21
|
-
| 上游更新要手动重跑脚本 | 自动检查(可配间隔)+ 手动立即检查,原子切换、可回退 |
|
|
22
|
-
|
|
23
|
-
## 怎么用
|
|
24
|
-
|
|
25
|
-
1. 安装后在左侧栏点 **Agency Agents**;
|
|
26
|
-
2. 首次进页面若显示"还没有角色目录",点 **立即检查更新**(或等启动检查);
|
|
27
|
-
3. **角色** 页浏览/搜索;**协作流程** 页挑一个 runbook;
|
|
28
|
-
4. **团队编排** 页填目标、调规模、增删角色,生成提示词;
|
|
29
|
-
5. 点 **在本会话一键启动**(推荐,全自动:值得组队就在当前会话开启 Team 模式并投递任务)或 **启动团队**(显式新建会话、预填后启动)。
|
|
30
|
-
|
|
31
|
-
## 设计要点
|
|
32
|
-
|
|
33
|
-
- **不建第二套运行时**:成员、消息、任务板、依赖、owner、revision 全部是 DSH 原生(`dsh-subagent`、`dsh-agent-team`、`dsh-tool-agent-team`)。
|
|
34
|
-
- **上游内容是不可信输入**:frontmatter 严格解析、路径规范化、大小与条目上限、角色正文清洗(去掉非 DSH 调用语法与越权语句)。
|
|
35
|
-
- **角色提示词不覆盖 DSH**:生成的 prompt 把"身份/边界/任务/输出/权限/失败上报"分层,且显式声明 DSH 系统提示、沙箱与审批优先。
|
|
36
|
-
- **确定性生成**:同 commit + 同生成器版本 ⇒ 逐字节相同输出,相同 hash。
|
|
37
|
-
|
|
38
|
-
## 已知边界
|
|
39
|
-
|
|
40
|
-
- 需要 HTTP 载体(`ctx.webServer`)才能与 Host 通信;非 HTTP 载体下页面只读。
|
|
41
|
-
- GitHub 匿名 API 限流很低;Token 是配置里的 `role('secret')` 字段(读取脱敏),在 Plugins → Agency Agents → 配置里填。
|
|
42
|
-
- 上游 18 个 division / 283 个角色是当前快照;增删由上游同步自动反映,不做人工维护。
|
|
43
|
-
|
|
44
|
-
## 全自动模式(本会话)
|
|
45
|
-
|
|
46
|
-
- **一句话目标**:在"团队编排"页写下要达成的结果,点 **在本会话一键启动**,插件先判定这件事是否值得组队。
|
|
47
|
-
- **值得组队**:直接在当前会话开启 DSH 原生 Team 模式并投递团队任务,不新开会话;成功后会提示会话 id 与 Team 模式。
|
|
48
|
-
- **不值得**:明确提示"单 Agent 更合适"(或"目标太短"),不创建团队、不开启 Team 模式。
|
|
49
|
-
- **用完自动关**:团队任务板清空(全部 `completed`/`deleted`)并过了 90 秒宽限后,插件自动关闭该会话的 Team 模式,面板收到 `team/mode` 事件提示;配置页的 `autoTeamMode` 可关掉这个行为。
|
|
50
|
-
- 所有配置(间隔 / 团队上限 / 严格校验 / 自动关闭 / 代理 / Token)都在 **Plugins → Agency Agents → 行右侧「配置」**:DSH 原生插件配置表单直接写 Loader 行,插件没有自己的设置页与偏好文件。旧技能维护是面板里的一个提示块(检测到才出现)。
|
|
51
|
-
- 团队规模上限仍是 `min(maxActiveSubagents, maxTeamMembers)`。面板拿不到当前会话 id 时退回"新开会话";模型侧调用要求当前会话可用,否则明确报错并提示改用 `mode:"new"`。
|
|
1
|
+

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
package/docs/PUBLISHING.md
CHANGED
|
@@ -25,6 +25,7 @@ pnpm add file:<路径>\local-agency-agents-0.3.0.tgz @deepseek-ai/dsh-tools@0.2.
|
|
|
25
25
|
node -e "import('./node_modules/dsh-agency-agents/index.js').then(m => console.log(m.name, typeof m.apply, JSON.stringify(m.Config({}))))"
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
> **改包名必须同步浏览器端 id**:`client.js` 顶部 `window.__ModuleLoader__.load({ id })` 的 `id` 必须等于 npm 包名,否则页面会报 `loaded without registering "<包名>" via __ModuleLoader__.load`,整个客户端失效(面板与插件页配置入口都不出现)。改名时两处一起改。
|
|
28
29
|
## 2. 发布到 npm(公共或私有 registry)
|
|
29
30
|
|
|
30
31
|
1. 公共包名已定为 `dsh-agency-agents`(当前未占用);如需换成自己的 scope,发布前改 `name` 并保持 `cordis.patch.yml` 的 `name` 一致;
|
package/docs/preview.svg
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="300" viewBox="0 0 640 300">
|
|
2
|
+
<rect width="640" height="300" rx="20" fill="#f3f5f9"/>
|
|
3
|
+
<!-- sidebar -->
|
|
4
|
+
<rect x="36" y="28" width="132" height="244" rx="14" fill="#ffffff" stroke="#d6dde7" stroke-width="2"/>
|
|
5
|
+
<rect x="52" y="48" width="100" height="10" rx="5" fill="#d6dde7"/>
|
|
6
|
+
<rect x="52" y="76" width="100" height="34" rx="9" fill="#e7edf5" stroke="#b7c3d2" stroke-width="1.5"/>
|
|
7
|
+
<circle cx="68" cy="93" r="7" fill="#247bbf"/>
|
|
8
|
+
<rect x="82" y="88" width="52" height="8" rx="4" fill="#7b8b9f"/>
|
|
9
|
+
<rect x="52" y="122" width="100" height="10" rx="5" fill="#e0e5ed"/>
|
|
10
|
+
<rect x="52" y="146" width="100" height="10" rx="5" fill="#e0e5ed"/>
|
|
11
|
+
<rect x="52" y="170" width="100" height="10" rx="5" fill="#e0e5ed"/>
|
|
12
|
+
<!-- roster panel -->
|
|
13
|
+
<rect x="184" y="28" width="420" height="244" rx="14" fill="#ffffff" stroke="#d6dde7" stroke-width="2"/>
|
|
14
|
+
<rect x="204" y="48" width="150" height="14" rx="7" fill="#b7c3d2"/>
|
|
15
|
+
<rect x="204" y="74" width="380" height="30" rx="8" fill="#f3f5f9" stroke="#d6dde7" stroke-width="1.5"/>
|
|
16
|
+
<rect x="218" y="85" width="120" height="8" rx="4" fill="#c9d3df"/>
|
|
17
|
+
<!-- role cards -->
|
|
18
|
+
<rect x="204" y="120" width="180" height="60" rx="10" fill="#f7f9fc" stroke="#d6dde7" stroke-width="1.5"/>
|
|
19
|
+
<circle cx="226" cy="140" r="10" fill="#247bbf"/>
|
|
20
|
+
<rect x="244" y="132" width="100" height="9" rx="4" fill="#8fa0b3"/>
|
|
21
|
+
<rect x="244" y="148" width="120" height="7" rx="3.5" fill="#d6dde7"/>
|
|
22
|
+
<rect x="204" y="192" width="180" height="60" rx="10" fill="#f7f9fc" stroke="#d6dde7" stroke-width="1.5"/>
|
|
23
|
+
<circle cx="226" cy="212" r="10" fill="#5aa0d8"/>
|
|
24
|
+
<rect x="244" y="204" width="100" height="9" rx="4" fill="#8fa0b3"/>
|
|
25
|
+
<rect x="244" y="220" width="120" height="7" rx="3.5" fill="#d6dde7"/>
|
|
26
|
+
<!-- team graph -->
|
|
27
|
+
<rect x="404" y="120" width="180" height="132" rx="10" fill="#f7f9fc" stroke="#d6dde7" stroke-width="1.5"/>
|
|
28
|
+
<circle cx="494" cy="146" r="13" fill="#247bbf"/>
|
|
29
|
+
<path d="M494 159v18M494 177l-38 18M494 177l38 18" stroke="#8fa0b3" stroke-width="2" fill="none" stroke-linecap="round"/>
|
|
30
|
+
<circle cx="450" cy="204" r="11" fill="#ffffff" stroke="#5aa0d8" stroke-width="2.5"/>
|
|
31
|
+
<circle cx="538" cy="204" r="11" fill="#ffffff" stroke="#5aa0d8" stroke-width="2.5"/>
|
|
32
|
+
<rect x="432" y="226" width="36" height="7" rx="3.5" fill="#c9d3df"/>
|
|
33
|
+
<rect x="520" y="226" width="36" height="7" rx="3.5" fill="#c9d3df"/>
|
|
34
|
+
</svg>
|
package/locale/zh.json
CHANGED