@stofone/dsh-agent-roster 0.12.0 → 0.13.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +18 -10
  3. package/README.zh.md +16 -9
  4. package/client.js +334 -165
  5. package/examples/dist/core-review-1.0.0.json +9 -0
  6. package/examples/dist/research-0.1.0.json +7 -0
  7. package/examples-orchestration/dist/core-review-1.0.0.json +9 -0
  8. package/index.js +104 -66
  9. package/lib/compile2.js +13 -4
  10. package/locale/en.json +11 -8
  11. package/locale/zh.json +11 -8
  12. package/orgs/agent-roster-collective/dist/api-design-1.0.0.json +10 -0
  13. package/orgs/agent-roster-collective/dist/content-ops-1.0.0.json +9 -0
  14. package/orgs/agent-roster-collective/dist/contract-review-1.0.0.json +9 -0
  15. package/orgs/agent-roster-collective/dist/data-quality-1.0.0.json +10 -0
  16. package/orgs/agent-roster-collective/dist/db-migration-1.0.0.json +10 -0
  17. package/orgs/agent-roster-collective/dist/docs-writer-1.0.0.json +9 -0
  18. package/orgs/agent-roster-collective/dist/finance-recon-1.0.0.json +9 -0
  19. package/orgs/agent-roster-collective/dist/frontend-ui-1.0.0.json +10 -0
  20. package/orgs/agent-roster-collective/dist/i18n-l10n-1.0.0.json +10 -0
  21. package/orgs/agent-roster-collective/dist/incident-response-1.0.0.json +10 -0
  22. package/orgs/agent-roster-collective/dist/literature-review-1.0.0.json +9 -0
  23. package/orgs/agent-roster-collective/dist/market-research-1.0.0.json +9 -0
  24. package/orgs/agent-roster-collective/dist/ml-eval-1.0.0.json +9 -0
  25. package/orgs/agent-roster-collective/dist/performance-1.0.0.json +9 -0
  26. package/orgs/agent-roster-collective/dist/product-discovery-1.0.0.json +9 -0
  27. package/orgs/agent-roster-collective/dist/qa-regression-1.0.0.json +10 -0
  28. package/orgs/agent-roster-collective/dist/recruiting-1.0.0.json +9 -0
  29. package/orgs/agent-roster-collective/dist/release-manager-1.0.0.json +9 -0
  30. package/orgs/agent-roster-collective/dist/security-audit-1.0.0.json +10 -0
  31. package/orgs/agent-roster-collective/dist/sre-oncall-1.0.0.json +10 -0
  32. package/orgs/agent-roster-collective/dist/support-triage-1.0.0.json +9 -0
  33. package/package.json +1 -1
  34. package/schema/compiled.v1.schema.json +30 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,40 @@
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.13.0] - 2026-11-03
8
+
9
+ ### A tab that behaves like a marketplace, not a filter on a list
10
+
11
+ 0.12.0 put a search field above the tabs. That was still the wrong shape: search belonged to a page about
12
+ collections, and browsing still meant "pick a source, then read". The panel now opens on its own **Library**
13
+ tab — search, tags, and one list that spans this machine and every subscribed source.
14
+
15
+ - `GET /plugins/dsh-agent-roster/catalog` returns every roster in view in one response: this machine plus
16
+ each subscribed collection, with tags, member counts, member roles and where each one lives.
17
+ - The tag strip is a real filter: counts are computed from everything in view, multiple tags are AND, and
18
+ the selection never writes back to a file. The segmented control switches between **by source** (this
19
+ machine, then one group per collection) and **flat** (one list, source named per row).
20
+ - Search keeps its own route and its own ranking (`lib/search.js`): two characters, 240 ms debounce, and the
21
+ in-flight request is aborted when you keep typing, so typing never queues requests.
22
+ - Compiled artifacts now carry what it takes to be *found*: `source.title`, `description`, `tags`, `license`
23
+ and `maintainers`. A subscribed roster is one file (`dist/<id>-<ver>.json`) resolved through `files` in the
24
+ index — previously the artifact knew its id and version and nothing else, so remote results could only be
25
+ searched by id.
26
+ - The panel's tag chips were inheriting the sidebar's full-width row form; they are now chips (own width,
27
+ pill border, count attached), and the narrow layout gets the same 18px gutter as the rest of the page.
28
+
29
+ ### Changed
30
+
31
+ - The header lookup field is gone; its behaviour lives inside the Library tab. `lookup.*` strings were
32
+ replaced by `catalog.*` (both locales).
33
+ - `flattenCompiledToRoster` and `rosterViewOf` now fall back to artifact metadata, so a remote roster keeps
34
+ its title and tags after being flattened into a v1 document.
35
+
36
+ ### Fixed
37
+
38
+ - `GET /catalog` and search share one `gatherEntries()` path; before, each route assembled local + remote
39
+ entries itself, which is how a cache or concurrency fix lands in one and not the other.
40
+
7
41
  ## [0.12.0] - 2026-11-03
