agentworkshop 0.10.0 → 0.11.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 (531) hide show
  1. package/.AgentWorkShop/prompts/host-tools.json +47 -6
  2. package/.output/.AgentWorkShop/prompts/host-tools.json +47 -6
  3. package/.output/nitro.json +1 -1
  4. package/.output/public/_nuxt/2v5GdspM2.js +1 -0
  5. package/.output/public/_nuxt/79qPRzcC2.js +3 -0
  6. package/.output/public/_nuxt/{DXcrmAEB.js → B1h4ZjKu.js} +6 -6
  7. package/.output/public/_nuxt/{CtHO6S5H2.js → CMDDJOia2.js} +1 -1
  8. package/.output/public/_nuxt/{BntjKfNX2.js → CUdJHUOd2.js} +1 -1
  9. package/.output/public/_nuxt/CjCc77Ql.js +1 -0
  10. package/.output/public/_nuxt/D2EC-BTb2.js +1 -0
  11. package/.output/public/_nuxt/D4ZePemJ.js +1 -0
  12. package/.output/public/_nuxt/{Bn4GxfTn.js → DDVBwkyn.js} +1 -1
  13. package/.output/public/_nuxt/DkfR8ywD.js +1 -0
  14. package/.output/public/_nuxt/Dv_vyxzC.js +1 -0
  15. package/.output/public/_nuxt/LiHaSoeY.js +2 -0
  16. package/.output/public/_nuxt/PWLUz4KM2.js +1 -0
  17. package/.output/public/_nuxt/ZMaEnWy-.js +1 -0
  18. package/.output/public/_nuxt/_id_.CHcnHuNN.css +1 -0
  19. package/.output/public/_nuxt/{_wsId_.DDEHesFu.css → _wsId_.2GiFh9as.css} +1 -1
  20. package/.output/public/_nuxt/builds/latest.json +1 -1
  21. package/.output/public/_nuxt/builds/meta/cf638aaa-655e-454c-9786-ffa73903190a.json +1 -0
  22. package/.output/public/_nuxt/{default.DfmSp-wb.css → default.CwrtJt16.css} +1 -1
  23. package/.output/public/_nuxt/{entry.cd1EADeI.css → entry.DttkgxyK.css} +1 -1
  24. package/.output/public/_nuxt/kHiXWyIi.js +1 -0
  25. package/.output/public/_nuxt/projects.B0DecJy4.css +1 -0
  26. package/.output/public/_nuxt/workshop.Csi6_Wwg.css +1 -0
  27. package/.output/server/chunks/_/{TownView-uicih2T8.mjs → TownView-Cpb_4CFs.mjs} +4 -4
  28. package/.output/server/chunks/_/TownView-Cpb_4CFs.mjs.map +1 -0
  29. package/.output/server/chunks/_/{_id_-DMxiYYGr.mjs → _id_-7j1H6aZV.mjs} +8 -8
  30. package/.output/server/chunks/_/_id_-7j1H6aZV.mjs.map +1 -0
  31. package/.output/server/chunks/_/{_id_-BX8hihhe.mjs → _id_-Ca3d9Npk.mjs} +13 -13
  32. package/.output/server/chunks/_/_id_-Ca3d9Npk.mjs.map +1 -0
  33. package/.output/server/chunks/_/_id_-Dl378h-P.mjs +995 -0
  34. package/.output/server/chunks/_/_id_-Dl378h-P.mjs.map +1 -0
  35. package/.output/server/chunks/_/{_wsId_-DzfJ2fFZ.mjs → _wsId_-e7Fm33hR.mjs} +16 -10
  36. package/.output/server/chunks/_/{_wsId_-DzfJ2fFZ.mjs.map → _wsId_-e7Fm33hR.mjs.map} +1 -1
  37. package/.output/server/chunks/_/access.mjs +1 -1
  38. package/.output/server/chunks/_/{analysis-DVLO0bCy.mjs → analysis-DvtU3Ots.mjs} +3 -3
  39. package/.output/server/chunks/_/analysis-DvtU3Ots.mjs.map +1 -0
  40. package/.output/server/chunks/_/catalog-view.mjs +1 -1
  41. package/.output/server/chunks/_/{daq-CWiRcs2W.mjs → daq-WT075QK5.mjs} +8 -8
  42. package/.output/server/chunks/_/daq-WT075QK5.mjs.map +1 -0
  43. package/.output/server/chunks/_/data-export.mjs +6 -6
  44. package/.output/server/chunks/_/data-query.mjs +3 -3
  45. package/.output/server/chunks/_/{dcw-BrEWEFnj.mjs → dcw-BhY0QjNL.mjs} +8 -8
  46. package/.output/server/chunks/_/dcw-BhY0QjNL.mjs.map +1 -0
  47. package/.output/server/chunks/_/{default-CAvZHtuk.mjs → default-C3L2_Bnq.mjs} +18 -8
  48. package/.output/server/chunks/_/{default-CAvZHtuk.mjs.map → default-C3L2_Bnq.mjs.map} +1 -1
  49. package/.output/server/chunks/_/eda-run.repo.mjs +2 -2
  50. package/.output/server/chunks/_/features.mjs +4 -4
  51. package/.output/server/chunks/_/golden.mjs +2 -2
  52. package/.output/server/chunks/_/host-bindings.mjs +1 -1
  53. package/.output/server/chunks/_/index.mjs +1 -1
  54. package/.output/server/chunks/_/{logs-Lx7w3LYH.mjs → logs-ClfR5sWn.mjs} +3 -3
  55. package/.output/server/chunks/_/logs-ClfR5sWn.mjs.map +1 -0
  56. package/.output/server/chunks/_/mes-console.mjs +1 -1
  57. package/.output/server/chunks/_/mes-templates.mjs +1 -1
  58. package/.output/server/chunks/_/nitro.mjs +4434 -2470
  59. package/.output/server/chunks/_/nitro.mjs.map +1 -1
  60. package/.output/server/chunks/_/{operations--xLPUg-f.mjs → operations-4t5GxQcD.mjs} +3 -3
  61. package/.output/server/chunks/_/operations-4t5GxQcD.mjs.map +1 -0
  62. package/.output/server/chunks/_/{pages-CzF3fZqL.mjs → pages-BwA6EqWo.mjs} +4 -4
  63. package/.output/server/chunks/_/pages-BwA6EqWo.mjs.map +1 -0
  64. package/.output/server/chunks/_/projects-k6arYbBh.mjs +345 -0
  65. package/.output/server/chunks/_/projects-k6arYbBh.mjs.map +1 -0
  66. package/.output/server/chunks/_/promote.mjs +186 -0
  67. package/.output/server/chunks/_/promote.mjs.map +1 -0
  68. package/.output/server/chunks/_/rest-auth.mjs +1 -1
  69. package/.output/server/chunks/_/spc.mjs +1 -1
  70. package/.output/server/chunks/_/{town-HjaOuPYS.mjs → town-CCkZYizH.mjs} +4 -4
  71. package/.output/server/chunks/_/town-CCkZYizH.mjs.map +1 -0
  72. package/.output/server/chunks/_/types-D6J7slEa.mjs +1 -1
  73. package/.output/server/chunks/_/{useDaqAddNode-CkGitJOy.mjs → useDaqAddNode-qUTVIBD0.mjs} +3 -3
  74. package/.output/server/chunks/_/useDaqAddNode-qUTVIBD0.mjs.map +1 -0
  75. package/.output/server/chunks/_/{useDaqDetailBinding-BKi46wvJ.mjs → useDaqDetailBinding-D0JkQZhl.mjs} +2 -2
  76. package/.output/server/chunks/_/useDaqDetailBinding-D0JkQZhl.mjs.map +1 -0
  77. package/.output/server/chunks/_/{useDaqDetailFrames-B6cqF1w1.mjs → useDaqDetailFrames-Du_raRy1.mjs} +2 -2
  78. package/.output/server/chunks/_/useDaqDetailFrames-Du_raRy1.mjs.map +1 -0
  79. package/.output/server/chunks/_/{useDaqDetailHistory-D0sdKiWx.mjs → useDaqDetailHistory-BQx0cKA6.mjs} +2 -2
  80. package/.output/server/chunks/_/useDaqDetailHistory-BQx0cKA6.mjs.map +1 -0
  81. package/.output/server/chunks/_/{useDaqDetailNode-DgxYQZBG.mjs → useDaqDetailNode-UCnodI1A.mjs} +4 -4
  82. package/.output/server/chunks/_/useDaqDetailNode-UCnodI1A.mjs.map +1 -0
  83. package/.output/server/chunks/_/{useDaqDetailParams-D-ZJw2GJ.mjs → useDaqDetailParams-D4ZVxVla.mjs} +3 -3
  84. package/.output/server/chunks/_/useDaqDetailParams-D4ZVxVla.mjs.map +1 -0
  85. package/.output/server/chunks/_/{useDaqFilters-Bi8Ybyhl.mjs → useDaqFilters-CugTQrIt.mjs} +4 -4
  86. package/.output/server/chunks/_/useDaqFilters-CugTQrIt.mjs.map +1 -0
  87. package/.output/server/chunks/_/{useDaqOptimizations-XodbRzgb.mjs → useDaqOptimizations-_P1sco7P.mjs} +2 -2
  88. package/.output/server/chunks/_/useDaqOptimizations-_P1sco7P.mjs.map +1 -0
  89. package/.output/server/chunks/_/{useDaqStream-CGbftQdw.mjs → useDaqStream-BVFNKAP9.mjs} +2 -2
  90. package/.output/server/chunks/_/useDaqStream-BVFNKAP9.mjs.map +1 -0
  91. package/.output/server/chunks/_/{useDaqTemplates-Bo_sE1xp.mjs → useDaqTemplates-DmcUC_Aw.mjs} +3 -3
  92. package/.output/server/chunks/_/useDaqTemplates-DmcUC_Aw.mjs.map +1 -0
  93. package/.output/server/chunks/_/{useDashboardData-BJ30kVLq.mjs → useDashboardData-Dv1SJs3v.mjs} +3 -3
  94. package/.output/server/chunks/_/useDashboardData-Dv1SJs3v.mjs.map +1 -0
  95. package/.output/server/chunks/_/{useDcwAddNode-BLqwQe59.mjs → useDcwAddNode-CZtXylAe.mjs} +3 -3
  96. package/.output/server/chunks/_/useDcwAddNode-CZtXylAe.mjs.map +1 -0
  97. package/.output/server/chunks/_/{useDcwCards-CofBoHat.mjs → useDcwCards-CItS2A_F.mjs} +2 -2
  98. package/.output/server/chunks/_/useDcwCards-CItS2A_F.mjs.map +1 -0
  99. package/.output/server/chunks/_/{useDcwDetailScope-DhkBcKaS.mjs → useDcwDetailScope-Dyu0bYy9.mjs} +3 -3
  100. package/.output/server/chunks/_/useDcwDetailScope-Dyu0bYy9.mjs.map +1 -0
  101. package/.output/server/chunks/_/{useDcwDetailTemplates-BSmmOkFn.mjs → useDcwDetailTemplates-CwK1rb2i.mjs} +2 -2
  102. package/.output/server/chunks/_/useDcwDetailTemplates-CwK1rb2i.mjs.map +1 -0
  103. package/.output/server/chunks/_/{useDcwFilter-Bh8dJ1of.mjs → useDcwFilter-CvuCOvU2.mjs} +2 -2
  104. package/.output/server/chunks/_/useDcwFilter-CvuCOvU2.mjs.map +1 -0
  105. package/.output/server/chunks/_/{useDcwLedger-UEB2x63E.mjs → useDcwLedger-CI-AK4j3.mjs} +2 -2
  106. package/.output/server/chunks/_/useDcwLedger-CI-AK4j3.mjs.map +1 -0
  107. package/.output/server/chunks/_/{useDcwLineMutations-9PElT2Fz.mjs → useDcwLineMutations-CsS2rDUh.mjs} +2 -2
  108. package/.output/server/chunks/_/useDcwLineMutations-CsS2rDUh.mjs.map +1 -0
  109. package/.output/server/chunks/_/{useDcwLineRun-BPm0ZPs1.mjs → useDcwLineRun-B1uLN_MJ.mjs} +2 -2
  110. package/.output/server/chunks/_/useDcwLineRun-B1uLN_MJ.mjs.map +1 -0
  111. package/.output/server/chunks/_/{useDcwParamApprovals-Ctczj8Lm.mjs → useDcwParamApprovals-CVab6q8T.mjs} +2 -2
  112. package/.output/server/chunks/_/useDcwParamApprovals-CVab6q8T.mjs.map +1 -0
  113. package/.output/server/chunks/_/{useDcwProducts-hgfkZhht.mjs → useDcwProducts-OAvQBk5O.mjs} +2 -2
  114. package/.output/server/chunks/_/useDcwProducts-OAvQBk5O.mjs.map +1 -0
  115. package/.output/server/chunks/_/{useDcwQuery-Dd411JAJ.mjs → useDcwQuery-dgEkZDAy.mjs} +2 -2
  116. package/.output/server/chunks/_/useDcwQuery-dgEkZDAy.mjs.map +1 -0
  117. package/.output/server/chunks/_/{useDcwQuickActions-C7cIVK0F.mjs → useDcwQuickActions-C3ItztwI.mjs} +2 -2
  118. package/.output/server/chunks/_/useDcwQuickActions-C3ItztwI.mjs.map +1 -0
  119. package/.output/server/chunks/_/{useDcwRecipes-DaQAxk7t.mjs → useDcwRecipes-BD4PjvzG.mjs} +2 -2
  120. package/.output/server/chunks/_/useDcwRecipes-BD4PjvzG.mjs.map +1 -0
  121. package/.output/server/chunks/_/{useDcwStream-2-KfS0lN.mjs → useDcwStream-BTcOZh5H.mjs} +2 -2
  122. package/.output/server/chunks/_/useDcwStream-BTcOZh5H.mjs.map +1 -0
  123. package/.output/server/chunks/_/{useDcwTemplates-BXtYJspX.mjs → useDcwTemplates-CsR6b3ws.mjs} +2 -2
  124. package/.output/server/chunks/_/useDcwTemplates-CsR6b3ws.mjs.map +1 -0
  125. package/.output/server/chunks/_/{useDcwWrites-IOVVc-Sz.mjs → useDcwWrites-C55DL7Fe.mjs} +2 -2
  126. package/.output/server/chunks/_/useDcwWrites-C55DL7Fe.mjs.map +1 -0
  127. package/.output/server/chunks/_/{useLogsScope-BFU7kLl9.mjs → useLogsScope-CUxlAoQN.mjs} +2 -2
  128. package/.output/server/chunks/_/useLogsScope-CUxlAoQN.mjs.map +1 -0
  129. package/.output/server/chunks/_/{workshop-CeaToa_8.mjs → workshop-D2ucb128.mjs} +4 -4
  130. package/.output/server/chunks/_/workshop-D2ucb128.mjs.map +1 -0
  131. package/.output/server/chunks/routes/api/mcp/workshop.mjs +1 -1
  132. package/.output/server/chunks/routes/api/system/backup/run.post.mjs +2 -2
  133. package/.output/server/chunks/routes/api/workshop/agent-tools/index.post.mjs +1 -1
  134. package/.output/server/chunks/routes/api/workshop/agent-tools/invoke.post.mjs +8 -9
  135. package/.output/server/chunks/routes/api/workshop/agent-tools/invoke.post.mjs.map +1 -1
  136. package/.output/server/chunks/routes/api/workshop/aml/index.get.mjs +15 -5
  137. package/.output/server/chunks/routes/api/workshop/aml/index.get.mjs.map +1 -1
  138. package/.output/server/chunks/routes/api/workshop/aml/index5.get.mjs +10 -5
  139. package/.output/server/chunks/routes/api/workshop/aml/index5.get.mjs.map +1 -1
  140. package/.output/server/chunks/routes/api/workshop/aml/models/index.get.mjs +39 -0
  141. package/.output/server/chunks/routes/api/workshop/aml/models/index.get.mjs.map +1 -0
  142. package/.output/server/chunks/routes/api/workshop/aml/training-plans/index.get.mjs +37 -0
  143. package/.output/server/chunks/routes/api/workshop/aml/training-plans/index.get.mjs.map +1 -0
  144. package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs +1 -1
  145. package/.output/server/chunks/routes/api/workshop/channels/_id/harness-profiles/promote.post.mjs +62 -0
  146. package/.output/server/chunks/routes/api/workshop/channels/_id/harness-profiles/promote.post.mjs.map +1 -0
  147. package/.output/server/chunks/routes/api/workshop/channels/_id/improvement-stats.get.mjs +37 -0
  148. package/.output/server/chunks/routes/api/workshop/channels/_id/improvement-stats.get.mjs.map +1 -0
  149. package/.output/server/chunks/routes/api/workshop/channels/_id/index.put.mjs +1 -1
  150. package/.output/server/chunks/routes/api/workshop/channels/_id/index10.get.mjs +41 -0
  151. package/.output/server/chunks/routes/api/workshop/channels/_id/index10.get.mjs.map +1 -0
  152. package/.output/server/chunks/routes/api/workshop/channels/_id/index2.get.mjs +7 -5
  153. package/.output/server/chunks/routes/api/workshop/channels/_id/index2.get.mjs.map +1 -1
  154. package/.output/server/chunks/routes/api/workshop/channels/_id/index2.post.mjs +24 -22
  155. package/.output/server/chunks/routes/api/workshop/channels/_id/index2.post.mjs.map +1 -1
  156. package/.output/server/chunks/routes/api/workshop/channels/_id/index2.put.mjs +1 -1
  157. package/.output/server/chunks/routes/api/workshop/channels/_id/index3.get.mjs +9 -13
  158. package/.output/server/chunks/routes/api/workshop/channels/_id/index3.get.mjs.map +1 -1
  159. package/.output/server/chunks/routes/api/workshop/channels/_id/index3.post.mjs +22 -72
  160. package/.output/server/chunks/routes/api/workshop/channels/_id/index3.post.mjs.map +1 -1
  161. package/.output/server/chunks/routes/api/workshop/channels/_id/index4.get.mjs +14 -27
  162. package/.output/server/chunks/routes/api/workshop/channels/_id/index4.get.mjs.map +1 -1
  163. package/.output/server/chunks/routes/api/workshop/channels/_id/index4.post.mjs +72 -7
  164. package/.output/server/chunks/routes/api/workshop/channels/_id/index4.post.mjs.map +1 -1
  165. package/.output/server/chunks/routes/api/workshop/channels/_id/index5.get.mjs +28 -22
  166. package/.output/server/chunks/routes/api/workshop/channels/_id/index5.get.mjs.map +1 -1
  167. package/.output/server/chunks/routes/api/workshop/channels/_id/index5.post.mjs +7 -66
  168. package/.output/server/chunks/routes/api/workshop/channels/_id/index5.post.mjs.map +1 -1
  169. package/.output/server/chunks/routes/api/workshop/channels/_id/index6.get.mjs +20 -38
  170. package/.output/server/chunks/routes/api/workshop/channels/_id/index6.get.mjs.map +1 -1
  171. package/.output/server/chunks/routes/api/workshop/channels/_id/index6.post.mjs +99 -0
  172. package/.output/server/chunks/routes/api/workshop/channels/_id/index6.post.mjs.map +1 -0
  173. package/.output/server/chunks/routes/api/workshop/channels/_id/index7.get.mjs +34 -4
  174. package/.output/server/chunks/routes/api/workshop/channels/_id/index7.get.mjs.map +1 -1
  175. package/.output/server/chunks/routes/api/workshop/channels/_id/index8.get.mjs +9 -8
  176. package/.output/server/chunks/routes/api/workshop/channels/_id/index8.get.mjs.map +1 -1
  177. package/.output/server/chunks/routes/api/workshop/channels/_id/index9.get.mjs +38 -0
  178. package/.output/server/chunks/routes/api/workshop/channels/_id/index9.get.mjs.map +1 -0
  179. package/.output/server/chunks/routes/api/workshop/channels/_id/memories/_memoryId/promote.post.mjs +46 -0
  180. package/.output/server/chunks/routes/api/workshop/channels/_id/memories/_memoryId/promote.post.mjs.map +1 -0
  181. package/.output/server/chunks/routes/api/workshop/channels/_id/memories/experience-stats.get.mjs +37 -0
  182. package/.output/server/chunks/routes/api/workshop/channels/_id/memories/experience-stats.get.mjs.map +1 -0
  183. package/.output/server/chunks/routes/api/workshop/channels/_id/terminals.get.mjs +1 -1
  184. package/.output/server/chunks/routes/api/workshop/channels/_id/tools/reset.post.mjs +1 -1
  185. package/.output/server/chunks/routes/api/workshop/channels/_id/twin-profile.get.mjs +1 -1
  186. package/.output/server/chunks/routes/api/workshop/channels/_id/twin-profile.patch.mjs +1 -1
  187. package/.output/server/chunks/routes/api/workshop/channels/index.patch.mjs +1 -1
  188. package/.output/server/chunks/routes/api/workshop/channels.post.mjs +6 -6
  189. package/.output/server/chunks/routes/api/workshop/daq/_id/ingest.post.mjs +2 -2
  190. package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs +1 -1
  191. package/.output/server/chunks/routes/api/workshop/daq/index.get.mjs +9 -7
  192. package/.output/server/chunks/routes/api/workshop/daq/index.get.mjs.map +1 -1
  193. package/.output/server/chunks/routes/api/workshop/daq/index2.get.mjs +38 -0
  194. package/.output/server/chunks/routes/api/workshop/daq/index2.get.mjs.map +1 -0
  195. package/.output/server/chunks/routes/api/workshop/daq/index2.post.mjs +1 -1
  196. package/.output/server/chunks/routes/api/workshop/daq/infra/reconnect.post.mjs +1 -1
  197. package/.output/server/chunks/routes/api/workshop/daq/infra.get.mjs +1 -1
  198. package/.output/server/chunks/routes/api/workshop/daq/query.get.mjs +34 -16
  199. package/.output/server/chunks/routes/api/workshop/daq/query.get.mjs.map +1 -1
  200. package/.output/server/chunks/routes/api/workshop/daq/storage/retention.put.mjs +1 -1
  201. package/.output/server/chunks/routes/api/workshop/daq/storage/rollup.post.mjs +1 -1
  202. package/.output/server/chunks/routes/api/workshop/daq/storage.get.mjs +1 -1
  203. package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.delete.mjs +1 -1
  204. package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.patch.mjs +1 -1
  205. package/.output/server/chunks/routes/api/workshop/daq/test-driver.post.mjs +1 -1
  206. package/.output/server/chunks/routes/api/workshop/dcw/_id/bind.post.mjs +1 -1
  207. package/.output/server/chunks/routes/api/workshop/dcw/_id/bindings.put.mjs +1 -1
  208. package/.output/server/chunks/routes/api/workshop/dcw/_id/param-ledger.get.mjs +1 -1
  209. package/.output/server/chunks/routes/api/workshop/dcw/_id/read.post.mjs +1 -1
  210. package/.output/server/chunks/routes/api/workshop/dcw/_id/test.post.mjs +1 -1
  211. package/.output/server/chunks/routes/api/workshop/dcw/_id/write.post.mjs +1 -1
  212. package/.output/server/chunks/routes/api/workshop/dcw/_id_.delete.mjs +1 -1
  213. package/.output/server/chunks/routes/api/workshop/dcw/_id_.patch.mjs +1 -1
  214. package/.output/server/chunks/routes/api/workshop/dcw/controller.post.mjs +1 -1
  215. package/.output/server/chunks/routes/api/workshop/dcw/index.get.mjs +7 -13
  216. package/.output/server/chunks/routes/api/workshop/dcw/index.get.mjs.map +1 -1
  217. package/.output/server/chunks/routes/api/workshop/dcw/index.post.mjs +1 -1
  218. package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs +14 -8
  219. package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs.map +1 -1
  220. package/.output/server/chunks/routes/api/workshop/dcw/index2.post.mjs +1 -1
  221. package/.output/server/chunks/routes/api/workshop/dcw/index3.get.mjs +9 -20
  222. package/.output/server/chunks/routes/api/workshop/dcw/index3.get.mjs.map +1 -1
  223. package/.output/server/chunks/routes/api/workshop/dcw/index3.post.mjs +1 -1
  224. package/.output/server/chunks/routes/api/workshop/dcw/index4.get.mjs +17 -14
  225. package/.output/server/chunks/routes/api/workshop/dcw/index4.get.mjs.map +1 -1
  226. package/.output/server/chunks/routes/api/workshop/dcw/index4.post.mjs +1 -1
  227. package/.output/server/chunks/routes/api/workshop/dcw/index5.get.mjs +15 -12
  228. package/.output/server/chunks/routes/api/workshop/dcw/index5.get.mjs.map +1 -1
  229. package/.output/server/chunks/routes/api/workshop/dcw/index5.post.mjs +1 -1
  230. package/.output/server/chunks/routes/api/workshop/dcw/index6.get.mjs +11 -5
  231. package/.output/server/chunks/routes/api/workshop/dcw/index6.get.mjs.map +1 -1
  232. package/.output/server/chunks/routes/api/workshop/dcw/index7.get.mjs +7 -2
  233. package/.output/server/chunks/routes/api/workshop/dcw/index7.get.mjs.map +1 -1
  234. package/.output/server/chunks/routes/api/workshop/dcw/index8.get.mjs +33 -0
  235. package/.output/server/chunks/routes/api/workshop/dcw/index8.get.mjs.map +1 -0
  236. package/.output/server/chunks/routes/api/workshop/dcw/journal/node/_nodeId/rollback.post.mjs +1 -1
  237. package/.output/server/chunks/routes/api/workshop/dcw/line/query.get.mjs +1 -1
  238. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs +1 -1
  239. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs +1 -1
  240. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.delete.mjs +1 -1
  241. package/.output/server/chunks/routes/api/workshop/dcw/lines/index.get.mjs +41 -0
  242. package/.output/server/chunks/routes/api/workshop/dcw/lines/index.get.mjs.map +1 -0
  243. package/.output/server/chunks/routes/api/workshop/dcw/mes-artifacts/file.get.mjs +1 -1
  244. package/.output/server/chunks/routes/api/workshop/dcw/mes-hook-test.post.mjs +1 -1
  245. package/.output/server/chunks/routes/api/workshop/dcw/mes-test-read.post.mjs +1 -1
  246. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/judge.post.mjs +1 -1
  247. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/rollback.post.mjs +1 -1
  248. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/series.get.mjs +1 -1
  249. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id_.get.mjs +1 -1
  250. package/.output/server/chunks/routes/api/workshop/dcw/params/_id/read.post.mjs +1 -1
  251. package/.output/server/chunks/routes/api/workshop/dcw/params/_id/write.post.mjs +8 -5
  252. package/.output/server/chunks/routes/api/workshop/dcw/params/_id/write.post.mjs.map +1 -1
  253. package/.output/server/chunks/routes/api/workshop/dcw/params/_id_.delete.mjs +1 -1
  254. package/.output/server/chunks/routes/api/workshop/dcw/params/_id_.patch.mjs +1 -1
  255. package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.delete.mjs +1 -1
  256. package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.patch.mjs +1 -1
  257. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/apply.post.mjs +1 -1
  258. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/rollback-good.post.mjs +1 -1
  259. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.delete.mjs +1 -1
  260. package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/close.post.mjs +1 -1
  261. package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/data.get.mjs +1 -1
  262. package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/rollback.post.mjs +1 -1
  263. package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.delete.mjs +1 -1
  264. package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.patch.mjs +1 -1
  265. package/.output/server/chunks/routes/api/workshop/dcw/test-driver.post.mjs +1 -1
  266. package/.output/server/chunks/routes/api/workshop/device-twins/_id/control.post.mjs +8 -6
  267. package/.output/server/chunks/routes/api/workshop/device-twins/_id/control.post.mjs.map +1 -1
  268. package/.output/server/chunks/routes/api/workshop/device-twins/_id/telemetry.post.mjs +1 -1
  269. package/.output/server/chunks/routes/api/workshop/device-twins/_id_.delete.mjs +1 -1
  270. package/.output/server/chunks/routes/api/workshop/device-twins/_id_.patch.mjs +1 -1
  271. package/.output/server/chunks/routes/api/workshop/eda/vm/predict.post.mjs +1 -1
  272. package/.output/server/chunks/routes/api/workshop/exp/confirmations/_id/decide.post.mjs +1 -1
  273. package/.output/server/chunks/routes/api/workshop/exp/index.get.mjs +1 -1
  274. package/.output/server/chunks/routes/api/workshop/fs/dirs.get.mjs +1 -1
  275. package/.output/server/chunks/routes/api/workshop/harnesses/_id/providers.get.mjs +1 -1
  276. package/.output/server/chunks/routes/api/workshop/harnesses.get.mjs +1 -1
  277. package/.output/server/chunks/routes/api/workshop/hitl/pending.get.mjs +1 -1
  278. package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs +17 -10
  279. package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs.map +1 -1
  280. package/.output/server/chunks/routes/api/workshop/index.mjs +1 -1
  281. package/.output/server/chunks/routes/api/workshop/index.put.mjs +16 -11
  282. package/.output/server/chunks/routes/api/workshop/index.put.mjs.map +1 -1
  283. package/.output/server/chunks/routes/api/workshop/index12.get.mjs +1 -1
  284. package/.output/server/chunks/routes/api/workshop/index13.get.mjs +1 -1
  285. package/.output/server/chunks/routes/api/workshop/index4.post.mjs +1 -1
  286. package/.output/server/chunks/routes/api/workshop/index5.post.mjs +1 -1
  287. package/.output/server/chunks/routes/api/workshop/index6.get.mjs +1 -1
  288. package/.output/server/chunks/routes/api/workshop/index6.post.mjs +1 -1
  289. package/.output/server/chunks/routes/api/workshop/index7.get.mjs +1 -1
  290. package/.output/server/chunks/routes/api/workshop/index7.post.mjs +1 -1
  291. package/.output/server/chunks/routes/api/workshop/index8.get.mjs +1 -1
  292. package/.output/server/chunks/routes/api/workshop/index8.post.mjs +1 -1
  293. package/.output/server/chunks/routes/api/workshop/mes/bridge.post.mjs +1 -1
  294. package/.output/server/chunks/routes/api/workshop/mes/datasets.get.mjs +1 -1
  295. package/.output/server/chunks/routes/api/workshop/mes/index.put.mjs +7 -8
  296. package/.output/server/chunks/routes/api/workshop/mes/index.put.mjs.map +1 -1
  297. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/autofix.mjs +1 -1
  298. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/compile.mjs +1 -1
  299. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/evidence.mjs +1 -1
  300. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/publish.mjs +1 -1
  301. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/rules/_ruleId/approval-decision.mjs +1 -1
  302. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/rules/_ruleId/approval.mjs +1 -1
  303. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/rules/_ruleId/transition.mjs +1 -1
  304. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/subgraph.mjs +1 -1
  305. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId/validate.mjs +1 -1
  306. package/.output/server/chunks/routes/api/workshop/ontology/drafts/_draftId_.mjs +1 -1
  307. package/.output/server/chunks/routes/api/workshop/ontology/export/_ontologyId_.mjs +1 -1
  308. package/.output/server/chunks/routes/api/workshop/ontology/index.mjs +1 -1
  309. package/.output/server/chunks/routes/api/workshop/ontology/scene.mjs +1 -1
  310. package/.output/server/chunks/routes/api/workshop/ontology/traces/_ontologyId_.mjs +1 -1
  311. package/.output/server/chunks/routes/api/workshop/ontology/versions/_ontologyId/compare.mjs +1 -1
  312. package/.output/server/chunks/routes/api/workshop/ontology/versions/_ontologyId_.mjs +1 -1
  313. package/.output/server/chunks/routes/api/workshop/optimization/capabilities.get.mjs +1 -1
  314. package/.output/server/chunks/routes/api/workshop/optimization/index.get.mjs +1 -1
  315. package/.output/server/chunks/routes/api/workshop/optimization/index.mjs +1 -1
  316. package/.output/server/chunks/routes/api/workshop/optimization/index2.mjs +1 -1
  317. package/.output/server/chunks/routes/api/workshop/optimization/profiles/_id/publish.post.mjs +1 -1
  318. package/.output/server/chunks/routes/api/workshop/optimization/recommendations/_id/crosscheck.post.mjs +1 -1
  319. package/.output/server/chunks/routes/api/workshop/optimization/recommendations/_id/dispatch.post.mjs +1 -1
  320. package/.output/server/chunks/routes/api/workshop/optimization/solve.post.mjs +1 -1
  321. package/.output/server/chunks/routes/api/workshop/plugins/_name/disable.post.mjs +1 -1
  322. package/.output/server/chunks/routes/api/workshop/plugins/_name/enable.post.mjs +1 -1
  323. package/.output/server/chunks/routes/api/workshop/process-model/datasets.post.mjs +1 -1
  324. package/.output/server/chunks/routes/api/workshop/process-model/eligibility.mjs +1 -1
  325. package/.output/server/chunks/routes/api/workshop/process-model/experiments.mjs +1 -1
  326. package/.output/server/chunks/routes/api/workshop/process-model/index.mjs +1 -1
  327. package/.output/server/chunks/routes/api/workshop/process-model/specs/_id/publish.post.mjs +1 -1
  328. package/.output/server/chunks/routes/api/workshop/process-model/train.post.mjs +1 -1
  329. package/.output/server/chunks/routes/api/workshop/projects/_id/deliverables/index.get.mjs +37 -0
  330. package/.output/server/chunks/routes/api/workshop/projects/_id/deliverables/index.get.mjs.map +1 -0
  331. package/.output/server/chunks/routes/api/workshop/projects/_id/kernel/tick.post.mjs +1 -1
  332. package/.output/server/chunks/routes/api/workshop/projects/_id/work-items/index.get.mjs +37 -0
  333. package/.output/server/chunks/routes/api/workshop/projects/_id/work-items/index.get.mjs.map +1 -0
  334. package/.output/server/chunks/routes/api/workshop/projects/instantiate.post.mjs +1 -1
  335. package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.delete.mjs +1 -1
  336. package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.put.mjs +1 -1
  337. package/.output/server/chunks/routes/api/workshop/teams/_id/index.put.mjs +1 -1
  338. package/.output/server/chunks/routes/api/workshop/teams/_id/index2.get.mjs +1 -1
  339. package/.output/server/chunks/routes/api/workshop/tools/sync.post.mjs +1 -1
  340. package/.output/server/chunks/routes/api/workshop/workspaces/_id/channel-templates/_tplId_.post.mjs +1 -1
  341. package/.output/server/chunks/routes/renderer.mjs +2 -2
  342. package/.output/server/chunks/virtual/entry.mjs +50 -46
  343. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  344. package/.output/server/package.json +1 -1
  345. package/README-zh.md +53 -8
  346. package/README.md +53 -8
  347. package/app/components/AppSidebar.vue +2 -0
  348. package/app/components/workshop/CommandPalette.vue +1 -0
  349. package/app/components/workshop/workbench/WorkbenchHead.vue +35 -7
  350. package/app/composables/useRouteMeta.ts +1 -0
  351. package/app/pages/projects/[id].vue +2882 -1603
  352. package/app/pages/projects/index.vue +982 -176
  353. package/config.yml +1 -1
  354. package/docs/cli.en.md +3 -3
  355. package/docs/cli.md +2 -2
  356. package/docs/plugins.en.md +1 -1
  357. package/docs/plugins.md +1 -1
  358. package/docs/sdk.en.md +1 -1
  359. package/docs/sdk.md +1 -1
  360. package/i18n/locales/en.ts +2 -0
  361. package/i18n/locales/zh-CN.ts +2 -0
  362. package/package.json +2 -2
  363. package/scripts/_audit/_readme-canvas-shot.mjs +48 -48
  364. package/scripts/_audit/cal3-staged-live.mjs +3 -0
  365. package/scripts/_audit/desktop-demo-shot.mjs +31 -31
  366. package/scripts/_audit/frontend-interaction-demo.mjs +99 -99
  367. package/scripts/_audit/multi-harness-isolation-live.mjs +132 -132
  368. package/scripts/_audit/omp-channel-project-session-live.mjs +481 -0
  369. package/scripts/_audit/omp-project-single-live.mjs +167 -0
  370. package/scripts/_audit/project-blueprint-live.mjs +63 -42
  371. package/scripts/_audit/project-landing-live.mjs +659 -0
  372. package/scripts/acceptance-rsi-evolution.ts +188 -0
  373. package/scripts/acceptance-rsi-live-e2e.mjs +611 -0
  374. package/scripts/acceptance-rsi-stage1.ts +208 -0
  375. package/scripts/check-rsi-redline.mjs +73 -0
  376. package/scripts/demo/accept-harness-fix.mjs +178 -0
  377. package/scripts/e2e-final-assertions.mjs +51 -51
  378. package/scripts/e2e-landing-scenario.mjs +409 -409
  379. package/scripts/e2e-landing-shot.mjs +24 -24
  380. package/scripts/e2e-page-shot.mjs +71 -71
  381. package/scripts/e2e-session-shot.mjs +82 -82
  382. package/scripts/e2e-ui-capture.mjs +125 -125
  383. package/scripts/e2e-us7-close.mjs +88 -88
  384. package/scripts/e2e-us7-final.mjs +132 -132
  385. package/scripts/e2e-us7-retry.mjs +136 -136
  386. package/scripts/session-memory-runtime-acceptance.mjs +245 -245
  387. package/server/api/workshop/agent-tools/invoke.post.ts +15 -7
  388. package/server/api/workshop/aml/datasets/index.get.ts +20 -4
  389. package/server/api/workshop/aml/jobs/index.get.ts +15 -4
  390. package/server/api/workshop/aml/models/[id]/index.get.ts +24 -0
  391. package/server/api/workshop/aml/training-plans/[id]/index.get.ts +19 -0
  392. package/server/api/workshop/channels/[id]/harness-profiles/index.get.ts +27 -0
  393. package/server/api/workshop/channels/[id]/harness-profiles/index.post.ts +46 -0
  394. package/server/api/workshop/channels/[id]/harness-profiles/promote.post.ts +48 -0
  395. package/server/api/workshop/channels/[id]/improvement-stats.get.ts +20 -0
  396. package/server/api/workshop/channels/[id]/memories/[memoryId]/promote.post.ts +33 -0
  397. package/server/api/workshop/channels/[id]/memories/experience-stats.get.ts +19 -0
  398. package/server/api/workshop/channels/[id]/verifications/index.get.ts +23 -0
  399. package/server/api/workshop/daq/[id]/index.get.ts +25 -0
  400. package/server/api/workshop/daq/query.get.ts +42 -14
  401. package/server/api/workshop/dcw/[id]/index.get.ts +24 -0
  402. package/server/api/workshop/dcw/lines/[id]/index.get.ts +27 -0
  403. package/server/api/workshop/dcw/params/[id]/write.post.ts +12 -3
  404. package/server/api/workshop/device-twins/[id]/control.post.ts +12 -4
  405. package/server/api/workshop/hitl/respond.post.ts +19 -21
  406. package/server/api/workshop/mes/secrets/index.put.ts +11 -6
  407. package/server/api/workshop/permissions/index.put.ts +20 -9
  408. package/server/api/workshop/projects/[id]/deliverables/[did]/index.get.ts +19 -0
  409. package/server/api/workshop/projects/[id]/work-items/[wid]/index.get.ts +20 -0
  410. package/server/plugins/workshop.ts +3 -0
  411. package/server/services/workshop/agents/agent-interface.ts +63 -2
  412. package/server/services/workshop/agents/base-agent.ts +7 -1
  413. package/server/services/workshop/agents/host-tool-bridge/dispatch.ts +3 -0
  414. package/server/services/workshop/agents/host-tool-bridge/tools/improvement.ts +33 -0
  415. package/server/services/workshop/agents/host-tool-bridge/tools/memory.ts +68 -12
  416. package/server/services/workshop/agents/industrial/analysis-tools.ts +3 -0
  417. package/server/services/workshop/agents/industrial/line-tools.ts +11 -1
  418. package/server/services/workshop/agents/industrial/ops-tools.ts +22 -0
  419. package/server/services/workshop/agents/industrial/recipe-propose-tools.ts +8 -2
  420. package/server/services/workshop/agents/omp-agent/client.ts +18 -1
  421. package/server/services/workshop/agents/omp-agent/context-governance.ts +13 -1
  422. package/server/services/workshop/agents/omp-agent/core.ts +6 -0
  423. package/server/services/workshop/agents/task-channel-profile.ts +55 -0
  424. package/server/services/workshop/agents/task-channel.ts +3 -0
  425. package/server/services/workshop/aml/intervention-ledger.ts +14 -0
  426. package/server/services/workshop/analysis/analysis.repo.ts +6 -4
  427. package/server/services/workshop/db/database/index.ts +1 -1
  428. package/server/services/workshop/db/database/migrations-blind-verification.ts +33 -0
  429. package/server/services/workshop/db/database/migrations-experience.ts +38 -0
  430. package/server/services/workshop/db/database/migrations-harness-profile.ts +28 -0
  431. package/server/services/workshop/db/database/migrations-improvement-actions.ts +30 -0
  432. package/server/services/workshop/db/database/migrations-improvement.ts +36 -0
  433. package/server/services/workshop/db/database/migrations-project.ts +179 -179
  434. package/server/services/workshop/db/database/open.ts +134 -117
  435. package/server/services/workshop/db/database/rows.ts +22 -2
  436. package/server/services/workshop/db/database/schema.ts +1675 -1667
  437. package/server/services/workshop/db/improvement-action.repo.ts +82 -0
  438. package/server/services/workshop/db/improvement.repo.ts +139 -0
  439. package/server/services/workshop/db/memory.repo.ts +238 -22
  440. package/server/services/workshop/dcw/dcw-controller/lines.ts +3 -3
  441. package/server/services/workshop/dcw/recipe-evidence.ts +181 -0
  442. package/server/services/workshop/experience/advisory.ts +135 -0
  443. package/server/services/workshop/experience/gates.ts +150 -0
  444. package/server/services/workshop/experience/harness-profile.ts +159 -0
  445. package/server/services/workshop/experience/overlay.ts +55 -0
  446. package/server/services/workshop/experience/promote.ts +123 -0
  447. package/server/services/workshop/optimization/python/__pycache__/problems.cpython-312.pyc +0 -0
  448. package/server/services/workshop/plugins/host/reload-swap.mjs +68 -0
  449. package/server/services/workshop/plugins/host/reload.mjs +42 -12
  450. package/server/services/workshop/projects/criteria-metrics.ts +54 -0
  451. package/server/services/workshop/projects/service.ts +158 -3
  452. package/server/services/workshop/runtime/manager/a2a.ts +61 -0
  453. package/server/services/workshop/runtime/manager/admin-agents.ts +68 -2
  454. package/server/services/workshop/runtime/manager/contracts.ts +23 -0
  455. package/server/services/workshop/runtime/manager/state.ts +132 -0
  456. package/server/services/workshop/runtime/manager/types.ts +3 -0
  457. package/server/services/workshop/runtime/manager/workspace.ts +18 -2
  458. package/server/services/workshop/runtime/memory/helpers.ts +4 -0
  459. package/server/services/workshop/runtime/memory/recall.ts +41 -10
  460. package/server/services/workshop/runtime/memory/reflect-collector.ts +213 -0
  461. package/server/services/workshop/runtime/memory/reflector.ts +321 -0
  462. package/server/services/workshop/runtime/memory/state.ts +2 -0
  463. package/server/services/workshop/runtime/memory/types.ts +16 -0
  464. package/server/services/workshop/runtime/memory/write.ts +68 -1
  465. package/server/services/workshop/verify/blind-verifier.ts +291 -0
  466. package/.output/public/_nuxt/-XI3FWdE2.js +0 -1
  467. package/.output/public/_nuxt/B2azkP06.js +0 -1
  468. package/.output/public/_nuxt/B7Xvcvc72.js +0 -1
  469. package/.output/public/_nuxt/BjERGiA_.js +0 -1
  470. package/.output/public/_nuxt/BuNUABSV.js +0 -1
  471. package/.output/public/_nuxt/BxCzghnC.js +0 -1
  472. package/.output/public/_nuxt/ChaPv2ma2.js +0 -1
  473. package/.output/public/_nuxt/CtR6fOPv.js +0 -1
  474. package/.output/public/_nuxt/D3ucelqH.js +0 -1
  475. package/.output/public/_nuxt/DYj0LL7W2.js +0 -2
  476. package/.output/public/_nuxt/DxCWsK3w2.js +0 -2
  477. package/.output/public/_nuxt/_id_.CHfy_h7D.css +0 -1
  478. package/.output/public/_nuxt/builds/meta/41ef012e-5907-4063-b58c-16c4d02de1b7.json +0 -1
  479. package/.output/public/_nuxt/projects.BYLuJvrX.css +0 -1
  480. package/.output/public/_nuxt/workshop.Dr7XdziI.css +0 -1
  481. package/.output/server/chunks/_/TownView-uicih2T8.mjs.map +0 -1
  482. package/.output/server/chunks/_/_id_-BX8hihhe.mjs.map +0 -1
  483. package/.output/server/chunks/_/_id_-CEoXvYq6.mjs +0 -619
  484. package/.output/server/chunks/_/_id_-CEoXvYq6.mjs.map +0 -1
  485. package/.output/server/chunks/_/_id_-DMxiYYGr.mjs.map +0 -1
  486. package/.output/server/chunks/_/analysis-DVLO0bCy.mjs.map +0 -1
  487. package/.output/server/chunks/_/daq-CWiRcs2W.mjs.map +0 -1
  488. package/.output/server/chunks/_/dcw-BrEWEFnj.mjs.map +0 -1
  489. package/.output/server/chunks/_/logs-Lx7w3LYH.mjs.map +0 -1
  490. package/.output/server/chunks/_/operations--xLPUg-f.mjs.map +0 -1
  491. package/.output/server/chunks/_/pages-CzF3fZqL.mjs.map +0 -1
  492. package/.output/server/chunks/_/projects-BYn-GiAJ.mjs +0 -85
  493. package/.output/server/chunks/_/projects-BYn-GiAJ.mjs.map +0 -1
  494. package/.output/server/chunks/_/town-HjaOuPYS.mjs.map +0 -1
  495. package/.output/server/chunks/_/useDaqAddNode-CkGitJOy.mjs.map +0 -1
  496. package/.output/server/chunks/_/useDaqDetailBinding-BKi46wvJ.mjs.map +0 -1
  497. package/.output/server/chunks/_/useDaqDetailFrames-B6cqF1w1.mjs.map +0 -1
  498. package/.output/server/chunks/_/useDaqDetailHistory-D0sdKiWx.mjs.map +0 -1
  499. package/.output/server/chunks/_/useDaqDetailNode-DgxYQZBG.mjs.map +0 -1
  500. package/.output/server/chunks/_/useDaqDetailParams-D-ZJw2GJ.mjs.map +0 -1
  501. package/.output/server/chunks/_/useDaqFilters-Bi8Ybyhl.mjs.map +0 -1
  502. package/.output/server/chunks/_/useDaqOptimizations-XodbRzgb.mjs.map +0 -1
  503. package/.output/server/chunks/_/useDaqStream-CGbftQdw.mjs.map +0 -1
  504. package/.output/server/chunks/_/useDaqTemplates-Bo_sE1xp.mjs.map +0 -1
  505. package/.output/server/chunks/_/useDashboardData-BJ30kVLq.mjs.map +0 -1
  506. package/.output/server/chunks/_/useDcwAddNode-BLqwQe59.mjs.map +0 -1
  507. package/.output/server/chunks/_/useDcwCards-CofBoHat.mjs.map +0 -1
  508. package/.output/server/chunks/_/useDcwDetailScope-DhkBcKaS.mjs.map +0 -1
  509. package/.output/server/chunks/_/useDcwDetailTemplates-BSmmOkFn.mjs.map +0 -1
  510. package/.output/server/chunks/_/useDcwFilter-Bh8dJ1of.mjs.map +0 -1
  511. package/.output/server/chunks/_/useDcwLedger-UEB2x63E.mjs.map +0 -1
  512. package/.output/server/chunks/_/useDcwLineMutations-9PElT2Fz.mjs.map +0 -1
  513. package/.output/server/chunks/_/useDcwLineRun-BPm0ZPs1.mjs.map +0 -1
  514. package/.output/server/chunks/_/useDcwParamApprovals-Ctczj8Lm.mjs.map +0 -1
  515. package/.output/server/chunks/_/useDcwProducts-hgfkZhht.mjs.map +0 -1
  516. package/.output/server/chunks/_/useDcwQuery-Dd411JAJ.mjs.map +0 -1
  517. package/.output/server/chunks/_/useDcwQuickActions-C7cIVK0F.mjs.map +0 -1
  518. package/.output/server/chunks/_/useDcwRecipes-DaQAxk7t.mjs.map +0 -1
  519. package/.output/server/chunks/_/useDcwStream-2-KfS0lN.mjs.map +0 -1
  520. package/.output/server/chunks/_/useDcwTemplates-BXtYJspX.mjs.map +0 -1
  521. package/.output/server/chunks/_/useDcwWrites-IOVVc-Sz.mjs.map +0 -1
  522. package/.output/server/chunks/_/useLogsScope-BFU7kLl9.mjs.map +0 -1
  523. package/.output/server/chunks/_/workshop-CeaToa_8.mjs.map +0 -1
  524. package/scripts/_audit/_fix-report.mjs +0 -32
  525. /package/.output/public/_nuxt/{B5D1k6CB2.js → B5D1k6CB.js} +0 -0
  526. /package/.output/public/_nuxt/{B6Olw0Op2.js → B6Olw0Op.js} +0 -0
  527. /package/.output/public/_nuxt/{BclHgAY6.js → BclHgAY62.js} +0 -0
  528. /package/.output/public/_nuxt/{D9saExk9.js → D9saExk92.js} +0 -0
  529. /package/.output/public/_nuxt/{DFI6asjj.js → DFI6asjj2.js} +0 -0
  530. /package/.output/public/_nuxt/{DkJVtqfc.js → DkJVtqfc2.js} +0 -0
  531. /package/.output/public/_nuxt/{OVP8I5uy2.js → OVP8I5uy.js} +0 -0
