@stofone/dsh-agent-roster 0.6.2 → 0.8.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 (45) hide show
  1. package/CHANGELOG.md +98 -1
  2. package/LICENSE +21 -21
  3. package/README.md +407 -319
  4. package/README.zh.md +95 -9
  5. package/bin/cli.mjs +10 -0
  6. package/index/registry.json +45 -1
  7. package/index.js +2 -2
  8. package/lib/bridge.js +89 -10
  9. package/lib/capabilities.js +434 -0
  10. package/lib/diff.js +216 -0
  11. package/lib/digest.js +65 -0
  12. package/lib/format.js +4 -5
  13. package/lib/library.js +5 -0
  14. package/lib/organization.js +331 -0
  15. package/lib/registry.js +209 -4
  16. package/lib/render.js +253 -7
  17. package/lib/tools.js +251 -23
  18. package/lib/verify.js +135 -10
  19. package/orgs/agent-roster-collective/api-design/roster.yaml +67 -0
  20. package/orgs/agent-roster-collective/content-ops/roster.yaml +55 -0
  21. package/orgs/agent-roster-collective/contract-review/roster.yaml +58 -0
  22. package/orgs/agent-roster-collective/data-quality/roster.yaml +64 -0
  23. package/orgs/agent-roster-collective/db-migration/roster.yaml +64 -0
  24. package/orgs/agent-roster-collective/docs-writer/roster.yaml +59 -0
  25. package/orgs/agent-roster-collective/finance-recon/roster.yaml +63 -0
  26. package/orgs/agent-roster-collective/frontend-ui/roster.yaml +60 -0
  27. package/orgs/agent-roster-collective/i18n-l10n/roster.yaml +60 -0
  28. package/orgs/agent-roster-collective/incident-response/roster.yaml +65 -0
  29. package/orgs/agent-roster-collective/literature-review/roster.yaml +61 -0
  30. package/orgs/agent-roster-collective/market-research/roster.yaml +60 -0
  31. package/orgs/agent-roster-collective/ml-eval/roster.yaml +63 -0
  32. package/orgs/agent-roster-collective/organization.yaml +118 -0
  33. package/orgs/agent-roster-collective/performance/roster.yaml +63 -0
  34. package/orgs/agent-roster-collective/product-discovery/roster.yaml +55 -0
  35. package/orgs/agent-roster-collective/qa-regression/roster.yaml +64 -0
  36. package/orgs/agent-roster-collective/recruiting/roster.yaml +58 -0
  37. package/orgs/agent-roster-collective/release-manager/roster.yaml +59 -0
  38. package/orgs/agent-roster-collective/security-audit/capabilities.yaml +12 -0
  39. package/orgs/agent-roster-collective/security-audit/roster.yaml +65 -0
  40. package/orgs/agent-roster-collective/sre-oncall/roster.yaml +60 -0
  41. package/orgs/agent-roster-collective/support-triage/roster.yaml +58 -0
  42. package/package.json +5 -1
  43. package/schema/capabilities.v1.schema.json +124 -0
  44. package/schema/organization.v1.schema.json +50 -0
  45. package/schema/registry.v1.schema.json +83 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,101 @@
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
+ ## [Unreleased]
6
+
7
+ ## [0.8.0] - 2026-11-02
8
+
9
+ ### Library organization (new root file)
10
+
11
+ - **`organization.yaml`** — an optional file at the library root, beside the roster directories.
12
+ It declares which rosters belong to the library, their status (`active` | `archived`) and where
13
+ they came from. It is the only file allowed to sit at the root, and it still cannot create
14
+ anything: no teams, no members, no `agent_teams_add_member` arguments.
15
+ - **Three-way cross-check against the disk**, surfaced as diagnostics the panel already renders:
16
+ declared but missing → **error**, present but undeclared → **warn**, declared `archived` but
17
+ still in the library → **info**. Archiving is a declaration, not a deletion.
18
+ - **`roster_list` and `dsh-agent-roster validate` show it** (`organization=<id>`, the counts, and
19
+ per-file `organization` / `organizationCheck` in `--json`);
20
+ `schema/organization.v1.schema.json` covers the file for editor-side validation.
21
+ - **`orgs/agent-roster-collective/`** ships as a worked example: 21 self-authored rosters
22
+ (63 members) covering review, incident response, data, docs, release, research and more.
23
+ - **`security-audit/capabilities.yaml`** in that example shows the two-file library: a roster plus
24
+ its declared requirements, with `onMissing: degraded` so a deployment without the policy still
25
+ builds the team but reports the gap instead of pretending it passed.
26
+
27
+ ### Registry schema (new file)
28
+
29
+ - **`schema/registry.v1.schema.json`** — the shipped `index/registry.json` pointed at a schema that
30
+ did not exist, so editors had nothing to lint against. The file now exists, mirrors
31
+ `lib/remote.js#validateRegistry`, and `test/registry-schema.test.js` keeps the two aligned
32
+ (field sets, id/repo/ref/path patterns, collection and roster limits).
33
+
34
+ ### Removed
35
+
36
+ - **`INDEX_KIND`** (`dsh-agent-roster-index/v1`). Nothing ever produced that document: a registry
37
+ collection already carries its `rosters` list, and `registry sync` recomputes it from the
38
+ repository. Keeping a second manifest format would have been a second source of truth.
39
+
40
+ ## [0.7.0] - 2026-11-02
41
+
42
+ ### Honest verification (issue #2)
43
+
44
+ - **`omitted` is split in two.** "The roster did not declare this field" and "the roster declared
45
+ a value, the runtime never persisted it" used to collapse into one status that the summary
46
+ counted as "not degraded". They are now `omitted` (nothing to check, expected) and
47
+ `not-persisted` (sent, no receipt, counted as degraded). `systemPrompt` lands in the second
48
+ bucket because `team.json` members have no `executionPrompt` key at all — the persona was
49
+ never actually verified before.
50
+ - **One predicate instead of three.** `isBindingFaithful` now delegates to
51
+ `summarizeBinding(...).faithful`, so the note and the implementation cannot drift apart again.
52
+ - **Four mutually exclusive buckets** in `roster_verify`: `faithful` / `unverified` / `drift` /
53
+ `missing`. `ok` requires `drift === 0 && missing === 0`, and `unverified` is printed on the
54
+ status line and the summary instead of hiding inside "degraded".
55
+ - **Materialised tool filters are visible.** Each member shows `deny`/`allow` counts and a
56
+ digest of the normalised list; the same `toolPolicy` materialising into two different deny
57
+ lists inside one team is reported as policy drift.
58
+ - **Provenance.** `roster_create` emits `roster:<id>@<version>#<sha8>` for the created team's
59
+ description; `roster_verify` parses it back and reports `absent` / `id-only` / `match` /
60
+ `differ` / `unknown-roster`. The plugin still never writes team state.
61
+ - **New tool `roster_diff`** — roster-to-roster diff for generation hand-over: members matched
62
+ by name (`aliases` are a hint, never auto-merged), effective values compared with their
63
+ origin, persona compared by length and hash only.
64
+
65
+ ### Capability requirements (new sibling file)
66
+
67
+ - **`capabilities.yaml`** — an optional file next to `roster.yaml` that declares what the
68
+ deployment must provide: `requires.skills`, `requires.toolPolicies`, `onMissing`
69
+ (`refuse` | `degraded`), `asOf` (date only) and `notes`. Unknown keys and unknown requirement
70
+ categories are errors: model routing, plugin versions, credential pointers and business
71
+ preconditions have no evidence source, so declaring them would only manufacture a new kind of
72
+ false green.
73
+ - **Three states, not two.** `checkCapabilities` answers `present` / `missing` / `unknown`;
74
+ only `missing` (the evidence source explicitly says no) trips the gate. `unknown` is neither a
75
+ pass nor a failure and is always printed.
76
+ - **`roster_create` refuses instead of warning.** With a `missing` requirement under
77
+ `onMissing: refuse` it emits no `agent_teams_add_member` argument at all and prints where each
78
+ requirement has to be installed. `onMissing: degraded` hands over the arguments and records
79
+ the debt.
80
+ - **`roster_verify`** gains `requires=<missing>missing/<declared>` and `capabilityBlocked` in its
81
+ status line, a capability section in the body, `ok` includes `capabilityBlocked === 0`, and a
82
+ structured `capabilities` field.
83
+ - **`roster_show`** prints the declaration block.
84
+ - New `schema/capabilities.v1.schema.json`, pinned to `lib/capabilities.js` by
85
+ `test/capabilities.test.js`.
86
+
87
+ - **The panel sees it.** Capability requirements surface as roster diagnostics: a missing
88
+ `toolPolicies` requirement is `error` under `refuse` (the sidebar badge turns red) and `warn`
89
+ under `degraded`; skill requirements are `capability-skills-unverified` / `info` because the
90
+ panel snapshot is synchronous and cannot enumerate the catalogue; an unset `knownToolPolicies`
91
+ yields one `capability-cross-check-skipped` entry naming the affected rosters.
92
+
93
+ ### Docs
94
+
95
+ - README (both languages): six tools, the new verification buckets, `roster_diff`, a
96
+ "one roster per directory, two generations per machine" section answering how to keep both
97
+ generations side by side, and a "capability requirements" section covering the three-state
98
+ check and the gate.
99
+
5
100
  ## [0.6.2] - 2026-10-30
6
101
 
7
102
  ### Packaging
@@ -201,5 +296,7 @@
201
296
  - 工具返回值含 `undefined` 键,运行时按 `value is not lossless JSON` 整次拒绝;缺失值统一写 `null`,
202
297
  且所有返回值先过 `lib/json.js#lossless`。
203
298
 
204
- [Unreleased]: https://github.com/STofone/dsh-agent-roster/compare/v0.2.0...main
299
+ [Unreleased]: https://github.com/STofone/dsh-agent-roster/compare/v0.8.0...main
300
+ [0.8.0]: https://github.com/STofone/dsh-agent-roster/releases/tag/v0.8.0
301
+ [0.7.0]: https://github.com/STofone/dsh-agent-roster/releases/tag/v0.7.0
205
302
  [0.2.0]: https://github.com/STofone/dsh-agent-roster/releases/tag/v0.2.0
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 STofone
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 STofone
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.