dsh-agent-control-center 0.3.0 → 0.4.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 +55 -0
- package/README.md +9 -5
- package/README.zh.md +6 -4
- package/client.js +1110 -12
- package/docs/01-CONTRACT.md +1 -1
- package/docs/05-ACCEPTANCE-EVIDENCE.md +38 -0
- package/docs/07-GUIDE.md +1 -1
- package/docs/09-ARCHITECTURE.md +2 -2
- package/docs/10-INSTRUCTION-PREVIEW.md +41 -0
- package/docs/11-EXPORT.md +45 -0
- package/docs/12-PLUGIN-HEALTH.md +49 -0
- package/index.js +4 -1
- package/lib/core/index.js +15 -1
- package/lib/core/store.js +5 -1
- package/lib/modules/j-instruction.js +162 -2
- package/lib/modules/l-health.js +862 -0
- package/package.json +1 -1
- package/scripts/verify.mjs +1 -0
- package/src/client/i18n/health.js +260 -0
- package/src/client/i18n/instruction.js +10 -10
- package/src/client/pages/health.js +832 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0 — 2026-11-29
|
|
4
|
+
|
|
5
|
+
Verified against DSH `0.2.2-rc.5` on an isolated profile. This release makes the
|
|
6
|
+
plugin's own installation auditable and records instruction size over time.
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- **Plugin health (module L, page 12)**: four read-only facts in one verdict.
|
|
11
|
+
*Plugins* from `pluginManager.listPlugins()` with `readOnlyReason` anomalies;
|
|
12
|
+
*settings namespaces* from `settings.describe({redactSecrets:true})` projected
|
|
13
|
+
to metadata only (`ns`/`revision`/`autoGenerate`/`secretKeys`) plus a
|
|
14
|
+
`redactionVerified` flag; *section inventory* from a static scan of installed
|
|
15
|
+
client bundles (`settings.section` + neighbouring `id`/`order` literals, sub-slots
|
|
16
|
+
excluded) with duplicate-id conflicts and a documented-scan limitation; and the
|
|
17
|
+
live compatibility verdict from `core.compatibility`.
|
|
18
|
+
Measured live: 206 plugin rows (5 unaddressable build-ins), 22 namespaces,
|
|
19
|
+
0 section conflicts, compat `full` @ 0.2.2-rc.5.
|
|
20
|
+
- **Instruction trend**: `instruction.trend({days})` groups size samples by local
|
|
21
|
+
day (10-minute throttle per directory, 500-sample cap, 180-day retention) and
|
|
22
|
+
reports delta, per-day max and over-budget days. Samples are written to the plugin
|
|
23
|
+
state document; no instruction content is ever recorded.
|
|
24
|
+
- `health.sections().own` reports this plugin's own section id (source
|
|
25
|
+
`plugin-constant`, `scanned:false` when its linked checkout sits outside the
|
|
26
|
+
read fence), so a second package claiming the same id becomes a conflict instead
|
|
27
|
+
of being invisible.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- `store.updateState` now keeps the draft a `void` mutator edited. The mutator type
|
|
32
|
+
documented both forms, but the clone was discarded, silently losing writes.
|
|
33
|
+
- The read fence admits `$DSH_HOME/profiles/<name>/node_modules/**` (plugin code the
|
|
34
|
+
section scan needs) and directory traversal of `profiles`/`profiles/<name>`; profile
|
|
35
|
+
files (`.npmrc`, `cordis.patch.yml`, …) stay refused.
|
|
36
|
+
- `core.compatibility` is exposed to modules so `health.compat` reports the live
|
|
37
|
+
verdict instead of re-evaluating from an unknown version.
|
|
38
|
+
- Contract tests, the verify table and the health aggregate expect **12 modules**;
|
|
39
|
+
the module-settle budget in tests grew from 4 s to 15 s (the contract is "settles",
|
|
40
|
+
not "settles in four seconds").
|
|
41
|
+
|
|
42
|
+
### Tests
|
|
43
|
+
|
|
44
|
+
- 361 behaviour tests (332 → 361): 26 for plugin health, 2 for instruction trend,
|
|
45
|
+
1 for the fence exception. All green.
|
|
46
|
+
|
|
47
|
+
## 0.3.1 — 2026-11-29
|
|
48
|
+
|
|
49
|
+
Patch release: brings the published artifact in line with the repository (0.3.0
|
|
50
|
+
shipped before the acceptance notes, module design docs and one label polish
|
|
51
|
+
landed).
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- Instruction preview labels read as `Files: {count}` / `Preview sections: {count}`
|
|
56
|
+
/ `Sessions loaded: {count}` instead of the longer "共 … 个…" phrasing.
|
|
57
|
+
|
|
3
58
|
## 0.3.0 — 2026-11-29
|
|
4
59
|
|
|
5
60
|
Verified against DSH `0.2.2-rc.5` on an isolated profile. This release answers the
|
package/README.md
CHANGED
|
@@ -14,7 +14,9 @@ safe write path.
|
|
|
14
14
|
|
|
15
15
|
Targets DSH `>=0.2.1-rc.1 <0.3.0`; developed and verified against **DSH 0.2.2-rc.5**.
|
|
16
16
|
|
|
17
|
-

