agentworkshop 0.7.24 → 0.7.27

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 (243) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/2jaJHWIJ.js +1 -0
  3. package/.output/public/_nuxt/B7gZokg82.js +209 -0
  4. package/.output/public/_nuxt/{Dfe8vXdG.js → B8kt898d.js} +1 -1
  5. package/.output/public/_nuxt/{BvNJUu3s.js → BFGpEo8S.js} +1 -1
  6. package/.output/public/_nuxt/{BAfp6tmu.js → BG4zduPf.js} +5 -5
  7. package/.output/public/_nuxt/{BMb80_tm.js → BGhOrgle.js} +1 -1
  8. package/.output/public/_nuxt/{Bc-_IsBP.js → BHcpzI2n.js} +1 -1
  9. package/.output/public/_nuxt/{Djir5rSD.js → BTLEvDxM.js} +1 -1
  10. package/.output/public/_nuxt/{b50gYVZl.js → BWyR3awA.js} +1 -1
  11. package/.output/public/_nuxt/Bc89zKq2.js +1 -0
  12. package/.output/public/_nuxt/{CxY6LfeN.js → BetmGSO4.js} +1 -1
  13. package/.output/public/_nuxt/{DAR70Lf52.js → BgCrZKv_2.js} +1 -1
  14. package/.output/public/_nuxt/{DUToq-k_.js → BowTbasd.js} +1 -1
  15. package/.output/public/_nuxt/{D6HDb-vN2.js → BvtknqSC2.js} +1 -1
  16. package/.output/public/_nuxt/{CLZWFhZC.js → CTfqWGdy.js} +1 -1
  17. package/.output/public/_nuxt/Chc5pfAA.js +1 -0
  18. package/.output/public/_nuxt/CobSUzQv.js +2 -0
  19. package/.output/public/_nuxt/{kZV5TQvh2.js → CucID8qg2.js} +1 -1
  20. package/.output/public/_nuxt/{CAGL7TNK.js → DHbTyoAV.js} +1 -1
  21. package/.output/public/_nuxt/{DSa2O56y.js → DfLUN8kY.js} +1 -1
  22. package/.output/public/_nuxt/{Coik560n.js → DjU9Dx5Y.js} +1 -1
  23. package/.output/public/_nuxt/DnziMlcX.js +1 -0
  24. package/.output/public/_nuxt/{Ct68Z0232.js → DosOJEmZ2.js} +1 -1
  25. package/.output/public/_nuxt/{CDLv-n51.js → Q_SJDSgx.js} +1 -1
  26. package/.output/public/_nuxt/{TownView.zu2rU5nS.css → TownView.CtskuMXS.css} +1 -1
  27. package/.output/public/_nuxt/{CuVGPuP1.js → XY2z78rj.js} +1 -1
  28. package/.output/public/_nuxt/_id_.DdbYeLqn.css +1 -0
  29. package/.output/public/_nuxt/{C1CSiSBN.js → bFnZa2yd.js} +1 -1
  30. package/.output/public/_nuxt/builds/latest.json +1 -1
  31. package/.output/public/_nuxt/builds/meta/f7a8e33d-5422-45ac-895d-27168f97e3ad.json +1 -0
  32. package/.output/public/_nuxt/daq.DGV9QS8d.css +1 -0
  33. package/.output/public/_nuxt/{entry.AZM1Culo.css → entry.BN02X8iR.css} +1 -1
  34. package/.output/public/_nuxt/{X6IraCTB.js → rkVgzg62.js} +1 -1
  35. package/.output/public/_nuxt/settings.W6qrYAui.css +1 -0
  36. package/.output/public/_nuxt/teams.BBXVkyKq.css +1 -0
  37. package/.output/public/assets/game/character/yangyang-walk.glb +0 -0
  38. package/.output/server/chunks/_/host-bindings.mjs +1 -1
  39. package/.output/server/chunks/_/nitro.mjs +1013 -844
  40. package/.output/server/chunks/_/nitro.mjs.map +1 -1
  41. package/.output/server/chunks/build/{TownView-DxeQe1Bl.mjs → TownView-ftIylqiD.mjs} +178 -151
  42. package/.output/server/chunks/build/{TownView-DxeQe1Bl.mjs.map → TownView-ftIylqiD.mjs.map} +1 -1
  43. package/.output/server/chunks/build/{_id_-DQDqj-cZ.mjs → _id_-3Axz2-gV.mjs} +35 -35
  44. package/.output/server/chunks/build/{_id_-DQDqj-cZ.mjs.map → _id_-3Axz2-gV.mjs.map} +1 -1
  45. package/.output/server/chunks/build/{_id_-DY6v6sqB.mjs → _id_-CahfkmEt.mjs} +5 -5
  46. package/.output/server/chunks/build/{_id_-DY6v6sqB.mjs.map → _id_-CahfkmEt.mjs.map} +1 -1
  47. package/.output/server/chunks/build/{_wsId_-D38Vx6Ky.mjs → _wsId_-BymlQhzS.mjs} +7 -7
  48. package/.output/server/chunks/build/{_wsId_-D38Vx6Ky.mjs.map → _wsId_-BymlQhzS.mjs.map} +1 -1
  49. package/.output/server/chunks/build/{agents-GnmUGZir.mjs → agents-DuMiSWKp.mjs} +4 -4
  50. package/.output/server/chunks/build/{agents-GnmUGZir.mjs.map → agents-DuMiSWKp.mjs.map} +1 -1
  51. package/.output/server/chunks/build/{channel-templates-B4z6v8Z5.mjs → channel-templates-BStqJ-of.mjs} +2 -2
  52. package/.output/server/chunks/build/{channel-templates-B4z6v8Z5.mjs.map → channel-templates-BStqJ-of.mjs.map} +1 -1
  53. package/.output/server/chunks/build/{checkbox-dzcpU_Cd.mjs → checkbox-C1gABOca.mjs} +4 -4
  54. package/.output/server/chunks/build/{checkbox-dzcpU_Cd.mjs.map → checkbox-C1gABOca.mjs.map} +1 -1
  55. package/.output/server/chunks/build/{daq-B-3xCp_2.mjs → daq-ChYCABz1.mjs} +312 -426
  56. package/.output/server/chunks/build/daq-ChYCABz1.mjs.map +1 -0
  57. package/.output/server/chunks/build/{dcw-BL2dhuz7.mjs → dcw-CcQNGggh.mjs} +3 -3
  58. package/.output/server/chunks/build/{dcw-BL2dhuz7.mjs.map → dcw-CcQNGggh.mjs.map} +1 -1
  59. package/.output/server/chunks/build/{default-CLf5m0NE.mjs → default-95-zOTPt.mjs} +2 -2
  60. package/.output/server/chunks/build/{default-CLf5m0NE.mjs.map → default-95-zOTPt.mjs.map} +1 -1
  61. package/.output/server/chunks/build/{logs-Dto_umFY.mjs → logs-D-2UyGtE.mjs} +3 -3
  62. package/.output/server/chunks/build/{logs-Dto_umFY.mjs.map → logs-D-2UyGtE.mjs.map} +1 -1
  63. package/.output/server/chunks/build/{monitor-Cp4V-H2n.mjs → monitor-mfG5jBtz.mjs} +3 -3
  64. package/.output/server/chunks/build/{monitor-Cp4V-H2n.mjs.map → monitor-mfG5jBtz.mjs.map} +1 -1
  65. package/.output/server/chunks/build/{pages-Dc2H1QFu.mjs → pages-Dfosfchr.mjs} +4 -4
  66. package/.output/server/chunks/build/{pages-Dc2H1QFu.mjs.map → pages-Dfosfchr.mjs.map} +1 -1
  67. package/.output/server/chunks/build/{permissions-BTRW2CVd.mjs → permissions-B-hhZuzm.mjs} +3 -3
  68. package/.output/server/chunks/build/{permissions-BTRW2CVd.mjs.map → permissions-B-hhZuzm.mjs.map} +1 -1
  69. package/.output/server/chunks/build/{settings-UfGyDgM7.mjs → settings-BajN9TQW.mjs} +249 -20
  70. package/.output/server/chunks/build/settings-BajN9TQW.mjs.map +1 -0
  71. package/.output/server/chunks/build/{table-Cswq-l2r.mjs → table-Bf1r2JjE.mjs} +2 -2
  72. package/.output/server/chunks/build/{table-Cswq-l2r.mjs.map → table-Bf1r2JjE.mjs.map} +1 -1
  73. package/.output/server/chunks/build/{teams-Cbg27MWW.mjs → teams-t2SkRlJP.mjs} +346 -46
  74. package/.output/server/chunks/build/teams-t2SkRlJP.mjs.map +1 -0
  75. package/.output/server/chunks/build/{tokens-Bmm6rDfj.mjs → tokens-DiCojbN8.mjs} +3 -3
  76. package/.output/server/chunks/build/{tokens-Bmm6rDfj.mjs.map → tokens-DiCojbN8.mjs.map} +1 -1
  77. package/.output/server/chunks/build/{town-Dsh0jlwZ.mjs → town-C7QM8DYK.mjs} +5 -5
  78. package/.output/server/chunks/build/{town-Dsh0jlwZ.mjs.map → town-C7QM8DYK.mjs.map} +1 -1
  79. package/.output/server/chunks/build/{useDaqStream-DkRL3tEW.mjs → useDaqStream-BeA2X8KR.mjs} +26 -11
  80. package/.output/server/chunks/build/useDaqStream-BeA2X8KR.mjs.map +1 -0
  81. package/.output/server/chunks/build/{useDcwStream-DyB2ufQI.mjs → useDcwStream-BJW_MitY.mjs} +14 -6
  82. package/.output/server/chunks/build/useDcwStream-BJW_MitY.mjs.map +1 -0
  83. package/.output/server/chunks/build/{useDeviceTwins-ZbT86L9O.mjs → useDeviceTwins-Dwz_EY_i.mjs} +2 -2
  84. package/.output/server/chunks/build/{useDeviceTwins-ZbT86L9O.mjs.map → useDeviceTwins-Dwz_EY_i.mjs.map} +1 -1
  85. package/.output/server/chunks/build/{useOpsLog-8HCYFb6n.mjs → useOpsLog-Dm8QEb1I.mjs} +2 -2
  86. package/.output/server/chunks/build/{useOpsLog-8HCYFb6n.mjs.map → useOpsLog-Dm8QEb1I.mjs.map} +1 -1
  87. package/.output/server/chunks/build/{useWorkshopApi-D2gq06N2.mjs → useWorkshopApi-B-L3MmIX.mjs} +9 -2
  88. package/.output/server/chunks/build/{useWorkshopApi-D2gq06N2.mjs.map → useWorkshopApi-B-L3MmIX.mjs.map} +1 -1
  89. package/.output/server/chunks/build/{users-B50HHrfi.mjs → users-B9SAdEtH.mjs} +3 -3
  90. package/.output/server/chunks/build/{users-B50HHrfi.mjs.map → users-B9SAdEtH.mjs.map} +1 -1
  91. package/.output/server/chunks/routes/api/plugins/_name/_...path_.mjs +14 -2
  92. package/.output/server/chunks/routes/api/plugins/_name/_...path_.mjs.map +1 -1
  93. package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs +1 -1
  94. package/.output/server/chunks/routes/api/workshop/channels/_id/index.put.mjs +40 -0
  95. package/.output/server/chunks/routes/api/workshop/channels/_id/index.put.mjs.map +1 -0
  96. package/.output/server/chunks/routes/api/workshop/channels/_id/index4.get.mjs +21 -9
  97. package/.output/server/chunks/routes/api/workshop/channels/_id/index4.get.mjs.map +1 -1
  98. package/.output/server/chunks/routes/api/workshop/channels/_id/index5.get.mjs +33 -0
  99. package/.output/server/chunks/routes/api/workshop/channels/_id/index5.get.mjs.map +1 -0
  100. package/.output/server/chunks/routes/api/workshop/channels/_id/terminals.get.mjs +1 -1
  101. package/.output/server/chunks/routes/api/workshop/channels.post.mjs +15 -1
  102. package/.output/server/chunks/routes/api/workshop/channels.post.mjs.map +1 -1
  103. package/.output/server/chunks/routes/api/workshop/daq/_id/bind.post.mjs +1 -1
  104. package/.output/server/chunks/routes/api/workshop/daq/_id/bindings.put.mjs +1 -1
  105. package/.output/server/chunks/routes/api/workshop/daq/_id/frames/content.get.mjs +1 -1
  106. package/.output/server/chunks/routes/api/workshop/daq/_id/frames.get.mjs +1 -1
  107. package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs +1 -1
  108. package/.output/server/chunks/routes/api/workshop/daq/_id/test.post.mjs +1 -1
  109. package/.output/server/chunks/routes/api/workshop/daq/_id_.delete.mjs +1 -1
  110. package/.output/server/chunks/routes/api/workshop/daq/_id_.patch.mjs +1 -1
  111. package/.output/server/chunks/routes/api/workshop/daq/alarms/_id/ack.post.mjs +1 -1
  112. package/.output/server/chunks/routes/api/workshop/daq/controller.post.mjs +1 -1
  113. package/.output/server/chunks/routes/api/workshop/daq/index.post.mjs +1 -1
  114. package/.output/server/chunks/routes/api/workshop/daq/infra/reconnect.post.mjs +1 -1
  115. package/.output/server/chunks/routes/api/workshop/daq/infra.get.mjs +1 -1
  116. package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.delete.mjs +1 -1
  117. package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.patch.mjs +1 -1
  118. package/.output/server/chunks/routes/api/workshop/daq/test-driver.post.mjs +1 -1
  119. package/.output/server/chunks/routes/api/workshop/dcw/_id/bind.post.mjs +1 -1
  120. package/.output/server/chunks/routes/api/workshop/dcw/_id/bindings.put.mjs +1 -1
  121. package/.output/server/chunks/routes/api/workshop/dcw/_id/param-ledger.get.mjs +1 -1
  122. package/.output/server/chunks/routes/api/workshop/dcw/_id/read.post.mjs +1 -1
  123. package/.output/server/chunks/routes/api/workshop/dcw/_id/test.post.mjs +1 -1
  124. package/.output/server/chunks/routes/api/workshop/dcw/_id/write.post.mjs +1 -1
  125. package/.output/server/chunks/routes/api/workshop/dcw/_id_.delete.mjs +1 -1
  126. package/.output/server/chunks/routes/api/workshop/dcw/_id_.patch.mjs +1 -1
  127. package/.output/server/chunks/routes/api/workshop/dcw/controller.post.mjs +1 -1
  128. package/.output/server/chunks/routes/api/workshop/dcw/index.get.mjs +1 -1
  129. package/.output/server/chunks/routes/api/workshop/dcw/index.post.mjs +1 -1
  130. package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs +1 -1
  131. package/.output/server/chunks/routes/api/workshop/dcw/index2.post.mjs +1 -1
  132. package/.output/server/chunks/routes/api/workshop/dcw/index3.get.mjs +1 -1
  133. package/.output/server/chunks/routes/api/workshop/dcw/index3.post.mjs +1 -1
  134. package/.output/server/chunks/routes/api/workshop/dcw/index4.get.mjs +1 -1
  135. package/.output/server/chunks/routes/api/workshop/dcw/index4.post.mjs +1 -1
  136. package/.output/server/chunks/routes/api/workshop/dcw/index5.get.mjs +1 -1
  137. package/.output/server/chunks/routes/api/workshop/dcw/journal/node/_nodeId/rollback.post.mjs +1 -1
  138. package/.output/server/chunks/routes/api/workshop/dcw/line/query.get.mjs +1 -1
  139. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs +1 -1
  140. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs +1 -1
  141. package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.delete.mjs +1 -1
  142. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/judge.post.mjs +1 -1
  143. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/rollback.post.mjs +1 -1
  144. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/series.get.mjs +1 -1
  145. package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id_.get.mjs +1 -1
  146. package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.delete.mjs +1 -1
  147. package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.patch.mjs +1 -1
  148. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/apply.post.mjs +1 -1
  149. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/mark-good.post.mjs +1 -1
  150. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/rollback-good.post.mjs +1 -1
  151. package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id_.delete.mjs +1 -1
  152. package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/close.post.mjs +1 -1
  153. package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/data.get.mjs +1 -1
  154. package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/rollback.post.mjs +1 -1
  155. package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.delete.mjs +1 -1
  156. package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.patch.mjs +1 -1
  157. package/.output/server/chunks/routes/api/workshop/dcw/test-driver.post.mjs +1 -1
  158. package/.output/server/chunks/routes/api/workshop/device-twins/_id_.delete.mjs +1 -1
  159. package/.output/server/chunks/routes/api/workshop/device-twins/_id_.patch.mjs +1 -1
  160. package/.output/server/chunks/routes/api/workshop/harnesses/_id/providers.get.mjs +1 -1
  161. package/.output/server/chunks/routes/api/workshop/harnesses.get.mjs +1 -1
  162. package/.output/server/chunks/routes/api/workshop/hitl/pending.get.mjs +1 -1
  163. package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs +1 -1
  164. package/.output/server/chunks/routes/api/workshop/index.put.mjs +1 -1
  165. package/.output/server/chunks/routes/api/workshop/index3.post.mjs +1 -1
  166. package/.output/server/chunks/routes/api/workshop/index4.get.mjs +1 -1
  167. package/.output/server/chunks/routes/api/workshop/index4.post.mjs +1 -1
  168. package/.output/server/chunks/routes/api/workshop/index5.get.mjs +1 -1
  169. package/.output/server/chunks/routes/api/workshop/index5.post.mjs +1 -1
  170. package/.output/server/chunks/routes/api/workshop/index6.post.mjs +1 -1
  171. package/.output/server/chunks/routes/api/workshop/plugins/_name/disable.post.mjs +1 -1
  172. package/.output/server/chunks/routes/api/workshop/plugins/_name/enable.post.mjs +1 -1
  173. package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.delete.mjs +1 -1
  174. package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.put.mjs +1 -1
  175. package/.output/server/chunks/routes/api/workshop/workspaces/_id/channel-templates/_tplId_.post.mjs +1 -1
  176. package/.output/server/chunks/routes/renderer.mjs +2 -2
  177. package/.output/server/chunks/virtual/entry.mjs +352 -433
  178. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  179. package/.output/server/package.json +1 -1
  180. package/app/components/workshop/DaqNodeRow.vue +398 -0
  181. package/app/components/workshop/town/ModelPreview3D.vue +26 -4
  182. package/app/components/workshop/town/TownScene3D.ts +60 -12
  183. package/app/components/workshop/town/TownView.vue +4 -3
  184. package/app/composables/workshop/useCharacterAssets.ts +1 -0
  185. package/app/composables/workshop/useDaqStream.ts +24 -5
  186. package/app/composables/workshop/useDcwStream.ts +13 -4
  187. package/app/composables/workshop/useWorkshopApi.ts +294 -259
  188. package/app/pages/daq/[id].vue +27 -3
  189. package/app/pages/daq/index.vue +8 -355
  190. package/app/pages/settings.vue +253 -2
  191. package/app/pages/workshop/teams.vue +212 -2
  192. package/i18n/dicts/_en.json +361 -1
  193. package/i18n/dicts/plugins.json +10 -0
  194. package/i18n/dicts/settings.json +1 -0
  195. package/i18n/dicts/teamPlugins.json +10 -0
  196. package/i18n/locales/en.ts +1860 -1900
  197. package/i18n/locales/zh-CN.ts +1788 -1829
  198. package/package.json +149 -148
  199. package/public/assets/game/character/yangyang-walk.glb +0 -0
  200. package/scripts/_dbg-cpu-profile.mjs +53 -0
  201. package/scripts/_dbg-render-perf.mjs +142 -0
  202. package/scripts/_dbg-render-regression.mjs +130 -0
  203. package/scripts/i18n-merge.mjs +152 -30
  204. package/scripts/production-closed-loop-e2e.mjs +254 -0
  205. package/scripts/team-plugins-api-smoke.mjs +149 -0
  206. package/scripts/three-system-e2e.mjs +448 -0
  207. package/server/api/plugins/[name]/[...path].ts +46 -31
  208. package/server/api/workshop/channels/[id]/plugins/index.get.ts +35 -0
  209. package/server/api/workshop/channels/[id]/plugins/index.put.ts +39 -0
  210. package/server/api/workshop/channels.post.ts +17 -0
  211. package/server/data/dcw-lines.json +7 -0
  212. package/server/data/dcw-products.json +7 -0
  213. package/server/data/dcw-recipes.json +1 -1
  214. package/server/data/dcw-rollback.json +523 -11
  215. package/server/data/dcw-writes.json +72 -0
  216. package/server/data/dcws.json +368 -368
  217. package/server/data/scene-layouts.json +66 -0
  218. package/server/plugins/aw-plugins.ts +35 -27
  219. package/server/plugins-builtin/diag-bridge/index.mjs +556 -0
  220. package/server/plugins-builtin/rag-bridge/index.mjs +364 -0
  221. package/server/services/workshop/agents/host-tool-bridge.ts +659 -642
  222. package/server/services/workshop/agents/omp-agent.ts +1178 -1178
  223. package/server/services/workshop/agents/plugin-tools.ts +10 -1
  224. package/server/services/workshop/db/channel-plugins.repo.ts +65 -0
  225. package/server/services/workshop/plugins/host.mjs +52 -4
  226. package/server/services/workshop/runtime/manager.ts +2976 -2968
  227. package/shared/config/schema.json +4 -0
  228. package/.output/public/_nuxt/BUcmySDa2.js +0 -209
  229. package/.output/public/_nuxt/CYzpZzB_.js +0 -1
  230. package/.output/public/_nuxt/CjXIpPMR.js +0 -1
  231. package/.output/public/_nuxt/DKHcFE1i.js +0 -1
  232. package/.output/public/_nuxt/DjtE7AYt.js +0 -1
  233. package/.output/public/_nuxt/JOwsShod.js +0 -2
  234. package/.output/public/_nuxt/_id_.C-YXjn8Q.css +0 -1
  235. package/.output/public/_nuxt/builds/meta/024de5f7-6a10-4f53-82ab-bc65f3ec9e35.json +0 -1
  236. package/.output/public/_nuxt/daq.3OKj58HH.css +0 -1
  237. package/.output/public/_nuxt/settings.BqMF2nfj.css +0 -1
  238. package/.output/public/_nuxt/teams.DN0pAGGu.css +0 -1
  239. package/.output/server/chunks/build/daq-B-3xCp_2.mjs.map +0 -1
  240. package/.output/server/chunks/build/settings-UfGyDgM7.mjs.map +0 -1
  241. package/.output/server/chunks/build/teams-Cbg27MWW.mjs.map +0 -1
  242. package/.output/server/chunks/build/useDaqStream-DkRL3tEW.mjs.map +0 -1
  243. package/.output/server/chunks/build/useDcwStream-DyB2ufQI.mjs.map +0 -1
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
8
8
  import { message } from 'ant-design-vue'
