agentworkshop 0.11.3 → 0.13.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 (457) 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/2f96705b-cf57-4bde-87a4-1b818b268f0f.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 +4084 -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 +19 -7
  338. package/README.md +21 -7
  339. package/app/components/dcw/DcwNodesTable.vue +24 -0
  340. package/config.yml +1 -1
  341. package/docs/cli.en.md +1 -1
  342. package/docs/cli.md +1 -1
  343. package/docs/mcp.en.md +30 -27
  344. package/docs/mcp.md +7 -3
  345. package/docs/plugin-idd-rag-contract.md +87 -0
  346. package/docs/plugins.en.md +5 -3
  347. package/docs/plugins.md +5 -3
  348. package/docs/sdk.en.md +1 -1
  349. package/docs/sdk.md +1 -1
  350. package/i18n/dicts/dcwDetail.json +221 -219
  351. package/i18n/locales/en.ts +2 -0
  352. package/i18n/locales/zh-CN.ts +2 -0
  353. package/package.json +3 -1
  354. package/scripts/check-docs-sync.mjs +20 -9
  355. package/scripts/onboarding/forge-channel.mjs +2 -1
  356. package/scripts/onboarding/lib.mjs +159 -3
  357. package/scripts/onboarding/onboard.mjs +2 -0
  358. package/scripts/onboarding/preflight.mjs +233 -231
  359. package/scripts/onboarding/provision-line.mjs +12 -2
  360. package/scripts/onboarding/sim-attest.mjs +103 -0
  361. package/scripts/onboarding/sim-twin.mjs +115 -19
  362. package/scripts/onboarding/test-connection.mjs +2 -1
  363. package/scripts/onboarding/v6-protected-api.mjs +41 -0
  364. package/scripts/onboarding/v6-protected-fixture.mjs +54 -0
  365. package/scripts/onboarding/verify-line.mjs +179 -136
  366. package/scripts/onboarding/verify-mirror.mjs +149 -145
  367. package/server/api/workshop/agent-tools/list.get.ts +10 -1
  368. package/server/api/workshop/tasks/[id]/recovery-disposition.post.ts +32 -0
  369. package/server/api/workshop/tasks/recovery-holds.get.ts +22 -0
  370. package/server/plugins-builtin/diag-bridge/host/deposit.mjs +232 -0
  371. package/server/plugins-builtin/diag-bridge/host/diagnosis.mjs +121 -38
  372. package/server/plugins-builtin/diag-bridge/host/external-v1.mjs +213 -0
  373. package/server/plugins-builtin/diag-bridge/host/helpers.mjs +4 -2
  374. package/server/plugins-builtin/diag-bridge/host/intents.mjs +65 -62
  375. package/server/plugins-builtin/diag-bridge/host/plugin.mjs +351 -82
  376. package/server/plugins-builtin/diag-bridge/host/receipt.mjs +83 -0
  377. package/server/plugins-builtin/diag-bridge/host/sweep.mjs +70 -91
  378. package/server/plugins-builtin/diag-bridge/i18n.json +4 -0
  379. package/server/plugins-builtin/rag-bridge/i18n.json +18 -0
  380. package/server/plugins-builtin/rag-bridge/index.mjs +570 -64
  381. package/server/services/workshop/agents/agent-interface.ts +3 -0
  382. package/server/services/workshop/agents/base-agent.ts +100 -4
  383. package/server/services/workshop/agents/execution-scope.ts +26 -0
  384. package/server/services/workshop/agents/hitl-capabilities.ts +3 -3
  385. package/server/services/workshop/agents/host-tool-bridge/dispatch.ts +42 -2
  386. package/server/services/workshop/agents/host-tool-bridge/tools/progress.ts +4 -0
  387. package/server/services/workshop/agents/host-tool-bridge/tools/tasks.ts +11 -28
  388. package/server/services/workshop/agents/host-tool-bridge/tools/team-delegation.ts +83 -129
  389. package/server/services/workshop/agents/industrial/dcw-tools.ts +27 -5
  390. package/server/services/workshop/agents/industrial/line-tools.ts +15 -4
  391. package/server/services/workshop/agents/industrial/ops-tools.ts +32 -6
  392. package/server/services/workshop/agents/industrial/optimization-tools.ts +28 -4
  393. package/server/services/workshop/agents/industrial/recipe-propose-tools.ts +26 -3
  394. package/server/services/workshop/agents/omp-agent/client.ts +2 -4
  395. package/server/services/workshop/agents/omp-agent/core.ts +3 -0
  396. package/server/services/workshop/agents/omp-agent/lifecycle.ts +70 -4
  397. package/server/services/workshop/agents/omp-agent/supervision-decision.ts +3 -1
  398. package/server/services/workshop/agents/omp-agent/tools-steer.ts +113 -32
  399. package/server/services/workshop/agents/tool-approvals.ts +113 -29
  400. package/server/services/workshop/agents/tool-classes.ts +72 -56
  401. package/server/services/workshop/db/database/open.ts +5 -2
  402. package/server/services/workshop/db/database/schema.ts +1 -0
  403. package/server/services/workshop/db/database/seed.ts +2 -2
  404. package/server/services/workshop/db/message.repo.ts +134 -26
  405. package/server/services/workshop/db/project-kernel.repo.ts +3 -3
  406. package/server/services/workshop/db/schema.sql +3 -1
  407. package/server/services/workshop/db/task.repo.ts +101 -0
  408. package/server/services/workshop/dcw/dcw-controller/actuation.ts +120 -9
  409. package/server/services/workshop/dcw/dcw-controller/contracts.ts +18 -16
  410. package/server/services/workshop/dcw/dcw-controller/crud.ts +23 -0
  411. package/server/services/workshop/dcw/dcw-controller/lines.ts +34 -2
  412. package/server/services/workshop/dcw/dcw-controller/recipes.ts +80 -6
  413. package/server/services/workshop/dcw/dcw-controller/state.ts +89 -88
  414. package/server/services/workshop/dcw/dcw-controller/types.ts +5 -0
  415. package/server/services/workshop/dcw/dcw-controller/write.ts +9 -6
  416. package/server/services/workshop/dcw/dcw-line.repo.ts +2 -0
  417. package/server/services/workshop/dcw/dcw-node.repo.ts +3 -1
  418. package/server/services/workshop/dcw/dcw-node.ts +346 -307
  419. package/server/services/workshop/dcw/dcw-runtime.ts +8 -4
  420. package/server/services/workshop/projects/effects.ts +47 -29
  421. package/server/services/workshop/projects/kernel.ts +8 -1
  422. package/server/services/workshop/projects/legacy-recovery.ts +36 -0
  423. package/server/services/workshop/projects/service.ts +15 -0
  424. package/server/services/workshop/runtime/agent-runtime/contracts.ts +1 -1
  425. package/server/services/workshop/runtime/agent-runtime/lifecycle.ts +7 -2
  426. package/server/services/workshop/runtime/agent-runtime/message-watchdog.ts +40 -0
  427. package/server/services/workshop/runtime/agent-runtime/message.ts +151 -21
  428. package/server/services/workshop/runtime/agent-runtime/state.ts +69 -13
  429. package/server/services/workshop/runtime/agent-runtime/supervise.ts +219 -42
  430. package/server/services/workshop/runtime/agent-runtime/types.ts +6 -0
  431. package/server/services/workshop/runtime/mailbox.ts +112 -21
  432. package/server/services/workshop/runtime/manager/admin-channel.ts +34 -22
  433. package/server/services/workshop/runtime/manager/host-tools.ts +18 -5
  434. package/server/services/workshop/runtime/manager/runtime-wiring.ts +101 -41
  435. package/server/services/workshop/runtime/manager/schedules.ts +3 -1
  436. package/server/services/workshop/runtime/manager/tasks.ts +41 -0
  437. package/server/services/workshop/runtime/memory/recall.ts +11 -4
  438. package/server/services/workshop/runtime/memory/types.ts +2 -0
  439. package/server/services/workshop/runtime/scheduler-loop/contracts.ts +29 -29
  440. package/server/services/workshop/runtime/scheduler-loop/execute.ts +7 -0
  441. package/server/services/workshop/runtime/scheduler-loop/rules.ts +3 -0
  442. package/server/services/workshop/runtime/scheduler-loop/snapshot.ts +10 -2
  443. package/server/services/workshop/runtime/scheduler-loop/state.ts +12 -0
  444. package/server/services/workshop/runtime/scheduler-loop/tick.ts +54 -5
  445. package/server/services/workshop/runtime/task-engine/create.ts +16 -0
  446. package/server/services/workshop/runtime/task-engine/helpers.ts +5 -0
  447. package/server/services/workshop/runtime/task-engine/legacy-recovery.ts +149 -0
  448. package/server/services/workshop/runtime/task-engine/lifecycle.ts +38 -1
  449. package/server/services/workshop/runtime/task-engine/transition.ts +4 -0
  450. package/server/services/workshop/runtime/task-engine/update.ts +6 -0
  451. package/server/services/workshop/runtime/task-engine/views.ts +61 -0
  452. package/server/services/workshop/tools/policy.ts +16 -1
  453. package/shared/dcw-protocol/line.ts +4 -0
  454. package/.output/public/_nuxt/C8QlHux5.js +0 -1
  455. package/.output/public/_nuxt/_id_.0EnzA0aA.css +0 -1
  456. package/.output/public/_nuxt/builds/meta/846b9c03-1442-4fcb-b3fc-1d9484eaa41b.json +0 -1
  457. package/.output/server/chunks/build/_id_-C0vNEbts.mjs.map +0 -1