|
|
18
20
|
|
|
19
21
|
*The Overview page on a real DSH 0.2.2-rc.5 deployment: environment, 21/21 host
|
|
20
22
|
capabilities present, module states, and counts that link to their pages.
|
|
@@ -23,7 +25,7 @@ Screenshots live in `docs/assets/` and are excluded from the npm tarball.*
|
|
|
23
25
|
## Pages and status
|
|
24
26
|
|
|
25
27
|
Runtime state comes from `GET /__agent-control-center/health`; the table records
|
|
26
|
-
what the 0.
|
|
28
|
+
what the 0.4.0 acceptance run actually proved (details and evidence levels in
|
|
27
29
|
[docs/05-ACCEPTANCE-EVIDENCE.md](docs/05-ACCEPTANCE-EVIDENCE.md)).
|
|
28
30
|
|
|
29
31
|
| Page | What it gives you | State | Why / data source |
|
|
@@ -37,6 +39,8 @@ what the 0.3.0 acceptance run actually proved (details and evidence levels in
|
|
|
37
39
|
| **Diagnostics** | 22 probes across ten groups with evidence/impact/action, Markdown and JSON export, safe repairs limited to the plugin's own storage, post-repair re-check | FULL | Baseline run: 19 ok / 2 warn / 1 unknown. Egress probing stays `unknown` permanently: the plugin never sends a network request to find out. |
|
|
38
40
|
| **Instruction preview** | read-only view of what the model received: files-side reassembly (labelled approximate, per-chain budget) vs the session-side bytes the host recorded, plus a byte diff | FULL | Live instance: files side 76,621 B exact (both chains inside budget); session side returned 29 recorded blocks (verifying the exact path); a drift of −19,483 B between a June baseline and today's files is surfaced with an explanation. |
|
|
39
41
|
| **Session export** | read-only Markdown/JSON export of one session inside a byte budget (256 KiB default, 1 MiB cap), cut at event boundaries with `truncated`/`omittedEvents` | FULL | Live instance: a 19,345-event session exported 262,069 B and reported 12,623 omitted events; no delete/archive/upload path exists. |
|
|
42
|
+
| **Plugin health** | read-only audit of the plugin inventory, settings namespaces (secrets redacted), `settings.section` id conflicts (static scan of installed client bundles) and the live compatibility verdict | FULL | Live instance: 206 plugin rows (5 unaddressable build-ins), 22 settings namespaces with `redactionVerified` true, section inventory with 0 conflicts, compat `full` @ 0.2.2-rc.5. |
|
|
43
|
+
| **Instruction trend** | size samples recorded whenever a files-side view is generated, grouped by local day (10-minute throttle per directory, 500-sample cap, 180-day retention) | FULL | Live instance: sampling persisted to the plugin state and the trend returned the recorded day. |
|
|
40
44
|
| **Templates** | six bundled templates in five categories, source and rendered preview, variable fill, line-level diff, apply through the AGENTS.md save pipeline, user-template CRUD | FULL | Apply was verified end-to-end through the AGENTS.md pipeline (backup + read-back hash). Templates are data only; executable content is rejected. |
|
|
41
45
|
| **Restart & Resume** | read-only detection of interrupted sessions from recorded event semantics, with evidence and confidence; never resumes anything | PARTIAL | Detection-only by design. Event-semantics detection was verified on a real corpus with no false positives; the `kill -9` crash scene itself was not reproduced (it needs an isolated profile and explicit authorization). |
|
|
42
46
|
|
|
@@ -56,7 +60,7 @@ dsh plugin --profile web add dsh-agent-control-center
|
|
|
56
60
|
|
|
57
61
|
# 2) from a packed tarball
|
|
58
62
|
npm pack
|
|
59
|
-
dsh plugin --profile web add ./dsh-agent-control-center-0.
|
|
63
|
+
dsh plugin --profile web add ./dsh-agent-control-center-0.4.0.tgz
|
|
60
64
|
|
|
61
65
|
# 3) from a local checkout
|
|
62
66
|
dsh plugin --profile web add /absolute/path/to/dsh-agent-control-center
|
|
@@ -67,7 +71,7 @@ Then restart the Web GUI (the Host half mounts its HTTP route at boot) and open
|
|
|
67
71
|
|
|
68
72
|
```bash
|
|
69
73
|
curl -s http://127.0.0.1:<gui-port>/__agent-control-center/health
|
|
70
|
-
# → {"ok":true,"value":{"version":"0.
|
|
74
|
+
# → {"ok":true,"value":{"version":"0.4.0", …, "modules":[ … 12 entries … ]}}
|
|
71
75
|
```
|
|
72
76
|
|
|
73
77
|
Uninstall with `dsh plugin --profile web remove dsh-agent-control-center`.
|
|
@@ -226,7 +230,7 @@ version cannot land.
|
|
|
226
230
|
|
|
227
231
|
| Item | Value |
|
|
228
232
|
|---|---|
|
|
229
|
-
| Plugin version | `0.
|
|
233
|
+
| Plugin version | `0.4.0` |
|
|
230
234
|
| DSH range | `>=0.2.1-rc.1 <0.3.0` (`engines.dsh` and `dsh.compatibility.dsh`) |
|
|
231
235
|
| Verified against | DSH `0.2.2-rc.5` (web profile), Node `v24.22.2`, Linux x86_64 |
|
|
232
236
|
| Node | `>=22.19` (CI: 22 and 24) |
|
package/README.zh.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
## 页面与状态
|
|
19
19
|
|
|
20
|
-
运行期状态来自 `GET /__agent-control-center/health`;下表记录 0.
|
|
20
|
+
运行期状态来自 `GET /__agent-control-center/health`;下表记录 0.4.0 验收实际证明了什么
|
|
21
21
|
(逐条证据与等级见 [docs/05-ACCEPTANCE-EVIDENCE.md](docs/05-ACCEPTANCE-EVIDENCE.md))。
|
|
22
22
|
|
|
23
23
|
| 页面 | 提供什么 | 状态 | 依据 / 数据来源 |
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
| **诊断** | 10 组共 22 项检查(证据/影响/建议)、Markdown 与 JSON 导出、仅限自有存储的安全修复、修复后复检 | FULL | 基线运行:19 通过 / 2 注意 / 1 未知。出网能力检查永久为 `unknown`:插件不会为了探测而发起网络请求。 |
|
|
32
32
|
| **指令预览** | 只读查看模型实际收到的指令:文件侧重组成(标注近似、附每条链预算)与会话侧宿主真实写入的字节,并给出逐字节差 | FULL | 真机:文件侧 76,621 B 精确(两条链都在预算内);会话侧取出 29 个已落盘指令块(验证精确通道);同一会话基线比今天磁盘小 19,483 B,页面给出差异原因。 |
|
|
33
33
|
| **会话导出** | 只读导出单个会话为 Markdown / JSON,带字节上限(默认 256 KiB、上限 1 MiB),按事件边界截断并标注 `truncated`/`omittedEvents` | FULL | 真机:一个 19,345 事件的会话导出 262,069 B 并标注省略 12,623 个事件;不存在删除/归档/上传路径。 |
|
|
34
|
+
| **插件体检** | 只读审计:插件清单、设置命名空间(密钥已脱敏)、`settings.section` id 冲突(静态扫描已装客户端 bundle)、宿主兼容结论 | FULL | 真机:206 条插件行(5 条内置不可寻址)、22 个设置命名空间且 `redactionVerified` 为真、section 清单 0 冲突、compat `full` @ 0.2.2-rc.5。 |
|
|
35
|
+
| **指令趋势** | 每次生成「按文件」视图时记录字节样本,按本地日期聚合(同目录 10 分钟节流、最多 500 条、保留 180 天) | FULL | 真机:样本已写入插件状态,趋势接口返回记录日。 |
|
|
34
36
|
| **模板** | 5 个分类共 6 个内置模板、源码与渲染双视图、变量填充、行级 diff、经 AGENTS.md 保存管线应用、用户模板 CRUD | FULL | 应用已端到端验证(先备份 + 回读 hash 一致)。模板只是数据,可执行内容会被拒绝。 |
|
|
35
37
|
| **中断恢复检测** | 从已记录的事件语义只读检测中断会话,给出证据与置信度;**绝不自动续跑** | PARTIAL | 按设计为检测档。事件语义检测在真实语料上验证且无误报;`kill -9` 崩溃现场本身未复现(需要隔离 profile 与明确授权)。 |
|
|
36
38
|
|
|
@@ -47,7 +49,7 @@ dsh plugin --profile web add dsh-agent-control-center
|
|
|
47
49
|
|
|
48
50
|
# 2) 从打包产物安装
|
|
49
51
|
npm pack
|
|
50
|
-
dsh plugin --profile web add ./dsh-agent-control-center-0.
|
|
52
|
+
dsh plugin --profile web add ./dsh-agent-control-center-0.4.0.tgz
|
|
51
53
|
|
|
52
54
|
# 3) 从本地 checkout 安装
|
|
53
55
|
dsh plugin --profile web add /绝对路径/dsh-agent-control-center
|
|
@@ -58,7 +60,7 @@ dsh plugin --profile web add /绝对路径/dsh-agent-control-center
|
|
|
58
60
|
|
|
59
61
|
```bash
|
|
60
62
|
curl -s http://127.0.0.1:<GUI端口>/__agent-control-center/health
|
|
61
|
-
# → {"ok":true,"value":{"version":"0.
|
|
63
|
+
# → {"ok":true,"value":{"version":"0.4.0", …, "modules":[ … 12 项 … ]}}
|
|
62
64
|
```
|
|
63
65
|
|
|
64
66
|
卸载:`dsh plugin --profile web remove dsh-agent-control-center`。
|
|
@@ -172,7 +174,7 @@ node scripts/release.mjs patch|minor|major [--dry-run] [--notes "text"]
|
|
|
172
174
|
|
|
173
175
|
| 项 | 值 |
|
|
174
176
|
|---|---|
|
|
175
|
-
| 插件版本 | `0.
|
|
177
|
+
| 插件版本 | `0.4.0` |
|
|
176
178
|
| 宿主区间 | `>=0.2.1-rc.1 <0.3.0`(`engines.dsh` 与 `dsh.compatibility.dsh`) |
|
|
177
179
|
| 验证环境 | DSH `0.2.2-rc.5`(web profile)、Node `v24.22.2`、Linux x86_64 |
|
|
178
180
|
| Node | `>=22.19`(CI:22 与 24) |
|