8
42
 
9
43
  ### The panel answers "which one", not "show me everything"
@@ -581,6 +615,7 @@ point is now one search field above the tabs.
581
615
  且所有返回值先过 `lib/json.js#lossless`。
582
616
 
583
617
  [Unreleased]: https://github.com/dsh-agent-roster/dsh-agent-roster/compare/v0.12.0...main
618
+ [0.13.0]: https://github.com/dsh-agent-roster/dsh-agent-roster/compare/v0.12.0...v0.13.0
584
619
  [0.12.0]: https://github.com/dsh-agent-roster/dsh-agent-roster/compare/v0.11.1...v0.12.0
585
620
  [0.11.1]: https://github.com/dsh-agent-roster/dsh-agent-roster/compare/v0.11.0...v0.11.1
586
621
  [0.11.0]: https://github.com/dsh-agent-roster/dsh-agent-roster/compare/v0.10.7...v0.11.0
package/README.md CHANGED
@@ -306,22 +306,30 @@ id belongs to the team, and the plugin never writes team state. What it does own
306
306
  failure that only exists on a red card never reaches the next compile, which is exactly how a gate
307
307
  turns into decoration.
308
308
 
309
- ## Find one roster, not a catalogue
309
+ ## The library tab: find by capability, not by source
310
310
 
311
- The panel used to open on a list of collections. That answers "what is published"; the question people
312
- actually arrive with is "who can do this". So the first control is now one search field above the tabs:
311
+ The panel opens on **Library**, which is meant to read like a plugin marketplace: one search field, one row
312
+ of tags, and one list that spans this machine and every subscribed source.
313
313
 
314
314
  ```
315
315
  要找什么能力?例:数据质量、发版、代码评审
316
316
  ```
317
317
 
318
- It searches this machine and every subscribed source in one request. Each row says **why** it matched
319
- (`标签:数据质量 · 成员角色:数据质量工程师`) and where it lives (`来自 agent-roster-collective`), and
320
- carries the action you need next — open it locally, or pull that collection from the row.
318
+ Two characters in, after a 240 ms pause, the panel asks `/search` a question. Every row says **why** it
319
+ matched (`标签:数据质量 · 成员角色:数据质量工程师`) and where it lives (`来自 agent-roster-collective`),
320
+ and carries the next action — open it locally, or pull that collection — inside the row.
321
+
322
+ With an empty field it **browses**: `/catalog` flattens this machine and the subscribed sources in one
323
+ response, the tag strip summarises every tag in view with its count (multiple tags are AND), and the
324
+ segmented control switches between **by source** (this machine, then one group per collection) and **flat**
325
+ (one list, source named per row). Tag filtering is view state only; it never writes back to a file.
321
326
 
322
327
  Multiple words are AND, not OR: `data kubernetes` returns nothing rather than every roster that merely
323
- mentions "data". Ranking is a pure function in `lib/search.js`, so it is unit-tested rather than
324
- eyeballed.
328
+ mentions "data". Ranking is a pure function in `lib/search.js`, so it is unit-tested rather than eyeballed.
329
+
330
+ Subscribed rosters resolve through `files` in the index, which points at a concrete compiled artifact
331
+ (`dist/<id>-<ver>.json`). The artifact carries its own title, description, tags, licence and maintainers,
332
+ so finding a roster from a distance costs one file — not a clone.
325
333
 
