agentworkshop 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1049) hide show
  1. package/.output/.AgentWorkShop/aml-python/train-example.py +92 -92
  2. package/.output/nitro.json +1 -1
  3. package/.output/public/_nuxt/{Cy0eCUDp.js → B5KL6Ibd.js} +7 -7
  4. package/.output/public/_nuxt/{CcUK7VEO.js → BEkXmA1q.js} +1 -1
  5. package/.output/public/_nuxt/{BhEXWepB2.js → BhXOXzn62.js} +3 -3
  6. package/.output/public/_nuxt/{tDcrlXNq2.js → Budz_Xqj2.js} +1 -1
  7. package/.output/public/_nuxt/{WL1R8lPA.js → C-fzyZIR.js} +1 -1
  8. package/.output/public/_nuxt/{DvsXN5k72.js → CDkD5qXS2.js} +1 -1
  9. package/.output/public/_nuxt/{DkqV7BGi.js → CNBZIUPj.js} +1 -1
  10. package/.output/public/_nuxt/{B2-Wuy0u.js → CYRJE2AK.js} +1 -1
  11. package/.output/public/_nuxt/{DFo96EtE.js → Ce11XYqU.js} +1 -1
  12. package/.output/public/_nuxt/{DJKjjGnC2.js → Cn9We9Xy2.js} +1 -1
  13. package/.output/public/_nuxt/{BSoelv0a.js → DAXKnIk_.js} +1 -1
  14. package/.output/public/_nuxt/{CljTL3qL.js → DEUPXg3Y.js} +1 -1
  15. package/.output/public/_nuxt/{Dasqfjig2.js → DIgcvUmv2.js} +1 -1
  16. package/.output/public/_nuxt/{CsdezMu9.js → DIua0HEu.js} +5 -5
  17. package/.output/public/_nuxt/{psToi-Y5.js → DTJzL6Ce.js} +1 -1
  18. package/.output/public/_nuxt/{C3--I-an2.js → DrYBHPYn2.js} +1 -1
  19. package/.output/public/_nuxt/{OmpTerminalPanel.DJsn-0I7.css → OmpTerminalPanel.CoA7kG4C.css} +1 -1
  20. package/.output/public/_nuxt/PluginSlot.BqBzLD4T.css +1 -0
  21. package/.output/public/_nuxt/{TownView.CY9AeupT.css → TownView.CASu6sUI.css} +1 -1
  22. package/.output/public/_nuxt/{CmuGMxDP.js → TugRY_4O.js} +1 -1
  23. package/.output/public/_nuxt/{_id_.Czwkl50w.css → _id_.yoM542Bz.css} +1 -1
  24. package/.output/public/_nuxt/{_wsId_.zZS-8BeH.css → _wsId_.1Ai43iyE.css} +1 -1
  25. package/.output/public/_nuxt/{C-0XFiGd2.js → aFWYpex82.js} +1 -1
  26. package/.output/public/_nuxt/{agents.x7WDlalC.css → agents.BsyoIGhn.css} +1 -1
  27. package/.output/public/_nuxt/aml.DgOMpDpv.css +1 -0
  28. package/.output/public/_nuxt/builds/latest.json +1 -1
  29. package/.output/public/_nuxt/builds/meta/fa6e11b2-f4e7-42ac-9006-b3df9b6cf455.json +1 -0
  30. package/.output/public/_nuxt/{default.DJtNhtPB.css → default.Diue5wr2.css} +1 -1
  31. package/.output/public/_nuxt/{logs.DicAHMDv.css → logs.Dp8KWwBk.css} +1 -1
  32. package/.output/public/_nuxt/{monitor.CklbBi4c.css → monitor.DdpDx8NP.css} +1 -1
  33. package/.output/public/_nuxt/{ontology.CjBcnrC8.css → ontology.Clux6c4G.css} +1 -1
  34. package/.output/public/_nuxt/{operations.D7nxVu6G.css → operations.Cng_qjn9.css} +1 -1
  35. package/.output/public/_nuxt/{pages.DHQhmiO9.css → pages.ilC7BTfG.css} +1 -1
  36. package/.output/public/_nuxt/{tokens.BDSUWF-L.css → tokens.DKZWCP5v.css} +1 -1
  37. package/.output/public/favicon.svg +14 -14
  38. package/.output/public/robots.txt +3 -3
  39. package/.output/server/chunks/_/bench-run.mjs +8 -4
  40. package/.output/server/chunks/_/bench-run.mjs.map +1 -1
  41. package/.output/server/chunks/_/nitro.mjs +3564 -3133
  42. package/.output/server/chunks/_/nitro.mjs.map +1 -1
  43. package/.output/server/chunks/_/promote.mjs +7 -1
  44. package/.output/server/chunks/_/promote.mjs.map +1 -1
  45. package/.output/server/chunks/build/{OmpTerminalPanel-BMOE0iKV.mjs → OmpTerminalPanel-DGOdjUKG.mjs} +8 -8
  46. package/.output/server/chunks/build/{OmpTerminalPanel-BMOE0iKV.mjs.map → OmpTerminalPanel-DGOdjUKG.mjs.map} +1 -1
  47. package/.output/server/chunks/build/{PluginSlot-DmxAklwb.mjs → PluginSlot-CGwo_Wf0.mjs} +4 -4
  48. package/.output/server/chunks/build/{PluginSlot-DmxAklwb.mjs.map → PluginSlot-CGwo_Wf0.mjs.map} +1 -1
  49. package/.output/server/chunks/build/{TownView-DD1zY8xq.mjs → TownView-CIs-ASV0.mjs} +20 -20
  50. package/.output/server/chunks/build/{TownView-DD1zY8xq.mjs.map → TownView-CIs-ASV0.mjs.map} +1 -1
  51. package/.output/server/chunks/build/{_id_-B9zi8WEg.mjs → _id_-8hYMEcPj.mjs} +95 -95
  52. package/.output/server/chunks/build/{_id_-B9zi8WEg.mjs.map → _id_-8hYMEcPj.mjs.map} +1 -1
  53. package/.output/server/chunks/build/{_id_-BB-OZCsp.mjs → _id_-CunRhZCq.mjs} +12 -12
  54. package/.output/server/chunks/build/{_id_-BB-OZCsp.mjs.map → _id_-CunRhZCq.mjs.map} +1 -1
  55. package/.output/server/chunks/build/{_id_-DLdvNP4J.mjs → _id_-DW3IQyTe.mjs} +1 -1
  56. package/.output/server/chunks/build/{_id_-DLdvNP4J.mjs.map → _id_-DW3IQyTe.mjs.map} +1 -1
  57. package/.output/server/chunks/build/{_wsId_-LDv5SEW_.mjs → _wsId_-ByUqzpvT.mjs} +187 -91
  58. package/.output/server/chunks/build/{_wsId_-LDv5SEW_.mjs.map → _wsId_-ByUqzpvT.mjs.map} +1 -1
  59. package/.output/server/chunks/build/{agents-DeRHs8c9.mjs → agents-B9dtbYwq.mjs} +10 -10
  60. package/.output/server/chunks/build/{agents-DeRHs8c9.mjs.map → agents-B9dtbYwq.mjs.map} +1 -1
  61. package/.output/server/chunks/build/{aml-DVcZDyvA.mjs → aml-ezsP2X2T.mjs} +98 -98
  62. package/.output/server/chunks/build/{aml-DVcZDyvA.mjs.map → aml-ezsP2X2T.mjs.map} +1 -1
  63. package/.output/server/chunks/build/{analysis-DQM-3YKP.mjs → analysis-DB7joxB_.mjs} +9 -9
  64. package/.output/server/chunks/build/{analysis-DQM-3YKP.mjs.map → analysis-DB7joxB_.mjs.map} +1 -1
  65. package/.output/server/chunks/build/{api-DbUqSbs2.mjs → api-CNgiGJ-n.mjs} +3 -3
  66. package/.output/server/chunks/build/{api-DbUqSbs2.mjs.map → api-CNgiGJ-n.mjs.map} +1 -1
  67. package/.output/server/chunks/build/{api-ByIV5jMN.mjs → api-CaQC12S4.mjs} +3 -3
  68. package/.output/server/chunks/build/{api-ByIV5jMN.mjs.map → api-CaQC12S4.mjs.map} +1 -1
  69. package/.output/server/chunks/build/{api-error-BwAQLw44.mjs → api-error-5fRWoNn3.mjs} +1 -1
  70. package/.output/server/chunks/build/{api-error-BwAQLw44.mjs.map → api-error-5fRWoNn3.mjs.map} +1 -1
  71. package/.output/server/chunks/build/{api-BQ9AQHv-.mjs → api-mAmCCaSy.mjs} +3 -3
  72. package/.output/server/chunks/build/{api-BQ9AQHv-.mjs.map → api-mAmCCaSy.mjs.map} +1 -1
  73. package/.output/server/chunks/build/{apiClient-Dl-8IHHL.mjs → apiClient-DyvJNNRd.mjs} +2 -2
  74. package/.output/server/chunks/build/{apiClient-Dl-8IHHL.mjs.map → apiClient-DyvJNNRd.mjs.map} +1 -1
  75. package/.output/server/chunks/build/{board-CKUuAY_Q.mjs → board-IQvGm0ak.mjs} +4 -4
  76. package/.output/server/chunks/build/{board-CKUuAY_Q.mjs.map → board-IQvGm0ak.mjs.map} +1 -1
  77. package/.output/server/chunks/build/{channel-templates-4Zdu0Eyr.mjs → channel-templates-BcmTFt3Z.mjs} +4 -4
  78. package/.output/server/chunks/build/{channel-templates-4Zdu0Eyr.mjs.map → channel-templates-BcmTFt3Z.mjs.map} +1 -1
  79. package/.output/server/chunks/build/{client-only-qNA2OVV_.mjs → client-only-HhHmV5L2.mjs} +1 -1
  80. package/.output/server/chunks/build/{client-only-qNA2OVV_.mjs.map → client-only-HhHmV5L2.mjs.map} +1 -1
  81. package/.output/server/chunks/build/{daq-B5zlUIlb.mjs → daq-BtcHXZsH.mjs} +14 -14
  82. package/.output/server/chunks/build/{daq-B5zlUIlb.mjs.map → daq-BtcHXZsH.mjs.map} +1 -1
  83. package/.output/server/chunks/build/{data-CdyujjU3.mjs → data-JhBFKJDA.mjs} +2 -2
  84. package/.output/server/chunks/build/{data-CdyujjU3.mjs.map → data-JhBFKJDA.mjs.map} +1 -1
  85. package/.output/server/chunks/build/{dcw-B-eoU7sq.mjs → dcw-DM_WZyz_.mjs} +10 -10
  86. package/.output/server/chunks/build/{dcw-B-eoU7sq.mjs.map → dcw-DM_WZyz_.mjs.map} +1 -1
  87. package/.output/server/chunks/build/{default-Bbyb2qEG.mjs → default-4m4XnpDt.mjs} +28 -28
  88. package/.output/server/chunks/build/{default-Bbyb2qEG.mjs.map → default-4m4XnpDt.mjs.map} +1 -1
  89. package/.output/server/chunks/build/{hitl-B-0NShlx.mjs → hitl-DY7FeN1f.mjs} +2 -2
  90. package/.output/server/chunks/build/{hitl-B-0NShlx.mjs.map → hitl-DY7FeN1f.mjs.map} +1 -1
  91. package/.output/server/chunks/build/{interval-DvHBIIZh.mjs → interval-Di_y-Apg.mjs} +1 -1
  92. package/.output/server/chunks/build/{interval-DvHBIIZh.mjs.map → interval-Di_y-Apg.mjs.map} +1 -1
  93. package/.output/server/chunks/build/{logs-ByxK-myz.mjs → logs-lGNg1Ob6.mjs} +13 -13
  94. package/.output/server/chunks/build/{logs-ByxK-myz.mjs.map → logs-lGNg1Ob6.mjs.map} +1 -1
  95. package/.output/server/chunks/build/{monitor-BWd4h4K9.mjs → monitor-CySt7XKY.mjs} +35 -35
  96. package/.output/server/chunks/build/{monitor-BWd4h4K9.mjs.map → monitor-CySt7XKY.mjs.map} +1 -1
  97. package/.output/server/chunks/build/{ontology-C3WzgG5p.mjs → ontology-3K7B6xnD.mjs} +12 -12
  98. package/.output/server/chunks/build/{ontology-C3WzgG5p.mjs.map → ontology-3K7B6xnD.mjs.map} +1 -1
  99. package/.output/server/chunks/build/{operations-tE63Vy9Z.mjs → operations-D_1Qp6MR.mjs} +19 -19
  100. package/.output/server/chunks/build/{operations-tE63Vy9Z.mjs.map → operations-D_1Qp6MR.mjs.map} +1 -1
  101. package/.output/server/chunks/build/{optimizer-A6UyksVT.mjs → optimizer-BXF9x406.mjs} +4 -4
  102. package/.output/server/chunks/build/{optimizer-A6UyksVT.mjs.map → optimizer-BXF9x406.mjs.map} +1 -1
  103. package/.output/server/chunks/build/{pages-D-cFfP_K.mjs → pages-GV_BTwNx.mjs} +19 -19
  104. package/.output/server/chunks/build/{pages-D-cFfP_K.mjs.map → pages-GV_BTwNx.mjs.map} +1 -1
  105. package/.output/server/chunks/build/{permissions-44GsBS_4.mjs → permissions-Cw0vl9oB.mjs} +2 -2
  106. package/.output/server/chunks/build/{permissions-44GsBS_4.mjs.map → permissions-Cw0vl9oB.mjs.map} +1 -1
  107. package/.output/server/chunks/build/{pipeline-B2TDdGx6.mjs → pipeline-DFAdcH6G.mjs} +4 -4
  108. package/.output/server/chunks/build/{pipeline-B2TDdGx6.mjs.map → pipeline-DFAdcH6G.mjs.map} +1 -1
  109. package/.output/server/chunks/build/{plugins-CfVTAFbT.mjs → plugins-DHYkylxk.mjs} +3 -3
  110. package/.output/server/chunks/build/{plugins-CfVTAFbT.mjs.map → plugins-DHYkylxk.mjs.map} +1 -1
  111. package/.output/server/chunks/build/{projects-taoNPGqx.mjs → projects-C7wHfJhz.mjs} +1 -1
  112. package/.output/server/chunks/build/{projects-taoNPGqx.mjs.map → projects-C7wHfJhz.mjs.map} +1 -1
  113. package/.output/server/chunks/build/{schedules-DnHxYWcd.mjs → schedules-hbbkb2k_.mjs} +3 -3
  114. package/.output/server/chunks/build/{schedules-DnHxYWcd.mjs.map → schedules-hbbkb2k_.mjs.map} +1 -1
  115. package/.output/server/chunks/build/{settings-CLIR9BQz.mjs → settings-BI9az0t8.mjs} +5 -5
  116. package/.output/server/chunks/build/{settings-CLIR9BQz.mjs.map → settings-BI9az0t8.mjs.map} +1 -1
  117. package/.output/server/chunks/build/{studio-CB0a63bK.mjs → studio-C1TA240D.mjs} +4 -4
  118. package/.output/server/chunks/build/{studio-CB0a63bK.mjs.map → studio-C1TA240D.mjs.map} +1 -1
  119. package/.output/server/chunks/build/{teams-DkwgH6Ab.mjs → teams-Cqe-XytC.mjs} +10 -10
  120. package/.output/server/chunks/build/{teams-DkwgH6Ab.mjs.map → teams-Cqe-XytC.mjs.map} +1 -1
  121. package/.output/server/chunks/build/{tokens-yzJOx8lm.mjs → tokens-BRNoXKeS.mjs} +12 -12
  122. package/.output/server/chunks/build/{tokens-yzJOx8lm.mjs.map → tokens-BRNoXKeS.mjs.map} +1 -1
  123. package/.output/server/chunks/build/{tools-Bd7u9FCc.mjs → tools-seI8h6cT.mjs} +3 -3
  124. package/.output/server/chunks/build/{tools-Bd7u9FCc.mjs.map → tools-seI8h6cT.mjs.map} +1 -1
  125. package/.output/server/chunks/build/{town-CyJy_4k5.mjs → town-7mjCZbHa.mjs} +11 -11
  126. package/.output/server/chunks/build/{town-CyJy_4k5.mjs.map → town-7mjCZbHa.mjs.map} +1 -1
  127. package/.output/server/chunks/build/{useAgentHarnessOptions-BkPrqFxg.mjs → useAgentHarnessOptions-BBywiyFz.mjs} +2 -2
  128. package/.output/server/chunks/build/{useAgentHarnessOptions-BkPrqFxg.mjs.map → useAgentHarnessOptions-BBywiyFz.mjs.map} +1 -1
  129. package/.output/server/chunks/build/{useAgentTemplateActions-BftyRRwI.mjs → useAgentTemplateActions-DIfbFIeB.mjs} +3 -3
  130. package/.output/server/chunks/build/{useAgentTemplateActions-BftyRRwI.mjs.map → useAgentTemplateActions-DIfbFIeB.mjs.map} +1 -1
  131. package/.output/server/chunks/build/{useAgentTemplateForm-D7NAXZ59.mjs → useAgentTemplateForm-CNrBkoCe.mjs} +3 -3
  132. package/.output/server/chunks/build/{useAgentTemplateForm-D7NAXZ59.mjs.map → useAgentTemplateForm-CNrBkoCe.mjs.map} +1 -1
  133. package/.output/server/chunks/build/{useAgentTemplatesCatalog-DnqTc0oL.mjs → useAgentTemplatesCatalog-cZwCOaMf.mjs} +2 -2
  134. package/.output/server/chunks/build/{useAgentTemplatesCatalog-DnqTc0oL.mjs.map → useAgentTemplatesCatalog-cZwCOaMf.mjs.map} +1 -1
  135. package/.output/server/chunks/build/{useAmlDatasets-Cr25p62c.mjs → useAmlDatasets-Bzx9Hgvy.mjs} +4 -4
  136. package/.output/server/chunks/build/{useAmlDatasets-Cr25p62c.mjs.map → useAmlDatasets-Bzx9Hgvy.mjs.map} +1 -1
  137. package/.output/server/chunks/build/{useAmlEntities-DBDpqmC3.mjs → useAmlEntities-D-0vyKYy.mjs} +4 -4
  138. package/.output/server/chunks/build/{useAmlEntities-DBDpqmC3.mjs.map → useAmlEntities-D-0vyKYy.mjs.map} +1 -1
  139. package/.output/server/chunks/build/{useAmlEnv-B94CxtjW.mjs → useAmlEnv-6s0jiG6P.mjs} +5 -5
  140. package/.output/server/chunks/build/{useAmlEnv-B94CxtjW.mjs.map → useAmlEnv-6s0jiG6P.mjs.map} +1 -1
  141. package/.output/server/chunks/build/{useAmlExperiments-B2HI1odc.mjs → useAmlExperiments-CDct2Fi9.mjs} +4 -4
  142. package/.output/server/chunks/build/{useAmlExperiments-B2HI1odc.mjs.map → useAmlExperiments-CDct2Fi9.mjs.map} +1 -1
  143. package/.output/server/chunks/build/{useAmlJobs-C-EheCdn.mjs → useAmlJobs-D9Awbb--.mjs} +5 -5
  144. package/.output/server/chunks/build/{useAmlJobs-C-EheCdn.mjs.map → useAmlJobs-D9Awbb--.mjs.map} +1 -1
  145. package/.output/server/chunks/build/{useAmlModels-BqWz2YoO.mjs → useAmlModels-C-XBnv_Y.mjs} +4 -4
  146. package/.output/server/chunks/build/{useAmlModels-BqWz2YoO.mjs.map → useAmlModels-C-XBnv_Y.mjs.map} +1 -1
  147. package/.output/server/chunks/build/{useAmlNotes-nRlk9fOE.mjs → useAmlNotes-Dlfao4VV.mjs} +4 -4
  148. package/.output/server/chunks/build/{useAmlNotes-nRlk9fOE.mjs.map → useAmlNotes-Dlfao4VV.mjs.map} +1 -1
  149. package/.output/server/chunks/build/{useAmlPredict-BQbSLob6.mjs → useAmlPredict-ukN3U9qx.mjs} +4 -4
  150. package/.output/server/chunks/build/{useAmlPredict-BQbSLob6.mjs.map → useAmlPredict-ukN3U9qx.mjs.map} +1 -1
  151. package/.output/server/chunks/build/{useAnalysisFeed-CzZmTTqq.mjs → useAnalysisFeed-CkUZTRH4.mjs} +3 -3
  152. package/.output/server/chunks/build/{useAnalysisFeed-CzZmTTqq.mjs.map → useAnalysisFeed-CkUZTRH4.mjs.map} +1 -1
  153. package/.output/server/chunks/build/{useDaqAddNode-Dr5CfMpU.mjs → useDaqAddNode-C39ycTVO.mjs} +4 -4
  154. package/.output/server/chunks/build/{useDaqAddNode-Dr5CfMpU.mjs.map → useDaqAddNode-C39ycTVO.mjs.map} +1 -1
  155. package/.output/server/chunks/build/{useDaqDetailBinding-BAAoyUdv.mjs → useDaqDetailBinding-W1IABCpN.mjs} +5 -5
  156. package/.output/server/chunks/build/{useDaqDetailBinding-BAAoyUdv.mjs.map → useDaqDetailBinding-W1IABCpN.mjs.map} +1 -1
  157. package/.output/server/chunks/build/{useDaqDetailFrames-4zuFL3Q5.mjs → useDaqDetailFrames-D4GgD2hM.mjs} +4 -4
  158. package/.output/server/chunks/build/{useDaqDetailFrames-4zuFL3Q5.mjs.map → useDaqDetailFrames-D4GgD2hM.mjs.map} +1 -1
  159. package/.output/server/chunks/build/{useDaqDetailHistory-CHrHfBOm.mjs → useDaqDetailHistory-CI9oS-7S.mjs} +4 -4
  160. package/.output/server/chunks/build/{useDaqDetailHistory-CHrHfBOm.mjs.map → useDaqDetailHistory-CI9oS-7S.mjs.map} +1 -1
  161. package/.output/server/chunks/build/{useDaqDetailNode-DDq5osE-.mjs → useDaqDetailNode-igTd232l.mjs} +6 -6
  162. package/.output/server/chunks/build/{useDaqDetailNode-DDq5osE-.mjs.map → useDaqDetailNode-igTd232l.mjs.map} +1 -1
  163. package/.output/server/chunks/build/{useDaqDetailParams-DdOcUvHG.mjs → useDaqDetailParams-CnjIfgfH.mjs} +4 -4
  164. package/.output/server/chunks/build/{useDaqDetailParams-DdOcUvHG.mjs.map → useDaqDetailParams-CnjIfgfH.mjs.map} +1 -1
  165. package/.output/server/chunks/build/{useDaqFilters-Y_NRhP6i.mjs → useDaqFilters-KBObkzwt.mjs} +6 -6
  166. package/.output/server/chunks/build/{useDaqFilters-Y_NRhP6i.mjs.map → useDaqFilters-KBObkzwt.mjs.map} +1 -1
  167. package/.output/server/chunks/build/{useDaqOptimizations-O4JdRYUR.mjs → useDaqOptimizations-D4hhy0HN.mjs} +4 -4
  168. package/.output/server/chunks/build/{useDaqOptimizations-O4JdRYUR.mjs.map → useDaqOptimizations-D4hhy0HN.mjs.map} +1 -1
  169. package/.output/server/chunks/build/{useDaqStream-phwM5tIN.mjs → useDaqStream-CbOC6kpc.mjs} +3 -3
  170. package/.output/server/chunks/build/{useDaqStream-phwM5tIN.mjs.map → useDaqStream-CbOC6kpc.mjs.map} +1 -1
  171. package/.output/server/chunks/build/{useDaqTemplates-lKw2b01d.mjs → useDaqTemplates-DlbjELnY.mjs} +4 -4
  172. package/.output/server/chunks/build/{useDaqTemplates-lKw2b01d.mjs.map → useDaqTemplates-DlbjELnY.mjs.map} +1 -1
  173. package/.output/server/chunks/build/{useDashboardData-BBBMb6v_.mjs → useDashboardData-ObuGQUn-.mjs} +6 -6
  174. package/.output/server/chunks/build/{useDashboardData-BBBMb6v_.mjs.map → useDashboardData-ObuGQUn-.mjs.map} +1 -1
  175. package/.output/server/chunks/build/{useDcwAddNode-CT-oOFom.mjs → useDcwAddNode-C2-oveXf.mjs} +4 -4
  176. package/.output/server/chunks/build/{useDcwAddNode-CT-oOFom.mjs.map → useDcwAddNode-C2-oveXf.mjs.map} +1 -1
  177. package/.output/server/chunks/build/{useDcwCards-COffSnEh.mjs → useDcwCards-Ci4SnZ2L.mjs} +4 -4
  178. package/.output/server/chunks/build/{useDcwCards-COffSnEh.mjs.map → useDcwCards-Ci4SnZ2L.mjs.map} +1 -1
  179. package/.output/server/chunks/build/{useDcwDetailScope-CPYeNib2.mjs → useDcwDetailScope-D4TjOlNs.mjs} +6 -6
  180. package/.output/server/chunks/build/{useDcwDetailScope-CPYeNib2.mjs.map → useDcwDetailScope-D4TjOlNs.mjs.map} +1 -1
  181. package/.output/server/chunks/build/{useDcwDetailTemplates-jXerMgzY.mjs → useDcwDetailTemplates-Ctp3cnKX.mjs} +4 -4
  182. package/.output/server/chunks/build/{useDcwDetailTemplates-jXerMgzY.mjs.map → useDcwDetailTemplates-Ctp3cnKX.mjs.map} +1 -1
  183. package/.output/server/chunks/build/{useDcwFilter-BmuVZkbW.mjs → useDcwFilter-C9wUKqpa.mjs} +4 -4
  184. package/.output/server/chunks/build/{useDcwFilter-BmuVZkbW.mjs.map → useDcwFilter-C9wUKqpa.mjs.map} +1 -1
  185. package/.output/server/chunks/build/{useDcwLedger-Do4JjGEu.mjs → useDcwLedger-BHLSE8A3.mjs} +4 -4
  186. package/.output/server/chunks/build/{useDcwLedger-Do4JjGEu.mjs.map → useDcwLedger-BHLSE8A3.mjs.map} +1 -1
  187. package/.output/server/chunks/build/{useDcwLineMutations-BNx-gh7I.mjs → useDcwLineMutations-C_td-b3V.mjs} +4 -4
  188. package/.output/server/chunks/build/{useDcwLineMutations-BNx-gh7I.mjs.map → useDcwLineMutations-C_td-b3V.mjs.map} +1 -1
  189. package/.output/server/chunks/build/{useDcwLineRun-CbJWDWZl.mjs → useDcwLineRun-CyPb_lDB.mjs} +4 -4
  190. package/.output/server/chunks/build/{useDcwLineRun-CbJWDWZl.mjs.map → useDcwLineRun-CyPb_lDB.mjs.map} +1 -1
  191. package/.output/server/chunks/build/{useDcwParamApprovals-BsoHHvme.mjs → useDcwParamApprovals-DN1-qs9p.mjs} +5 -5
  192. package/.output/server/chunks/build/{useDcwParamApprovals-BsoHHvme.mjs.map → useDcwParamApprovals-DN1-qs9p.mjs.map} +1 -1
  193. package/.output/server/chunks/build/{useDcwProducts-CXNhswqK.mjs → useDcwProducts-Bdk1SsiB.mjs} +4 -4
  194. package/.output/server/chunks/build/{useDcwProducts-CXNhswqK.mjs.map → useDcwProducts-Bdk1SsiB.mjs.map} +1 -1
  195. package/.output/server/chunks/build/{useDcwQuery-CBPkHlA7.mjs → useDcwQuery-93hS351p.mjs} +4 -4
  196. package/.output/server/chunks/build/{useDcwQuery-CBPkHlA7.mjs.map → useDcwQuery-93hS351p.mjs.map} +1 -1
  197. package/.output/server/chunks/build/{useDcwQuickActions-By6bAfeD.mjs → useDcwQuickActions-f7bibIWa.mjs} +4 -4
  198. package/.output/server/chunks/build/{useDcwQuickActions-By6bAfeD.mjs.map → useDcwQuickActions-f7bibIWa.mjs.map} +1 -1
  199. package/.output/server/chunks/build/{useDcwRecipes-ZUNE8GaL.mjs → useDcwRecipes-BHj-tnx4.mjs} +4 -4
  200. package/.output/server/chunks/build/{useDcwRecipes-ZUNE8GaL.mjs.map → useDcwRecipes-BHj-tnx4.mjs.map} +1 -1
  201. package/.output/server/chunks/build/{useDcwStream-CNtMGcR0.mjs → useDcwStream-CFKMvd6A.mjs} +3 -3
  202. package/.output/server/chunks/build/{useDcwStream-CNtMGcR0.mjs.map → useDcwStream-CFKMvd6A.mjs.map} +1 -1
  203. package/.output/server/chunks/build/{useDcwTemplates-B5asHSLs.mjs → useDcwTemplates-Dp2aMCHr.mjs} +4 -4
  204. package/.output/server/chunks/build/{useDcwTemplates-B5asHSLs.mjs.map → useDcwTemplates-Dp2aMCHr.mjs.map} +1 -1
  205. package/.output/server/chunks/build/{useDcwWrites-B0RF3zFE.mjs → useDcwWrites-C3y_ZBMf.mjs} +4 -4
  206. package/.output/server/chunks/build/{useDcwWrites-B0RF3zFE.mjs.map → useDcwWrites-C3y_ZBMf.mjs.map} +1 -1
  207. package/.output/server/chunks/build/{useDeviceTwins-Bqrm2_5w.mjs → useDeviceTwins-q7mxv7QC.mjs} +3 -3
  208. package/.output/server/chunks/build/{useDeviceTwins-Bqrm2_5w.mjs.map → useDeviceTwins-q7mxv7QC.mjs.map} +1 -1
  209. package/.output/server/chunks/build/{useExpConfirmations-BxGYvtvI.mjs → useExpConfirmations-OtBkMdsA.mjs} +3 -3
  210. package/.output/server/chunks/build/{useExpConfirmations-BxGYvtvI.mjs.map → useExpConfirmations-OtBkMdsA.mjs.map} +1 -1
  211. package/.output/server/chunks/build/{useLocalTime-Cz6wyFn6.mjs → useLocalTime-CMw71SWy.mjs} +1 -1
  212. package/.output/server/chunks/build/{useLocalTime-Cz6wyFn6.mjs.map → useLocalTime-CMw71SWy.mjs.map} +1 -1
  213. package/.output/server/chunks/build/{useLogsManual-CIcgIGCP.mjs → useLogsManual-BE7RIjmW.mjs} +4 -4
  214. package/.output/server/chunks/build/{useLogsManual-CIcgIGCP.mjs.map → useLogsManual-BE7RIjmW.mjs.map} +1 -1
  215. package/.output/server/chunks/build/{useLogsQuery-CAkEW5e7.mjs → useLogsQuery-817uGXY4.mjs} +4 -4
  216. package/.output/server/chunks/build/{useLogsQuery-CAkEW5e7.mjs.map → useLogsQuery-817uGXY4.mjs.map} +1 -1
  217. package/.output/server/chunks/build/{useLogsScope-DGFmQgcV.mjs → useLogsScope-Dj7vPHyL.mjs} +4 -4
  218. package/.output/server/chunks/build/{useLogsScope-DGFmQgcV.mjs.map → useLogsScope-Dj7vPHyL.mjs.map} +1 -1
  219. package/.output/server/chunks/build/{useMonitorData-CXJzv8yG.mjs → useMonitorData-DuRxpSqM.mjs} +3 -3
  220. package/.output/server/chunks/build/{useMonitorData-CXJzv8yG.mjs.map → useMonitorData-DuRxpSqM.mjs.map} +1 -1
  221. package/.output/server/chunks/build/{useMonitorFormat-BEESOsgH.mjs → useMonitorFormat-Cd-8qYmg.mjs} +2 -2
  222. package/.output/server/chunks/build/{useMonitorFormat-BEESOsgH.mjs.map → useMonitorFormat-Cd-8qYmg.mjs.map} +1 -1
  223. package/.output/server/chunks/build/{useOperationsFeed-BK8B0A0L.mjs → useOperationsFeed-BtLCSGOe.mjs} +4 -4
  224. package/.output/server/chunks/build/{useOperationsFeed-BK8B0A0L.mjs.map → useOperationsFeed-BtLCSGOe.mjs.map} +1 -1
  225. package/.output/server/chunks/build/{useOpsLog-BFxxz-sT.mjs → useOpsLog--SOdQAEJ.mjs} +3 -3
  226. package/.output/server/chunks/build/{useOpsLog-BFxxz-sT.mjs.map → useOpsLog--SOdQAEJ.mjs.map} +1 -1
  227. package/.output/server/chunks/build/{useRecipeDispatchApprovals-NuH_3Bpu.mjs → useRecipeDispatchApprovals-Cw4rAyyh.mjs} +3 -3
  228. package/.output/server/chunks/build/{useRecipeDispatchApprovals-NuH_3Bpu.mjs.map → useRecipeDispatchApprovals-Cw4rAyyh.mjs.map} +1 -1
  229. package/.output/server/chunks/build/{useTeamActions-B4QCFYq8.mjs → useTeamActions-C1-gUkfR.mjs} +3 -3
  230. package/.output/server/chunks/build/{useTeamActions-B4QCFYq8.mjs.map → useTeamActions-C1-gUkfR.mjs.map} +1 -1
  231. package/.output/server/chunks/build/{useTeamAddMemberDialog-CF0Qb5l7.mjs → useTeamAddMemberDialog-Blejsozp.mjs} +3 -3
  232. package/.output/server/chunks/build/{useTeamAddMemberDialog-CF0Qb5l7.mjs.map → useTeamAddMemberDialog-Blejsozp.mjs.map} +1 -1
  233. package/.output/server/chunks/build/{useTeamCreateDialog-B-P-LG3N.mjs → useTeamCreateDialog-CbAjaxDf.mjs} +2 -2
  234. package/.output/server/chunks/build/{useTeamCreateDialog-B-P-LG3N.mjs.map → useTeamCreateDialog-CbAjaxDf.mjs.map} +1 -1
  235. package/.output/server/chunks/build/{useTeamDeployDialog-DHA-c9Tk.mjs → useTeamDeployDialog-ChGWaFpH.mjs} +3 -3
  236. package/.output/server/chunks/build/{useTeamDeployDialog-DHA-c9Tk.mjs.map → useTeamDeployDialog-ChGWaFpH.mjs.map} +1 -1
  237. package/.output/server/chunks/build/{useTeamPluginDialog-CDf1S9ME.mjs → useTeamPluginDialog-CsFH5fAv.mjs} +3 -3
  238. package/.output/server/chunks/build/{useTeamPluginDialog-CDf1S9ME.mjs.map → useTeamPluginDialog-CsFH5fAv.mjs.map} +1 -1
  239. package/.output/server/chunks/build/{useTeamsCatalog-BHP6g4ON.mjs → useTeamsCatalog-C-Kv-bqB.mjs} +2 -2
  240. package/.output/server/chunks/build/{useTeamsCatalog-BHP6g4ON.mjs.map → useTeamsCatalog-C-Kv-bqB.mjs.map} +1 -1
  241. package/.output/server/chunks/build/{useTokenCreate-Bl6fJXjW.mjs → useTokenCreate-BxBGZYv1.mjs} +2 -2
  242. package/.output/server/chunks/build/{useTokenCreate-Bl6fJXjW.mjs.map → useTokenCreate-BxBGZYv1.mjs.map} +1 -1
  243. package/.output/server/chunks/build/{useTokenRename-CHm_kIgW.mjs → useTokenRename-DVcV-UuH.mjs} +2 -2
  244. package/.output/server/chunks/build/{useTokenRename-CHm_kIgW.mjs.map → useTokenRename-DVcV-UuH.mjs.map} +1 -1
  245. package/.output/server/chunks/build/{useTokensList-DnT_Sn0Q.mjs → useTokensList-BuCdwEVo.mjs} +2 -2
  246. package/.output/server/chunks/build/{useTokensList-DnT_Sn0Q.mjs.map → useTokensList-BuCdwEVo.mjs.map} +1 -1
  247. package/.output/server/chunks/build/{useWorkbenchAuth-DgxFoSli.mjs → useWorkbenchAuth-aKsreLd_.mjs} +2 -2
  248. package/.output/server/chunks/build/{useWorkbenchAuth-DgxFoSli.mjs.map → useWorkbenchAuth-aKsreLd_.mjs.map} +1 -1
  249. package/.output/server/chunks/build/{useWorkbenchWorkspaces-BHRTd7aZ.mjs → useWorkbenchWorkspaces-HOdVtb3d.mjs} +5 -5
  250. package/.output/server/chunks/build/{useWorkbenchWorkspaces-BHRTd7aZ.mjs.map → useWorkbenchWorkspaces-HOdVtb3d.mjs.map} +1 -1
  251. package/.output/server/chunks/build/{useWorkshopApi-PvyApp92.mjs → useWorkshopApi-DNO9IeDM.mjs} +1 -1
  252. package/.output/server/chunks/build/{useWorkshopApi-PvyApp92.mjs.map → useWorkshopApi-DNO9IeDM.mjs.map} +1 -1
  253. package/.output/server/chunks/build/{useWorkshopWs-f5D2dm08.mjs → useWorkshopWs-9bGupjEF.mjs} +4 -4
  254. package/.output/server/chunks/build/{useWorkshopWs-f5D2dm08.mjs.map → useWorkshopWs-9bGupjEF.mjs.map} +1 -1
  255. package/.output/server/chunks/build/{useWorkspaceAuth-cgLRP1X_.mjs → useWorkspaceAuth-DWpYDsif.mjs} +1 -1
  256. package/.output/server/chunks/build/{useWorkspaceAuth-cgLRP1X_.mjs.map → useWorkspaceAuth-DWpYDsif.mjs.map} +1 -1
  257. package/.output/server/chunks/build/{useWorkspaceChannels-C4b7dg1J.mjs → useWorkspaceChannels-DdH-FrSb.mjs} +5 -5
  258. package/.output/server/chunks/build/{useWorkspaceChannels-C4b7dg1J.mjs.map → useWorkspaceChannels-DdH-FrSb.mjs.map} +1 -1
  259. package/.output/server/chunks/build/{users-nLXiihNX.mjs → users-CR8UDaPu.mjs} +1 -1
  260. package/.output/server/chunks/build/{users-nLXiihNX.mjs.map → users-CR8UDaPu.mjs.map} +1 -1
  261. package/.output/server/chunks/build/{workshop-DDci854s.mjs → workshop-DgDYnOBE.mjs} +8 -8
  262. package/.output/server/chunks/build/{workshop-DDci854s.mjs.map → workshop-DgDYnOBE.mjs.map} +1 -1
  263. package/.output/server/chunks/routes/api/workshop/channels/_id/memories/_memoryId/experience.get.mjs +68 -0
  264. package/.output/server/chunks/routes/api/workshop/channels/_id/memories/_memoryId/experience.get.mjs.map +1 -0
  265. package/.output/server/chunks/routes/renderer.mjs +1 -1
  266. package/.output/server/chunks/virtual/entry.mjs +112 -100
  267. package/.output/server/chunks/virtual/entry.mjs.map +1 -1
  268. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  269. package/.output/server/package.json +1 -1
  270. package/README-zh.md +21 -7
  271. package/README.md +20 -8
  272. package/app/components/AwLogo.vue +75 -75
  273. package/app/components/aml/AmlDatasetFormModal.vue +279 -279
  274. package/app/components/aml/AmlDatasetTable.vue +319 -319
  275. package/app/components/aml/AmlExperimentsTable.vue +142 -142
  276. package/app/components/aml/AmlInfraBanner.vue +23 -23
  277. package/app/components/aml/AmlJobsTable.vue +248 -248
  278. package/app/components/aml/AmlOverviewBar.vue +62 -62
  279. package/app/components/aml/AmlPageHeader.vue +47 -47
  280. package/app/components/aml/AmlPredictConsole.vue +201 -201
  281. package/app/components/app-header/HitlBell.vue +423 -423
  282. package/app/components/daq/DaqAddNodeModal.vue +209 -209
  283. package/app/components/daq/DaqInfraBanner.vue +31 -31
  284. package/app/components/daq/DaqLineBanner.vue +47 -47
  285. package/app/components/daq/DaqOptPanel.vue +197 -197
  286. package/app/components/daq/DaqTemplateModal.vue +246 -246
  287. package/app/components/dashboard/DashboardGaugeBand.vue +78 -78
  288. package/app/components/dashboard/DashboardLineStatePanel.vue +78 -78
  289. package/app/components/dashboard/DashboardNodeStatePanel.vue +46 -46
  290. package/app/components/dashboard/DashboardPipelinePanel.vue +46 -46
  291. package/app/components/dashboard/DashboardTrendPanel.vue +83 -83
  292. package/app/components/dcw/DcwCreateLineModal.vue +105 -105
  293. package/app/components/dcw/DcwDeleteLineModal.vue +73 -73
  294. package/app/components/dcw/DcwDetailTemplateModal.vue +238 -238
  295. package/app/components/dcw/DcwLedgerCard.vue +160 -160
  296. package/app/components/dcw/DcwProductCreateModal.vue +113 -113
  297. package/app/components/dcw/DcwRecipeDispatchHistoryModal.vue +244 -244
  298. package/app/components/dcw/DcwRecipeHistoryModal.vue +165 -165
  299. package/app/components/dcw/DcwRunDataModal.vue +191 -191
  300. package/app/components/dcw/DcwTemplateModal.vue +227 -227
  301. package/app/components/dcw/DcwWriteHistoryCard.vue +96 -96
  302. package/app/components/dcw/ExpConfirmCard.vue +103 -103
  303. package/app/components/dcw/RecipeDispatchApprovalCard.vue +330 -330
  304. package/app/components/logs/LogsPageHead.vue +122 -122
  305. package/app/components/monitor/MonitorAgentTable.vue +143 -143
  306. package/app/components/monitor/MonitorChannelTable.vue +80 -80
  307. package/app/components/monitor/MonitorLoginGate.vue +24 -24
  308. package/app/components/monitor/MonitorPageHead.vue +92 -92
  309. package/app/components/monitor/MonitorProcessTable.vue +159 -159
  310. package/app/components/ontology/OntologyGraph.vue +356 -356
  311. package/app/components/operations/OperationsFilterCard.vue +164 -164
  312. package/app/components/operations/OperationsPageHead.vue +47 -47
  313. package/app/components/tokens/TokenCreateModal.vue +42 -42
  314. package/app/components/tokens/TokenOnceModal.vue +164 -164
  315. package/app/components/tokens/TokenRenameModal.vue +40 -40
  316. package/app/components/tokens/TokensPageHead.vue +76 -76
  317. package/app/components/workshop/A2aRpcDebugger.vue +237 -237
  318. package/app/components/workshop/AgentLanesView.vue +278 -278
  319. package/app/components/workshop/ArtifactCard.vue +120 -120
  320. package/app/components/workshop/DaqTemplateIcon.vue +33 -33
  321. package/app/components/workshop/MemoryPanel.vue +81 -0
  322. package/app/components/workshop/PluginSlot.vue +120 -120
  323. package/app/components/workshop/TranscriptTimeline.vue +223 -223
  324. package/app/components/workshop/blocks/EventBlockAvatar.vue +114 -114
  325. package/app/components/workshop/composer/ReplyChip.vue +65 -65
  326. package/app/components/workshop/lanes/AddMemberModal.vue +270 -270
  327. package/app/components/workshop/lanes/EditMemberModal.vue +106 -106
  328. package/app/components/workshop/lanes/LanesToolbar.vue +97 -97
  329. package/app/components/workshop/session-list/SaveTemplateModal.vue +93 -93
  330. package/app/components/workshop/task-board/Card.vue +172 -172
  331. package/app/components/workshop/task-board/Column.vue +151 -151
  332. package/app/components/workshop/task-board/List.vue +157 -157
  333. package/app/components/workshop/task-board/StatusMenu.vue +88 -88
  334. package/app/components/workshop/teams/TeamAddMemberModal.vue +53 -53
  335. package/app/components/workshop/teams/TeamDeployModal.vue +40 -40
  336. package/app/components/workshop/terminal/TerminalHitlCard.vue +170 -170
  337. package/app/components/workshop/town/TownScene.ts +466 -466
  338. package/app/components/workshop/town/components/AutoModeConfirmModal.vue +94 -94
  339. package/app/components/workshop/town/components/TownLoadingMask.vue +61 -61
  340. package/app/components/workshop/town/components/TownStage.vue +281 -281
  341. package/app/components/workshop/town/scene/town-scene-agents.ts +254 -254
  342. package/app/components/workshop/town/scene/town-scene-behavior.ts +194 -194
  343. package/app/components/workshop/town/scene/town-scene-bubbles.ts +96 -96
  344. package/app/components/workshop/town/scene/town-scene-core.ts +158 -158
  345. package/app/components/workshop/town/scene/town-scene-models.ts +109 -109
  346. package/app/components/workshop/town/scene/town-scene-visuals.ts +279 -279
  347. package/app/components/workshop/town/scene/town-scene3d-agents.ts +308 -308
  348. package/app/components/workshop/town/scene/town-scene3d-blocks.ts +297 -297
  349. package/app/components/workshop/town/scene/town-scene3d-bubbles.ts +281 -281
  350. package/app/components/workshop/town/scene/town-scene3d-camera.ts +282 -282
  351. package/app/components/workshop/town/scene/town-scene3d-devices.ts +433 -433
  352. package/app/components/workshop/town/scene/town-scene3d-editing.ts +490 -490
  353. package/app/components/workshop/town/scene/town-scene3d-events.ts +173 -173
  354. package/app/components/workshop/town/scene/town-scene3d-factory.ts +412 -412
  355. package/app/components/workshop/town/scene/town-scene3d-hud.ts +110 -110
  356. package/app/components/workshop/town/scene/town-scene3d-lifecycle.ts +144 -144
  357. package/app/components/workshop/town/scene/town-scene3d-links.ts +141 -141
  358. package/app/components/workshop/town/scene/town-scene3d-loop.ts +286 -286
  359. package/app/components/workshop/town/scene/town-scene3d-models.ts +154 -154
  360. package/app/components/workshop/town/scene/town-scene3d-nodes.ts +562 -562
  361. package/app/components/workshop/town/scene/town-scene3d-ranges.ts +273 -273
  362. package/app/components/workshop/town/scene/town-scene3d-renderer.ts +320 -320
  363. package/app/components/workshop/town/scene/town-scene3d-selection.ts +257 -257
  364. package/app/components/workshop/town/scene/town-scene3d-types.ts +264 -264
  365. package/app/components/workshop/transcript/TranscriptBlockList.vue +68 -68
  366. package/app/components/workshop/workbench/CreateWorkspaceModal.vue +36 -36
  367. package/app/composables/useResponsive.ts +88 -88
  368. package/app/composables/workshop/device-twin-types.ts +29 -29
  369. package/app/composables/workshop/event-blocks/clusterer.ts +231 -231
  370. package/app/composables/workshop/event-blocks/fold-stream.ts +45 -45
  371. package/app/composables/workshop/event-blocks/markdown.ts +81 -81
  372. package/app/composables/workshop/event-blocks/mentions.ts +49 -49
  373. package/app/composables/workshop/event-blocks/text-utils.ts +100 -100
  374. package/app/composables/workshop/event-blocks/types.ts +40 -40
  375. package/app/composables/workshop/town/town-relay-props.ts +231 -231
  376. package/app/composables/workshop/town/town-view-types.ts +145 -145
  377. package/app/composables/workshop/town/useTownAlarms.ts +36 -36
  378. package/app/composables/workshop/town/useTownCallouts.ts +174 -174
  379. package/app/composables/workshop/town/useTownChannels.ts +220 -220
  380. package/app/composables/workshop/town/useTownHealth.ts +66 -66
  381. package/app/composables/workshop/town/useTownHudTickers.ts +77 -77
  382. package/app/composables/workshop/town/useTownLayout.ts +277 -277
  383. package/app/composables/workshop/town/useTownNavMap.ts +301 -301
  384. package/app/composables/workshop/town/useTownNodeBindings.ts +345 -345
  385. package/app/composables/workshop/town/useTownPanelDrag.ts +91 -91
  386. package/app/composables/workshop/town/useTownSceneControl.ts +92 -92
  387. package/app/composables/workshop/town/useTownSceneInput.ts +275 -275
  388. package/app/composables/workshop/town/useTownSceneRuntime.ts +390 -390
  389. package/app/composables/workshop/town/useTownSheets.ts +41 -41
  390. package/app/composables/workshop/town/useTownTrends.ts +93 -93
  391. package/app/composables/workshop/useChannelList.ts +88 -88
  392. package/app/composables/workshop/useChannelTerminals.ts +65 -65
  393. package/app/composables/workshop/useComposerMentions.ts +130 -130
  394. package/app/composables/workshop/useDeviceTwinDcwWrite.ts +77 -77
  395. package/app/composables/workshop/useDeviceTwinPanel.ts +56 -56
  396. package/app/composables/workshop/useEscClose.ts +44 -44
  397. package/app/composables/workshop/useEventBlockView.ts +159 -159
  398. package/app/composables/workshop/useEventBlocks.ts +33 -33
  399. package/app/composables/workshop/useHitlAnswer.ts +184 -184
  400. package/app/composables/workshop/useLaneWidths.ts +27 -27
  401. package/app/composables/workshop/useOpsLog.ts +191 -191
  402. package/app/composables/workshop/usePluginPanels.ts +72 -72
  403. package/app/composables/workshop/useRuntimeConfigDraft.ts +118 -118
  404. package/app/composables/workshop/useSettingsGroups.ts +243 -243
  405. package/app/composables/workshop/useTaskBoardColumns.ts +47 -47
  406. package/app/composables/workshop/useTerminalRenderer.ts +308 -308
  407. package/app/composables/workshop/useTranscriptEnterStage.ts +48 -48
  408. package/app/composables/workshop/useTranscriptHistory.ts +52 -52
  409. package/app/composables/workshop/useTranscriptScroll.ts +113 -113
  410. package/app/composables/workshop/useVisibleInterval.ts +42 -42
  411. package/app/config/index.ts +1 -1
  412. package/app/middleware/locale-cookie.global.ts +22 -22
  413. package/app/pages/aml/api.ts +6 -6
  414. package/app/pages/aml/composables/useAmlDatasets.ts +38 -38
  415. package/app/pages/aml/composables/useAmlEntities.ts +57 -57
  416. package/app/pages/aml/composables/useAmlEnv.ts +191 -191
  417. package/app/pages/aml/composables/useAmlExperiments.ts +45 -45
  418. package/app/pages/aml/composables/useAmlFormat.ts +44 -44
  419. package/app/pages/aml/composables/useAmlJobs.ts +131 -131
  420. package/app/pages/aml/composables/useAmlModels.ts +56 -56
  421. package/app/pages/aml/composables/useAmlNotes.ts +47 -47
  422. package/app/pages/aml/composables/useAmlPredict.ts +93 -93
  423. package/app/pages/aml/constants.ts +63 -63
  424. package/app/pages/aml/index.vue +236 -236
  425. package/app/pages/daq/composables/useDaqAddNode.ts +126 -126
  426. package/app/pages/daq/composables/useDaqDetailBinding.ts +29 -29
  427. package/app/pages/daq/composables/useDaqDetailFrames.ts +42 -42
  428. package/app/pages/daq/composables/useDaqDetailNode.ts +53 -53
  429. package/app/pages/daq/composables/useDaqDetailParams.ts +138 -138
  430. package/app/pages/daq/composables/useDaqFilters.ts +187 -187
  431. package/app/pages/daq/composables/useDaqNodeWindow.ts +86 -86
  432. package/app/pages/daq/composables/useDaqTemplates.ts +152 -152
  433. package/app/pages/dcw/composables/useDcwCards.ts +27 -27
  434. package/app/pages/dcw/composables/useDcwDetailScope.ts +145 -145
  435. package/app/pages/dcw/composables/useDcwDetailTemplates.ts +94 -94
  436. package/app/pages/dcw/composables/useDcwFilter.ts +29 -29
  437. package/app/pages/dcw/composables/useDcwLedger.ts +34 -34
  438. package/app/pages/dcw/composables/useDcwLineMutations.ts +115 -115
  439. package/app/pages/dcw/composables/useDcwLineRun.ts +60 -60
  440. package/app/pages/dcw/composables/useDcwProducts.ts +54 -54
  441. package/app/pages/dcw/composables/useDcwQuery.ts +68 -68
  442. package/app/pages/dcw/composables/useDcwQuickActions.ts +47 -47
  443. package/app/pages/dcw/index.vue +195 -195
  444. package/app/pages/dcw/types.ts +9 -9
  445. package/app/pages/logs/composables/useLogsFormat.ts +43 -43
  446. package/app/pages/logs/composables/useLogsManual.ts +71 -71
  447. package/app/pages/logs/composables/useLogsScope.ts +39 -39
  448. package/app/pages/monitor/types.ts +61 -61
  449. package/app/pages/tokens/composables/useTokenClipboard.ts +33 -33
  450. package/app/pages/tokens/composables/useTokenCreate.ts +93 -93
  451. package/app/pages/tokens/composables/useTokenRename.ts +54 -54
  452. package/app/pages/tokens/composables/useTokenReveal.ts +84 -84
  453. package/app/pages/tokens/composables/useTokensList.ts +60 -60
  454. package/app/pages/tokens.vue +111 -111
  455. package/app/pages/workshop/agents.vue +130 -130
  456. package/app/pages/workshop/composables/useAgentTemplateActions.ts +42 -42
  457. package/app/pages/workshop/composables/useAgentTemplateDialogState.ts +24 -24
  458. package/app/pages/workshop/composables/useAgentTemplateForm.ts +88 -88
  459. package/app/pages/workshop/composables/useAgentTemplatesCatalog.ts +92 -92
  460. package/app/pages/workshop/composables/useTeamActions.ts +44 -44
  461. package/app/pages/workshop/composables/useTeamAddMemberDialog.ts +49 -49
  462. package/app/pages/workshop/composables/useTeamDeployDialog.ts +49 -49
  463. package/app/pages/workshop/composables/useTeamDialogState.ts +46 -46
  464. package/app/pages/workshop/composables/useTeamPluginDialog.ts +72 -72
  465. package/app/pages/workshop/composables/useTeamsCatalog.ts +100 -100
  466. package/app/pages/workshop/composables/useWorkbenchWorkspaces.ts +123 -123
  467. package/app/pages/workshop/composables/useWorkspaceAuth.ts +31 -31
  468. package/app/plugins/esc-close.client.ts +31 -31
  469. package/app/stores/workshop/hitl.ts +183 -183
  470. package/app/stores/workshop/narrow-fetch.ts +23 -23
  471. package/app/utils/api-error.ts +75 -75
  472. package/app/utils/builtin-catalog.ts +104 -104
  473. package/app/utils/chart-trend.ts +97 -97
  474. package/app/utils/dcw-driver-badge.ts +16 -16
  475. package/app/utils/dcw-recipe-form.ts +26 -26
  476. package/cli/commands/tui.mjs +28 -28
  477. package/cli/commands/update.mjs +124 -124
  478. package/cli/core/child-lifecycle.mjs +136 -136
  479. package/cli/core/meta.mjs +38 -38
  480. package/config.yml +1 -1
  481. package/docker-compose.yml +69 -69
  482. package/docs/cli.en.md +1 -1
  483. package/docs/cli.md +1 -1
  484. package/docs/multi-harness-architecture.md +248 -248
  485. package/docs/plugins.en.md +2 -2
  486. package/docs/plugins.md +2 -2
  487. package/docs/sdk.en.md +1 -1
  488. package/docs/sdk.md +1 -1
  489. package/docs/tui.md +43 -43
  490. package/i18n/dicts/_en.json +1551 -1551
  491. package/i18n/dicts/_en2.json +300 -300
  492. package/i18n/dicts/_en4.json +114 -114
  493. package/i18n/dicts/agentLanesView.json +61 -61
  494. package/i18n/dicts/appHeader.json +17 -17
  495. package/i18n/dicts/channelSessionList.json +51 -51
  496. package/i18n/dicts/clusterTool.json +4 -4
  497. package/i18n/dicts/composer.json +38 -38
  498. package/i18n/dicts/ctpl.json +37 -37
  499. package/i18n/dicts/lineOps.json +14 -14
  500. package/i18n/dicts/multiChannelView.json +13 -13
  501. package/i18n/dicts/notifications.json +13 -13
  502. package/i18n/dicts/taskInspectorDrawer.json +25 -25
  503. package/i18n/dicts/teamPlugins.json +10 -10
  504. package/i18n/dicts/townView.json +211 -211
  505. package/i18n/locales/en.ts +6 -0
  506. package/i18n/locales/zh-CN.ts +6 -0
  507. package/mcp/discovery.mjs +227 -227
  508. package/package.json +1 -1
  509. package/public/favicon.svg +14 -14
  510. package/public/robots.txt +3 -3
  511. package/scripts/_audit/_live-mqtt-e2e-20261028.mjs +219 -219
  512. package/scripts/_audit/audit-harness-adapters.md +664 -664
  513. package/scripts/_audit/aw-mcp-live-e2e.mjs +293 -293
  514. package/scripts/_audit/bump-version.mjs +51 -51
  515. package/scripts/_audit/demo-shot-studio.mjs +37 -37
  516. package/scripts/_audit/demo-shots.mjs +38 -38
  517. package/scripts/_audit/detached-instance.mjs +112 -112
  518. package/scripts/_audit/detached-start.mjs +103 -103
  519. package/scripts/_audit/eda-ui-fix-acceptance.mjs +212 -212
  520. package/scripts/_audit/gen-demo-report.py +69 -69
  521. package/scripts/_audit/governed-learning-evidence.mjs +51 -0
  522. package/scripts/_audit/governed-main-audit.mjs +60 -0
  523. package/scripts/_audit/guard-upstream-liveness.mjs +104 -104
  524. package/scripts/_audit/http-api-authz-audit.md +657 -657
  525. package/scripts/_audit/kb-team-mock-e2e.mjs +146 -146
  526. package/scripts/_audit/kb-team-omp-e2e.mjs +229 -229
  527. package/scripts/_audit/kill-acceptance-strays.mjs +47 -47
  528. package/scripts/_audit/mqtt-pub.mjs +13 -13
  529. package/scripts/_audit/mqtt-topic-probe.mjs +15 -15
  530. package/scripts/_audit/prompt-injection-probe.mts +76 -76
  531. package/scripts/_audit/proto-b3-device-4021.mjs +90 -90
  532. package/scripts/_audit/proto-doc-broker-20261031.mjs +11 -11
  533. package/scripts/_audit/proto-doc-device-20261031.mjs +53 -53
  534. package/scripts/_audit/proto-doc-mqtt-20261031.mjs +32 -32
  535. package/scripts/_audit/run-full-acceptance-20261030.sh +82 -82
  536. package/scripts/_audit/run.mjs +21 -21
  537. package/scripts/_audit/runtime-audit.md +716 -716
  538. package/scripts/_audit/skills-guided-e2e.mjs +316 -316
  539. package/scripts/_audit/stability-soak.mjs +252 -252
  540. package/scripts/_audit/stubs/nuxt-imports.mjs +67 -67
  541. package/scripts/_audit/ts-register-hook.mjs +12 -12
  542. package/scripts/_audit/ts-resolve-hook.mjs +96 -96
  543. package/scripts/_aw0746-stage12.mjs +94 -94
  544. package/scripts/_aw0746-stage34.mjs +136 -136
  545. package/scripts/_aw0746-stage6b-train-sweep.mjs +145 -145
  546. package/scripts/_aw0746-stage6c-jobsmoke.mjs +69 -69
  547. package/scripts/_dbg-configroot-audit.mjs +86 -86
  548. package/scripts/_dbg-daq-intervals-func.mjs +115 -115
  549. package/scripts/_dbg-perms-e2e.mjs +142 -142
  550. package/scripts/_dbg-protocol-matrix.mjs +462 -462
  551. package/scripts/_dbg-render-regression.mjs +193 -193
  552. package/scripts/_dbg-schedule-e2e.mjs +262 -262
  553. package/scripts/_e2e-ui-functional.mjs +371 -371
  554. package/scripts/_lib-aml-python-run.mjs +17 -17
  555. package/scripts/_plc-sim-detached.cjs +22 -22
  556. package/scripts/_provision-injection-line.mjs +39 -39
  557. package/scripts/_run-matrix.ps1 +53 -53
  558. package/scripts/_sweep-button-contrast.mjs +87 -87
  559. package/scripts/acceptance-aml-hybrid-e2e.ts +396 -396
  560. package/scripts/acceptance-aml-hybrid-live.mjs +93 -93
  561. package/scripts/acceptance-aml-model-identity.ts +137 -137
  562. package/scripts/acceptance-governed-product-learning.mjs +110 -0
  563. package/scripts/agent-daq-isolation-e2e.mjs +91 -91
  564. package/scripts/api-contract-smoke.mjs +126 -126
  565. package/scripts/ask-hitl-e2e.mjs +96 -96
  566. package/scripts/aw-expose.mjs +159 -159
  567. package/scripts/channel-interaction-smoke.mjs +80 -80
  568. package/scripts/data-studio-ui-e2e.mjs +163 -163
  569. package/scripts/demo/build-provision-config.mjs +48 -48
  570. package/scripts/demo/create-demo-templates.mjs +84 -84
  571. package/scripts/demo-group-chat-all-real.ts +279 -279
  572. package/scripts/dev-modbus-simulator.mjs +55 -55
  573. package/scripts/docs-shots.mjs +36 -36
  574. package/scripts/e2e-agentteam-chat.mjs +473 -473
  575. package/scripts/e2e-agentteam-goal-closure.mjs +496 -496
  576. package/scripts/e2e-agentteam-real-triage.mjs +421 -421
  577. package/scripts/e2e-aml-decoupled.mjs +162 -162
  578. package/scripts/e2e-analysis-ledger.mjs +202 -202
  579. package/scripts/e2e-aw-tui-global.mjs +277 -277
  580. package/scripts/e2e-binding-modes-real.mjs +442 -442
  581. package/scripts/e2e-business-loop-real.mjs +391 -391
  582. package/scripts/e2e-closedloop/cleanup.mjs +27 -27
  583. package/scripts/e2e-closedloop/lib.mjs +109 -109
  584. package/scripts/e2e-closedloop/main.mjs +59 -59
  585. package/scripts/e2e-closedloop/scenarios-accounts.mjs +210 -210
  586. package/scripts/e2e-closedloop/scenarios-authz.mjs +196 -196
  587. package/scripts/e2e-closedloop/scenarios-daq-dcw.mjs +222 -222
  588. package/scripts/e2e-closedloop/scenarios-plugins.mjs +169 -169
  589. package/scripts/e2e-closedloop/state.mjs +10 -10
  590. package/scripts/e2e-config-groups.mjs +238 -238
  591. package/scripts/e2e-core-bridges-matrix.mjs +303 -303
  592. package/scripts/e2e-crash-cycle.mjs +108 -108
  593. package/scripts/e2e-dcw-halfopen-resilience.mjs +140 -140
  594. package/scripts/e2e-error-handling.mjs +190 -190
  595. package/scripts/e2e-full-closedloop.mjs +16 -16
  596. package/scripts/e2e-golive-matrix.mjs +515 -515
  597. package/scripts/e2e-hil-multi-user.mjs +307 -307
  598. package/scripts/e2e-hil-restart.mjs +339 -339
  599. package/scripts/e2e-idd-results-ui.mjs +182 -182
  600. package/scripts/e2e-line-governance.mjs +352 -352
  601. package/scripts/e2e-mes-mirror-real.mjs +427 -427
  602. package/scripts/e2e-multiexpert-remediation-real.mjs +453 -453
  603. package/scripts/e2e-node-binding-3mode-real.mjs +792 -792
  604. package/scripts/e2e-node-binding-authz.mjs +372 -372
  605. package/scripts/e2e-ontology.mjs +393 -393
  606. package/scripts/e2e-paper-paired-route.mjs +791 -791
  607. package/scripts/e2e-physical-effect-real.mjs +572 -572
  608. package/scripts/e2e-plc-plugin-closedloop.mjs +549 -549
  609. package/scripts/e2e-real-channel-mission.mjs +543 -543
  610. package/scripts/e2e-security-b0.mjs +280 -280
  611. package/scripts/e2e-security-b1.mjs +165 -165
  612. package/scripts/e2e-security-b2b5.mjs +280 -280
  613. package/scripts/full-stack-shots.mjs +145 -145
  614. package/scripts/full-tool-injection-harness-e2e.mjs +214 -214
  615. package/scripts/generate-identifiability-fixtures.ts +98 -98
  616. package/scripts/hitl-reject-e2e.mjs +131 -131
  617. package/scripts/line-log-smoke.mjs +260 -260
  618. package/scripts/live-aml-mockomp.mjs +304 -304
  619. package/scripts/live-aml-optloop-resume.mjs +322 -322
  620. package/scripts/live-aml-optloop.mjs +588 -588
  621. package/scripts/live-aml-stage9.mjs +169 -169
  622. package/scripts/live-aml-two-goals.mjs +315 -315
  623. package/scripts/live-demo-seed.mjs +157 -157
  624. package/scripts/live-optloop-two-modes.mjs +857 -857
  625. package/scripts/mes-agent-integration-e2e.mjs +361 -361
  626. package/scripts/ops-plugins-e2e.mjs +85 -85
  627. package/scripts/scenario-suite-setup.mjs +337 -337
  628. package/scripts/scenario-suite-stability.mjs +144 -144
  629. package/scripts/security-acceptance.mjs +218 -218
  630. package/scripts/team-coordination-e2e.mjs +96 -96
  631. package/scripts/test-agentteam-workflow.ts +472 -472
  632. package/scripts/test-daq-frame-race.mjs +358 -358
  633. package/scripts/test-data-root.mjs +208 -208
  634. package/scripts/test-events-index.mjs +176 -176
  635. package/scripts/test-group-chat-unit/lib.ts +186 -186
  636. package/scripts/test-group-chat-unit/main.ts +45 -45
  637. package/scripts/test-group-chat-unit.ts +35 -35
  638. package/scripts/test-hitl-decision.ts +526 -526
  639. package/scripts/test-hitl-registry.ts +112 -112
  640. package/scripts/test-log-flooding.mjs +160 -160
  641. package/scripts/test-lru.mjs +101 -101
  642. package/scripts/test-plugin-hardening.mjs +90 -90
  643. package/scripts/test-plugin-lifecycle.mjs +173 -173
  644. package/scripts/test-rollback-index.mjs +137 -137
  645. package/scripts/test-schedule-runtime.ts +309 -309
  646. package/scripts/test-sdk-surface.mjs +158 -158
  647. package/scripts/test-serial-bridge.mjs +418 -418
  648. package/scripts/test-tui-commands.mjs +148 -148
  649. package/scripts/test-tui-reducers.mjs +72 -72
  650. package/scripts/three-system-e2e/lib.mjs +79 -79
  651. package/scripts/three-system-e2e/main.mjs +40 -40
  652. package/scripts/three-system-e2e/phases/phase-0-user-token.mjs +42 -42
  653. package/scripts/three-system-e2e/phases/phase-0a2-line-autoselect.mjs +35 -35
  654. package/scripts/three-system-e2e/phases/phase-0b-fixture-grants.mjs +39 -39
  655. package/scripts/three-system-e2e/phases/phase-0c-plugin-outbound-auth.mjs +95 -95
  656. package/scripts/three-system-e2e/phases/stage-1-health.mjs +47 -47
  657. package/scripts/three-system-e2e/phases/stage-2-5-team-plugins.mjs +84 -84
  658. package/scripts/three-system-e2e/phases/stage-2-teams-tools-hitl.mjs +184 -184
  659. package/scripts/three-system-e2e/phases/stage-3-diag.mjs +73 -73
  660. package/scripts/three-system-e2e/phases/stage-4-plugin-toggle.mjs +53 -53
  661. package/scripts/three-system-e2e/state.mjs +87 -87
  662. package/scripts/three-system-e2e.mjs +40 -40
  663. package/scripts/tool-face-batch-identity-e2e.mjs +222 -222
  664. package/scripts/tsconfig.json +14 -14
  665. package/scripts/tui-smoke.mjs +100 -100
  666. package/scripts/typecheck.mjs +75 -75
  667. package/scripts/ui/md-lint.mjs +80 -80
  668. package/scripts/ui/readme-assets.mjs +30 -30
  669. package/scripts/ui/readme-shots.mjs +42 -42
  670. package/scripts/ui/record-demo.mjs +557 -557
  671. package/scripts/ui/record.mjs +225 -225
  672. package/scripts/ui/seed-admin.mjs +68 -68
  673. package/scripts/ui/seed-demo.mjs +83 -83
  674. package/scripts/ui/seed-industrial-demo.mjs +171 -171
  675. package/scripts/ui/shots.mjs +75 -75
  676. package/scripts/ui/verify-nav.mjs +51 -51
  677. package/scripts/ui/verify-responsive.mjs +285 -285
  678. package/sdk/client.d.mts +110 -110
  679. package/sdk/examples/line-sentinel/index.mjs +105 -105
  680. package/sdk/examples/ops-notifier/index.mjs +34 -34
  681. package/sdk/examples/sample-insight/index.mjs +39 -39
  682. package/server/api/plugins/client/[name].get.ts +18 -18
  683. package/server/api/plugins/i18n.get.ts +12 -12
  684. package/server/api/plugins/manifest.get.ts +10 -10
  685. package/server/api/system/backup/list.get.ts +32 -32
  686. package/server/api/system/backup/run.post.ts +21 -21
  687. package/server/api/system/config-groups/[id].delete.ts +21 -21
  688. package/server/api/system/config-groups/[id].patch.ts +26 -26
  689. package/server/api/system/config-groups/index.get.ts +21 -21
  690. package/server/api/system/config-groups/index.post.ts +33 -33
  691. package/server/api/system/timezone.get.ts +20 -20
  692. package/server/api/workshop/[...path].ts +13 -13
  693. package/server/api/workshop/a2a/[agentId]/card/index.get.ts +86 -86
  694. package/server/api/workshop/agent-tools/approvals/index.get.ts +45 -45
  695. package/server/api/workshop/agent-tools/bindings/grant.post.ts +45 -45
  696. package/server/api/workshop/agent-tools/bindings/index.get.ts +41 -41
  697. package/server/api/workshop/agent-tools/bindings/revoke.post.ts +42 -42
  698. package/server/api/workshop/aml/datasets/[id]/preview.get.ts +68 -68
  699. package/server/api/workshop/aml/datasets/[id].delete.ts +39 -39
  700. package/server/api/workshop/aml/datasets/[id].get.ts +53 -53
  701. package/server/api/workshop/aml/datasets/[id].patch.ts +30 -30
  702. package/server/api/workshop/aml/datasets/index.post.ts +27 -27
  703. package/server/api/workshop/aml/entities/index.get.ts +13 -13
  704. package/server/api/workshop/aml/entities/prune.post.ts +28 -28
  705. package/server/api/workshop/aml/env/index.get.ts +13 -13
  706. package/server/api/workshop/aml/env/recheck.post.ts +14 -14
  707. package/server/api/workshop/aml/env/uv.post.ts +21 -21
  708. package/server/api/workshop/aml/env/venv.post.ts +24 -24
  709. package/server/api/workshop/aml/experiments/index.get.ts +35 -35
  710. package/server/api/workshop/aml/index.get.ts +37 -37
  711. package/server/api/workshop/aml/jobs/[id]/cancel.post.ts +21 -21
  712. package/server/api/workshop/aml/jobs/[id]/logs.get.ts +23 -23
  713. package/server/api/workshop/aml/jobs/[id]/retry.post.ts +20 -20
  714. package/server/api/workshop/aml/jobs/[id].delete.ts +44 -44
  715. package/server/api/workshop/aml/jobs/[id].get.ts +23 -23
  716. package/server/api/workshop/aml/models/[id]/predict.post.ts +24 -24
  717. package/server/api/workshop/aml/models/[id]/promote.post.ts +30 -30
  718. package/server/api/workshop/aml/models/index.get.ts +48 -48
  719. package/server/api/workshop/aml/training-plans/[id]/train.post.ts +18 -18
  720. package/server/api/workshop/aml/training-plans/[id].delete.ts +18 -18
  721. package/server/api/workshop/aml/training-plans/[id].patch.ts +30 -30
  722. package/server/api/workshop/aml/training-plans/index.get.ts +9 -9
  723. package/server/api/workshop/aml/training-plans/index.post.ts +43 -43
  724. package/server/api/workshop/analysis/index.post.ts +71 -71
  725. package/server/api/workshop/approvals/index.get.ts +22 -22
  726. package/server/api/workshop/assets/devices/index.post.ts +55 -55
  727. package/server/api/workshop/audit.get.ts +43 -43
  728. package/server/api/workshop/channels/[id]/chat/messages/[messageId]/read.post.ts +22 -22
  729. package/server/api/workshop/channels/[id]/chat/messages/index.get.ts +29 -29
  730. package/server/api/workshop/channels/[id]/chat/messages/index.post.ts +51 -51
  731. package/server/api/workshop/channels/[id]/chat/permissions.get.ts +35 -35
  732. package/server/api/workshop/channels/[id]/members/[userId]/approve.post.ts +20 -20
  733. package/server/api/workshop/channels/[id]/members/[userId].delete.ts +21 -21
  734. package/server/api/workshop/channels/[id]/members/index.get.ts +23 -23
  735. package/server/api/workshop/channels/[id]/members/leave.post.ts +20 -20
  736. package/server/api/workshop/channels/[id]/memories/[memoryId]/experience.get.ts +32 -0
  737. package/server/api/workshop/channels/[id]/twin-profile.get.ts +45 -45
  738. package/server/api/workshop/channels/[id]/twin-profile.patch.ts +91 -91
  739. package/server/api/workshop/daq/storage/retention.put.ts +66 -66
  740. package/server/api/workshop/daq/storage/rollup.post.ts +28 -28
  741. package/server/api/workshop/daq/storage.get.ts +17 -17
  742. package/server/api/workshop/daq/templates/[key].patch.ts +19 -19
  743. package/server/api/workshop/daq/templates/index.post.ts +18 -18
  744. package/server/api/workshop/dcw/[id].delete.ts +41 -41
  745. package/server/api/workshop/dcw/params/[id].delete.ts +19 -19
  746. package/server/api/workshop/dcw/params/[id].patch.ts +23 -23
  747. package/server/api/workshop/dcw/params/index.get.ts +27 -27
  748. package/server/api/workshop/dcw/params/index.post.ts +25 -25
  749. package/server/api/workshop/device-twins/[id].delete.ts +27 -27
  750. package/server/api/workshop/device-twins/[id].patch.ts +31 -31
  751. package/server/api/workshop/eda/runs/[id]/labels.patch.ts +25 -25
  752. package/server/api/workshop/eda/templates/[id].delete.ts +14 -14
  753. package/server/api/workshop/eda/templates/[id].get.ts +15 -15
  754. package/server/api/workshop/eda/templates/[id].patch.ts +20 -20
  755. package/server/api/workshop/eda/templates/index.get.ts +11 -11
  756. package/server/api/workshop/eda/templates/index.post.ts +20 -20
  757. package/server/api/workshop/exp/confirmations/[id]/decide.post.ts +41 -41
  758. package/server/api/workshop/exp/confirmations/index.get.ts +25 -25
  759. package/server/api/workshop/harnesses/[id]/providers.get.ts +16 -16
  760. package/server/api/workshop/notifications/index.get.ts +60 -60
  761. package/server/api/workshop/notifications/read.post.ts +31 -31
  762. package/server/api/workshop/ontology/drafts/[draftId]/subgraph.ts +24 -24
  763. package/server/api/workshop/ops-logs/index.post.ts +92 -92
  764. package/server/api/workshop/plugins/[name]/disable.post.ts +21 -21
  765. package/server/api/workshop/plugins/[name]/enable.post.ts +21 -21
  766. package/server/api/workshop/plugins/[name]/index.get.ts +14 -14
  767. package/server/api/workshop/schedules/[id]/run.post.ts +15 -15
  768. package/server/api/workshop/schedules/[id]/runs.get.ts +15 -15
  769. package/server/api/workshop/schedules/[id].delete.ts +14 -14
  770. package/server/api/workshop/schedules/[id].get.ts +13 -13
  771. package/server/api/workshop/schedules/[id].patch.ts +29 -29
  772. package/server/api/workshop/schedules/index.get.ts +12 -12
  773. package/server/api/workshop/schedules/index.post.ts +32 -32
  774. package/server/api/workshop/tasks/[id]/reassign.post.ts +32 -32
  775. package/server/api/workshop/tasks/[id]/supersede.post.ts +28 -28
  776. package/server/api/workshop/tasks/[id]/update.post.ts +35 -35
  777. package/server/api/workshop/teams/[id]/plugins/index.get.ts +36 -36
  778. package/server/api/workshop/teams/[id]/plugins/index.put.ts +42 -42
  779. package/server/api/workshop/ws/audience.ts +56 -56
  780. package/server/api/workshop/ws/db-buffer.ts +68 -68
  781. package/server/api/workshop/ws/hub.ts +134 -134
  782. package/server/api/workshop/ws/index.ts +23 -23
  783. package/server/api/workshop/ws/notification-uplink.ts +77 -77
  784. package/server/api/workshop/ws/streams.ts +146 -146
  785. package/server/middleware/00-security-headers.ts +45 -45
  786. package/server/middleware/01-rate-guard.ts +129 -129
  787. package/server/plugins/00-daq-credentials.ts +33 -33
  788. package/server/plugins/01-instance-guard.ts +118 -118
  789. package/server/plugins/aml-twin-worker.ts +32 -32
  790. package/server/plugins/backup.ts +268 -268
  791. package/server/plugins/dev-stability-guard.ts +46 -46
  792. package/server/plugins/error-ledger.ts +21 -21
  793. package/server/plugins-builtin/diag-bridge/host/constants.mjs +25 -25
  794. package/server/plugins-builtin/diag-bridge/host/index.mjs +15 -15
  795. package/server/plugins-builtin/diag-bridge/host/snapshot.mjs +93 -93
  796. package/server/plugins-builtin/diag-bridge/index.mjs +9 -9
  797. package/server/plugins-builtin/serial-bridge/drivers.mjs +409 -409
  798. package/server/plugins-builtin/serial-bridge/lib.mjs +208 -208
  799. package/server/plugins-builtin/serial-bridge/rtu.mjs +168 -168
  800. package/server/schemas/user.schema.ts +74 -74
  801. package/server/services/system-config/contracts.ts +29 -29
  802. package/server/services/system-config/dispose.ts +19 -19
  803. package/server/services/system-config/facade.ts +26 -26
  804. package/server/services/system-config/groups.ts +108 -108
  805. package/server/services/system-config/index.ts +21 -21
  806. package/server/services/system-config/init.ts +26 -26
  807. package/server/services/system-config/mutate.ts +110 -110
  808. package/server/services/system-config/plugins.ts +104 -104
  809. package/server/services/system-config/readiness.ts +84 -84
  810. package/server/services/system-config/secrets.ts +50 -50
  811. package/server/services/system-config/state.ts +79 -79
  812. package/server/services/system-config/types.ts +58 -58
  813. package/server/services/workshop/agents/adapters/line-spawn.ts +148 -148
  814. package/server/services/workshop/agents/adapters/omp-rpc-client/api.ts +111 -111
  815. package/server/services/workshop/agents/adapters/omp-rpc-client/contracts.ts +22 -22
  816. package/server/services/workshop/agents/adapters/omp-rpc-client/facade.ts +7 -7
  817. package/server/services/workshop/agents/adapters/omp-rpc-client/helpers.ts +38 -38
  818. package/server/services/workshop/agents/adapters/omp-rpc-client/index.ts +25 -25
  819. package/server/services/workshop/agents/adapters/omp-rpc-client/start.ts +82 -74
  820. package/server/services/workshop/agents/adapters/omp-rpc-client/state.ts +65 -65
  821. package/server/services/workshop/agents/adapters/omp-rpc-client/stdout.ts +92 -92
  822. package/server/services/workshop/agents/adapters/omp-rpc-client/usage.ts +47 -47
  823. package/server/services/workshop/agents/agent-badge.ts +38 -38
  824. package/server/services/workshop/agents/binding-authz.ts +66 -66
  825. package/server/services/workshop/agents/binding-mode.ts +51 -51
  826. package/server/services/workshop/agents/codex-agent/client.ts +170 -170
  827. package/server/services/workshop/agents/codex-agent/core.ts +119 -119
  828. package/server/services/workshop/agents/codex-agent/facade.ts +8 -8
  829. package/server/services/workshop/agents/codex-agent/helpers.ts +13 -13
  830. package/server/services/workshop/agents/codex-agent/hitl.ts +138 -138
  831. package/server/services/workshop/agents/codex-agent/index.ts +14 -14
  832. package/server/services/workshop/agents/codex-agent/types.ts +42 -42
  833. package/server/services/workshop/agents/governance-harness-audit.ts +216 -216
  834. package/server/services/workshop/agents/harness-terminal/api.ts +197 -197
  835. package/server/services/workshop/agents/harness-terminal/index.ts +17 -17
  836. package/server/services/workshop/agents/harness-terminal/io.ts +120 -120
  837. package/server/services/workshop/agents/harness-terminal/park.ts +55 -55
  838. package/server/services/workshop/agents/harness-terminal/sanitize.ts +98 -98
  839. package/server/services/workshop/agents/harness-terminal/session.ts +124 -124
  840. package/server/services/workshop/agents/harness-terminal/shared.ts +74 -74
  841. package/server/services/workshop/agents/hitl-decision/answers.ts +32 -32
  842. package/server/services/workshop/agents/hitl-decision/decide.ts +268 -268
  843. package/server/services/workshop/agents/hitl-decision/payload.ts +45 -45
  844. package/server/services/workshop/agents/hitl-decision/reconcile.ts +12 -0
  845. package/server/services/workshop/agents/hitl-decision/shared.ts +108 -108
  846. package/server/services/workshop/agents/host-tool-bridge/tools/team.ts +70 -70
  847. package/server/services/workshop/agents/industrial/aml-activity.ts +131 -131
  848. package/server/services/workshop/agents/industrial/audit-query.ts +66 -66
  849. package/server/services/workshop/agents/industrial/bench-approval-only.ts +394 -394
  850. package/server/services/workshop/agents/industrial/fallback-hints.ts +31 -31
  851. package/server/services/workshop/agents/industrial/identifiability-tools.ts +247 -247
  852. package/server/services/workshop/agents/industrial/param-tools.ts +69 -69
  853. package/server/services/workshop/agents/node-bindings.repo.ts +210 -210
  854. package/server/services/workshop/agents/node-delegation.ts +204 -204
  855. package/server/services/workshop/agents/omp-agent/agentteam-audit.ts +147 -147
  856. package/server/services/workshop/agents/omp-agent/facade.ts +8 -8
  857. package/server/services/workshop/agents/omp-agent/helpers.ts +37 -37
  858. package/server/services/workshop/agents/omp-agent/index.ts +16 -16
  859. package/server/services/workshop/agents/omp-agent/types.ts +45 -45
  860. package/server/services/workshop/agents/opencode-agent/core.ts +77 -77
  861. package/server/services/workshop/agents/opencode-agent/facade.ts +8 -8
  862. package/server/services/workshop/agents/opencode-agent/helpers.ts +29 -29
  863. package/server/services/workshop/agents/opencode-agent/hitl.ts +113 -113
  864. package/server/services/workshop/agents/opencode-agent/index.ts +16 -16
  865. package/server/services/workshop/agents/opencode-agent/lifecycle.ts +44 -44
  866. package/server/services/workshop/agents/opencode-agent/server.ts +244 -244
  867. package/server/services/workshop/agents/opencode-agent/turn.ts +278 -278
  868. package/server/services/workshop/agents/opencode-agent/types.ts +54 -54
  869. package/server/services/workshop/aml/action-coverage.ts +253 -253
  870. package/server/services/workshop/aml/causal-claim.ts +68 -68
  871. package/server/services/workshop/aml/clean.ts +120 -120
  872. package/server/services/workshop/aml/entity.ts +367 -367
  873. package/server/services/workshop/aml/env-lease.ts +178 -178
  874. package/server/services/workshop/aml/identifiability.ts +335 -335
  875. package/server/services/workshop/aml/job-orchestrator/broadcast.ts +37 -37
  876. package/server/services/workshop/aml/job-orchestrator/control.ts +94 -94
  877. package/server/services/workshop/aml/job-orchestrator/failure.ts +96 -96
  878. package/server/services/workshop/aml/job-orchestrator/index.ts +22 -22
  879. package/server/services/workshop/aml/job-orchestrator/process.ts +101 -101
  880. package/server/services/workshop/aml/job-orchestrator/shared.ts +53 -53
  881. package/server/services/workshop/aml/job-orchestrator/status.ts +20 -20
  882. package/server/services/workshop/aml/job-orchestrator/tick.ts +37 -37
  883. package/server/services/workshop/aml/ontology-learning.ts +143 -143
  884. package/server/services/workshop/aml/python/train-example.py +92 -92
  885. package/server/services/workshop/aml/runtime.ts +137 -137
  886. package/server/services/workshop/aml/stats.ts +140 -140
  887. package/server/services/workshop/aml/twin/calibration-worker.ts +150 -150
  888. package/server/services/workshop/aml/twin/cross-check-service.ts +114 -114
  889. package/server/services/workshop/aml/twin/cross-check.ts +176 -176
  890. package/server/services/workshop/aml/twin/model-backed-provider.ts +332 -332
  891. package/server/services/workshop/aml/twin/physics-spec-draft.ts +185 -185
  892. package/server/services/workshop/aml/twin/prompt-composer.ts +143 -143
  893. package/server/services/workshop/aml/twin/training-plans.ts +260 -260
  894. package/server/services/workshop/aml/twin/write-guard.ts +19 -19
  895. package/server/services/workshop/assets/character-asset.repo.ts +1 -1
  896. package/server/services/workshop/assets/device-twin.repo.ts +1 -1
  897. package/server/services/workshop/bench-mode.ts +22 -22
  898. package/server/services/workshop/daq/alarm-notify.ts +122 -122
  899. package/server/services/workshop/daq/batch-quality.ts +96 -0
  900. package/server/services/workshop/daq/daq-controller/contracts.ts +42 -42
  901. package/server/services/workshop/daq/daq-controller/driver-probe.ts +68 -68
  902. package/server/services/workshop/daq/daq-controller/facade.ts +28 -28
  903. package/server/services/workshop/daq/daq-controller/helpers.ts +52 -52
  904. package/server/services/workshop/daq/daq-controller/index.ts +22 -22
  905. package/server/services/workshop/daq/daq-controller/sweep-alarms.ts +214 -214
  906. package/server/services/workshop/daq/drivers/mock.ts +130 -130
  907. package/server/services/workshop/daq/drivers/modbus-rtu.ts +67 -67
  908. package/server/services/workshop/daq/drivers/modbus-tcp.ts +321 -321
  909. package/server/services/workshop/daq/drivers/opcua.ts +227 -227
  910. package/server/services/workshop/daq/drivers/s7-stub.ts +29 -29
  911. package/server/services/workshop/daq/frame-meta.ts +86 -86
  912. package/server/services/workshop/daq/host-ports.ts +65 -65
  913. package/server/services/workshop/daq/infra-credentials.ts +201 -201
  914. package/server/services/workshop/daq/ingest-policy.ts +80 -80
  915. package/server/services/workshop/daq/node-metadata.ts +79 -79
  916. package/server/services/workshop/daq/objectstore/index.ts +88 -88
  917. package/server/services/workshop/daq/storage/retention.ts +142 -142
  918. package/server/services/workshop/daq/storage/timescale-rollup.ts +612 -612
  919. package/server/services/workshop/db/aml-team-seeds.ts +118 -118
  920. package/server/services/workshop/db/backup-registry.ts +33 -33
  921. package/server/services/workshop/db/channel-member.repo.ts +122 -122
  922. package/server/services/workshop/db/chat-message.repo.ts +261 -261
  923. package/server/services/workshop/db/database/json.ts +14 -14
  924. package/server/services/workshop/db/database/migrations-experience-versions.ts +92 -0
  925. package/server/services/workshop/db/database/migrations-hitl-ref.ts +20 -0
  926. package/server/services/workshop/db/database/open.ts +9 -2
  927. package/server/services/workshop/db/database/schema.ts +101 -1
  928. package/server/services/workshop/db/database/seed-data.ts +60 -60
  929. package/server/services/workshop/db/hitl-request.repo.ts +221 -221
  930. package/server/services/workshop/db/memory.repo.ts +34 -0
  931. package/server/services/workshop/db/readonly.ts +30 -30
  932. package/server/services/workshop/db/scheduled-task.repo.ts +235 -235
  933. package/server/services/workshop/db/transaction.ts +72 -72
  934. package/server/services/workshop/dcw/dcw-controller/actuation.ts +46 -0
  935. package/server/services/workshop/dcw/dcw-controller/control.ts +78 -78
  936. package/server/services/workshop/dcw/dcw-controller/facade.ts +19 -19
  937. package/server/services/workshop/dcw/dcw-controller/helpers.ts +62 -62
  938. package/server/services/workshop/dcw/dcw-controller/index.ts +22 -22
  939. package/server/services/workshop/dcw/dcw-controller/params.ts +97 -97
  940. package/server/services/workshop/dcw/dcw-templates.ts +136 -136
  941. package/server/services/workshop/dcw/mqtt-payload.ts +64 -64
  942. package/server/services/workshop/dcw/param-conversion.ts +78 -78
  943. package/server/services/workshop/dcw/param-map.repo.ts +349 -349
  944. package/server/services/workshop/dcw/plugin-bridge.ts +45 -45
  945. package/server/services/workshop/dcw/recipe-rollback-manager/contracts.ts +26 -26
  946. package/server/services/workshop/dcw/recipe-rollback-manager/facade.ts +13 -13
  947. package/server/services/workshop/dcw/recipe-rollback-manager/helpers.ts +30 -30
  948. package/server/services/workshop/dcw/recipe-rollback-manager/index.ts +17 -17
  949. package/server/services/workshop/dcw/recipe-rollback-manager/internal.ts +33 -33
  950. package/server/services/workshop/dcw/recipe-rollback-manager/judge.ts +52 -52
  951. package/server/services/workshop/dcw/recipe-rollback-manager/lock.ts +138 -138
  952. package/server/services/workshop/dcw/recipe-rollback-manager/state.ts +21 -21
  953. package/server/services/workshop/dcw/recipe-rollback-manager/types.ts +3 -3
  954. package/server/services/workshop/dcw/recipe-rollback-manager/views.ts +214 -214
  955. package/server/services/workshop/dcw/write-attempt-ledger.ts +113 -0
  956. package/server/services/workshop/eda/template-repo.ts +101 -101
  957. package/server/services/workshop/experience/claim-cluster.ts +28 -0
  958. package/server/services/workshop/experience/evaluation-run.ts +175 -0
  959. package/server/services/workshop/experience/evidence-ledger.ts +69 -0
  960. package/server/services/workshop/experience/gates.ts +14 -4
  961. package/server/services/workshop/experience/ontology-proposals.ts +115 -0
  962. package/server/services/workshop/experience/overlay.ts +7 -1
  963. package/server/services/workshop/experience/promote.ts +7 -1
  964. package/server/services/workshop/experience/reflection-effects.ts +155 -0
  965. package/server/services/workshop/experience/release.ts +163 -0
  966. package/server/services/workshop/experience/resolve.ts +142 -0
  967. package/server/services/workshop/experience/trusted-context.ts +90 -0
  968. package/server/services/workshop/experience/types.ts +168 -0
  969. package/server/services/workshop/experience/versions.ts +188 -0
  970. package/server/services/workshop/json-store.mjs +143 -143
  971. package/server/services/workshop/line-scope.ts +80 -80
  972. package/server/services/workshop/mes/mes-hook.ts +594 -594
  973. package/server/services/workshop/net/ssrf.ts +83 -83
  974. package/server/services/workshop/ontology/subgraph.core.ts +300 -300
  975. package/server/services/workshop/ontology/subgraph.service.ts +113 -113
  976. package/server/services/workshop/ops/error-ledger.ts +209 -209
  977. package/server/services/workshop/optimization/python/__pycache__/problems.cpython-312.pyc +0 -0
  978. package/server/services/workshop/plugins/host/config.mjs +135 -135
  979. package/server/services/workshop/plugins/host/index.mjs +23 -23
  980. package/server/services/workshop/plugins/host/init.mjs +140 -140
  981. package/server/services/workshop/plugins/host/state.mjs +54 -54
  982. package/server/services/workshop/plugins/host/toggle.mjs +64 -64
  983. package/server/services/workshop/plugins/host.mjs +9 -9
  984. package/server/services/workshop/projects/plan-progress.ts +140 -0
  985. package/server/services/workshop/projects/service.ts +31 -0
  986. package/server/services/workshop/rsi-adapter/experience.ts +3 -1
  987. package/server/services/workshop/runtime/agent-runtime/facade.ts +7 -7
  988. package/server/services/workshop/runtime/agent-runtime/harness-failure.ts +58 -58
  989. package/server/services/workshop/runtime/agent-runtime/helpers.ts +18 -18
  990. package/server/services/workshop/runtime/agent-runtime/index.ts +19 -19
  991. package/server/services/workshop/runtime/chat-mention.ts +164 -164
  992. package/server/services/workshop/runtime/chat-projection.ts +246 -246
  993. package/server/services/workshop/runtime/embedding-provider.ts +100 -100
  994. package/server/services/workshop/runtime/manager/bus.ts +182 -182
  995. package/server/services/workshop/runtime/manager/channel-template-constants.ts +20 -20
  996. package/server/services/workshop/runtime/manager/chat-reply.ts +181 -181
  997. package/server/services/workshop/runtime/manager/chat.ts +446 -446
  998. package/server/services/workshop/runtime/manager/dependency-health.ts +68 -0
  999. package/server/services/workshop/runtime/manager/facade.ts +24 -24
  1000. package/server/services/workshop/runtime/manager/index.ts +42 -42
  1001. package/server/services/workshop/runtime/manager/internal.ts +73 -73
  1002. package/server/services/workshop/runtime/manager/notifications.ts +108 -108
  1003. package/server/services/workshop/runtime/memory/contracts.ts +18 -18
  1004. package/server/services/workshop/runtime/memory/facade.ts +10 -10
  1005. package/server/services/workshop/runtime/memory/index.ts +27 -27
  1006. package/server/services/workshop/runtime/memory/score.ts +33 -33
  1007. package/server/services/workshop/runtime/memory/state.ts +7 -1
  1008. package/server/services/workshop/runtime/monitor.ts +3 -3
  1009. package/server/services/workshop/runtime/platform-notice.ts +113 -113
  1010. package/server/services/workshop/runtime/schedule-runtime.ts +347 -347
  1011. package/server/services/workshop/runtime/scheduler-loop/facade.ts +7 -7
  1012. package/server/services/workshop/runtime/scheduler-loop/helpers.ts +14 -14
  1013. package/server/services/workshop/runtime/scheduler-loop/index.ts +16 -16
  1014. package/server/services/workshop/runtime/task-engine/facade.ts +7 -7
  1015. package/server/services/workshop/runtime/task-engine/index.ts +15 -15
  1016. package/server/services/workshop/runtime/task-engine/types.ts +3 -3
  1017. package/server/services/workshop/runtime/user-notification-hub.ts +192 -192
  1018. package/server/types/pg.d.ts +49 -49
  1019. package/server/utils/asset-auth.ts +15 -15
  1020. package/server/utils/mojibake-guard.ts +29 -29
  1021. package/server/utils/request-ip.ts +29 -29
  1022. package/server/utils/stability-severity.ts +77 -77
  1023. package/shared/config/groups.mjs +241 -241
  1024. package/shared/lru.mjs +97 -97
  1025. package/tui/README.md +74 -74
  1026. package/tui/aw-tui.mjs +445 -445
  1027. package/tui/commands/index.mjs +287 -287
  1028. package/tui/components/chat-log.mjs +42 -42
  1029. package/tui/components/monitor-pane.mjs +39 -39
  1030. package/tui/components/root.mjs +53 -53
  1031. package/tui/components/status-bar.mjs +33 -33
  1032. package/tui/lib/api.mjs +82 -82
  1033. package/tui/lib/pickers.mjs +121 -121
  1034. package/tui/lib/reducers.mjs +218 -218
  1035. package/tui/lib/state.mjs +86 -86
  1036. package/tui/lib/virtual-terminal.mjs +48 -48
  1037. package/tui/lib/ws.mjs +125 -125
  1038. package/tui/theme.mjs +38 -38
  1039. package/.output/.AgentWorkShop/aml-python/__pycache__/aml_eval.cpython-312.pyc +0 -0
  1040. package/.output/.AgentWorkShop/aml-python/__pycache__/amlkit.cpython-312.pyc +0 -0
  1041. package/.output/.AgentWorkShop/aml-python/__pycache__/train-example.cpython-312.pyc +0 -0
  1042. package/.output/.AgentWorkShop/aml-python/__pycache__/train-hybrid-example.cpython-312.pyc +0 -0
  1043. package/.output/public/_nuxt/PluginSlot.CGH0vb95.css +0 -1
  1044. package/.output/public/_nuxt/aml.PalMp-5n.css +0 -1
  1045. package/.output/public/_nuxt/builds/meta/2f96705b-cf57-4bde-87a4-1b818b268f0f.json +0 -1
  1046. package/server/services/workshop/aml/python/__pycache__/aml_eval.cpython-312.pyc +0 -0
  1047. package/server/services/workshop/aml/python/__pycache__/amlkit.cpython-312.pyc +0 -0
  1048. package/server/services/workshop/aml/python/__pycache__/train-example.cpython-312.pyc +0 -0
  1049. package/server/services/workshop/aml/python/__pycache__/train-hybrid-example.cpython-312.pyc +0 -0