@@ -0,0 +1,19 @@
1
+ /**
2
+ * GET /api/workshop/aml/training-plans/:id —— 单建模任务详情(主资源路径)。
3
+ *
4
+ * 对称性修复(2026-11-09):该路径此前只有 PATCH/DELETE 与 [id]/train,
5
+ * 主资源路径可改不可读。授权口径与列表一致(登录可见)。
6
+ */
7
+ import { getRouterParam } from 'h3'
8
+ import { defineApiHandler } from '@/server/utils/response'
9
+ import { resolveUser } from '@/server/api/workshop/caller'
10
+ import { AppError } from '@/server/utils/errors'
11
+ import { getTrainingPlan } from '@/server/services/workshop/aml/twin/training-plans'
12
+
13
+ export default defineApiHandler((event) => {
14
+ resolveUser(event)
15
+ const id = getRouterParam(event, 'id') ?? ''
16
+ const plan = getTrainingPlan(id)
17
+ if (!plan) throw new AppError(404, 'TRAINING_PLAN_MISSING', `建模任务 ${id} 不存在`)
18
+ return { plan }
19
+ })
@@ -0,0 +1,27 @@
1
+ /**
2
+ * GET /api/workshop/channels/:id/harness-profiles —— Harness Profile 版本列表(WP-B1,只读)。
3
+ * 返回各版本(含 candidate/shadow)与当前 active;无 active 时 active=null(零行为)。
4
+ * `preview` = 当前**实际会注入 prompt** 的文本(active overlay + pins + advisory),供运维核对
5
+ * "Agent 到底看到了什么"(WP-C1/C2 验收面;不产生任何写动作)。
6
+ */
7
+ import { getRouterParam } from 'h3'
8
+ import { resolveUser } from '../../../caller'
9
+ import { defineApiHandler } from '../../../../../utils/response'
10
+ import { getWorkshopManager } from '../../../../../plugins/workshop'
11
+ import { getAmlRuntime } from '../../../../../services/workshop/aml/runtime'
12
+ import { createHarnessProfileRepo } from '../../../../../services/workshop/experience/harness-profile'
13
+ import { channelOverlayText } from '../../../../../services/workshop/experience/overlay'
14
+
15
+ export default defineApiHandler(async (event) => {
16
+ const channelId = getRouterParam(event, 'id')!
17
+ const user = resolveUser(event)
18
+ const manager = getWorkshopManager()
19
+ const ch = manager.getChannelForUser(channelId, user.id)
20
+ manager.requireOwned(ch.ownerUserId, user.id, 'channel')
21
+ const repo = createHarnessProfileRepo(getAmlRuntime().db)
22
+ return {
23
+ active: repo.activeOf(channelId),
24
+ versions: repo.listByChannel(channelId),
25
+ preview: channelOverlayText(channelId),
26
+ }
27
+ })
@@ -0,0 +1,46 @@
1
+ /**
2
+ * POST /api/workshop/channels/:id/harness-profiles —— 新建 Harness Profile 版本(WP-B1)。
3
+ *
4
+ * body: { overlay?: string, pins?: string[], origin?: object, activate?: boolean }
5
+ * 权限:channel owner/admin。缺省落 candidate;activate=true 直接激活(同频道旧 active 自动 supersede)。
6
+ * 纪律:超限(overlay>800 字符 / pins>5)→ 400 拒绝,不静默截断。
7
+ */
8
+ import { z } from 'zod'
9
+ import { getRouterParam, readValidatedBody } from 'h3'
10
+ import { zValidator } from '../../../../../utils/validate'
11
+ import { AppError, ErrorCodes } from '../../../../../utils/errors'
12
+ import { defineApiHandler } from '../../../../../utils/response'
13
+ import { getWorkshopManager } from '../../../../../plugins/workshop'
14
+ import { resolveUser } from '../../../caller'
15
+ import { getAmlRuntime } from '../../../../../services/workshop/aml/runtime'
16
+ import { OVERLAY_MAX_CHARS, PINS_MAX, createHarnessProfileRepo } from '../../../../../services/workshop/experience/harness-profile'
17
+
18
+ const schema = z.object({
19
+ overlay: z.string().max(OVERLAY_MAX_CHARS, `overlay 上限 ${OVERLAY_MAX_CHARS} 字符`).optional(),
20
+ pins: z.array(z.string().min(1)).max(PINS_MAX, `pins 上限 ${PINS_MAX} 条`).optional(),
21
+ origin: z.record(z.string(), z.unknown()).optional(),
22
+ activate: z.boolean().optional(),
23
+ })
24
+
25
+ export default defineApiHandler(async (event) => {
26
+ const channelId = getRouterParam(event, 'id')!
27
+ const user = resolveUser(event)
28
+ const manager = getWorkshopManager()
29
+ const ch = manager.getChannelForUser(channelId, user.id)
30
+ manager.requireOwned(ch.ownerUserId, user.id, 'channel')
31
+ const body = await readValidatedBody(event, zValidator(schema))
32
+ const repo = createHarnessProfileRepo(getAmlRuntime().db)
33
+ try {
34
+ const created = repo.create({
35
+ channelId,
36
+ layers: { overlay: body.overlay ?? '', pins: body.pins ?? [] },
37
+ origin: { source: 'rest', ...(body.origin ?? {}) },
38
+ createdBy: user.id,
39
+ status: body.activate ? 'active' : 'candidate',
40
+ })
41
+ return { profile: created }
42
+ }
43
+ catch (err) {
44
+ throw new AppError(400, ErrorCodes.BAD_REQUEST, err instanceof Error ? err.message : String(err))
45
+ }
46
+ })
@@ -0,0 +1,48 @@
1
+ /**
2
+ * POST /api/workshop/channels/:id/harness-profiles/promote —— Profile 晋升/回滚(WP-B3/B4)。
3
+ *
4
+ * body: { profileId?: string, to?: 'shadow'|'active', bench?: PairedBenchResult } | { rollback: true }
5
+ * 权限:channel owner/admin(人审批;Agent 工具面不可达)。
6
+ * 纪律:shadow→active 必须带配对结果(WP-B2);无结果 → 409 附理由。
7
+ */
8
+ import { z } from 'zod'
9
+ import { getRouterParam, readValidatedBody } from 'h3'
10
+ import { zValidator } from '../../../../../utils/validate'
11
+ import { defineApiHandler } from '../../../../../utils/response'
12
+ import { getWorkshopManager } from '../../../../../plugins/workshop'
13
+ import { resolveUser } from '../../../caller'
14
+ import { getAmlRuntime } from '../../../../../services/workshop/aml/runtime'
15
+ import { promoteProfile, rollbackProfile } from '../../../../../services/workshop/experience/promote'
16
+
17
+ const schema = z.object({
18
+ profileId: z.string().min(1).optional(),
19
+ to: z.enum(['shadow', 'active']).optional(),
20
+ rollback: z.boolean().optional(),
21
+ bench: z.object({
22
+ pValue: z.number().nullable(),
23
+ primaryDelta: z.number(),
24
+ costDelta: z.number(),
25
+ }).optional(),
26
+ })
27
+
28
+ export default defineApiHandler(async (event) => {
29
+ const channelId = getRouterParam(event, 'id')!
30
+ const user = resolveUser(event)
31
+ const manager = getWorkshopManager()
32
+ const ch = manager.getChannelForUser(channelId, user.id)
33
+ manager.requireOwned(ch.ownerUserId, user.id, 'channel')
34
+ const body = await readValidatedBody(event, zValidator(schema))
35
+ const db = getAmlRuntime().db
36
+ if (body.rollback) {
37
+ const res = rollbackProfile(db, { channelId, actor: user.id })
38
+ return res
39
+ }
40
+ if (!body.profileId || !body.to) return { ok: false, reasons: ['profileId 与 to 必填(或 rollback=true)'] }
41
+ return promoteProfile(db, {
42
+ profileId: body.profileId,
43
+ channelId,
44
+ to: body.to,
45
+ actor: user.id,
46
+ bench: body.bench ?? null,
47
+ })
48
+ })
@@ -0,0 +1,20 @@
1
+ /**
2
+ * GET /api/workshop/channels/:id/improvement-stats —— RSI 元层成效看板(WP-C3,只读)。
3
+ *
4
+ * 返回本 channel 按 action_kind 聚合的成功率(accepted+promoted 视为成功)。
5
+ * 无动作时 `stats` 为空数组(不报错)。
6
+ * 鉴权:频道 owner/admin(与 /memories 面同口径)。
7
+ */
8
+ import { getRouterParam } from 'h3'
9
+ import { resolveUser } from '../../caller'
10
+ import { defineApiHandler } from '../../../../utils/response'
11
+ import { getWorkshopManager } from '../../../../plugins/workshop'
12
+
13
+ export default defineApiHandler(async (event) => {
14
+ const channelId = getRouterParam(event, 'id')!
15
+ const user = resolveUser(event)
16
+ const manager = getWorkshopManager()
17
+ const ch = manager.getChannelForUser(channelId, user.id)
18
+ manager.requireOwned(ch.ownerUserId, user.id, 'channel')
19
+ return manager.improvementOverview(channelId)
20
+ })
@@ -0,0 +1,33 @@
1
+ /**
2
+ * POST /api/workshop/channels/:id/memories/:memoryId/promote —— 经验条目晋升/退休(WP-B3)。
3
+ *
4
+ * body: { to: 'validated' | 'retired' }
5
+ * 权限:channel owner/admin(人在审批;Agent 工具面不可达)。
6
+ * 门判定失败 → 200 { ok:false, reasons }(附差多少,便于补齐证据后重试)。
7
+ */
8
+ import { z } from 'zod'
9
+ import { getRouterParam, readValidatedBody } from 'h3'
10
+ import { zValidator } from '../../../../../../utils/validate'
11
+ import { defineApiHandler } from '../../../../../../utils/response'
12
+ import { getWorkshopManager } from '../../../../../../plugins/workshop'
13
+ import { resolveUser } from '../../../../caller'
14
+ import { getAmlRuntime } from '../../../../../../services/workshop/aml/runtime'
15
+ import { promoteExperience } from '../../../../../../services/workshop/experience/promote'
16
+
17
+ const schema = z.object({ to: z.enum(['validated', 'retired']) })
18
+
19
+ export default defineApiHandler(async (event) => {
20
+ const channelId = getRouterParam(event, 'id')!
21
+ const memoryId = getRouterParam(event, 'memoryId')!
22
+ const user = resolveUser(event)
23
+ const manager = getWorkshopManager()
24
+ const ch = manager.getChannelForUser(channelId, user.id)
25
+ manager.requireOwned(ch.ownerUserId, user.id, 'channel')
26
+ const body = await readValidatedBody(event, zValidator(schema))
27
+ return promoteExperience(getAmlRuntime().db, {
28
+ memoryId,
29
+ channelId,
30
+ to: body.to,
31
+ actor: user.id,
32
+ })
33
+ })
@@ -0,0 +1,19 @@
1
+ /**
2
+ * GET /api/workshop/channels/:id/memories/experience-stats —— RSI 经验看板(WP-A5,只读)。
3
+ *
4
+ * 返回本 channel 经验条目的生命周期/作用域/极性分布 + 最近 20 条摘要。
5
+ * 鉴权:频道 owner/admin(与 /memories 面同口径)。
6
+ */
7
+ import { getRouterParam } from 'h3'
8
+ import { resolveUser } from '../../../caller'
9
+ import { defineApiHandler } from '../../../../../utils/response'
10
+ import { getWorkshopManager } from '../../../../../plugins/workshop'
11
+
12
+ export default defineApiHandler(async (event) => {
13
+ const channelId = getRouterParam(event, 'id')!
14
+ const user = resolveUser(event)
15
+ const manager = getWorkshopManager()
16
+ const ch = manager.getChannelForUser(channelId, user.id)
17
+ manager.requireOwned(ch.ownerUserId, user.id, 'channel')
18
+ return manager.experienceOverview(channelId)
19
+ })
@@ -0,0 +1,23 @@
1
+ /**
2
+ * GET /api/workshop/channels/:id/verifications —— 独立回读验证看板(WP-C1,只读)。
3
+ * 返回本频道写入台账的独立验证结论(match/mismatch/inconclusive)。
4
+ * 注意:inconclusive 不等于通过;L1/门须按"未证实"处理。
5
+ */
6
+ import { getRouterParam } from 'h3'
7
+ import { resolveUser } from '../../../caller'
8
+ import { defineApiHandler } from '../../../../../utils/response'
9
+ import { getWorkshopManager } from '../../../../../plugins/workshop'
10
+ import { getAmlRuntime } from '../../../../../services/workshop/aml/runtime'
11
+ import { listBlindVerifications } from '../../../../../services/workshop/verify/blind-verifier'
12
+
13
+ export default defineApiHandler(async (event) => {
14
+ const channelId = getRouterParam(event, 'id')!
15
+ const user = resolveUser(event)
16
+ const manager = getWorkshopManager()
17
+ const ch = manager.getChannelForUser(channelId, user.id)
18
+ manager.requireOwned(ch.ownerUserId, user.id, 'channel')
19
+ const rows = listBlindVerifications(getAmlRuntime().db, channelId)
20
+ const byVerdict: Record<string, number> = {}
21
+ for (const r of rows) byVerdict[r.verdict] = (byVerdict[r.verdict] ?? 0) + 1
22
+ return { total: rows.length, byVerdict, rows }
23
+ })
@@ -0,0 +1,25 @@
1
+ /**
2
+ * GET /api/workshop/daq/:id —— 单数采节点详情(主资源路径)。
3
+ *
4
+ * 对称性修复(2026-11-09):该路径此前只有 PATCH/DELETE 与 bind/ingest/samples/frames 等动作端点,
5
+ * 主资源路径可改不可读(读侧只能拉 /daq 列表)。只读:授权按产线 readonly
6
+ * (与 PATCH 的 operate 同源、低一档)。
7
+ */
8
+ import { getRouterParam } from 'h3'
9
+ import { defineApiHandler } from '@/server/utils/response'
10
+ import { resolveUser } from '@/server/api/workshop/caller'
11
+ import { AppError } from '@/server/utils/errors'
12
+ import { requireLineMode } from '@/server/services/workshop/permissions'
13
+ import { bindDaqHost } from '@/server/services/workshop/daq/host-bindings'
14
+ import { getDaqController } from '@/server/services/workshop/daq/daq-controller'
15
+ import { broadcastSceneEvent } from '@/server/services/workshop/scene-events'
16
+
17
+ export default defineApiHandler(async (event) => {
18
+ const user = resolveUser(event)
19
+ bindDaqHost(broadcastSceneEvent)
20
+ const id = getRouterParam(event, 'id') ?? ''
21
+ const node = getDaqController().byId(id)
22
+ if (!node) throw new AppError(404, 'NOT_FOUND', `数采节点不存在: ${id}`)
23
+ requireLineMode(user, node.lineId, 'readonly')
24
+ return { node }
25
+ })
@@ -5,30 +5,58 @@
5
5
  * bucket_ms?(自动抬升保证 桶数/节点 ≤2000) agg?(avg|min|max,缺省 avg)
