@stofone/dsh-agent-roster 0.5.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -2,6 +2,48 @@
2
2
 
3
3
  遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/) 与 [SemVer](https://semver.org/lang/zh-CN/)。
4
4
 
5
+ ## [0.6.0] - 2026-10-30
6
+
7
+ ### Captain verification and applying a roster
8
+
9
+ - The panel now compares an archive's `captain` block with what the deployment actually says:
10
+ provider / model / reasoning-effort / persona prefix are read from every profile's
11
+ `cordis.patch.yml` and reported as `match`, `differ`, `undeclared` or `unknown`.
12
+ Unreadable deployment config is never reported as a pass.
13
+ - New `POST /plugins/dsh-agent-roster/apply`: picks an existing session or creates a new one,
14
+ applies the declared model to that session, and queues a prompt that builds the team with
15
+ `agent_teams_create` + `agent_teams_add_member` + `roster_verify`. The plugin still never
16
+ creates teams itself.
17
+ - `/library` now also returns the session list (read-only) and the captain section.
18
+ - `roster_verify` reports the captain checks next to the member checks.
19
+ - Panel: captain card inside each archive with the declared routing, the four-state checks and an
20
+ "apply" row (existing session / new session + optional working directory).
21
+ - Locale dictionary gained the `captain` section in both languages.
22
+ - Header actions moved to where they act: import/new archive on the archive tab, "refresh sources"
23
+ on the sources tab (bypasses the TTL and re-reads the index), and a gear button that opens a
24
+ settings dialog (language, download region, roster directories, resolved paths).
25
+ - The panel fills the whole page (no `max-width` on the outer container) and the archive
26
+ list gains a tag pool on the left: every tag in the library with its count, multi-select
27
+ narrows with AND semantics, one click clears.
28
+
29
+ ## [0.5.1] - 2026-10-29
30
+
31
+ ### Fixed
32
+
33
+ - **配置视图漏了两个字段**:`configView` 只转发了 `rosterDirs`/`knownToolPolicies`/`agentTeamsStateDir`,
34
+ 面板与路由读不到 `indexes` 与 `region`——于是设置里关掉远端(`indexes: false`)不生效、
35
+ `region: china` 也不生效。现在四个字段都转发,`indexes` 的三种取值(`undefined`/空数组 = 官方源、
36
+ `false` = 关掉远端、数组 = 自定义源)原样保留。
37
+ - **缺省档案库目录退回旧的相对路径**:`rosterDirs` 未配置时曾退回 `["rosters"]`(相对当前工作区),
38
+ 与 0.3.0 起的“留空 = 全局库 `$DSH_HOME/agent-roster`”不一致;一键拉取会把档案写进工作区而不是全局库。
39
+ 现在缺省统一为空串(全局库)。测试 162 → 163。
40
+
41
+ ### Added
42
+
43
+ - 官方索引 `index/registry.json` 新增三个迁移自上游的 collection:
44
+ `agent-teams`(wshobson/agents,MIT,4.2 万星)、`metagpt-company`(MetaGPT,MIT)、
45
+ `openmanus`(OpenManus,MIT)。三份档案在各自仓库的 `rosters/<id>/roster.yaml`,可在面板“档案源”页一键拉取。
46
+
5
47
  ## [0.5.0] - 2026-10-29
6
48
 
7
49
  ### Added
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @stofone/dsh-agent-roster
2
2
 
3
+ **English** | [简体中文](README.zh.md)
4
+
3
5
  Static member rosters for multi-agent teams in the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).
4
6
 
5
7
  A roster is a file on disk: who is on the team, what each member is for, which model route they use, and which tools they are allowed to touch. This plugin defines that file format, validates it, and translates it into `agent_teams_*` call arguments — nothing more.
@@ -166,8 +168,34 @@ All five are read-only with respect to team state. `roster_create` only produces
166
168
 
167
169
  `roster_list`, `roster_show`, `roster_create` and `roster_verify` all accept a `path` argument: when given, it is the library root, with no silent fallback to the configured directory.
168
170
 
171
+ ### Captain verification
172
+
173
+ An archive's `captain` block is a declaration. The captain is the session that creates the team — it
174
+ has no member row, its model comes from the deployment (`agent-default-model`) and its persona from
175
+ the agent preset. The panel therefore **compares** instead of pretending to write: the Settings row
176
+ shows the deployed provider / model per profile, and every archive with a captain block reports
177
+ `match` / `differ` / `undeclared` / `unknown` per field. When the deployment cannot be read the
178
+ state is `unknown`, never "passed".
179
+
180
+ The **apply** action is the one write the panel offers here: it switches the chosen session to the
181
+ declared model and queues a prompt that calls `agent_teams_create`, `agent_teams_add_member` per
182
+ member and finally `roster_verify`. Creating the team stays with the runtime.
183
+
169
184
  ## Sidebar panel