9
- import { useDaqStream } from '@/app/composables/workshop/useDaqStream'
9
+ import { useDaqStream, type DaqNodeLive } from '@/app/composables/workshop/useDaqStream'
10
10
  import { useDcwStream } from '@/app/composables/workshop/useDcwStream'
11
11
  import { useWorkshopWs } from '@/app/composables/workshop/useWorkshopWs'
12
12
  import { DAQ_TEMPLATES, DAQ_DRIVERS, DAQ_TEMPLATE_ICONS, daqKeyFromRef, type DaqNodeView, type DaqNodeState, type DriverConfigField, type DriverTestResult as DaqDriverTestResult, type DaqTemplateDef, type DaqTemplateIcon } from '#shared/daq-protocol'
@@ -27,81 +27,6 @@ const ws = useWorkshopWs()
27
27
  /** 是否存在任意运行中的产线(横幅判定) */
28
28
  const anyLineActive = computed(() => dcw.lines.some(l => dcw.lineStateOf(l.id).active))
29
29
 
30
- /** 节点产线归属变更(挂载到产线/移出;失败 toast 后端可读原因) */
31
- async function setNodeLine(id: string, e: Event): Promise<void> {
32
- const lineId = (e.target as HTMLSelectElement).value
33
- try {
34
- await daq.patchNode(id, { lineId })
35
- const n = daq.nodes.find(x => x.id === id)
36
- if (n) n.lineId = lineId
37
- }
38
- catch (err) {
39
- message.error(apiErrorMessage(err))
40
- }
41
- }
42
-
43
- /** 节点绑定设备(多对多:add 挂新设备 / remove 摘除一台;server 落库,与数字孪生同一 deviceIds 链路) */
44
- async function addNodeDevice(id: string, e: Event): Promise<void> {
45
- const deviceId = (e.target as HTMLSelectElement).value
46
- if (!deviceId) return
47
- const node = daq.nodes.find(n => n.id === id)
48
- if (!node) return
49
- if (node.deviceIds?.includes(deviceId)) return
50
- try {
51
- await daq.setNodeBindings(id, [...(node.deviceIds ?? []), deviceId])
52
- }
53
- catch (err) {
54
- message.error(apiErrorMessage(err))
55
- }
56
- ;(e.target as HTMLSelectElement).value = ''
57
- }
58
-
59
- async function removeNodeDevice(id: string, deviceId: string): Promise<void> {
60
- const node = daq.nodes.find(n => n.id === id)
61
- if (!node) return
62
- try {
63
- await daq.setNodeBindings(id, (node.deviceIds ?? []).filter(d => d !== deviceId))
64
- }
65
- catch (err) {
66
- message.error(apiErrorMessage(err))
67
- }
68
- }
69
-
70
- const nodeDeviceIds = (n: DaqNodeView): string[] =>
71
- n.deviceIds ?? (n.deviceBindingId ? [n.deviceBindingId] : [])
72
- const deviceNameById = (id: string): string =>
73
- nodeDevices.get(id) ?? deviceTwins.twins.find(t => t.id === id)?.name ?? id
74
-
75
- /** 单节点独立 启动/停止采集(PATCH enabled;server 权威,本地乐观翻转 + WS/轮询收敛) */
76
- async function toggleNodeEnabled(n: { id: string, enabled: boolean, state: string }): Promise<void> {
77
- const next = !n.enabled
78
- try {
79
- await daq.patchNode(n.id, { enabled: next })
80
- n.enabled = next
81
- if (!next) n.state = 'offline'
82
- message.success(next ? tt('daq.k1nodestart147') : tt('daq.k1nodestop146'))
83
- }
84
- catch (err) {
85
- message.error(apiErrorMessage(err))
86
- }
87
- }
88
-
89
- /** 活动配方对该节点的数采监控窗口(本线活动批次;不同 Recipe 不同窗口) */
90
- function recipeWinOf(n: { lineId: string, id: string }): { min?: number, max?: number } | null {
91
- if (!n.lineId) return null
92
- const run = dcw.lineStateOf(n.lineId)
93
- if (!run.active || !run.recipeId) return null
94
- const r = dcw.recipes.find(x => x.id === run.recipeId)
95
- return r?.daqWindows?.find(w => w.nodeId === n.id) ?? null
96
- }
97
-
98
- /** 配方窗口越限(与服务端 alarm 判定同源;行标红) */
99
- function recipeAlarm(n: DaqNodeView): boolean {
100
- const w = recipeWinOf(n)
101
- if (!w || n.value == null) return false
102
- return (w.min != null && n.value < w.min) || (w.max != null && n.value > w.max)
103
- }
104
-
105
30
  // ---------- 运维日志(全操作统一记录):实时事件轨渲染摘要,详情在 /logs 日志管理 ----------