@@ -9,7 +9,7 @@
9
9
  * 节点观测物理量跟随到目标值(设备侧生效由观测面证实,而非虚报回读)。
10
10
  * V4 配方在册:recipeId 在 /dcw 聚合可见且参数节点映射正确
11
11
  * V5 频道绑定:频道 lineId 正确、成员≥2、插件开启生效
12
- * V6 演示线零扰动:受保护线上没有任何本次新节点的写痕(以 dcw journal 新锚点核对)
12
+ * V6 受保护线保留 journal 前后不变(不能证明零扰动)
13
13
  * 输入 JSON:
14
14
  * {
15
15
  * "lineId":"ln-..","recipeId":"rc-..","channelId":"<uuid>",
@@ -20,152 +20,195 @@
20
20
  * }
21
21
  * 用法:node scripts/onboarding/verify-line.mjs <config.json|->
22
22
  */
23
- import { api, login, ok, summary, readConfig, pollUntil } from './lib.mjs'
23
+ import { api, BASE, login, ok, summary, readConfig, pollUntil, PROTECTED, assertNotProtected, assertOnboardingOwnership, assertDriverEndpointsAttested } from './lib.mjs'
24
+ import { checkedGet, readProtectedSnapshot } from './v6-protected-api.mjs'
25
+ import { evaluateProtectedFixture } from './v6-protected-fixture.mjs'
24
26
 
