@stofone/dsh-agent-roster 0.10.0 → 0.10.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/CHANGELOG.md CHANGED
@@ -4,6 +4,17 @@
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.10.1] - 2026-11-03
8
+
9
+ ### Docs
10
+
11
+ - The Chinese README said `migrate` was "not implemented", listed one example library where there are
12
+ two, and had a file tree from before `roles/`, `roster.v2` and `compiled.v1` existed — docs that
13
+ describe last week's format read as current, which is worse than no docs.
14
+ - Both READMEs now carry the same two sections: one-command v1→v2 migration (including why role names
15
+ are prefixed and why a colliding captain gets `-captain`), and feeding a failed round back into the
16
+ plan with `compile --run`.
17
+
7
18
  ## [0.10.0] - 2026-11-03
8
19
 
9
20
  ### Roles, rosters and compiled artifacts (v2)
package/README.md CHANGED
@@ -450,7 +450,8 @@ lib/ format, parse, validate, registry, bridge, verify, render, lib
450
450
  config-view, json, http, write, service, teams-state, tools
451
451
  client.js client plugin: sidebar entry, main panel (rosters/teams/health), settings section
452
452
  locale/ panel + listing dictionaries (en/zh)
453
- schema/ roster / capabilities / organization / registry v1 schemas (editor completion; kept aligned by tests)
453
+ schema/ roster v1 / role v1 / roster v2 / compiled v1 / capabilities / organization / registry
454
+ schemas (editor completion; kept aligned by tests)
454
455
  bin/cli.mjs validate/list/compile/migrate/registry for CI
455
456
  scripts/ host-smoke.mjs, client-smoke.mjs, check-locale.mjs (dev only, not shipped)
456
457
  examples/ a v2 library migrated from the v1 archives
package/README.zh.md CHANGED
@@ -82,7 +82,7 @@ captain: # 可选:记录队长(=创建团队的那个
82
82
 
83
83
  JSON 也可以(`roster.json`)。同一目录下按 `roster.yaml` → `roster.yml` → `roster.json` 顺序探测,**只认一份**;出现第二份会报诊断,绝不静默挑一份。
84
84
 
85
- 本包自带两份示例档案库([`examples/`](./examples))。`rosterDirs` 默认留空,也就是上面那座全局库;
85
+ 本包自带两份示例档案库:[`examples/`](./examples)(v2,由本仓历史档案迁移而来)与 [`examples-orchestration/`](./examples-orchestration)(v2,手写,用来演示门与施工图)。`rosterDirs` 默认留空,也就是上面那座全局库;
86
86
  新装时它是空的,所以面板一开始显示「0 份档案」——在面板里新建一份即可(目录会自动创建)。想先看示例库:
87
87
 
88
88
  ```bash
@@ -227,7 +227,7 @@ rosters/<id>/roster.yaml 组装:成员是引用,队长独立成段
227
227
  dist/<id>-<ver>.json 编译产物:自包含、可哈希,消费者只看它
228
228
  ```
229
229
 
230
- 判别键决定版本——`dsh-agent-roster/role@1`、`dsh-agent-roster/roster@2`、`dsh-agent-roster/compiled@1`。同一目录不允许两种格式共存:v1 冻结,`roster migrate`(尚未实现)负责原地重写。
230
+ 判别键决定版本——`dsh-agent-roster/role@1`、`dsh-agent-roster/roster@2`、`dsh-agent-roster/compiled@1`。同一目录不允许两种格式共存:v1 冻结,`migrate` 负责原地重写。
231
231
 
232
232
  拼装写进格式,而不是藏在代码里:
233
233
 
@@ -260,6 +260,28 @@ node bin/cli.mjs compile --roster examples-orchestration/rosters/core-review --j
260
260
 