6
6
  * run_id?/recipe_id?/product_id?(打标过滤) include_band?(1=min/max 包络)
7
7
  * 权限:节点/产线 readonly 及以上;并发 ≤2/用户;TTL 缓存按桶宽分档。
8
+ *
9
+ * 2026-11-09: query 形状收敛到 zod。此前 num() 手工转型把 Number('abc')=NaN 静默当作
10
+ * undefined —— 坏参数退化成"默认全窗查询";现在非法数值 400 精确到字段。
11
+ * 空串仍按「未提供」处理(前端表单清空会发空串),语义不变。
8
12
  */
9
- import { getQuery } from 'h3'
13
+ import { getValidatedQuery } from 'h3'
14
+ import { z } from 'zod'
10
15
  import { resolveUser } from '@/server/api/workshop/caller'
16
+ import { zValidator } from '@/server/utils/validate'
11
17
  import { defineApiHandler } from '@/server/utils/response'
12
18
  import { AppError } from '@/server/utils/errors'
13
19
  import { dataQuery, DataQueryError, activeRunHintOf } from '@/server/services/workshop/eda/data-query'
14
20
 
21
+ /** 数值型 query 参数:空串放行(未提供),其余必须可解析为有限数值 */
22
+ const numStr = z.string().optional().refine(
23
+ v => v === undefined || v.trim() === '' || Number.isFinite(Number(v)),
24
+ { message: '必须是数值' },
25
+ )
26
+
27
+ const schema = z.object({
28
+ line_id: z.string().optional(),
29
+ node_ids: z.string().optional(),
30
+ from: numStr,
31
+ to: numStr,
32
+ last_minutes: numStr,
33
+ bucket_ms: numStr,
34
+ agg: z.enum(['avg', 'min', 'max']).optional(),
35
+ run_id: z.string().optional(),
36
+ recipe_id: z.string().optional(),
37
+ product_id: z.string().optional(),
38
+ include_band: z.string().optional(),
39
+ })
40
+
41
+ const numOf = (v: string | undefined): number | undefined => (v === undefined || v.trim() === '' ? undefined : Number(v))
42
+ const strOf = (v: string | undefined): string | undefined => (v === undefined || v.trim() === '' ? undefined : v)
43
+
15
44
  export default defineApiHandler(async (event) => {
16
45
  const user = resolveUser(event)
17
- const q = getQuery(event)
18
- const num = (k: string): number | undefined => (q[k] != null && String(q[k]).trim() !== '' && !Number.isNaN(Number(q[k])) ? Number(q[k]) : undefined)
46
+ const q = await getValidatedQuery(event, zValidator(schema))
19
47
  try {
20
48
  const result = await dataQuery(user, {
21
- lineId: q.line_id ? String(q.line_id) : undefined,
22
- nodeIds: q.node_ids ? String(q.node_ids).split(',').map(s => s.trim()).filter(Boolean) : undefined,
23
- fromMs: num('from'),
24
- toMs: num('to'),
25
- lastMinutes: num('last_minutes'),
26
- bucketMs: num('bucket_ms'),
27
- agg: q.agg === 'min' || q.agg === 'max' ? q.agg : 'avg',
28
- runId: q.run_id ? String(q.run_id) : undefined,
29
- recipeId: q.recipe_id ? String(q.recipe_id) : undefined,
30
- productId: q.product_id ? String(q.product_id) : undefined,
31
- includeBand: String(q.include_band ?? '') === '1',
49
+ lineId: strOf(q.line_id),
50
+ nodeIds: strOf(q.node_ids)?.split(',').map(s => s.trim()).filter(Boolean),
51
+ fromMs: numOf(q.from),
52
+ toMs: numOf(q.to),
53
+ lastMinutes: numOf(q.last_minutes),
54
+ bucketMs: numOf(q.bucket_ms),
55
+ agg: q.agg ?? 'avg',
56
+ runId: strOf(q.run_id),
57
+ recipeId: strOf(q.recipe_id),
58
+ productId: strOf(q.product_id),
59
+ includeBand: q.include_band === '1',
32
60
  })
33
61
  return { ...result, activeRun: activeRunHintOf(result.lineId) }
34
62
  }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * GET /api/workshop/dcw/:id —— 单控制节点详情(主资源路径)。
3
+ *
4
+ * 对称性修复(2026-11-09):该路径此前只有 PATCH/DELETE 与 bind/read/write/test 等动作端点,
5
+ * 主资源路径可改不可读(读侧只能拉 /dcw 列表)。只读:授权按 produce line 的 readonly
6
+ * (与 PATCH 的 operate 同源、低一档)。
7
+ */
8
+ import { getRouterParam } from 'h3'
9
+ import { defineApiHandler } from '@/server/utils/response'
10
+ import { resolveUser } from '@/server/api/workshop/caller'
11
+ import { AppError } from '@/server/utils/errors'
12
+ import { requireLineMode } from '@/server/services/workshop/permissions'
13
+ import { bindDcwBroadcast, getDcwController } from '@/server/services/workshop/dcw/dcw-controller'
14
+ import { broadcastSceneEvent } from '@/server/services/workshop/scene-events'
15
+
16
+ export default defineApiHandler(async (event) => {
17
+ const user = resolveUser(event)
18
+ bindDcwBroadcast(broadcastSceneEvent)
19
+ const id = getRouterParam(event, 'id') ?? ''
20
+ const node = getDcwController().byId(id)
21
+ if (!node) throw new AppError(404, 'NOT_FOUND', `控制节点不存在: ${id}`)
22
+ requireLineMode(user, node.lineId, 'readonly')
23
+ return { node }
24
+ })
@@ -0,0 +1,27 @@
1
+ /**
2
+ * GET /api/workshop/dcw/lines/:id —— 单产线详情(主资源路径)。
3
+ *
4
+ * 对称性修复(2026-11-09,计划 WP5②):该路径此前只有 PATCH/DELETE 与 start/stop 动作端点,
5
+ * 主资源路径可改不可读 —— 读侧只能拉 /dcw/lines 全量列表再前端筛。
6
+ * 授权与列表同源:产线级读授权(visibleLineIds;admin/editor 全量,普通用户仅授权产线)。
7
+ */
8
+ import { getRouterParam } from 'h3'
9
+ import { defineApiHandler } from '@/server/utils/response'
10
+ import { resolveUser } from '@/server/api/workshop/caller'
11
+ import { AppError } from '@/server/utils/errors'
12
+ import { visibleLineIds } from '@/server/services/workshop/permissions'
13
+ import { bindDcwBroadcast, getDcwController } from '@/server/services/workshop/dcw/dcw-controller'
14
+ import { broadcastSceneEvent } from '@/server/services/workshop/scene-events'
15
+
16
+ export default defineApiHandler(async (event) => {
17
+ const user = resolveUser(event)
18
+ bindDcwBroadcast(broadcastSceneEvent)
19
+ const id = getRouterParam(event, 'id') ?? ''
20
+ const ctrl = getDcwController()
21
+ const line = ctrl.listLines().find(l => l.id === id)
22
+ if (!line) throw new AppError(404, 'NOT_FOUND', `产线不存在: ${id}`)
23
+ const visible = visibleLineIds(user)
24
+ // 不可见与不存在同码(不泄露未授权产线的存在性)
25
+ if (visible && !visible.has(id)) throw new AppError(404, 'NOT_FOUND', `产线不存在: ${id}`)
26
+ return { line, state: ctrl.allLineStates().find(s => s.lineId === id) ?? null }
27
+ })
@@ -3,19 +3,28 @@
3
3
  * body: { value: number }(工程量纲)。限界联锁(参数基准 ∩ 产品 ∩ 配方 ∩ 节点安全量程)
4
4
  * 在 DcwController.write 咽喉点统一生效,越界 400 并点名约束层。
5
5
  */
6
- import { getRouterParam, readBody } from 'h3'
6
+ import { getRouterParam, readValidatedBody } from 'h3'
7
+ import { z } from 'zod'
7
8
  import { resolveUser } from '@/server/api/workshop/caller'
8
9
  import { requireLineMode } from '@/server/services/workshop/permissions'
10
+ import { zValidator } from '@/server/utils/validate'
9
11
  import { defineApiHandler } from '@/server/utils/response'
10
12
  import { bindDcwBroadcast, getDcwController } from '@/server/services/workshop/dcw/dcw-controller'
11
13
  import { broadcastSceneEvent } from '@/server/services/workshop/scene-events'
12
14
 
15
+ // 物理设备写面:value 必须是有限数值。coerce 保留既有宽松输入(前端表单字符串 "12.5"),
16
+ // 但拒绝 NaN/Infinity/对象/数组 —— 这些过去会带着 NaN 抵达控制器,violating 契约前移到入口。
17
+ const schema = z.object({
18
+ value: z.coerce.number({ invalid_type_error: 'value 必须是数值(工程量纲)' })
19
+ .finite('value 必须是有限数值'),
20
+ })
21
+
13
22
  export default defineApiHandler(async (event) => {
14
23
  const user = resolveUser(event)
15
24
  bindDcwBroadcast(broadcastSceneEvent)
16
25
  const id = getRouterParam(event, 'id') ?? ''
17
- const body = await readBody<{ value?: number }>(event) ?? {}
26
+ const { value } = await readValidatedBody(event, zValidator(schema))
18
27
  requireLineMode(user, getDcwController().paramById(id).lineId, 'operate')
19
- const outcome = await getDcwController().writeParam(id, Number(body.value), { source: 'manual', actor: user.id, actorName: user.name })
28
+ const outcome = await getDcwController().writeParam(id, value, { source: 'manual', actor: user.id, actorName: user.name })
20
29
  return { outcome }
21
30
  })
@@ -4,20 +4,28 @@
4
4
  * - 等价于 MCP device.control 的用户面入口
5
5
  * - 返回 { twin }
6
6
  */
7
- import { getRouterParam, readBody } from 'h3'
7
+ import { getRouterParam, readValidatedBody } from 'h3'
8
+ import { z } from 'zod'
8
9
  import { resolveUser } from '@/server/api/workshop/caller'
9
10
  import { AppError } from '@/server/utils/errors'
11
+ import { zValidator } from '@/server/utils/validate'
10
12
  import { defineApiHandler } from '@/server/utils/response'
11
13
  import { getDeviceTwinRepo } from '@/server/services/workshop/assets/device-twin.repo'
12
14
  import { assertAssetManager } from '@/server/utils/asset-auth'
13
15
 
16
+ // 设备指令面:command 必填非空字符串(指令名),args 必须是对象(拒绝数组/标量 —— 过去会被
17
+ // 当作对象透传进 applyControl)。未知 command 的语义仍由 repo 判定(此处只守形状)。
18
+ const schema = z.object({
19
+ command: z.string().trim().min(1, 'command 必填').max(128, 'command 超过 128 字符上限'),
20
+ args: z.record(z.string(), z.unknown()).optional(),
21
+ })
22
+
14
23
  export default defineApiHandler(async (event) => {
15
24
  const user = resolveUser(event)
16
25
  assertAssetManager(user, '设备孪生操控')
17
26
  const id = getRouterParam(event, 'id')!
18
- const body = await readBody<{ command?: string, args?: Record<string, unknown> }>(event)
19
- if (!body?.command) throw new AppError(400, 'BAD_REQUEST', 'command 必填')
20
- const twin = getDeviceTwinRepo().applyControl(id, body.command, body.args ?? {})
27
+ const { command, args } = await readValidatedBody(event, zValidator(schema))
28
+ const twin = getDeviceTwinRepo().applyControl(id, command, args ?? {})
21
29
  if (!twin) throw new AppError(404, 'NOT_FOUND', `设备不存在: ${id}`)
22
30
  return { twin }
23
31
  })
@@ -22,37 +22,35 @@
22
22
  * 幂等:待办不在登记处且无持久化行 → 409 ALREADY_RESOLVED。
23
23
  * 鉴权:用户 token + Channel 成员/审批策略(hitl-decision.assertCanDecideHitlChannel)。
24
24
  */
25
- import { readBody } from 'h3'
25
+ import { readValidatedBody } from 'h3'
26
+ import { z } from 'zod'
26
27
  import { resolveUser } from '@/server/api/workshop/caller'
27
28
  import { defineApiHandler } from '@/server/utils/response'
28
- import { AppError } from '@/server/utils/errors'
29
+ import { zValidator } from '@/server/utils/validate'
29
30
  import { decideHitlRequest } from '@/server/services/workshop/agents/hitl-decision'
30
31
 
31
32
  const RESPONDABLE_KINDS = ['omp-dialog', 'dcw-approval', 'codex-approval', 'opencode-permission', 'dsh-permission', 'claude-permission', 'qwen-permission', 'hermes-permission'] as const
32
33
 
33
- interface RespondBody {
34
- kind?: string
35
- id?: string
36
- value?: string
37
- /** 结构化多问题答案(question 型;id 缺省按下标对齐) */
38
- answers?: Array<{ id?: string, answer: string }>
39
- confirmed?: boolean
40
- cancelled?: boolean
41
- /** 引擎原生选项(opencode permission:once|always|reject;未知枚举一律 400) */
42
- response?: string
43
- comment?: string
44
- /** 多方案裁决序号(dcw-approval 结构化审批单:批准时选定的包下标;缺省由 fail-closed 归一收敛为拒绝) */
45
- choice?: number
46
- }
34
+ // 入参形状契约:kind 必须命中可应答枚举,id 非空;其余字段只校验类型。
35
+ // 业务裁决(pending→resolving 原子抢占、fail-closed 归一)仍全部在 hitl-decision,
36
+ // 此处**不**放宽也不收紧任何裁决语义 —— 过去这些字段是裸 readBody 透传。
37
+ const respondSchema = z.object({
38
+ kind: z.enum(RESPONDABLE_KINDS),
39
+ id: z.string().trim().min(1, 'id 必填'),
40
+ value: z.string().optional(),
41
+ answers: z.array(z.object({ id: z.union([z.string(), z.number()]).optional(), answer: z.unknown() })).optional(),
42
+ confirmed: z.boolean().optional(),
43
+ cancelled: z.boolean().optional(),
44
+ response: z.string().optional(),
45
+ comment: z.string().optional(),
46
+ choice: z.number().int().optional(),
47
+ })
47
48
 
48
49
  export default defineApiHandler(async (event) => {
49
50
  const user = resolveUser(event)
50
- const body = await readBody<RespondBody>(event) ?? {}
51
+ const body = await readValidatedBody(event, zValidator(respondSchema))
51
52
  const kind = body.kind
52
- const id = String(body.id ?? '')
53
- if (!kind || !(RESPONDABLE_KINDS as readonly string[]).includes(kind) || !id) {
54
- throw new AppError(400, 'BAD_REQUEST', `body 需要 { kind: ${RESPONDABLE_KINDS.join('|')}, id, value?/answers?/confirmed?/cancelled?/response?/comment? }`)
55
- }
53
+ const id = body.id
56
54
 
57
55
  // 结构化答案归一(id 缺省留空,由决策服务按下标对齐问题)
58
56
  const answers = Array.isArray(body.answers)
@@ -2,20 +2,25 @@
2
2
  * PUT /api/workshop/mes/secrets —— 写入/轮换 MES 运行时凭据(仅 admin)。
3
3
  * body: { ref: string, value: string };value 永不回显、不入日志/审计 detail。
4
4
  */
5
- import { readBody } from 'h3'
5
+ import { readValidatedBody } from 'h3'
6
+ import { z } from 'zod'
6
7
  import { requireRole } from '@/server/api/workshop/caller'
8
+ import { zValidator } from '@/server/utils/validate'
7
9
  import { defineApiHandler } from '@/server/utils/response'
8
10
  import { AppError } from '@/server/utils/errors'
9
11
  import { getMesSecretsRepo } from '@/server/services/workshop/mes/mes-secrets.repo'
10
12
  import { recordOps } from '@/server/services/workshop/ops/ops'
11
13
 
14
+ // 凭据面:ref/value 均为非空字符串,不做隐式类型转换(数字/数组/对象一律 400)。
15
+ // 上限:ref 200 字符(引用名),value 64KB(密文;超限通常意味着误传大对象)。
16
+ const schema = z.object({
17
+ ref: z.string().trim().min(1, '缺少凭据引用名 ref').max(200, 'ref 超过 200 字符上限'),
18
+ value: z.string().min(1, '凭据值不能为空').max(65_536, 'value 超过 64KB 上限'),
19
+ }).refine(v => v.value.trim() !== '', { message: '凭据值不能为空', path: ['value'] })
20
+
12
21
  export default defineApiHandler(async (event) => {
13
22
  const user = requireRole(event, ['admin'])
14
- const body = await readBody(event).catch(() => null) as { ref?: unknown, value?: unknown } | null
15
- const ref = String(body?.ref ?? '').trim()
16
- const value = String(body?.value ?? '')
17
- if (!ref) throw new AppError(400, 'BAD_REQUEST', '缺少凭据引用名 ref')
18
- if (value.trim() === '') throw new AppError(400, 'BAD_REQUEST', '凭据值不能为空')
23
+ const { ref, value } = await readValidatedBody(event, zValidator(schema))
19
24
  let entry: { updatedAt: string, updatedBy: string }
20
25
  try {
21
26
  entry = getMesSecretsRepo().setSecret(ref, value, user.id)
@@ -3,26 +3,37 @@
3
3
  * body: { userId, grants: [{ lineId, mode: 'readonly' | 'operate' | null }] }(null = 撤销)
4
4
  * 写后广播 permissions.changed(scene-events)与 permissions:changed(插件钩子)。
5
5
  */
6
- import { readBody } from 'h3'
6
+ import { readValidatedBody } from 'h3'
7
+ import { z } from 'zod'
7
8
  import { resolveUser, requireAdmin } from '@/server/api/workshop/caller'
9
+ import { zValidator } from '@/server/utils/validate'
8
10
  import { defineApiHandler } from '@/server/utils/response'
9
11
  import { userRepository } from '@/server/repositories/user.repository'
10
12
  import { AppError, ErrorCodes } from '@/server/utils/errors'
11
13
  import { notifyGrantsChanged } from '@/server/services/workshop/permissions'
12
14
 
15
+ // mode 是权限模型 v3 的封闭枚举(readonly/operate/撤销=null)。
16
+ // 过去 mode 被 as string 透传进 setGrant,任意字符串都会落库 —— 形状收紧到契约本身;
17
+ // lineId 为空的行保持既有语义(跳过),故这里不强制 min(1)。
18
+ const schema = z.object({
19
+ userId: z.string().trim().min(1, 'userId 必填'),
20
+ grants: z.array(z.object({
21
+ lineId: z.string().optional(),
22
+ mode: z.enum(['readonly', 'operate']).nullable().optional(),
23
+ })).optional(),
24
+ })
25
+
13
26
  export default defineApiHandler(async (event) => {
14
27
  const admin = resolveUser(event)
15
28
  requireAdmin(event)
16
- const body = await readBody<{ userId?: string, grants?: Array<{ lineId?: string, mode?: string | null }> }>(event) ?? {}
17
- const userId = String(body.userId ?? '')
18
- if (!userId || !userRepository.findById(userId)) {
19
- throw new AppError(404, ErrorCodes.NOT_FOUND, `用户不存在: ${userId || '?'}`)
29
+ const { userId, grants } = await readValidatedBody(event, zValidator(schema))
30
+ if (!userRepository.findById(userId)) {
31
+ throw new AppError(404, ErrorCodes.NOT_FOUND, `用户不存在: ${userId}`)
20
32
  }
21
- const grants = Array.isArray(body.grants) ? body.grants : []
22
- for (const g of grants) {
23
- const lineId = String(g?.lineId ?? '')
33
+ for (const g of grants ?? []) {
34
+ const lineId = String(g.lineId ?? '').trim()
24
35
  if (!lineId) continue
25
- userRepository.setGrant(userId, lineId, (g?.mode ?? null) as string | null, admin.id)
36
+ userRepository.setGrant(userId, lineId, g.mode ?? null, admin.id)
26
37
  }
27
38
  notifyGrantsChanged(userId)
28
39
  return { userId, grants: userRepository.listGrants(userId) }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * GET /api/workshop/projects/:id/deliverables/:did —— 单交付物(主资源路径)。
3
+ *
4
+ * 对称性修复(2026-11-08 审查):该路径此前只有 patch 与 waive,主资源路径
5
+ * 可改不可读(读侧只能拉全量列表)。
6
+ */
7
+ import { getRouterParam } from 'h3'
8
+ import { defineApiHandler } from '../../../../../../utils/response'
9
+ import { resolveUser } from '../../../../caller'
10
+ import { getProjectService } from '../../../../../../services/workshop/projects/service'
11
+
12
+ export default defineApiHandler(async (event) => {
13
+ const user = resolveUser(event)
14
+ return getProjectService().getDeliverable(
15
+ getRouterParam(event, 'id')!,
16
+ getRouterParam(event, 'did')!,
17
+ user,
18
+ )
19
+ })