25
- const cfg = await readConfig()
26
- const tok = await login()
27
+ async function main() {
28
+ const cfg = await readConfig()
29
+ await assertOnboardingOwnership(cfg)
30
+ if (typeof cfg.lineId !== 'string' || !cfg.lineId.trim()) throw new Error('目标产线 ID 缺失')
31
+ assertNotProtected(cfg.lineId, '目标产线')
32
+ if (cfg.dcw !== undefined && !Array.isArray(cfg.dcw)) throw new Error('dcw 必须是数组')
33
+ const tok = await login()
27
34
 
28
- // V6 基线:受保护线 journal **切换前**快照。旧实现只筛本线节点再看 lineId,
29
- // 永远为 0(恒真);必须直接查询受保护线并在验收后比较新增锚点。
30
- const PROTECTED_LINE = 'ln-d7e0a2a2'
31
- const anchorKey = a => String(a.id ?? `${a.nodeId}:${a.at}:${a.newValue}:${a.source ?? ''}`)
32
- const lineList = await api('GET', '/api/workshop/dcw/lines', undefined, tok)
33
- const protectedExists = (lineList.data?.lines ?? []).some(l => l.id === PROTECTED_LINE)
34
- const protectedBefore = await api('GET', `/api/workshop/dcw/journal?lineId=${PROTECTED_LINE}&limit=500`, undefined, tok)
35
- const protectedBeforeKeys = new Set((protectedBefore.data?.anchors ?? []).map(anchorKey))
36
-
37
- // V1 数采落库(滑动窗口:每次轮询重算 now,避免 to=启动时刻冻结导致新样本落窗外)。
38
- // 多形态节点(向量/图像)数据在 daq_frames 不在 daq_samples:标量面 60s 内无点时回查帧面。
39
- for (const id of cfg.daq ?? []) {
40
- try {
41
- await pollUntil(async () => {
42
- const now = Date.now()
43
- const j = await api('GET', `/api/workshop/daq/${id}/samples?from=${now - 90000}&to=${now}&bucketMs=30000`, undefined, tok)
44
- if ((j.data?.points ?? []).length > 0) return true
45
- const f = await api('GET', `/api/workshop/daq/${id}/frames?from=${now - 120000}&to=${now}&limit=1`, undefined, tok).catch(() => null)
46
- return (f?.data?.frames ?? f?.data ?? []).length > 0
47
- }, { timeoutMs: 120000, label: `采样[${id}]` })
48
- ok(`V1 数采落库[${id}]`, true)
49
- }
50
- catch (e) {
51
- ok(`V1 数采落库[${id}]`, false, String(e).slice(0, 80))
35
+ // Capture and validate the protected journal before any acceptance writes.
36
+ const PROTECTED_LINE = PROTECTED[0]
37
+ const JOURNAL_LIMIT = 500
38
+ const snapshotOptions = { base: BASE, token: tok, lineId: PROTECTED_LINE, limit: JOURNAL_LIMIT }
39
+ const protectedBefore = await readProtectedSnapshot(snapshotOptions)
40
+ const preflightV6 = evaluateProtectedFixture({ before: protectedBefore, after: protectedBefore, lineId: PROTECTED_LINE, limit: JOURNAL_LIMIT })
41
+ if (preflightV6.status === 'FAIL') {
42
+ console.error(`V6 受保护线保留 journal 完整性 — FAIL: ${preflightV6.reason}`)
43
+ process.exitCode = 1
44
+ return
52
45
  }
53
- }
54
46
 
55
- // V2/V3 量程联锁 + 合法回环
56
- for (const n of cfg.dcw ?? []) {
57
- const span = Math.max(1, (n.max - n.min) / 10)
58
- const bad = await api('POST', `/api/workshop/dcw/${n.id}/write`, { value: n.max + span }, tok)
59
- const badMsg = String(bad.message ?? '') + String(bad.code ?? '')
60
- // 必须命中量程/限界拒绝语义;超时/网络失败不是“量程联锁通过”
61
- const rejected = bad.code === 'NODE_RANGE_EXCEEDED'
62
- || (/RANGE|LIMIT|越界|量程|上限|下限|VALIDATION/i.test(badMsg) && !/超时|timeout|ECONN|网络/i.test(badMsg))
63
- ok(`V2 越界拒[${n.name}]`, rejected, `value=${n.max + span} → ${String(bad.message ?? bad.code).slice(0, 60)}`)
64
- // V3 探针必须在写前实时取值:开批次后引擎/配方会驱动 SP,配置期探针会过期。
65
- // 只写命令点(如 mqtt commandTopic)read 返 null → 回退用最近一次写锚点值当现值。
66
- let probe = n.probeValue
67
- const rd = await api('POST', `/api/workshop/dcw/${n.id}/read`, {}, tok).catch(() => null)
68
- let cur = rd?.data?.read?.value
69
- if (typeof cur !== 'number') {
70
- const jr = await api('GET', '/api/workshop/dcw/journal?limit=30', undefined, tok)
71
- const lastAnchor = (jr.data?.anchors ?? []).filter(a => a.nodeId === n.id)
72
- .sort((a, b) => Date.parse(b.at ?? 0) - Date.parse(a.at ?? 0))[0]
73
- if (lastAnchor && typeof lastAnchor.newValue === 'number') cur = lastAnchor.newValue
74
- }
75
- // 探针必须同时落在「节点量程 ∩ 活动配方窗口」内,且尽量朝窗口内侧走:
76
- // 当前值可能已被冒烟步推到窗口上沿,cur+step 会越配方窗口(实测 47+2>48 被拒)。
77
- const rp = (cfg.recipeParams ?? []).find(p => p.nodeId === n.id)
78
- const upper = Math.min(n.max, rp?.max ?? n.max)
79
- const lower = Math.max(n.min, rp?.min ?? n.min)
80
- const step = Math.max(0.1, Number(n.stepLimit) || 1)
81
- if (typeof cur === 'number') {
82
- const up = Math.round((cur + step) * 10) / 10
83
- const down = Math.round((cur - step) * 10) / 10
84
- probe = up < upper && up >= lower ? up : (down >= lower && down < upper ? down : Math.min(upper, Math.max(lower, cur)))
47
+ // Neither a line label nor loopback proves that the endpoint belongs to a simulator.
48
+ // Even built-in driver names can be overridden by plugins at runtime.
49
+ if (cfg.dcw?.length) {
50
+ const targets = protectedBefore.lines.filter(line => line.id === cfg.lineId)
51
+ if (targets.length !== 1 || targets[0].simulated !== true) {
52
+ throw new Error(`V2/V3 写入拒绝:目标产线 ${cfg.lineId} 必须唯一且 simulated=true`)
53
+ }
85
54
  }
86
- else if (probe < lower || probe > upper) {
87
- probe = Math.min(upper, Math.max(lower, probe))
55
+
56
+ // Resolve every target before any V2/V3 write, including nodes not present in the journal.
57
+ for (const n of cfg.dcw ?? []) {
58
+ if (!n || typeof n.id !== 'string' || !/^[A-Za-z0-9_-]+$/.test(n.id)) throw new Error('无效的写控节点 ID')
59
+ const { node } = await checkedGet({ base: BASE, token: tok, path: `/api/workshop/dcw/${encodeURIComponent(n.id)}` })
60
+ if (!node || typeof node !== 'object' || Array.isArray(node) || node.id !== n.id
61
+ || typeof node.lineId !== 'string' || node.lineId !== cfg.lineId) {
62
+ throw new Error(`写控节点 ${n.id} 不属于目标产线 ${cfg.lineId}`)
63
+ }
64
+ assertNotProtected(node.lineId, '写控节点产线')
65
+ if (typeof node.driver !== 'string' || !node.driver || !node.driverConfig
66
+ || typeof node.driverConfig !== 'object' || Array.isArray(node.driverConfig)) {
67
+ throw new Error(`V2/V3 写入拒绝:节点 ${n.id} 缺少驱动或端点配置`)
68
+ }
69
+ // 实时节点 driverConfig 的端点绑定复核(配置可能被改指他处;以实时面为准):
70
+ // host 必须环回,端口必须落在本次归属证明的端口集内,缺端口不可证明。
71
+ assertDriverEndpointsAttested(node.driverConfig, `节点 ${n.id}`)
88
72
  }
89
- // V3 可能撞 60s 写间隔/保持窗(上一轮验收/冒烟刚写过)——最多等待 3 次,每次 65s
90
- let good = await api('POST', `/api/workshop/dcw/${n.id}/write`, { value: probe }, tok)
91
- for (let i = 0; i < 3 && good.code !== 0 && /间隔|60s|WRITE_INTERVAL|保持窗口|写入频繁/i.test(String(good.message ?? '')); i++) {
92
- await new Promise(r => setTimeout(r, 65000))
93
- good = await api('POST', `/api/workshop/dcw/${n.id}/write`, { value: probe }, tok)
73
+
74
+ // V1 数采落库(滑动窗口:每次轮询重算 now,避免 to=启动时刻冻结导致新样本落窗外)。
75
+ // 多形态节点(向量/图像)数据在 daq_frames 不在 daq_samples:标量面 60s 内无点时回查帧面。
76
+ for (const id of cfg.daq ?? []) {
77
+ try {
78
+ await pollUntil(async () => {
79
+ const now = Date.now()
80
+ const j = await api('GET', `/api/workshop/daq/${id}/samples?from=${now - 90000}&to=${now}&bucketMs=30000`, undefined, tok)
81
+ if ((j.data?.points ?? []).length > 0) return true
82
+ const f = await api('GET', `/api/workshop/daq/${id}/frames?from=${now - 120000}&to=${now}&limit=1`, undefined, tok).catch(() => null)
83
+ return (f?.data?.frames ?? f?.data ?? []).length > 0
84
+ }, { timeoutMs: 120000, label: `采样[${id}]` })
85
+ ok(`V1 数采落库[${id}]`, true)
86
+ }
87
+ catch (e) {
88
+ ok(`V1 数采落库[${id}]`, false, String(e).slice(0, 80))
89
+ }
94
90
  }
95
- // transport-ack 协议(MQTT commandTopic 等无读通道):按平台 ACK 口径断言 broker 受理,
96
- // 再用独立 DAQ 观测节点证实物理量真的跟随。不允许把“链路受理”当“设备证实”。
97
- if (n.ackMode === 'transport-ack') {
98
- const ack = good.data?.outcome?.ack
99
- const writeOk = (good.code === 0 || !!good.data?.outcome) && ack === 'transport-ack'
100
- let followed = null
101
- if (writeOk && n.observeDaqId) {
102
- const tol = Number(n.observeTolerance ?? Math.max(0.5, Math.abs(probe) * 0.02))
103
- try {
104
- followed = await pollUntil(async () => {
105
- const now = Date.now()
106
- const j = await api('GET', `/api/workshop/daq/${n.observeDaqId}/samples?from=${now - 90000}&to=${now}&bucketMs=5000`, undefined, tok)
107
- const pts = j.data?.points ?? []
108
- const last = pts[pts.length - 1]
109
- return last && Number.isFinite(last.avg) && Math.abs(last.avg - probe) <= tol ? last.avg : null
110
- }, { timeoutMs: Number(n.observeTimeoutMs ?? 45000), stepMs: 3000, label: `观测[${n.name}]` })
91
+
92
+ // V2/V3 量程联锁 + 合法回环
93
+ for (const n of cfg.dcw ?? []) {
94
+ const span = Math.max(1, (n.max - n.min) / 10)
95
+ const bad = await api('POST', `/api/workshop/dcw/${n.id}/write`, { value: n.max + span }, tok)
96
+ const badMsg = String(bad.message ?? '') + String(bad.code ?? '')
97
+ // 必须命中量程/限界拒绝语义;超时/网络失败不是“量程联锁通过”
98
+ const rejected = bad.code === 'NODE_RANGE_EXCEEDED'
99
+ || (/RANGE|LIMIT|越界|量程|上限|下限|VALIDATION/i.test(badMsg) && !/超时|timeout|ECONN|网络/i.test(badMsg))
100
+ ok(`V2 越界拒[${n.name}]`, rejected, `value=${n.max + span} → ${String(bad.message ?? bad.code).slice(0, 60)}`)
101
+ // V3 探针必须在写前实时取值:开批次后引擎/配方会驱动 SP,配置期探针会过期。
102
+ // 只写命令点(如 mqtt commandTopic)read 返 null → 回退用最近一次写锚点值当现值。
103
+ let probe = n.probeValue
104
+ const rd = await api('POST', `/api/workshop/dcw/${n.id}/read`, {}, tok).catch(() => null)
105
+ let cur = rd?.data?.read?.value
106
+ if (typeof cur !== 'number') {
107
+ const jr = await api('GET', '/api/workshop/dcw/journal?limit=30', undefined, tok)
108
+ const lastAnchor = (jr.data?.anchors ?? []).filter(a => a.nodeId === n.id)
109
+ .sort((a, b) => Date.parse(b.at ?? 0) - Date.parse(a.at ?? 0))[0]
110
+ if (lastAnchor && typeof lastAnchor.newValue === 'number') cur = lastAnchor.newValue
111
+ }
112
+ // 探针必须同时落在「节点量程 ∩ 活动配方窗口」内,且尽量朝窗口内侧走:
113
+ // 当前值可能已被冒烟步推到窗口上沿,cur+step 会越配方窗口(实测 47+2>48 被拒)。
114
+ const rp = (cfg.recipeParams ?? []).find(p => p.nodeId === n.id)
115
+ const upper = Math.min(n.max, rp?.max ?? n.max)
116
+ const lower = Math.max(n.min, rp?.min ?? n.min)
117
+ const step = Math.max(0.1, Number(n.stepLimit) || 1)
118
+ if (typeof cur === 'number') {
119
+ const up = Math.round((cur + step) * 10) / 10
120
+ const down = Math.round((cur - step) * 10) / 10
121
+ probe = up < upper && up >= lower ? up : (down >= lower && down < upper ? down : Math.min(upper, Math.max(lower, cur)))
122
+ }
123
+ else if (probe < lower || probe > upper) {
124
+ probe = Math.min(upper, Math.max(lower, probe))
125
+ }
126
+ // V3 可能撞 60s 写间隔/保持窗(上一轮验收/冒烟刚写过)——最多等待 3 次,每次 65s
127
+ let good = await api('POST', `/api/workshop/dcw/${n.id}/write`, { value: probe }, tok)
128
+ for (let i = 0; i < 3 && good.code !== 0 && /间隔|60s|WRITE_INTERVAL|保持窗口|写入频繁/i.test(String(good.message ?? '')); i++) {
129
+ await new Promise(r => setTimeout(r, 65000))
130
+ good = await api('POST', `/api/workshop/dcw/${n.id}/write`, { value: probe }, tok)
131
+ }
132
+ // transport-ack 协议(MQTT commandTopic 等无读通道):按平台 ACK 口径断言 broker 受理,
133
+ // 再用独立 DAQ 观测节点证实物理量真的跟随。不允许把“链路受理”当“设备证实”。
134
+ if (n.ackMode === 'transport-ack') {
135
+ const ack = good.data?.outcome?.ack
136
+ const writeOk = (good.code === 0 || !!good.data?.outcome) && ack === 'transport-ack'
137
+ let followed = null
138
+ if (writeOk && n.observeDaqId) {
139
+ const tol = Number(n.observeTolerance ?? Math.max(0.5, Math.abs(probe) * 0.02))
140
+ try {
141
+ followed = await pollUntil(async () => {
142
+ const now = Date.now()
143
+ const j = await api('GET', `/api/workshop/daq/${n.observeDaqId}/samples?from=${now - 90000}&to=${now}&bucketMs=5000`, undefined, tok)
144
+ const pts = j.data?.points ?? []
145
+ const last = pts[pts.length - 1]
146
+ return last && Number.isFinite(last.avg) && Math.abs(last.avg - probe) <= tol ? last.avg : null
147
+ }, { timeoutMs: Number(n.observeTimeoutMs ?? 45000), stepMs: 3000, label: `观测[${n.name}]` })
148
+ }
149
+ catch { followed = null }
111
150
  }
112
- catch { followed = null }
151
+ const okd = writeOk && (n.observeDaqId ? followed != null : true)
152
+ ok(`V3 合法写生效(transport-ack)[${n.name}]`, okd,
153
+ `cur=${cur ?? '?'} probe=${probe} ack=${ack ?? '缺失'} DAQ观测=${followed ?? '未跟随'} ${okd ? '' : String(good.message ?? good.code).slice(0, 80)}`)
154
+ continue
113
155
  }
114
- const okd = writeOk && (n.observeDaqId ? followed != null : true)
115
- ok(`V3 合法写生效(transport-ack)[${n.name}]`, okd,
116
- `cur=${cur ?? '?'} probe=${probe} ack=${ack ?? '缺失'} DAQ观测=${followed ?? '未跟随'} ${okd ? '' : String(good.message ?? good.code).slice(0, 80)}`)
117
- continue
156
+ const rb = good.data?.outcome?.readback
157
+ const rbOk = typeof rb === 'number' && Number.isFinite(rb) && Math.abs(rb - probe) <= Math.max(0.5, Math.abs(probe) * 0.002)
158
+ const goodOk = (good.code === 0 || !!good.data?.outcome) && rbOk
159
+ ok(`V3 合法写回环[${n.name}]`, goodOk,
160
+ `cur=${cur ?? '?'} probe=${probe} readback=${rb ?? '缺失'} ${goodOk ? '一致' : String(good.message ?? good.code).slice(0, 80)}`)
118
161
  }
119
- const rb = good.data?.outcome?.readback
120
- const rbOk = typeof rb === 'number' && Number.isFinite(rb) && Math.abs(rb - probe) <= Math.max(0.5, Math.abs(probe) * 0.002)
121
- const goodOk = (good.code === 0 || !!good.data?.outcome) && rbOk
122
- ok(`V3 合法写回环[${n.name}]`, goodOk,
123
- `cur=${cur ?? '?'} probe=${probe} readback=${rb ?? '缺失'} ${goodOk ? '一致' : String(good.message ?? good.code).slice(0, 80)}`)
124
- }
125
162
 
126
- // V4 配方在册 + 参数逐项映射(不能只看 id 存在)
127
- const agg = await api('GET', '/api/workshop/dcw', undefined, tok)
128
- const rec = (agg.data?.recipes ?? []).find(r => r.id === cfg.recipeId)
129
- const expectedParams = cfg.recipeParams ?? []
130
- const recParams = rec?.params ?? []
131
- const paramMismatch = expectedParams.filter((e) => {
132
- const p = recParams.find(x => x.nodeId === e.nodeId)
133
- if (!p) return true
134
- return (e.value !== undefined && p.value !== e.value)
135
- || (e.min !== undefined && p.min !== e.min)
136
- || (e.max !== undefined && p.max !== e.max)
137
- || (e.stepLimit !== undefined && p.stepLimit !== e.stepLimit)
138
- })
139
- ok('V4 配方在册', !!rec, rec ? `${rec.name} v${rec.version} params=${recParams.length}` : (cfg.recipeId ?? '未提供'))
140
- if (expectedParams.length > 0) {
141
- ok('V4 配方参数映射正确', paramMismatch.length === 0,
142
- paramMismatch.length === 0 ? `${expectedParams.length} 项逐项一致` : `不匹配:${paramMismatch.map(p => p.nodeId).join(',')}`)
143
- }
163
+ // V4 配方在册 + 参数逐项映射(不能只看 id 存在)
164
+ const agg = await api('GET', '/api/workshop/dcw', undefined, tok)
165
+ const rec = (agg.data?.recipes ?? []).find(r => r.id === cfg.recipeId)
166
+ const expectedParams = cfg.recipeParams ?? []
167
+ const recParams = rec?.params ?? []
168
+ const paramMismatch = expectedParams.filter((e) => {
169
+ const p = recParams.find(x => x.nodeId === e.nodeId)
170
+ if (!p) return true
171
+ return (e.value !== undefined && p.value !== e.value)
172
+ || (e.min !== undefined && p.min !== e.min)
173
+ || (e.max !== undefined && p.max !== e.max)
174
+ || (e.stepLimit !== undefined && p.stepLimit !== e.stepLimit)
175
+ })
176
+ ok('V4 配方在册', !!rec, rec ? `${rec.name} v${rec.version} params=${recParams.length}` : (cfg.recipeId ?? '未提供'))
177
+ if (expectedParams.length > 0) {
178
+ ok('V4 配方参数映射正确', paramMismatch.length === 0,
179
+ paramMismatch.length === 0 ? `${expectedParams.length} 项逐项一致` : `不匹配:${paramMismatch.map(p => p.nodeId).join(',')}`)
180
+ }
144
181
 
145
- // V5 频道绑定与插件(plugins 显式数组:[] 表示期望零插件启用,同样要断言隔离)
146
- const ch = await api('GET', `/api/workshop/channels/${cfg.channelId}`, undefined, tok)
147
- const c = ch.data?.channel ?? ch.data
148
- ok('V5 频道绑线', c?.lineId === cfg.lineId, `${c?.lineId} vs ${cfg.lineId}`)
149
- const members = await api('GET', `/api/workshop/channels/${cfg.channelId}/agents`, undefined, tok)
150
- ok('V5 频道成员≥2', (members.data ?? []).length >= 2, `members=${(members.data ?? []).length}`)
151
- if (Array.isArray(cfg.plugins)) {
152
- const pj = await api('GET', `/api/workshop/channels/${cfg.channelId}/plugins`, undefined, tok)
153
- const enabled = new Set((pj.data?.plugins ?? []).filter(p => p.enabled).map(p => p.name))
154
- for (const name of cfg.plugins) ok(`V5 插件[${name}]`, enabled.has(name), enabled.has(name) ? 'enabled' : `实际=${[...enabled].join(',')}`)
155
- const unexpected = [...enabled].filter(n => !cfg.plugins.includes(n))
156
- ok('V5 插件隔离(未配置插件不得被默认启用)', unexpected.length === 0,
157
- unexpected.length ? `意外启用:${unexpected.join(',')}` : `仅配置项启用(enabled=${enabled.size}, expected=${cfg.plugins.length})`)
158
- }
182
+ // V5 频道绑定与插件(plugins 显式数组:[] 表示期望零插件启用,同样要断言隔离)
183
+ const ch = await api('GET', `/api/workshop/channels/${cfg.channelId}`, undefined, tok)
184
+ const c = ch.data?.channel ?? ch.data
185
+ ok('V5 频道绑线', c?.lineId === cfg.lineId, `${c?.lineId} vs ${cfg.lineId}`)
186
+ const members = await api('GET', `/api/workshop/channels/${cfg.channelId}/agents`, undefined, tok)
187
+ ok('V5 频道成员≥2', (members.data ?? []).length >= 2, `members=${(members.data ?? []).length}`)
188
+ if (Array.isArray(cfg.plugins)) {
189
+ const pj = await api('GET', `/api/workshop/channels/${cfg.channelId}/plugins`, undefined, tok)
190
+ const enabled = new Set((pj.data?.plugins ?? []).filter(p => p.enabled).map(p => p.name))
191
+ for (const name of cfg.plugins) ok(`V5 插件[${name}]`, enabled.has(name), enabled.has(name) ? 'enabled' : `实际=${[...enabled].join(',')}`)
192
+ const unexpected = [...enabled].filter(n => !cfg.plugins.includes(n))
193
+ ok('V5 插件隔离(未配置插件不得被默认启用)', unexpected.length === 0,
194
+ unexpected.length ? `意外启用:${unexpected.join(',')}` : `仅配置项启用(enabled=${enabled.size}, expected=${cfg.plugins.length})`)
195
+ }
196
+
197
+ // V6 only skips when both checked snapshots prove the fixture is absent.
198
+ const protectedAfter = await readProtectedSnapshot(snapshotOptions)
199
+ const v6 = evaluateProtectedFixture({ before: protectedBefore, after: protectedAfter, lineId: PROTECTED_LINE, limit: JOURNAL_LIMIT })
200
+ if (v6.status === 'SKIP') {
201
+ console.log(`⚠ V6 受保护线保留 journal 完整性 — SKIP: ${v6.reason}; 正式验收需在隔离测试环境预置受保护线和非空 journal 基线`)
202
+ console.log('(V6 SKIP=1:该项不计入通过/失败)')
203
+ }
204
+ else {
205
+ ok(`V6 受保护线保留 journal 完整性 — ${v6.status}`, v6.status === 'PASS', v6.reason)
206
+ }
159
207
 
160
- // V6 演示线零扰动:本验收写入必须落在新线;受保护线 journal 新增锚点必须为 0
161
- const journal = await api('GET', '/api/workshop/dcw/journal?limit=500', undefined, tok)
162
- const mine = new Set([...(cfg.dcw ?? []).map(n => n.id)])
163
- const touched = (journal.data?.anchors ?? []).filter(a => mine.has(a.nodeId))
164
- const protectedAfter = await api('GET', `/api/workshop/dcw/journal?lineId=${PROTECTED_LINE}&limit=500`, undefined, tok)
165
- const protectedNew = (protectedAfter.data?.anchors ?? []).filter(a => !protectedBeforeKeys.has(anchorKey(a)))
166
- const linesAfter = await api('GET', '/api/workshop/dcw/lines', undefined, tok)
167
- const protectedExistsAfter = (linesAfter.data?.lines ?? []).some(l => l.id === PROTECTED_LINE)
168
- ok('V6 受保护线零扰动(受保护线 journal 无新增锚点)', protectedExists && protectedExistsAfter && protectedBeforeKeys.size > 0 && protectedNew.length === 0,
169
- `受保护线存在=${protectedExists}->${protectedExistsAfter} 本线锚点=${touched.length} 受保护线新增=${protectedNew.length} 基线=${protectedBeforeKeys.size}`)
208
+ summary('接入验收', { graceful: true })
209
+ }
170
210
 
171
- summary('接入验收')
211
+ main().catch((error) => {
212
+ console.error(error instanceof Error ? error.message : String(error))
213
+ process.exitCode = 1
214
+ })