170
185
 
186
+ The panel takes the full page width; nothing constrains it to a reading column. The archive list has
187
+ a **tag pool** on the left: every tag present in the library, with how many archives carry it. Clicking
188
+ tags narrows the list — multiple selections are ANDed — and one button clears the selection. The tag
189
+ pool is a filtered view only; it never writes tags back to files.
190
+
191
+ Header actions follow the place they act on: **Import** and **New archive** sit in the archive tab
192
+ next to the search box, **Refresh sources** sits in the sources tab (it bypasses the one-hour cache and
193
+ re-reads the public index), and the header keeps a single **gear button** that opens the settings dialog.
194
+ The dialog edits the language, the download region and the roster directories, and shows the resolved
195
+ data directory, the team state directory and the version.
196
+
197
+ A badge at the top summarises how many items need attention
198
+
171
199
  The client plugin adds an **Agent Roster** entry to the left sidebar: one row in the `sidebar.panellist` slot plus the matching key in the `main` slot. Clicking the row opens a full-width page with three tabs — the panel is not only a viewer:
172
200
 
173
201
  | Tab | What you can do |
@@ -205,6 +233,7 @@ repository's `index/registry.json`, and anyone who subscribes can see them in th
205
233
  | `/plugins/dsh-agent-roster/library` | GET | panel snapshot: libraries, rosters, teams, hints, counts, remote sources |
206
234
  | `/plugins/dsh-agent-roster/document` | GET | one roster's raw text plus its parsed form (editor) |
207
235
  | `/plugins/dsh-agent-roster/rosters` | POST | create / update / delete / import / export one roster |
236
+ | `/plugins/dsh-agent-roster/apply` | POST | apply an archive's captain to an existing or new session and queue the team-building prompt |
208
237
  | `/plugins/dsh-agent-roster/collection` | GET | fetch one collection's rosters read-only (nothing is written) |
209
238
  | `/plugins/dsh-agent-roster/install` | POST | write one collection into the local library (idempotent, no overwrite by default) |
210
239
  | `/plugins/dsh-agent-roster/locale` | GET | `en` / `zh` dictionary for the panel |
@@ -245,7 +274,7 @@ An empty library is not an error. A missing one is reported as info, not error.
245
274
 
246
275
  ```bash
247
276
  npm install
248
- npm test # node --test, 162 cases
277
+ npm test # node --test, 191 cases
249
278
  npm run smoke # registers the tools against a real DSH bundle, asserts lossless output
250
279
  node scripts/check-locale.mjs # static t() keys must exist in both dictionaries
251
280
  ```
@@ -269,7 +298,7 @@ test/ unit tests
269
298
 
270
299
  Verified on this machine:
271
300
 
272
- - `npm test` — 162/162 passing (format, parse, validate, registry, paths, bridge, verify, lossless JSON, write plan/apply, all routes, panel snapshot and hints, dictionary consistency, tool contracts, client loader contract, library snapshot, config view, package manifest, declared fields and captain block, schema/constant alignment, remote registry and one-click install).
301
+ - `npm test` — 191/191 passing (format, parse, validate, registry, paths, bridge, verify, lossless JSON, write plan/apply, all routes, panel snapshot and hints, dictionary consistency, tool contracts, client loader contract, library snapshot, config view, package manifest, declared fields and captain block, schema/constant alignment, remote registry and one-click install).
273
302
  - `npm run smoke` — `apply()` registers all five tools through a real `defineTool` from a DSH bundle; `roster_list` / `roster_show` / `roster_create` / `roster_verify` execute, every output survives `lossless` checks, `path` overrides are honored, effect disposal runs cleanly. The same command then loads `client.js` against a stubbed module table and asserts the three slot registrations, style injection and effect disposal.
274
303
  - CLI: `validate --dir examples` returns exit 0 over both example libraries.
275
304
  - Installed into a real profile with the plugin manager (`plugin_manager install_bundle` against this directory → `link:` dependency + bundle entry); the profile re-reads the linked files on restart.
package/README.zh.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @stofone/dsh-agent-roster
2
2
 
3
+ [English](README.md) | **简体中文**
4
+
3
5
  面向多 Agent 团队的**静态成员档案**插件(DeepSeek Harness)。
4
6
 
5
7
  一份档案就是磁盘上的一个文件:团队里有谁、各自负责什么、走哪个模型路由、被允许碰哪些工具。本插件定义这套格式、校验它,并把它翻译成 `agent_teams_*` 的调用参数——仅此而已。
@@ -162,8 +164,29 @@ npx dsh-agent-roster list
162
164
 
163
165
  三个带路径的工具(`roster_list` / `roster_show` / `roster_create`)都接受 `path` 参数:给了就只看那个目录,不会悄悄回落到配置目录。
164
166
 
