@stofone/dsh-agent-roster 0.5.0 → 0.5.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
@@ -2,6 +2,24 @@
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.5.1] - 2026-10-29
6
+
7
+ ### Fixed
8
+
9
+ - **配置视图漏了两个字段**:`configView` 只转发了 `rosterDirs`/`knownToolPolicies`/`agentTeamsStateDir`,
10
+ 面板与路由读不到 `indexes` 与 `region`——于是设置里关掉远端(`indexes: false`)不生效、
11
+ `region: china` 也不生效。现在四个字段都转发,`indexes` 的三种取值(`undefined`/空数组 = 官方源、
12
+ `false` = 关掉远端、数组 = 自定义源)原样保留。
13
+ - **缺省档案库目录退回旧的相对路径**:`rosterDirs` 未配置时曾退回 `["rosters"]`(相对当前工作区),
14
+ 与 0.3.0 起的“留空 = 全局库 `$DSH_HOME/agent-roster`”不一致;一键拉取会把档案写进工作区而不是全局库。
15
+ 现在缺省统一为空串(全局库)。测试 162 → 163。
16
+
17
+ ### Added
18
+
19
+ - 官方索引 `index/registry.json` 新增三个迁移自上游的 collection:
20
+ `agent-teams`(wshobson/agents,MIT,4.2 万星)、`metagpt-company`(MetaGPT,MIT)、
21
+ `openmanus`(OpenManus,MIT)。三份档案在各自仓库的 `rosters/<id>/roster.yaml`,可在面板“档案源”页一键拉取。
22
+
5
23
  ## [0.5.0] - 2026-10-29
6
24
 
7
25
  ### Added
package/README.md CHANGED
@@ -245,7 +245,7 @@ An empty library is not an error. A missing one is reported as info, not error.
245
245
 
246
246
  ```bash
247
247
  npm install
248
- npm test # node --test, 162 cases
248
+ npm test # node --test, 163 cases
249
249
  npm run smoke # registers the tools against a real DSH bundle, asserts lossless output
250
250
  node scripts/check-locale.mjs # static t() keys must exist in both dictionaries
251
251
  ```
@@ -269,7 +269,7 @@ test/ unit tests
269
269
 
270
270
  Verified on this machine:
271
271
 
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).
272
+ - `npm test` — 163/163 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
273
  - `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
274
  - CLI: `validate --dir examples` returns exit 0 over both example libraries.
275
275
  - 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
@@ -239,7 +239,7 @@ npx dsh-agent-roster list
239
239
 
240
240
  ```bash
241
241
  npm install
242
- npm test # node --test,162 个用例
242
+ npm test # node --test,163 个用例
243
243
  npm run smoke # 用真实 DSH bundle 注册工具,断言输出可无损往返
244
244
  node scripts/check-locale.mjs # client.js 里的静态 t() 键必须两本词典都有