326
334
  ## Tools
327
335
 
@@ -385,7 +393,7 @@ data directory, the team state directory and the version.
385
393
 
386
394
  A badge at the top summarises how many items need attention
387
395
 
388
- 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:
396
+ 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 five tabs — the panel is not only a viewer:
389
397
 
390
398
  | Tab | What you can do |
391
399
  |---|---|
@@ -509,7 +517,7 @@ test/ unit tests
509
517
 
510
518
  Verified on this machine:
511
519
 
512
- - `npm test` — 307/307 passing (format, parse, validate, registry, paths, bridge, verify buckets, digests and provenance, roster diff, capability requirements and the capability gate, library organization, registry schema, 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, the v2 role/roster/compiled layers and their schema alignment, v1→v2 migration, run records feeding the plan, remote registry and one-click install).
520
+ - `npm test` — 308/308 passing (format, parse, validate, registry, paths, bridge, verify buckets, digests and provenance, roster diff, capability requirements and the capability gate, library organization, registry schema, 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, the v2 role/roster/compiled layers and their schema alignment, v1→v2 migration, run records feeding the plan, remote registry and one-click install).
513
521
  - `npm run smoke` — `apply()` registers all six tools through a real `defineTool` from a DSH bundle; `roster_list` / `roster_show` / `roster_create` / `roster_verify` / `roster_diff` 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.
514
522
  - CLI: `validate --dir examples` returns exit 0 over both example libraries.
515
523
  - 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
@@ -292,21 +292,27 @@ node bin/cli.mjs compile --roster examples-orchestration/rosters/core-review \
292
292
 
293
293
  回执由执行施工图的队长会话写,不由插件写:任务 id 属于团队,插件从不写团队状态。插件负责的是合并——只活在红卡上的失败,下一次编译就消失了,门也就变成了装饰。
294
294
 
295
- ## 找一份档案,而不是翻一个目录
295
+ ## 档案库:按能力找,而不是按来源翻
296
296
 
297
- 面板原来从「合集」进:先展开一个来源,再看里面有什么。那回答的是「发布了什么」,而人真正带来的
298
- 问题是「谁会做这件事」。所以现在第一个控件就是页签上方的一个搜索框:
297
+ 面板的第一个页签是**档案库**,定位接近一个插件市场:一个搜索框、一排标签、一份横跨本机与所有订阅来源的清单。
299
298
 
300
299
  ```
301
300
  要找什么能力?例:数据质量、发版、代码评审
302
301
  ```
303
302
 
304
- 一次请求同时搜本机与所有订阅来源。每一行都写清**为什么命中**(`标签:数据质量 · 成员角色:数据质量工程师`)
305
- 与**它住在哪**(`来自 agent-roster-collective`),并且把下一步动作放在行内:本机的直接打开,远端的
306
- 当场把这个集合拉下来。
303
+ 输入两个字以上,停顿 240 毫秒后向 `/search` 提一个问题。每一行都写清**为什么命中**
304
+ (`标签:数据质量 · 成员角色:数据质量工程师`)与**它住在哪**(`来自 agent-roster-collective`),
305
+ 并把下一步放在行内:本机的「打开」,远端的「拉取」。
306
+
307
+ 不输入时是**浏览**:`/catalog` 一次把本机与订阅来源摊平返回;上方标签池汇总全库出现过的标签与计数,
308
+ 多选是「且」;右侧可以在**按来源**(本机 + 每个 collection 各一组)与**平铺**(一份清单,来源写在行内)
309
+ 之间切换。标签筛选只影响视图,不写回文件。
307
310
 
308
311
  多个词是「且」不是「或」:`data kubernetes` 一条都不返,而不是把所有提到 data 的档案都堆上来。
