agentworkshop 0.7.49 → 0.7.51

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 (887) hide show
  1. package/.AgentWorkShop/prompts/host-tools.json +409 -6
  2. package/.output/.AgentWorkShop/aml-python/__pycache__/aml_eval.cpython-312.pyc +0 -0
  3. package/.output/.AgentWorkShop/aml-python/__pycache__/amlkit.cpython-312.pyc +0 -0
  4. package/.output/.AgentWorkShop/aml-python/__pycache__/train-example.cpython-312.pyc +0 -0
  5. package/.output/.AgentWorkShop/aml-python/__pycache__/train-hybrid-example.cpython-312.pyc +0 -0
  6. package/.output/.AgentWorkShop/aml-python/aml_eval.py +39 -6
  7. package/.output/.AgentWorkShop/aml-python/amlkit.py +222 -3
  8. package/.output/.AgentWorkShop/aml-python/train-hybrid-example.py +278 -32
  9. package/.output/.AgentWorkShop/prompts/host-tools.json +409 -6
  10. package/.output/.AgentWorkShop/schema.json +135 -133
  11. package/.output/nitro.json +1 -1
  12. package/.output/public/_nuxt/2_DkYoqD2.js +1 -0
  13. package/.output/public/_nuxt/8FXd9As6.js +1 -0
  14. package/.output/public/_nuxt/{d-w5jR8R.js → B3zB6K6m.js} +1 -1
  15. package/.output/public/_nuxt/{OXtV_ukR.js → B4ujjkUI.js} +1 -1
  16. package/.output/public/_nuxt/B9BmiUil.js +2 -0
  17. package/.output/public/_nuxt/B9QzrmgE.js +1 -0
  18. package/.output/public/_nuxt/BE7BrEw6.js +1 -0
  19. package/.output/public/_nuxt/{Cu8c3oMN2.js → BFZIll912.js} +1 -1
  20. package/.output/public/_nuxt/{ChtjzEpK2.js → BGAaKBeo2.js} +1 -1
  21. package/.output/public/_nuxt/BOmDHp5L.js +14 -0
  22. package/.output/public/_nuxt/BPou3U7b.js +1 -0
  23. package/.output/public/_nuxt/{CiTQY_n32.js → BXx9AxdF2.js} +1 -1
  24. package/.output/public/_nuxt/Bfe2qOYs.js +1 -0
  25. package/.output/public/_nuxt/BgEDwFMf.js +1 -0
  26. package/.output/public/_nuxt/BgnhB8r5.js +1 -0
  27. package/.output/public/_nuxt/Bhe953zV2.js +1 -0
  28. package/.output/public/_nuxt/{BITZvQBK.js → Bpkm4W5P.js} +1 -1
  29. package/.output/public/_nuxt/C4lagVdN2.js +1 -0
  30. package/.output/public/_nuxt/C5cf3T4d.js +1 -0
  31. package/.output/public/_nuxt/CBIoheY42.js +1 -0
  32. package/.output/public/_nuxt/{CN1CDAwe.js → CFQSjB1h.js} +1 -1
  33. package/.output/public/_nuxt/CFQyYMEn2.js +1 -0
  34. package/.output/public/_nuxt/CHrErv1E.js +1 -0
  35. package/.output/public/_nuxt/{fxWyOzyp2.js → CI2yXRr42.js} +1 -1
  36. package/.output/public/_nuxt/CIduggmC.js +1 -0
  37. package/.output/public/_nuxt/CU-mhG0-.js +1 -0
  38. package/.output/public/_nuxt/CXzfXC5M.js +1 -0
  39. package/.output/public/_nuxt/{H6pPjo0l.js → C_sjV3Ee.js} +1 -1
  40. package/.output/public/_nuxt/Ccps4cxo.js +1 -0
  41. package/.output/public/_nuxt/{CPmNRTBk2.js → CdIsmU5a2.js} +10 -10
  42. package/.output/public/_nuxt/{BS9P_Ies2.js → ChGuLxwW2.js} +1 -1
  43. package/.output/public/_nuxt/{Ck5oMvUk.js → Cn6ihm8j.js} +1 -1
  44. package/.output/public/_nuxt/{CWzp2R6G.js → D-Xyb3DA.js} +1 -1
  45. package/.output/public/_nuxt/D0SNhlnt.js +1 -0
  46. package/.output/public/_nuxt/D0ldVwl-.js +1 -0
  47. package/.output/public/_nuxt/DClNt1uS.js +1 -0
  48. package/.output/public/_nuxt/{CTVfcnjU.js → DQMbdg4t.js} +2 -2
  49. package/.output/public/_nuxt/{DHSDk8Bq2.js → DTxfFIvL2.js} +1 -1
  50. package/.output/public/_nuxt/DVKXGuMz2.js +1 -0
  51. package/.output/public/_nuxt/{CLySL7mW.js → Da0h_6VA.js} +1 -1
  52. package/.output/public/_nuxt/{PixDfCSm.js → DefDtlKK.js} +1 -1
  53. package/.output/public/_nuxt/DjefmmJu.js +1 -0
  54. package/.output/public/_nuxt/DnH9SRMW2.js +1 -0
  55. package/.output/public/_nuxt/{BmiMC_BC.js → DppqsiPC.js} +1 -1
  56. package/.output/public/_nuxt/Drq9iy6V.js +1 -0
  57. package/.output/public/_nuxt/DsGf2IV82.js +1 -0
  58. package/.output/public/_nuxt/{DoKpLEqc.js → DzfVS8N72.js} +1 -1
  59. package/.output/public/_nuxt/{DRpFsrno.js → I1cI6sPJ2.js} +1 -1
  60. package/.output/public/_nuxt/IU-UGkCJ2.js +1 -0
  61. package/.output/public/_nuxt/KXjvpIk2.js +1 -0
  62. package/.output/public/_nuxt/NJn94js_.js +1 -0
  63. package/.output/public/_nuxt/ON2x-t6n.js +1 -0
  64. package/.output/public/_nuxt/S799kNo8.js +1 -0
  65. package/.output/public/_nuxt/{uI9Ki_XZ.js → S9rLP7_v.js} +1 -1
  66. package/.output/public/_nuxt/UN3nSFjj2.js +1 -0
  67. package/.output/public/_nuxt/WVTVkqef.js +1 -0
  68. package/.output/public/_nuxt/{C_VAXV7I2.js → Yv9YItEX2.js} +1 -1
  69. package/.output/public/_nuxt/_id_.DamiFT0Q.css +1 -0
  70. package/.output/public/_nuxt/{_id_.BTrFUIHX.css → _id_.DpRe1PRh.css} +1 -1
  71. package/.output/public/_nuxt/_wsId_.DkrQkT6r.css +1 -0
  72. package/.output/public/_nuxt/aml.-czpKIs8.css +1 -0
  73. package/.output/public/_nuxt/asmJ99nX2.js +47 -0
  74. package/.output/public/_nuxt/builds/latest.json +1 -1
  75. package/.output/public/_nuxt/builds/meta/912eb5bb-670e-4cc8-b21d-7fc097723466.json +1 -0
  76. package/.output/public/_nuxt/{default.uao9U50c.css → default.CXb_zoN6.css} +1 -1
  77. package/.output/public/_nuxt/{entry.6DEjPWvR.css → entry.JdEG3KJg.css} +1 -1
  78. package/.output/public/_nuxt/jRTz0hjN2.js +1 -0
  79. package/.output/public/_nuxt/{DLPuRMeG.js → k5K6Jj6g.js} +1 -1
  80. package/.output/public/_nuxt/operations.B8X9uWK6.css +1 -0
  81. package/.output/public/_nuxt/{settings.Bo5EYkLI.css → settings.O26Dw1iT.css} +1 -1
  82. package/.output/public/_nuxt/{BACBBVdw.js → tKxYgsf-.js} +1 -1
  83. package/.output/public/_nuxt/{Cm_PTn9t2.js → vXrNItas2.js} +1 -1
  84. package/.output/public/_nuxt/{Cr518Gh02.js → zsRclU9w2.js} +1 -1
  85. package/.output/server/chunks/_/LeftOutlined.mjs +1 -1
  86. package/.output/server/chunks/_/SearchOutlined.mjs +1 -1
  87. package/.output/server/chunks/_/binding-authz.mjs +1 -1
  88. package/.output/server/chunks/_/character-asset.repo.mjs +1 -1
  89. package/.output/server/chunks/_/entity.mjs +1 -1
  90. package/.output/server/chunks/_/host-bindings.mjs +1 -1
  91. package/.output/server/chunks/_/nitro.mjs +26245 -21135
  92. package/.output/server/chunks/_/nitro.mjs.map +1 -1
  93. package/.output/server/chunks/_/scene-layout.repo.mjs +1 -1
  94. package/.output/server/chunks/build/Checkbox-4EdGAAl_.mjs +1 -1
  95. package/.output/server/chunks/build/FormItemContext-4ORSzhWv.mjs +1 -1
  96. package/.output/server/chunks/build/{OmpTerminalPanel-EQHrOJbw.mjs → OmpTerminalPanel-mk31gVzA.mjs} +3 -3
  97. package/.output/server/chunks/build/{OmpTerminalPanel-EQHrOJbw.mjs.map → OmpTerminalPanel-mk31gVzA.mjs.map} +1 -1
  98. package/.output/server/chunks/build/{PluginSlot-BP_qedpQ.mjs → PluginSlot-D2WUZgbp.mjs} +2 -2
  99. package/.output/server/chunks/build/{PluginSlot-BP_qedpQ.mjs.map → PluginSlot-D2WUZgbp.mjs.map} +1 -1
  100. package/.output/server/chunks/build/{TownView-BAR8CPIZ.mjs → TownView-fP9BiALv.mjs} +6 -6
  101. package/.output/server/chunks/build/{TownView-BAR8CPIZ.mjs.map → TownView-fP9BiALv.mjs.map} +1 -1
  102. package/.output/server/chunks/build/{_id_-DgMpjM3_.mjs → _id_-BUpQSlzo.mjs} +142 -106
  103. package/.output/server/chunks/build/_id_-BUpQSlzo.mjs.map +1 -0
  104. package/.output/server/chunks/build/{_id_-Dv3BQbYV.mjs → _id_-CDlur81q.mjs} +25 -24
  105. package/.output/server/chunks/build/_id_-CDlur81q.mjs.map +1 -0
  106. package/.output/server/chunks/build/{_wsId_-BKJvFmyf.mjs → _wsId_-DPy2BXRd.mjs} +547 -158
  107. package/.output/server/chunks/build/_wsId_-DPy2BXRd.mjs.map +1 -0
  108. package/.output/server/chunks/build/{agents-B2GLPmn2.mjs → agents-CDLcboCv.mjs} +12 -12
  109. package/.output/server/chunks/build/{agents-B2GLPmn2.mjs.map → agents-CDLcboCv.mjs.map} +1 -1
  110. package/.output/server/chunks/build/{aml-DdWicH3t.mjs → aml-DsgtDLWF.mjs} +28 -27
  111. package/.output/server/chunks/build/aml-DsgtDLWF.mjs.map +1 -0
  112. package/.output/server/chunks/build/api-BY6ji7RC.mjs +6 -6
  113. package/.output/server/chunks/build/card-CUSocE9p.mjs +1 -1
  114. package/.output/server/chunks/build/{channel-templates-RPOtkgRf.mjs → channel-templates-DjEsj0_v.mjs} +8 -8
  115. package/.output/server/chunks/build/{channel-templates-RPOtkgRf.mjs.map → channel-templates-DjEsj0_v.mjs.map} +1 -1
  116. package/.output/server/chunks/build/checkbox-C4AKj81e.mjs +1 -1
  117. package/.output/server/chunks/build/constants-HPHJvjne.mjs +6 -6
  118. package/.output/server/chunks/build/{daq-CPtsh0e7.mjs → daq-N69AOtgw.mjs} +12 -11
  119. package/.output/server/chunks/build/daq-N69AOtgw.mjs.map +1 -0
  120. package/.output/server/chunks/build/{dcw-ry5Gyw6Y.mjs → dcw-CN9d3Rs7.mjs} +10 -10
  121. package/.output/server/chunks/build/{dcw-ry5Gyw6Y.mjs.map → dcw-CN9d3Rs7.mjs.map} +1 -1
  122. package/.output/server/chunks/build/{default-DxOE1eB0.mjs → default-DCf9tn1i.mjs} +38 -30
  123. package/.output/server/chunks/build/{default-DxOE1eB0.mjs.map → default-DCf9tn1i.mjs.map} +1 -1
  124. package/.output/server/chunks/build/descriptions-CFaUq4y4.mjs +1 -1
  125. package/.output/server/chunks/build/drawer-Cfh9_zft.mjs +1 -1
  126. package/.output/server/chunks/build/dropdown-KdKWCS5K.mjs +1 -1
  127. package/.output/server/chunks/build/form-uSlNqIAV.mjs +1 -1
  128. package/.output/server/chunks/build/input-Cr_KFj4T.mjs +1 -1
  129. package/.output/server/chunks/build/input-number-BRVnxeiA.mjs +1 -1
  130. package/.output/server/chunks/build/{logs-CeaiO3y9.mjs → logs-BcAjU1Ps.mjs} +12 -11
  131. package/.output/server/chunks/build/logs-BcAjU1Ps.mjs.map +1 -0
  132. package/.output/server/chunks/build/menu-BgkRSSx7.mjs +1 -1
  133. package/.output/server/chunks/build/{monitor-DnuXEIi5.mjs → monitor-DX_K0WMq.mjs} +13 -13
  134. package/.output/server/chunks/build/{monitor-DnuXEIi5.mjs.map → monitor-DX_K0WMq.mjs.map} +1 -1
  135. package/.output/server/chunks/build/operations-OFHYXwh4.mjs +282 -0
  136. package/.output/server/chunks/build/operations-OFHYXwh4.mjs.map +1 -0
  137. package/.output/server/chunks/build/{pages-Bn90ijKD.mjs → pages-rZKH72eC.mjs} +10 -11
  138. package/.output/server/chunks/build/pages-rZKH72eC.mjs.map +1 -0
  139. package/.output/server/chunks/build/{permissions-DL70W1YD.mjs → permissions-BvmodvsO.mjs} +8 -8
  140. package/.output/server/chunks/build/{permissions-DL70W1YD.mjs.map → permissions-BvmodvsO.mjs.map} +1 -1
  141. package/.output/server/chunks/build/{plugins-DrsZo--K.mjs → plugins-DSka7-vS.mjs} +9 -9
  142. package/.output/server/chunks/build/{plugins-DrsZo--K.mjs.map → plugins-DSka7-vS.mjs.map} +1 -1
  143. package/.output/server/chunks/build/popconfirm-Ox-_2V8A.mjs +1 -1
  144. package/.output/server/chunks/build/{schedules-VLzNcjnW.mjs → schedules-lo4bfgVt.mjs} +8 -8
  145. package/.output/server/chunks/build/{schedules-VLzNcjnW.mjs.map → schedules-lo4bfgVt.mjs.map} +1 -1
  146. package/.output/server/chunks/build/segmented-C61yLHvo.mjs +1 -1
  147. package/.output/server/chunks/build/select-rdBWytVK.mjs +1 -1
  148. package/.output/server/chunks/build/{settings-DVAUVMsX.mjs → settings-CAJWvul5.mjs} +32 -13
  149. package/.output/server/chunks/build/settings-CAJWvul5.mjs.map +1 -0
  150. package/.output/server/chunks/build/space-B2uhHJG8.mjs +1 -1
  151. package/.output/server/chunks/build/spin-C2cuvGth.mjs +1 -1
  152. package/.output/server/chunks/build/switch-DZAUIbIN.mjs +1 -1
  153. package/.output/server/chunks/build/table-DOFAvY-v.mjs +1 -1
  154. package/.output/server/chunks/build/tabs-DTeIuZeP.mjs +1 -1
  155. package/.output/server/chunks/build/tag-CHLGvNM6.mjs +1 -1
  156. package/.output/server/chunks/build/{teams-Mc07PYO8.mjs → teams-DBBvIToa.mjs} +14 -14
  157. package/.output/server/chunks/build/{teams-Mc07PYO8.mjs.map → teams-DBBvIToa.mjs.map} +1 -1
  158. package/.output/server/chunks/build/{tokens-DiwD5qni.mjs → tokens-CloWk4x_.mjs} +12 -12
  159. package/.output/server/chunks/build/{tokens-DiwD5qni.mjs.map → tokens-CloWk4x_.mjs.map} +1 -1
  160. package/.output/server/chunks/build/{town-D8VmTCmN.mjs → town-BMlctE4m.mjs} +12 -12
  161. package/.output/server/chunks/build/{town-D8VmTCmN.mjs.map → town-BMlctE4m.mjs.map} +1 -1
  162. package/.output/server/chunks/build/types-D6J7slEa.mjs +1 -1
  163. package/.output/server/chunks/build/{useAgentHarnessOptions-CPn5dzKe.mjs → useAgentHarnessOptions-D6SJ_uUr.mjs} +7 -7
  164. package/.output/server/chunks/build/{useAgentHarnessOptions-CPn5dzKe.mjs.map → useAgentHarnessOptions-D6SJ_uUr.mjs.map} +1 -1
  165. package/.output/server/chunks/build/{useAgentTemplateActions-DQWzVnZ0.mjs → useAgentTemplateActions-CdG4g_PF.mjs} +7 -7
  166. package/.output/server/chunks/build/{useAgentTemplateActions-DQWzVnZ0.mjs.map → useAgentTemplateActions-CdG4g_PF.mjs.map} +1 -1
  167. package/.output/server/chunks/build/useAgentTemplateDialogState-CZzpu5og.mjs +6 -6
  168. package/.output/server/chunks/build/{useAgentTemplateForm-vqyiRPtt.mjs → useAgentTemplateForm-a5y-N5sB.mjs} +7 -7
  169. package/.output/server/chunks/build/{useAgentTemplateForm-vqyiRPtt.mjs.map → useAgentTemplateForm-a5y-N5sB.mjs.map} +1 -1
  170. package/.output/server/chunks/build/{useAgentTemplatesCatalog-DcQbsOik.mjs → useAgentTemplatesCatalog-pBVcUuN3.mjs} +7 -7
  171. package/.output/server/chunks/build/{useAgentTemplatesCatalog-DcQbsOik.mjs.map → useAgentTemplatesCatalog-pBVcUuN3.mjs.map} +1 -1
  172. package/.output/server/chunks/build/useAmlDatasets-BM0lZu40.mjs +6 -6
  173. package/.output/server/chunks/build/{useAmlEntities-BjXWvFd_.mjs → useAmlEntities-BDQ8TmLL.mjs} +7 -7
  174. package/.output/server/chunks/build/{useAmlEntities-BjXWvFd_.mjs.map → useAmlEntities-BDQ8TmLL.mjs.map} +1 -1
  175. package/.output/server/chunks/build/{useAmlEnv-BB7p6x_w.mjs → useAmlEnv-DgTVwpqi.mjs} +7 -7
  176. package/.output/server/chunks/build/{useAmlEnv-BB7p6x_w.mjs.map → useAmlEnv-DgTVwpqi.mjs.map} +1 -1
  177. package/.output/server/chunks/build/useAmlExperiments-BtyW32PO.mjs +6 -6
  178. package/.output/server/chunks/build/{useAmlFormat-WrKuRfw2.mjs → useAmlFormat-C2sl3MGB.mjs} +7 -7
  179. package/.output/server/chunks/build/{useAmlFormat-WrKuRfw2.mjs.map → useAmlFormat-C2sl3MGB.mjs.map} +1 -1
  180. package/.output/server/chunks/build/{useAmlJobs-DBuLvWMF.mjs → useAmlJobs-fk-H5Rp5.mjs} +10 -9
  181. package/.output/server/chunks/build/useAmlJobs-fk-H5Rp5.mjs.map +1 -0
  182. package/.output/server/chunks/build/{useAmlModels-VurmkBYe.mjs → useAmlModels-hgyVHoAq.mjs} +7 -7
  183. package/.output/server/chunks/build/{useAmlModels-VurmkBYe.mjs.map → useAmlModels-hgyVHoAq.mjs.map} +1 -1
  184. package/.output/server/chunks/build/{useAmlNotes-BUdj3X6Y.mjs → useAmlNotes-BjbYNADm.mjs} +7 -7
  185. package/.output/server/chunks/build/{useAmlNotes-BUdj3X6Y.mjs.map → useAmlNotes-BjbYNADm.mjs.map} +1 -1
  186. package/.output/server/chunks/build/{useAmlPredict-DFy-Do10.mjs → useAmlPredict-U24-SZNA.mjs} +7 -7
  187. package/.output/server/chunks/build/{useAmlPredict-DFy-Do10.mjs.map → useAmlPredict-U24-SZNA.mjs.map} +1 -1
  188. package/.output/server/chunks/build/useDaqAddNode-kW7uTSMQ.mjs +7 -7
  189. package/.output/server/chunks/build/useDaqDetailBinding-cpBz4hSL.mjs +6 -6
  190. package/.output/server/chunks/build/useDaqDetailFrames-BZGtKKXW.mjs +6 -6
  191. package/.output/server/chunks/build/{useDaqDetailHistory-C4_hVeqZ.mjs → useDaqDetailHistory-DtSTfyMi.mjs} +7 -7
  192. package/.output/server/chunks/build/{useDaqDetailHistory-C4_hVeqZ.mjs.map → useDaqDetailHistory-DtSTfyMi.mjs.map} +1 -1
  193. package/.output/server/chunks/build/{useDaqDetailNode-Bwid_iA8.mjs → useDaqDetailNode-D_vhG0jF.mjs} +8 -8
  194. package/.output/server/chunks/build/{useDaqDetailNode-Bwid_iA8.mjs.map → useDaqDetailNode-D_vhG0jF.mjs.map} +1 -1
  195. package/.output/server/chunks/build/useDaqDetailParams-JfqHvTxr.mjs +7 -7
  196. package/.output/server/chunks/build/{useDaqFilters-C13836p-.mjs → useDaqFilters-BUQtZ82a.mjs} +8 -8
  197. package/.output/server/chunks/build/{useDaqFilters-C13836p-.mjs.map → useDaqFilters-BUQtZ82a.mjs.map} +1 -1
  198. package/.output/server/chunks/build/useDaqNodeWindow-1DWj2H5G.mjs +6 -6
  199. package/.output/server/chunks/build/useDaqOptimizations-Ct-TSXxy.mjs +6 -6
  200. package/.output/server/chunks/build/useDaqStream-wOxZcMDA.mjs +1 -1
  201. package/.output/server/chunks/build/useDaqTemplates-BqQRdrIm.mjs +7 -7
  202. package/.output/server/chunks/build/{useDashboardCharts-DZysNDUX.mjs → useDashboardCharts-D45083s_.mjs} +7 -7
  203. package/.output/server/chunks/build/{useDashboardCharts-DZysNDUX.mjs.map → useDashboardCharts-D45083s_.mjs.map} +1 -1
  204. package/.output/server/chunks/build/{useDashboardData-Ny_wtbo6.mjs → useDashboardData-Do_Vsepa.mjs} +8 -8
  205. package/.output/server/chunks/build/{useDashboardData-Ny_wtbo6.mjs.map → useDashboardData-Do_Vsepa.mjs.map} +1 -1
  206. package/.output/server/chunks/build/{useDcwAddNode-C8nE7geh.mjs → useDcwAddNode-C1HDP3yG.mjs} +12 -9
  207. package/.output/server/chunks/build/useDcwAddNode-C1HDP3yG.mjs.map +1 -0
  208. package/.output/server/chunks/build/useDcwCards-ETEsHvVy.mjs +6 -6
  209. package/.output/server/chunks/build/{useDcwDetailScope-BNrpDzbO.mjs → useDcwDetailScope-QTr1G6Oe.mjs} +7 -7
  210. package/.output/server/chunks/build/{useDcwDetailScope-BNrpDzbO.mjs.map → useDcwDetailScope-QTr1G6Oe.mjs.map} +1 -1
  211. package/.output/server/chunks/build/{useDcwDetailTemplates-IcKAJ37Y.mjs → useDcwDetailTemplates-Djt-0Vse.mjs} +7 -7
  212. package/.output/server/chunks/build/{useDcwDetailTemplates-IcKAJ37Y.mjs.map → useDcwDetailTemplates-Djt-0Vse.mjs.map} +1 -1
  213. package/.output/server/chunks/build/useDcwFilter-FfVlDdyS.mjs +6 -6
  214. package/.output/server/chunks/build/useDcwLedger-BLoMmcu1.mjs +6 -6
  215. package/.output/server/chunks/build/useDcwLineMutations-BMC5BTWU.mjs +6 -6
  216. package/.output/server/chunks/build/{useDcwLineRun-Bpxk4mse.mjs → useDcwLineRun-74gN_s6T.mjs} +7 -7
  217. package/.output/server/chunks/build/{useDcwLineRun-Bpxk4mse.mjs.map → useDcwLineRun-74gN_s6T.mjs.map} +1 -1
  218. package/.output/server/chunks/build/useDcwProducts-D-zrMaeV.mjs +6 -6
  219. package/.output/server/chunks/build/{useDcwQuery-1lYHOaU6.mjs → useDcwQuery-7tX4QYmv.mjs} +7 -7
  220. package/.output/server/chunks/build/{useDcwQuery-1lYHOaU6.mjs.map → useDcwQuery-7tX4QYmv.mjs.map} +1 -1
  221. package/.output/server/chunks/build/useDcwQuickActions-C-tgcXIr.mjs +6 -6
  222. package/.output/server/chunks/build/{useDcwRecipes-BzGOymqz.mjs → useDcwRecipes-FVk5gDLV.mjs} +23 -15
  223. package/.output/server/chunks/build/useDcwRecipes-FVk5gDLV.mjs.map +1 -0
  224. package/.output/server/chunks/build/useDcwStream-D04kCV3J.mjs +1 -1
  225. package/.output/server/chunks/build/{useDcwTemplates-Dsjw9u6U.mjs → useDcwTemplates-LDZffy4u.mjs} +7 -7
  226. package/.output/server/chunks/build/{useDcwTemplates-Dsjw9u6U.mjs.map → useDcwTemplates-LDZffy4u.mjs.map} +1 -1
  227. package/.output/server/chunks/build/{useDcwWrites-3RxwN36I.mjs → useDcwWrites-B22mwliK.mjs} +25 -8
  228. package/.output/server/chunks/build/useDcwWrites-B22mwliK.mjs.map +1 -0
  229. package/.output/server/chunks/build/useLocalTime-DZ2RAtVs.mjs +49 -0
  230. package/.output/server/chunks/build/useLocalTime-DZ2RAtVs.mjs.map +1 -0
  231. package/.output/server/chunks/build/{useLogsFormat-BlwLpyzy.mjs → useLogsFormat-B-o4MHy7.mjs} +7 -7
  232. package/.output/server/chunks/build/{useLogsFormat-BlwLpyzy.mjs.map → useLogsFormat-B-o4MHy7.mjs.map} +1 -1
  233. package/.output/server/chunks/build/{useLogsManual-Deev2Cjk.mjs → useLogsManual-COfCyUtj.mjs} +7 -7
  234. package/.output/server/chunks/build/{useLogsManual-Deev2Cjk.mjs.map → useLogsManual-COfCyUtj.mjs.map} +1 -1
  235. package/.output/server/chunks/build/useLogsQuery-CRAm2hmS.mjs +6 -6
  236. package/.output/server/chunks/build/useLogsScope-ClNijVj4.mjs +6 -6
  237. package/.output/server/chunks/build/{useMonitorColumns-ylxrUNTK.mjs → useMonitorColumns-DhYvkLDq.mjs} +7 -7
  238. package/.output/server/chunks/build/{useMonitorColumns-ylxrUNTK.mjs.map → useMonitorColumns-DhYvkLDq.mjs.map} +1 -1
  239. package/.output/server/chunks/build/{useMonitorData-CEpKXoD4.mjs → useMonitorData-guVjMDtR.mjs} +9 -8
  240. package/.output/server/chunks/build/useMonitorData-guVjMDtR.mjs.map +1 -0
  241. package/.output/server/chunks/build/{useMonitorFormat-_7zLapf3.mjs → useMonitorFormat-C7lhZe4g.mjs} +13 -12
  242. package/.output/server/chunks/build/useMonitorFormat-C7lhZe4g.mjs.map +1 -0
  243. package/.output/server/chunks/build/useMonitorTerminal-Dj4QwRNW.mjs +6 -6
  244. package/.output/server/chunks/build/useOperationsFeed-CeXeHqUK.mjs +191 -0
  245. package/.output/server/chunks/build/useOperationsFeed-CeXeHqUK.mjs.map +1 -0
  246. package/.output/server/chunks/build/{useTeamActions-D6sxdpkP.mjs → useTeamActions-C4n-taBk.mjs} +7 -7
  247. package/.output/server/chunks/build/{useTeamActions-D6sxdpkP.mjs.map → useTeamActions-C4n-taBk.mjs.map} +1 -1
  248. package/.output/server/chunks/build/{useTeamAddMemberDialog-Q-ntQ6Vo.mjs → useTeamAddMemberDialog-Cp_z3nMa.mjs} +7 -7
  249. package/.output/server/chunks/build/{useTeamAddMemberDialog-Q-ntQ6Vo.mjs.map → useTeamAddMemberDialog-Cp_z3nMa.mjs.map} +1 -1
  250. package/.output/server/chunks/build/{useTeamCreateDialog-D7OMfDTM.mjs → useTeamCreateDialog-C8LKUoe2.mjs} +7 -7
  251. package/.output/server/chunks/build/{useTeamCreateDialog-D7OMfDTM.mjs.map → useTeamCreateDialog-C8LKUoe2.mjs.map} +1 -1
  252. package/.output/server/chunks/build/{useTeamDeployDialog-vBRqjiut.mjs → useTeamDeployDialog-wdBVsNWY.mjs} +7 -7
  253. package/.output/server/chunks/build/{useTeamDeployDialog-vBRqjiut.mjs.map → useTeamDeployDialog-wdBVsNWY.mjs.map} +1 -1
  254. package/.output/server/chunks/build/useTeamDialogState-CFRUQxAf.mjs +6 -6
  255. package/.output/server/chunks/build/{useTeamPluginDialog-B8kxewpZ.mjs → useTeamPluginDialog-CIk8G8nI.mjs} +7 -7
  256. package/.output/server/chunks/build/{useTeamPluginDialog-B8kxewpZ.mjs.map → useTeamPluginDialog-CIk8G8nI.mjs.map} +1 -1
  257. package/.output/server/chunks/build/{useTeamsCatalog-xRhk7ezA.mjs → useTeamsCatalog-D6TULzmS.mjs} +7 -7
  258. package/.output/server/chunks/build/{useTeamsCatalog-xRhk7ezA.mjs.map → useTeamsCatalog-D6TULzmS.mjs.map} +1 -1
  259. package/.output/server/chunks/build/useTokenClipboard-CwQpoFeP.mjs +6 -6
  260. package/.output/server/chunks/build/{useTokenCreate-DpDcF1Vx.mjs → useTokenCreate-DkYvEQUD.mjs} +7 -7
  261. package/.output/server/chunks/build/{useTokenCreate-DpDcF1Vx.mjs.map → useTokenCreate-DkYvEQUD.mjs.map} +1 -1
  262. package/.output/server/chunks/build/{useTokenRename-BRejFrtc.mjs → useTokenRename-DOCP4aeI.mjs} +7 -7
  263. package/.output/server/chunks/build/{useTokenRename-BRejFrtc.mjs.map → useTokenRename-DOCP4aeI.mjs.map} +1 -1
  264. package/.output/server/chunks/build/{useTokenReveal-DER2afAS.mjs → useTokenReveal-CybwwflV.mjs} +7 -7
  265. package/.output/server/chunks/build/{useTokenReveal-DER2afAS.mjs.map → useTokenReveal-CybwwflV.mjs.map} +1 -1
  266. package/.output/server/chunks/build/{useTokensList-DHt65IOY.mjs → useTokensList-BLiMvrc4.mjs} +7 -7
  267. package/.output/server/chunks/build/{useTokensList-DHt65IOY.mjs.map → useTokensList-BLiMvrc4.mjs.map} +1 -1
  268. package/.output/server/chunks/build/{useWorkbenchAuth-B2j-zILO.mjs → useWorkbenchAuth-DqjBX-6w.mjs} +7 -7
  269. package/.output/server/chunks/build/{useWorkbenchAuth-B2j-zILO.mjs.map → useWorkbenchAuth-DqjBX-6w.mjs.map} +1 -1
  270. package/.output/server/chunks/build/{useWorkbenchWorkspaces-B_2mOxN6.mjs → useWorkbenchWorkspaces-DgiSCzsX.mjs} +10 -9
  271. package/.output/server/chunks/build/useWorkbenchWorkspaces-DgiSCzsX.mjs.map +1 -0
  272. package/.output/server/chunks/build/{useWorkshopWs-B-Es2Xg3.mjs → useWorkshopWs-Bm80bLn7.mjs} +8 -7
  273. package/.output/server/chunks/build/useWorkshopWs-Bm80bLn7.mjs.map +1 -0
  274. package/.output/server/chunks/build/{useWorkspaceAuth-tQ1ORWXo.mjs → useWorkspaceAuth-Dlvj9csD.mjs} +8 -8
  275. package/.output/server/chunks/build/{useWorkspaceAuth-tQ1ORWXo.mjs.map → useWorkspaceAuth-Dlvj9csD.mjs.map} +1 -1
  276. package/.output/server/chunks/build/{useWorkspaceChannels-BwB6TAWY.mjs → useWorkspaceChannels-D61Al2dr.mjs} +11 -10
  277. package/.output/server/chunks/build/useWorkspaceChannels-D61Al2dr.mjs.map +1 -0
  278. package/.output/server/chunks/build/{useWorkspacePanels-CuAmDpT5.mjs → useWorkspacePanels-CTwREmq0.mjs} +8 -8
  279. package/.output/server/chunks/build/{useWorkspacePanels-CuAmDpT5.mjs.map → useWorkspacePanels-CTwREmq0.mjs.map} +1 -1
  280. package/.output/server/chunks/build/{useWorkspaceShell-CcQ4JlqO.mjs → useWorkspaceShell-BCypjjjE.mjs} +7 -7
  281. package/.output/server/chunks/build/{useWorkspaceShell-CcQ4JlqO.mjs.map → useWorkspaceShell-BCypjjjE.mjs.map} +1 -1
  282. package/.output/server/chunks/build/{users-De2HygNt.mjs → users-CCf5PgRs.mjs} +8 -8
  283. package/.output/server/chunks/build/{users-De2HygNt.mjs.map → users-CCf5PgRs.mjs.map} +1 -1
  284. package/.output/server/chunks/build/{workshop-CmgpTwyf.mjs → workshop-FQ4YzooB.mjs} +13 -12
  285. package/.output/server/chunks/build/workshop-FQ4YzooB.mjs.map +1 -0
  286. package/.output/server/chunks/build/{workspaces-DVIEk1Bl.mjs → workspaces-CmW0cpOt.mjs} +1 -1
  287. package/.output/server/chunks/build/{workspaces-DVIEk1Bl.mjs.map → workspaces-CmW0cpOt.mjs.map} +1 -1
  288. package/.output/server/chunks/routes/api/health.get.mjs +6 -6
  289. package/.output/server/chunks/routes/api/index.get.mjs +7 -7
  290. package/.output/server/chunks/routes/api/index.post.mjs +7 -7
  291. package/.output/server/chunks/routes/api/mcp/workshop.mjs +6 -6
  292. package/.output/server/chunks/routes/api/metrics.mjs +6 -6
  293. package/.output/server/chunks/routes/api/plugins/_name/_...path_.mjs +6 -6
  294. package/.output/server/chunks/routes/api/plugins/client/_name_.get.mjs +6 -6
  295. package/.output/server/chunks/routes/api/plugins/i18n.get.mjs +6 -6
  296. package/.output/server/chunks/routes/api/plugins/manifest.get.mjs +6 -6
  297. package/.output/server/chunks/routes/api/system/config-groups/_id_.delete.mjs +6 -6
  298. package/.output/server/chunks/routes/api/system/config-groups/_id_.patch.mjs +6 -6
  299. package/.output/server/chunks/routes/api/system/config.get.mjs +6 -6
  300. package/.output/server/chunks/routes/api/system/index.get.mjs +6 -6
  301. package/.output/server/chunks/routes/api/system/index.patch.mjs +6 -6
  302. package/.output/server/chunks/routes/api/system/index.post.mjs +6 -6
  303. package/.output/server/chunks/routes/api/system/index2.get.mjs +6 -6
  304. package/.output/server/chunks/routes/api/system/monitor/terminal/ws.mjs +6 -6
  305. package/.output/server/chunks/routes/api/system/monitor/terminate.post.mjs +6 -6
  306. package/.output/server/chunks/routes/api/system/monitor.get.mjs +6 -6
  307. package/.output/server/chunks/routes/api/system/settings/events.get.mjs +6 -6
  308. package/.output/server/chunks/routes/api/system/settings/reset.post.mjs +6 -6
  309. package/.output/server/chunks/routes/api/system/timezone.get.mjs +36 -0
  310. package/.output/server/chunks/routes/api/system/timezone.get.mjs.map +1 -0
  311. package/.output/server/chunks/routes/api/users/_id_.delete.mjs +7 -7
  312. package/.output/server/chunks/routes/api/users/_id_.get.mjs +7 -7
  313. package/.output/server/chunks/routes/api/users/_id_.put.mjs +7 -7
  314. package/.output/server/chunks/routes/api/users/index.get.mjs +7 -7
  315. package/.output/server/chunks/routes/api/users/index.post.mjs +7 -7
  316. package/.output/server/chunks/routes/api/users/login.post.mjs +7 -7
  317. package/.output/server/chunks/routes/api/users/logout.post.mjs +7 -7
  318. package/.output/server/chunks/routes/api/users/me.get.mjs +7 -7
  319. package/.output/server/chunks/routes/api/users/register.post.mjs +7 -7
  320. package/.output/server/chunks/routes/api/users/setup-status.get.mjs +7 -7
  321. package/.output/server/chunks/routes/api/users/tokens/_id/token.get.mjs +7 -7
  322. package/.output/server/chunks/routes/api/users/tokens/_id_.delete.mjs +7 -7
  323. package/.output/server/chunks/routes/api/users/tokens/_id_.patch.mjs +7 -7
  324. package/.output/server/chunks/routes/api/workshop/_...path_.mjs +6 -6
  325. package/.output/server/chunks/routes/api/workshop/a2a/_agentId/index.get.mjs +7 -7
  326. package/.output/server/chunks/routes/api/workshop/a2a/_agentId/index.post.mjs +5 -5
  327. package/.output/server/chunks/routes/api/workshop/a2a/send.post.mjs +6 -6
  328. package/.output/server/chunks/routes/api/workshop/agent-tools/approvals/_id/decide.post.mjs +7 -7
  329. package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.delete.mjs +7 -7
  330. package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.patch.mjs +10 -7
  331. package/.output/server/chunks/routes/api/workshop/agent-tools/bindings/_id_.patch.mjs.map +1 -1
  332. package/.output/server/chunks/routes/api/workshop/agent-tools/index.get.mjs +7 -7
  333. package/.output/server/chunks/routes/api/workshop/agent-tools/index.post.mjs +7 -7
  334. package/.output/server/chunks/routes/api/workshop/agent-tools/index2.get.mjs +7 -7
  335. package/.output/server/chunks/routes/api/workshop/agent-tools/invoke.post.mjs +7 -7
  336. package/.output/server/chunks/routes/api/workshop/agent-tools/list.get.mjs +7 -7
  337. package/.output/server/chunks/routes/api/workshop/agents/_id_.delete.mjs +6 -6
  338. package/.output/server/chunks/routes/api/workshop/agents/_id_.get.mjs +6 -6
  339. package/.output/server/chunks/routes/api/workshop/agents/_id_.patch.mjs +6 -6
  340. package/.output/server/chunks/routes/api/workshop/agents/subscribe.post.mjs +6 -6
  341. package/.output/server/chunks/routes/api/workshop/aml/datasets/_id/preview.get.mjs +6 -6
  342. package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.delete.mjs +7 -7
  343. package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.get.mjs +7 -7
  344. package/.output/server/chunks/routes/api/workshop/aml/datasets/_id_.patch.mjs +7 -7
  345. package/.output/server/chunks/routes/api/workshop/aml/entities/prune.post.mjs +7 -7
  346. package/.output/server/chunks/routes/api/workshop/aml/env/recheck.post.mjs +7 -8
  347. package/.output/server/chunks/routes/api/workshop/aml/env/recheck.post.mjs.map +1 -1
  348. package/.output/server/chunks/routes/api/workshop/aml/env/uv.post.mjs +7 -8
  349. package/.output/server/chunks/routes/api/workshop/aml/env/uv.post.mjs.map +1 -1
  350. package/.output/server/chunks/routes/api/workshop/aml/env/venv.post.mjs +7 -8
  351. package/.output/server/chunks/routes/api/workshop/aml/env/venv.post.mjs.map +1 -1
  352. package/.output/server/chunks/routes/api/workshop/aml/index.get.mjs +7 -7
  353. package/.output/server/chunks/routes/api/workshop/aml/index.post.mjs +7 -7
  354. package/.output/server/chunks/routes/api/workshop/aml/index2.get.mjs +6 -6
  355. package/.output/server/chunks/routes/api/workshop/aml/index2.post.mjs +20 -7
  356. package/.output/server/chunks/routes/api/workshop/aml/index2.post.mjs.map +1 -1
  357. package/.output/server/chunks/routes/api/workshop/aml/index3.get.mjs +7 -8
  358. package/.output/server/chunks/routes/api/workshop/aml/index3.get.mjs.map +1 -1
  359. package/.output/server/chunks/routes/api/workshop/aml/index3.post.mjs +49 -0
  360. package/.output/server/chunks/routes/api/workshop/aml/index3.post.mjs.map +1 -0
  361. package/.output/server/chunks/routes/api/workshop/aml/index4.get.mjs +7 -7
  362. package/.output/server/chunks/routes/api/workshop/aml/index5.get.mjs +7 -7
  363. package/.output/server/chunks/routes/api/workshop/aml/index6.get.mjs +7 -7
  364. package/.output/server/chunks/routes/api/workshop/aml/index7.get.mjs +28 -0
  365. package/.output/server/chunks/routes/api/workshop/aml/index7.get.mjs.map +1 -0
  366. package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/cancel.post.mjs +7 -7
  367. package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/logs.get.mjs +7 -7
  368. package/.output/server/chunks/routes/api/workshop/aml/jobs/_id/retry.post.mjs +7 -7
  369. package/.output/server/chunks/routes/api/workshop/aml/jobs/_id_.delete.mjs +7 -7
  370. package/.output/server/chunks/routes/api/workshop/aml/jobs/_id_.get.mjs +7 -7
  371. package/.output/server/chunks/routes/api/workshop/aml/models/_id/predict.post.mjs +7 -7
  372. package/.output/server/chunks/routes/api/workshop/aml/models/_id/promote.post.mjs +7 -7
  373. package/.output/server/chunks/routes/api/workshop/aml/models/_id_.delete.mjs +7 -7
  374. package/.output/server/chunks/routes/api/workshop/aml/models/_id_.patch.mjs +7 -7
  375. package/.output/server/chunks/routes/api/workshop/aml/training-plans/_id/train.post.mjs +35 -0
  376. package/.output/server/chunks/routes/api/workshop/aml/training-plans/_id/train.post.mjs.map +1 -0
  377. package/.output/server/chunks/routes/api/workshop/aml/training-plans/_id_.delete.mjs +35 -0
  378. package/.output/server/chunks/routes/api/workshop/aml/training-plans/_id_.delete.mjs.map +1 -0
  379. package/.output/server/chunks/routes/api/workshop/aml/training-plans/_id_.patch.mjs +44 -0
  380. package/.output/server/chunks/routes/api/workshop/aml/training-plans/_id_.patch.mjs.map +1 -0
  381. package/.output/server/chunks/routes/api/workshop/aml/twin/providers.get.mjs +46 -0
  382. package/.output/server/chunks/routes/api/workshop/aml/twin/providers.get.mjs.map +1 -0
  383. package/.output/server/chunks/routes/api/workshop/approvals/_id/decide.post.mjs +7 -7
  384. package/.output/server/chunks/routes/api/workshop/assets/character/_id_.delete.mjs +5 -5
  385. package/.output/server/chunks/routes/api/workshop/assets/devices/_id_.delete.mjs +5 -5
  386. package/.output/server/chunks/routes/api/workshop/assets/index.get.mjs +6 -6
  387. package/.output/server/chunks/routes/api/workshop/assets/index.post.mjs +6 -6
  388. package/.output/server/chunks/routes/api/workshop/assets/index2.get.mjs +5 -5
  389. package/.output/server/chunks/routes/api/workshop/assets/index2.post.mjs +6 -6
  390. package/.output/server/chunks/routes/api/workshop/audit.get.mjs +6 -6
  391. package/.output/server/chunks/routes/api/workshop/caller.mjs +7 -7
  392. package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs +16 -10
  393. package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs.map +1 -1
  394. package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.delete.mjs +6 -6
  395. package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.get.mjs +6 -6
  396. package/.output/server/chunks/routes/api/workshop/channel-templates/_id_.patch.mjs +6 -6
  397. package/.output/server/chunks/routes/api/workshop/channel-templates/from-channel.post.mjs +6 -6
  398. package/.output/server/chunks/routes/api/workshop/channels/_id/activate.post.mjs +7 -7
  399. package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/index.get.mjs +6 -6
  400. package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/index.post.mjs +6 -6
  401. package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/memories/_memoryId_.delete.mjs +6 -6
  402. package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/memories/search.post.mjs +6 -6
  403. package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/model.patch.mjs +6 -6
  404. package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/position.patch.mjs +6 -6
  405. package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/range.patch.mjs +6 -6
  406. package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId/stop.post.mjs +6 -6
  407. package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.delete.mjs +6 -6
  408. package/.output/server/chunks/routes/api/workshop/channels/_id/agents/_agentId_.patch.mjs +6 -6
  409. package/.output/server/chunks/routes/api/workshop/channels/_id/chat/index.get.mjs +6 -6
  410. package/.output/server/chunks/routes/api/workshop/channels/_id/chat/index.post.mjs +6 -6
  411. package/.output/server/chunks/routes/api/workshop/channels/_id/chat/messages/_messageId/read.post.mjs +6 -6
  412. package/.output/server/chunks/routes/api/workshop/channels/_id/chat/permissions.get.mjs +6 -6
  413. package/.output/server/chunks/routes/api/workshop/channels/_id/events.get.mjs +6 -6
  414. package/.output/server/chunks/routes/api/workshop/channels/_id/index.get.mjs +6 -6
  415. package/.output/server/chunks/routes/api/workshop/channels/_id/index.post.mjs +6 -6
  416. package/.output/server/chunks/routes/api/workshop/channels/_id/index.put.mjs +7 -7
  417. package/.output/server/chunks/routes/api/workshop/channels/_id/index2.get.mjs +6 -6
  418. package/.output/server/chunks/routes/api/workshop/channels/_id/index2.post.mjs +6 -6
  419. package/.output/server/chunks/routes/api/workshop/channels/_id/index3.get.mjs +6 -6
  420. package/.output/server/chunks/routes/api/workshop/channels/_id/index3.post.mjs +6 -6
  421. package/.output/server/chunks/routes/api/workshop/channels/_id/index4.get.mjs +6 -6
  422. package/.output/server/chunks/routes/api/workshop/channels/_id/index4.post.mjs +6 -6
  423. package/.output/server/chunks/routes/api/workshop/channels/_id/index5.get.mjs +7 -7
  424. package/.output/server/chunks/routes/api/workshop/channels/_id/index6.get.mjs +6 -6
  425. package/.output/server/chunks/routes/api/workshop/channels/_id/members/_userId/approve.post.mjs +6 -6
  426. package/.output/server/chunks/routes/api/workshop/channels/_id/members/_userId_.delete.mjs +6 -6
  427. package/.output/server/chunks/routes/api/workshop/channels/_id/members/join.post.mjs +6 -6
  428. package/.output/server/chunks/routes/api/workshop/channels/_id/members/leave.post.mjs +6 -6
  429. package/.output/server/chunks/routes/api/workshop/channels/_id/memories/_memoryId_.delete.mjs +6 -6
  430. package/.output/server/chunks/routes/api/workshop/channels/_id/queue.get.mjs +6 -6
  431. package/.output/server/chunks/routes/api/workshop/channels/_id/terminals.get.mjs +7 -7
  432. package/.output/server/chunks/routes/api/workshop/channels/_id/twin-profile.get.mjs +51 -0
  433. package/.output/server/chunks/routes/api/workshop/channels/_id/twin-profile.get.mjs.map +1 -0
  434. package/.output/server/chunks/routes/api/workshop/channels/_id/twin-profile.patch.mjs +71 -0
  435. package/.output/server/chunks/routes/api/workshop/channels/_id/twin-profile.patch.mjs.map +1 -0
  436. package/.output/server/chunks/routes/api/workshop/channels/_id_.delete.mjs +6 -6
  437. package/.output/server/chunks/routes/api/workshop/channels/index.get.mjs +7 -7
  438. package/.output/server/chunks/routes/api/workshop/channels/index.patch.mjs +6 -6
  439. package/.output/server/chunks/routes/api/workshop/channels.get.mjs +6 -6
  440. package/.output/server/chunks/routes/api/workshop/channels.post.mjs +9 -9
  441. package/.output/server/chunks/routes/api/workshop/daq/_id/bind.post.mjs +7 -7
  442. package/.output/server/chunks/routes/api/workshop/daq/_id/bindings.put.mjs +7 -7
  443. package/.output/server/chunks/routes/api/workshop/daq/_id/frames/content.get.mjs +7 -7
  444. package/.output/server/chunks/routes/api/workshop/daq/_id/frames.get.mjs +7 -7
  445. package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs +7 -7
  446. package/.output/server/chunks/routes/api/workshop/daq/_id/test.post.mjs +7 -7
  447. package/.output/server/chunks/routes/api/workshop/daq/_id_.delete.mjs +7 -7
  448. package/.output/server/chunks/routes/api/workshop/daq/_id_.patch.mjs +7 -7
  449. package/.output/server/chunks/routes/api/workshop/daq/alarms/_id/ack.post.mjs +7 -7
  450. package/.output/server/chunks/routes/api/workshop/daq/alarms.get.mjs +7 -7
  451. package/.output/server/chunks/routes/api/workshop/daq/controller.post.mjs +7 -7
  452. package/.output/server/chunks/routes/api/workshop/daq/index.post.mjs +7 -7
  453. package/.output/server/chunks/routes/api/workshop/daq/infra/reconnect.post.mjs +7 -7
  454. package/.output/server/chunks/routes/api/workshop/daq/infra.get.mjs +7 -7
  455. package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.delete.mjs +7 -7
  456. package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.patch.mjs +7 -7
  457. package/.output/server/chunks/routes/api/workshop/daq/test-driver.post.mjs +7 -7
  458. package/.output/server/chunks/routes/api/workshop/dcw/_id/bind.post.mjs +7 -7
  459. package/.output/server/chunks/routes/api/workshop/dcw/_id/bindings.put.mjs +7 -7
  460. package/.output/server/chunks/routes/api/workshop/dcw/_id/param-ledger.get.mjs +7 -7
  461. package/.output/server/chunks/routes/api/workshop/dcw/_id/read.post.mjs +7 -7
  462. package/.output/server/chunks/routes/api/workshop/dcw/_id/test.post.mjs +7 -7
  463. package/.output/server/chunks/routes/api/workshop/dcw/_id/write.post.mjs +7 -7
  464. package/.output/server/chunks/routes/api/workshop/dcw/_id_.delete.mjs +7 -7
  465. package/.output/server/chunks/routes/api/workshop/dcw/_id_.patch.mjs +7 -7
  466. package/.output/server/chunks/routes/api/workshop/dcw/controller.post.mjs +7 -7
  467. package/.output/server/chunks/routes/api/workshop/dcw/index.get.mjs +7 -7
  468. package/.output/server/chunks/routes/api/workshop/dcw/index.post.mjs +7 -7
  469. package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs +7 -7
  470. package/.output/server/chunks/routes/api/workshop/dcw/index2.post.mjs +7 -7
  471. package/.output/server/chunks/routes/api/workshop/dcw/index3.get.mjs +7 -7
  472. package/.output/server/chunks/routes/api/workshop/dcw/index3.post.mjs +7 -7
  473. package/.output/server/chunks/routes/api/workshop/dcw/index4.get.mjs +7 -7
  474. package/.output/server/chunks/routes/api/workshop/dcw/index4.post.mjs +7 -7
  475. package/.output/server/chunks/routes/api/workshop/dcw/index5.get.mjs +7 -7
  476. package/.output/server/chunks/routes/api/workshop/dcw/index5.post.mjs +7 -7
  477. package/.output/server/chunks/routes/api/workshop/dcw/index6.get.mjs +7 -7
  478. package/.output/server/chunks/routes/api/workshop/dcw/journal/node/_nodeId/rollback.post.mjs +7 -7
  479. package/.output/server/chunks/routes/api/workshop/dcw/line/query.get.mjs +7 -7
  480. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs +7 -7
  481. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs +7 -7
  482. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.delete.mjs +7 -7
  483. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.patch.mjs +7 -7
  484. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/judge.post.mjs +7 -7
  485. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/rollback.post.mjs +7 -7
  486. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/series.get.mjs +7 -7
  487. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id_.get.mjs +7 -7
  488. package/.output/server/chunks/routes/api/workshop/dcw/params/_id/read.post.mjs +7 -7
  489. package/.output/server/chunks/routes/api/workshop/dcw/params/_id/write.post.mjs +7 -7
  490. package/.output/server/chunks/routes/api/workshop/dcw/params/_id_.delete.mjs +7 -7
  491. package/.output/server/chunks/routes/api/workshop/dcw/params/_id_.patch.mjs +7 -7
  492. package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.delete.mjs +7 -7
  493. package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.patch.mjs +7 -7
  494. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/apply.post.mjs +7 -7
  495. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/mark-good.post.mjs +7 -7
  496. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/revert.post.mjs +7 -7
  497. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/rollback-good.post.mjs +7 -7
  498. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/versions.get.mjs +7 -7
  499. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.delete.mjs +7 -7
  500. package/.output/server/chunks/routes/api/workshop/dcw/recipes/index.patch.mjs +7 -7
  501. package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/close.post.mjs +7 -7
  502. package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/data.get.mjs +7 -7
  503. package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/rollback.post.mjs +7 -7
  504. package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.delete.mjs +7 -7
  505. package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.patch.mjs +7 -7
  506. package/.output/server/chunks/routes/api/workshop/dcw/test-driver.post.mjs +7 -7
  507. package/.output/server/chunks/routes/api/workshop/device-twins/_id/control.post.mjs +7 -7
  508. package/.output/server/chunks/routes/api/workshop/device-twins/_id/telemetry.post.mjs +7 -7
  509. package/.output/server/chunks/routes/api/workshop/device-twins/_id_.delete.mjs +7 -7
  510. package/.output/server/chunks/routes/api/workshop/device-twins/_id_.patch.mjs +7 -7
  511. package/.output/server/chunks/routes/api/workshop/fs/dirs.get.mjs +5 -5
  512. package/.output/server/chunks/routes/api/workshop/harnesses/_id/providers.get.mjs +7 -7
  513. package/.output/server/chunks/routes/api/workshop/harnesses.get.mjs +7 -7
  514. package/.output/server/chunks/routes/api/workshop/hitl/pending.get.mjs +7 -7
  515. package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs +7 -7
  516. package/.output/server/chunks/routes/api/workshop/index.get.mjs +6 -6
  517. package/.output/server/chunks/routes/api/workshop/index.post.mjs +6 -6
  518. package/.output/server/chunks/routes/api/workshop/index.put.mjs +7 -7
  519. package/.output/server/chunks/routes/api/workshop/index10.get.mjs +7 -7
  520. package/.output/server/chunks/routes/api/workshop/index11.get.mjs +6 -6
  521. package/.output/server/chunks/routes/api/workshop/index12.get.mjs +6 -6
  522. package/.output/server/chunks/routes/api/workshop/index13.get.mjs +6 -6
  523. package/.output/server/chunks/routes/api/workshop/index14.get.mjs +6 -6
  524. package/.output/server/chunks/routes/api/workshop/index2.get.mjs +7 -8
  525. package/.output/server/chunks/routes/api/workshop/index2.get.mjs.map +1 -1
  526. package/.output/server/chunks/routes/api/workshop/index2.post.mjs +6 -6
  527. package/.output/server/chunks/routes/api/workshop/index3.get.mjs +6 -6
  528. package/.output/server/chunks/routes/api/workshop/index3.post.mjs +7 -7
  529. package/.output/server/chunks/routes/api/workshop/index4.get.mjs +6 -6
  530. package/.output/server/chunks/routes/api/workshop/index4.post.mjs +7 -7
  531. package/.output/server/chunks/routes/api/workshop/index5.get.mjs +7 -7
  532. package/.output/server/chunks/routes/api/workshop/index5.post.mjs +7 -7
  533. package/.output/server/chunks/routes/api/workshop/index6.get.mjs +7 -7
  534. package/.output/server/chunks/routes/api/workshop/index6.post.mjs +7 -7
  535. package/.output/server/chunks/routes/api/workshop/index7.get.mjs +7 -7
  536. package/.output/server/chunks/routes/api/workshop/index7.post.mjs +6 -6
  537. package/.output/server/chunks/routes/api/workshop/index8.get.mjs +6 -6
  538. package/.output/server/chunks/routes/api/workshop/index8.post.mjs +6 -6
  539. package/.output/server/chunks/routes/api/workshop/index9.get.mjs +6 -6
  540. package/.output/server/chunks/routes/api/workshop/index9.post.mjs +6 -6
  541. package/.output/server/chunks/routes/api/workshop/mailbox/all.get.mjs +6 -6
  542. package/.output/server/chunks/routes/api/workshop/mailbox.get.mjs +6 -6
  543. package/.output/server/chunks/routes/api/workshop/memories/maintenance.post.mjs +6 -6
  544. package/.output/server/chunks/routes/api/workshop/notifications/read.post.mjs +6 -6
  545. package/.output/server/chunks/routes/api/workshop/plugins/_name/disable.post.mjs +7 -7
  546. package/.output/server/chunks/routes/api/workshop/plugins/_name/enable.post.mjs +7 -7
  547. package/.output/server/chunks/routes/api/workshop/plugins/index.get.mjs +6 -6
  548. package/.output/server/chunks/routes/api/workshop/runtime.get.mjs +6 -6
  549. package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.delete.mjs +7 -7
  550. package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.put.mjs +7 -7
  551. package/.output/server/chunks/routes/api/workshop/scene/layouts.get.mjs +6 -6
  552. package/.output/server/chunks/routes/api/workshop/schedules/_id/run.post.mjs +6 -6
  553. package/.output/server/chunks/routes/api/workshop/schedules/_id/runs.get.mjs +6 -6
  554. package/.output/server/chunks/routes/api/workshop/schedules/_id_.delete.mjs +6 -6
  555. package/.output/server/chunks/routes/api/workshop/schedules/_id_.get.mjs +6 -6
  556. package/.output/server/chunks/routes/api/workshop/schedules/_id_.patch.mjs +6 -6
  557. package/.output/server/chunks/routes/api/workshop/tasks/_id/complete.post.mjs +6 -6
  558. package/.output/server/chunks/routes/api/workshop/tasks/_id/dispatch.post.mjs +6 -6
  559. package/.output/server/chunks/routes/api/workshop/tasks/_id/index.post.mjs +6 -6
  560. package/.output/server/chunks/routes/api/workshop/tasks/_id/reassign.post.mjs +6 -6
  561. package/.output/server/chunks/routes/api/workshop/tasks/_id/report.post.mjs +6 -6
  562. package/.output/server/chunks/routes/api/workshop/tasks/_id/retry.post.mjs +6 -6
  563. package/.output/server/chunks/routes/api/workshop/tasks/_id/update.post.mjs +6 -6
  564. package/.output/server/chunks/routes/api/workshop/tasks/_id_.get.mjs +6 -6
  565. package/.output/server/chunks/routes/api/workshop/tasks.get.mjs +6 -6
  566. package/.output/server/chunks/routes/api/workshop/teams/_id/deploy.post.mjs +6 -6
  567. package/.output/server/chunks/routes/api/workshop/teams/_id/index.get.mjs +6 -6
  568. package/.output/server/chunks/routes/api/workshop/teams/_id/index.post.mjs +6 -6
  569. package/.output/server/chunks/routes/api/workshop/teams/_id/index.put.mjs +7 -7
  570. package/.output/server/chunks/routes/api/workshop/teams/_id/index2.get.mjs +7 -7
  571. package/.output/server/chunks/routes/api/workshop/teams/_id/members/_agentId_.delete.mjs +6 -6
  572. package/.output/server/chunks/routes/api/workshop/teams/_id_.delete.mjs +6 -6
  573. package/.output/server/chunks/routes/api/workshop/teams/_id_.get.mjs +6 -6
  574. package/.output/server/chunks/routes/api/workshop/teams/_id_.patch.mjs +6 -6
  575. package/.output/server/chunks/routes/api/workshop/users/me.get.mjs +6 -6
  576. package/.output/server/chunks/routes/api/workshop/users/register.post.mjs +6 -6
  577. package/.output/server/chunks/routes/api/workshop/workspaces/_id/channel-templates/_tplId_.post.mjs +7 -7
  578. package/.output/server/chunks/routes/api/workshop/workspaces/_id/channels/_channelId_.delete.mjs +6 -6
  579. package/.output/server/chunks/routes/api/workshop/workspaces/_id/channels/_channelId_.post.mjs +6 -6
  580. package/.output/server/chunks/routes/api/workshop/workspaces/index.delete.mjs +6 -6
  581. package/.output/server/chunks/routes/renderer.mjs +2 -2
  582. package/.output/server/chunks/virtual/entry.mjs +645 -525
  583. package/.output/server/chunks/virtual/entry.mjs.map +1 -1
  584. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  585. package/.output/server/index.mjs +6 -6
  586. package/.output/server/package.json +1 -1
  587. package/README-zh.md +829 -813
  588. package/README.md +839 -823
  589. package/app/components/AppSidebar.vue +1 -0
  590. package/app/components/aml/AmlModelsTable.vue +180 -173
  591. package/app/components/daq/DaqDetailFramesTile.vue +140 -139
  592. package/app/components/daq/DaqDetailHistoryCard.vue +129 -128
  593. package/app/components/dcw/DcwAddNodeModal.vue +342 -328
  594. package/app/components/dcw/DcwNodesTable.vue +290 -253
  595. package/app/components/dcw/DcwQueryCard.vue +252 -251
  596. package/app/components/dcw/DcwRecipeEditModal.vue +297 -285
  597. package/app/components/dcw/DcwRecipePanel.vue +371 -367
  598. package/app/components/operations/OperationsFilterCard.vue +164 -0
  599. package/app/components/operations/OperationsPageHead.vue +47 -0
  600. package/app/components/operations/OperationsTimeline.vue +215 -0
  601. package/app/components/settings/RuntimeFieldRow.vue +207 -189
  602. package/app/components/workshop/ChatTimeline.vue +596 -569
  603. package/app/components/workshop/EventBlock.vue +224 -214
  604. package/app/components/workshop/blocks/ClusterTool.vue +20 -2
  605. package/app/components/workshop/console/LineOperationsPanel.vue +179 -0
  606. package/app/components/workshop/console/RightPane.vue +6 -0
  607. package/app/composables/workshop/event-blocks/constants.ts +48 -2
  608. package/app/composables/workshop/operation-events.ts +151 -0
  609. package/app/composables/workshop/useAmlStream.ts +137 -136
  610. package/app/composables/workshop/useLocalTime.ts +81 -37
  611. package/app/config/schema.ts +3 -0
  612. package/app/pages/aml/styles.css +422 -420
  613. package/app/pages/aml/types.ts +195 -189
  614. package/app/pages/dcw/[id].vue +300 -297
  615. package/app/pages/dcw/composables/useDcwAddNode.ts +124 -121
  616. package/app/pages/dcw/composables/useDcwRecipes.ts +242 -239
  617. package/app/pages/dcw/composables/useDcwWrites.ts +100 -81
  618. package/app/pages/monitor/composables/useMonitorData.ts +125 -124
  619. package/app/pages/monitor/composables/useMonitorFormat.ts +41 -39
  620. package/app/pages/operations/composables/useOperationsFeed.ts +137 -0
  621. package/app/pages/operations.vue +61 -0
  622. package/app/stores/runtime-config.ts +1 -1
  623. package/app/stores/workshop/chat.ts +434 -434
  624. package/app/stores/workshop/notifications.ts +288 -288
  625. package/app/utils/dcw-recipe-form.ts +26 -0
  626. package/cli/aw.mjs +3 -2
  627. package/cli/commands/mcp.mjs +154 -0
  628. package/cli/core/context.mjs +5 -0
  629. package/config.yml +180 -176
  630. package/docs/aml.md +112 -111
  631. package/docs/cli.en.md +447 -445
  632. package/docs/cli.md +412 -410
  633. package/docs/mcp.en.md +27 -0
  634. package/docs/mcp.md +108 -0
  635. package/docs/plugins.en.md +621 -567
  636. package/docs/plugins.md +610 -560
  637. package/docs/sdk.en.md +964 -922
  638. package/docs/sdk.md +900 -861
  639. package/i18n/dicts/aml.json +207 -205
  640. package/i18n/locales/en.ts +37 -0
  641. package/i18n/locales/zh-CN.ts +37 -0
  642. package/mcp/aw-mcp-server.mjs +796 -0
  643. package/mcp/discovery.mjs +227 -0
  644. package/nuxt.config.ts +2 -0
  645. package/package.json +181 -172
  646. package/scripts/.chk-tok +1 -0
  647. package/scripts/.retrain-body.json +1 -0
  648. package/scripts/.retrain3-body.json +1 -0
  649. package/scripts/.rt-tok +1 -0
  650. package/scripts/.rt3-tok +1 -0
  651. package/scripts/_audit/.tmp/audit-data/dcw-params.json +15 -0
  652. package/scripts/_audit/.tmp/audit-data/dcws.json +30 -0
  653. package/scripts/_audit/aw-mcp-live-e2e.mjs +293 -0
  654. package/scripts/_audit/dcw-controller-e2e.ts +25 -18
  655. package/scripts/_audit/dcw-rollback-ledger.ts +4 -1
  656. package/scripts/_audit/feature-audit-e2e.mjs +339 -0
  657. package/scripts/_audit/full-e2e-adopt.mjs +238 -0
  658. package/scripts/_audit/full-e2e-close-loop.mjs +134 -0
  659. package/scripts/_audit/full-e2e-retrain.mjs +320 -0
  660. package/scripts/_audit/full-e2e-supplement.mjs +192 -0
  661. package/scripts/_audit/full-e2e-ui-final.mjs +111 -0
  662. package/scripts/_audit/full-e2e-ui-mount.mjs +111 -0
  663. package/scripts/_audit/full-feature-e2e-20260927.mjs +627 -0
  664. package/scripts/_audit/kb-diag-complete.mjs +261 -0
  665. package/scripts/_audit/kb-diag-complete2.mjs +271 -0
  666. package/scripts/_audit/kb-diag-loop-e2e.mjs +357 -0
  667. package/scripts/_audit/kb-diag-loop-mock.mjs +416 -0
  668. package/scripts/_audit/kb-diag-loop-v2.mjs +314 -0
  669. package/scripts/_audit/recipe-save-e2e.mjs +365 -0
  670. package/scripts/_audit/run.mjs +21 -0
  671. package/scripts/_audit/runtime-dir-e2e.mjs +393 -0
  672. package/scripts/_audit/skills-guided-e2e.mjs +316 -0
  673. package/scripts/_audit/stability-soak.mjs +252 -0
  674. package/scripts/_aw0748-failclosed-probe.mjs +1 -1
  675. package/scripts/_aw0748-mock-closedloop.mjs +12 -0
  676. package/scripts/_aw0748-mock-dispatch-diag.mjs +66 -0
  677. package/scripts/_dbg-configroot-audit.mjs +86 -84
  678. package/scripts/_dbg-daq-intervals-func.mjs +115 -94
  679. package/scripts/_dbg-optloop-ui-shots.mjs +52 -0
  680. package/scripts/_dbg-param-map-e2e.ts +7 -1
  681. package/scripts/_dbg-perms-e2e.mjs +11 -1
  682. package/scripts/_dbg-protocol-matrix.mjs +3 -1
  683. package/scripts/_dbg-render-regression.mjs +67 -25
  684. package/scripts/_lib-aml-python-run.mjs +17 -0
  685. package/scripts/_lint-reflow.mjs +105 -0
  686. package/scripts/_probe-model-channel-link.cjs +25 -0
  687. package/scripts/acceptance-aml-hybrid-e2e.ts +396 -0
  688. package/scripts/acceptance-aml-hybrid-twin.ts +3 -3
  689. package/scripts/acceptance-aml-model-identity.ts +137 -0
  690. package/scripts/dev-guard.mjs +4 -2
  691. package/scripts/dev-protocol-simulators.mjs +3 -2
  692. package/scripts/e2e-aml-decoupled.mjs +162 -0
  693. package/scripts/e2e-closedloop/scenarios-accounts.mjs +2 -0
  694. package/scripts/e2e-closedloop/scenarios-authz.mjs +12 -6
  695. package/scripts/e2e-closedloop/scenarios-daq-dcw.mjs +4 -1
  696. package/scripts/e2e-timezone-settings.mjs +57 -0
  697. package/scripts/live-aml-mockomp.mjs +304 -0
  698. package/scripts/live-aml-optloop-resume.mjs +322 -0
  699. package/scripts/live-aml-optloop.mjs +545 -0
  700. package/scripts/live-aml-stage9.mjs +169 -0
  701. package/scripts/live-aml-two-goals.mjs +315 -0
  702. package/scripts/live-optloop-two-modes.mjs +857 -0
  703. package/scripts/start.mjs +3 -1
  704. package/scripts/test-aw-skills.mjs +102 -0
  705. package/scripts/test-twin-plugin-sdk.mjs +30 -0
  706. package/sdk/context.mjs +305 -0
  707. package/sdk/index.d.mts +149 -0
  708. package/sdk/index.mjs +5 -2
  709. package/server/api/system/timezone.get.ts +20 -0
  710. package/server/api/workshop/agent-tools/bindings/[id].patch.ts +28 -23
  711. package/server/api/workshop/aml/jobs/index.post.ts +74 -44
  712. package/server/api/workshop/aml/training-plans/[id]/train.post.ts +18 -0
  713. package/server/api/workshop/aml/training-plans/[id].delete.ts +18 -0
  714. package/server/api/workshop/aml/training-plans/[id].patch.ts +30 -0
  715. package/server/api/workshop/aml/training-plans/index.get.ts +9 -0
  716. package/server/api/workshop/aml/training-plans/index.post.ts +43 -0
  717. package/server/api/workshop/aml/twin/providers.get.ts +33 -0
  718. package/server/api/workshop/channel-templates/[id]/instantiate.post.ts +8 -2
  719. package/server/api/workshop/channels/[id]/twin-profile.get.ts +45 -0
  720. package/server/api/workshop/channels/[id]/twin-profile.patch.ts +72 -0
  721. package/server/plugins/00-local-time.ts +13 -10
  722. package/server/plugins/aml-twin-worker.ts +32 -0
  723. package/server/plugins/aw-plugins.ts +16 -0
  724. package/server/plugins/workshop.ts +21 -0
  725. package/server/plugins-builtin/twin-injection-default/index.mjs +23 -0
  726. package/server/services/system-config/helpers.ts +42 -41
  727. package/server/services/system-config/recompute.ts +68 -66
  728. package/server/services/workshop/agents/host-tool-bridge/catalog.ts +50 -18
  729. package/server/services/workshop/agents/host-tool-bridge/dispatch.ts +51 -5
  730. package/server/services/workshop/agents/host-tool-bridge/tools/industrial.ts +19 -6
  731. package/server/services/workshop/agents/industrial/aml-dataset-tools.ts +276 -276
  732. package/server/services/workshop/agents/industrial/aml-job-tools.ts +549 -363
  733. package/server/services/workshop/agents/industrial/audit-query.ts +30 -0
  734. package/server/services/workshop/agents/industrial/dcw-judge-tools.ts +9 -13
  735. package/server/services/workshop/agents/industrial/dcw-tools.ts +208 -213
  736. package/server/services/workshop/agents/industrial/index.ts +3 -2
  737. package/server/services/workshop/agents/industrial/manual-approval.ts +45 -0
  738. package/server/services/workshop/agents/industrial/ops-tools.ts +370 -382
  739. package/server/services/workshop/agents/industrial/optimization-tools.ts +148 -0
  740. package/server/services/workshop/agents/industrial/param-tools.ts +169 -172
  741. package/server/services/workshop/agents/industrial/twin-tools.ts +618 -61
  742. package/server/services/workshop/agents/industrial-context.ts +4 -2
  743. package/server/services/workshop/agents/node-bindings.repo.ts +35 -2
  744. package/server/services/workshop/agents/tool-classes.ts +28 -0
  745. package/server/services/workshop/aml/aml.repo.ts +412 -386
  746. package/server/services/workshop/aml/job-orchestrator/stages.ts +108 -96
  747. package/server/services/workshop/aml/job-orchestrator/start-job.ts +29 -5
  748. package/server/services/workshop/aml/job-orchestrator/submit.ts +36 -1
  749. package/server/services/workshop/aml/model-registry.ts +265 -175
  750. package/server/services/workshop/aml/predictor.ts +336 -262
  751. package/server/services/workshop/aml/python/__pycache__/aml_eval.cpython-312.pyc +0 -0
  752. package/server/services/workshop/aml/python/__pycache__/amlkit.cpython-312.pyc +0 -0
  753. package/server/services/workshop/aml/python/__pycache__/train-example.cpython-312.pyc +0 -0
  754. package/server/services/workshop/aml/python/__pycache__/train-hybrid-example.cpython-312.pyc +0 -0
  755. package/server/services/workshop/aml/python/aml_eval.py +39 -6
  756. package/server/services/workshop/aml/python/amlkit.py +222 -3
  757. package/server/services/workshop/aml/python/train-hybrid-example.py +278 -32
  758. package/server/services/workshop/aml/runtime.ts +4 -3
  759. package/server/services/workshop/aml/twin/acceptance.ts +26 -0
  760. package/server/services/workshop/aml/twin/binding-snapshot.ts +603 -0
  761. package/server/services/workshop/aml/twin/calibration-worker.ts +150 -0
  762. package/server/services/workshop/aml/twin/channel-profile.ts +80 -7
  763. package/server/services/workshop/aml/twin/contracts.ts +3 -0
  764. package/server/services/workshop/aml/twin/declarative-provider.ts +108 -0
  765. package/server/services/workshop/aml/twin/feature-flags.ts +63 -0
  766. package/server/services/workshop/aml/twin/hybrid-provider.ts +86 -0
  767. package/server/services/workshop/aml/twin/model-backed-provider.ts +332 -0
  768. package/server/services/workshop/aml/twin/physics-spec-draft.ts +185 -0
  769. package/server/services/workshop/aml/twin/physics-spec.ts +338 -0
  770. package/server/services/workshop/aml/twin/prompt-composer.ts +143 -0
  771. package/server/services/workshop/aml/twin/provider-contracts.ts +98 -34
  772. package/server/services/workshop/aml/twin/provider-health.ts +69 -8
  773. package/server/services/workshop/aml/twin/provider-loader.ts +76 -45
  774. package/server/services/workshop/aml/twin/provider-registry.ts +670 -49
  775. package/server/services/workshop/aml/twin/repo.ts +63 -4
  776. package/server/services/workshop/aml/twin/scene-builder.ts +118 -0
  777. package/server/services/workshop/aml/twin/scene-lifecycle.ts +60 -0
  778. package/server/services/workshop/aml/twin/snapshot-service.ts +395 -22
  779. package/server/services/workshop/aml/twin/training-plans.ts +260 -0
  780. package/server/services/workshop/aml/twin/trial-service.ts +97 -13
  781. package/server/services/workshop/aml/twin/write-guard.ts +20 -0
  782. package/server/services/workshop/daq/daq-controller/state.ts +8 -5
  783. package/server/services/workshop/daq/drivers/registry.ts +116 -144
  784. package/server/services/workshop/db/database/migrations.ts +40 -0
  785. package/server/services/workshop/db/database/open.ts +4 -1
  786. package/server/services/workshop/db/database/schema.ts +68 -1
  787. package/server/services/workshop/db/database/seed.ts +22 -0
  788. package/server/services/workshop/db/readonly.ts +30 -0
  789. package/server/services/workshop/dcw/dcw-controller/crud.ts +162 -152
  790. package/server/services/workshop/dcw/dcw-controller/helpers.ts +61 -57
  791. package/server/services/workshop/dcw/dcw-controller/types.ts +61 -57
  792. package/server/services/workshop/dcw/dcw-controller/write-audit.ts +49 -0
  793. package/server/services/workshop/dcw/dcw-controller/write.ts +137 -147
  794. package/server/services/workshop/dcw/dcw-node.ts +18 -2
  795. package/server/services/workshop/dcw/dcw-recipe.repo.ts +5 -0
  796. package/server/services/workshop/dcw/dcw-runtime.ts +9 -3
  797. package/server/services/workshop/dcw/drivers/index.ts +2 -1
  798. package/server/services/workshop/dcw/drivers/modbus-rtu.ts +85 -93
  799. package/server/services/workshop/dcw/drivers/modbus.ts +131 -139
  800. package/server/services/workshop/dcw/drivers/opcua.ts +103 -110
  801. package/server/services/workshop/dcw/drivers/registry.ts +25 -45
  802. package/server/services/workshop/dcw/drivers/shared.ts +24 -6
  803. package/server/services/workshop/dcw/param-limits.ts +193 -142
  804. package/server/services/workshop/dcw/param-map.repo.ts +318 -305
  805. package/server/services/workshop/plugin-driver-registry.ts +108 -0
  806. package/server/services/workshop/runtime/manager/admin-channel.ts +13 -0
  807. package/server/services/workshop/runtime/manager/channel-templates.ts +29 -2
  808. package/server/services/workshop/runtime/manager/runtime-wiring.ts +8 -0
  809. package/server/services/workshop/runtime/permission-scope.ts +79 -81
  810. package/server/services/workshop/runtime/schedule-runtime.ts +33 -6
  811. package/server/utils/errors.ts +8 -0
  812. package/shared/config/engine.mjs +5 -0
  813. package/shared/config/home.mjs +15 -20
  814. package/shared/config/schema.json +135 -133
  815. package/shared/dcw-protocol/line.ts +133 -131
  816. package/shared/dcw-protocol/recipe.ts +311 -301
  817. package/shared/local-time.mjs +116 -36
  818. package/.output/public/_nuxt/-hB4kEmt.js +0 -1
  819. package/.output/public/_nuxt/74x7BOWv2.js +0 -1
  820. package/.output/public/_nuxt/9c5GOgbu.js +0 -1
  821. package/.output/public/_nuxt/BHwG4yNs.js +0 -1
  822. package/.output/public/_nuxt/BIOq3xqe2.js +0 -1
  823. package/.output/public/_nuxt/BL_dbd2v2.js +0 -1
  824. package/.output/public/_nuxt/BNnnYEYh2.js +0 -1
  825. package/.output/public/_nuxt/BxYTM0hb.js +0 -1
  826. package/.output/public/_nuxt/C3twEwTh2.js +0 -1
  827. package/.output/public/_nuxt/CGZVhYJ4.js +0 -1
  828. package/.output/public/_nuxt/CJRDL4EG.js +0 -1
  829. package/.output/public/_nuxt/CKQPwwZa2.js +0 -1
  830. package/.output/public/_nuxt/CeWnOF3O.js +0 -1
  831. package/.output/public/_nuxt/ChoLwR-s.js +0 -1
  832. package/.output/public/_nuxt/DGw8juu_.js +0 -2
  833. package/.output/public/_nuxt/DJdDFnjG2.js +0 -1
  834. package/.output/public/_nuxt/DXIaadqv.js +0 -1
  835. package/.output/public/_nuxt/D_7AzAWe.js +0 -1
  836. package/.output/public/_nuxt/DdvQ7LRI.js +0 -14
  837. package/.output/public/_nuxt/DeYsUzhr.js +0 -1
  838. package/.output/public/_nuxt/DkLCjrCk2.js +0 -47
  839. package/.output/public/_nuxt/DpqA8D8_.js +0 -1
  840. package/.output/public/_nuxt/DqtgGFEc.js +0 -1
  841. package/.output/public/_nuxt/Dy3oXKdn2.js +0 -1
  842. package/.output/public/_nuxt/PLGqdko0.js +0 -1
  843. package/.output/public/_nuxt/U8oQxruK.js +0 -1
  844. package/.output/public/_nuxt/WleoCtUX.js +0 -1
  845. package/.output/public/_nuxt/ZvXovq7N2.js +0 -1
  846. package/.output/public/_nuxt/_id_.Bossmhv1.css +0 -1
  847. package/.output/public/_nuxt/_wsId_.D-u-dbP9.css +0 -1
  848. package/.output/public/_nuxt/aml.Bi5X6_oi.css +0 -1
  849. package/.output/public/_nuxt/builds/meta/0530cee1-fff5-4025-a6f4-5708b6534608.json +0 -1
  850. package/.output/public/_nuxt/cDcDztgb2.js +0 -1
  851. package/.output/public/_nuxt/e7BBCLxr.js +0 -1
  852. package/.output/public/_nuxt/hkMGMTqt.js +0 -1
  853. package/.output/public/_nuxt/ikAUnxx3.js +0 -1
  854. package/.output/public/_nuxt/y9kob70X.js +0 -1
  855. package/.output/server/chunks/_/env-manager.mjs +0 -162
  856. package/.output/server/chunks/_/env-manager.mjs.map +0 -1
  857. package/.output/server/chunks/build/_id_-DgMpjM3_.mjs.map +0 -1
  858. package/.output/server/chunks/build/_id_-Dv3BQbYV.mjs.map +0 -1
  859. package/.output/server/chunks/build/_wsId_-BKJvFmyf.mjs.map +0 -1
  860. package/.output/server/chunks/build/aml-DdWicH3t.mjs.map +0 -1
  861. package/.output/server/chunks/build/client-only-qNA2OVV_.mjs +0 -43
  862. package/.output/server/chunks/build/client-only-qNA2OVV_.mjs.map +0 -1
  863. package/.output/server/chunks/build/daq-CPtsh0e7.mjs.map +0 -1
  864. package/.output/server/chunks/build/logs-CeaiO3y9.mjs.map +0 -1
  865. package/.output/server/chunks/build/pages-Bn90ijKD.mjs.map +0 -1
  866. package/.output/server/chunks/build/settings-DVAUVMsX.mjs.map +0 -1
  867. package/.output/server/chunks/build/useAmlJobs-DBuLvWMF.mjs.map +0 -1
  868. package/.output/server/chunks/build/useDcwAddNode-C8nE7geh.mjs.map +0 -1
  869. package/.output/server/chunks/build/useDcwRecipes-BzGOymqz.mjs.map +0 -1
  870. package/.output/server/chunks/build/useDcwWrites-3RxwN36I.mjs.map +0 -1
  871. package/.output/server/chunks/build/useLocalTime-9a4B-aHv.mjs +0 -35
  872. package/.output/server/chunks/build/useLocalTime-9a4B-aHv.mjs.map +0 -1
  873. package/.output/server/chunks/build/useMonitorData-CEpKXoD4.mjs.map +0 -1
  874. package/.output/server/chunks/build/useMonitorFormat-_7zLapf3.mjs.map +0 -1
  875. package/.output/server/chunks/build/useWorkbenchWorkspaces-B_2mOxN6.mjs.map +0 -1
  876. package/.output/server/chunks/build/useWorkshopWs-B-Es2Xg3.mjs.map +0 -1
  877. package/.output/server/chunks/build/useWorkspaceChannels-BwB6TAWY.mjs.map +0 -1
  878. package/.output/server/chunks/build/workshop-CmgpTwyf.mjs.map +0 -1
  879. /package/.output/public/_nuxt/{B2x8SKRO.js → B2x8SKRO2.js} +0 -0
  880. /package/.output/public/_nuxt/{BzvHUfRR2.js → BzvHUfRR.js} +0 -0
  881. /package/.output/public/_nuxt/{DPUXbTg92.js → DPUXbTg9.js} +0 -0
  882. /package/.output/public/_nuxt/{DdNujZN5.js → DdNujZN52.js} +0 -0
  883. /package/.output/public/_nuxt/{DlUQa0wn2.js → DlUQa0wn.js} +0 -0
  884. /package/.output/public/_nuxt/{Du9v6qGB.js → Du9v6qGB2.js} +0 -0
  885. /package/.output/public/_nuxt/{TOWR4WpO.js → TOWR4WpO2.js} +0 -0
  886. /package/.output/public/_nuxt/{cBI0JqsV2.js → cBI0JqsV.js} +0 -0
  887. /package/.output/public/_nuxt/{zh-S_7rN.js → zh-S_7rN2.js} +0 -0
