agentworkshop 0.7.64 → 0.7.66

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 (52) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{DAfWhONg.js → 1NcBJMyL.js} +3 -3
  3. package/.output/public/_nuxt/{CKE_kTL92.js → Bb4REys92.js} +1 -1
  4. package/.output/public/_nuxt/{CVUMEGa1.js → Bnf04goH.js} +1 -1
  5. package/.output/public/_nuxt/{Cuw2--X2.js → CJPIo2E7.js} +1 -1
  6. package/.output/public/_nuxt/{CkYk8bj02.js → Cfy5Jn8v2.js} +1 -1
  7. package/.output/public/_nuxt/{DSWuWYx_2.js → DBERjwK92.js} +1 -1
  8. package/.output/public/_nuxt/DG0esyZR.js +1 -0
  9. package/.output/public/_nuxt/{B5RD2ZST.js → DPP0W5Ni.js} +1 -1
  10. package/.output/public/_nuxt/{DqT2_Jtw2.js → DxJFBokW2.js} +1 -1
  11. package/.output/public/_nuxt/{Cnf1PFhB2.js → GKiBVVYe2.js} +1 -1
  12. package/.output/public/_nuxt/{Dc5NeCDq.js → H13l21fR.js} +1 -1
  13. package/.output/public/_nuxt/{Cdw4juXw.js → XErFZOU9.js} +1 -1
  14. package/.output/public/_nuxt/builds/latest.json +1 -1
  15. package/.output/public/_nuxt/builds/meta/8bf65244-eb00-45c7-be23-9dcd7b917ef3.json +1 -0
  16. package/.output/public/_nuxt/{D-z6N1Cz.js → kYyvM13M.js} +1 -1
  17. package/.output/public/_nuxt/{B0w8DZ4C.js → t54AYjsC.js} +1 -1
  18. package/.output/server/chunks/_/nitro.mjs +1220 -904
  19. package/.output/server/chunks/_/nitro.mjs.map +1 -1
  20. package/.output/server/chunks/build/useWorkshopWs-CM-Ywk4h.mjs.map +1 -1
  21. package/.output/server/chunks/routes/renderer.mjs +1 -1
  22. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  23. package/.output/server/package.json +1 -1
  24. package/README-zh.md +8 -6
  25. package/README.md +7 -5
  26. package/app/stores/workshop/notifications.ts +22 -1
  27. package/config.yml +1 -1
  28. package/docs/cli.en.md +2 -2
  29. package/docs/cli.md +2 -2
  30. package/docs/full-test-plan.md +1 -1
  31. package/docs/plugins.en.md +1 -1
  32. package/docs/plugins.md +1 -1
  33. package/docs/sdk.en.md +1 -1
  34. package/docs/sdk.md +1 -1
  35. package/package.json +1 -1
  36. package/server/plugins-builtin/diag-bridge/client.mjs +230 -132
  37. package/server/plugins-builtin/diag-bridge/i18n.json +45 -15
  38. package/server/plugins-builtin/rag-bridge/client.mjs +182 -108
  39. package/server/plugins-builtin/rag-bridge/i18n.json +84 -60
  40. package/server/services/workshop/agents/host-tool-bridge/dispatch.ts +5 -0
  41. package/server/services/workshop/agents/industrial/aml-dataset-tools.ts +14 -0
  42. package/server/services/workshop/agents/industrial/dcw-judge-tools.ts +7 -2
  43. package/server/services/workshop/agents/industrial/dcw-tools.ts +5 -3
  44. package/server/services/workshop/agents/industrial/line-tools.ts +16 -3
  45. package/server/services/workshop/agents/industrial/optimization-tools.ts +10 -0
  46. package/server/services/workshop/agents/industrial/param-tools.ts +1 -84
  47. package/server/services/workshop/agents/industrial/tool-verify.ts +373 -0
  48. package/server/services/workshop/agents/industrial/twin-tools.ts +5 -0
  49. package/server/services/workshop/runtime/manager/channel-template-constants.ts +20 -0
  50. package/server/services/workshop/runtime/manager/channel-templates.ts +3 -12
  51. package/.output/public/_nuxt/DIDbAMv5.js +0 -1
  52. package/.output/public/_nuxt/builds/meta/1809e625-ff1d-4fd5-9ad2-28cea81f06ab.json +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentworkshop-prod",