309
- 排序逻辑是 `lib/search.js` 里的纯函数,因此它被单测钉住,而不是靠肉眼看着顺。
312
+ 排序是 `lib/search.js` 里的纯函数,所以它被单测钉住,而不是靠肉眼看着顺。
313
+
314
+ 订阅来源的档案在索引里由 `files` 指向具体的编译产物(`dist/<id>-<ver>.json`)。产物自带标题、描述、
315
+ 标签、许可与维护者——「从远处找一份档案」因此只需要拉一个文件,不必先克隆一个仓库。
310
316
 
311
317
  ## 工具
312
318
 
@@ -363,10 +369,11 @@ node bin/cli.mjs compile --roster examples-orchestration/rosters/core-review \
363
369
  团队状态目录与版本号也列在同一处。导入与新建档案挪到档案页签的搜索框右侧,刷新只属于档案源页签
364
370
  (绕过一小时的缓存,直接回源读公共索引)。
365
371
 
366
- 客户端插件在左侧全局栏新增一行 **Agent Roster** 图标(`sidebar.panellist` 列表槽),并在 `main` 槽用同一个面板 id 注册整页内容;点图标即在主区域打开,宽度与对话页一致。面板分三个页签,不只是看:
372
+ 客户端插件在左侧全局栏新增一行 **Agent Roster** 图标(`sidebar.panellist` 列表槽),并在 `main` 槽用同一个面板 id 注册整页内容;点图标即在主区域打开,宽度与对话页一致。面板分五个页签,不只是看:
367
373
 
368
374
  | 页签 | 能做什么 |
369
375
  |---|---|
376
+ | 档案库 | 按能力找档案:搜索(横跨本机与订阅来源,命中给出处)、标签筛选、按来源聚合或平铺,行内直接打开或拉取 |
370
377
  | 档案 | 浏览每个工作区 × 每座档案库,展开成员;**新建 / 编辑 / 复制 / 删除 / 导入 / 导出**档案。编辑器有表单与源码两种模式(源码就是文件原文);写之前由宿主校验,覆盖已有文件会留一份 `.bak` |
371
378
  | 团队 | 读一个配置好的状态目录(默认 `.agent-teams`),列出运行时真正建出来的每个团队:档案、成员档案与模型路由、每个持久化成员是否真的与其档案一致,以及该团队的任务 |
372
379
  | 档案源 | 列出订阅的公共 registry 目录,每个 collection 一个「拉取到本机」按钮;可展开先看里面有哪些档案 |
@@ -479,7 +486,7 @@ test/ 单测
479
486
 
480
487
  本机已验证:
481
488
 
482
- - `npm test` —— 307/307 通过(格式、解析、校验、扫描、路径、桥接、核对四桶、摘要与溯源、档案差异、能力要求与能力闸门、档案库组织、索引 schema、无损 JSON、写入计划与执行、六条路由、快照与提示、两本词典一致、工具契约、客户端加载器契约、包清单、配置视图、样式 token 约束、声明层字段与队长段、schema 与常量对齐、v2 角色/组装/编译三层及其 schema 对齐、v1→v2 迁移、执行回执并入施工图)。
489
+ - `npm test` —— 308/308 通过(格式、解析、校验、扫描、路径、桥接、核对四桶、摘要与溯源、档案差异、能力要求与能力闸门、档案库组织、索引 schema、无损 JSON、写入计划与执行、六条路由、快照与提示、两本词典一致、工具契约、客户端加载器契约、包清单、配置视图、样式 token 约束、声明层字段与队长段、schema 与常量对齐、v2 角色/组装/编译三层及其 schema 对齐、v1→v2 迁移、执行回执并入施工图)。
483
490
  - `npm run smoke` —— 用真实 DSH bundle 的 `defineTool` 注册六个工具,逐个调用:输出全部通过无损校验、`path` 覆盖生效、释放干净;同一条命令随后用桩模块表加载 `client.js`,断言三处槽位注册、样式只注入一次、effect 可回收。
484
491
  - CLI:`validate --dir examples` 对两座示例库退出码 0。
485
492
  - 用插件管理器真的装进了本机 profile(`plugin_manager install_bundle` 指向本仓库 → `link:` 依赖 + bundle 条目),重启后按链接读取本仓库文件。