agentworkshop 0.11.3 → 0.12.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 (440) hide show
  1. package/.AgentWorkShop/prompts/host-tools.json +4 -4
  2. package/.output/.AgentWorkShop/prompts/host-tools.json +4 -4
  3. package/.output/nitro.json +1 -1
  4. package/.output/public/_nuxt/{DXXBGPAc.js → CsdezMu9.js} +4 -4
  5. package/.output/public/_nuxt/WL1R8lPA.js +1 -0
  6. package/.output/public/_nuxt/_id_.Czwkl50w.css +1 -0
  7. package/.output/public/_nuxt/builds/latest.json +1 -1
  8. package/.output/public/_nuxt/builds/meta/577f464e-672a-4c4e-a3c8-dc8c1b38930d.json +1 -0
  9. package/.output/server/chunks/_/access.mjs +1 -1
  10. package/.output/server/chunks/_/candidate-store.mjs +1 -1
  11. package/.output/server/chunks/_/catalog-view.mjs +1 -1
  12. package/.output/server/chunks/_/character-asset.repo.mjs +1 -1
  13. package/.output/server/chunks/_/data-export.mjs +6 -6
  14. package/.output/server/chunks/_/data-query.mjs +3 -3
  15. package/.output/server/chunks/_/eda-run.repo.mjs +2 -2
  16. package/.output/server/chunks/_/entity.mjs +1 -1
  17. package/.output/server/chunks/_/features.mjs +5 -5
  18. package/.output/server/chunks/_/golden.mjs +3 -3
  19. package/.output/server/chunks/_/host-bindings.mjs +1 -1
  20. package/.output/server/chunks/_/index.mjs +1 -1
  21. package/.output/server/chunks/_/line-scope.mjs +1 -1
  22. package/.output/server/chunks/_/mes-console.mjs +1 -1
  23. package/.output/server/chunks/_/mes-secrets.repo.mjs +1 -1
  24. package/.output/server/chunks/_/mes-templates.mjs +1 -1
  25. package/.output/server/chunks/_/nitro.mjs +4070 -2343
  26. package/.output/server/chunks/_/nitro.mjs.map +1 -1
  27. package/.output/server/chunks/_/ocap.mjs +1 -1
  28. package/.output/server/chunks/_/orchestrator.mjs +1 -1
  29. package/.output/server/chunks/_/promote.mjs +1 -1
  30. package/.output/server/chunks/_/rest-auth.mjs +1 -1
  31. package/.output/server/chunks/_/runtime.mjs +8 -8
  32. package/.output/server/chunks/_/scene-layout.repo.mjs +1 -1
  33. package/.output/server/chunks/_/spc.mjs +1 -1
  34. package/.output/server/chunks/_/validator.mjs +1 -1
  35. package/.output/server/chunks/build/TownView-DD1zY8xq.mjs +1 -1
  36. package/.output/server/chunks/build/{_id_-C0vNEbts.mjs → _id_-B9zi8WEg.mjs} +23 -12
  37. package/.output/server/chunks/build/_id_-B9zi8WEg.mjs.map +1 -0
  38. package/.output/server/chunks/build/_wsId_-LDv5SEW_.mjs +1 -1
  39. package/.output/server/chunks/build/daq-B5zlUIlb.mjs +1 -1
  40. package/.output/server/chunks/build/dcw-B-eoU7sq.mjs +1 -1
  41. package/.output/server/chunks/build/types-D6J7slEa.mjs +1 -1
  42. package/.output/server/chunks/build/useDaqAddNode-Dr5CfMpU.mjs +1 -1
  43. package/.output/server/chunks/build/useDaqDetailNode-DDq5osE-.mjs +1 -1
  44. package/.output/server/chunks/build/useDaqDetailParams-DdOcUvHG.mjs +1 -1
  45. package/.output/server/chunks/build/useDaqFilters-Y_NRhP6i.mjs +1 -1
  46. package/.output/server/chunks/build/useDaqStream-phwM5tIN.mjs +1 -1
  47. package/.output/server/chunks/build/useDaqTemplates-lKw2b01d.mjs +1 -1
  48. package/.output/server/chunks/build/useDcwAddNode-CT-oOFom.mjs +1 -1
  49. package/.output/server/chunks/build/useDcwStream-CNtMGcR0.mjs +1 -1
  50. package/.output/server/chunks/routes/api/mcp/workshop.mjs +1 -1
  51. package/.output/server/chunks/routes/api/system/backup/run.post.mjs +2 -2
  52. package/.output/server/chunks/routes/api/system/index.patch.mjs +2 -2
  53. package/.output/server/chunks/routes/api/system/shutdown.post.mjs +2 -2
  54. package/.output/server/chunks/routes/api/workshop/agent-tools/index.post.mjs +1 -1
  55. package/.output/server/chunks/routes/api/workshop/agent-tools/list.get.mjs +7 -2
  56. package/.output/server/chunks/routes/api/workshop/agent-tools/list.get.mjs.map +1 -1
  57. package/.output/server/chunks/routes/api/workshop/agents/_id_.patch.mjs +1 -1
  58. package/.output/server/chunks/routes/api/workshop/aml/datasets/_id/preview.get.mjs +1 -1
  59. package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.delete.mjs +1 -1
  60. package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.get.mjs +1 -1
  61. package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.patch.mjs +1 -1
  62. package/.output/server/chunks/routes/api/workshop/aml/env/recheck.post.mjs +1 -1
  63. package/.output/server/chunks/routes/api/workshop/aml/env/uv.post.mjs +1 -1
  64. package/.output/server/chunks/routes/api/workshop/aml/env/venv.post.mjs +1 -1
  65. package/.output/server/chunks/routes/api/workshop/aml/index.get.mjs +1 -1
  66. package/.output/server/chunks/routes/api/workshop/aml/index.post.mjs +1 -1
  67. package/.output/server/chunks/routes/api/workshop/aml/index2.post.mjs +1 -1
  68. package/.output/server/chunks/routes/api/workshop/aml/index3.get.mjs +1 -1
  69. package/.output/server/chunks/routes/api/workshop/aml/index3.post.mjs +1 -1
  70. package/.output/server/chunks/routes/api/workshop/aml/index4.get.mjs +1 -1
  71. package/.output/server/chunks/routes/api/workshop/aml/index5.get.mjs +1 -1
  72. package/.output/server/chunks/routes/api/workshop/aml/index6.get.mjs +1 -1
  73. package/.output/server/chunks/routes/api/workshop/aml/index7.get.mjs +1 -1
  74. package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/cancel.post.mjs +1 -1
  75. package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/logs.get.mjs +1 -1
  76. package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/retry.post.mjs +1 -1
  77. package/.output/server/chunks/routes/api/workshop/aml/jobs/_id_.delete.mjs +1 -1
  78. package/.output/server/chunks/routes/api/workshop/aml/jobs/_id_.get.mjs +1 -1
  79. package/.output/server/chunks/routes/api/workshop/aml/models/_id/predict.post.mjs +1 -1
  80. package/.output/server/chunks/routes/api/workshop/aml/models/_id/promote.post.mjs +1 -1
  81. package/.output/server/chunks/routes/api/workshop/aml/models/_id_.delete.mjs +1 -1
  82. package/.output/server/chunks/routes/api/workshop/aml/models/_id_.patch.mjs +1 -1
  83. package/.output/server/chunks/routes/api/workshop/aml/models/index.get.mjs +1 -1
  84. package/.output/server/chunks/routes/api/workshop/aml/training-plans/_id/train.post.mjs +1 -1
  85. package/.output/server/chunks/routes/api/workshop/aml/training-plans/_id_.delete.mjs +1 -1
  86. package/.output/server/chunks/routes/api/workshop/aml/training-plans/_id_.patch.mjs +1 -1
  87. package/.output/server/chunks/routes/api/workshop/aml/training-plans/index.get.mjs +1 -1
  88. package/.output/server/chunks/routes/api/workshop/aml/twin/providers.get.mjs +1 -1
  89. package/.output/server/chunks/routes/api/workshop/analysis/_id_.delete.mjs +1 -1
  90. package/.output/server/chunks/routes/api/workshop/analysis/_id_.get.mjs +1 -1
  91. package/.output/server/chunks/routes/api/workshop/analysis/_id_.patch.mjs +1 -1
  92. package/.output/server/chunks/routes/api/workshop/assets/devices/_id_.delete.mjs +1 -1
  93. package/.output/server/chunks/routes/api/workshop/assets/index.post.mjs +1 -1
  94. package/.output/server/chunks/routes/api/workshop/assets/index2.post.mjs +1 -1
  95. package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs +2 -2
  96. package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.patch.mjs +1 -1
  97. package/.output/server/chunks/routes/api/workshop/channels/_id/activate.post.mjs +1 -1
  98. package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.patch.mjs +1 -1
  99. package/.output/server/chunks/routes/api/workshop/channels/_id/chat/index.post.mjs +1 -1
  100. package/.output/server/chunks/routes/api/workshop/channels/_id/execution-mode.patch.mjs +1 -1
  101. package/.output/server/chunks/routes/api/workshop/channels/_id/harness-profiles/promote.post.mjs +1 -1
  102. package/.output/server/chunks/routes/api/workshop/channels/_id/improvement-proposals/decide.post.mjs +1 -1
  103. package/.output/server/chunks/routes/api/workshop/channels/_id/index.post.mjs +1 -1
  104. package/.output/server/chunks/routes/api/workshop/channels/_id/index.put.mjs +1 -1
  105. package/.output/server/chunks/routes/api/workshop/channels/_id/index11.get.mjs +1 -1
  106. package/.output/server/chunks/routes/api/workshop/channels/_id/index2.get.mjs +1 -1
  107. package/.output/server/chunks/routes/api/workshop/channels/_id/index2.post.mjs +1 -1
  108. package/.output/server/chunks/routes/api/workshop/channels/_id/index2.put.mjs +1 -1
  109. package/.output/server/chunks/routes/api/workshop/channels/_id/index3.get.mjs +1 -1
  110. package/.output/server/chunks/routes/api/workshop/channels/_id/index3.post.mjs +1 -1
  111. package/.output/server/chunks/routes/api/workshop/channels/_id/index5.post.mjs +1 -1
  112. package/.output/server/chunks/routes/api/workshop/channels/_id/index7.get.mjs +1 -1
  113. package/.output/server/chunks/routes/api/workshop/channels/_id/index7.post.mjs +1 -1
  114. package/.output/server/chunks/routes/api/workshop/channels/_id/line.put.mjs +1 -1
  115. package/.output/server/chunks/routes/api/workshop/channels/_id/members/join.post.mjs +1 -1
  116. package/.output/server/chunks/routes/api/workshop/channels/_id/memories/_memoryId/promote.post.mjs +1 -1
  117. package/.output/server/chunks/routes/api/workshop/channels/_id/memories/merge.post.mjs +1 -1
  118. package/.output/server/chunks/routes/api/workshop/channels/_id/products.get.mjs +1 -1
  119. package/.output/server/chunks/routes/api/workshop/channels/_id/products.put.mjs +1 -1
  120. package/.output/server/chunks/routes/api/workshop/channels/_id/terminals.get.mjs +1 -1
  121. package/.output/server/chunks/routes/api/workshop/channels/_id/tool-usage.get.mjs +1 -1
  122. package/.output/server/chunks/routes/api/workshop/channels/_id/tools/reset.post.mjs +1 -1
  123. package/.output/server/chunks/routes/api/workshop/channels/_id/twin-profile.get.mjs +1 -1
  124. package/.output/server/chunks/routes/api/workshop/channels/_id/twin-profile.patch.mjs +1 -1
  125. package/.output/server/chunks/routes/api/workshop/channels/_id_.delete.mjs +1 -1
  126. package/.output/server/chunks/routes/api/workshop/channels/index.get.mjs +1 -1
  127. package/.output/server/chunks/routes/api/workshop/channels/index.patch.mjs +1 -1
  128. package/.output/server/chunks/routes/api/workshop/channels.post.mjs +7 -7
  129. package/.output/server/chunks/routes/api/workshop/daq/_id/bind.post.mjs +1 -1
  130. package/.output/server/chunks/routes/api/workshop/daq/_id/bindings.put.mjs +1 -1
  131. package/.output/server/chunks/routes/api/workshop/daq/_id/frames/content.get.mjs +1 -1
  132. package/.output/server/chunks/routes/api/workshop/daq/_id/frames.get.mjs +1 -1
  133. package/.output/server/chunks/routes/api/workshop/daq/_id/ingest.post.mjs +2 -2
  134. package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs +1 -1
  135. package/.output/server/chunks/routes/api/workshop/daq/_id/test.post.mjs +1 -1
  136. package/.output/server/chunks/routes/api/workshop/daq/_id_.delete.mjs +1 -1
  137. package/.output/server/chunks/routes/api/workshop/daq/_id_.patch.mjs +1 -1
  138. package/.output/server/chunks/routes/api/workshop/daq/alarms/_id/ack.post.mjs +1 -1
  139. package/.output/server/chunks/routes/api/workshop/daq/controller.post.mjs +1 -1
  140. package/.output/server/chunks/routes/api/workshop/daq/index.get.mjs +1 -1
  141. package/.output/server/chunks/routes/api/workshop/daq/index2.post.mjs +1 -1
  142. package/.output/server/chunks/routes/api/workshop/daq/infra/reconnect.post.mjs +1 -1
  143. package/.output/server/chunks/routes/api/workshop/daq/storage/retention.put.mjs +1 -1
  144. package/.output/server/chunks/routes/api/workshop/daq/storage/rollup.post.mjs +1 -1
  145. package/.output/server/chunks/routes/api/workshop/daq/storage.get.mjs +1 -1
  146. package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.delete.mjs +1 -1
  147. package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.patch.mjs +1 -1
  148. package/.output/server/chunks/routes/api/workshop/daq/test-driver.post.mjs +1 -1
  149. package/.output/server/chunks/routes/api/workshop/dcw/_id/bind.post.mjs +1 -1
  150. package/.output/server/chunks/routes/api/workshop/dcw/_id/bindings.put.mjs +1 -1
  151. package/.output/server/chunks/routes/api/workshop/dcw/_id/param-ledger.get.mjs +1 -1
  152. package/.output/server/chunks/routes/api/workshop/dcw/_id/read.post.mjs +1 -1
  153. package/.output/server/chunks/routes/api/workshop/dcw/_id/test.post.mjs +1 -1
  154. package/.output/server/chunks/routes/api/workshop/dcw/_id/write.post.mjs +1 -1
  155. package/.output/server/chunks/routes/api/workshop/dcw/_id_.delete.mjs +1 -1
  156. package/.output/server/chunks/routes/api/workshop/dcw/_id_.patch.mjs +1 -1
  157. package/.output/server/chunks/routes/api/workshop/dcw/controller.post.mjs +1 -1
  158. package/.output/server/chunks/routes/api/workshop/dcw/index.get.mjs +1 -1
  159. package/.output/server/chunks/routes/api/workshop/dcw/index.post.mjs +1 -1
  160. package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs +1 -1
  161. package/.output/server/chunks/routes/api/workshop/dcw/index2.post.mjs +1 -1
  162. package/.output/server/chunks/routes/api/workshop/dcw/index3.get.mjs +1 -1
  163. package/.output/server/chunks/routes/api/workshop/dcw/index3.post.mjs +1 -1
  164. package/.output/server/chunks/routes/api/workshop/dcw/index4.get.mjs +1 -1
  165. package/.output/server/chunks/routes/api/workshop/dcw/index4.post.mjs +1 -1
  166. package/.output/server/chunks/routes/api/workshop/dcw/index5.get.mjs +1 -1
  167. package/.output/server/chunks/routes/api/workshop/dcw/index5.post.mjs +1 -1
  168. package/.output/server/chunks/routes/api/workshop/dcw/index6.get.mjs +1 -1
  169. package/.output/server/chunks/routes/api/workshop/dcw/index7.get.mjs +1 -1
  170. package/.output/server/chunks/routes/api/workshop/dcw/index8.get.mjs +1 -1
  171. package/.output/server/chunks/routes/api/workshop/dcw/journal/node/_nodeId/rollback.post.mjs +1 -1
  172. package/.output/server/chunks/routes/api/workshop/dcw/line/query.get.mjs +1 -1
  173. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs +1 -1
  174. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs +1 -1
  175. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.delete.mjs +1 -1
  176. package/.output/server/chunks/routes/api/workshop/dcw/lines/index.get.mjs +1 -1
  177. package/.output/server/chunks/routes/api/workshop/dcw/mes-artifacts/file.get.mjs +1 -1
  178. package/.output/server/chunks/routes/api/workshop/dcw/mes-hook-test.post.mjs +1 -1
  179. package/.output/server/chunks/routes/api/workshop/dcw/mes-test-read.post.mjs +1 -1
  180. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/judge.post.mjs +1 -1
  181. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/rollback.post.mjs +1 -1
  182. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/series.get.mjs +1 -1
  183. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id_.get.mjs +1 -1
  184. package/.output/server/chunks/routes/api/workshop/dcw/params/_id/read.post.mjs +1 -1
  185. package/.output/server/chunks/routes/api/workshop/dcw/params/_id/write.post.mjs +1 -1
  186. package/.output/server/chunks/routes/api/workshop/dcw/params/_id_.delete.mjs +1 -1
  187. package/.output/server/chunks/routes/api/workshop/dcw/params/_id_.patch.mjs +1 -1
  188. package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.delete.mjs +1 -1
  189. package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.patch.mjs +1 -1
  190. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/apply.post.mjs +1 -1
  191. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/mark-good.post.mjs +1 -1
  192. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/revert.post.mjs +1 -1
  193. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/rollback-good.post.mjs +1 -1
  194. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.delete.mjs +2 -2
  195. package/.output/server/chunks/routes/api/workshop/dcw/recipes/index.patch.mjs +1 -1
  196. package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/close.post.mjs +1 -1
  197. package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/data.get.mjs +1 -1
  198. package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/rollback.post.mjs +1 -1
  199. package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.delete.mjs +1 -1
  200. package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.patch.mjs +1 -1
  201. package/.output/server/chunks/routes/api/workshop/dcw/test-driver.post.mjs +1 -1
  202. package/.output/server/chunks/routes/api/workshop/device-twins/_id/control.post.mjs +1 -1
  203. package/.output/server/chunks/routes/api/workshop/device-twins/_id/telemetry.post.mjs +1 -1
  204. package/.output/server/chunks/routes/api/workshop/device-twins/_id_.delete.mjs +1 -1
  205. package/.output/server/chunks/routes/api/workshop/device-twins/_id_.patch.mjs +1 -1
  206. package/.output/server/chunks/routes/api/workshop/eda/commonality.get.mjs +1 -1
  207. package/.output/server/chunks/routes/api/workshop/eda/index6.get.mjs +1 -1
  208. package/.output/server/chunks/routes/api/workshop/eda/index6.post.mjs +1 -1
  209. package/.output/server/chunks/routes/api/workshop/eda/vm/predict.post.mjs +1 -1
  210. package/.output/server/chunks/routes/api/workshop/exp/confirmations/_id/decide.post.mjs +1 -1
  211. package/.output/server/chunks/routes/api/workshop/exp/index.get.mjs +1 -1
  212. package/.output/server/chunks/routes/api/workshop/fs/dirs.get.mjs +1 -1
  213. package/.output/server/chunks/routes/api/workshop/harnesses/_id/providers.get.mjs +1 -1
  214. package/.output/server/chunks/routes/api/workshop/harnesses.get.mjs +1 -1
  215. package/.output/server/chunks/routes/api/workshop/hitl/pending.get.mjs +1 -1
  216. package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs +1 -1
  217. package/.output/server/chunks/routes/api/workshop/index.mjs +1 -1
  218. package/.output/server/chunks/routes/api/workshop/index.post.mjs +1 -1
  219. package/.output/server/chunks/routes/api/workshop/index.put.mjs +1 -1
  220. package/.output/server/chunks/routes/api/workshop/index12.get.mjs +1 -1
  221. package/.output/server/chunks/routes/api/workshop/index13.get.mjs +1 -1
  222. package/.output/server/chunks/routes/api/workshop/index14.get.mjs +1 -1
  223. package/.output/server/chunks/routes/api/workshop/index2.get.mjs +1 -1
  224. package/.output/server/chunks/routes/api/workshop/index2.post.mjs +1 -1
  225. package/.output/server/chunks/routes/api/workshop/index3.get.mjs +1 -1
  226. package/.output/server/chunks/routes/api/workshop/index3.post.mjs +1 -1
  227. package/.output/server/chunks/routes/api/workshop/index4.post.mjs +1 -1
  228. package/.output/server/chunks/routes/api/workshop/index5.post.mjs +1 -1
  229. package/.output/server/chunks/routes/api/workshop/index6.get.mjs +1 -1
  230. package/.output/server/chunks/routes/api/workshop/index6.post.mjs +1 -1
  231. package/.output/server/chunks/routes/api/workshop/index7.get.mjs +1 -1
  232. package/.output/server/chunks/routes/api/workshop/index7.post.mjs +1 -1
  233. package/.output/server/chunks/routes/api/workshop/index8.get.mjs +1 -1
  234. package/.output/server/chunks/routes/api/workshop/index8.post.mjs +1 -1
  235. package/.output/server/chunks/routes/api/workshop/index9.post.mjs +1 -1
  236. package/.output/server/chunks/routes/api/workshop/mes/bridge.post.mjs +1 -1
  237. package/.output/server/chunks/routes/api/workshop/mes/datasets.get.mjs +1 -1
  238. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/autofix.mjs +1 -1
  239. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/compile.mjs +1 -1
  240. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/evidence.mjs +1 -1
  241. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/publish.mjs +1 -1
  242. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/rules/_ruleId/approval-decision.mjs +1 -1
  243. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/rules/_ruleId/approval.mjs +1 -1
  244. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/rules/_ruleId/transition.mjs +1 -1
  245. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/subgraph.mjs +1 -1
  246. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/validate.mjs +1 -1
  247. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId_.mjs +1 -1
  248. package/.output/server/chunks/routes/api/workshop/ontology/export/_ontologyId_.mjs +1 -1
  249. package/.output/server/chunks/routes/api/workshop/ontology/index.mjs +1 -1
  250. package/.output/server/chunks/routes/api/workshop/ontology/scene.mjs +1 -1
  251. package/.output/server/chunks/routes/api/workshop/ontology/traces/_ontologyId_.mjs +1 -1
  252. package/.output/server/chunks/routes/api/workshop/ontology/versions/_ontologyId/compare.mjs +1 -1
  253. package/.output/server/chunks/routes/api/workshop/ontology/versions/_ontologyId_.mjs +1 -1
  254. package/.output/server/chunks/routes/api/workshop/optimization/capabilities.get.mjs +1 -1
  255. package/.output/server/chunks/routes/api/workshop/optimization/index.get.mjs +1 -1
  256. package/.output/server/chunks/routes/api/workshop/optimization/index.mjs +1 -1
  257. package/.output/server/chunks/routes/api/workshop/optimization/index2.mjs +1 -1
  258. package/.output/server/chunks/routes/api/workshop/optimization/profiles/_id/publish.post.mjs +1 -1
  259. package/.output/server/chunks/routes/api/workshop/optimization/recommendations/_id/crosscheck.post.mjs +1 -1
  260. package/.output/server/chunks/routes/api/workshop/optimization/recommendations/_id/dispatch.post.mjs +1 -1
  261. package/.output/server/chunks/routes/api/workshop/optimization/solve.post.mjs +1 -1
  262. package/.output/server/chunks/routes/api/workshop/plugins/_name/disable.post.mjs +1 -1
  263. package/.output/server/chunks/routes/api/workshop/plugins/_name/enable.post.mjs +1 -1
  264. package/.output/server/chunks/routes/api/workshop/process-model/datasets.post.mjs +1 -1
  265. package/.output/server/chunks/routes/api/workshop/process-model/eligibility.mjs +1 -1
  266. package/.output/server/chunks/routes/api/workshop/process-model/experiments.mjs +1 -1
  267. package/.output/server/chunks/routes/api/workshop/process-model/index.mjs +1 -1
  268. package/.output/server/chunks/routes/api/workshop/process-model/specs/_id/publish.post.mjs +1 -1
  269. package/.output/server/chunks/routes/api/workshop/process-model/train.post.mjs +1 -1
  270. package/.output/server/chunks/routes/api/workshop/projects/_id/activate.post.mjs +1 -1
  271. package/.output/server/chunks/routes/api/workshop/projects/_id/approvals/_aid/decide.post.mjs +1 -1
  272. package/.output/server/chunks/routes/api/workshop/projects/_id/archive.post.mjs +1 -1
  273. package/.output/server/chunks/routes/api/workshop/projects/_id/channels/_channelId_.delete.mjs +1 -1
  274. package/.output/server/chunks/routes/api/workshop/projects/_id/complete.post.mjs +1 -1
  275. package/.output/server/chunks/routes/api/workshop/projects/_id/continue.post.mjs +1 -1
  276. package/.output/server/chunks/routes/api/workshop/projects/_id/deliverables/_did/waive.post.mjs +1 -1
  277. package/.output/server/chunks/routes/api/workshop/projects/_id/deliverables/index.get.mjs +1 -1
  278. package/.output/server/chunks/routes/api/workshop/projects/_id/deliverables/index.patch.mjs +1 -1
  279. package/.output/server/chunks/routes/api/workshop/projects/_id/health.get.mjs +1 -1
  280. package/.output/server/chunks/routes/api/workshop/projects/_id/index.get.mjs +1 -1
  281. package/.output/server/chunks/routes/api/workshop/projects/_id/index.post.mjs +1 -1
  282. package/.output/server/chunks/routes/api/workshop/projects/_id/index2.get.mjs +1 -1
  283. package/.output/server/chunks/routes/api/workshop/projects/_id/index2.post.mjs +1 -1
  284. package/.output/server/chunks/routes/api/workshop/projects/_id/index3.get.mjs +1 -1
  285. package/.output/server/chunks/routes/api/workshop/projects/_id/index3.post.mjs +1 -1
  286. package/.output/server/chunks/routes/api/workshop/projects/_id/index4.get.mjs +1 -1
  287. package/.output/server/chunks/routes/api/workshop/projects/_id/index4.post.mjs +1 -1
  288. package/.output/server/chunks/routes/api/workshop/projects/_id/index5.get.mjs +1 -1
  289. package/.output/server/chunks/routes/api/workshop/projects/_id/index6.get.mjs +1 -1
  290. package/.output/server/chunks/routes/api/workshop/projects/_id/index7.get.mjs +1 -1
  291. package/.output/server/chunks/routes/api/workshop/projects/_id/index8.get.mjs +1 -1
  292. package/.output/server/chunks/routes/api/workshop/projects/_id/kernel/tick.post.mjs +1 -1
  293. package/.output/server/chunks/routes/api/workshop/projects/_id/ledger.get.mjs +1 -1
  294. package/.output/server/chunks/routes/api/workshop/projects/_id/members/_userId_.delete.mjs +1 -1
  295. package/.output/server/chunks/routes/api/workshop/projects/_id/observability/activity.get.mjs +1 -1
  296. package/.output/server/chunks/routes/api/workshop/projects/_id/observability/route.get.mjs +1 -1
  297. package/.output/server/chunks/routes/api/workshop/projects/_id/observability/work-items/_wid_.get.mjs +1 -1
  298. package/.output/server/chunks/routes/api/workshop/projects/_id/observability.get.mjs +1 -1
  299. package/.output/server/chunks/routes/api/workshop/projects/_id/pause.post.mjs +1 -1
  300. package/.output/server/chunks/routes/api/workshop/projects/_id/plan/request-approval.post.mjs +1 -1
  301. package/.output/server/chunks/routes/api/workshop/projects/_id/proposals/_decisionId/apply.post.mjs +1 -1
  302. package/.output/server/chunks/routes/api/workshop/projects/_id/reconcile.post.mjs +1 -1
  303. package/.output/server/chunks/routes/api/workshop/projects/_id/report.get.mjs +1 -1
  304. package/.output/server/chunks/routes/api/workshop/projects/_id/results/_rid/request-acceptance.post.mjs +1 -1
  305. package/.output/server/chunks/routes/api/workshop/projects/_id/results/_rid/review.post.mjs +1 -1
  306. package/.output/server/chunks/routes/api/workshop/projects/_id/results/_rid/submit.post.mjs +1 -1
  307. package/.output/server/chunks/routes/api/workshop/projects/_id/results/_rid/supersede.post.mjs +1 -1
  308. package/.output/server/chunks/routes/api/workshop/projects/_id/resume.post.mjs +1 -1
  309. package/.output/server/chunks/routes/api/workshop/projects/_id/sessions.get.mjs +1 -1
  310. package/.output/server/chunks/routes/api/workshop/projects/_id/snapshot.get.mjs +1 -1
  311. package/.output/server/chunks/routes/api/workshop/projects/_id/terminate.post.mjs +1 -1
  312. package/.output/server/chunks/routes/api/workshop/projects/_id/trace/_traceId_.get.mjs +1 -1
  313. package/.output/server/chunks/routes/api/workshop/projects/_id/work-items/_wid/cancel.post.mjs +1 -1
  314. package/.output/server/chunks/routes/api/workshop/projects/_id/work-items/_wid/dispatch.post.mjs +1 -1
  315. package/.output/server/chunks/routes/api/workshop/projects/_id/work-items/_wid/retry.post.mjs +1 -1
  316. package/.output/server/chunks/routes/api/workshop/projects/_id/work-items/index.get.mjs +1 -1
  317. package/.output/server/chunks/routes/api/workshop/projects/_id/work-items/index.patch.mjs +1 -1
  318. package/.output/server/chunks/routes/api/workshop/projects/_id_.get.mjs +1 -1
  319. package/.output/server/chunks/routes/api/workshop/projects/_id_.patch.mjs +1 -1
  320. package/.output/server/chunks/routes/api/workshop/projects/instantiate.post.mjs +1 -1
  321. package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.delete.mjs +1 -1
  322. package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.put.mjs +1 -1
  323. package/.output/server/chunks/routes/api/workshop/tasks/_id/recovery-disposition.post.mjs +44 -0
  324. package/.output/server/chunks/routes/api/workshop/tasks/_id/recovery-disposition.post.mjs.map +1 -0
  325. package/.output/server/chunks/routes/api/workshop/tasks/recovery-holds.get.mjs +38 -0
  326. package/.output/server/chunks/routes/api/workshop/tasks/recovery-holds.get.mjs.map +1 -0
  327. package/.output/server/chunks/routes/api/workshop/teams/_id/deploy.post.mjs +1 -1
  328. package/.output/server/chunks/routes/api/workshop/teams/_id/index.put.mjs +1 -1
  329. package/.output/server/chunks/routes/api/workshop/teams/_id/index2.get.mjs +1 -1
  330. package/.output/server/chunks/routes/api/workshop/tools/sync.post.mjs +1 -1
  331. package/.output/server/chunks/routes/api/workshop/workspaces/_id/channel-templates/_tplId_.post.mjs +2 -2
  332. package/.output/server/chunks/routes/api/workshop/ws/ticket.post.mjs +1 -1
  333. package/.output/server/chunks/routes/renderer.mjs +2 -2
  334. package/.output/server/chunks/virtual/entry.mjs +6 -2
  335. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  336. package/.output/server/package.json +1 -1
  337. package/README-zh.md +7 -7
  338. package/README.md +7 -7
  339. package/app/components/dcw/DcwNodesTable.vue +24 -0
  340. package/docs/mcp.en.md +30 -27
  341. package/docs/mcp.md +7 -3
  342. package/docs/plugins.en.md +4 -2
  343. package/docs/plugins.md +4 -2
  344. package/i18n/dicts/dcwDetail.json +221 -219
  345. package/i18n/locales/en.ts +2 -0
  346. package/i18n/locales/zh-CN.ts +2 -0
  347. package/package.json +2 -1
  348. package/scripts/check-docs-sync.mjs +20 -9
  349. package/scripts/onboarding/forge-channel.mjs +2 -1
  350. package/scripts/onboarding/lib.mjs +159 -3
  351. package/scripts/onboarding/onboard.mjs +2 -0
  352. package/scripts/onboarding/preflight.mjs +233 -231
  353. package/scripts/onboarding/provision-line.mjs +12 -2
  354. package/scripts/onboarding/sim-attest.mjs +103 -0
  355. package/scripts/onboarding/sim-twin.mjs +88 -4
  356. package/scripts/onboarding/test-connection.mjs +2 -1
  357. package/scripts/onboarding/v6-protected-api.mjs +41 -0
  358. package/scripts/onboarding/v6-protected-fixture.mjs +54 -0
  359. package/scripts/onboarding/verify-line.mjs +179 -136
  360. package/scripts/onboarding/verify-mirror.mjs +149 -145
  361. package/server/api/workshop/agent-tools/list.get.ts +10 -1
  362. package/server/api/workshop/tasks/[id]/recovery-disposition.post.ts +32 -0
  363. package/server/api/workshop/tasks/recovery-holds.get.ts +22 -0
  364. package/server/plugins-builtin/rag-bridge/index.mjs +20 -2
  365. package/server/services/workshop/agents/agent-interface.ts +3 -0
  366. package/server/services/workshop/agents/base-agent.ts +100 -4
  367. package/server/services/workshop/agents/execution-scope.ts +26 -0
  368. package/server/services/workshop/agents/hitl-capabilities.ts +3 -3
  369. package/server/services/workshop/agents/host-tool-bridge/dispatch.ts +42 -2
  370. package/server/services/workshop/agents/host-tool-bridge/tools/progress.ts +4 -0
  371. package/server/services/workshop/agents/host-tool-bridge/tools/tasks.ts +11 -28
  372. package/server/services/workshop/agents/host-tool-bridge/tools/team-delegation.ts +83 -129
  373. package/server/services/workshop/agents/industrial/dcw-tools.ts +27 -5
  374. package/server/services/workshop/agents/industrial/line-tools.ts +15 -4
  375. package/server/services/workshop/agents/industrial/ops-tools.ts +32 -6
  376. package/server/services/workshop/agents/industrial/optimization-tools.ts +16 -3
  377. package/server/services/workshop/agents/industrial/recipe-propose-tools.ts +26 -3
  378. package/server/services/workshop/agents/omp-agent/client.ts +2 -4
  379. package/server/services/workshop/agents/omp-agent/core.ts +3 -0
  380. package/server/services/workshop/agents/omp-agent/lifecycle.ts +70 -4
  381. package/server/services/workshop/agents/omp-agent/supervision-decision.ts +3 -1
  382. package/server/services/workshop/agents/omp-agent/tools-steer.ts +113 -32
  383. package/server/services/workshop/agents/tool-approvals.ts +113 -29
  384. package/server/services/workshop/agents/tool-classes.ts +72 -56
  385. package/server/services/workshop/db/database/open.ts +5 -2
  386. package/server/services/workshop/db/database/schema.ts +1 -0
  387. package/server/services/workshop/db/database/seed.ts +2 -2
  388. package/server/services/workshop/db/message.repo.ts +134 -26
  389. package/server/services/workshop/db/project-kernel.repo.ts +3 -3
  390. package/server/services/workshop/db/schema.sql +3 -1
  391. package/server/services/workshop/db/task.repo.ts +101 -0
  392. package/server/services/workshop/dcw/dcw-controller/actuation.ts +120 -9
  393. package/server/services/workshop/dcw/dcw-controller/contracts.ts +18 -16
  394. package/server/services/workshop/dcw/dcw-controller/crud.ts +23 -0
  395. package/server/services/workshop/dcw/dcw-controller/lines.ts +34 -2
  396. package/server/services/workshop/dcw/dcw-controller/recipes.ts +80 -6
  397. package/server/services/workshop/dcw/dcw-controller/state.ts +89 -88
  398. package/server/services/workshop/dcw/dcw-controller/types.ts +5 -0
  399. package/server/services/workshop/dcw/dcw-controller/write.ts +9 -6
  400. package/server/services/workshop/dcw/dcw-line.repo.ts +2 -0
  401. package/server/services/workshop/dcw/dcw-node.repo.ts +3 -1
  402. package/server/services/workshop/dcw/dcw-node.ts +346 -307
  403. package/server/services/workshop/dcw/dcw-runtime.ts +8 -4
  404. package/server/services/workshop/projects/effects.ts +47 -29
  405. package/server/services/workshop/projects/kernel.ts +8 -1
  406. package/server/services/workshop/projects/legacy-recovery.ts +36 -0
  407. package/server/services/workshop/projects/service.ts +15 -0
  408. package/server/services/workshop/runtime/agent-runtime/contracts.ts +1 -1
  409. package/server/services/workshop/runtime/agent-runtime/lifecycle.ts +7 -2
  410. package/server/services/workshop/runtime/agent-runtime/message-watchdog.ts +40 -0
  411. package/server/services/workshop/runtime/agent-runtime/message.ts +151 -21
  412. package/server/services/workshop/runtime/agent-runtime/state.ts +69 -13
  413. package/server/services/workshop/runtime/agent-runtime/supervise.ts +219 -42
  414. package/server/services/workshop/runtime/agent-runtime/types.ts +6 -0
  415. package/server/services/workshop/runtime/mailbox.ts +112 -21
  416. package/server/services/workshop/runtime/manager/admin-channel.ts +34 -22
  417. package/server/services/workshop/runtime/manager/host-tools.ts +18 -5
  418. package/server/services/workshop/runtime/manager/runtime-wiring.ts +101 -41
  419. package/server/services/workshop/runtime/manager/schedules.ts +3 -1
  420. package/server/services/workshop/runtime/manager/tasks.ts +41 -0
  421. package/server/services/workshop/runtime/memory/recall.ts +11 -4
  422. package/server/services/workshop/runtime/memory/types.ts +2 -0
  423. package/server/services/workshop/runtime/scheduler-loop/contracts.ts +29 -29
  424. package/server/services/workshop/runtime/scheduler-loop/execute.ts +7 -0
  425. package/server/services/workshop/runtime/scheduler-loop/rules.ts +3 -0
  426. package/server/services/workshop/runtime/scheduler-loop/snapshot.ts +10 -2
  427. package/server/services/workshop/runtime/scheduler-loop/state.ts +12 -0
  428. package/server/services/workshop/runtime/scheduler-loop/tick.ts +54 -5
  429. package/server/services/workshop/runtime/task-engine/create.ts +16 -0
  430. package/server/services/workshop/runtime/task-engine/helpers.ts +5 -0
  431. package/server/services/workshop/runtime/task-engine/legacy-recovery.ts +149 -0
  432. package/server/services/workshop/runtime/task-engine/lifecycle.ts +38 -1
  433. package/server/services/workshop/runtime/task-engine/transition.ts +4 -0
  434. package/server/services/workshop/runtime/task-engine/update.ts +6 -0
  435. package/server/services/workshop/runtime/task-engine/views.ts +61 -0
  436. package/shared/dcw-protocol/line.ts +4 -0
  437. package/.output/public/_nuxt/C8QlHux5.js +0 -1
  438. package/.output/public/_nuxt/_id_.0EnzA0aA.css +0 -1
  439. package/.output/public/_nuxt/builds/meta/846b9c03-1442-4fcb-b3fc-1d9484eaa41b.json +0 -1
  440. package/.output/server/chunks/build/_id_-C0vNEbts.mjs.map +0 -1