106
31
  const opsLog = useOpsLog()
107
32
 
@@ -117,38 +42,6 @@ function opsTime(at: string): string {
117
42
  : ''
118
43
  }
119
44
 
120
- // ---------- 实时趋势(行内 sparkline;hist 为 WS 读数流客户端缓冲,每帧推进) ----------
121
- const TREND_W = 120
122
- const TREND_H = 26
123
-
124
- function trendPath(hist: number[]): string {
125
- const vals = hist.filter(Number.isFinite)
126
- if (vals.length < 2) return ''
127
- const min = Math.min(...vals)
128
- const max = Math.max(...vals)
129
- const span = max - min || 1
130
- return vals.map((v, i) => `${((i / (vals.length - 1)) * TREND_W).toFixed(1)},${(TREND_H - ((v - min) / span) * (TREND_H - 2) - 1).toFixed(1)}`).join(' ')
131
- }
132
-
133
- /** 上下限参考线在趋势图内的 y 坐标(量程不可知或无数据时返回 null 不画) */
134
- function limitY(hist: number[], limit: number | undefined | null): number | null {
135
- if (limit == null || !Number.isFinite(limit)) return null
136
- const vals = hist.filter(Number.isFinite)
137
- if (vals.length < 2) return null
138
- const min = Math.min(...vals, limit)
139
- const max = Math.max(...vals, limit)
140
- const span = max - min || 1
141
- return Number((TREND_H - ((limit - min) / span) * (TREND_H - 2) - 1).toFixed(1))
142
- }
143
-
144
- /** 行内趋势的有效限值:活动配方窗口优先,节点预警带兜底,皆无 → 不画限值线 */
145
- function limitOf(n: DaqNodeView): { min: number | null | undefined, max: number | null | undefined, source: 'recipe' | 'warn' } {
146
- const w = recipeWinOf(n)
147
- if (w && (w.min != null || w.max != null)) return { min: w.min, max: w.max, source: 'recipe' }
148
- if (n.warnLow != null || n.warnHigh != null) return { min: n.warnLow, max: n.warnHigh, source: 'warn' }
149
- return { min: null, max: null, source: 'warn' }
150
- }
151
-
152
45
  /** 未确认报警确认(失败 toast 后端可读原因;成功后 fetchAlarms 已由 store 内部刷新) */