167
+ ### 队长核对
168
+
169
+ 档案里的 `captain` 段是声明。队长就是创建团队的那个会话——它没有成员行,模型来自部署
170
+ (`agent-default-model`),人格来自 agent preset。所以面板做的是**核对**,不是假装能写:
171
+ 设置页显示每个 profile 里实际部署的 provider / model,每份带 captain 段的档案按字段报
172
+ 「一致 / 不一致 / 未声明 / 无法核对」。读不到部署配置时是「无法核对」,永远不会写成“通过”。
173
+
174
+ **应用**是这块唯一会写入的动作:把选中会话切到声明里的模型,并排入一段提示词,让它依次调用
175
+ `agent_teams_create`、逐成员 `agent_teams_add_member`,最后 `roster_verify` 核对。
176
+ 团队仍由运行时创建,插件不代劳。
177
+
165
178
  ## 左侧栏面板
166
179
 
180
+ 面板铺满整个页面宽度,外层容器不设阅读列宽度。档案列表左侧是**标签池**:列出全库出现过的标签
181
+ 以及各标签的档案数,点标签即筛选——多选是「且」,一个按钮清除选择。标签池只影响视图,不会把
182
+ 标签写回文件。
183
+
184
+ 头部只留一个齿轮按钮打开**设置弹窗**:语言、下载区、档案库目录都能在这里改;解析出来的数据目录、
185
+ 团队状态目录与版本号也列在同一处。导入与新建档案挪到档案页签的搜索框右侧,刷新只属于档案源页签
186
+ (绕过一小时的缓存,直接回源读公共索引)。
187
+
188
+ 顶部一条徽标汇总
189
+
167
190
  客户端插件在左侧全局栏新增一行 **Agent Roster** 图标(`sidebar.panellist` 列表槽),并在 `main` 槽用同一个面板 id 注册整页内容;点图标即在主区域打开,宽度与对话页一致。面板分三个页签,不只是看:
168
191
 
169
192
  | 页签 | 能做什么 |
@@ -199,6 +222,7 @@ npx dsh-agent-roster list
199
222
  | `/plugins/dsh-agent-roster/library` | GET | 面板快照:工作区、档案库、档案、团队、提示、计数、远端源状态 |
200
223
  | `/plugins/dsh-agent-roster/document` | GET | 单份档案的原文与解析结果(编辑器用) |
201
224
  | `/plugins/dsh-agent-roster/rosters` | POST | 新建 / 更新 / 删除 / 导入 / 导出单份档案 |
225
+ | `/plugins/dsh-agent-roster/apply` | POST | 把档案里的队长应用到已有会话或新会话,并排入建团队提示词 |
202
226
  | `/plugins/dsh-agent-roster/collection` | GET | 拉取某个 collection 的档案内容(只读,不落盘) |
203
227
  | `/plugins/dsh-agent-roster/install` | POST | 把某个 collection 落盘到本机档案库(幂等,默认不覆盖) |
204
228
  | `/plugins/dsh-agent-roster/locale` | GET | 面板词典(`en` / `zh`) |
@@ -239,7 +263,7 @@ npx dsh-agent-roster list
239
263
 
240
264
  ```bash
241
265
  npm install
242
- npm test # node --test,162 个用例
266
+ npm test # node --test,191 个用例
243
267
  npm run smoke # 用真实 DSH bundle 注册工具,断言输出可无损往返
244
268
  node scripts/check-locale.mjs # client.js 里的静态 t() 键必须两本词典都有
245
269
  ```
@@ -261,7 +285,7 @@ test/ 单测
261
285
 
262
286
  本机已验证:
263
287
 
264
- - `npm test` —— 162/162 通过(格式、解析、校验、扫描、路径、桥接、核对、无损 JSON、写入计划与执行、六条路由、快照与提示、两本词典一致、工具契约、客户端加载器契约、包清单、配置视图、样式 token 约束、声明层字段与队长段、schema 与常量对齐)。
288
+ - `npm test` —— 191/191 通过(格式、解析、校验、扫描、路径、桥接、核对、无损 JSON、写入计划与执行、六条路由、快照与提示、两本词典一致、工具契约、客户端加载器契约、包清单、配置视图、样式 token 约束、声明层字段与队长段、schema 与常量对齐)。
265
289
  - `npm run smoke` —— 用真实 DSH bundle 的 `defineTool` 注册五个工具,逐个调用:输出全部通过无损校验、`path` 覆盖生效、释放干净;同一条命令随后用桩模块表加载 `client.js`,断言三处槽位注册、样式只注入一次、effect 可回收。
266
290
  - CLI:`validate --dir examples` 对两座示例库退出码 0。
267
291
  - 用插件管理器真的装进了本机 profile(`plugin_manager install_bundle` 指向本仓库 → `link:` 依赖 + bundle 条目),重启后按链接读取本仓库文件。