package/tui/aw-tui.mjs CHANGED
@@ -1,445 +1,445 @@
1
- // ============================================================
2
- // AgentWorkShop TUI 入口 —— 终端工作台(与 AgentTeam 交互作业)。
3
- //
4
- // node tui/aw-tui.mjs [--url http://127.0.0.1:3000] [--token ut-*]
5
- // [--channel <名>] [--headless]
6
- // (或 `aw tui …` / `pnpm tui`)
7
- //
8
- // 装配:认证(配置根 tui-auth.json / 交互登录)→ AEP 事件流(频道 sub)+
9
- // 命令系统(/help)+ 监控面板(终端 WS)+ HITL 统一作答(/hitl)。
10
- // --headless:VirtualTerminal 驱动(无 TTY;scripts/tui-smoke.mjs 用)。
11
- // ============================================================
12
- import { TuiMainScreen, Editor, CombinedAutocompleteProvider, ProcessTerminal, truncateToWidth } from '@earendil-works/pi-tui'
13
- import { theme } from './theme.mjs'
14
- import { loadAuth, saveAuth, configRoot } from './lib/config.mjs'
15
- import { createApi } from './lib/api.mjs'
16
- import { connectAep, connectTerm } from './lib/ws.mjs'
17
- import { createState, pushLog, withLog } from './lib/state.mjs'
18
- import { reduceEnvelope, reduceTermFrame } from './lib/reducers.mjs'
19
- import { firstEnterableChannel, openChannelPicker, openTargetPicker } from './lib/pickers.mjs'
20
- import { dispatchCommand, slashCommandCompletions } from './commands/index.mjs'
21
- import { ChatLog } from './components/chat-log.mjs'
22
- import { StatusBar } from './components/status-bar.mjs'
23
- import { MonitorPane } from './components/monitor-pane.mjs'
24
- import { HitlCard } from './components/hitl-card.mjs'
25
- import { buildTree } from './components/root.mjs'
26
- import { VirtualTerminal } from './lib/virtual-terminal.mjs'
27
-
28
- function parseArgs(argv) {
29
- const opts = { headless: false }
30
- for (let i = 0; i < argv.length; i++) {
31
- const a = argv[i]
32
- if (a === '--headless') opts.headless = true
33
- else if (a === '--url') opts.url = argv[++i]
34
- else if (a === '--token') opts.token = argv[++i]
35
- else if (a === '--channel') opts.channel = argv[++i]
36
- }
37
- return opts
38
- }
39
-
40
- /** 认证:已存凭据 → --token → 环境变量 → 交互登录 */
41
- async function ensureAuth(opts) {
42
- const saved = loadAuth()
43
- const baseUrl = opts.url ?? process.env.AW_TUI_URL ?? saved?.baseUrl ?? 'http://127.0.0.1:3000'
44
- if (opts.token) return { baseUrl, token: opts.token }
45
- if (saved?.token && saved.baseUrl === baseUrl) return { baseUrl, token: saved.token }
46
-
47
- const email = process.env.AW_TUI_EMAIL
48
- const password = process.env.AW_TUI_PASSWORD
49
- if (email && password) {
50
- const api = createApi({ baseUrl })
51
- const res = await api.login(email, password)
52
- const auth = { baseUrl, token: res.token, email }
53
- saveAuth(auth)
54
- return auth
55
- }
56
- if (opts.headless) throw new Error('无凭据:headless 模式请传 --token 或设 AW_TUI_EMAIL/AW_TUI_PASSWORD')
57
-
58
- const rl = (await import('node:readline/promises')).createInterface({ input: process.stdin, output: process.stdout })
59
- try {
60
- console.log(`AgentWorkShop TUI 首次使用(凭据落 ${configRoot()}/tui-auth.json)`)
61
- const mail = await rl.question('邮箱: ')
62
- const pass = await rl.question('密码: ')
63
- const api = createApi({ baseUrl })
64
- const res = await api.login(mail.trim(), pass)
65
- const auth = { baseUrl, token: res.token, email: mail.trim() }
66
- saveAuth(auth)
67
- console.log('✔ 登录成功,凭据已保存')
68
- return auth
69
- }
70
- finally {
71
- rl.close()
72
- }
73
- }
74
-
75
- export async function main(argv = process.argv.slice(2)) {
76
- const opts = parseArgs(argv)
77
- const auth = await ensureAuth(opts)
78
-
79
- const store = createState()
80
- const state = withLog(store.state)
81
- state.baseUrl = auth.baseUrl
82
- state.token = auth.token
83
- const api = createApi(auth)
84
-
85
- // ── 终端 + 组件树 ──
86
- const terminal = opts.headless ? new VirtualTerminal() : new ProcessTerminal()
87
- if (opts.headless) (globalThis).__tuiSmokeTerminal = terminal // 无头 e2e 注入句柄
88
- const tui = new TuiMainScreen(terminal)
89
- const chatLog = new ChatLog(state)
90
- const monitorPane = new MonitorPane(state)
91
- const hitlCard = new HitlCard(state)
92
- const statusBar = new StatusBar(state)
93
- const editor = new Editor(tui, theme.editor)
94
- const { stack } = buildTree({ state, chatLog, monitorPane, hitlCard, statusBar, editor })
95
-
96
- const push = (kind, text) => {
97
- pushLog(state, kind, text)
98
- store.notify()
99
- }
100
- const echo = (kind, text) => push(kind === 'warn' ? 'hitl' : kind, text)
101
-
102
- // ── 装配动作(命令系统/提交路由的副作用入口) ──
103
- let termConn = null
104
- const actions = {
105
- async switchChannel(channelId) {
106
- if (state.activeChannelId && state.activeChannelId !== channelId) aep.unsubscribe(state.activeChannelId)
107
- state.activeChannelId = channelId
108
- aep.subscribe(channelId, seqCursor.get(channelId))
109
- await actions.refreshAgents()
110
- // 时间线回填:最近 20 条(人类/Agent 消息)
111
- try {
112
- const msgs = await api.listMessages(channelId, 20)
113
- for (const m of msgs) {
114
- const text = (m.parts ?? []).map(p => p?.text ?? '').join('').trim()
115
- if (!text) continue
116
- if (m.role === 'USER' || m.fromAgentId == null) push('user', text)
117
- else push('agent', text)
118
- }
119
- }
120
- catch { /* 回填失败不阻塞 */ }
121
- const ch = state.channels.find(c => c.id === channelId)
122
- push('system', `已切换到频道「${ch?.name ?? channelId.slice(0, 8)}」—— 普通文本发送任务,/help 查看命令。`)
123
- store.notify()
124
- },
125
- async refreshAgents() {
126
- if (!state.activeChannelId) return
127
- // 权限形状差异(非 owner 进入成员/公开 Channel 时 /agents 会 403)不能升级成
128
- // 未捕获的异步错误 —— 那会让整个 TUI 屏面刷成错误行;失败只提示并保持可用。
129
- try {
130
- const list = await api.listAgents(state.activeChannelId)
131
- state.agents = list.map(a => ({ id: a.id, name: a.name, role: a.role, harness: a.harness, enabled: a.enabled }))
132
- }
133
- catch (err) {
134
- state.agents = []
135
- push('warn', `成员列表不可读:${err.message}(该频道仅群聊可用)`)
136
- }
137
- store.notify()
138
- },
139
- openMonitor(agent) {
140
- termConn?.close()
141
- termConn = null
142
- state.monitor = { agentId: agent.id, name: agent.name, connected: false, waiting: false, streaming: false, lines: [], streamText: '' }
143
- const mon = state.monitor
144
- const addLine = (text, tone = 'dim') => {
145
- mon.lines.push({ text, tone })
146
- if (mon.lines.length > 120) mon.lines.splice(0, mon.lines.length - 120)
147
- }
148
- const applyFrame = (frame) => {
149
- if (frame.type === 'message_update') {
150
- const ev = frame.assistantMessageEvent
151
- const delta = typeof ev?.delta === 'string' ? ev.delta : typeof frame.text === 'string' ? frame.text : ''
152
- if (delta) mon.streamText = (mon.streamText + delta).slice(-2000)
153
- mon.streaming = true
154
- return
155
- }
156
- if (frame.type === 'message_end' || frame.type === 'turn_end') mon.streaming = false
157
- const { lines } = reduceTermFrameSafe(frame)
158
- for (const l of lines) addLine(l.text, l.tone)
159
- }
160
- termConn = connectTerm({
161
- baseUrl: state.baseUrl,
162
- token: state.token,
163
- agentId: agent.id,
164
- channelId: state.activeChannelId,
165
- onMessage(msg) {
166
- if (msg.type === 'term.init') {
167
- mon.connected = true
168
- mon.waiting = false
169
- addLine(`── 已接入 ${msg.meta?.name ?? agent.name} pid ${msg.meta?.pid ?? '?'}(重放 ${msg.lastSeq ?? 0} 帧)──`, 'accent')
170
- if (msg.hitl) {
171
- upsertHitlLocal(state, { kind: 'omp-dialog', id: msg.hitl.id, channelId: state.activeChannelId, agentId: agent.id, agentName: agent.name, method: msg.hitl.method, title: msg.hitl.title, options: msg.hitl.options, message: msg.hitl.message })
172
- addLine(`⏸ 待答对话框:${msg.hitl.title}(/hitl 作答)`, 'warn')
173
- }
174
- // 重放尾部 40 帧给上下文
175
- for (const f of (msg.replay ?? []).slice(-40)) applyFrame(f.frame)
176
- }
177
- else if (msg.type === 'term.frames') {
178
- for (const f of msg.frames ?? []) applyFrame(f.frame)
179
- }
180
- else if (msg.type === 'term.state') {
181
- mon.streaming = msg.streaming
182
- }
183
- else if (msg.type === 'term.notice') {
184
- addLine(msg.message, msg.level === 'error' ? 'error' : 'dim')
185
- }
186
- store.notify()
187
- },
188
- onClose(code) {
189
- if (mon.agentId !== agent.id) return
190
- mon.connected = false
191
- if (code === 4404) {
192
- mon.waiting = true
193
- addLine('omp 进程未启动(随首个任务 spawn),等待接入…', 'warn')
194
- }
195
- store.notify()
196
- },
197
- })
198
- push('system', `监控已开启:${agent.name}(右侧面板;/monitor off 关闭)`)
199
- },
200
- closeMonitor() {
201
- termConn?.close()
202
- termConn = null
203
- state.monitor = { agentId: null, name: null, connected: false, waiting: false, streaming: false, lines: [], streamText: '' }
204
- store.notify()
205
- },
206
- async submitHitlAnswer(text) {
207
- const item = state.hitlAnswering
208
- if (!item) return false
209
- const body = { kind: item.kind, id: item.id }
210
- if (item.kind === 'omp-dialog') {
211
- if (item.method === 'confirm') {
212
- const norm = text.trim().toLowerCase()
213
- if (!['y', 'n', 'yes', 'no'].includes(norm)) {
214
- push('error', 'confirm 对话框请输入 y(批准)或 n(拒绝)')
215
- return true
216
- }
217
- body.confirmed = norm.startsWith('y')
218
- }
219
- else if (item.method === 'select') {
220
- const idx = Number.parseInt(text.trim(), 10)
221
- if (!Number.isInteger(idx) || idx < 1 || idx > (item.options?.length ?? 0)) {
222
- push('error', `select 请输入 1-${item.options?.length ?? 0} 的序号`)
223
- return true
224
- }
225
- body.value = item.options[idx - 1]
226
- }
227
- else {
228
- body.value = text
229
- }
230
- }
231
- else {
232
- // dcw-approval:显式 y/n。此前"非 y 开头一律落定为拒绝"对中文用户是逆向
233
- // 陷阱(输入"同意/ok/批准"全部变成静默拒绝高危下发),必须重输。
234
- const norm = text.trim().toLowerCase()
235
- if (!['y', 'n', 'yes', 'no'].includes(norm)) {
236
- push('error', '下发审批请输入 y(批准)或 n(拒绝)')
237
- return true
238
- }
239
- body.confirmed = norm.startsWith('y')
240
- }
241
- try {
242
- await api.hitlRespond(body)
243
- push('system', `✔ 应答已提交(${item.title})`)
244
- state.hitl = state.hitl.filter(i => !(i.kind === item.kind && i.id === item.id))
245
- state.hitlAnswering = null
246
- }
247
- catch (err) {
248
- push('error', `应答失败:${err.message}`)
249
- if (String(err.code) === 'ALREADY_RESOLVED') {
250
- // 该待办已在别处(WebUI/另一端)解决:同步清除列表项,避免幽灵待办
251
- state.hitl = state.hitl.filter(i => !(i.kind === item.kind && i.id === item.id))
252
- state.hitlAnswering = null
253
- }
254
- }
255
- store.notify()
256
- return true
257
- },
258
- quit() {
259
- aep.close()
260
- termConn?.close()
261
- tui.stop()
262
- process.exit(0)
263
- },
264
- /** 交互式频道选择(启动/`/channel use` 无参) */
265
- pickChannel() {
266
- // 切换失败(权限形状/网络)只提示,不升级为未捕获异步错误
267
- const switchTo = async (id) => {
268
- try {
269
- await actions.switchChannel(id)
270
- }
271
- catch (err) {
272
- push('error', `切换频道失败:${err.message}`)
273
- }
274
- }
275
- openChannelPicker(tui, state, {
276
- onSelect: async (id) => {
277
- tui.setFocus(editor)
278
- await switchTo(id)
279
- },
280
- onCancel: async () => {
281
- tui.setFocus(editor)
282
- // Esc 兜底:未进入任何频道时自动进第一个**可进入**的频道
283
- // (列表里可能只有"仅群聊"的他人频道 —— 落到那种频道管理面会 403)
284
- if (!state.activeChannelId) {
285
- const fallback = firstEnterableChannel(state.channels)
286
- if (fallback) await switchTo(fallback.id)
287
- }
288
- },
289
- })
290
- },
291
- }
292
- const ctx = { state, store, api, echo, push, actions }
293
-
294
- // ── 编辑器提交路由:命令 → HITL 作答 → 普通文本按目标分流 ──
295
- editor.onSubmit = async (text) => {
296
- const trimmed = text.trim()
297
- editor.setText('')
298
- editor.addToHistory?.(text)
299
- if (!trimmed) return
300
- // 斜杠命令优先于作答分支:否则作答卡里输入 /hitl off(卡片提示的放弃方式)
301
- // 会被当作答案文本提交给 Agent —— 与文档承诺行为相反。
302
- if (trimmed.startsWith('/')) {
303
- await dispatchCommand(ctx, trimmed)
304
- store.notify()
305
- return
306
- }
307
- if (state.hitlAnswering) {
308
- await actions.submitHitlAnswer(trimmed)
309
- return
310
- }
311
- if (!state.activeChannelId) {
312
- push('error', '未选择频道:Tab 或 /channel use 打开选择器')
313
- return
314
- }
315
- // 普通文本按目标分流:选定了成员 = 通信消息(immediate);频道 = 发布正式任务
316
- if (state.target) {
317
- const to = state.agents.find(a => a.id === state.target.agentId)
318
- if (!to) {
319
- state.target = null
320
- push('error', '对话目标已失效(成员被移除),已重置为频道模式')
321
- store.notify()
322
- return
323
- }
324
- try {
325
- await api.sendMessage(state.activeChannelId, { toAgentId: to.id, text: trimmed, priority: 'immediate', requireReply: true, fromLabel: state.userName || '用户' })
326
- push('system', `✔ 通信消息已发 → @${to.name}`)
327
- }
328
- catch (err) {
329
- push('error', `发送失败:${err.message}`)
330
- }
331
- store.notify()
332
- return
333
- }
334
- // 频道模式 = 发布正式任务(状态经 /tasks 跟踪)
335
- try {
336
- const task = await api.submitTask(state.activeChannelId, { title: trimmed, mode: 'goal' })
337
- push('system', `✔ 任务已发布:${task?.id?.slice(0, 8) ?? ''}「${trimmed}」`)
338
- }
339
- catch (err) {
340
- push('error', `任务发布失败:${err.message}`)
341
- }
342
- store.notify()
343
- }
344
-
345
- // ── Tab:呼出对话目标选择器(成员 + 频道模式;选定成员自动开独立监控) ──
346
- tui.addInputListener((data) => {
347
- if (data !== '\t' || state.targetPickerOpen) return undefined
348
- openTargetPicker(tui, state, {
349
- onPick: (agent) => {
350
- tui.setFocus(editor)
351
- if (agent) actions.openMonitor(agent)
352
- store.notify()
353
- },
354
- onCancel: () => tui.setFocus(editor),
355
- })
356
- return { consume: true }
357
- })
358
-
359
- // ── AEP 事件流 ──
360
- const seqCursor = new Map()
361
- const aep = connectAep({
362
- baseUrl: state.baseUrl,
363
- token: state.token,
364
- onEvent(e) {
365
- if (e.channelId && typeof e.seq === 'number') {
366
- aep.cursor(e.channelId, e.seq)
367
- seqCursor.set(e.channelId, e.seq)
368
- }
369
- reduceEnvelope(state, e)
370
- store.notify()
371
- },
372
- onState(s) {
373
- state.connState = s
374
- store.notify()
375
- },
376
- })
377
-
378
- store.onChange(() => tui.requestRender())
379
-
380
- // 兜底:未处理的 rejection 只记日志,不让 TUI 进程静默死亡(重连窗口内
381
- // ws.send 之类的瞬态异常不应终止整个工作台)。
382
- process.on('unhandledRejection', (err) => {
383
- push('error', `未处理的异步错误:${err?.message ?? err}`)
384
- })
385
-
386
- // ── 组装视图 ──
387
- // 出口统一按终端宽度夹断:pi-tui 对超宽行直接 stop()+throw(进程崩溃),
388
- // 组合行(左栏+44 列监控右栏)在窄终端必然溢出,必须在进入渲染前截断。
389
- tui.addChild({ render: width => [...stack.render(width), '', ...editor.render(width)].map(l => truncateToWidth(l, width)) })
390
- editor.setAutocompleteProvider?.(new CombinedAutocompleteProvider(slashCommandCompletions(), process.cwd()))
391
- tui.setFocus(editor)
392
-
393
- push('system', `AgentWorkShop TUI 已就绪 ${state.baseUrl}`)
394
- push('system', '普通文本 = 发任务到当前频道;/help 命令列表;/hitl 处理待办。')
395
-
396
- // ── 启动:显式 --channel 直接进入;否则 TUI 就绪后弹出频道选择器 ──
397
- let needPick = false
398
- try {
399
- const channels = await api.listChannels()
400
- state.channels = channels
401
- if (opts.channel) {
402
- const target = channels.find(c => c.name === opts.channel || c.id === opts.channel)
403
- if (target) await actions.switchChannel(target.id)
404
- else push('warn', `频道不存在:${opts.channel}(/channels 查看)`)
405
- }
406
- else if (channels.length > 0) needPick = true
407
- else push('warn', '尚无频道:/channel new <名称> 创建一个。')
408
- const me = await api.get('/api/workshop/users/me').catch(() => null)
409
- state.userName = me?.user?.name ?? me?.name ?? '用户'
410
- }
411
- catch (err) {
412
- push('error', `初始化失败:${err.message}`)
413
- }
414
-
415
- tui.start()
416
- if (needPick) {
417
- push('system', '↑↓ 选择要进入的频道,Enter 确认(Esc 自动进入第一个)。')
418
- actions.pickChannel()
419
- }
420
- return tui
421
- }
422
-
423
- function upsertHitlLocal(state, item) {
424
- const i = state.hitl.findIndex(x => x.kind === item.kind && x.id === item.id)
425
- if (i >= 0) state.hitl[i] = item
426
- else state.hitl.push(item)
427
- }
428
-
429
- /** reduceTermFrame 的防御包装(未知帧形状不炸渲染) */
430
- function reduceTermFrameSafe(frame) {
431
- try {
432
- return reduceTermFrame(frame)
433
- }
434
- catch {
435
- return { lines: [] }
436
- }
437
- }
438
-
439
- // 直接运行入口(aw tui / pnpm tui 均落到这里)
440
- if (process.argv[1] && import.meta.url.endsWith(process.argv[1].replaceAll('\\', '/').split('/').pop())) {
441
- main().catch((err) => {
442
- console.error('[tui] 启动失败:', err.message)
443
- process.exit(1)
444
- })
445
- }
1
+ // ============================================================
2
+ // AgentWorkShop TUI 入口 —— 终端工作台(与 AgentTeam 交互作业)。
3
+ //
4
+ // node tui/aw-tui.mjs [--url http://127.0.0.1:3000] [--token ut-*]
5
+ // [--channel <名>] [--headless]
6
+ // (或 `aw tui …` / `pnpm tui`)
7
+ //
8
+ // 装配:认证(配置根 tui-auth.json / 交互登录)→ AEP 事件流(频道 sub)+
9
+ // 命令系统(/help)+ 监控面板(终端 WS)+ HITL 统一作答(/hitl)。
10
+ // --headless:VirtualTerminal 驱动(无 TTY;scripts/tui-smoke.mjs 用)。
11
+ // ============================================================
12
+ import { TuiMainScreen, Editor, CombinedAutocompleteProvider, ProcessTerminal, truncateToWidth } from '@earendil-works/pi-tui'
13
+ import { theme } from './theme.mjs'
14
+ import { loadAuth, saveAuth, configRoot } from './lib/config.mjs'
15
+ import { createApi } from './lib/api.mjs'
16
+ import { connectAep, connectTerm } from './lib/ws.mjs'
17
+ import { createState, pushLog, withLog } from './lib/state.mjs'
18
+ import { reduceEnvelope, reduceTermFrame } from './lib/reducers.mjs'
19
+ import { firstEnterableChannel, openChannelPicker, openTargetPicker } from './lib/pickers.mjs'
20
+ import { dispatchCommand, slashCommandCompletions } from './commands/index.mjs'
21
+ import { ChatLog } from './components/chat-log.mjs'
22
+ import { StatusBar } from './components/status-bar.mjs'
23
+ import { MonitorPane } from './components/monitor-pane.mjs'
24
+ import { HitlCard } from './components/hitl-card.mjs'
25
+ import { buildTree } from './components/root.mjs'
26
+ import { VirtualTerminal } from './lib/virtual-terminal.mjs'
27
+
28
+ function parseArgs(argv) {
29
+ const opts = { headless: false }
30
+ for (let i = 0; i < argv.length; i++) {
31
+ const a = argv[i]
32
+ if (a === '--headless') opts.headless = true
33
+ else if (a === '--url') opts.url = argv[++i]
34
+ else if (a === '--token') opts.token = argv[++i]
35
+ else if (a === '--channel') opts.channel = argv[++i]
36
+ }
37
+ return opts
38
+ }
39
+
40
+ /** 认证:已存凭据 → --token → 环境变量 → 交互登录 */
41
+ async function ensureAuth(opts) {
42
+ const saved = loadAuth()
43
+ const baseUrl = opts.url ?? process.env.AW_TUI_URL ?? saved?.baseUrl ?? 'http://127.0.0.1:3000'
44
+ if (opts.token) return { baseUrl, token: opts.token }
45
+ if (saved?.token && saved.baseUrl === baseUrl) return { baseUrl, token: saved.token }
46
+
47
+ const email = process.env.AW_TUI_EMAIL
48
+ const password = process.env.AW_TUI_PASSWORD
49
+ if (email && password) {
50
+ const api = createApi({ baseUrl })
51
+ const res = await api.login(email, password)
52
+ const auth = { baseUrl, token: res.token, email }
53
+ saveAuth(auth)
54
+ return auth
55
+ }
56
+ if (opts.headless) throw new Error('无凭据:headless 模式请传 --token 或设 AW_TUI_EMAIL/AW_TUI_PASSWORD')
57
+
58
+ const rl = (await import('node:readline/promises')).createInterface({ input: process.stdin, output: process.stdout })
59
+ try {
60
+ console.log(`AgentWorkShop TUI 首次使用(凭据落 ${configRoot()}/tui-auth.json)`)
61
+ const mail = await rl.question('邮箱: ')
62
+ const pass = await rl.question('密码: ')
63
+ const api = createApi({ baseUrl })
64
+ const res = await api.login(mail.trim(), pass)
65
+ const auth = { baseUrl, token: res.token, email: mail.trim() }
66
+ saveAuth(auth)
67
+ console.log('✔ 登录成功,凭据已保存')
68
+ return auth
69
+ }
70
+ finally {
71
+ rl.close()
72
+ }
73
+ }
74
+
75
+ export async function main(argv = process.argv.slice(2)) {
76
+ const opts = parseArgs(argv)
77
+ const auth = await ensureAuth(opts)
78
+
79
+ const store = createState()
80
+ const state = withLog(store.state)
81
+ state.baseUrl = auth.baseUrl
82
+ state.token = auth.token
83
+ const api = createApi(auth)
84
+
85
+ // ── 终端 + 组件树 ──
86
+ const terminal = opts.headless ? new VirtualTerminal() : new ProcessTerminal()
87
+ if (opts.headless) (globalThis).__tuiSmokeTerminal = terminal // 无头 e2e 注入句柄
88
+ const tui = new TuiMainScreen(terminal)
89
+ const chatLog = new ChatLog(state)
90
+ const monitorPane = new MonitorPane(state)
91
+ const hitlCard = new HitlCard(state)
92
+ const statusBar = new StatusBar(state)
93
+ const editor = new Editor(tui, theme.editor)
94
+ const { stack } = buildTree({ state, chatLog, monitorPane, hitlCard, statusBar, editor })
95
+
96
+ const push = (kind, text) => {
97
+ pushLog(state, kind, text)
98
+ store.notify()
99
+ }
100
+ const echo = (kind, text) => push(kind === 'warn' ? 'hitl' : kind, text)
101
+
102
+ // ── 装配动作(命令系统/提交路由的副作用入口) ──
103
+ let termConn = null
104
+ const actions = {
105
+ async switchChannel(channelId) {
106
+ if (state.activeChannelId && state.activeChannelId !== channelId) aep.unsubscribe(state.activeChannelId)
107
+ state.activeChannelId = channelId
108
+ aep.subscribe(channelId, seqCursor.get(channelId))
109
+ await actions.refreshAgents()
110
+ // 时间线回填:最近 20 条(人类/Agent 消息)
111
+ try {
112
+ const msgs = await api.listMessages(channelId, 20)
113
+ for (const m of msgs) {
114
+ const text = (m.parts ?? []).map(p => p?.text ?? '').join('').trim()
115
+ if (!text) continue
116
+ if (m.role === 'USER' || m.fromAgentId == null) push('user', text)
117
+ else push('agent', text)
118
+ }
119
+ }
120
+ catch { /* 回填失败不阻塞 */ }
121
+ const ch = state.channels.find(c => c.id === channelId)
122
+ push('system', `已切换到频道「${ch?.name ?? channelId.slice(0, 8)}」—— 普通文本发送任务,/help 查看命令。`)
123
+ store.notify()
124
+ },
125
+ async refreshAgents() {
126
+ if (!state.activeChannelId) return
127
+ // 权限形状差异(非 owner 进入成员/公开 Channel 时 /agents 会 403)不能升级成
128
+ // 未捕获的异步错误 —— 那会让整个 TUI 屏面刷成错误行;失败只提示并保持可用。
129
+ try {
130
+ const list = await api.listAgents(state.activeChannelId)
131
+ state.agents = list.map(a => ({ id: a.id, name: a.name, role: a.role, harness: a.harness, enabled: a.enabled }))
132
+ }
133
+ catch (err) {
134
+ state.agents = []
135
+ push('warn', `成员列表不可读:${err.message}(该频道仅群聊可用)`)
136
+ }
137
+ store.notify()
138
+ },
139
+ openMonitor(agent) {
140
+ termConn?.close()
141
+ termConn = null
142
+ state.monitor = { agentId: agent.id, name: agent.name, connected: false, waiting: false, streaming: false, lines: [], streamText: '' }
143
+ const mon = state.monitor
144
+ const addLine = (text, tone = 'dim') => {
145
+ mon.lines.push({ text, tone })
146
+ if (mon.lines.length > 120) mon.lines.splice(0, mon.lines.length - 120)
147
+ }
148
+ const applyFrame = (frame) => {
149
+ if (frame.type === 'message_update') {
150
+ const ev = frame.assistantMessageEvent
151
+ const delta = typeof ev?.delta === 'string' ? ev.delta : typeof frame.text === 'string' ? frame.text : ''
152
+ if (delta) mon.streamText = (mon.streamText + delta).slice(-2000)
153
+ mon.streaming = true
154
+ return
155
+ }
156
+ if (frame.type === 'message_end' || frame.type === 'turn_end') mon.streaming = false
157
+ const { lines } = reduceTermFrameSafe(frame)
158
+ for (const l of lines) addLine(l.text, l.tone)
159
+ }
160
+ termConn = connectTerm({
161
+ baseUrl: state.baseUrl,
162
+ token: state.token,
163
+ agentId: agent.id,
164
+ channelId: state.activeChannelId,
165
+ onMessage(msg) {
166
+ if (msg.type === 'term.init') {
167
+ mon.connected = true
168
+ mon.waiting = false
169
+ addLine(`── 已接入 ${msg.meta?.name ?? agent.name} pid ${msg.meta?.pid ?? '?'}(重放 ${msg.lastSeq ?? 0} 帧)──`, 'accent')
170
+ if (msg.hitl) {
171
+ upsertHitlLocal(state, { kind: 'omp-dialog', id: msg.hitl.id, channelId: state.activeChannelId, agentId: agent.id, agentName: agent.name, method: msg.hitl.method, title: msg.hitl.title, options: msg.hitl.options, message: msg.hitl.message })
172
+ addLine(`⏸ 待答对话框:${msg.hitl.title}(/hitl 作答)`, 'warn')
173
+ }
174
+ // 重放尾部 40 帧给上下文
175
+ for (const f of (msg.replay ?? []).slice(-40)) applyFrame(f.frame)
176
+ }
177
+ else if (msg.type === 'term.frames') {
178
+ for (const f of msg.frames ?? []) applyFrame(f.frame)
179
+ }
180
+ else if (msg.type === 'term.state') {
181
+ mon.streaming = msg.streaming
182
+ }
183
+ else if (msg.type === 'term.notice') {
184
+ addLine(msg.message, msg.level === 'error' ? 'error' : 'dim')
185
+ }
186
+ store.notify()
187
+ },
188
+ onClose(code) {
189
+ if (mon.agentId !== agent.id) return
190
+ mon.connected = false
191
+ if (code === 4404) {
192
+ mon.waiting = true
193
+ addLine('omp 进程未启动(随首个任务 spawn),等待接入…', 'warn')
194
+ }
195
+ store.notify()
196
+ },
197
+ })
198
+ push('system', `监控已开启:${agent.name}(右侧面板;/monitor off 关闭)`)
199
+ },
200
+ closeMonitor() {
201
+ termConn?.close()
202
+ termConn = null
203
+ state.monitor = { agentId: null, name: null, connected: false, waiting: false, streaming: false, lines: [], streamText: '' }
204
+ store.notify()
205
+ },
206
+ async submitHitlAnswer(text) {
207
+ const item = state.hitlAnswering
208
+ if (!item) return false
209
+ const body = { kind: item.kind, id: item.id }
210
+ if (item.kind === 'omp-dialog') {
211
+ if (item.method === 'confirm') {
212
+ const norm = text.trim().toLowerCase()
213
+ if (!['y', 'n', 'yes', 'no'].includes(norm)) {
214
+ push('error', 'confirm 对话框请输入 y(批准)或 n(拒绝)')
215
+ return true
216
+ }
217
+ body.confirmed = norm.startsWith('y')
218
+ }
219
+ else if (item.method === 'select') {
220
+ const idx = Number.parseInt(text.trim(), 10)
221
+ if (!Number.isInteger(idx) || idx < 1 || idx > (item.options?.length ?? 0)) {
222
+ push('error', `select 请输入 1-${item.options?.length ?? 0} 的序号`)
223
+ return true
224
+ }
225
+ body.value = item.options[idx - 1]
226
+ }
227
+ else {
228
+ body.value = text
229
+ }
230
+ }
231
+ else {
232
+ // dcw-approval:显式 y/n。此前"非 y 开头一律落定为拒绝"对中文用户是逆向
233
+ // 陷阱(输入"同意/ok/批准"全部变成静默拒绝高危下发),必须重输。
234
+ const norm = text.trim().toLowerCase()
235
+ if (!['y', 'n', 'yes', 'no'].includes(norm)) {
236
+ push('error', '下发审批请输入 y(批准)或 n(拒绝)')
237
+ return true
238
+ }
239
+ body.confirmed = norm.startsWith('y')
240
+ }
241
+ try {
242
+ await api.hitlRespond(body)
243
+ push('system', `✔ 应答已提交(${item.title})`)
244
+ state.hitl = state.hitl.filter(i => !(i.kind === item.kind && i.id === item.id))
245
+ state.hitlAnswering = null
246
+ }
247
+ catch (err) {
248
+ push('error', `应答失败:${err.message}`)
249
+ if (String(err.code) === 'ALREADY_RESOLVED') {
250
+ // 该待办已在别处(WebUI/另一端)解决:同步清除列表项,避免幽灵待办
251
+ state.hitl = state.hitl.filter(i => !(i.kind === item.kind && i.id === item.id))
252
+ state.hitlAnswering = null
253
+ }
254
+ }
255
+ store.notify()
256
+ return true
257
+ },
258
+ quit() {
259
+ aep.close()
260
+ termConn?.close()
261
+ tui.stop()
262
+ process.exit(0)
263
+ },
264
+ /** 交互式频道选择(启动/`/channel use` 无参) */
265
+ pickChannel() {
266
+ // 切换失败(权限形状/网络)只提示,不升级为未捕获异步错误
267
+ const switchTo = async (id) => {
268
+ try {
269
+ await actions.switchChannel(id)
270
+ }
271
+ catch (err) {
272
+ push('error', `切换频道失败:${err.message}`)
273
+ }
274
+ }
275
+ openChannelPicker(tui, state, {
276
+ onSelect: async (id) => {
277
+ tui.setFocus(editor)
278
+ await switchTo(id)
279
+ },
280
+ onCancel: async () => {
281
+ tui.setFocus(editor)
282
+ // Esc 兜底:未进入任何频道时自动进第一个**可进入**的频道
283
+ // (列表里可能只有"仅群聊"的他人频道 —— 落到那种频道管理面会 403)
284
+ if (!state.activeChannelId) {
285
+ const fallback = firstEnterableChannel(state.channels)
286
+ if (fallback) await switchTo(fallback.id)
287
+ }
288
+ },
289
+ })
290
+ },
291
+ }
292
+ const ctx = { state, store, api, echo, push, actions }
293
+
294
+ // ── 编辑器提交路由:命令 → HITL 作答 → 普通文本按目标分流 ──
295
+ editor.onSubmit = async (text) => {
296
+ const trimmed = text.trim()
297
+ editor.setText('')
298
+ editor.addToHistory?.(text)
299
+ if (!trimmed) return
300
+ // 斜杠命令优先于作答分支:否则作答卡里输入 /hitl off(卡片提示的放弃方式)
301
+ // 会被当作答案文本提交给 Agent —— 与文档承诺行为相反。
302
+ if (trimmed.startsWith('/')) {
303
+ await dispatchCommand(ctx, trimmed)
304
+ store.notify()
305
+ return
306
+ }
307
+ if (state.hitlAnswering) {
308
+ await actions.submitHitlAnswer(trimmed)
309
+ return
310
+ }
311
+ if (!state.activeChannelId) {
312
+ push('error', '未选择频道:Tab 或 /channel use 打开选择器')
313
+ return
314
+ }
315
+ // 普通文本按目标分流:选定了成员 = 通信消息(immediate);频道 = 发布正式任务
316
+ if (state.target) {
317
+ const to = state.agents.find(a => a.id === state.target.agentId)
318
+ if (!to) {
319
+ state.target = null
320
+ push('error', '对话目标已失效(成员被移除),已重置为频道模式')
321
+ store.notify()
322
+ return
323
+ }
324
+ try {
325
+ await api.sendMessage(state.activeChannelId, { toAgentId: to.id, text: trimmed, priority: 'immediate', requireReply: true, fromLabel: state.userName || '用户' })
326
+ push('system', `✔ 通信消息已发 → @${to.name}`)
327
+ }
328
+ catch (err) {
329
+ push('error', `发送失败:${err.message}`)
330
+ }
331
+ store.notify()
332
+ return
333
+ }
334
+ // 频道模式 = 发布正式任务(状态经 /tasks 跟踪)
335
+ try {
336
+ const task = await api.submitTask(state.activeChannelId, { title: trimmed, mode: 'goal' })
337
+ push('system', `✔ 任务已发布:${task?.id?.slice(0, 8) ?? ''}「${trimmed}」`)
338
+ }
339
+ catch (err) {
340
+ push('error', `任务发布失败:${err.message}`)
341
+ }
342
+ store.notify()
343
+ }
344
+
345
+ // ── Tab:呼出对话目标选择器(成员 + 频道模式;选定成员自动开独立监控) ──
346
+ tui.addInputListener((data) => {
347
+ if (data !== '\t' || state.targetPickerOpen) return undefined
348
+ openTargetPicker(tui, state, {
349
+ onPick: (agent) => {
350
+ tui.setFocus(editor)
351
+ if (agent) actions.openMonitor(agent)
352
+ store.notify()
353
+ },
354
+ onCancel: () => tui.setFocus(editor),
355
+ })
356
+ return { consume: true }
357
+ })
358
+
359
+ // ── AEP 事件流 ──
360
+ const seqCursor = new Map()
361
+ const aep = connectAep({
362
+ baseUrl: state.baseUrl,
363
+ token: state.token,
364
+ onEvent(e) {
365
+ if (e.channelId && typeof e.seq === 'number') {
366
+ aep.cursor(e.channelId, e.seq)
367
+ seqCursor.set(e.channelId, e.seq)
368
+ }
369
+ reduceEnvelope(state, e)
370
+ store.notify()
371
+ },
372
+ onState(s) {
373
+ state.connState = s
374
+ store.notify()
375
+ },
376
+ })
377
+
378
+ store.onChange(() => tui.requestRender())
379
+
380
+ // 兜底:未处理的 rejection 只记日志,不让 TUI 进程静默死亡(重连窗口内
381
+ // ws.send 之类的瞬态异常不应终止整个工作台)。
382
+ process.on('unhandledRejection', (err) => {
383
+ push('error', `未处理的异步错误:${err?.message ?? err}`)
384
+ })
385
+
386
+ // ── 组装视图 ──
387
+ // 出口统一按终端宽度夹断:pi-tui 对超宽行直接 stop()+throw(进程崩溃),
388
+ // 组合行(左栏+44 列监控右栏)在窄终端必然溢出,必须在进入渲染前截断。
389
+ tui.addChild({ render: width => [...stack.render(width), '', ...editor.render(width)].map(l => truncateToWidth(l, width)) })
390
+ editor.setAutocompleteProvider?.(new CombinedAutocompleteProvider(slashCommandCompletions(), process.cwd()))
391
+ tui.setFocus(editor)
392
+
393
+ push('system', `AgentWorkShop TUI 已就绪 ${state.baseUrl}`)
394
+ push('system', '普通文本 = 发任务到当前频道;/help 命令列表;/hitl 处理待办。')
395
+
396
+ // ── 启动:显式 --channel 直接进入;否则 TUI 就绪后弹出频道选择器 ──
397
+ let needPick = false
398
+ try {
399
+ const channels = await api.listChannels()
400
+ state.channels = channels
401
+ if (opts.channel) {
402
+ const target = channels.find(c => c.name === opts.channel || c.id === opts.channel)
403
+ if (target) await actions.switchChannel(target.id)
404
+ else push('warn', `频道不存在:${opts.channel}(/channels 查看)`)
405
+ }
406
+ else if (channels.length > 0) needPick = true
407
+ else push('warn', '尚无频道:/channel new <名称> 创建一个。')
408
+ const me = await api.get('/api/workshop/users/me').catch(() => null)
409
+ state.userName = me?.user?.name ?? me?.name ?? '用户'
410
+ }
411
+ catch (err) {
412
+ push('error', `初始化失败:${err.message}`)
413
+ }
414
+
415
+ tui.start()
416
+ if (needPick) {
417
+ push('system', '↑↓ 选择要进入的频道,Enter 确认(Esc 自动进入第一个)。')
418
+ actions.pickChannel()
419
+ }
420
+ return tui
421
+ }
422
+
423
+ function upsertHitlLocal(state, item) {
424
+ const i = state.hitl.findIndex(x => x.kind === item.kind && x.id === item.id)
425
+ if (i >= 0) state.hitl[i] = item
426
+ else state.hitl.push(item)
427
+ }
428
+
429
+ /** reduceTermFrame 的防御包装(未知帧形状不炸渲染) */
430
+ function reduceTermFrameSafe(frame) {
431
+ try {
432
+ return reduceTermFrame(frame)
433
+ }
434
+ catch {
435
+ return { lines: [] }
436
+ }
437
+ }
438
+
439
+ // 直接运行入口(aw tui / pnpm tui 均落到这里)
440
+ if (process.argv[1] && import.meta.url.endsWith(process.argv[1].replaceAll('\\', '/').split('/').pop())) {
441
+ main().catch((err) => {
442
+ console.error('[tui] 启动失败:', err.message)
443
+ process.exit(1)
444
+ })
445
+ }