@@ -0,0 +1,796 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * mcp/aw-mcp-server.mjs —— AgentWorkShop 工业 MCP server(stdio,零依赖)。
4
+ *
5
+ * 与 server/harness/aw-mcp-bridge.mjs(host tools 回程桥,面向频道内 agent)不同,
6
+ * 本 server 面向 **外部 skill / MCP 客户端 / 工程师工作台**:把平台 REST 的关键方法
7
+ * (产线/节点绑定/参数映射/配方开跑/频道与优化闭环/插件管理)暴露为一等 MCP 工具,
8
+ * 并 **自动发现本机运行实例的端口**(锁文件 → 惯例端口 → config.yml,见 discovery.mjs),
9
+ * 连接中断自动重发现 —— 挂上就能用,不要求手填端口。
10
+ *
11
+ * 启动: aw mcp (或 node mcp/aw-mcp-server.mjs)
12
+ * 诊断: aw mcp --doctor
13
+ * 客户端配置: aw mcp --print-config
14
+ *
15
+ * 环境变量(全部可选):
16
+ * AW_BASE_URL 显式平台地址(跳过自动发现)
17
+ * AW_PORT 多实例并存时钉住端口
18
+ * AW_HOME home 级配置根(锁文件发现用)
19
+ * AW_TOKEN 直接带 token(优先)
20
+ * AW_EMAIL / AW_PASSWORD 自动登录(首次鉴权调用时懒登录)
21
+ * AW_MCP_TIMEOUT_MS 默认工具 HTTP 超时(默认 30000)
22
+ *
23
+ * 协议:MCP stdio(JSON-RPC 2.0,逐行),与 aw-mcp-bridge 同款约定。
24
+ */
25
+ import { createInterface } from 'node:readline'
26
+ import { resolve } from 'node:path'
27
+ import { pathToFileURL } from 'node:url'
28
+ import { discoverInstance, discoverWithReport, readMcpEnabled } from './discovery.mjs'
29
+
30
+ const DEFAULT_TIMEOUT_MS = Number(process.env.AW_MCP_TIMEOUT_MS ?? 30_000)
31
+ const INVOKE_TIMEOUT_MS = 200_000 // agent 工具可能阻塞(HITL 审批 180s)
32
+
33
+ /** 会话状态:createState 一次,handleMessage 复用 */
34
+ export function createState(opts = {}) {
35
+ const env = opts.env ?? process.env
36
+ return {
37
+ env,
38
+ cwd: opts.cwd ?? process.cwd(),
39
+ base: opts.env?.AW_BASE_URL ? opts.env.AW_BASE_URL.replace(/\/$/, '') : null,
40
+ port: null,
41
+ source: null,
42
+ token: env.AW_TOKEN ?? null,
43
+ user: null,
44
+ loginError: null,
45
+ }
46
+ }
47
+
48
+ export class AuthRequiredError extends Error {}
49
+
50
+ /** 登录被拒(凭据错误/账号不存在)——不是网络问题,不得触发端口重发现 */
51
+ export class LoginError extends Error {}
52
+
53
+ /** fetch 网络层失败(连接拒绝/超时),才值得作废 base 重发现 */
54
+ function isNetworkError(err) {
55
+ return err instanceof TypeError || err?.name === 'AbortError' || err?.name === 'TimeoutError'
56
+ }
57
+
58
+ // ── 平台 HTTP ──────────────────────────────────────────────
59
+
60
+ async function ensureBase(state) {
61
+ if (state.base) return state.base
62
+ const found = await discoverInstance({ cwd: state.cwd, env: state.env })
63
+ if (!found) {
64
+ throw new Error('未发现运行中的 AgentWorkShop 实例(已探测锁文件/惯例端口/config.yml)。请先 aw start,或为 MCP 进程设置 AW_BASE_URL / AW_PORT。')
65
+ }
66
+ state.base = found.base
67
+ state.port = found.port
68
+ state.source = found.source
69
+ return state.base
70
+ }
71
+
72
+ export async function doLogin(state, email, password) {
73
+ const base = await ensureBase(state)
74
+ const res = await fetch(`${base}/api/users/login`, {
75
+ method: 'POST',
76
+ headers: { 'content-type': 'application/json' },
77
+ body: JSON.stringify({ email, password }),
78
+ signal: AbortSignal.timeout(DEFAULT_TIMEOUT_MS),
79
+ })
80
+ const json = await res.json().catch(() => null)
81
+ if (!res.ok || !json?.data?.token) {
82
+ throw new LoginError(`登录失败(HTTP ${res.status}): ${json?.message ?? res.statusText}`)
83
+ }
84
+ state.token = json.data.token
85
+ state.user = json.data.user ?? null
86
+ state.loginError = null
87
+ return { user: state.user }
88
+ }
89
+
90
+ async function ensureToken(state) {
91
+ if (state.token) return state.token
92
+ const email = state.env.AW_EMAIL
93
+ const password = state.env.AW_PASSWORD
94
+ if (!email || !password) {
95
+ throw new AuthRequiredError('未鉴权:请先调用 aw_login 工具,或为 MCP 进程设置 AW_EMAIL + AW_PASSWORD(或 AW_TOKEN)环境变量。实例若从未初始化管理员,先用 /setup 注册(首注册即 admin)。')
96
+ }
97
+ await doLogin(state, email, password)
98
+ return state.token
99
+ }
100
+
101
+ /**
102
+ * 统一平台调用。返回 { ok, status, data, message }。
103
+ * - 网络层失败:作废 base 自动重发现一次再重试("确保连接")
104
+ * - 401:作废 token 懒重登录一次再重试
105
+ */
106
+ export async function apiCall(state, method, path, body, opts = {}) {
107
+ const { timeoutMs = DEFAULT_TIMEOUT_MS, auth = true } = opts
108
+ const doFetch = async () => {
109
+ // base 每次 fetch 时重新解析(闭包不得缓存:重发现后旧 base 即刻失效)
110
+ const base = await ensureBase(state)
111
+ const headers = { 'content-type': 'application/json' }
112
+ if (auth) headers.authorization = `Bearer ${await ensureToken(state)}`
113
+ return fetch(`${base}${path}`, {
114
+ method,
115
+ headers,
116
+ body: body === undefined ? undefined : JSON.stringify(body),
117
+ signal: AbortSignal.timeout(timeoutMs),
118
+ })
119
+ }
120
+ let res
121
+ try {
122
+ res = await doFetch()
123
+ }
124
+ catch (err) {
125
+ if (!isNetworkError(err)) throw err // 登录失败/未鉴权等业务错误直接上抛
126
+ // 连接断了:重新发现端口再试一次(实例可能顺延换端口)
127
+ state.base = null
128
+ state.port = null
129
+ state.source = null
130
+ const base2 = await ensureBase(state)
131
+ try {
132
+ res = await doFetch()
133
+ }
134
+ catch (err2) {
135
+ throw new Error(`平台不可达(重发现后 ${base2} 仍失败): ${err2?.message ?? err?.message}`, { cause: err2 })
136
+ }
137
+ }
138
+ if (res.status === 401 && auth) {
139
+ state.token = null
140
+ await ensureToken(state)
141
+ res = await doFetch()
142
+ }
143
+ const json = await res.json().catch(() => null)
144
+ return {
145
+ ok: res.ok,
146
+ status: res.status,
147
+ // 信封嗅探:绝大多数端点走 defineApiHandler({code,message,data}),
148
+ // 少数(如 GET /api/workshop/plugins)是裸 defineEventHandler 直返载荷
149
+ data: isEnvelope(json) ? json.data : json,
150
+ message: json?.message ?? res.statusText,
151
+ }
152
+ }
153
+
154
+ function isEnvelope(json) {
155
+ return json != null && typeof json === 'object' && !Array.isArray(json) && 'code' in json && 'data' in json
156
+ }
157
+
158
+ // ── 工具注册表 ──────────────────────────────────────────────
159
+
160
+ const obj = (properties = {}, required = []) => ({ type: 'object', properties, required, additionalProperties: true })
161
+ const s = (description, type = 'string') => ({ type, description })
162
+
163
+ /** 结果包装:成功吐 JSON 文本;失败 isError */
164
+ function ok(data) {
165
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }
166
+ }
167
+ function fail(message) {
168
+ return { content: [{ type: 'text', text: String(message) }], isError: true }
169
+ }
170
+
171
+ /** 生成"调 REST → 包装结果"的处理器 */
172
+ function rest(method, pathOf, { timeoutMs, auth = true, bodyOf } = {}) {
173
+ return async (args, state) => {
174
+ const path = typeof pathOf === 'function' ? pathOf(args) : pathOf
175
+ const body = method === 'GET' ? undefined : (bodyOf ? bodyOf(args) : args)
176
+ const r = await apiCall(state, method, path, body, { timeoutMs, auth })
177
+ if (!r.ok) return fail(`${method} ${path} → HTTP ${r.status}: ${r.message}`)
178
+ return ok(r.data)
179
+ }
180
+ }
181
+
182
+ function queryOf(args) {
183
+ const qs = new URLSearchParams()
184
+ for (const [k, v] of Object.entries(args ?? {})) {
185
+ if (v === undefined || v === null || k === 'body') continue
186
+ qs.set(k, String(v))
187
+ }
188
+ const q = qs.toString()
189
+ return q ? `?${q}` : ''
190
+ }
191
+
192
+ /** 摘掉路径参数后的剩余字段作 body(路径参数不属于请求体) */
193
+ function omit(obj, ...keys) {
194
+ const copy = { ...obj }
195
+ for (const k of keys) delete copy[k]
196
+ return copy
197
+ }
198
+
199
+ /**
200
+ * 工具面(35 个)—— 按三个 skill 的标准流程分组:
201
+ * 连接:aw_status / aw_login
202
+ * 节点绑定:aw_line_* / aw_product_create / aw_recipe_create / aw_dcw_* / aw_param_* / aw_daq_*
203
+ * 优化 channel:aw_channel_* / aw_team_provision / aw_agent_tool_* / aw_twin_profile_* / aw_task_* / aw_model_* / aw_optimization_judge
204
+ * 插件:aw_plugin_list / aw_plugin_toggle
205
+ * 逃生舱:aw_request(限 /api/ 前缀)
206
+ */
207
+ export function buildToolDefs() {
208
+ const defs = [
209
+ // ── 连接与鉴权 ──
210
+ {
211
+ name: 'aw_status',
212
+ description: '发现并探测本机 AgentWorkShop 实例:返回实际端口/发现来源/健康摘要/鉴权状态。任何流程的第一步。',
213
+ inputSchema: obj(),
214
+ run: async (_args, state) => {
215
+ const report = await discoverWithReport({ cwd: state.cwd, env: state.env })
216
+ if (!report.hit) {
217
+ state.base = null
218
+ return fail(`未发现运行实例。探测记录:\n${JSON.stringify(report.candidates, null, 2)}`)
219
+ }
220
+ state.base = report.hit.base
221
+ state.port = report.hit.base ? Number(new URL(report.hit.base).port) || null : null
222
+ state.source = report.hit.source
223
+ let setup
224
+ try {
225
+ const r = await apiCall(state, 'GET', '/api/users/setup-status', undefined, { auth: false })
226
+ setup = r.data
227
+ }
228
+ catch {
229
+ setup = null
230
+ }
231
+ return ok({
232
+ base: report.hit.base,
233
+ port: state.port,
234
+ discoveredVia: report.hit.source,
235
+ health: report.hit.health,
236
+ needsSetup: setup?.needsSetup ?? null,
237
+ authed: Boolean(state.token),
238
+ mcpEnabled: isMcpEnabled(state),
239
+ mcpEnableHint: '系统设置 → MCP 集成 → 启动 MCP 集成(或 env AW_MCP_ENABLED=true)',
240
+ user: state.user,
241
+ candidates: report.candidates,
242
+ })
243
+ },
244
+ },
245
+ {
246
+ name: 'aw_login',
247
+ description: '登录平台换取 token(email 或用户名 + 密码;缺省回落 AW_EMAIL/AW_PASSWORD 环境变量)。返回当前用户。',
248
+ inputSchema: obj({
249
+ email: s('邮箱或用户名(缺省用环境变量 AW_EMAIL)'),
250
+ password: s('密码(缺省用环境变量 AW_PASSWORD;不会回显)'),
251
+ }),
252
+ run: async (args, state) => {
253
+ const email = args?.email ?? state.env.AW_EMAIL
254
+ const password = args?.password ?? state.env.AW_PASSWORD
255
+ if (!email || !password) return fail('缺少凭据:请传 email/password,或设置 AW_EMAIL/AW_PASSWORD 环境变量。')
256
+ try {
257
+ const { user } = await doLogin(state, email, password)
258
+ return ok({ user, authed: true })
259
+ }
260
+ catch (err) {
261
+ state.loginError = err.message
262
+ return fail(err.message)
263
+ }
264
+ },
265
+ },
266
+
267
+ // ── 产线 / 产品 / 配方(执行侧)──
268
+ {
269
+ name: 'aw_line_list',
270
+ description: '产线列表(含运行状态)。返回 data 为产线数组。',
271
+ inputSchema: obj(),
272
+ run: rest('GET', '/api/workshop/dcw/lines'),
273
+ },
274
+ {
275
+ name: 'aw_line_create',
276
+ description: '新建产线。{ name, color?, description? } → 返回 { line }。',
277
+ inputSchema: obj({ name: s('产线名', 'string'), color: s('颜色,如 #35e0a0'), description: s('描述') }, ['name']),
278
+ run: rest('POST', '/api/workshop/dcw/lines'),
279
+ },
280
+ {
281
+ name: 'aw_line_start',
282
+ description: '产线开跑:按配方逐参数下发并激活打标采集窗。{ lineId, recipeId }(recipe 须属本产线产品)。',
283
+ inputSchema: obj({ lineId: s('产线 id'), recipeId: s('配方 id') }, ['lineId', 'recipeId']),
284
+ run: async (args, state) => {
285
+ const r = await apiCall(state, 'POST', `/api/workshop/dcw/lines/${args.lineId}/start`, { recipeId: args.recipeId })
286
+ if (!r.ok) return fail(`开跑失败 → HTTP ${r.status}: ${r.message}`)
287
+ return ok(r.data)
288
+ },
289
+ },
290
+ {
291
+ name: 'aw_line_stop',
292
+ description: '停线(停止采集/关闭打标窗)。{ lineId }。',
293
+ inputSchema: obj({ lineId: s('产线 id') }, ['lineId']),
294
+ run: async (args, state) => {
295
+ const r = await apiCall(state, 'POST', `/api/workshop/dcw/lines/${args.lineId}/stop`, {})
296
+ if (!r.ok) return fail(`停线失败 → HTTP ${r.status}: ${r.message}`)
297
+ return ok(r.data)
298
+ },
299
+ },
300
+ {
301
+ name: 'aw_product_create',
302
+ description: '创建产品(产线隔离顶层归属)。{ lineId, name, description?, paramLimits? }(paramLimits: 参数 key → {min,max},仅可收窄)。',
303
+ inputSchema: obj({ lineId: s('产线 id'), name: s('产品名'), description: s('描述'), paramLimits: s('参数限界对象', 'object') }, ['lineId', 'name']),
304
+ run: async (args, state) => {
305
+ const { lineId, ...body } = args
306
+ const r = await apiCall(state, 'POST', '/api/workshop/dcw/products', { ...body, lineId })
307
+ if (!r.ok) return fail(`创建产品失败 → HTTP ${r.status}: ${r.message}`)
308
+ return ok(r.data)
309
+ },
310
+ },
311
+ {
312
+ name: 'aw_recipe_create',
313
+ description: '创建配方(节点级参数绑定)。{ productId?, name, description?, params?: [{nodeId, value, min?, max?, stepLimit?}], daqWindows?: [{nodeId, min?, max?}] }。description 是配方的元字段:用一句话写明目标工况(如「目标:膜厚 50±2μm;线速 99/模口 0.97;探索收敛于 2026-09-27」),便于按目标检索与区分不同目标保存的配方。',
314
+ inputSchema: obj({
315
+ productId: s('产品 id'),
316
+ name: s('配方名'),
317
+ description: s('配方描述(元字段):优化目标/工况要点/来源,建议一句话讲清"这个配方是为了什么"'),
318
+ params: s('参数绑定数组', 'array'),
319
+ daqWindows: s('数采监控窗口数组', 'array'),
320
+ }, ['name']),
321
+ run: rest('POST', '/api/workshop/dcw/recipes'),
322
+ },
323
+ {
324
+ name: 'aw_recipe_list',
325
+ description: '配方列表(含 description 元字段/params/版本/lastGoodRunId)+ 批次列表。{ productId?, lineId? } 过滤可选。用于核对"不同目标保存的不同配方"。',
326
+ inputSchema: obj({ productId: s('按产品过滤'), lineId: s('按产线过滤') }),
327
+ run: async (args, state) => {
328
+ const r = await apiCall(state, 'GET', '/api/workshop/dcw/recipes', undefined)
329
+ if (!r.ok) return fail(`HTTP ${r.status}: ${r.message}`)
330
+ const data = r.data ?? {}
331
+ let recipes = Array.isArray(data) ? data : (data.recipes ?? [])
332
+ if (args.productId) recipes = recipes.filter(x => x.productId === args.productId)
333
+ if (args.lineId) recipes = recipes.filter(x => x.lineId === args.lineId)
334
+ return ok({ recipes: recipes.map(x => ({ id: x.id, name: x.name, description: x.description, productId: x.productId, lineId: x.lineId, params: x.params, version: x.version, lastGoodRunId: x.lastGoodRunId ?? null })), runs: data.runs ?? [] })
335
+ },
336
+ },
337
+ {
338
+ name: 'aw_recipe_update',
339
+ description: '编辑配方(params 变更自动版本化入史;description/name 可直接改)。{ id, name?, description?, params? }。优化收敛后用本工具把最佳参数与目标描述写回配方。',
340
+ inputSchema: obj({
341
+ id: s('配方 id'),
342
+ name: s('新名称'),
343
+ description: s('新描述(元字段)'),
344
+ params: s('新参数绑定数组(自动版本化)', 'array'),
345
+ }, ['id']),
346
+ run: async (args, state) => {
347
+ const { id, ...body } = args
348
+ const r = await apiCall(state, 'PATCH', `/api/workshop/dcw/recipes/${id}`, body)
349
+ if (!r.ok) return fail(`更新被拒 → HTTP ${r.status}: ${r.message}`)
350
+ return ok(r.data)
351
+ },
352
+ },
353
+ {
354
+ name: 'aw_recipe_mark_good',
355
+ description: '标记已知良好批次(lastGoodRunId,回退/基准恢复的目标)。{ id, runId }。',
356
+ inputSchema: obj({ id: s('配方 id'), runId: s('批次 id(该配方的已完结批次)') }, ['id', 'runId']),
357
+ run: async (args, state) => {
358
+ const r = await apiCall(state, 'POST', `/api/workshop/dcw/recipes/${args.id}/mark-good`, { runId: args.runId })
359
+ if (!r.ok) return fail(`标记失败 → HTTP ${r.status}: ${r.message}`)
360
+ return ok(r.data)
361
+ },
362
+ },
363
+
364
+ // ── DCW 写控制节点与参数映射 ──
365
+ {
366
+ name: 'aw_dcw_snapshot',
367
+ description: 'DCW 全量快照:controller/nodes/params/templates/drivers/recipes/runs/products/lines。查模板 ref 与现有拓扑的标准入口。',
368
+ inputSchema: obj(),
369
+ run: rest('GET', '/api/workshop/dcw'),
370
+ },
371
+ {
372
+ name: 'aw_dcw_create',
373
+ description: '创建写控制节点(PLC 执行面)。必填 templateRef(模板 ref,如 dcw-temp-sp);driver+driverConfig 必须取自模拟器 export 或真实设备规约,禁止手抄;建议显式传 lineId/unit/min/max/decimals/holdIntervalMs。节点创建即自动生成同名工艺参数映射。',
374
+ inputSchema: obj({
375
+ templateRef: s('模板 ref(dcw-<key>)'),
376
+ name: s('节点名'),
377
+ lineId: s('所属产线 id'),
378
+ driver: s('驱动:modbus-tcp | modbus-rtu | opcua | mqtt | http'),
379
+ driverConfig: s('驱动配置对象(取自设备 export)', 'object'),
380
+ unit: s('工程单位'), min: s('量程下限', 'number'), max: s('量程上限', 'number'), decimals: s('小数位(量化精度)', 'number'),
381
+ holdIntervalMs: s('保持周期 ms', 'number'), readIntervalMs: s('回读周期 ms', 'number'), writeLockSeconds: s('写锁秒数', 'number'), stepLimit: s('单步限幅', 'number'),
382
+ semantics: s('工艺语义文案'),
383
+ transform: s('量程变换 {kind,scale,offset}', 'object'),
384
+ }, ['templateRef']),
385
+ run: rest('POST', '/api/workshop/dcw'),
386
+ },
387
+ {
388
+ name: 'aw_dcw_write',
389
+ description: '节点直写(核心写命令,四层限界联锁生效,越界 400 并点名约束层)。{ id, value }。',
390
+ inputSchema: obj({ id: s('节点 id'), value: s('工程量纲目标值', 'number') }, ['id', 'value']),
391
+ run: async (args, state) => {
392
+ const r = await apiCall(state, 'POST', `/api/workshop/dcw/${args.id}/write`, { value: args.value })
393
+ if (!r.ok) return fail(`写入被拒 → HTTP ${r.status}: ${r.message}`)
394
+ return ok(r.data)
395
+ },
396
+ },
397
+ {
398
+ name: 'aw_dcw_read',
399
+ description: '读节点 PLC 实时值(被动观测免审批)。{ id }。',
400
+ inputSchema: obj({ id: s('节点 id') }, ['id']),
401
+ run: async (args, state) => {
402
+ const r = await apiCall(state, 'POST', `/api/workshop/dcw/${args.id}/read`, {})
403
+ if (!r.ok) return fail(`读失败 → HTTP ${r.status}: ${r.message}`)
404
+ return ok(r.data)
405
+ },
406
+ },
407
+ {
408
+ name: 'aw_param_list',
409
+ description: '工艺参数映射列表(语义面,不透出寄存器细节)。{ lineId?, limits? }(limits=1 附四层写入限界剖面)。',
410
+ inputSchema: obj({ lineId: s('按产线过滤'), limits: s('是否附限界剖面(1/0)') }),
411
+ run: async (args, state) => {
412
+ const r = await apiCall(state, 'GET', `/api/workshop/dcw/params${queryOf(args)}`, undefined)
413
+ if (!r.ok) return fail(`HTTP ${r.status}: ${r.message}`)
414
+ return ok(r.data)
415
+ },
416
+ },
417
+ {
418
+ name: 'aw_param_write',
419
+ description: '参数映射标准写入口(工程量纲;四层限界联锁:参数基准 ∩ 产品限界 ∩ 配方窗 ∩ 节点量程)。{ id, value }。',
420
+ inputSchema: obj({ id: s('参数映射 id'), value: s('工程量纲目标值', 'number') }, ['id', 'value']),
421
+ run: async (args, state) => {
422
+ const r = await apiCall(state, 'POST', `/api/workshop/dcw/params/${args.id}/write`, { value: args.value })
423
+ if (!r.ok) return fail(`写入被拒 → HTTP ${r.status}: ${r.message}`)
424
+ return ok(r.data)
425
+ },
426
+ },
427
+ {
428
+ name: 'aw_param_read',
429
+ description: '读参数映射当前工程量纲值。{ id }。',
430
+ inputSchema: obj({ id: s('参数映射 id') }, ['id']),
431
+ run: async (args, state) => {
432
+ const r = await apiCall(state, 'POST', `/api/workshop/dcw/params/${args.id}/read`, {})
433
+ if (!r.ok) return fail(`读失败 → HTTP ${r.status}: ${r.message}`)
434
+ return ok(r.data)
435
+ },
436
+ },
437
+
438
+ // ── DAQ 数采 ──
439
+ {
440
+ name: 'aw_daq_create',
441
+ description: '创建数采节点(观测面;不下发)。{ templateRef, name?, lineId?, driver?, driverConfig?, unit?, min?, max?, decimals?, warnLow?, warnHigh?, intervalMs?, semantics? }。',
442
+ inputSchema: obj({
443
+ templateRef: s('数采模板 ref(如 daq-temp-tc)'),
444
+ name: s('节点名'), lineId: s('所属产线 id'),
445
+ driver: s('驱动'), driverConfig: s('驱动配置对象', 'object'),
446
+ unit: s('单位'), min: s('量程下限', 'number'), max: s('量程上限', 'number'), decimals: s('小数位', 'number'),
447
+ warnLow: s('低警线', 'number'), warnHigh: s('高警线', 'number'), intervalMs: s('采样周期 ms', 'number'),
448
+ semantics: s('语义标注(场景编译 target 词表推断依据,建议写明"…质量输出")'),
449
+ }, ['templateRef']),
450
+ run: rest('POST', '/api/workshop/daq'),
451
+ },
452
+ {
453
+ name: 'aw_daq_controller',
454
+ description: '数采采集总控。{ action: start|stop|pause|resume|config, defaultIntervalMs? }。重启实例后必须显式 start;未开产线不采样是设计。',
455
+ inputSchema: obj({ action: s('start | stop | pause | resume | config'), defaultIntervalMs: s('默认采样周期 ms', 'number') }, ['action']),
456
+ run: rest('POST', '/api/workshop/daq/controller'),
457
+ },
458
+ {
459
+ name: 'aw_daq_samples',
460
+ description: '数采时序历史(点序新→旧!)。{ id, bucketMs?, limit?, from?, to? }。取时间窗口前先按 at 升序整理。',
461
+ inputSchema: obj({ id: s('数采节点 id'), bucketMs: s('桶化毫秒', 'number'), limit: s('条数上限', 'number'), from: s('起始 ISO 时间'), to: s('结束 ISO 时间') }, ['id']),
462
+ run: async (args, state) => {
463
+ const { id, ...query } = args
464
+ const r = await apiCall(state, 'GET', `/api/workshop/daq/${id}/samples${queryOf(query)}`, undefined)
465
+ if (!r.ok) return fail(`HTTP ${r.status}: ${r.message}`)
466
+ return ok(r.data)
467
+ },
468
+ },
469
+
470
+ // ── 场景优化 Channel 与闭环 ──
471
+ {
472
+ name: 'aw_channel_list',
473
+ description: '频道(Agent 团队)列表。',
474
+ inputSchema: obj(),
475
+ run: rest('GET', '/api/workshop/channels'),
476
+ },
477
+ {
478
+ name: 'aw_channel_create',
479
+ description: '直接创建频道。{ name, scenarioPrompt?, workspace? } → { channelId }。要建「优化闭环频道」优先用 aw_channel_template_instantiate。',
480
+ inputSchema: obj({ name: s('频道名'), scenarioPrompt: s('场景纪律 prompt'), workspace: s('工作目录') }, ['name']),
481
+ run: rest('POST', '/api/workshop/channels'),
482
+ },
483
+ {
484
+ name: 'aw_channel_template_list',
485
+ description: '频道模板列表(含内置 seed:chtpl-aml-optimization-default 工艺优化通道、chtpl-aml-training-default 训练通道等)。',
486
+ inputSchema: obj(),
487
+ run: rest('GET', '/api/workshop/channel-templates'),
488
+ },
489
+ {
490
+ name: 'aw_channel_template_instantiate',
491
+ description: '从模板实例化优化频道。{ id, name?, toolProfile?(\u0027aml_optimization\u0027等), controlPolicy?(\u0027recommendation_only\u0027|\u0027hitl_governed\u0027|\u0027bounded_auto\u0027), optimizationMode?(\u0027exploration\u0027|\u0027aml\u0027), boundModelId?, objective?, scene?, scenePackId?, providerId? } → { channelId, leadAgentId }。',
492
+ inputSchema: obj({
493
+ id: s('模板 id'),
494
+ name: s('新频道名'),
495
+ toolProfile: s('legacy | hybrid_twin | aml_training | aml_optimization'),
496
+ controlPolicy: s('recommendation_only | hitl_governed | bounded_auto'),
497
+ optimizationMode: s('exploration | aml'),
498
+ boundModelId: s('绑定 AML 模型 id(可选)'),
499
+ objective: s('优化目标对象', 'object'),
500
+ scene: s('场景对象 {sceneId,sceneVersion,lineId,productId,recipeId}', 'object'),
501
+ }, ['id']),
502
+ run: rest('POST', args => `/api/workshop/channel-templates/${args.id}/instantiate`, { bodyOf: args => omit(args, 'id') }),
503
+ },
504
+ {
505
+ name: 'aw_team_provision',
506
+ description: '组装频道剧组(组合工具):建 lead+worker 两个 agent → 建 team → 加成员 → deploy 到频道 → 返回频道内实例 agent 列表(绑定节点工具用实例 id)。',
507
+ inputSchema: obj({
508
+ channelId: s('目标频道 id'),
509
+ lead: s('lead 定义 {name, harness, config?}', 'object'),
510
+ worker: s('worker 定义 {name, harness, config?}', 'object'),
511
+ teamName: s('团队名(缺省自动)'),
512
+ }, ['channelId', 'lead', 'worker']),
513
+ run: async (args, state) => {
514
+ const mkAgent = async (def, role) => {
515
+ const r = await apiCall(state, 'POST', '/api/workshop/agents', { name: def.name, harness: def.harness ?? 'omp', config: def.config ?? {} })
516
+ if (!r.ok) throw new Error(`创建 ${role} agent 失败: HTTP ${r.status} ${r.message}`)
517
+ return r.data
518
+ }
519
+ try {
520
+ const lead = await mkAgent(args.lead, 'lead')
521
+ const worker = await mkAgent(args.worker, 'worker')
522
+ const teamR = await apiCall(state, 'POST', '/api/workshop/teams', { name: args.teamName ?? `team-${Date.now()}` })
523
+ if (!teamR.ok) throw new Error(`建 team 失败: HTTP ${teamR.status} ${teamR.message}`)
524
+ const teamId = teamR.data?.id ?? teamR.data?.team?.id
525
+ for (const [agentId, role] of [[lead.id, 'lead'], [worker.id, 'worker']]) {
526
+ const m = await apiCall(state, 'POST', `/api/workshop/teams/${teamId}/members`, { agentId, role })
527
+ if (!m.ok) throw new Error(`加成员 ${role} 失败: HTTP ${m.status} ${m.message}`)
528
+ }
529
+ const d = await apiCall(state, 'POST', `/api/workshop/teams/${teamId}/deploy`, { channelId: args.channelId })
530
+ if (!d.ok) throw new Error(`deploy 失败: HTTP ${d.status} ${d.message}`)
531
+ const inst = await apiCall(state, 'GET', `/api/workshop/channels/${args.channelId}/agents`, undefined)
532
+ const instances = inst.data ?? []
533
+ return ok({
534
+ channelId: args.channelId,
535
+ teamId,
536
+ leadInstanceId: instances.find(a => a.role === 'lead')?.id ?? null,
537
+ workerInstanceId: instances.find(a => a.role === 'worker')?.id ?? null,
538
+ instances,
539
+ })
540
+ }
541
+ catch (err) {
542
+ return fail(err.message)
543
+ }
544
+ },
545
+ },
546
+ {
547
+ name: 'aw_agent_tool_bind',
548
+ description: '把节点授权给频道成员实例(Agent 工具鉴权基础)。{ agentId(实例 id,非模板 id), nodeId, kind: dcw|daq, mode: auto|manual }。',
549
+ inputSchema: obj({ agentId: s('频道成员实例 id'), nodeId: s('节点 id'), kind: s('dcw | daq'), mode: s('auto | manual') }, ['agentId', 'nodeId', 'kind']),
550
+ run: rest('POST', '/api/workshop/agent-tools/bindings'),
551
+ },
552
+ {
553
+ name: 'aw_agent_tool_invoke',
554
+ description: '以频道成员实例身份调用宿主工具(optimization_explore / mpc_optimize / twin_* / dcw_control / param_control / daq_query 等,面见 GET /api/workshop/agent-tools/list)。可能阻塞(HITL 审批)。',
555
+ inputSchema: obj({ agentId: s('实例 id'), tool: s('工具名'), args: s('工具参数对象', 'object') }, ['agentId', 'tool']),
556
+ timeoutMs: INVOKE_TIMEOUT_MS,
557
+ run: async (args, state) => {
558
+ const r = await apiCall(state, 'POST', '/api/workshop/agent-tools/invoke', { agentId: args.agentId, tool: args.tool, args: args.args ?? {} }, { timeoutMs: INVOKE_TIMEOUT_MS })
559
+ if (!r.ok) return fail(`工具调用失败(${args.tool}) → HTTP ${r.status}: ${r.message}`)
560
+ // 宿主工具的业务错误(HTTP 200 但 result.isError)必须透传为 MCP isError
561
+ const result = r.data?.result
562
+ if (result?.isError) return { content: [{ type: 'text', text: String(result.text ?? '') }], isError: true }
563
+ return ok(r.data)
564
+ },
565
+ },
566
+ {
567
+ name: 'aw_twin_profile_get',
568
+ description: '读频道孪生 profile(优化维度):toolProfile/optimizationMode(exploration|aml)/boundModelId/objective/controlPolicy;?agentId 附 promptPreview。',
569
+ inputSchema: obj({ channelId: s('频道 id'), agentId: s('可选:附该成员的 prompt 预览') }, ['channelId']),
570
+ run: async (args, state) => {
571
+ const { channelId, agentId } = args
572
+ const q = agentId ? `?agentId=${encodeURIComponent(agentId)}` : ''
573
+ const r = await apiCall(state, 'GET', `/api/workshop/channels/${channelId}/twin-profile${q}`, undefined)
574
+ if (!r.ok) return fail(`HTTP ${r.status}: ${r.message}`)
575
+ return ok(r.data)
576
+ },
577
+ },
578
+ {
579
+ name: 'aw_twin_profile_patch',
580
+ description: '切换频道优化模式/绑定模型(闭环开关)。{ channelId, optimizationMode?, controlPolicy?, objective?, boundModelId? }。绑模型即自动 exploration→aml(fail-closed:谱系一致+门禁全过,否则 409);boundModelId=null 解绑自动回落 exploration。',
581
+ inputSchema: obj({
582
+ channelId: s('频道 id'),
583
+ optimizationMode: s('exploration | aml'),
584
+ controlPolicy: s('recommendation_only | hitl_governed | bounded_auto'),
585
+ objective: s('优化目标对象', 'object'),
586
+ boundModelId: s('绑定模型 id;null=解绑回落 exploration'),
587
+ }, ['channelId']),
588
+ run: rest('PATCH', args => `/api/workshop/channels/${args.channelId}/twin-profile`, { bodyOf: args => omit(args, 'channelId') }),
589
+ },
590
+ {
591
+ name: 'aw_task_create',
592
+ description: '向频道下达任务。{ channelId, title, parts: [{text}], mode: goal|..., modeConfig? } (goal 模式配 goalCriteria 验收判据)。',
593
+ inputSchema: obj({
594
+ channelId: s('频道 id'), title: s('任务标题'),
595
+ parts: s('任务书分段 [{text}]', 'array'),
596
+ mode: s('执行模式(如 goal)'),
597
+ modeConfig: s('模式配置,如 {goalCriteria}', 'object'),
598
+ }, ['channelId', 'title', 'parts']),
599
+ run: async (args, state) => {
600
+ const { channelId, ...body } = args
601
+ const r = await apiCall(state, 'POST', `/api/workshop/channels/${channelId}/tasks`, body)
602
+ if (!r.ok) return fail(`下达失败 → HTTP ${r.status}: ${r.message}`)
603
+ return ok(r.data)
604
+ },
605
+ },
606
+ {
607
+ name: 'aw_task_list',
608
+ description: '频道任务列表(轮询状态用)。{ channelId }。',
609
+ inputSchema: obj({ channelId: s('频道 id') }, ['channelId']),
610
+ run: async (args, state) => {
611
+ const r = await apiCall(state, 'GET', `/api/workshop/channels/${args.channelId}/tasks`, undefined)
612
+ if (!r.ok) return fail(`HTTP ${r.status}: ${r.message}`)
613
+ return ok(r.data)
614
+ },
615
+ },
616
+ {
617
+ name: 'aw_model_list',
618
+ description: 'AML 模型列表(含 stage: candidate|shadow|production|retired 与门禁摘要)。{ lineId?, stage? } 等 query 透传。',
619
+ inputSchema: obj({ lineId: s('按产线过滤'), stage: s('按阶段过滤') }),
620
+ run: async (args, state) => {
621
+ const r = await apiCall(state, 'GET', `/api/workshop/aml/models${queryOf(args)}`, undefined)
622
+ if (!r.ok) return fail(`HTTP ${r.status}: ${r.message}`)
623
+ return ok(r.data)
624
+ },
625
+ },
626
+ {
627
+ name: 'aw_model_promote',
628
+ description: '模型阶段晋升(candidate→shadow→production;production 前做 ONNX 深检)。{ id, toStage }。',
629
+ inputSchema: obj({ id: s('模型 id'), toStage: s('目标阶段 shadow | production') }, ['id', 'toStage']),
630
+ run: async (args, state) => {
631
+ const r = await apiCall(state, 'POST', `/api/workshop/aml/models/${args.id}/promote`, { toStage: args.toStage })
632
+ if (!r.ok) return fail(`晋升被拒 → HTTP ${r.status}: ${r.message}`)
633
+ return ok(r.data)
634
+ },
635
+ },
636
+ {
637
+ name: 'aw_optimization_judge',
638
+ description: '优化 step 落判定(判定与执行分离)。{ id, verdict: keep|rollback|uncertain, reason }。',
639
+ inputSchema: obj({ id: s('优化记录 id'), verdict: s('keep | rollback | uncertain'), reason: s('判定理由') }, ['id', 'verdict', 'reason']),
640
+ run: async (args, state) => {
641
+ const { id, ...body } = args
642
+ const r = await apiCall(state, 'POST', `/api/workshop/dcw/optimizations/${id}/judge`, body)
643
+ if (!r.ok) return fail(`判定失败 → HTTP ${r.status}: ${r.message}`)
644
+ return ok(r.data)
645
+ },
646
+ },
647
+
648
+ // ── 插件 ──
649
+ {
650
+ name: 'aw_plugin_list',
651
+ description: '插件管理清单(含启停状态/路由/装载失败 failures)。热重载验证入口。',
652
+ inputSchema: obj(),
653
+ run: rest('GET', '/api/workshop/plugins'),
654
+ },
655
+ {
656
+ name: 'aw_plugin_toggle',
657
+ description: '启用/停用插件(写 plugins-state.json,宿主 ~1s 热重载,无需重启)。{ name, enabled }。',
658
+ inputSchema: obj({ name: s('插件名'), enabled: s('true=启用 false=停用', 'boolean') }, ['name', 'enabled']),
659
+ run: async (args, state) => {
660
+ const action = args.enabled ? 'enable' : 'disable'
661
+ const r = await apiCall(state, 'POST', `/api/workshop/plugins/${encodeURIComponent(args.name)}/${action}`, {})
662
+ if (!r.ok) return fail(`${action} 失败 → HTTP ${r.status}: ${r.message}`)
663
+ return ok(r.data)
664
+ },
665
+ },
666
+
667
+ // ── 逃生舱 ──
668
+ {
669
+ name: 'aw_request',
670
+ description: '通用平台 REST 调用(逃生舱:覆盖工具面未覆盖的端点,如 aml/datasets、aml/jobs、optimizations 查询)。path 必须以 /api/ 开头。',
671
+ inputSchema: obj({
672
+ method: s('GET | POST | PATCH | PUT | DELETE'),
673
+ path: s('路径,必须 /api/ 开头,可含 query'),
674
+ body: s('请求体对象', 'object'),
675
+ auth: s('是否携带鉴权(缺省 true)', 'boolean'),
676
+ }, ['method', 'path']),
677
+ run: async (args, state) => {
678
+ const path = String(args.path ?? '')
679
+ if (!path.startsWith('/api/')) return fail('path 必须以 /api/ 开头(本工具只访问平台 API,不代理任意外网)。')
680
+ if (!['GET', 'POST', 'PATCH', 'PUT', 'DELETE'].includes(String(args.method).toUpperCase())) return fail(`不支持的 method: ${args.method}`)
681
+ const r = await apiCall(state, String(args.method).toUpperCase(), path, args.body, { auth: args.auth !== false })
682
+ if (!r.ok) return fail(`${args.method} ${path} → HTTP ${r.status}: ${r.message}`)
683
+ return ok(r.data)
684
+ },
685
+ },
686
+ ]
687
+ return defs
688
+ }
689
+
690
+ let _defs = null
691
+ /** 工具面(模块级缓存;测试可直接读) */
692
+ export function TOOL_DEFS() {
693
+ if (!_defs) _defs = buildToolDefs()
694
+ return _defs
695
+ }
696
+
697
+ // ── JSON-RPC(MCP stdio,逐行)──
698
+
699
+ /** 处理一条 JSON-RPC 消息;通知返回 null */
700
+ export async function handleMessage(state, msg) {
701
+ const { id, method, params } = msg ?? {}
702
+ const isRequest = id !== undefined && id !== null
703
+ const respond = result => (isRequest ? { jsonrpc: '2.0', id, result } : null)
704
+ const respondError = (code, message) => (isRequest ? { jsonrpc: '2.0', id, error: { code, message } } : null)
705
+
706
+ try {
707
+ switch (method) {
708
+ case 'initialize':
709
+ return respond({
710
+ protocolVersion: params?.protocolVersion ?? '2024-11-05',
711
+ capabilities: { tools: { listChanged: false } },
712
+ serverInfo: { name: 'aw-industrial-mcp', title: 'AgentWorkShop industrial MCP', version: '1.0.0' },
713
+ })
714
+ case 'notifications/initialized':
715
+ case 'initialized':
716
+ return null
717
+ case 'ping':
718
+ return respond({})
719
+ case 'tools/list':
720
+ return respond({
721
+ tools: TOOL_DEFS().map(t => ({ name: t.name, description: t.description, inputSchema: t.inputSchema })),
722
+ })
723
+ case 'tools/call': {
724
+ const name = params?.name
725
+ if (!name) return respondError(-32602, 'tools/call 缺少 name')
726
+ // 开关门禁:停用时仅放行 aw_status(自诊断),其余工具一律拒绝
727
+ if (name !== 'aw_status' && !isMcpEnabled(state)) {
728
+ return respond({ content: [{ type: 'text', text: MCP_DISABLED_TEXT }], isError: true })
729
+ }
730
+ const def = TOOL_DEFS().find(t => t.name === name)
731
+ if (!def) return respondError(-32602, `未知工具: ${name}`)
732
+ try {
733
+ const result = await def.run(params?.arguments ?? {}, state)
734
+ return respond(result)
735
+ }
736
+ catch (err) {
737
+ // 工具执行异常按 MCP 约定返回 isError 结果(不中断回合)
738
+ return respond(fail(`工具执行异常(${name}): ${err?.message ?? err}`))
739
+ }
740
+ }
741
+ default:
742
+ return respondError(-32601, `方法不存在: ${method}`)
743
+ }
744
+ }
745
+ catch (err) {
746
+ return respondError(-32603, err?.message ?? String(err))
747
+ }
748
+ }
749
+
750
+ function write(msg) {
751
+ process.stdout.write(JSON.stringify(msg) + '\n')
752
+ }
753
+
754
+ /**
755
+ * MCP 集成开关(系统设置 → MCP 集成 → 启动 MCP 集成;mcp.enabled,live 键)。
756
+ * 3s TTL 缓存:设置页切换后 ≤3s 传导到本服务,无需重启。
757
+ */
758
+ const MCP_DISABLED_TEXT = 'MCP 集成已停用:请到平台「系统设置 → MCP 集成」打开「启动 MCP 集成」,或为 MCP 进程设置环境变量 AW_MCP_ENABLED=true。'
759
+ export function isMcpEnabled(state) {
760
+ const now = Date.now()
761
+ if (!state._mcpEnabledCache || now - state._mcpEnabledCache.at > 3000) {
762
+ state._mcpEnabledCache = { at: now, value: readMcpEnabled({ cwd: state.cwd, env: state.env }) }
763
+ }
764
+ return state._mcpEnabledCache.value
765
+ }
766
+
767
+ /** stdio 主循环(直接执行本文件时启动) */
768
+ export function runStdio() {
769
+ const state = createState()
770
+ const rl = createInterface({ input: process.stdin })
771
+ rl.on('line', (line) => {
772
+ const trimmed = line.trim()
773
+ if (!trimmed) return
774
+ let msg
775
+ try {
776
+ msg = JSON.parse(trimmed)
777
+ }
778
+ catch {
779
+ return // 非 JSON 行忽略(防御宿主 stderr 混流)
780
+ }
781
+ handleMessage(state, msg)
782
+ .then((out) => {
783
+ if (out) write(out)
784
+ })
785
+ .catch((err) => {
786
+ write({ jsonrpc: '2.0', id: msg?.id ?? null, error: { code: -32603, message: err?.message ?? String(err) } })
787
+ })
788
+ })
789
+ process.stdin.on('end', () => process.exit(0))
790
+ process.stdout.on('error', () => process.exit(0))
791
+ }
792
+
793
+ const isMain = process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href
794
+ if (isMain) {
795
+ runStdio()
796
+ }