@@ -24,6 +24,7 @@ import { assertRecipeCreate, assertRecipeOperation, recipeApprovalPayload, type
24
24
  import { RECOVERY_RETRY_HINT, RECOVERY_TRACE_HINT, RECOVERY_VERIFY_HINT } from './fallback-hints'
25
25
  import { approvalOnlyTrialReceipt, sameApprovalOnlyTrialReceipt, type ApprovalOnlyTrialReceipt } from './bench-approval-only'
26
26
  import { currentToolInvocation } from '../governance-harness-audit'
27
+ import { currentExecutionScope } from '../execution-scope'
27
28
  import { executionModeOfAgent } from '../execution-mode'
28
29
  import { getAmlRuntime } from '../../aml/runtime'
29
30
  import { markRecipeProposalsAccepted } from '../../db/improvement.repo'
@@ -682,6 +683,7 @@ export async function toolRecipeCreate(agentId: string, args: {
682
683
  if (!again.ok) return { text: `人工已批准,但审批期间授权已失效,本次未创建:${again.text}`, isError: true }
683
684
  }
684
685
  try {
686
+ currentExecutionScope()?.assertActive()
685
687
  const created = getDcwController().createRecipe({
686
688
  name,
687
689
  productId,
@@ -908,6 +910,7 @@ export async function toolRecipeUpdate(agentId: string, args: {
908
910
  const extra = list.filter(p => !recipe.params.some(x => x.nodeId === String(p.node_id).trim()))
909
911
  for (const p of extra) merged.push({ nodeId: String(p.node_id).trim(), value: Number(p.value) })
910
912
  try {
913
+ currentExecutionScope()?.assertActive()
911
914
  const updated = getDcwController().updateRecipe(recipeId, { params: merged }, {
912
915
  by: 'agent',
913
916
  actorName: agentBadgeLabel(agentId),
@@ -993,6 +996,7 @@ export async function toolRecipeRollback(agentId: string, args: {
993
996
  if (latestSessionRecipe) return latestSessionRecipe
994
997
  }
995
998
  try {
999
+ currentExecutionScope()?.assertActive()
996
1000
  const finalSessionRecipe = sessionRecipeError(sessionScope, getDcwRecipeRepo().byId(recipeId) ?? recipe)
997
1001
  if (finalSessionRecipe) return finalSessionRecipe
998
1002
  if (dispatch) {
@@ -1009,8 +1013,15 @@ export async function toolRecipeRollback(agentId: string, args: {
1009
1013
  description: reason,
1010
1014
  agentDispatch: true,
1011
1015
  agentApprovalId: gateApprovalId,
1016
+ executionScope: currentExecutionScope(),
1012
1017
  emergency,
1013
1018
  })
1019
+ try {
1020
+ currentExecutionScope()?.assertActive()
1021
+ }
1022
+ catch {
1023
+ return { text: `回退定义已处理,批次 ${run.id} 执行后租约失效,设备可能已变化,请核实配方和设备状态。${run.results.map(r => `${r.nodeId ?? r.templateRef}:${r.message}`).join(';')}`, isError: true }
1024
+ }
1014
1025
  const okN = run.results.filter(r => r.ok).length
1015
1026
  const acks = run.ackSummary ?? { verified: okN, unverified: 0, failed: run.results.length - okN, total: run.results.length }
1016
1027
  const defNote = definitionNoop
@@ -1018,7 +1029,7 @@ export async function toolRecipeRollback(agentId: string, args: {
1018
1029
  : `已生成 v${updated.version ?? 1}`
1019
1030
  // 整批重下发全部失败(典型:节点写入保持窗/节流未放行)→ 响亮失败:定义已回退但产线仍运行
1020
1031
  // 旧参数,Agent 必须知道并稍后重发(再调本工具会再生成一个回退版本,或按 RECOVERY_RETRY_HINT 整批重试)。
1021
- if (run.results.length > 0 && okN === 0) {
1032
+ if (run.results.length > 0 && okN === 0 && acks.unverified === 0) {
1022
1033
  return {
1023
1034
  text: `回退部分失败:配方「${updated.name}」${defNote},但整批重下发 0/${run.results.length} 参数成功(节点写入保持窗/节流未放行)。产线仍在运行旧参数 —— ${RECOVERY_RETRY_HINT}(回退目标 v${updated.version ?? 1});原因:${reason}。`,
1024
1035
  isError: true,
@@ -1102,6 +1113,7 @@ async function hitlDispatchGate(agentId: string, recipeId: string, detail: strin
1102
1113
  title,
1103
1114
  ...(opts?.payload !== undefined ? { payload: opts.payload } : {}),
1104
1115
  ...(timeoutMs ? { timeoutMs } : {}),
1116
+ ...(currentExecutionScope() ? { executionScope: currentExecutionScope() } : {}),
1105
1117
  })
1106
1118
  return { approved: decision.approved, comment: decision.comment, id: decision.id }
1107
1119
  }
@@ -1198,7 +1210,7 @@ export async function revalidateApprovedAction(
1198
1210
  // Grant lookup is asynchronous. Re-read the active tuple after that await so
1199
1211
  // queued line/run changes cannot pass between the initial comparison and the
1200
1212
  // caller's dispatch continuation.
1201
- const changedAfterGrantCheck = approvedContextError(agentId, recipe, op, expectedContext, targetNodeIds, approvalBypassed)
1213
+ const changedAfterGrantCheck = approvedContextError(agentId, recipe, op, expectedContext, targetNodeIds, approvalBypassed, expectedDefinition)
1202
1214
  if (changedAfterGrantCheck) return changedAfterGrantCheck
1203
1215
  return null
1204
1216
  }
@@ -1384,6 +1396,7 @@ export async function toolRecipeTrial(agentId: string, args: {
1384
1396
  const invocation = currentToolInvocation()
1385
1397
  const run = await getDcwController().applyRecipe(recipeId, {
1386
1398
  overrides: list, trial: true, agentDispatch: true, agentApprovalId: gateApprovalId, emergency,
1399
+ ...(currentExecutionScope() ? { executionScope: currentExecutionScope() } : {}),
1387
1400
  agentTrialMeta: {
1388
1401
  actor: agentId, actorName: agentBadgeLabel(agentId), hypothesis,
1389
1402
  channelId: invocation?.channelId || channelIdOfAgent(agentId),
@@ -1405,6 +1418,12 @@ export async function toolRecipeTrial(agentId: string, args: {
1405
1418
  })
1406
1419
  }
1407
1420
  catch { /* 审计失败不影响试验结果 */ }
1421
+ try {
1422
+ currentExecutionScope()?.assertActive()
1423
+ }
1424
+ catch {
1425
+ return { text: `试验批次 ${run.id} 执行后租约失效,设备可能已变化,请核实批次结果与设备状态。${run.results.map(r => `${r.nodeId ?? r.templateRef}:${r.message}`).join(';')}`, isError: true, ...(approvalBypassed ? { approval_bypassed: true as const } : {}) }
1426
+ }
1408
1427
  const ackTagOf = (r: typeof run.results[number]): string => {
1409
1428
  if (!r.ok) return ''
1410
1429
  return r.verify?.verdict === 'verified' || r.ack === 'readback-verified' ? ' [证实✓]' : ' [未证实⚠]'
@@ -1412,7 +1431,7 @@ export async function toolRecipeTrial(agentId: string, args: {
1412
1431
  const changed = run.results.map((r) => {
1413
1432
  const node = r.nodeId ? getDcwController().byId(r.nodeId) : undefined
1414
1433
  const reason = r.ok ? '' : `(${String(r.message).slice(0, 60)})`
1415
- return `${node?.name ?? r.templateRef}→${r.value}${node?.unit ?? ''}${ackTagOf(r)}${r.ok ? '' : ` 被拒${reason}`}`
1434
+ return `${node?.name ?? r.templateRef}→${r.value}${node?.unit ?? ''}${ackTagOf(r)}${r.ok ? '' : r.verify?.verdict === 'unverified' ? ` 状态不确定${reason}` : ` 被拒${reason}`}`
1416
1435
  }).join(';')
1417
1436
  // 未证实/失败一律 isError(ACK 鉴定铁律:不许把"仅链路受理"报成试验成功)
1418
1437
  if (acks.failed > 0 || acks.unverified > 0) {
@@ -1520,6 +1539,7 @@ export async function toolRecipeApply(agentId: string, args: {
1520
1539
  agentDispatch: true,
1521
1540
  agentApprovalId: gateApprovalId,
1522
1541
  emergency,
1542
+ ...(currentExecutionScope() ? { executionScope: currentExecutionScope() } : {}),
1523
1543
  agentTrialMeta: {
1524
1544
  actor: agentId,
1525
1545
  actorName: agentBadgeLabel(agentId),
@@ -1532,19 +1552,19 @@ export async function toolRecipeApply(agentId: string, args: {
1532
1552
  const acks = run.ackSummary ?? { verified: run.results.filter(r => r.ok).length, unverified: 0, failed: run.results.filter(r => !r.ok).length, total: run.results.length }
1533
1553
  // 逐参数标注:被跳过/失败的参数(节点停用/已删除/限界拒绝)必须透出给 Agent,
1534
1554
  // 否则回包只见 N/N 成功数,无法定位哪些参数未生效(与 recipe_trial 的逐参数渲染同口径)。
1535
- const skipped = run.results.filter(r => !r.ok)
1555
+ const skipped = run.results.filter(r => !r.ok && r.verify?.verdict !== 'unverified')
1536
1556
  .map((r) => {
1537
1557
  const node = r.nodeId ? getDcwController().byId(r.nodeId) : undefined
1538
1558
  return `${node?.name ?? r.templateRef ?? r.nodeId ?? '?'}: ${String(r.message).slice(0, 80)}`
1539
1559
  })
1540
1560
  // 未证实参数(ok 但仅链路受理)单独点名 —— 这正是"参数真实正确下发"要堵的盲区
1541
- const unverified = run.results.filter(r => r.ok && r.verify?.verdict !== 'verified' && r.ack !== 'readback-verified')
1561
+ const unverified = run.results.filter(r => r.verify?.verdict === 'unverified' || (r.ok && r.verify?.verdict !== 'verified' && r.ack !== 'readback-verified'))
1542
1562
  .map((r) => {
1543
1563
  const node = r.nodeId ? getDcwController().byId(r.nodeId) : undefined
1544
1564
  return `${node?.name ?? r.templateRef ?? r.nodeId ?? '?'}: ${String(r.message).slice(0, 100)}`
1545
1565
  })
1546
1566
  const skippedNote = skipped.length > 0 ? `\n未生效参数(${skipped.length}):\n - ${skipped.join('\n - ')}` : ''
1547
- const unverifiedNote = unverified.length > 0 ? `\n未证实参数(${unverified.length};命令已受理但设备侧未确认):\n - ${unverified.join('\n - ')}` : ''
1567
+ const unverifiedNote = unverified.length > 0 ? `\n未证实参数(${unverified.length};可能已下发,设备状态须核实):\n - ${unverified.join('\n - ')}` : ''
1548
1568
  try {
1549
1569
  const { recordOps } = await import('../../ops/ops')
1550
1570
  recordOps({
@@ -1556,6 +1576,12 @@ export async function toolRecipeApply(agentId: string, args: {
1556
1576
  })
1557
1577
  }
1558
1578
  catch { /* 审计失败不影响下发结果 */ }
1579
+ try {
1580
+ currentExecutionScope()?.assertActive()
1581
+ }
1582
+ catch {
1583
+ return { text: `配方批次 ${run.id} 执行后租约失效,设备可能已变化,请核实批次结果与设备状态。${run.results.map(r => `${r.nodeId ?? r.templateRef}:${r.message}`).join(';')}`, isError: true }
1584
+ }
1559
1585
  if (acks.failed > 0 || acks.unverified > 0) {
1560
1586
  return {
1561
1587
  text: [
@@ -23,6 +23,7 @@ import { resolveRefFaces } from './tool-verify'
23
23
  import { assessIdentifiability } from '../../aml/identifiability'
24
24
  import { attachExplorationVerdict, explorationIdentifiabilityPreflight, identGateEnabled, identifiabilityLearningText, periodHintFromSeries, readTargetWindow } from './identifiability-tools'
25
25
  import { preDispatchCrossCheck } from '../../aml/twin/cross-check-service'
26
+ import { currentExecutionScope } from '../execution-scope'
26
27
 
27
28
  const sleep = (ms: number) => new Promise(r => setTimeout(r, ms))
28
29
 
@@ -133,13 +134,23 @@ export async function toolOptimizationExplore(agentId: string, args: {
133
134
  hypothesis: args.hypothesis ?? `探索激励(${direction > 0 ? 'up' : 'down'} ${Number(step).toFixed(3)};goal=${goalText.slice(0, 120)})`,
134
135
  }, channelId)
135
136
  const writeOk = !write.isError
137
+ if (writeOk) {
138
+ try {
139
+ currentExecutionScope()?.assertActive()
140
+ }
141
+ catch {
142
+ return { text: `探索写入已进入驱动,任务租约失效,设备状态须核实;未继续采样或判读。\n${write.text}`, isError: true }
143
+ }
144
+ }
136
145
 
137
146
  let targetAfter: number | null = null
138
147
  let verdictText = ''
139
148
  if (writeOk) {
140
149
  await sleep(settleSec * 1000)
150
+ currentExecutionScope()?.assertActive()
141
151
  // 写后窗(=settle 窗):一次取数同时取均值与序列(与写前窗对称)
142
152
  const postWindow = await readTargetWindow(targetNodeId, writeAtMs, Date.now())
153
+ currentExecutionScope()?.assertActive()
143
154
  targetAfter = postWindow.mean
144
155
  // P1 判读:前后窗完整序列交给可辨识性引擎(不再以单点差分作因果依据),
145
156
  // 判定回填干预台账(intervention_events);序列不足时 verdictText 空 → 中性文案,不外推。
@@ -165,7 +176,7 @@ export async function toolOptimizationExplore(agentId: string, args: {
165
176
  targetAfter,
166
177
  direction: direction > 0 ? 'up' : 'down',
167
178
  hypothesis: String(args.hypothesis ?? ''),
168
- writeStatus: writeOk ? 'ok' : 'rejected',
179
+ writeStatus: writeOk ? 'ok' : write.dispatch === 'not_dispatched' ? 'rejected' : 'failed',
169
180
  writeMessage: write.text.slice(0, 400),
170
181
  }
171
182
  try {
@@ -174,11 +185,13 @@ export async function toolOptimizationExplore(agentId: string, args: {
174
185
  .run(record.id, record.channelId, record.agentId, record.goalJson, record.controlNodeId, record.controlBefore, record.controlAfter, record.controlStep, record.targetNodeId, record.targetBefore, record.targetAfter, record.direction, record.hypothesis, record.writeStatus, record.writeMessage, new Date().toISOString())
175
186
  }
176
187
  catch (err) {
177
- return { text: `探索步已执行但记录落库失败:${err instanceof Error ? err.message : String(err)}\n\n${write.text}`, isError: writeOk ? undefined : true }
188
+ return { text: `探索记录落库失败:${err instanceof Error ? err.message : String(err)}\n\n${write.text}`, isError: true }
178
189
  }
179
190
 
180
191
  if (!writeOk) {
181
- return { text: `探索步被拒绝(未写入产线,已记录 rejected):\n${write.text}`, isError: true }
192
+ return write.dispatch === 'not_dispatched'
193
+ ? { text: `探索步被拒绝(未下发,已记录 rejected):\n${write.text}`, isError: true }
194
+ : { text: `探索步未获确认(已记录 failed,可能已下发;请核实设备状态):\n${write.text}`, isError: true }
182
195
  }
183
196
  const deltaTarget = targetAfter != null && targetBefore != null ? targetAfter - targetBefore : null
184
197
  const lines = [
@@ -30,6 +30,7 @@ import { GOVERNED_DISPATCH_HINT, RECOVERY_RETRY_HINT, RECOVERY_TRACE_HINT, RECOV
30
30
  import { amlActivityForLine } from './aml-activity'
31
31
  import { agentOpsScope, channelIdOfAgent, revalidateApprovedAction, sessionRecipeError } from './ops-tools'
32
32
  import { recipeEvidenceText } from '../../dcw/recipe-evidence'
33
+ import { currentExecutionScope } from '../execution-scope'
33
34
 
34
35
  /** 候选包上限(防审批卡被刷屏;1~3 套) */
35
36
  const MAX_PACKAGES = 3
@@ -275,6 +276,7 @@ export async function toolRecipePropose(agentId: string, args: {
275
276
  title: `整包方案审批:${recipe.name}`,
276
277
  timeoutMs: securityRecipeDispatchTimeoutMs(),
277
278
  payload,
279
+ ...(currentExecutionScope() ? { executionScope: currentExecutionScope() } : {}),
278
280
  })
279
281
  }
280
282
  catch (err) {
@@ -300,6 +302,20 @@ export async function toolRecipePropose(agentId: string, args: {
300
302
  const stale = await revalidateApprovedAction(agentId, recipe, 'dispatch', 'recipe_propose', { recipe_id: recipeId }, gate.activeContext)
301
303
  if (stale) return stale
302
304
 
305
+ const latestRecipe = getDcwController().listRecipes().find(r => r.id === recipeId)
306
+ if (!latestRecipe || (latestRecipe.version ?? 1) !== payload.recipeVersion
307
+ || JSON.stringify(latestRecipe.params.map(p => ({ nodeId: p.nodeId, value: p.value }))) !== JSON.stringify(payload.recipeParams)) {
308
+ return { text: '配方在授权复核期间已变更,本次未执行。请重新提交 recipe_propose。', isError: true }
309
+ }
310
+ const latestSessionBoundary = sessionRecipeError(sessionScope, latestRecipe)
311
+ if (latestSessionBoundary) return latestSessionBoundary
312
+ try {
313
+ currentExecutionScope()?.assertActive()
314
+ }
315
+ catch (err) {
316
+ return { text: `执行租约失效,方案未下发:${err instanceof Error ? err.message : String(err)}`, isError: true }
317
+ }
318
+
303
319
  // ---------- ⑦b 批准(choice 已由 decide 链 fail-closed 归一):选定包整批下发 ----------
304
320
  // 归一后的 decision.choice 必为合法下标(由 normalizeRecipeProposeDecision 保证;此处兜底防呆)
305
321
  const chosenIdx = decision.choice ?? 0
@@ -317,6 +333,7 @@ export async function toolRecipePropose(agentId: string, args: {
317
333
  agentDispatch: true,
318
334
  agentApprovalId: decision.id,
319
335
  emergency: args.emergency === true || args.emergency === 'true',
336
+ ...(currentExecutionScope() ? { executionScope: currentExecutionScope() } : {}),
320
337
  agentTrialMeta: {
321
338
  actor: agentId,
322
339
  actorName: agentBadgeLabel(agentId),
@@ -332,11 +349,17 @@ export async function toolRecipePropose(agentId: string, args: {
332
349
  return {
333
350
  text: [
334
351
  `方案「${chosen.name}」已获批准,但整批下发启动失败:${err instanceof Error ? err.message : String(err)}`,
335
- `产线未做任何变更;请等待节拍窗放行后重新提交 recipe_propose 整批下发本方案参数 —— ${GOVERNED_DISPATCH_HINT}。`,
352
+ `产线状态可能已变化,请核查执行记录与设备实际状态后再决定是否重试 —— ${GOVERNED_DISPATCH_HINT}。`,
336
353
  ].join('\n'),
337
354
  isError: true,
338
355
  }
339
356
  }
357
+ try {
358
+ currentExecutionScope()?.assertActive()
359
+ }
360
+ catch {
361
+ return { text: `方案批次 ${run.id} 执行后租约失效,设备可能已变化,请核实批次结果与设备状态。${run.results.map(r => `${r.nodeId ?? r.templateRef}:${r.message}`).join(';')}`, isError: true }
362
+ }
340
363
  // ---------- ⑦c ACK 鉴定回执(2026-10-08):三段口径 + 未证实/失败一律 isError ----------
341
364
  // 「ok」只是命令受理;回执按 设备证实(verified)/未证实(unverified)/失败(failed) 三段计,
342
365
  // 只要有 unverified 或 failed 就 isError —— Agent 必须如实知道哪个参数未获设备确认。
@@ -366,7 +389,7 @@ export async function toolRecipePropose(agentId: string, args: {
366
389
  const label = node?.name ?? r.templateRef ?? r.nodeId ?? '?'
367
390
  const spec = r.nodeId ? chosenByNode.get(r.nodeId) : undefined
368
391
  const change = spec ? `${spec.from ?? '?'}→${spec.to}` : `${r.value}(随批整发,本方案未改动)`
369
- return `- ${label} ${change}${node?.unit ?? ''}${ackTagOf(r)}${r.ok ? '' : ` 被拒:${String(r.message).slice(0, 80)}`}`
392
+ return `- ${label} ${change}${node?.unit ?? ''}${ackTagOf(r)}${r.ok ? '' : r.verify?.verdict === 'unverified' ? ` 状态不确定:${String(r.message).slice(0, 80)}` : ` 被拒:${String(r.message).slice(0, 80)}`}`
370
393
  })
371
394
  const feedback = decision.comment ? `\n[人工反馈] ${decision.comment}` : ''
372
395
  // RSI WP-D1:回执附证据链(批次成效由 verdict 聚合,取代"自行回访"的提示词纪律)
@@ -375,7 +398,7 @@ export async function toolRecipePropose(agentId: string, args: {
375
398
  ? `runId:${run.id}(后续轮次按此回访效果并回写经验)\n\n${evidenceBlock}`
376
399
  : `runId:${run.id}(后续轮次按此回访效果并回写经验)`
377
400
  // 全失败:响亮失败(isError;统一回退指引,口径 mirror recipe_trial/recipe_rollback)
378
- if (run.results.length > 0 && okN === 0) {
401
+ if (run.results.length > 0 && okN === 0 && acks.unverified === 0) {
379
402
  return {
380
403
  text: [
381
404
  `整包下发失败:方案「${chosen.name}」已获批准,但整批下发 0/${run.results.length} 参数成功(典型:节点写入保持窗/节流未放行)。${runIdNote}${feedback}`,
@@ -7,7 +7,6 @@ import type { AgentRunContext } from '../agent-interface'
7
7
  import { OmpRpcClient } from '../adapters/omp-rpc-client'
8
8
  import { attachTerminalTap, markTerminalSessionExit } from '../harness-terminal'
9
9
  import { bindHarnessProcess, markHarnessProcessExit, registerHarnessProcess } from '../harness-process'
10
- import { hostToolsForAgent } from '../host-tool-bridge'
11
10
 
12
11
  export abstract class OmpRpcAgentImplClient extends OmpRpcAgentImplEventMapping {
13
12
  protected async ensureClient(ctx: AgentRunContext): Promise<void> {
@@ -92,9 +91,8 @@ export abstract class OmpRpcAgentImplClient extends OmpRpcAgentImplEventMapping
92
91
  }
93
92
  }
94
93
 
95
- // 注册 host tools(按角色差异化:lead 全量,worker 剔除调度/团队管理专属工具)
94
+ // Tool definitions are registered with turn-specific aliases before each prompt.
96
95
  client.onHostToolCall(req => this.handleHostTool(req, client))
97
- await client.send({ type: 'set_host_tools', tools: hostToolsForAgent(this.selfAgentId, this.agentRole, this.channelId) })
98
96
 
99
97
  // 上下文治理探测(feature-detect 一次;失败退化被动 usage 跟踪)+ 原生压缩兜底保持开启
100
98
  // 会话身份(sessionId)也由 probeContext 取回:必须 **await** —— fire-and-forget 会与
@@ -107,7 +105,7 @@ export abstract class OmpRpcAgentImplClient extends OmpRpcAgentImplEventMapping
107
105
  void client.send({ type: 'set_auto_compaction', enabled: true }).catch(() => {})
108
106
 
109
107
  this.client = client
110
- this.hostToolsRegistered = true
108
+ this.hostToolsRegistered = false
111
109
  }
112
110
  }
113
111
 
@@ -7,6 +7,7 @@
7
7
  import { BaseAgentImpl } from '../base-agent'
8
8
  import type { AgentEvent, AgentInfo, AgentRunContext } from '../agent-interface'
9
9
  import type { AgentSessionEvent, OmpRpcClient } from '../adapters/omp-rpc-client'
10
+ import type { ExecutionScope } from '../execution-scope'
10
11
  import type { BaseAgentConfigView } from '../base-agent'
11
12
  import type { OmpAgentConfig } from './types'
12
13
  import { createRosterCache } from '../prompt-builder'
@@ -94,6 +95,8 @@ export abstract class OmpRpcAgentImplCore extends BaseAgentImpl {
94
95
  protected client: OmpRpcClient | null = null
95
96
  protected agentInfo: AgentInfo | null = null
96
97
  protected hostToolsRegistered = false
98
+ protected hostToolAliases: { client: OmpRpcClient, scope: ExecutionScope, nonce: string, revision: number, byAlias: Map<string, string>, byName: Map<string, string> } | null = null
99
+ protected hostToolRegistration: Promise<void> = Promise.resolve()
97
100
  /**
98
101
  * 会话回合状态(steer 可靠注入的依据):
99
102
  * omp 的 steer 仅在回合 streaming 中生效——prompt 已入列但尚未开始输出时,
@@ -7,6 +7,9 @@ import { hostToolsForAgent } from '../host-tool-bridge'
7
7
  import { killHarnessProcess, markHarnessProcessExit } from '../harness-process'
8
8
  import { liveAgents } from './helpers'
9
9
  import { markTerminalSessionExit } from '../harness-terminal'
10
+ import { createHash, randomBytes } from 'node:crypto'
11
+ import type { OmpRpcClient } from '../adapters/omp-rpc-client'
12
+ import type { ExecutionScope } from '../execution-scope'
10
13
 
11
14
  export abstract class OmpRpcAgentImplLifecycle extends OmpRpcAgentImplContextGovernance {
12
15
  async dispose(): Promise<void> {
@@ -20,14 +23,77 @@ export abstract class OmpRpcAgentImplLifecycle extends OmpRpcAgentImplContextGov
20
23
  markTerminalSessionExit(pid, null)
21
24
  }
22
25
  }
26
+ this.hostToolAliases = null
23
27
  this.hostToolsRegistered = false
24
28
  }
25
29
 
26
- /** 工具注册表变更 → 热重发 set_host_tools(在跑会话立即获得插件新工具,无需重spawn) */
30
+ /** Register aliases in a single ordered queue, including plugin hot reloads. */
31
+ protected registerTurnTools(client: OmpRpcClient, scope: ExecutionScope, rotate: boolean): Promise<void> {
32
+ if (rotate) {
33
+ this.hostToolAliases = { client, scope, nonce: randomBytes(16).toString('hex'), revision: 0, byAlias: new Map(), byName: new Map() }
34
+ }
35
+ const turn = this.hostToolAliases
36
+ if (!turn || turn.client !== client || turn.scope !== scope) return Promise.reject(new Error('OMP turn tool scope unavailable'))
37
+ const revision = ++turn.revision
38
+ if (!rotate) {
39
+ turn.nonce = randomBytes(16).toString('hex')
40
+ turn.byAlias.clear()
41
+ turn.byName.clear()
42
+ }
43
+ const nonce = turn.nonce
44
+ const update = this.hostToolRegistration.catch(() => {}).then(async () => {
45
+ if (this.hostToolAliases !== turn || this.client !== client || scope.signal.aborted) throw new Error('OMP turn tool scope expired')
46
+ const tools = hostToolsForAgent(this.selfAgentId, this.agentRole, this.channelId)
47
+ const nextByAlias = new Map<string, string>()
48
+ const nextByName = new Map<string, string>()
49
+ const aliased = tools.map((tool) => {
50
+ const digest = createHash('sha256').update(tool.name).digest('hex').slice(0, 16)
51
+ const prefix = tool.name.replace(/[^a-zA-Z0-9_-]/g, '_').slice(0, 11) || 'tool'
52
+ const alias = `aw_${nonce}_${digest}_${prefix}`
53
+ if (nextByAlias.has(alias)) throw new Error(`OMP host tool alias collision: ${tool.name}`)
54
+ nextByAlias.set(alias, tool.name)
55
+ nextByName.set(tool.name, alias)
56
+ return { ...tool, name: alias, description: `Canonical tool: ${tool.name}. ${tool.description}` }
57
+ })
58
+ // Revoke the old snapshot while registration is in flight; a failed or
59
+ // ambiguous update must never leave any alias dispatchable.
60
+ turn.byAlias.clear()
61
+ await client.send({ type: 'set_host_tools', tools: aliased })
62
+ if (this.hostToolAliases !== turn || this.client !== client || scope.signal.aborted) throw new Error('OMP turn tool scope expired')
63
+ if (turn.revision !== revision) return
64
+ turn.byAlias = nextByAlias
65
+ turn.byName = nextByName
66
+ this.hostToolsRegistered = true
67
+ })
68
+ this.hostToolRegistration = update
69
+ return update
70
+ }
71
+
72
+ protected async prepareTurnTools(client: OmpRpcClient, scope: ExecutionScope): Promise<void> {
73
+ await this.registerTurnTools(client, scope, true)
74
+ let pending: Promise<void>
75
+ do {
76
+ pending = this.hostToolRegistration
77
+ await pending
78
+ } while (pending !== this.hostToolRegistration)
79
+ if (this.hostToolAliases?.client !== client || this.hostToolAliases.scope !== scope || this.client !== client || scope.signal.aborted) {
80
+ throw new Error('OMP turn tool scope expired')
81
+ }
82
+ }
83
+
84
+ protected clearTurnTools(scope: ExecutionScope): void {
85
+ if (this.hostToolAliases?.scope === scope) this.hostToolAliases = null
86
+ }
87
+
88
+ /** 工具注册表变更 → 回收旧别名并热更新。 */
27
89
  refreshPluginTools(): void {
28
- const client = this.client
29
- if (!client || !client.alive) return
30
- void client.send({ type: 'set_host_tools', tools: hostToolsForAgent(this.selfAgentId, this.agentRole, this.channelId) }).catch(() => {})
90
+ const turn = this.hostToolAliases
91
+ if (!turn || turn.client !== this.client || !turn.client.alive || turn.scope.signal.aborted) return
92
+ void this.registerTurnTools(turn.client, turn.scope, false).catch((err) => {
93
+ // A failed refresh leaves no potentially revoked alias dispatchable.
94
+ if (this.hostToolAliases === turn) turn.byAlias.clear()
95
+ console.warn('[omp] host tool refresh failed:', err instanceof Error ? err.message : err)
96
+ })
31
97
  }
32
98
 
33
99
  /** harness 会话身份(§2.4;get_state 探测到才有;未探测到返回 null) */
@@ -37,13 +37,15 @@ export function isHardAbortReason(reason: string): boolean {
37
37
  *
38
38
  * 历史缺陷:onAbort 把所有非 hard timeout 的原因都重写成 'external cancel',
39
39
  * 于是调度器生命周期停机(runtime stop)也合成 cancel 决策,把在办根任务取消。
40
- * 这里只保留三类语义:hard timeout / runtime stop / external cancel。
40
+ * 这里保留四类语义:hard timeout / runtime stop / message watchdog / external cancel。
41
+ * watchdog(消息级无活动 abort)不是治理取消 —— 不收口在办任务。
41
42
  */
42
43
  export function normalizeSupervisionAbortReason(reason: string): string {
43
44
  const r = String(reason ?? '').trim()
44
45
  if (!r) return 'external cancel'
45
46
  if (r.includes('hard timeout')) return r
46
47
  if (r === 'runtime stop' || r === 'runtime_stop') return 'runtime stop'
48
+ if (r === 'message watchdog' || r === 'watchdog') return 'watchdog'
47
49
  return 'external cancel'
48
50
  }
49
51