3
- "version": "0.7.64",
3
+ "version": "0.7.66",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "dependencies": {
package/README-zh.md CHANGED
@@ -28,7 +28,7 @@
28
28
 
29
29
  **[English](./README.md)** · **[在线文档](https://kingdol666.github.io/AgentWorkShop)** · **[版本发布](https://github.com/kingdol666/AgentWorkShop/releases)** · **[更新日志](./changelog.md)** · **[插件 API](./docs/plugins.md)** · **[SDK](./docs/sdk.md)**
30
30
 
31
- <sub><b>v0.7.63</b> · 14 个执行引擎 · 6 种现场协议(5 内置 + 串口插件)+ MES REST 集成 · 数据分析台账(产线级权限隔离)· 119 个运行时设置项 · 双语文档(简体中文 / English)</sub>
31
+ <sub><b>v0.7.66</b> · 14 个执行引擎 · 6 种现场协议(5 内置 + 串口插件)+ MES REST 集成(镜像与直连双路径)· 数据分析台账(产线级权限隔离)· 工具调用参数/绑定预检 · 82 个宿主工具 · 119 个运行时设置项 · 双语文档(简体中文 / English)</sub>
32
32
 
33
33
  <br />
34
34
 
@@ -154,7 +154,7 @@ AgentWorkShop 起家于**多智能体软件工作坊**——Channel 内的编码
154
154
  | **Channel 群聊与原生 HITL** | 频道时间线是真正的群聊:成员请求升级为**可追踪作业**(不是一条会丢的消息);带原生 ask 能力的引擎(如 `omp`)把 HITL 提问路由进平台——您批准一次,引擎带着回执继续跑。成员权限与用户通知是一等公民。 |
155
155
  | **定时任务** | 任意 Channel 任务可挂上**调度**——固定 `interval`(60s 下限)或 `daily` 每日定点——在 `/workshop/schedules` 页或 REST API 管理,带逐次运行历史、忙等守卫(频道仍有在飞任务时触发顺延)与 Channel 级可见性。 |
156
156
  | **持久记忆与频道过程记忆** | 私有 + Channel 共享双域;FTS5 CJK 切分,可选向量混合检索,token 预算注入。其上是**过程记忆**:确定性的 root/child/lead 事件名契约、canonical root 摘要、持久 outbox(死信 + 补偿 worker),让一个目标的来龙去脉跨重启存活。 |
157
- | **四个入口** | 一个 manager 坐在每扇门后:**WS**(AEP v1 事件流,seq 续传)、**MCP**(约 25 个进程内工具)、**A2A**(JSON-RPC 2.0 + AgentCard)、**REST**。 |
157
+ | **四个入口** | 一个 manager 坐在每扇门后:**WS**(AEP v1 事件流,seq 续传)、**MCP**(38 个进程内工具)、**A2A**(JSON-RPC 2.0 + AgentCard)、**REST**。 |
158
158
 
159
159
  #### 工业栈
160
160
 
@@ -167,9 +167,10 @@ AgentWorkShop 起家于**多智能体软件工作坊**——Channel 内的编码
167
167
  | **Recipe 版本化治理** | 参数修改按版本入史(归因 用户/Agent/系统 + 操作者 + 原因)。可非破坏地回退到任意修订版或最近一次良好批次。失效节点参数跳过并明确标识。 |
168
168
  | **配方链路优化闭环** | Agent 像人类工艺员一样通过配方管理做优化:`recipe_trial` 把多参数候选**整批试验(不写版本)**→ 复测 → 有进步用 `recipe_update` 固化(同一配方 id,版本+1)→ 劣化触发**统一回退**(`recipe_rollback` 带 `dispatch:true` = 定义回退 + PLC 整批恢复)。单参数直调移出闭环;试验受四层限界与同线节拍卡控。 |
169
169
  | **频道绑定产线(只读授权)** | 频道可绑定一条产线:全员无需节点绑定即可读取该线的运维日志、配方历史与实时状态(工具回执标注「频道绑定,只读」),写操作仍需节点授权。产线简报自动注入成员提示词;换绑即时回收成员运行时。 |
170
- | **数据分析台账(v0.7.62)** | Agent 的分析结果作为一等记录留痕:原生 `analysis_save` / `analysis_query` 宿主工具写入独立的 `analysis_reports` 表,按产线 + 配方 + 时间窗组织,含关键结论、指标、数据来源与操作者归因。台账对 Agent 只增不改;人类经 REST 修订并刷新编辑者归因。专属 `/analysis` 页面经 WS 实时前插新报告,支持产线 / 配方 / 时间 / 关键词多维检索,改删受产线权限门控(`operate` 可改、删除仅 admin)。外部分析插件经同一台账集成——`diag_run` 以后台任务运行 IDD 分析(`stability-report` 产线稳定报告 / `deep-diagnosis` 根因诊断),提交即返 `task_id`,`diag_status` 按taskId 查进度,完成后报告经 `analysis_save` 落账。 |
170
+ | **数据分析台账(v0.7.62)** | Agent 的分析结果作为一等记录留痕:原生 `analysis_save` / `analysis_query` 宿主工具写入独立的 `analysis_reports` 表,按产线 + 配方 + 时间窗组织,含关键结论、指标、数据来源与操作者归因。台账对 Agent 只增不改;人类经 REST 修订并刷新编辑者归因。专属 `/analysis` 页面经 WS 实时前插新报告,支持产线 / 配方 / 时间 / 关键词多维检索,改删受产线权限门控(`operate` 可改、删除仅 admin)。外部分析插件经同一台账集成——`diag_run` 以后台任务运行 IDD **六种分析意图**(深度根因诊断 / 产线稳定报告 / 快速筛查 / DOE 试验分析 / 调参经验挖掘 / 优化战役,按情景注入分析提示词),提交即返 `task_id`,`diag_status` 按 taskId 查进度,完成后报告经 `analysis_save` 落账。 |
171
171
  | **工艺参数语义面与调控闭环** | 全部可下发写收敛到**配方面**(`recipe_update` / `recipe_apply` / `recipe_trial`,各受「绑定 → HITL 理由 → 运行门」三门约束)。写入仍被**四层限界**逐层收窄——节点安全量程 ∩ 工艺参数基准限界 ∩ 活动产品限界 ∩ 活动配方工艺窗口——且每次下发自动开一条调控记录,由 `dcw_judge` 落判定(keep / rollback / uncertain),`dcw_rollback` 执行回退。(v0.7.63 摘除了 `param_control` / `param_read` / `dcw_read` 直连节点的遗留死工具面,Agent 工具清单保持干净。) |
172
172
  | **产线运营** | 产线 → 产品 → 配方 → 批次。配方窗口门控采集并联锁写入;每条样本打标 `product/recipe/run`,实现按批次隔离。 |
173
+ | **MES REST 集成(双数据路径)** | 生产管理数据进入同一受治理工作空间:`mes-rest` 节点用**声明式请求映射**对接 MES API 的目录/当前值/历史端点(`secretRef`→env token 凭证零明文;钩子可对取数做下沉后处理)。Agent 两种读法——**直连**:`mes_fetch` 按映射发请求实时拿 API 响应(大窗异步分页落 `mesds-*` CSV 数据集,经 `mes_datasets` / `mes_dataset_read` 读取,原始行不进对话);**镜像**:`http` 数采节点轮询同一 API 入本地 TSDB,`daq_query` 与原生节点同面取数——API 宕机也不断供。`mes_catalog` 按产线严格过滤(fail-closed)。 |
173
174
  | **多形态数采帧管线** | 多点轮廓(测厚仪/扫描仪)与 CCD 图像帧流经模板 sink 管线:向量与元数据入 Timescale(`daq_frames`),像素入对象存储(MinIO,不可达时自动降级到本地磁盘);派生指标阈值越限走既有告警链路。 |
174
175
  | **生产化硬化(v0.7.58)** | 保写心跳生命周期根治——失败写不占位(心跳不再直发幻影指令值)、驱动/连接/产线变更即清值、停线自动挂起保写;mock 静默兜底封堵(未知协议显式报错,插件卸载不再假成功);帧像素 sha256 完整性指纹 + 对象存储按天 GC(删前 DB 交叉校验防误删);Timescale 按天 chunk + 列存压缩(TSL);堆水位监控 + 崩溃/失联/水位三重自动重生;写保持窗与试验节拍落盘(重启不绕频控);grant 运行时复核并入频道绑线(撤权即失活无死角)。 |
175
176
  | **Agent 自查工具** | `line_context`、`ops_log`、`recipe_log`、`recipe_versions`、`dcw_journal`——Agent 清楚自己操控的产线/产品/配方,谁做过什么,每个值怎么变。 |
@@ -179,6 +180,7 @@ AgentWorkShop 起家于**多智能体软件工作坊**——Channel 内的编码
179
180
  | 能力 | 为何重要 |
180
181
  |---|---|
181
182
  | **产线级权限** | 工业数据按**产线**三态门控(无权/仅查看/可操控),强制点在数据面——普通用户未授权前看不到任何产线数据。 |
183
+ | **工具调用统一预检(v0.7.66)** | 每次工业工具调用在进入处理器前统一校验参数形状与引用归属:`node_id` / `line_id` / `recipe_id` / `dataset_id` 等必须落在调用者的绑定面(绑定节点 ∪ 频道绑线只读 ∪ 绑定配方所在产线;数据集/作业/模型/计划/场景按谱系回溯)。越界调用直接拒绝,回执写明「你的绑定面 + 下一步」(找谁绑定、改传什么),并把授权性拒绝写入审计日志。 |
182
184
  | **全操作审计日志** | 用户 / Agent / 系统 的每个动作都落进同一份可检索日志;操作者归属「Channel名/成员名」,与用户和系统天然区分。经 WS 实时推送。 |
183
185
  | **团队级插件开关** | 每个团队(Channel)持有**独立插件开关组**(`channel_plugins`):被关闭插件的工具不注入该团队 Agent。插件本体经 `aw plugin` 与 `/plugins` 页热管理。 |
184
186
  | **插件扩展 API** | `plugins/<name>/` 下的一个自包含目录**同时增强两半**:`index.mjs`(服务端:钩子、路由、Agent 工具、**数采读驱动 / DCW 写驱动**/帧处理器/节点模板、配置分组、KV、定时器)与 `client.mjs`(浏览器:注入具名插槽的面板、i18n、设置 UI)。三种作用域——`builtin`(随包发布)> `project`(检出)> `user`(`~/.AgentWorkShop`)——启停**与代码修改**均有约 1 秒热重载;停用插件的驱动随热重载立即摘除。内置示例 **serial-bridge**(串口通信:读/写驱动 + 串口探针 API + 前端面板)。完整契约见 [`docs/plugins.md`](./docs/plugins.md)。 |
@@ -390,7 +392,7 @@ aw update --check # 只报告,不安装
390
392
  npm install -g agentworkshop@latest # 手动等效
391
393
  ```
392
394
 
393
- 版本遵循 semver。每次 `aw start` 都会校验配置根,并把 `home` 之前的旧版 `data/` 布局迁移进来(以最新文件为准),因此数据可以跨版本存活。SQLite schema 迁移在服务端启动时执行。当前版本:**v0.7.64**——见[版本发布](https://github.com/kingdol666/AgentWorkShop/releases)。
395
+ 版本遵循 semver。每次 `aw start` 都会校验配置根,并把 `home` 之前的旧版 `data/` 布局迁移进来(以最新文件为准),因此数据可以跨版本存活。SQLite schema 迁移在服务端启动时执行。当前版本:**v0.7.66**——见[版本发布](https://github.com/kingdol666/AgentWorkShop/releases)。
394
396
 
395
397
  ### 第一次「Agent × 产线」会话(约 2 分钟)
396
398
 
@@ -576,7 +578,7 @@ curl -X POST http://localhost:3000/api/workshop/schedules \
576
578
  | 入口 | 端点 | 面向 |
577
579
  |---|---|---|
578
580
  | **WS** | `/api/workshop/ws?channelId=…` | 仪表盘 / UI——AEP v1 信封,per-channel 单调 `seq`,5000 事件环形缓冲,`lastSeq` 续传,快照兜底。 |
579
- | **MCP** | 进程内服务,约 25 个工具 | Agent(omp host tools)——管理面 + 作业面工具,Channel 作用域。 |
581
+ | **MCP** | 进程内服务,38 个工具 | Agent(omp host tools)——管理面 + 作业面工具,Channel 作用域。 |
580
582
  | **A2A** | `POST /api/workshop/a2a/:agentId/rpc` | 外部 Agent——JSON-RPC 2.0,`AgentCard` 在 `/card`,`tasks/sendSubscribe` SSE。 |
581
583
  | **REST** | `/api/workshop/**` | 人 / 脚本——完整管理面。 |
582
584
 
@@ -646,7 +648,7 @@ AgentWorkShop/
646
648
  │ │ ├── agents/ # AgentInterface:14 个引擎(+ 工业工具)
647
649
  │ │ ├── daq/ dcw/ aml/ # 边缘运行时 · 驱动 · 队列 · 存储 · 建模实验室
648
650
  │ │ └── db/ # node:sqlite 仓储层
649
- │ ├── mcp/ # MCP 服务(25 个工具,进程内 workshop 面)
651
+ │ ├── mcp/ # MCP 服务(38 个工具,进程内 workshop 面)
650
652
  │ ├── plugins-builtin/ # 随包发布的插件(serial-bridge · rag-bridge · diag-bridge · twin-injection-default)
651
653
  │ └── plugins/ # 运行时装配(单例)
652
654
  ├── mcp/ # aw mcp —— 零依赖 stdio MCP 网关(38 个工具,实例自动发现)
package/README.md CHANGED
@@ -28,7 +28,7 @@
28
28
 
29
29
  **[简体中文](./README-zh.md)** · **[Documentation](https://kingdol666.github.io/AgentWorkShop)** · **[Releases](https://github.com/kingdol666/AgentWorkShop/releases)** · **[Changelog](./changelog.md)** · **[Plugin API](./docs/plugins.md)** · **[SDK](./docs/sdk.md)**
30
30
 
31
- <sub><b>v0.7.63</b> · 14 engines · 6 field protocols (5 built-in + serial plugin) + MES REST integration · data-analysis ledger with line-scoped permissions · 119 runtime settings · bilingual docs (简体中文 / English)</sub>
31
+ <sub><b>v0.7.66</b> · 14 engines · 6 field protocols (5 built-in + serial plugin) + MES REST integration (mirror & live) · data-analysis ledger with line-scoped permissions · per-call tool parameter/binding preflight · 82 host tools · 119 runtime settings · bilingual docs (简体中文 / English)</sub>
32
32
 
33
33
  <br />
34
34
 
@@ -155,7 +155,7 @@ Recorded against a running instance: real DAQ history, real write control, real
155
155
  | **Channel group chat & native HITL** | The channel timeline is a real group chat: a member's request becomes a **trackable job** (not a lost message), and engines with a native ask surface (e.g. `omp`) route HITL questions through the platform — approve once, the engine continues with the receipt. Member permissions and notifications are first-class. |
156
156
  | **Scheduled tasks** | Any channel task can run on a **schedule** — fixed `interval` (60 s floor) or `daily` at a set time — managed from `/workshop/schedules` or the REST API, with per-run history, busy-guard (no overlapping runs of the same schedule) and channel-scoped visibility. |
157
157
  | **Persistent memory & channel process memory** | Private + channel-shared domains; FTS5 with CJK segmentation, optional vector hybrid recall, token-budgeted injection. On top sit **process memories**: deterministic root/child/lead event contracts, a canonical root summary, and a durable outbox (dead-letter + compensation worker) so the story of a goal survives restarts. |
158
- | **Four entry points** | One manager behind every door: **WS** (AEP v1 event stream with seq-resume), **MCP** (~25 in-process tools), **A2A** (JSON-RPC 2.0 + AgentCard), **REST**. |
158
+ | **Four entry points** | One manager behind every door: **WS** (AEP v1 event stream with seq-resume), **MCP** (38 in-process tools), **A2A** (JSON-RPC 2.0 + AgentCard), **REST**. |
159
159
 
160
160
  #### Industrial stack
161
161
 
@@ -168,9 +168,10 @@ Recorded against a running instance: real DAQ history, real write control, real
168
168
  | **Recipe versioning & governance** | Parameter changes are versioned with attribution (user/agent/system + operator + reason). Roll back to any revision or the last-good batch — non-destructively. Stale-node params are skipped and clearly marked. |
169
169
  | **Recipe-chain optimization loop** | Agents optimize through recipe management, the way human process engineers do: `recipe_trial` batch-dispatches multi-parameter candidates **without writing a version** → re-measure → progress adopts via `recipe_update` (same recipe id, version +1) → regression triggers a **unified rollback** (`recipe_rollback` with `dispatch: true` = definition revert + batch restore to the PLC). Single-knob direct dispatch is out of the loop; trials run under four-layer bounds and a per-line cadence. |
170
170
  | **Channel-bound lines (read-only grant)** | A channel can bind a line: every member reads that line's ops logs, recipe history and live status without any node binding (tool outputs are tagged "channel-bound, read-only"), while writes still require node authorization. The line brief is injected into member prompts; binding changes hot-recycle member runtimes. |
171
- | **Data-analysis ledger (v0.7.62)** | Agents persist analysis results as first-class records: native `analysis_save` / `analysis_query` host tools write a dedicated `analysis_reports` table keyed by line + recipe + time window, with conclusions, metrics, data sources and actor attribution. The ledger is append-only for agents; humans revise via REST with editor attribution. A dedicated `/analysis` page streams new reports live (ops-log WS), filters by line / recipe / time / keyword, and edit/delete are permission-gated (`operate` line mode; admin-only delete). External analysis plugins integrate through the same ledger — `diag_run` runs IDD analyses in the background (`stability-report` for line health reports, `deep-diagnosis` for root cause), returns a `task_id` immediately, tracks progress via `diag_status`, and the finished report lands in the ledger via `analysis_save`. |
171
+ | **Data-analysis ledger (v0.7.62)** | Agents persist analysis results as first-class records: native `analysis_save` / `analysis_query` host tools write a dedicated `analysis_reports` table keyed by line + recipe + time window, with conclusions, metrics, data sources and actor attribution. The ledger is append-only for agents; humans revise via REST with editor attribution. A dedicated `/analysis` page streams new reports live (ops-log WS), filters by line / recipe / time / keyword, and edit/delete are permission-gated (`operate` line mode; admin-only delete). External analysis plugins integrate through the same ledger — `diag_run` runs IDD analyses in the background across **six intents** (deep root-cause diagnosis, line stability report, quick screening, DOE analysis, tuning-experience mining, optimization campaign — scenario prompts injected per intent), returns a `task_id` immediately, tracks progress via `diag_status`, and the finished report lands in the ledger via `analysis_save`. |
172
172
  | **Semantic parameter surface & tuning loop** | Every dispatchable write converges on the **recipe face** (`recipe_update` / `recipe_apply` / `recipe_trial`, each gated by binding → HITL reason → active-run). Writes stay narrowed by the **four-layer bound** — node safe range ∩ parameter baseline bounds ∩ active product bounds ∩ active recipe window — and each adjustment opens a tuning record that `dcw_judge` must close (keep / rollback / uncertain), with `dcw_rollback` executing the undo. (v0.7.63 removed the legacy `param_control` / `param_read` / `dcw_read` direct-node tools — dead surface under permission model v2 — so the agent tool list stays clean.) |
173
173
  | **Line operations** | Lines → products → recipes → batch runs. Recipe windows gate acquisition and interlock writes; every sample is tagged `product/recipe/run` for per-batch isolation. |
174
+ | **MES REST integration (two data paths)** | Production-management data joins the same governed workspace: a `mes-rest` node maps the MES API's catalog / current / history endpoints through **declarative request maps** (auth via `secretRef` → env token, never plaintext; hooks can post-process ingested data). Agents read it two ways — **live**: `mes_fetch` issues the mapped request and returns the API response (large windows paginate async into a `mesds-*` CSV dataset read via `mes_datasets` / `mes_dataset_read`; raw rows never enter the prompt); **mirrored**: an `http` DAQ node polls the same API into the local TSDB so `daq_query` serves it like any native node — and keeps serving it when the API is down. `mes_catalog` is line-scoped and fail-closed. |
174
175
  | **Multi-modal DAQ frame pipeline** | Multi-point profiles (thickness/scanner) and CCD image frames flow through template sink pipelines: vectors & metadata into Timescale (`daq_frames`), pixels into object storage (MinIO, auto disk fallback); derived-metric thresholds ride the existing alarm chain. |
175
176
  | **Production hardening (v0.7.58)** | Hold-heartbeat lifecycle fixed — failed writes never occupy the setpoint (no phantom re-dispatch), driver/connection/line changes clear the value, line stop suspends hold automatically; silent mock fallback blocked (unknown protocols fail loudly, plugin unload can't fake success); frame pixel sha256 fingerprints + day-directory object GC (DB cross-check before delete); Timescale daily chunks + columnstore compression (TSL); heap-watermark watch with crash/liveness/watermark auto-respawn; write-hold windows & trial cadence persisted across restarts; runtime grant re-checks include the channel-bound line (revocation takes effect everywhere). |
176
177
  | **Agent self-audit tools** | `line_context`, `ops_log`, `recipe_log`, `recipe_versions`, `dcw_journal` — agents see exactly which line/product/recipe they control, who did what, and how every value changed. |
@@ -180,6 +181,7 @@ Recorded against a running instance: real DAQ history, real write control, real
180
181
  | Capability | Why it matters |
181
182
  |---|---|
182
183
  | **Line-level permissions** | Industrial data is gated **per production line** with three states (none / read-only / operate), enforced in the data plane — regular users see no line data until granted. |
184
+ | **Per-call tool preflight (v0.7.66)** | Every industrial tool call is checked before its handler runs: parameter shape, plus reference membership for `node_id` / `line_id` / `recipe_id` / `dataset_id` and chained dataset/job/model/plan/scene ids (resolved through lineage). References must fall inside the caller's bound face (bound nodes ∪ channel-bound line read-only ∪ nodes on a bound recipe's line). Out-of-scope calls are rejected with the caller's bound face and a concrete next step; authorization denials are audited. |
183
185
  | **Full-operation audit log** | Every user / agent / system action lands in one queryable log; operators are attributed to "Channel/Member", distinct from users and the system. Streamed live over WS. |
184
186
  | **Team-scoped plugin switches** | Each team (channel) keeps an **independent plugin switch set** (`channel_plugins`): a disabled plugin's tools are not injected into that team's agents. Plugins themselves are hot-managed via `aw plugin` and the `/plugins` page. |
185
187
  | **Plugin extension API** | A self-contained directory under `plugins/<name>/` enhances **both halves at once**: `index.mjs` (server: hooks, routes, agent tools, **DAQ read drivers / DCW write drivers**, frame processors, node templates, config groups, KV, timers) and `client.mjs` (browser: panels injected into named slots, i18n, settings UI). Three scopes — `builtin` (shipped) > `project` (checkout) > `user` (`~/.AgentWorkShop`) — with ~1 s hot reload on enable/disable **and on code edits**; a disabled plugin's drivers are removed on hot reload immediately. Built-in example: **serial-bridge** (serial communication: read/write drivers, serial probe API, frontend panel). Full contract in [`docs/plugins.md`](./docs/plugins.md). |
@@ -381,7 +383,7 @@ aw update --check # only report; nothing is installed
381
383
  npm install -g agentworkshop@latest # manual equivalent
382
384
  ```
383
385
 
384
- Releases follow semver. `aw start` verifies the config root on every launch and migrates the legacy pre-`home` `data/` layout into it (newest file wins), so data survives upgrades. SQLite schema migrations run server-side at boot. Current version: **v0.7.64** — see [Releases](https://github.com/kingdol666/AgentWorkShop/releases).
386
+ Releases follow semver. `aw start` verifies the config root on every launch and migrates the legacy pre-`home` `data/` layout into it (newest file wins), so data survives upgrades. SQLite schema migrations run server-side at boot. Current version: **v0.7.66** — see [Releases](https://github.com/kingdol666/AgentWorkShop/releases).
385
387
 
386
388
  ### Your first agent × line session (~2 minutes)
387
389
 
@@ -572,7 +574,7 @@ curl -X POST http://localhost:3000/api/workshop/schedules \
572
574
  | Entry | Endpoint | Audience |
573
575
  |---|---|---|
574
576
  | **WS** | `/api/workshop/ws?channelId=…` | Dashboards / UI — AEP v1 envelopes, per-channel monotonic `seq`, 5000-event ring, `lastSeq` resume, snapshot fallback. |
575
- | **MCP** | in-process server, ~25 tools | Agents (omp host tools) — management + job-face tools, channel-scoped. |
577
+ | **MCP** | in-process server, 38 tools | Agents (omp host tools) — management + job-face tools, channel-scoped. |
576
578
  | **A2A** | `POST /api/workshop/a2a/:agentId/rpc` | External agents — JSON-RPC 2.0, `AgentCard` at `/card`, `tasks/sendSubscribe` SSE. |
577
579
  | **REST** | `/api/workshop/**` | Humans / scripts — full management face. |
578
580
 
@@ -171,11 +171,32 @@ export const useNotificationsStore = defineStore('workshop.notifications', () =>
171
171
  let inflightFetch: Promise<void> | null = null
172
172
  let lastAttemptAt = 0
173
173
  const FETCH_MIN_GAP_MS = 2000
174
+ // 熔断器:窗口内尝试数封顶,超限冷却静默丢弃(防上游紧循环把浏览器 socket 耗尽,
175
+ // 殃及同页全部请求 —— 实测 2.3 万次/15s 时 Chrome ERR_INSUFFICIENT_RESOURCES 风暴)
176
+ let breakerUntil = 0
177
+ let breakerWindowStart = 0
178
+ let breakerTries = 0
179
+ const BREAKER_WINDOW_MS = 10_000
180
+ const BREAKER_MAX_TRIES = 10
181
+ const BREAKER_COOLDOWN_MS = 30_000
174
182
  async function guardedFetch(fn: () => Promise<void>): Promise<void> {
175
183
  if (inflightFetch) return inflightFetch
176
- const wait = FETCH_MIN_GAP_MS - (Date.now() - lastAttemptAt)
184
+ const now0 = Date.now()
185
+ if (now0 < breakerUntil) return
186
+ const wait = FETCH_MIN_GAP_MS - (now0 - lastAttemptAt)
177
187
  if (wait > 0) await new Promise(r => setTimeout(r, wait))
188
+ // 唤醒后复查:等待窗内的并发调用方都通过了入口检查,不复查会把整批一起放行
189
+ if (inflightFetch) return inflightFetch
178
190
  lastAttemptAt = Date.now()
191
+ if (lastAttemptAt - breakerWindowStart > BREAKER_WINDOW_MS) {
192
+ breakerWindowStart = lastAttemptAt
193
+ breakerTries = 0
194
+ }
195
+ breakerTries += 1
196
+ if (breakerTries > BREAKER_MAX_TRIES) {
197
+ breakerUntil = lastAttemptAt + BREAKER_COOLDOWN_MS
198
+ breakerTries = 0
199
+ }
179
200
  inflightFetch = (async () => {
180
201
  try {
181
202
  await fn()
package/config.yml CHANGED
@@ -12,7 +12,7 @@
12
12
  app:
13
13
  name: AgentWorkShop
14
14
  title: AgentWorkShop
15
- version: 0.7.64
15
+ version: 0.7.66
16
16
  description: 基于 Nuxt 4 的配置驱动运行范式
17
17
 
18
18
  # 运行模式(dev/prod 实际由启动命令决定,此处仅作运行时展示)
package/docs/cli.en.md CHANGED
@@ -62,7 +62,7 @@ pnpm tui # the terminal workbench
62
62
  ### 3. Quick use via npx (no global install)
63
63
 
64
64
  ```bash
65
- npx agentworkshop start # fetch and start (pin a version with: npx agentworkshop@0.7.64 start)
65
+ npx agentworkshop start # fetch and start (pin a version with: npx agentworkshop@0.7.66 start)
66
66
  npx agentworkshop doctor # subcommands work as usual
67
67
  npx -p agentworkshop aw doctor # use -p when you want the name aw
68
68
  ```
@@ -79,7 +79,7 @@ npx -p agentworkshop aw doctor # use -p when you want the name aw
79
79
  | Package manager | `pnpm@11.9.0` (`packageManager`, needed only for source development) |
80
80
  | Module format | ESM (`type: module`) |
81
81
  | License | `Apache-2.0` |
82
- | Current version | `0.7.64` (`package.json`) |
82
+ | Current version | `0.7.66` (`package.json`) |
83
83
 
84
84
  ## 2. First start (the Claude Code experience)
85
85
 
package/docs/cli.md CHANGED
@@ -60,7 +60,7 @@ pnpm tui # 终端工作台
60
60
  ### 3. npx 快速使用(免全局安装)
61
61
 
62
62
  ```bash
63
- npx agentworkshop start # 拉取并启动(可锁定版本: npx agentworkshop@0.7.64 start)
63
+ npx agentworkshop start # 拉取并启动(可锁定版本: npx agentworkshop@0.7.66 start)
64
64
  npx agentworkshop doctor # 子命令照常可用
65
65
  npx -p agentworkshop aw doctor # 需要 aw 这个名字时用 -p 指定包
66
66
  ```
@@ -76,7 +76,7 @@ npx -p agentworkshop aw doctor # 需要 aw 这个名字时用 -p 指定包
76
76
  | 包管理器 | `pnpm@11.9.0`(`packageManager`,仅源码开发需要) |
77
77
  | 模块形态 | ESM(`type: module`) |
78
78
  | 许可证 | `Apache-2.0` |
79
- | 当前版本 | `0.7.64`(`package.json`) |
79
+ | 当前版本 | `0.7.66`(`package.json`) |
80
80
 
81
81
  ## 二、首次启动(Claude Code 式)
82
82
 
@@ -1,6 +1,6 @@
1
1
  # AgentWorkShop 全功能测试流程 Plan
2
2
 
3
- > 版本无关的常备测试手册(撰写时基线 v0.7.63)。用途:后续直接指令 agent
3
+ > 版本无关的常备测试手册(撰写时基线 v0.7.64)。用途:后续直接指令 agent
4
4
  > 「按 docs/full-test-plan.md 执行 Phase 0–N」即可完成全功能测试。
5
5
  > 断言数为历史全绿基线(2026-09 上旬各轮验收),以脚本实际输出为准;括号内数字仅用于识别明显回退。
6
6
  > 最后核对:2026-09-12(脚本清单逐一经 `scripts/` 实存核对)。
@@ -9,7 +9,7 @@
9
9
  >
10
10
  > Applies to: plugin system v2 has been available since **v0.7.29** (frontend component
11
11
  > injection / plugin settings / plugin i18n / runtime services surface); this document
12
- > describes **v0.7.64**. `ctx.sdkVersion` is currently `0.3.0`.
12
+ > describes **v0.7.66**. `ctx.sdkVersion` is currently `0.3.0`.
13
13
 
14
14
  ## 1. Folder layout & quick start
15
15
 
package/docs/plugins.md CHANGED
@@ -6,7 +6,7 @@
6
6
  > 本文是唯一权威参考;`docs/site/plugins/` 的分页文档与本文同源。
7
7
  >
8
8
  > 适用版本:插件系统 v2 自 **v0.7.29** 起可用(前端组件注入 / 插件设置 / 插件 i18n /
9
- > 运行时服务面);本文档对应当前版本 **v0.7.64**。`ctx.sdkVersion` 当前为 `0.3.0`。
9
+ > 运行时服务面);本文档对应当前版本 **v0.7.66**。`ctx.sdkVersion` 当前为 `0.3.0`。
10
10
 
11
11
  ## 一、目录结构与快速开始
12
12
 
package/docs/sdk.en.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  **SDK version constants**: server-side `SDK_VERSION = '0.3.0'`, browser-side `CLIENT_SDK_VERSION = '0.3.0'`.
9
9
  These two constants are the **interface version of the SDK itself** and evolve **independently**
10
- from the npm package version (the `version` field in `package.json`, currently 0.7.64) —
10
+ from the npm package version (the `version` field in `package.json`, currently 0.7.66) —
11
11
  them being out of sync is expected. Never use `SDK_VERSION` to infer the package version, or the reverse.
12
12
  **Module format**: ESM only (only `import` / `export`; there is no CJS entry).
13
13
  **Types**: `sdk/index.d.mts` and `sdk/client.d.mts` ship with the package, so TypeScript projects
package/docs/sdk.md CHANGED
@@ -5,7 +5,7 @@
5
5
  > 零第三方运行时依赖,Node ≥ 23.4 与现代浏览器双端可用。
6
6
 
7
7
  **SDK 版本常量**:服务端 `SDK_VERSION = '0.3.0'`,浏览器端 `CLIENT_SDK_VERSION = '0.3.0'`。
8
- 这两个常量是 **SDK 自身接口的版本号**,与 npm 包版本(`package.json` 的 `version`,当前 0.7.64)
8
+ 这两个常量是 **SDK 自身接口的版本号**,与 npm 包版本(`package.json` 的 `version`,当前 0.7.66)
9
9
  **各自独立演进** —— 常数不同步是预期行为,不要拿 `SDK_VERSION` 去推断包版本,反之亦然。
10
10
  **模块形态**:ESM only(只有 `import` / `export`,没有 CJS 入口)。
11
11
  **类型**:`sdk/index.d.mts`、`sdk/client.d.mts` 随包发布,TS 项目零配置获得提示(覆盖范围见 §7)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentworkshop",
3
- "version": "0.7.64",
3
+ "version": "0.7.66",
4
4
  "type": "module",
5
5
  "description": "AgentWorkShop 软件开发系统 - 基于 Nuxt 4 的配置驱动运行范式",
6
6
  "license": "Apache-2.0",