261
261
  `orchestration` 是格式的一部分,但编译时标 `status: "declaration"`:阶段与门会被校验(门的 `after` 必须指向真实阶段,`by` 必须指向真实成员),但没有任何东西执行它。能声明不等于已被证明会运行,所以产物在 `declarations[]` 里逐条说明谁属于哪一类。完整契约——字段归宿、拼装语义、身份与唯一性、迁移规则——见 [`docs/roster-v2.md`](./docs/roster-v2.md);schema 见 [`schema/role.v1.schema.json`](./schema/role.v1.schema.json)、[`schema/roster.v2.schema.json`](./schema/roster.v2.schema.json)、[`schema/compiled.v1.schema.json`](./schema/compiled.v1.schema.json)。
262
262
 
263
+ ### 从 v1 到 v2,一条命令
264
+
265
+ ```bash
266
+ node bin/cli.mjs migrate --dir examples # 只出计划:要写哪些文件、能不能编译
267
+ node bin/cli.mjs migrate --dir examples --write # 原地重写:roles/ + rosters/ + dist/,删掉旧目录
268
+ ```
269
+
270
+ 迁移逐字保留人设:成员的 `systemPrompt` 原文成为 `roles/<档案>-<成员>/AGENT.md` 的正文,成员本身变成引用。队长不再是一个散字段,而是自己的角色文件——与成员同名时得到 `-captain` 后缀,因为那是两份人设,悄悄合并会丢掉一份。
271
+
272
+ 角色名带档案 id 前缀,是因为 v2 要求同库角色名唯一:一座库里 21 套组装都叫自己的队长 `lead`,不可能有 21 个同名文件。
273
+
274
+ ### 把失败的一轮喂回施工图
275
+
276
+ `compile --run <文件>` 读执行回执(`run@1`),把上一轮的失败并进重试卡的 description:
277
+
278
+ ```bash
279
+ node bin/cli.mjs compile --roster examples-orchestration/rosters/core-review \
280
+ --run examples-orchestration/dist/core-review-1.0.0.run.json
281
+ ```
282
+
283
+ 回执由执行施工图的队长会话写,不由插件写:任务 id 属于团队,插件从不写团队状态。插件负责的是合并——只活在红卡上的失败,下一次编译就消失了,门也就变成了装饰。
284
+
263
285
  ## 工具
264
286
 
265
287
  | 工具 | 作用 |
@@ -405,11 +427,13 @@ lib/ format / parse / validate / registry / bridge / verify / rende
405
427
  config-view / json / http / write / service / teams-state / tools
406
428
  client.js 客户端半边:左侧栏图标 + 主面板(档案/团队/体检)+ 设置页小节
407
429
  locale/ 面板与列表词典(en/zh)
408
- schema/ roster / capabilities / organization / registry v1 schema(编辑器补全用,与校验器由测试对齐)
409
- bin/cli.mjs validate / list / version,给 CI 用
430
+ schema/ roster v1 / role v1 / roster v2 / compiled v1 / capabilities / organization / registry
431
+ schema(编辑器补全用,与校验器由测试对齐)
432
+ bin/cli.mjs validate / list / compile / migrate / registry,给 CI 用
410
433
  scripts/ host-smoke.mjs、client-smoke.mjs、check-locale.mjs(开发用,不随包发布)
411
- examples/ 两座示例档案库
412
- orgs/ 带 organization.yaml 的示例库(21 套档案)
434
+ examples/ 由历史 v1 档案迁移来的 v2 库(roles/ + rosters/ + dist/)
435
+ examples-orchestration/ 手写的 v2 库:编排、门与施工图
436
+ orgs/ 带 organization.yaml 的示例库(21 套 v2 档案)
413
437
  test/ 单测
414
438
  ```
415
439
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stofone/dsh-agent-roster",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "多 Agent 团队的静态成员档案定义与校验层:档案库在面板里看得见、改得动,团队成员的人设、模型与工具边界固化成可校验、可版本化的文件,并在 dsh-agent-teams 创建成员时把档案桥接给运行时。",
5
5
  "type": "module",
6
6
  "main": "index.js",