153
46
  async function ackOne(id: string): Promise<void> {
154
47
  try {
@@ -337,7 +230,7 @@ const filteredLine = computed(() => dcw.lines.find(l => l.id === filters.lineId)
337
230
  const filteredLineState = computed(() =>
338
231
  filteredLine.value ? dcw.lineStateOf(filteredLine.value.id) : null)
339
232
 
340
- // ---------- 行级展示状态(真实场景语义):人为停用/未分配/产线未运行 与 故障离线 分离 ----------
233
+ // ---------- 行级展示状态(真实场景语义;筛选用,pill 呈现在 DaqNodeRow 行组件) ----------
341
234
  // 状态机:disabled(人为停用) → unassigned(未挂产线,永不采集) → idle(产线未开跑,采集门控)
342
235
  // → offline(网关暂停,或产线运行中却采不到新数据) → ok/warn/alarm(新鲜数据按量程/预警带/配方窗口派生)
343
236
  type RowState = DaqNodeState | 'idle' | 'disabled' | 'unassigned'
@@ -357,42 +250,7 @@ function rowStateOf(n: DaqNodeView): RowState {
357
250
  return n.state
358
251
  }
359
252
 
360
- /** 数据是否在线(实时值列据此区分「实时值」与「最后值」) */
361
- function isLive(n: DaqNodeView): boolean {
362
- const s = rowStateOf(n)
363
- return s === 'ok' || s === 'warn' || s === 'alarm'
364
- }
365
-
366
- const rowLabel: Record<RowState, string> = {
367
- ok: tt('daq.k41k5c062'),
368
- warn: tt('daq.k49z8v063'),
369
- alarm: tt('daq.k3xmid064'),
370
- offline: tt('daq.k44c2n065'),
371
- idle: tt('daq.k3ozyqz117'),
372
- disabled: tt('daq.k1disabl130'),
373
- unassigned: tt('daq.k3ootr6053'),
374
- }
375
-
376
- /** 状态 pill(含诚实的原因提示;配方越限标签仅在数据新鲜时展示) */
377
- function statePillOf(n: DaqNodeView): { key: RowState, label: string, tip: string } {
378
- const s = rowStateOf(n)
379
- if (s === 'offline') {
380
- // 采样失败优先透出分类错误(连接/超时/PLC 异常 + 处理提示);无错误才给通用提示
381
- if (n.lastError) return { key: s, label: rowLabel.offline, tip: n.lastError }
382
- const tip = !daq.controller.running
383
- ? tt('daq.k1gateoff140')
384
- : tt('daq.k1staled129', { p0: Math.round(Math.max((n.intervalMs ?? daq.controller.defaultIntervalMs) * 4, 12_000) / 1000) })
385
- return { key: s, label: rowLabel.offline, tip }
386
- }
387
- if (s === 'idle') return { key: s, label: rowLabel.idle, tip: tt('daq.k1idlehin139') }
388
- if ((s === 'ok' || s === 'warn' || s === 'alarm') && recipeAlarm(n)) {
389
- const w = recipeWinOf(n)
390
- return { key: 'alarm', label: tt('daq.k1l3pt51104'), tip: tt('daq.k1hrrqa1122', { p0: w?.min ?? '-∞', p1: w?.max ?? '+∞', p2: '' }) }
391
- }
392
- return { key: s, label: rowLabel[s], tip: '' }
393
- }
394
-
395
- const filteredNodes = computed<DaqNodeView[]>(() => daq.nodes.filter((n) => {
253
+ const filteredNodes = computed<DaqNodeLive[]>(() => daq.nodes.filter((n) => {
396
254
  if (filters.lineId && (filters.lineId === 'none' ? !!n.lineId : (n.lineId ?? '') !== filters.lineId)) return false
397
255
  const nodeDevIds = n.deviceIds ?? (n.deviceBindingId ? [n.deviceBindingId] : [])
398
256
  if (filters.deviceId && (filters.deviceId === 'none' ? nodeDevIds.length > 0 : !nodeDevIds.includes(filters.deviceId))) return false
@@ -405,48 +263,13 @@ const filteredNodes = computed<DaqNodeView[]>(() => daq.nodes.filter((n) => {
405
263
  return true
406
264
  }))
407
265
 
408
- /** 行渲染上下文预计算:状态 pill/配方越限/在离线/模板名 每行只算一次,
409
- * 模板里 11 次函数调用/行(102 行 = 1100+ 次/渲染,含多次 .find)收敛为 1 次查表 */
410
- const rowCtx = computed(() => {
411
- const m = new Map<string, { pill: { key: RowState, label: string, tip: string }, alarm: boolean, live: boolean, tpl: string }>()
412
- for (const n of filteredNodes.value) {
413
- m.set(n.id, {
414
- pill: statePillOf(n),
415
- alarm: recipeAlarm(n),
416
- live: isLive(n),
417
- tpl: daqTemplateRefCh(n.templateRef),
418
- })
419
- }
420
- return m
421
- })
422
- const EMPTY_CTX = { pill: { key: 'offline' as RowState, label: '', tip: '' }, alarm: false, live: false, tpl: '-' }
423
- /** 行渲染视图:节点 + 预计算上下文成对交付,模板零函数调用 */
424
- const filteredRows = computed(() =>
425
- filteredNodes.value.map(n => ({ n, c: rowCtx.value.get(n.id) ?? EMPTY_CTX })))
426
-
427
- // 设备名映射(device-twins 注册表;绑定列展示用)
266
+ // 设备名映射(device-twins 注册表;绑定筛选下拉展示用)
428
267
  const deviceTwins = useDeviceTwins()
429
268
  const nodeDevices = new Map<string, string>()
430
269
  watch(() => deviceTwins.twins, (list) => {
431
270
  for (const t of list) nodeDevices.set(t.id, t.name)
432
271
  }, { immediate: true, deep: true })
433
272
 
434
- /** 绑定设备下拉选项:全部真实设备孪生(剔除 daq/dcw 伪孪生) */
435
- const bindableDeviceTwins = computed(() =>
436
- deviceTwins.twins.filter(t => t.kind !== 'daq' && !(t.modelRef ?? '').startsWith('daq-') && !(t.modelRef ?? '').startsWith('dcw-')))
437
-
438
- const intervalOf = (intervalMs: number | null): string => {
439
- if (intervalMs == null) return tt('daq.k9vnp9h124', { p0: daq.controller.defaultIntervalMs })
440
- return `${intervalMs}ms`
441
- }
442
-
443
- /** WS 下发节拍展示(null=跟随全局;0=每帧;>0 独立间隔) */
444
- const publishOf = (v: number | null): string => {
445
- if (v == null) return tt('daq.k9vnp9h124', { p0: daq.controller.defaultPublishIntervalMs })
446
- if (v === 0) return tt('daq.k41mvv078')
447
- return `${v}ms`
448
- }
449
-
450
273
  // ---------- 添加节点向导(mock / 真实场景 + 动态参数表单 + 测试连接) ----------
451
274
  const addOpen = ref(false)
452
275
  const addScenario = ref<'mock' | 'real'>('mock')
@@ -640,10 +463,6 @@ async function askDelTpl(t: DaqTemplateDef): Promise<void> {
640
463
  }
641
464
  }
642
465
 
643
- /** 驱动是否为预留协议(meta status=planned) */
644
- const driverPlanned = (kind: string): boolean =>
645
- daq.meta.drivers.find(d => d.kind === kind)?.status === 'planned'
646
-
647
466
  const reconnecting = ref(false)
648
467
  async function doReconnect(): Promise<void> {
649
468
  reconnecting.value = true
@@ -1677,177 +1496,11 @@ async function doReconnect(): Promise<void> {
1677
1496
  </tr>
1678
1497
  </thead>
1679
1498
  <tbody>
1680
- <tr
1681
- v-for="{ n, c } in filteredRows"
1499
+ <WorkshopDaqNodeRow
1500
+ v-for="n in filteredNodes"
1682
1501
  :key="n.id"
1683
- :class="{ 'row-recipe-alarm': c.alarm }"
1684
- >
1685
- <td>
1686
- <span class="mono dim">{{ n.id.slice(0, 8) }}</span>
1687
- <b>{{ n.name }}</b>
1688
- <small class="mono ch">{{ c.tpl }}</small>
1689
- </td>
1690
- <td>
1691
- <span
1692
- class="st-pill"
1693
- :class="[c.pill.key]"
1694
- :title="c.pill.tip"
1695
- >{{ c.pill.label }}</span>
1696
- </td>
1697
- <td
1698
- class="mono val"
1699
- :class="{ 'stale': !c.live, 'val-alarm': n.state === 'alarm' || c.alarm }"
1700
- :title="c.live ? undefined : c.pill.tip"
1701
- >
1702
- {{ n.value != null ? n.value.toFixed(n.decimals) : '--' }}
1703
- <small>{{ n.unit }}</small>
1704
- </td>
1705
- <td class="trend-cell">
1706
- <svg
1707
- class="trend"
1708
- viewBox="0 0 120 26"
1709
- preserveAspectRatio="none"
1710
- :title="$t('daq.k1trnd002')"
1711
- >
1712
- <line
1713
- v-if="limitY(n.hist, limitOf(n).min) != null"
1714
- class="lim"
1715
- x1="0"
1716
- :y1="limitY(n.hist, limitOf(n).min)"
1717
- x2="120"
1718
- :y2="limitY(n.hist, limitOf(n).min)"
1719
- />
1720
- <line
1721
- v-if="limitY(n.hist, limitOf(n).max) != null"
1722
- class="lim max"
1723
- x1="0"
1724
- :y1="limitY(n.hist, limitOf(n).max)"
1725
- x2="120"
1726
- :y2="limitY(n.hist, limitOf(n).max)"
1727
- />
1728
- <polyline
1729
- class="trace"
1730
- :class="{ alarm: n.state === 'alarm' || c.alarm }"
1731
- :points="trendPath(n.hist)"
1732
- />
1733
- </svg>
1734
- </td>
1735
- <td class="mono">
1736
- {{ intervalOf(n.intervalMs) }}
1737
- </td>
1738
- <td class="mono">
1739
- {{ publishOf(n.publishIntervalMs) }}
1740
- </td>
1741
- <td>
1742
- <span
1743
- class="drv-tag"
1744
- :class="{ planned: driverPlanned(n.driver) }"
1745
- :title="driverPlanned(n.driver) ? $t('daq.k1plndrv138') : ''"
1746
- >{{ n.driver }}</span>
1747
- </td>
1748
- <td>
1749
- <select
1750
- class="line-sel"
1751
- :value="n.lineId"
1752
- :title="$t('daq.k3q23v3010')"
1753
- @change="setNodeLine(n.id, $event)"
1754
- >
1755
- <option value="">
1756
- {{ $t('daq.k3ootr6053') }}
1757
- </option>
1758
- <option
1759
- v-for="l in dcw.lines"
1760
- :key="l.id"
1761
- :value="l.id"
1762
- >
1763
- {{ l.name }}
1764
- </option>
1765
- </select>
1766
- </td>
1767
- <!-- 产线运行:呼吸绿点=运行中 / 空心点=未运行(与产线状态带同一套点语义) -->
1768
- <td>
1769
- <span
1770
- v-if="n.lineId"
1771
- class="run-pill"
1772
- :class="{ on: dcw.lineStateOf(n.lineId).active }"
1773
- :title="$t('daq.k1runtipc131')"
1774
- >
1775
- <span class="rp-dot" />
1776
- {{ dcw.lineStateOf(n.lineId).active ? $t('daq.k3vp67i096') : $t('daq.k3ozyqz117') }}
1777
- </span>
1778
- <span
1779
- v-else
1780
- class="run-pill na"
1781
- >{{ $t('daq.k3ootr6053') }}</span>
1782
- </td>
1783
- <!-- 产品 / Recipe:本线活动批次(运行中才携带;停线/未分配 → --) -->
1784
- <td class="prod-cell">
1785
- <template v-if="n.lineId && dcw.lineStateOf(n.lineId).active">
1786
- <b :title="$t('daq.k1prdrtip132')">{{ dcw.lineStateOf(n.lineId).productName || '--' }}</b>
1787
- <small
1788
- class="mono"
1789
- :title="$t('daq.k1prdrtip132')"
1790
- >{{ dcw.lineStateOf(n.lineId).recipeName || '--' }}</small>
1791
- </template>
1792
- <span
1793
- v-else
1794
- class="dim"
1795
- >--</span>
1796
- </td>
1797
- <td>
1798
- <div class="dev-binds">
1799
- <span
1800
- v-for="did in nodeDeviceIds(n)"
1801
- :key="did"
1802
- class="dev-bind-chip"
1803
- :title="$t('daq.k2bindtip137')"
1804
- >
1805
- {{ deviceNameById(did) }}
1806
- <span
1807
- class="dev-unbind"
1808
- title="unbind"
1809
- @click="removeNodeDevice(n.id, did)"
1810
- >✕</span>
1811
- </span>
1812
- <select
1813
- class="line-sel dev-add"
1814
- :value="''"
1815
- :title="$t('daq.k2bindtip137')"
1816
- @change="addNodeDevice(n.id, $event)"
1817
- >
1818
- <option value="">
1819
- {{ $t('daq.k3own4q056') }}
1820
- </option>
1821
- <option
1822
- v-for="d in bindableDeviceTwins"
1823
- :key="d.id"
1824
- :value="d.id"
1825
- :disabled="(n.deviceIds ?? []).includes(d.id)"
1826
- >
1827
- {{ nodeDevices.get(d.id) ?? d.name }}
1828
- </option>
1829
- </select>
1830
- </div>
1831
- </td>
1832
- <td class="right">
1833
- <button
1834
- class="node-toggle"
1835
- :class="{ off: !n.enabled }"
1836
- :title="n.enabled ? $t('daq.k1nodestop146') : $t('daq.k1nodestart147')"
1837
- @click="toggleNodeEnabled(n)"
1838
- >
1839
- <span :class="n.enabled ? 'i-tabler-player-pause' : 'i-tabler-player-play'" />
1840
- {{ n.enabled ? $t('daq.k1nodestop146') : $t('daq.k1nodestart147') }}
1841
- </button>
1842
- <NuxtLink
1843
- class="console-link"
1844
- :to="`/daq/${n.id}`"
1845
- >
1846
- <span class="i-tabler-dashboard" />
1847
- {{ $t('daq.k3o3jg2074') }}
1848
- </NuxtLink>
1849
- </td>
1850
- </tr>
1502
+ :n="n"
1503
+ />
1851
1504
  <tr v-if="daq.loaded && daq.nodes.length === 0">
1852
1505
  <td colspan="11">
1853
1506
  <div