245
245
  ```
@@ -261,7 +261,7 @@ test/ 单测
261
261
 
262
262
  本机已验证:
263
263
 
264
- - `npm test` —— 162/162 通过(格式、解析、校验、扫描、路径、桥接、核对、无损 JSON、写入计划与执行、六条路由、快照与提示、两本词典一致、工具契约、客户端加载器契约、包清单、配置视图、样式 token 约束、声明层字段与队长段、schema 与常量对齐)。
264
+ - `npm test` —— 163/163 通过(格式、解析、校验、扫描、路径、桥接、核对、无损 JSON、写入计划与执行、六条路由、快照与提示、两本词典一致、工具契约、客户端加载器契约、包清单、配置视图、样式 token 约束、声明层字段与队长段、schema 与常量对齐)。
265
265
  - `npm run smoke` —— 用真实 DSH bundle 的 `defineTool` 注册五个工具,逐个调用:输出全部通过无损校验、`path` 覆盖生效、释放干净;同一条命令随后用桩模块表加载 `client.js`,断言三处槽位注册、样式只注入一次、effect 可回收。
266
266
  - CLI:`validate --dir examples` 对两座示例库退出码 0。
267
267
  - 用插件管理器真的装进了本机 profile(`plugin_manager install_bundle` 指向本仓库 → `link:` 依赖 + bundle 条目),重启后按链接读取本仓库文件。
@@ -13,11 +13,85 @@
13
13
  "repo": "github:STofone/dsh-agent-roster",
14
14
  "ref": "main",
15
15
  "path": "examples",
16
- "rosters": ["core-review", "research"],
17
- "tags": ["starter", "review", "research"],
16
+ "rosters": [
17
+ "core-review",
18
+ "research"
19
+ ],
20
+ "tags": [
21
+ "starter",
22
+ "review",
23
+ "research"
24
+ ],
18
25
  "license": "MIT",
19
- "maintainers": ["STofone"],
26
+ "maintainers": [
27
+ "STofone"
28
+ ],
20
29
  "homepage": "https://github.com/STofone/dsh-agent-roster#examples"
30
+ },
31
+ {
32
+ "id": "agent-teams",
33
+ "title": "Agent Teams(wshobson/agents 迁移)",
34
+ "description": "把 wshobson/agents 的 agent-teams 插件(4.2 万星,MIT)迁成档案:队长、实现者、审查者、调试者,保留上游工具边界。",
35
+ "repo": "github:STofone/dsh-roster-agent-teams",
36
+ "ref": "main",
37
+ "path": "rosters",
38
+ "rosters": [
39
+ "agent-teams"
40
+ ],
41
+ "tags": [
42
+ "team",
43
+ "orchestration",
44
+ "claude-code",
45
+ "wshobson"
46
+ ],
47
+ "license": "MIT",
48
+ "maintainers": [
49
+ "STofone"
50
+ ],
51
+ "homepage": "https://github.com/STofone/dsh-roster-agent-teams"
52
+ },
53
+ {
54
+ "id": "metagpt-company",
55
+ "title": "MetaGPT 软件公司(迁移)",
56
+ "description": "MetaGPT(5 万星+,MIT)的软件公司角色:产品经理、架构师、项目经理、工程师,字段取自上游 Role 的 profile/goal/constraints。",
57
+ "repo": "github:STofone/dsh-roster-metagpt-company",
58
+ "ref": "main",
59
+ "path": "rosters",
60
+ "rosters": [
61
+ "metagpt-company"
62
+ ],
63
+ "tags": [
64
+ "software-company",
65
+ "sdlc",
66
+ "metagpt"
67
+ ],
68
+ "license": "MIT",
69
+ "maintainers": [
70
+ "STofone"
71
+ ],
72
+ "homepage": "https://github.com/STofone/dsh-roster-metagpt-company"
73
+ },
74
+ {
75
+ "id": "openmanus",
76
+ "title": "OpenManus 三件套(迁移)",
77
+ "description": "OpenManus(5.8 万星,MIT)的三个代理提示词:规划、编码、浏览器,systemPrompt 保留上游原文。",
78
+ "repo": "github:STofone/dsh-roster-openmanus",
79
+ "ref": "main",
80
+ "path": "rosters",
81
+ "rosters": [
82
+ "openmanus"
83
+ ],
84
+ "tags": [
85
+ "agent",
86
+ "browser",
87
+ "coding",
88
+ "openmanus"
89
+ ],
90
+ "license": "MIT",
91
+ "maintainers": [
92
+ "STofone"
93
+ ],
94
+ "homepage": "https://github.com/STofone/dsh-roster-openmanus"
21
95
  }
22
96
  ]
23
97
  }
@@ -31,21 +31,24 @@ function read(cell, fallback) {
31
31
  /**
32
32
  * 把 Config 解析结果包成带 getter 的视图。
33
33
  *
34
- * 只暴露插件真正使用的三项;其余字段一律不转发,避免下游误把引用对象当数据用。
34
+ * 只转发插件真正使用的字段;其余一律不透传,避免下游误把引用对象当数据用。
35
35
  *
36
36
  * @param {object} config `apply(ctx, config)` 收到的配置
37
37
  * @returns {{
38
38
  * rosterDirs: string[],
39
39
  * knownToolPolicies: string[],
40
40
  * agentTeamsStateDir: string,
41
+ * indexes: unknown,
42
+ * region: string,
41
43
  * }}
42
44
  */
43
45
  export function configView(config) {
44
46
  const source = config ?? {};
45
47
  return {
46
48
  get rosterDirs() {
47
- const dirs = read(source.rosterDirs, ["rosters"]);
48
- return Array.isArray(dirs) ? dirs : ["rosters"];
49
+ // 缺省 = 空串 = 机器级全局库($DSH_HOME/agent-roster),与 0.3.0 起的默认一致。
50
+ const dirs = read(source.rosterDirs, [""]);
51
+ return Array.isArray(dirs) ? dirs : [""];
49
52
  },
50
53
  get knownToolPolicies() {
51
54
  const policies = read(source.knownToolPolicies, []);
@@ -55,5 +58,19 @@ export function configView(config) {
55
58
  const dir = read(source.agentTeamsStateDir, ".agent-teams");
56
59
  return typeof dir === "string" && dir !== "" ? dir : ".agent-teams";
57
60
  },
61
+ /**
62
+ * 索引源。三种取值都必须原样保留:
63
+ * `undefined`/空数组 = 官方源;显式 `false` = 完全关掉远端;数组 = 自定义源。
64
+ */
65
+ get indexes() {
66
+ if (typeof source.indexes === "object" && source.indexes !== null && typeof source.indexes.get === "function") {
67
+ return source.indexes.get();
68
+ }
69
+ return source.indexes;
70
+ },
71
+ get region() {
72
+ const region = read(source.region, "auto");
73
+ return typeof region === "string" && region !== "" ? region : "auto";
74
+ },
58
75
  };
59
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stofone/dsh-agent-roster",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "多 Agent 团队的静态成员档案定义与校验层:档案库在面板里看得见、改得动,团队成员的人设、模型与工具边界固化成可校验、可版本化的文件,并在 dsh-agent-teams 创建成员时把档案桥接给运行时。",
5
5
  "type": "module",
6
6
  "main": "index.js",